diff options
author | mva <mva@FreeBSD.org> | 2014-09-26 05:01:57 +0800 |
---|---|---|
committer | mva <mva@FreeBSD.org> | 2014-09-26 05:01:57 +0800 |
commit | fe73616bfdfc5ed3096a69516429c68f8fbef76d (patch) | |
tree | e756d7d676f361aecada40b09f1cc5eb354c4334 /Mk/Uses | |
parent | b001b88852281c49a0e94439454be38f81b17aa7 (diff) | |
download | freebsd-ports-gnome-fe73616bfdfc5ed3096a69516429c68f8fbef76d.tar.gz freebsd-ports-gnome-fe73616bfdfc5ed3096a69516429c68f8fbef76d.tar.zst freebsd-ports-gnome-fe73616bfdfc5ed3096a69516429c68f8fbef76d.zip |
- Resolve relative paths, such as path/./file.py or path/../file.py for
USE_PYTHON=autoplist, which can occur, if relative paths are set in a
setup.py script. Those cause pkg and QA sanity checks to misbehave.
- Remove @dirrm and @dirmmtry additions for USE_PYTHON=autoplist,
USE_PYTHON=py3kplist and egg-info entries, if USES=python is set. pkg 1.3.8
does not need those anymore.
- Add ${PYTHON_VER} to the PLIST_SUB defaults, if USES=python is set.
PR: 193885
Differential Revision: D812
Reviewed by: antoine@
Exp-run by: antoine@
With hat: python@
Diffstat (limited to 'Mk/Uses')
-rw-r--r-- | Mk/Uses/python.mk | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index 994e0eb31d47..0a378bfcb67c 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -192,6 +192,7 @@ # PYTHON_PLATFORM=${PYTHON_PLATFORM} # PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} # PYTHON_VERSION=${PYTHON_VERSION} +# PYTHON_VER=${PYTHON_VER} # # # Deprecated variables, which exist for compatibility and will be removed @@ -558,7 +559,6 @@ add-plist-egginfo: ${LS} ${PYDISTUTILS_EGGINFODIR}/${egginfo} | while read f; do \ ${ECHO_CMD} ${PYDISTUTILS_EGGINFODIR:S;^${STAGEDIR}${PYTHONBASE}/;;}/${egginfo}/$${f} >> ${TMPPLIST}; \ done; \ - ${ECHO_CMD} "@dirrmtry ${PYDISTUTILS_EGGINFODIR:S;${STAGEDIR}${PYTHONBASE}/;;}/${egginfo}" >> ${TMPPLIST}; \ fi; . endfor .else @@ -571,33 +571,11 @@ _RELLIBDIR= ${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} add-plist-post: add-plist-pymod add-plist-pymod: - @{ ${ECHO_CMD} "#mtree"; ${CAT} ${MTREE_FILE}; } | ${TAR} tf - | \ - ${SED} '/^\.$$/d' > ${WRKDIR}/.localmtree - @${ECHO_CMD} "${_RELSITELIBDIR}" >> ${WRKDIR}/.localmtree - @${ECHO_CMD} "${_RELLIBDIR}" >> ${WRKDIR}/.localmtree @${SED} -e 's|^${STAGEDIR}${PREFIX}/||' \ -e 's|^${PREFIX}/||' \ -e 's|^\(man/.*man[0-9]\)/\(.*\.[0-9]\)$$|\1/\2.gz|' \ + -e 's|[[:alnum:]|[:space:]]*/\.\./*||g; s|/\./|/|g' \ ${_PYTHONPKGLIST} | ${SORT} >> ${TMPPLIST} - @${SED} -e 's|^${STAGEDIR}${PREFIX}/\(.*\)/\(.*\)|\1|' \ - -e 's|^${PREFIX}/\(.*\)/\(.*\)|\1|' ${_PYTHONPKGLIST} | \ - ${AWK} '{ num = split($$0, a, "/"); res=""; \ - for(i = 1; i <= num; ++i) { \ - if (i == 1) res = a[i]; \ - else res = res "/" a[i]; \ - print res; \ - } \ - }' | \ - while read line; do \ - ${GREP} -qw "^$${line}$$" ${WRKDIR}/.localmtree || { \ - [ -n "$${line}" ] && \ - ${ECHO_CMD} "@dirrmtry $${line}"; \ - }; \ - done | ${SORT} | uniq | ${SORT} -r >> ${TMPPLIST} -.if ${PREFIX} != ${LOCALBASE} - @${ECHO_CMD} "@dirrmtry ${PYTHON_SITELIBDIR:S;${PYTHONBASE}/;;}" >> ${TMPPLIST} - @${ECHO_CMD} "@dirrmtry ${PYTHON_LIBDIR:S;${PYTHONBASE}/;;}" >> ${TMPPLIST} -.endif .else .if ${PYTHON_REL} >= 320 && defined(_PYTHON_FEATURE_PY3KPLIST) @@ -611,9 +589,9 @@ add-plist-post: /^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ /^@dirrmtry / {d = substr($$0, 11); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ {print} \ - END {if (sp in dirs) {print "@dirrm " sp "/" pc}} \ + END \ ' \ - pc="__pycache__" mt="$$(${PYMAGICTAG})" sp="${PYTHON_SITELIBDIR:S,${PYTHONBASE}/,,g}" \ + pc="__pycache__" mt="$$(${PYMAGICTAG})" \ ${TMPPLIST} > ${TMPPLIST}.pyc_tmp @${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST} .endif # ${PYTHON_REL} >= 320 && defined(_PYTHON_FEATURE_PY3KPLIST) @@ -654,7 +632,8 @@ PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} \ PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} \ PYTHON_PLATFORM=${PYTHON_PLATFORM} \ PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} \ - PYTHON_VERSION=${PYTHON_VERSION} + PYTHON_VERSION=${PYTHON_VERSION} \ + PYTHON_VER=${PYTHON_VER} _USES_POST+= python .endif # _INCLUDE_USES_PYTHON_MK |