diff options
author | nivit <nivit@FreeBSD.org> | 2013-07-16 00:31:20 +0800 |
---|---|---|
committer | nivit <nivit@FreeBSD.org> | 2013-07-16 00:31:20 +0800 |
commit | 8599b417b48a2cfee10f7f4e23d5cd1fb4a08e37 (patch) | |
tree | 5d0540da348d97a965670e6fe0fa709bbaf20d00 /databases | |
parent | 47db7ed892dfaf86ba4621ce6dd810b4f323e4c4 (diff) | |
download | freebsd-ports-gnome-8599b417b48a2cfee10f7f4e23d5cd1fb4a08e37.tar.gz freebsd-ports-gnome-8599b417b48a2cfee10f7f4e23d5cd1fb4a08e37.tar.zst freebsd-ports-gnome-8599b417b48a2cfee10f7f4e23d5cd1fb4a08e37.zip |
- Remove leading indefinite article from COMMENT
- Run 2to3 command on lib, doc and examples dirs,
when Python ver. >= 3.0
- Switch off MYSQL and PGSQL options (suggested by
koobs@, via private email)
- Remove patch/patch-setup.py (pass --always-unzip
to PYDISTUTILS_INSTALLARGS instead)
- Add a post-patch target to fix tests (see http://goo.gl/iu8IB )
Build log: http://goo.gl/JkFG2
Diffstat (limited to 'databases')
-rw-r--r-- | databases/py-sqlalchemy/Makefile | 43 | ||||
-rw-r--r-- | databases/py-sqlalchemy/files/patch-setup.py | 12 | ||||
-rw-r--r-- | databases/py-sqlalchemy/pkg-plist | 2 |
3 files changed, 36 insertions, 21 deletions
diff --git a/databases/py-sqlalchemy/Makefile b/databases/py-sqlalchemy/Makefile index 078f38ff1bc0..3b0ba9576479 100644 --- a/databases/py-sqlalchemy/Makefile +++ b/databases/py-sqlalchemy/Makefile @@ -9,7 +9,7 @@ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= SQLAlchemy-${DISTVERSION} MAINTAINER= nivit@FreeBSD.org -COMMENT= A Python SQL toolkit and Object Relational Mapper +COMMENT= Python SQL toolkit and Object Relational Mapper LICENSE= MIT @@ -19,6 +19,16 @@ TEST_DEPENDS:= ${RUN_DEPENDS} \ # Python3 ready USE_PYTHON= yes USE_PYDISTUTILS= easy_install +PY2TO3_CMD= ${LOCALBASE}/bin/2to3-${PYTHON_VER} +PY2TO3_ARGS= --no-diffs --nobackups --verbose --write +PYDISTUTILS_INSTALLARGS= --always-unzip \ + --install-dir ${PYEASYINSTALL_SITELIBDIR} \ + --no-deps \ + --optimize 2 \ + --quiet \ + --script-dir ${PYEASYINSTALL_BINDIR} \ + --site-dir ${PYEASYINSTALL_SITELIBDIR} \ + ${WRKSRC}/dist/${PYEASYINSTALL_EGG} PYDISTUTILS_PKGNAME= SQLAlchemy PYDISTUTILS_PKGVERSION= ${DISTVERSION} PYDISTUTILS_NOEGGINFO= yes @@ -27,7 +37,7 @@ PYEASYINSTALL_ARCHDEP= yes OPTIONS_DEFINE= DOCS EXAMPLES TESTS OPTIONS_MULTI= BACKEND OPTIONS_MULTI_BACKEND= FIREBIRD MSSQL MYSQL PGSQL SQLITE SYBASE -OPTIONS_DEFAULT= MYSQL PGSQL SQLITE +OPTIONS_DEFAULT= SQLITE FIREBIRD_DESC= Firebird backend MSSQL_DESC= MS SQL Server backend @@ -83,21 +93,35 @@ RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/Sybase.py:${PORTSDIR}/databases/py-sybase .endif +post-patch: + ${REINPLACE_CMD} -e 's/import logging/&.handlers/1' -i.bak ${WRKSRC}/test/engine/test_execute.py + +pre-build: +.if ${PYTHON_REL} >= 300 + @${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/lib +.endif + post-install: .if ${PORT_OPTIONS:MDOCS} - ${MKDIR} ${DOCSDIR} +.if ${PYTHON_REL} >= 300 + @${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/doc +.endif + @${MKDIR} ${DOCSDIR} .for i in ${AL_PORTDOCS} - ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR} .endfor .for i in ${AL_PORTDOCS_SUBDIR} - ${MKDIR} ${DOCSDIR}/${i} - @cd ${WRKSRC}/doc/${i} && ${COPYTREE_SHARE} . ${DOCSDIR}/${i} + ${MKDIR} ${DOCSDIR}/${i} + @cd ${WRKSRC}/doc/${i} && ${COPYTREE_SHARE} . ${DOCSDIR}/${i} .endfor .endif .if ${PORT_OPTIONS:MEXAMPLES} - ${MKDIR} ${EXAMPLESDIR} - @cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR} + @${MKDIR} ${EXAMPLESDIR} +.if ${PYTHON_REL} >= 300 + @${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/examples +.endif + cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR} .endif .if ${PYTHON_REL} < 300 @@ -116,6 +140,9 @@ easyinstall-setopt: .endif regression-test: build +.if ${PYTHON_REL} >= 300 + ${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/test +.endif @cd ${WRKSRC} && ${PYTHON_CMD} sqla_nose.py .include <bsd.port.post.mk> diff --git a/databases/py-sqlalchemy/files/patch-setup.py b/databases/py-sqlalchemy/files/patch-setup.py deleted file mode 100644 index f4633df01c88..000000000000 --- a/databases/py-sqlalchemy/files/patch-setup.py +++ /dev/null @@ -1,12 +0,0 @@ -$FreeBSD$ ---- setup.py.orig 2012-03-15 05:23:20.000000000 +0100 -+++ setup.py 2012-04-10 19:19:38.000000000 +0200 -@@ -128,7 +128,7 @@ - package_dir={'': 'lib'}, - license="MIT License", - cmdclass=cmdclass, -- -+ zip_safe=False, - tests_require=['nose >= 0.11'], - test_suite="sqla_nose", - long_description=readme, diff --git a/databases/py-sqlalchemy/pkg-plist b/databases/py-sqlalchemy/pkg-plist index 7699aef3c25e..da03e494029e 100644 --- a/databases/py-sqlalchemy/pkg-plist +++ b/databases/py-sqlalchemy/pkg-plist @@ -3,7 +3,7 @@ %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/SOURCES.txt %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/dependency_links.txt %%SPEEDUPS%%%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/native_libs.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/not-zip-safe +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/zip-safe %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/top_level.txt %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/sqlalchemy/__init__.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/sqlalchemy/__init__.pyc |