aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkoobs <koobs@FreeBSD.org>2013-12-05 19:39:38 +0800
committerkoobs <koobs@FreeBSD.org>2013-12-05 19:39:38 +0800
commitd0d7360c1c66c9df51b849a9a08f14269cd515b2 (patch)
tree744041d171cf8cf7e6823c3d599f71e44084065b
parentdda73791bcbe38eaa9bcadb92b10ce9144d85c8d (diff)
downloadfreebsd-ports-gnome-d0d7360c1c66c9df51b849a9a08f14269cd515b2.tar.gz
freebsd-ports-gnome-d0d7360c1c66c9df51b849a9a08f14269cd515b2.tar.zst
freebsd-ports-gnome-d0d7360c1c66c9df51b849a9a08f14269cd515b2.zip
databases/py-mysql2pgsql: Fix argparse dependency
argparse was missing from this ports RUN_DEPENDS, causing errors on imports. argparse is avaiilable in the Python 2.7 and 3.2+ standard libraries so patch setup.py to only require it for those versions. Patch has been committed upstream and won't be necessary for the next release. While I'm here, enable STAGE support. PR: ports/183477 Submitted by: koobs Approved by: Volodymyr Kostyrko <c.kworr@gmail.com> (maintainer)
-rw-r--r--databases/py-mysql2pgsql/Makefile2
-rw-r--r--databases/py-mysql2pgsql/files/patch-setup.py27
2 files changed, 28 insertions, 1 deletions
diff --git a/databases/py-mysql2pgsql/Makefile b/databases/py-mysql2pgsql/Makefile
index 56158c524777..968b9d0a166a 100644
--- a/databases/py-mysql2pgsql/Makefile
+++ b/databases/py-mysql2pgsql/Makefile
@@ -2,6 +2,7 @@
PORTNAME= mysql2pgsql
PORTVERSION= 0.1.6
+PORTREVISION= 1
CATEGORIES= databases python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= py-${PORTNAME}-${PORTVERSION}
@@ -28,5 +29,4 @@ GH_COMMIT= 250cb1c
GH_PROJECT= py-${PORTNAME}
GH_TAGNAME= v${PORTVERSION}
-NO_STAGE= yes
.include <bsd.port.mk>
diff --git a/databases/py-mysql2pgsql/files/patch-setup.py b/databases/py-mysql2pgsql/files/patch-setup.py
new file mode 100644
index 000000000000..a17b1d5bb528
--- /dev/null
+++ b/databases/py-mysql2pgsql/files/patch-setup.py
@@ -0,0 +1,27 @@
+--- ./setup.py.orig 2012-09-12 19:25:34.000000000 +1000
++++ ./setup.py 2013-12-05 21:21:46.941032294 +1100
+@@ -1,17 +1,22 @@
+ import os
++import sys
+ from setuptools import setup
+
+ install_requires = [
+ 'mysql-python>=1.2.3',
+ 'psycopg2>=2.4.2',
+ 'pyyaml>=3.10.0',
+- 'argparse',
+ 'pytz',
+ ]
+
+ if os.name == 'posix':
+ install_requires.append('termcolor>=1.1.0')
+-
++
++version = sys.version_info[:2]
++
++if version < (2,7) or (3,0) <= version <= (3,1):
++ install_requires += ['argparse']
++
+ setup(
+ name='py-mysql2pgsql',
+ version='0.1.6',