1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-17 03:25:46 +00:00

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)
This commit is contained in:
Carlos J. Puga Medina 2017-11-18 12:41:18 +00:00
parent 3eb90746db
commit 8877118e6c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=454427
2 changed files with 15 additions and 7 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= obfsproxy
PORTVERSION= 0.2.13
PORTREVISION= 1
PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= security net python
MASTER_SITES= http://www.c-s.li/ports/
@ -18,8 +18,8 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyptlib>=0.0.5:security/py-pyptlib \
${PYTHON_PKGNAMEPREFIX}twisted>=0:devel/py-twisted \
${PYTHON_PKGNAMEPREFIX}yaml>=0:devel/py-yaml
USE_PYTHON= distutils
USES= python
USE_PYTHON= distutils
SUB_FILES= pkg-message
PYDISTUTILS_PKGNAME=obfsproxy

View File

@ -1,11 +1,19 @@
--- setup.py.orig 2013-07-14 19:01:36.000000000 +0000
+++ setup.py 2013-07-14 19:02:02.000000000 +0000
@@ -31,7 +31,7 @@
--- 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',
'argparse',
'pyptlib'
'pyptlib >= 0.0.6',
'pyyaml'
],
+ if sys.version_info < (2, 7):
+ install_requires.append('argparse')
+
extras_require = {
'SOCKS': ["txsocksx"]
}