From nobody Sun May 07 16:14:54 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDqJG70s7z499RC; Sun, 7 May 2023 16:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDqJG60S6z3tNt; Sun, 7 May 2023 16:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683476094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=unHeYOWpUlfRYBZEKoxXLLTXo1t3WZhB0vxgmczwGqU=; b=QHM6BViUDa08L001qCeoK4d6z/2EyiR/JecNuEABUUQqCnUa/RrdrYYD1CmA7X4uwferhF seRbhnAOl5sg6SSNqm3ud30s1tjRE5lJMNBApt0GSH6tqnb8Gms1TVpCge1NPr91ySuJXb 8NUCqr0i5g1kJBJlJLWSHocpr0ikjERjwHrP/ilrDZk4vihFB91OQ8M226oMZgiqIbeQiW qQRIruEL0osxH+dhzdDvwh+iryPflxZNVQkNaJkXvB2jL3Pc5ULPd9kWFZengr5SPvSlxJ IkZKSy3bjKB1x8jeQGIvRb3lFa0s3EgsrXQjGzRIrpQgbtoua0KNkaFMSrQuPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683476094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=unHeYOWpUlfRYBZEKoxXLLTXo1t3WZhB0vxgmczwGqU=; b=yx+ON8Wm4d2Oek3kRhMxc6J9e5IKo3Mf5QEvje/jFkDKn3bpYqOelugoozbieICPkzHlaL 7z+v4Y2W2Nv5JfivPX6KHokccnlPlr2XjcKOFIU+ZWB26mCdNBpVs6arYWKL6jWgsjwzIt 7GsFrt60/gG76b16LVt82msbJRp+pjhOJX3qhc3xmpvgKY3VUiD9lHrbBZ97ie26/CgBNe V8kbNTM9z3+50dxm+cg/EGkY8QCtacWXIaHXKYM3Zt2W32WcCEmfldFjRXrBqtS3d9/rtM JR1DLHmc/SCVO09KDp67nEyj82549ZAm5VTmVI4WD5omOo5cyTfH0cqEcy1AmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683476094; a=rsa-sha256; cv=none; b=Ned7JVH4QfVUBsD3gSwk5OT5iSk7N82wQtFH/PhBLtWL0QRy9nkWPJR13RjqMJWmV3Z3jQ z3xLwKE8QNf2WcbAT3kIboEVn0JdxgUfhh75i0ZkVec9qF058K95k7T1MQUjMczXwouY5X GP5Vm+CtvqglUqHBw5nqYk7IV2kDRcxJWMbco/wDPZLGQgcEEm1PdVzSE4l8y3l0ya8Jmm vbylvgVLq7svnXTOqht88/0RJ+YU0t+D0z+WaZNNd+oF+v8H67BUsp+O8Ogq7buS2k/PKn 9qWqDJrF6BWaU4jdBrxy6pL+tU7s8/XLiquG7Tdj8Mts2B9qqoYnyv3is0oN6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDqJG4lr8zPxr; Sun, 7 May 2023 16:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 347GEs2l042061; Sun, 7 May 2023 16:14:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 347GEsVX042060; Sun, 7 May 2023 16:14:54 GMT (envelope-from git) Date: Sun, 7 May 2023 16:14:54 GMT Message-Id: <202305071614.347GEsVX042060@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 34852a28b2b0 - main - Mk/Uses/python.mk: Fix PLIST issue for USE_PYTHON=pep517 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34852a28b2b09ceb1b52db7ac15a192089c5e60c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=34852a28b2b09ceb1b52db7ac15a192089c5e60c commit 34852a28b2b09ceb1b52db7ac15a192089c5e60c Author: Po-Chuan Hsieh AuthorDate: 2023-05-07 16:05:26 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-05-07 16:05:26 +0000 Mk/Uses/python.mk: Fix PLIST issue for USE_PYTHON=pep517 Currently "USE_PYTHON=autoplist pep517" generates the PLIST as follows: - Extract the list of installed files from the RECORD file to the intermediate PLIST (_PYTHONPKGLIST) - Manipulate the intermediate PLIST - Add list of pycache files to the intermediate PLIST When the RECORD file contains foo.pyc entry, that file will be counted twice in the PLIST at the end. It will cause check-plist error. This fix removes *.pyc entries while manipulating the intermediate PLIST to ensure all pycache files are only counted once. --- Mk/Uses/python.mk | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index 0e8350663076..74660df56a51 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -390,10 +390,6 @@ _PYTHON_RUN_DEP= yes _PYTHON_TEST_DEP= yes . endif -. if ${PYTHON2_DEFAULT} != ${PYTHON_DEFAULT} && ${PYTHON3_DEFAULT} != ${PYTHON_DEFAULT} -WARNING+= "PYTHON_DEFAULT must be a version present in PYTHON2_DEFAULT or PYTHON3_DEFAULT, if you want more Python flavors, set BUILD_ALL_PYTHON_FLAVORS in your make.conf" -. endif - . if ${_PYTHON_ARGS} == 2.7 DEV_WARNING+= "lang/python27 reached End of Life and will be removed somewhere in the future, please convert to a modern version of python" . elif ${_PYTHON_ARGS} == 2 @@ -437,7 +433,7 @@ _PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MAXIMUM} at most # If we have an unsupported version of Python, try another. . if defined(_PYTHON_VERSION_NONSUPPORTED) .undef _PYTHON_VERSION -. for ver in ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} +. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${_PYTHON_VERSIONS} __VER= ${ver} . if !defined(_PYTHON_VERSION) && \ !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ @@ -455,7 +451,7 @@ IGNORE= needs an unsupported version of Python # Automatically generates FLAVORS if empty . if empty(FLAVORS) && defined(_PYTHON_FEATURE_FLAVORS) . undef _VALID_PYTHON_VERSIONS -. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} +. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${_PYTHON_VERSIONS} __VER= ${ver} . if !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ ${__VER:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}})) && \ @@ -477,7 +473,7 @@ _ALL_PYTHON_FLAVORS= ${_PYTHON_VERSIONS:S/.//:S/^/py/} . if defined(BUILD_ALL_PYTHON_FLAVORS) || defined(_PYTHON_FEATURE_ALLFLAVORS) FLAVORS= ${_ALL_PYTHON_FLAVORS} . else -. for _v in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} +. for _v in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} _f= py${_v:S/.//} . if ${_ALL_PYTHON_FLAVORS:M${_f}} && !${FLAVORS:M${_f}} . if !empty(FLAVORS) @@ -909,7 +905,9 @@ do-install: @cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PEP517_INSTALL_CMD} @${PYTHON_CMD} -B ${PORTSDIR}/Mk/Scripts/strip_RECORD.py \ ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.dist-info/RECORD >> ${_PYTHONPKGLIST} - @${REINPLACE_CMD} -e 's|^|${PYTHONPREFIX_SITELIBDIR}/|' \ + @${REINPLACE_CMD} \ + -e '/\.pyc$$/d' \ + -e 's|^|${PYTHONPREFIX_SITELIBDIR}/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../etc/|etc/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../bin/|bin/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../include/|include/|' \ @@ -919,7 +917,7 @@ do-install: -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../man/|man/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../sbin/|sbin/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../share/|share/|' \ - ${_PYTHONPKGLIST} + ${_PYTHONPKGLIST} @cd ${STAGEDIR}${PREFIX} && ${FIND} lib -name '*.pyc' >> ${_PYTHONPKGLIST} . endif . endif # defined(_PYTHON_FEATURE_PEP517)