mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
devel/py-virtualenv: Restore py3k-fix-pkg-plist.inc
Restore py3k-fix-pkg-plist.inc that other ports reference as they have not transitioned to AUTOPLIST and need it for Python 3.x compatibility. Add a comment to the include header as a breadcrumb with a PR reference. PR: ports/186669 Reported by: Gereon Kaiping <kta1c10 ! gereon at linta dotde> Approved by: maintainer (implicit, via email)
This commit is contained in:
parent
9faa701d5a
commit
801672844f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=343840
@ -2,6 +2,7 @@
|
||||
|
||||
PORTNAME= virtualenv
|
||||
PORTVERSION= 1.11.2
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
17
devel/py-virtualenv/files/py3k-fix-pkg-plist.inc
Normal file
17
devel/py-virtualenv/files/py3k-fix-pkg-plist.inc
Normal file
@ -0,0 +1,17 @@
|
||||
# Other ports reference this include file. DO NOT REMOVE until that is not the
|
||||
# case. See PR: ports/186669
|
||||
#
|
||||
# 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}
|
Loading…
Reference in New Issue
Block a user