From nobody Sat Mar 18 14:20:21 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 4Pf37B15kXz3yd8m; Sat, 18 Mar 2023 14:20:22 +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 4Pf37B0bPwz4H2M; Sat, 18 Mar 2023 14:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679149222; 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=yM5hwRBYrTu6qlT9gpqV4UubEPKgGiLg1rX1nujUEJw=; b=i7iLM2IVSNqygdhZOskWHCkVantDVcktppyjCvSt6Px6YNP2kB5intPTgKu4K/ZwtO/x55 HkmEMq5LER8lUFj/WFeH3b92XnVGG8/H/4jZGt6CjaLArajZNJwj8HiZg/ONY2Kp/KJ9eX Jgi2MvOvzq3p4HE8VZq5pSIGIr9y4D2KMqz+Cltt9Tl/1Xm+jQlu/CfTh6JaY4OiWUUtJZ kPPyY9RWyrUqsSzULnSidEKLuSnW1uQr07DKM7xVDOd5wYkJf4fP3WSPGEycEpzsjVxPHS waOugcqjIudVoZ55H2kcEavoNYF3rQ3bQNsVQvhcoYMiqUmjPiNxQVUWOr7pgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679149222; 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=yM5hwRBYrTu6qlT9gpqV4UubEPKgGiLg1rX1nujUEJw=; b=oBUyQ+fGtl3od/rxIbB7tAuQ3fwYNMl3pF73SD8n15MoyTMAMCSXOWQJTHe6f6i9KybmeK 6k+0GJTTw2bLbVfGe4MB2wAgF3QnanPwqbKDQkBo/m1vP7LS9NsIIEuq8afJ4Gl/U9J7gO PlT8gGDdg0aeUiKjhUXhhHPqSxzC56g+Dztflp4b6iw60kGFFixViKb2DS3vCkCh+4IH9I /Ayru0BI/3sSfhzYZELKS5wdSi61s6UAmkYBa/8IvVUxSXHDfST5ZkJg2ZQ6qvjXv5MSJU 1xiutpPiKWVfIkXBD6vy9ff8U9/DerMfmsd0pp3gQ1i9qQD6OGXIP14gru4dEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679149222; a=rsa-sha256; cv=none; b=PJ9GrbAQT2G0xsXwExxHSF25F+ZfJMFlDn6m3SC/6C4nZi6GSrK23s5j4VtFtA+cdMszF0 CuJhcqvfArVKv5btvNFVpvT+bZMxBhRU3Z3mXx3Br/AEGKmgtBYj01Hv7xVREzNdzGe+0K DoLMlB8pmujK/Ds0w4aYm7pZPPgG3sK05WTyYuZW23NxVuqGa32kMdZ8F62gGwKjEzjab2 kweBeBul+iuqSbm50oG6LSi/Z3CaLackSCa6IM5kx28rWcOGh9fkeZ95oreYrcsXFSmPGZ XbjahjiJ7ylqwWrK8Md/gL83W3SjBVv3vbTXXTYuL7Nu6f2QUk1EyFkIueDyGQ== 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 4Pf3796mjfz190n; Sat, 18 Mar 2023 14:20:21 +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 32IEKLq1019989; Sat, 18 Mar 2023 14:20:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32IEKLbD019988; Sat, 18 Mar 2023 14:20:21 GMT (envelope-from git) Date: Sat, 18 Mar 2023 14:20:21 GMT Message-Id: <202303181420.32IEKLbD019988@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthew Seaman Subject: git: 2b7d76adec17 - main - Mk/Uses/python.mk: Support PEP440 versioning 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: matthew X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b7d76adec17cec8185635e6b2ad46e303cbc77b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by matthew: URL: https://cgit.FreeBSD.org/ports/commit/?id=2b7d76adec17cec8185635e6b2ad46e303cbc77b commit 2b7d76adec17cec8185635e6b2ad46e303cbc77b Author: Matthew Seaman AuthorDate: 2023-03-16 15:55:30 +0000 Commit: Matthew Seaman CommitDate: 2023-03-18 14:20:02 +0000 Mk/Uses/python.mk: Support PEP440 versioning The python PEP440 version numbering standard is _mostly_ compatible with FreeBSD port versioning rules. Exceptions exist, where the PORTVERSION can be derived from the upstream DISTVERSION automatically. For example: PEP440 DISTVERSION: FreeBSD PORTVERSION: 2.3.post1 2.3.p1 Now, this interacts badly with PEP517 build setups. hatchling will enforce PEP440 complicance, so it isn't practical to modify the ported code to use exactly the FreeBSD version. Instead, simply referring to DISTVERSION rather than PORTVERSION will allow the build process to complete smoothly. See https://reviews.freebsd.org/D39123 for an example port update which depends on this change Approved by: python (maintainer, vishwin) Differential Revision: https://reviews.freebsd.org/D39124 --- Mk/Uses/python.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index edf56e387102..b4155814d617 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -151,7 +151,7 @@ # default: # # PEP517_INSTALL_CMD - Command sequence for a PEP-517 install frontend that installs a wheel. -# default: ${PYTHON_CMD} -m installer -d ${STAGEDIR} -p ${PREFIX} --no-compile-bytecode ${BUILD_WRKSRC}/dist/${PORTNAME:C/[-_]+/_/g}-${PORTVERSION}-*.whl +# default: ${PYTHON_CMD} -m installer -d ${STAGEDIR} -p ${PREFIX} --no-compile-bytecode ${BUILD_WRKSRC}/dist/${PORTNAME:C/[-_]+/_/g}-${DISTVERSION}-*.whl # # PEP517_INSTALL_DEPEND - Port needed to execute ${PEP517_INSTALL_CMD}. # default: ${PYTHON_PKGNAMEPREFIX}installer>0:devel/py-installer@${PY_FLAVOR} @@ -680,7 +680,7 @@ PYDISTUTILS_EGGINFODIR?=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} # PEP-517 support PEP517_BUILD_CMD?= ${PYTHON_CMD} -m build -n -w ${PEP517_BUILD_CONFIG_SETTING} PEP517_BUILD_DEPEND?= ${PYTHON_PKGNAMEPREFIX}build>0:devel/py-build@${PY_FLAVOR} -PEP517_INSTALL_CMD?= ${PYTHON_CMD} -m installer -d ${STAGEDIR} -p ${PREFIX} --no-compile-bytecode ${BUILD_WRKSRC}/dist/${PORTNAME:C/[-_]+/_/g}-${PORTVERSION}-*.whl +PEP517_INSTALL_CMD?= ${PYTHON_CMD} -m installer -d ${STAGEDIR} -p ${PREFIX} --no-compile-bytecode ${BUILD_WRKSRC}/dist/${PORTNAME:C/[-_]+/_/g}-${DISTVERSION}-*.whl PEP517_INSTALL_DEPEND?= ${PYTHON_PKGNAMEPREFIX}installer>0:devel/py-installer@${PY_FLAVOR} # nose support @@ -901,7 +901,7 @@ do-install: @${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} @cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PEP517_INSTALL_CMD} @${PYTHON_CMD} -B ${PORTSDIR}/Mk/Scripts/strip_RECORD.py \ - ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:C/[-_]+/_/g}-${PORTVERSION}.dist-info/RECORD >> ${_PYTHONPKGLIST} + ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:C/[-_]+/_/g}-${DISTVERSION}.dist-info/RECORD >> ${_PYTHONPKGLIST} @${REINPLACE_CMD} -e 's|^|${PYTHONPREFIX_SITELIBDIR}/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../etc/|etc/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../bin/|bin/|' \