diff options
author | nivit <nivit@FreeBSD.org> | 2012-04-25 21:34:18 +0800 |
---|---|---|
committer | nivit <nivit@FreeBSD.org> | 2012-04-25 21:34:18 +0800 |
commit | 877905256574614c62c5dc1d5d9c015ba039f2fe (patch) | |
tree | a2dcb6caf4a0fead56994208fc4429b4e70b184b | |
parent | 5fe8171704b46eb67c519740485b13629f470b25 (diff) | |
download | freebsd-ports-gnome-877905256574614c62c5dc1d5d9c015ba039f2fe.tar.gz freebsd-ports-gnome-877905256574614c62c5dc1d5d9c015ba039f2fe.tar.zst freebsd-ports-gnome-877905256574614c62c5dc1d5d9c015ba039f2fe.zip |
- Update to 1.7.1.2
- Add add-plist-post target to Makefile, so that the names of the py[co]
files conform to PEP 3147, when the Python version is 3.2
- Set USE_PYTHON to yes
-rw-r--r-- | devel/py-virtualenv/Makefile | 33 | ||||
-rw-r--r-- | devel/py-virtualenv/distinfo | 4 | ||||
-rw-r--r-- | devel/py-virtualenv/pkg-plist | 2 |
3 files changed, 31 insertions, 8 deletions
diff --git a/devel/py-virtualenv/Makefile b/devel/py-virtualenv/Makefile index 575669e2bb48..1a3a388ce2e1 100644 --- a/devel/py-virtualenv/Makefile +++ b/devel/py-virtualenv/Makefile @@ -6,7 +6,7 @@ # PORTNAME= virtualenv -PORTVERSION= 1.7 +PORTVERSION= 1.7.1.2 PORTREVISION= 0 CATEGORIES= devel python MASTER_SITES= CHEESESHOP @@ -15,13 +15,14 @@ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= nivit@FreeBSD.org COMMENT= Virtual Python Environment builder -PLIST_SUB= PYVER=${PYTHON_VER} PIPVER=${PIPVER} DISTRIBUTEVER=${DISTRIBUTEVER} +PLIST_SUB= PYVER=${PYTHON_VER} PIPVER=${PIPVER} DISTRIBUTEVER=${DISTRIBUTEVER} \ + PY2X=${PY2X} # Python3 ready -USE_PYTHON= -2.7 +USE_PYTHON= yes USE_PYDISTUTILS= easy_install -PIPVER= 1.0.2 +PIPVER= 1.1 DISTRIBUTEVER= 0.6.24 .if !defined(NOPORTDOCS) @@ -32,4 +33,26 @@ post-install: @cd ${WRKSRC}/docs && ${INSTALL_DATA} index.txt ${DOCSDIR}/ .endif -.include <bsd.port.mk> +.include <bsd.port.pre.mk> + +.if ${PYTHON_REL} >= 320 +PY2X= "@comment " +# 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/) +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} +.else +PY2X= "" +.endif + +.include <bsd.port.post.mk> diff --git a/devel/py-virtualenv/distinfo b/devel/py-virtualenv/distinfo index 5463615edf7c..71c7a08d2de5 100644 --- a/devel/py-virtualenv/distinfo +++ b/devel/py-virtualenv/distinfo @@ -1,2 +1,2 @@ -SHA256 (virtualenv-1.7.tar.gz) = e32b851eec3beae048c41dedcbebdae8484752b4426436ba8d7d1d69458ef6fc -SIZE (virtualenv-1.7.tar.gz) = 2125413 +SHA256 (virtualenv-1.7.1.2.tar.gz) = 9f23c47e167f127268cf6777caf613280cf066b32c0183581bf79eab5ccc907e +SIZE (virtualenv-1.7.1.2.tar.gz) = 2138019 diff --git a/devel/py-virtualenv/pkg-plist b/devel/py-virtualenv/pkg-plist index 2cfb24a69c6b..6f8a57b05420 100644 --- a/devel/py-virtualenv/pkg-plist +++ b/devel/py-virtualenv/pkg-plist @@ -14,7 +14,7 @@ bin/virtualenv %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/virtualenv_support/__init__.pyo %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/virtualenv_support/distribute-%%DISTRIBUTEVER%%.tar.gz %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/virtualenv_support/pip-%%PIPVER%%.tar.gz -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/virtualenv_support/setuptools-0.6c11-py%%PYVER%%.egg +%%PY2X%%%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/virtualenv_support/setuptools-0.6c11-py%%PYVER%%.egg %%PORTDOCS%%%%DOCSDIR%%/index.txt %%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/virtualenv_support |