diff options
author | Nicola Vitale <nivit@FreeBSD.org> | 2012-04-23 22:35:12 +0000 |
---|---|---|
committer | Nicola Vitale <nivit@FreeBSD.org> | 2012-04-23 22:35:12 +0000 |
commit | d62da7630f4e36263375710b259069db6eed21e1 (patch) | |
tree | 5bb64871217ead234349850b0d358ec047d0e9a9 /databases | |
parent | a9ef1180689aee999bbaec59abaacc7e2716412b (diff) | |
download | ports-d62da7630f4e36263375710b259069db6eed21e1.tar.gz ports-d62da7630f4e36263375710b259069db6eed21e1.zip |
Notes
Diffstat (limited to 'databases')
-rw-r--r-- | databases/py-sqlalchemy/Makefile | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/databases/py-sqlalchemy/Makefile b/databases/py-sqlalchemy/Makefile index c060ab752409..b81d7f89c5f6 100644 --- a/databases/py-sqlalchemy/Makefile +++ b/databases/py-sqlalchemy/Makefile @@ -51,7 +51,7 @@ RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/kinterbasdb/__init__.py:${PORTSDIR}/databases RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/pymssql.py:${PORTSDIR}/databases/py-mssql .endif -.if !defined(WITHOUT_MYSQL) +.if !defined(WITHOUT_MYSQL) && ${PYTHON_VER} < 3.0 RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=1.2.2:${PORTSDIR}/databases/py-MySQLdb .endif @@ -99,4 +99,21 @@ easyinstall-setopt: ${DO_NADA} .endif +# When Python version is 3.2+ we rewrite all the filenames +# of TMPPLIST that end with .py[co], so that they conform +# to PEP 3147 (see http://www.python.org/dev/peps/pep-3147/) +.if ${PYTHON_REL} >= 320 +PYMAGICTAG= ${PYTHON_CMD} -c 'import imp; print(imp.get_tag())' +add-plist-post: + @${AWK} '\ + /\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.py[co]$$/, "." mt "&"); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \ + /^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ + {print} \ + END {if (sp in dirs) {print "@dirrm " sp "/" pc}} \ + ' \ + pc="__pycache__" mt="$$(${PYMAGICTAG})" sp="${PYTHON_SITELIBDIR:S,${PYTHONBASE}/,,g}" \ + ${TMPPLIST} > ${TMPPLIST}.pyc_tmp + @${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST} +.endif + .include <bsd.port.post.mk> |