Page MenuHomeFreeBSD

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

Authored by cpm on Apr 30 2017, 12:38 PM.

Details

Summary
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: D10546
Test Plan
  • portlint -ac output looks fine.
  • poudriere testport builds fine on 10.3/i386, 10.3/amd64, 11.0/i386, 11.0/amd64, 12.0/i386 and 12.0/amd64.
  • make test has passed all tests fine.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Change is to make dependency conditional, not unconditional. Update commit log message

  • Add Reported by:
  • include description of error that was being caused in commit log message
  • first line of commit log should be:

'''
cat/port: summary
'''

Followed by empty line then itemised changes

Accepted with above changes.

Thank you for taking care of this :)

This revision is now accepted and ready to land.Apr 30 2017, 1:18 PM
cpm retitled this revision from security/py-{acme,certbot}: make argparse dependency unconditional to security/py-{acme,certbot}: make argparse dependency conditional.Apr 30 2017, 2:10 PM
cpm edited the summary of this revision. (Show Details)
koobs retitled this revision from security/py-{acme,certbot}: make argparse dependency conditional to security/py-{acme,certbot}: make argparse dependency unconditional.Apr 30 2017, 2:12 PM
koobs edited the summary of this revision. (Show Details)
koobs retitled this revision from security/py-{acme,certbot}: make argparse dependency unconditional to security/py-{acme,certbot}: Make argparse a conditional dependency.
koobs edited the summary of this revision. (Show Details)

I've added a more descriptive commit log message with explanation and updated commit Properties:

Should be good to go if you're happy with everything, though I'm not sure this needs to or should be MFH'd?

I've added a more descriptive commit log message with explanation and updated commit Properties:

Should be good to go if you're happy with everything, though I'm not sure this needs to or should be MFH'd?

Oh, I see your point. Indeed it's not necessary to commit this change to the quarterly branch

Thanks Kubilay!

This revision was automatically updated to reflect the committed changes.