freebsd-ports/security/obfsproxy/files/patch-setup.py
Carlos J. Puga Medina 8877118e6c security/obfsproxy: Make argparse a conditional dependency
Backport a patch to setup.py making argparse a conditional dependency
to fix the following error at runtime:

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

While I'm here, pet portlint, USE_* comes before USES. Bump PORTREVISION.

PR:		223320
Submitted by:	cpm
Reported by:	Hadi <rezaee.hadi@gmail.com>
Approved by:	cs (maintainer timeout, 2 weeks)
2017-11-18 12:41:18 +00:00

19 lines
427 B
Python

--- setup.py.orig 2017-11-03 11:21:18 UTC
+++ setup.py
@@ -31,12 +31,14 @@ setup(
install_requires = [
'setuptools',
'PyCrypto',
- 'Twisted',
- 'argparse',
+ 'Twisted_Core',
'pyptlib >= 0.0.6',
'pyyaml'
],
+ if sys.version_info < (2, 7):
+ install_requires.append('argparse')
+
extras_require = {
'SOCKS': ["txsocksx"]
}