From 79617def647aff9812ff7d009cd1892de569c50a Mon Sep 17 00:00:00 2001 From: Kubilay Kocak Date: Thu, 5 Dec 2013 11:39:38 +0000 Subject: 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 (maintainer) --- databases/py-mysql2pgsql/files/patch-setup.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 databases/py-mysql2pgsql/files/patch-setup.py (limited to 'databases/py-mysql2pgsql/files/patch-setup.py') 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', -- cgit v1.2.3