Bug 218973 - security/py-certbot: Fails after 0.13.0 update (pkg_resources.DistributionNotFound: The 'argparse')
Summary: security/py-certbot: Fails after 0.13.0 update (pkg_resources.DistributionNot...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Carlos J. Puga Medina
URL: https://reviews.freebsd.org/D10546
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-04-30 13:07 UTC by jim
Modified: 2017-04-30 14:28 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jim 2017-04-30 13:07:35 UTC
On two different systems I see:

# certbot renew --dry-run
Traceback (most recent call last):
  File "/usr/local/bin/certbot", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3019, in <module>
    @_call_aside
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3003, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3032, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 655, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 963, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 849, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'argparse' distribution was not found and is required by certbot
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2017-04-30 14:00:54 UTC
Thank you for your report Jim. This is being addressed by Carlos as it was reported by another user a number of hours ago

@Carlos Please include this issue ID in the commit log message
Comment 2 commit-hook freebsd_committer 2017-04-30 14:27:20 UTC
A commit references this bug:

Author: cpm
Date: Sun Apr 30 14:26:42 UTC 2017
New revision: 439825
URL: https://svnweb.freebsd.org/changeset/ports/439825

Log:
  security/py-{acme,certbot}: Make argparse a conditional dependency

  Backport an upstream patch [1][2] to setup.py making argparse a conditional
  dependency. Without this change, the following error is observed at run-time:

    pkg_resources.DistributionNotFound: The 'argparse' distribution was not found and is required by certbot

  This is due to the separate argparse distribution (via PyPI) no longer being
  required for Python versions >= 2.7 and >= 3.2, as they contain the argparse
  module in the standard library.

  Since FreeBSD only supports Python versions with the argparse module built in,
  *and* having removed the devel/py-argparse port, the install_requires=argparse
  dependency cannot be satisfied, as install_requires is only relevant for non
  standard library (PyPI) packages/dependencies.

  [1] https://github.com/certbot/certbot/pull/4554
  [2] https://github.com/certbot/certbot/issues/4485

  PR:		218973
  Reported by:	olgeni
  Approved by:	koobs (py-certbot, maintainer)
  Obtained from:	https://github.com/certbot/certbot/commit/89af460792fcdfb23c7dc4f9fcdec1bfa07a2656
  Differential Revision:	https://reviews.freebsd.org/D10546

Changes:
  head/security/py-acme/Makefile
  head/security/py-acme/files/
  head/security/py-acme/files/patch-setup.py
  head/security/py-certbot/Makefile
  head/security/py-certbot/files/
  head/security/py-certbot/files/patch-setup.py
Comment 3 Carlos J. Puga Medina freebsd_committer 2017-04-30 14:28:18 UTC
Committed!

Thanks