From nobody Tue Apr 4 18:30:14 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 4Prbsg1F5xz440R5; Tue, 4 Apr 2023 18:30:15 +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 4Prbsg0m1hz47Vr; Tue, 4 Apr 2023 18:30:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680633015; 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=gVeSgoQdZClkKMJaPJ4Xo9JzWeQ3FClY02qC5Ie3gmU=; b=ZR8wVFzX7QhJQ7NaWWXj+M+8VJFvoX8sa/rKEA5Ag93e8ObJ28izC8EkoBX5ehqYAkF9+g E/PpqFTCR94WB5SeftFRR0qkiIPb8L2huZdEO4B5sxOzD+oBhcE2sKeIAiVHfz2Kx8TGcA IMRmvgJei4fIYWihHIvwKc0/iCbh61RYbdYb/UIxdRIOZ2LGmm2ZnBNRCTWV9ZP6CK62Mg IgZaEJB2KbZTA66ndQt+Kqvk3zR5+l2JYTVmA1sExVkeeTHnDuR2EDxOgXjPGVx6wlnZVr snfHtnXd3DfT4NhXPvoW5edhqxGvkLZCbYdC5srcdZ7uP6UzwLzyXQIAygPHbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680633015; 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=gVeSgoQdZClkKMJaPJ4Xo9JzWeQ3FClY02qC5Ie3gmU=; b=Wm/oOK5vyxJXy91m/Jxl5oYOIXfWHUd8Wnt7+tZQNepstPFRYv1N4UWPW3DYMigLsBG3yF Y62qrZ/YuNUpiUvsMW90NNcdSXYNIJ+3wiXijcNqF/ApQ4m1n8Y8a9tYkTYY9/jiCOkUjU 7hUo5W1iQtF2TZFIW19+8fXgob1lwqqDwijl21GQkO1eVja1tx5WoN3RSfyayNjWNNfdII Ec5QGp0Pfv2TUn/Z5Wfgq4Js6P4kds0HUHpOmUTjUSQdf2DN97+QvljUw6mrRvwRg2RSi8 AwQvZgIq+hf6gmLOAd5Sl9enmmzVu5OoVhi4g2gRuFq3Mnf5dGUVpow7e5P1wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680633015; a=rsa-sha256; cv=none; b=VFUo9kVJv0+Icv3fOlGF6Bed+kEYPIFLP3+kZ9yQh574XQN2WklzTRoZUXv3pYWdI3BXDm 0MimoO/j2VIC/uMOfm+k/EDiyhthp5YlCY7HClH0Gdv36Bv61HxcMjq9vvEHaOZNmianQz k1WQ5xJqTOud9MhiHo4Ah7uLx1O+BdE278OUY+H4zaXxHVs1ko0Xw0UDqg9EgtYGVWSryr 63FZU8978yECtIxCUOqlY/qUDL7X8DhGJcxzdLVf9yATovB9eSjmr/WMp2WTvIAt9g4m+i S+BE9zV8boQtNkLLqyuaGhYhBbrsn3sVbQ0t4qrH8WN7nljskRxyjky7D9JH+w== 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 4Prbsf6wqtzrBg; Tue, 4 Apr 2023 18:30:14 +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 334IUEA7001366; Tue, 4 Apr 2023 18:30:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 334IUEkv001356; Tue, 4 Apr 2023 18:30:14 GMT (envelope-from git) Date: Tue, 4 Apr 2023 18:30:14 GMT Message-Id: <202304041830.334IUEkv001356@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Antoine Brodin Subject: git: 378e09115cbe - main - USE_PYTHON=pep517: package python bytecode 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: antoine X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 378e09115cbe9a584e3f497c39891619eb3b6ad0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by antoine: URL: https://cgit.FreeBSD.org/ports/commit/?id=378e09115cbe9a584e3f497c39891619eb3b6ad0 commit 378e09115cbe9a584e3f497c39891619eb3b6ad0 Author: Antoine Brodin AuthorDate: 2023-04-04 18:27:33 +0000 Commit: Antoine Brodin CommitDate: 2023-04-04 18:27:33 +0000 USE_PYTHON=pep517: package python bytecode Compile and package python bytecode for python ports using pep517. This can be revisited in the future with a trigger. Approved by: portmgr --- Mk/Uses/python.mk | 5 +++-- devel/py-flit-core/Makefile | 5 +++++ devel/py-virtualenv/Makefile | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index 688736ffefe7..0e8350663076 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -153,7 +153,7 @@ # default: # # PEP517_INSTALL_CMD - Command sequence for a PEP-517 install frontend that installs a wheel. -# default: ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --no-compile-bytecode --prefix ${PREFIX} ${BUILD_WRKSRC}/dist/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.whl +# default: ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --prefix ${PREFIX} ${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} @@ -687,7 +687,7 @@ PEP517_BUILD_DEPEND?= ${PYTHON_PKGNAMEPREFIX}gpep517>=0:devel/py-gpep517@${PY_FL PEP517_BUILD_CMD?= ${PYTHON_CMD} -m build --no-isolation --wheel ${PEP517_BUILD_CONFIG_SETTING} PEP517_BUILD_DEPEND?= ${PYTHON_PKGNAMEPREFIX}build>=0:devel/py-build@${PY_FLAVOR} . endif -PEP517_INSTALL_CMD?= ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --no-compile-bytecode --prefix ${PREFIX} ${BUILD_WRKSRC}/dist/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.whl +PEP517_INSTALL_CMD?= ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --prefix ${PREFIX} ${BUILD_WRKSRC}/dist/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.whl PEP517_INSTALL_DEPEND?= ${PYTHON_PKGNAMEPREFIX}installer>=0:devel/py-installer@${PY_FLAVOR} # nose support @@ -920,6 +920,7 @@ do-install: -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../sbin/|sbin/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../share/|share/|' \ ${_PYTHONPKGLIST} + @cd ${STAGEDIR}${PREFIX} && ${FIND} lib -name '*.pyc' >> ${_PYTHONPKGLIST} . endif . endif # defined(_PYTHON_FEATURE_PEP517) diff --git a/devel/py-flit-core/Makefile b/devel/py-flit-core/Makefile index be8b3684ff6d..62ea7ab3766c 100644 --- a/devel/py-flit-core/Makefile +++ b/devel/py-flit-core/Makefile @@ -25,4 +25,9 @@ PEP517_BUILD_DEPEND= # empty PEP517_INSTALL_CMD= ${PYTHON_CMD} ${WRKSRC}/bootstrap_install.py --installdir ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} ${WRKSRC}/dist/${DISTNAME}*.whl PEP517_INSTALL_DEPEND= # empty +post-install: + ${PYTHON_CMD} -m compileall -d ${PYTHON_SITELIBDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} + ${PYTHON_CMD} -O -m compileall -d ${PYTHON_SITELIBDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} + @cd ${STAGEDIR}${PREFIX} && ${FIND} lib -name '*.pyc' >> ${_PYTHONPKGLIST} + .include diff --git a/devel/py-virtualenv/Makefile b/devel/py-virtualenv/Makefile index 36b7a1531c9c..fd203ffca6dc 100644 --- a/devel/py-virtualenv/Makefile +++ b/devel/py-virtualenv/Makefile @@ -32,7 +32,7 @@ USE_PYTHON= autoplist concurrent pep517 pytest PEP517_BUILD_DEPEND= ${PYTHON_PKGNAMEPREFIX}hatch-vcs>=0.3:devel/py-hatch-vcs@${PY_FLAVOR} PEP517_BUILD_CMD= ${PYTHON_CMD} -m hatchling build --target wheel PEP517_INSTALL_DEPEND= ${PKGNAMEPREFIX}pip>=22.3.1:devel/py-pip@${PY_FLAVOR} -PEP517_INSTALL_CMD= ${PYTHON_CMD} -m pip install --no-color --compile \ +PEP517_INSTALL_CMD= ${PYTHON_CMD} -m pip install --no-color --no-compile \ --ignore-installed --no-deps --no-warn-script-location \ --prefix ${PREFIX} --progress-bar off --root \ ${STAGEDIR} --root-user-action ignore --verbose \ @@ -79,7 +79,9 @@ post-patch: ${WRKSRC}/docs/conf.py post-install: - ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py -d ${PYTHONPREFIX_SITELIBDIR} -f ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + ${PYTHON_CMD} -m compileall -d ${PYTHON_SITELIBDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} + ${PYTHON_CMD} -O -m compileall -d ${PYTHON_SITELIBDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} + @cd ${STAGEDIR}${PREFIX} && ${FIND} lib -name '*.pyc' >> ${_PYTHONPKGLIST} post-install-DOCS-on: ${LOCALBASE}/bin/sphinx-build-${PYTHON_VER} -d ${WRKDIR} -b html -n ${WRKSRC}/docs ${STAGEDIR}${DOCSDIR}