Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 2014 21:01:57 +0000 (UTC)
From:      Marcus von Appen <mva@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r369296 - head/Mk/Uses
Message-ID:  <201409252101.s8PL1v0c097130@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mva
Date: Thu Sep 25 21:01:57 2014
New Revision: 369296
URL: http://svnweb.freebsd.org/changeset/ports/369296
QAT: https://qat.redports.org/buildarchive/r369296/

Log:
  - 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@

Modified:
  head/Mk/Uses/python.mk

Modified: head/Mk/Uses/python.mk
==============================================================================
--- head/Mk/Uses/python.mk	Thu Sep 25 20:52:28 2014	(r369295)
+++ head/Mk/Uses/python.mk	Thu Sep 25 21:01:57 2014	(r369296)
@@ -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;${P
 
 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=${PYTHONPR
 		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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409252101.s8PL1v0c097130>