Dependencies don't cover py-argparse, which is required to run py-mysql2pgsql. Fix: Patch attached with submission follows: How-To-Repeat: Install py-mysql2pgsql onto a clean system, run py-mysql2pgsql, get the traceback.
Responsible Changed From-To: freebsd-ports-bugs->freebsd-python freebsd-python@ wants this port PRs (via the GNATS Auto Assign Tool)
Maintainer of databases/py-mysql2pgsql, Please note that PR ports/183477 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/183477 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Hi all. I object, argparse is installed as part of lang/python27 (pkg-plist:136). Can I see detailed error message? -- Sphinx of black quartz, judge my vow.
Sure.
No objections then. If distribute really wants it that way I think it's easier to put it in. -- Sphinx of black quartz, judge my vow.
Volodymyr is correct, argparse is part of the standard library in 2.7 and 3.2+, and py-mysql2pgsql is *incorrectly* including argparse unconditionally in install_requires. I have just committed a fix to the devel/py-tox port [1], to correctly model the conditional inclusion of argparse based on Python version, that the tox authors correctly specify in their setup.py [2] after a similar bug report [3] [1] http://svnweb.freebsd.org/ports?view=revision&revision=335263 [2] https://bitbucket.org/hpk42/tox/diff/setup.py?diff2=f20abdbeb930&at=default [3] https://bitbucket.org/hpk42/tox/issue/5 I have attached a patch to pymysql2pgsql to do the same, I suggest someone open an issue or submit a Pull Request, so it is fixed upstream: https://github.com/philipsoutham/py-mysql2pgsql/
30.11.2013 07:42, Kubilay Kocak wrote: > Volodymyr is correct, argparse is part of the standard library in 2.7 > and 3.2+, and py-mysql2pgsql is *incorrectly* including argparse > unconditionally in install_requires. > > I have just committed a fix to the devel/py-tox port [1], to correctly > model the conditional inclusion of argparse based on Python version, > that the tox authors correctly specify in their setup.py [2] after a > similar bug report [3] > > [1] http://svnweb.freebsd.org/ports?view=revision&revision=335263 > [2] > https://bitbucket.org/hpk42/tox/diff/setup.py?diff2=f20abdbeb930&at=default > [3] https://bitbucket.org/hpk42/tox/issue/5 > > I have attached a patch to pymysql2pgsql to do the same, I suggest > someone open an issue or submit a Pull Request, so it is fixed upstream: > > https://github.com/philipsoutham/py-mysql2pgsql/ Fixed there, next version will contain the fix. I hope I'll branch it Real Soon Now (TM), when triggers and longblobs will pass tests. -- Sphinx of black quartz judge my vow.
To clarify things - I hadn't said that I will release new version right now but rather added this fix for the future. The patch should be added to the port too so that current version would be fixed. -- Sphinx of black quartz, judge my vow.
Responsible Changed From-To: freebsd-python->koobs I'll take it.
Author: koobs Date: Thu Dec 5 11:39:38 2013 New Revision: 335660 URL: http://svnweb.freebsd.org/changeset/ports/335660 Log: 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) Added: head/databases/py-mysql2pgsql/files/ head/databases/py-mysql2pgsql/files/patch-setup.py (contents, props changed) Modified: head/databases/py-mysql2pgsql/Makefile Modified: head/databases/py-mysql2pgsql/Makefile ============================================================================== --- head/databases/py-mysql2pgsql/Makefile Thu Dec 5 11:19:00 2013 (r335659) +++ head/databases/py-mysql2pgsql/Makefile Thu Dec 5 11:39:38 2013 (r335660) @@ -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> Added: head/databases/py-mysql2pgsql/files/patch-setup.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/py-mysql2pgsql/files/patch-setup.py Thu Dec 5 11:39:38 2013 (r335660) @@ -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', _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed Committed with changes. I have added a note to the upstream GitHub commit as well. Thanks!