* Re: [PR PATCH] [Updated] [NOMERGE] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
@ 2022-11-08 17:46 ` ahesford
2022-11-08 19:18 ` eli-schwartz
` (18 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ahesford @ 2022-11-08 17:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1376 bytes --]
There is an updated pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages pep517
https://github.com/void-linux/void-packages/pull/40385
[NOMERGE] Abandon pip in python3-pep517 build style
Using `pip`, the package manager, as a builder and installer in the `python3-pep517` build style was always a poor choice. Now that `python3-build` and `python3-installer` have apparently matured a bit and fall under the PyPA umbrella, let's use those instead.
This poses a bit of a bootstrap problem because PyPA doesn't seem to worry about dependency cycles, so we need to handle the core packages apart from the `python3-pep517` build style. Thus, we still use `pip` to install `python3-installer` and `python3-flit_core`.
Note that these packages are still in flux. For example, `pyproject-hooks` used to be called `pep517` and is still named that in the released version, but I'm using the new name to avoid a package rename in the future. Also, `python3-build` appears to have moved to `python3-flit_core` as the build backend, but the released version is still using `python3-setuptools`. We'll get there eventually...
I'm going to rebuild all of the `python3-pep517` packages to make sure this doesn't break anything.
A patch file from https://github.com/void-linux/void-packages/pull/40385.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pep517-40385.patch --]
[-- Type: text/x-diff, Size: 10868 bytes --]
From f865e613e47bd99b6cebb1ca80b4a2090190d4a3 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:18:53 -0500
Subject: [PATCH 1/6] python3-flit_core: update to 3.8.0.
---
srcpkgs/python3-flit_core/template | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/srcpkgs/python3-flit_core/template b/srcpkgs/python3-flit_core/template
index 73e8809560e8..e5342b7e1a9f 100644
--- a/srcpkgs/python3-flit_core/template
+++ b/srcpkgs/python3-flit_core/template
@@ -1,10 +1,13 @@
# Template file for 'python3-flit_core'
pkgname=python3-flit_core
-version=3.7.1
-revision=2
+version=3.8.0
+revision=1
build_wrksrc="flit_core"
-build_style=python3-pep517
-depends="python3-tomli"
+# This package is required by python3-build and python3-installer, used by the
+# python3-pep517 style; so using that style here would create a cycle
+build_style=python3-module
+hostmakedepends="python3-pip"
+depends="python3"
checkdepends="python3-pytest python3-testpath $depends"
short_desc="Simplified packaging of Python modules - PEP 517 build backend"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
@@ -12,8 +15,16 @@ license="BSD-3-Clause"
homepage="https://flit.readthedocs.io"
changelog="https://flit.readthedocs.io/en/latest/history.html"
distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz"
-checksum=3c9bd9c140515bfe62dd938c6610d10d6efb9e35cc647fc614fe5fb3a5036682
+checksum=d0f2a8f4bd45dc794befbf5839ecc0fd3830d65a57bd52b5997542fac5d5e937
-post_install() {
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_install() {
+ mkdir -p build
+ TMPDIR="${PWD}/build" python3 -m pip install --use-pep517 --prefix /usr \
+ --root "${DESTDIR}" --no-deps --no-build-isolation --no-clean \
+ "dist/flit_core-${version}-py3-none-any.whl"
vlicense ../LICENSE
}
From 5a1f53a359b148af28fa9274d8a4e42ced7dcf51 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 11:00:25 -0500
Subject: [PATCH 2/6] New package: python3-installer-0.5.1
---
srcpkgs/python3-installer/template | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 srcpkgs/python3-installer/template
diff --git a/srcpkgs/python3-installer/template b/srcpkgs/python3-installer/template
new file mode 100644
index 000000000000..2fc406f6fa7d
--- /dev/null
+++ b/srcpkgs/python3-installer/template
@@ -0,0 +1,30 @@
+# Template file for 'python3-installer'
+pkgname=python3-installer
+version=0.5.1
+revision=1
+# This package is used by the python3-pep517 build style; using that style here
+# would create a build cycle
+build_style=python3-module
+hostmakedepends="python3-flit_core"
+depends="python3"
+checkdepends="python3-pytest-xdist"
+short_desc="Low-level library for installing from a Python wheel"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://installer.readthedocs.io/"
+distfiles="${PYPI_SITE}/i/installer/installer-${version}.tar.gz"
+checksum=f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_check() {
+ PYTHONPATH=src python3 -m pytest -n $XBPS_MAKEJOBS
+}
+
+do_install() {
+ (cd src && python3 -m installer --destdir "${DESTDIR}" \
+ "../dist/installer-${version}-py3-none-any.whl" )
+ vlicense LICENSE
+}
From 847fdc5afb1b6f5658863f2dcb4cc4a24e3515e8 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:33:01 -0500
Subject: [PATCH 3/6] New package: python3-pyproject-hooks-0.13.0
---
srcpkgs/python3-pyproject-hooks/template | 32 ++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 srcpkgs/python3-pyproject-hooks/template
diff --git a/srcpkgs/python3-pyproject-hooks/template b/srcpkgs/python3-pyproject-hooks/template
new file mode 100644
index 000000000000..d29ed4dfdf2a
--- /dev/null
+++ b/srcpkgs/python3-pyproject-hooks/template
@@ -0,0 +1,32 @@
+# Template file for 'python3-pyproject-hooks'
+pkgname=python3-pyproject-hooks
+version=0.13.0
+revision=1
+# This package is required by python3-build, used by the python3-pep517 style;
+# using that style here would create a cycle
+build_style=python3-module
+hostmakedepends="python3-flit_core python3-installer"
+depends="python3"
+checkdepends="python3-pytest-xdist python3-testpath
+ python3-setuptools python3-flit_core python3-pip"
+short_desc="Low-level library for calling Python build backends"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://pyproject-hooks.readthedocs.io/"
+distfiles="${PYPI_SITE}/p/pep517/pep517-${version}.tar.gz"
+checksum=ae69927c5c172be1add9203726d4b84cf3ebad1edcd5f71fcdc746e66e829f59
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_check() {
+ rm pytest.ini
+ python3 -m pytest -n $XBPS_MAKEJOBS
+}
+
+do_install() {
+ python3 -m installer --destdir "${DESTDIR}" \
+ "dist/pep517-${version}-py3-none-any.whl"
+ vlicense LICENSE
+}
From 86b5421a235fc8b26417d134d0ab7ef84f45f9e2 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:54:30 -0500
Subject: [PATCH 4/6] New package: python3-build-0.9.0
---
srcpkgs/python3-build/template | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 srcpkgs/python3-build/template
diff --git a/srcpkgs/python3-build/template b/srcpkgs/python3-build/template
new file mode 100644
index 000000000000..4501669ba063
--- /dev/null
+++ b/srcpkgs/python3-build/template
@@ -0,0 +1,29 @@
+# Template file for 'python3-build'
+pkgname=python3-build
+version=0.9.0
+revision=1
+# This package is used by the python3-pep517 build style; using that style here
+# would create a build cycle
+build_style=python3-module
+_depends="python3-packaging python3-pyproject-hooks"
+hostmakedepends="python3-setuptools python3-wheel python3-installer $_depends"
+depends="$_depends"
+short_desc="Simple, correct PEP 517 build frontend"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://pypa-build.readthedocs.io/"
+changelog="https://raw.githubusercontent.com/pypa/build/main/CHANGELOG.rst"
+distfiles="${PYPI_SITE}/b/build/build-${version}.tar.gz"
+checksum=1a07724e891cbd898923145eb7752ee7653674c511378eb9c7691aab1612bc3c
+# PyPI package provides no tests
+make_check=no
+
+do_build() {
+ (cd src && python3 -m build --no-isolation --wheel ..)
+}
+
+do_install() {
+ python3 -m installer --destdir "${DESTDIR}" \
+ "dist/build-${version}-py3-none-any.whl"
+ vlicense LICENSE
+}
From 729bacdfe7285c4a57e199cd5893dd5f51820a00 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 11:48:04 -0500
Subject: [PATCH 5/6] build-style/python3-pep517.sh: abandon pip
---
common/build-style/python3-pep517.sh | 18 +++++-------------
.../environment/build-style/python3-pep517.sh | 3 ++-
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index da1e238e1192..6eb36924f813 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -3,13 +3,9 @@
#
do_build() {
- # No PEP517 build tool currently supports compiled extensions
- # Thus, there is no need to accommodate cross compilation here
: ${make_build_target:=.}
-
- mkdir -p build
- TMPDIR="${PWD}/build" python3 -m pip wheel --no-deps --use-pep517 --no-clean \
- --no-build-isolation ${make_build_args} ${make_build_target}
+ : ${make_build_args:=--no-isolation --wheel}
+ python3 -m build ${make_build_args} ${make_build_target}
}
do_check() {
@@ -26,16 +22,12 @@ do_check() {
}
do_install() {
- # As with do_build, no need to accommodate cross compilation here
if [ -z "${make_install_target}" ]; then
# Default wheel name normalizes hyphens to underscores
local wheelbase="${pkgname#python3-}"
- make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl"
+ make_install_target="dist/${wheelbase//-/_}-${version}-*-*-*.whl"
fi
- # If do_build was overridden, make sure the TMPDIR exists
- mkdir -p build
- TMPDIR="${PWD}/build" python3 -m pip install --use-pep517 --prefix /usr \
- --root ${DESTDIR} --no-deps --no-build-isolation \
- --no-clean ${make_install_args} ${make_install_target}
+ python3 -m installer --destdir ${DESTDIR} \
+ ${make_install_args} ${make_install_target}
}
diff --git a/common/environment/build-style/python3-pep517.sh b/common/environment/build-style/python3-pep517.sh
index 48f0c1b17f47..f4faf980f508 100644
--- a/common/environment/build-style/python3-pep517.sh
+++ b/common/environment/build-style/python3-pep517.sh
@@ -1,2 +1,3 @@
-hostmakedepends+=" python3-pip"
+hostmakedepends+=" python3-build python3-installer"
lib32disabled=yes
+build_helper+=" python3"
From 4b5089c2c746105c7f9d1753b5b11b11bfa3ef58 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:21:01 -0500
Subject: [PATCH 6/6] python3-tomli: build with packaged python3-flit_core
---
srcpkgs/python3-tomli/template | 24 ++++--------------------
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/srcpkgs/python3-tomli/template b/srcpkgs/python3-tomli/template
index 8e95733a2f9d..ec26197b0a62 100644
--- a/srcpkgs/python3-tomli/template
+++ b/srcpkgs/python3-tomli/template
@@ -1,35 +1,19 @@
# Template file for 'python3-tomli'
pkgname=python3-tomli
version=2.0.1
-revision=2
-create_wrksrc=yes
-build_wrksrc="tomli-${version}"
+revision=3
build_style=python3-pep517
-hostmakedepends="python3"
+hostmakedepends="python3-flit_core"
depends="python3"
short_desc="Little TOML parser for Python"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="MIT"
homepage="https://github.com/hukkin/tomli"
-# flit_core>=3.4.0 requires tomli to run, while tomli requires flit_core to
-# build. Both upstreams are aware of the cycle, but neither cares:
-# https://github.com/hukkin/tomli/issues/130
-# https://github.com/takluyver/flit/issues/451
-# As a result, we can't use python3-flit_core to build this package, so we have
-# to just fetch the flit_core tarball to bootstrap tomli. Sigh.
-_flit_version=3.6.0
-distfiles="${PYPI_SITE}/t/tomli/tomli-${version}.tar.gz
- ${PYPI_SITE}/f/flit_core/flit_core-${_flit_version}.tar.gz"
-checksum="de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
- 5892962ab8b8ea945835b3a288fe9dd69316f1903d5288c3f5cafdcdd04756ad"
+distfiles="${PYPI_SITE}/t/tomli/tomli-${version}.tar.gz"
+checksum="de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
# Archive includes no tests
make_check=no
-pre_build() {
- # Build requires that tomli be able to import flit_core *and* itself!
- export PYTHONPATH="${PWD}:${wrksrc}/flit_core-${_flit_version}"
-}
-
post_install() {
vlicense LICENSE
}
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [NOMERGE] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
2022-11-08 17:46 ` [PR PATCH] [Updated] " ahesford
@ 2022-11-08 19:18 ` eli-schwartz
2022-11-08 19:37 ` ahesford
` (17 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: eli-schwartz @ 2022-11-08 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
New comment by eli-schwartz on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#issuecomment-1307715404
Comment:
I still think it's viable to have a flit build style.
Question: is it viable to have `installer` download both an sdist and a wheel, then install the wheel without needing to depend on flit? This would allow flit_core to depend on `installer` instead of pip. In fact it could use its own build style as it will be on its own import path, you'd just need to skip adding an extra copy of flit to the makedepends.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [NOMERGE] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
2022-11-08 17:46 ` [PR PATCH] [Updated] " ahesford
2022-11-08 19:18 ` eli-schwartz
@ 2022-11-08 19:37 ` ahesford
2022-11-08 19:57 ` eli-schwartz
` (16 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ahesford @ 2022-11-08 19:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 795 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#issuecomment-1307735044
Comment:
The flit build style doesn't help us here because we would still need something to install wheels. That means that, except for `python3-build` and `python3-pyproject-hooks`, every other package added here will still need custom behavior. Any package *not* required to bootstrap the PEP-517 toolchain can just use flit with the normal style.
We tend not to fetch prebuilt artifacts, so grabbing the wheel isn't really viable. If pip becomes completely unserviceable, I guess I could pull the `installer` sdist into the `python3-flit_core` template and use a local, uninstalled version to do the installation there. For now, pip will get the job done.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [NOMERGE] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (2 preceding siblings ...)
2022-11-08 19:37 ` ahesford
@ 2022-11-08 19:57 ` eli-schwartz
2022-11-08 20:22 ` ahesford
` (15 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: eli-schwartz @ 2022-11-08 19:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]
New comment by eli-schwartz on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#issuecomment-1307756725
Comment:
> The flit build style doesn't help us here because we would still need something to install wheels. That means that, except for `python3-build` and `python3-pyproject-hooks`, every other package added here will still need custom behavior.
Yeah, all two of them. :p To put it another way, you reduce the problem by 50%.
> We tend not to fetch prebuilt artifacts, so grabbing the wheel isn't really viable.
The official PyPA policy on that is "wheels are just source code copied into a different directory", which is... sort of kind of true, if you squint.
Simply hope and pray that you don't ever need to apply patches to it, as it then rapidly becomes a built artifact (where the patches are part of the input pipeline) as you cannot patch a wheel.
(Yes I know this isn't nearly as helpful as PyPA thinks. We've finally reached a nearly bootstrappable world where you only need to treat a single package as magic, or, depending, two packages. But they really want you to treat *something* as magic.)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [NOMERGE] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (3 preceding siblings ...)
2022-11-08 19:57 ` eli-schwartz
@ 2022-11-08 20:22 ` ahesford
2022-11-08 21:13 ` [PR PATCH] [Updated] " ahesford
` (14 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ahesford @ 2022-11-08 20:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 455 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#issuecomment-1307782635
Comment:
This is also a social engineering problem; having a build style means that somebody will use it. We shouldn't fragment the build styles further with two build styles that do essentially the same thing for packages that use `flit_core`, so it's preferable to just repeat the logic in these few bootstrap packages.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] [NOMERGE] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (4 preceding siblings ...)
2022-11-08 20:22 ` ahesford
@ 2022-11-08 21:13 ` ahesford
2022-11-08 21:14 ` ahesford
` (13 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ahesford @ 2022-11-08 21:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1376 bytes --]
There is an updated pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages pep517
https://github.com/void-linux/void-packages/pull/40385
[NOMERGE] Abandon pip in python3-pep517 build style
Using `pip`, the package manager, as a builder and installer in the `python3-pep517` build style was always a poor choice. Now that `python3-build` and `python3-installer` have apparently matured a bit and fall under the PyPA umbrella, let's use those instead.
This poses a bit of a bootstrap problem because PyPA doesn't seem to worry about dependency cycles, so we need to handle the core packages apart from the `python3-pep517` build style. Thus, we still use `pip` to install `python3-installer` and `python3-flit_core`.
Note that these packages are still in flux. For example, `pyproject-hooks` used to be called `pep517` and is still named that in the released version, but I'm using the new name to avoid a package rename in the future. Also, `python3-build` appears to have moved to `python3-flit_core` as the build backend, but the released version is still using `python3-setuptools`. We'll get there eventually...
I'm going to rebuild all of the `python3-pep517` packages to make sure this doesn't break anything.
A patch file from https://github.com/void-linux/void-packages/pull/40385.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pep517-40385.patch --]
[-- Type: text/x-diff, Size: 11461 bytes --]
From 4263a92ec9bd218942768a58401fda7d0d755e4d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:18:53 -0500
Subject: [PATCH 1/6] python3-flit_core: update to 3.8.0.
---
srcpkgs/python3-flit_core/template | 36 +++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/srcpkgs/python3-flit_core/template b/srcpkgs/python3-flit_core/template
index 73e8809560e8..95077e9f47c8 100644
--- a/srcpkgs/python3-flit_core/template
+++ b/srcpkgs/python3-flit_core/template
@@ -1,19 +1,39 @@
# Template file for 'python3-flit_core'
pkgname=python3-flit_core
-version=3.7.1
-revision=2
-build_wrksrc="flit_core"
-build_style=python3-pep517
-depends="python3-tomli"
+version=3.8.0
+revision=1
+build_wrksrc="flit-${version}/flit_core"
+# This package is required by python3-build and python3-installer, used by the
+# python3-pep517 style; so using that style here would create a cycle
+build_style=python3-module
+hostmakedepends="python3"
+depends="python3"
checkdepends="python3-pytest python3-testpath $depends"
short_desc="Simplified packaging of Python modules - PEP 517 build backend"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="BSD-3-Clause"
homepage="https://flit.readthedocs.io"
changelog="https://flit.readthedocs.io/en/latest/history.html"
-distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz"
-checksum=3c9bd9c140515bfe62dd938c6610d10d6efb9e35cc647fc614fe5fb3a5036682
+# Pull the installer package directly to bootstrap the pep517 toolchain
+_installer_version="0.5.1"
+distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz
+ ${PYPI_SITE}/i/installer/installer-${_installer_version}.tar.gz
+"
+checksum="d0f2a8f4bd45dc794befbf5839ecc0fd3830d65a57bd52b5997542fac5d5e937
+ f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445"
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_install() {
+ local pypath="../../installer-${_installer_version}/src"
+ if [ -n "${PYTHONPATH}" ]; then
+ pypath="${pypath}:${PYTHONPATH}"
+ fi
+
+ PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \
+ "dist/flit_core-${version}-py3-none-any.whl"
-post_install() {
vlicense ../LICENSE
}
From d84a2c232231b9b094bd6dd7ce5ad4c6d82f9ee9 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 11:00:25 -0500
Subject: [PATCH 2/6] New package: python3-installer-0.5.1
---
srcpkgs/python3-installer/template | 36 ++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 srcpkgs/python3-installer/template
diff --git a/srcpkgs/python3-installer/template b/srcpkgs/python3-installer/template
new file mode 100644
index 000000000000..b8038996be30
--- /dev/null
+++ b/srcpkgs/python3-installer/template
@@ -0,0 +1,36 @@
+# Template file for 'python3-installer'
+pkgname=python3-installer
+version=0.5.1
+revision=1
+# This package is used by the python3-pep517 build style; using that style here
+# would create a build cycle
+build_style=python3-module
+hostmakedepends="python3-flit_core"
+depends="python3"
+checkdepends="python3-pytest-xdist"
+short_desc="Low-level library for installing from a Python wheel"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://installer.readthedocs.io/"
+distfiles="${PYPI_SITE}/i/installer/installer-${version}.tar.gz"
+checksum=f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_check() {
+ PYTHONPATH=src python3 -m pytest -n $XBPS_MAKEJOBS
+}
+
+do_install() {
+ local pypath="./src"
+ if [ -n "${PYTHONPATH}" ]; then
+ pypath="${pypath}:${PYTHONPATH}"
+ fi
+
+ PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \
+ "dist/installer-${version}-py3-none-any.whl"
+
+ vlicense LICENSE
+}
From 4eca051f623b45a7874f510b9339d281dbe9dad6 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:33:01 -0500
Subject: [PATCH 3/6] New package: python3-pyproject-hooks-0.13.0
---
srcpkgs/python3-pyproject-hooks/template | 32 ++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 srcpkgs/python3-pyproject-hooks/template
diff --git a/srcpkgs/python3-pyproject-hooks/template b/srcpkgs/python3-pyproject-hooks/template
new file mode 100644
index 000000000000..d29ed4dfdf2a
--- /dev/null
+++ b/srcpkgs/python3-pyproject-hooks/template
@@ -0,0 +1,32 @@
+# Template file for 'python3-pyproject-hooks'
+pkgname=python3-pyproject-hooks
+version=0.13.0
+revision=1
+# This package is required by python3-build, used by the python3-pep517 style;
+# using that style here would create a cycle
+build_style=python3-module
+hostmakedepends="python3-flit_core python3-installer"
+depends="python3"
+checkdepends="python3-pytest-xdist python3-testpath
+ python3-setuptools python3-flit_core python3-pip"
+short_desc="Low-level library for calling Python build backends"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://pyproject-hooks.readthedocs.io/"
+distfiles="${PYPI_SITE}/p/pep517/pep517-${version}.tar.gz"
+checksum=ae69927c5c172be1add9203726d4b84cf3ebad1edcd5f71fcdc746e66e829f59
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_check() {
+ rm pytest.ini
+ python3 -m pytest -n $XBPS_MAKEJOBS
+}
+
+do_install() {
+ python3 -m installer --destdir "${DESTDIR}" \
+ "dist/pep517-${version}-py3-none-any.whl"
+ vlicense LICENSE
+}
From 2837f6eae69520c320088cdc4c10de80edffb7ff Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:54:30 -0500
Subject: [PATCH 4/6] New package: python3-build-0.9.0
---
srcpkgs/python3-build/template | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 srcpkgs/python3-build/template
diff --git a/srcpkgs/python3-build/template b/srcpkgs/python3-build/template
new file mode 100644
index 000000000000..159b9e1ce534
--- /dev/null
+++ b/srcpkgs/python3-build/template
@@ -0,0 +1,34 @@
+# Template file for 'python3-build'
+pkgname=python3-build
+version=0.9.0
+revision=1
+# This package is used by the python3-pep517 build style; using that style here
+# would create a build cycle
+build_style=python3-module
+_depends="python3-packaging python3-pyproject-hooks"
+hostmakedepends="python3-setuptools python3-wheel python3-installer $_depends"
+depends="$_depends"
+short_desc="Simple, correct PEP 517 build frontend"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://pypa-build.readthedocs.io/"
+changelog="https://raw.githubusercontent.com/pypa/build/main/CHANGELOG.rst"
+distfiles="${PYPI_SITE}/b/build/build-${version}.tar.gz"
+checksum=1a07724e891cbd898923145eb7752ee7653674c511378eb9c7691aab1612bc3c
+# PyPI package provides no tests
+make_check=no
+
+do_build() {
+ local pypath="./src"
+ if [ -n "${PYTHONPATH}" ]; then
+ pypath="${pypath}:${PYTHONPATH}"
+ fi
+
+ PYTHONPATH="${pypath}" python3 -m build --no-isolation --wheel .
+}
+
+do_install() {
+ python3 -m installer --destdir "${DESTDIR}" \
+ "dist/build-${version}-py3-none-any.whl"
+ vlicense LICENSE
+}
From d9fb03be6ae6143d395d85458ead770c81c79f2a Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 11:48:04 -0500
Subject: [PATCH 5/6] build-style/python3-pep517.sh: abandon pip
---
common/build-style/python3-pep517.sh | 18 +++++-------------
.../environment/build-style/python3-pep517.sh | 3 ++-
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index da1e238e1192..6eb36924f813 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -3,13 +3,9 @@
#
do_build() {
- # No PEP517 build tool currently supports compiled extensions
- # Thus, there is no need to accommodate cross compilation here
: ${make_build_target:=.}
-
- mkdir -p build
- TMPDIR="${PWD}/build" python3 -m pip wheel --no-deps --use-pep517 --no-clean \
- --no-build-isolation ${make_build_args} ${make_build_target}
+ : ${make_build_args:=--no-isolation --wheel}
+ python3 -m build ${make_build_args} ${make_build_target}
}
do_check() {
@@ -26,16 +22,12 @@ do_check() {
}
do_install() {
- # As with do_build, no need to accommodate cross compilation here
if [ -z "${make_install_target}" ]; then
# Default wheel name normalizes hyphens to underscores
local wheelbase="${pkgname#python3-}"
- make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl"
+ make_install_target="dist/${wheelbase//-/_}-${version}-*-*-*.whl"
fi
- # If do_build was overridden, make sure the TMPDIR exists
- mkdir -p build
- TMPDIR="${PWD}/build" python3 -m pip install --use-pep517 --prefix /usr \
- --root ${DESTDIR} --no-deps --no-build-isolation \
- --no-clean ${make_install_args} ${make_install_target}
+ python3 -m installer --destdir ${DESTDIR} \
+ ${make_install_args} ${make_install_target}
}
diff --git a/common/environment/build-style/python3-pep517.sh b/common/environment/build-style/python3-pep517.sh
index 48f0c1b17f47..f4faf980f508 100644
--- a/common/environment/build-style/python3-pep517.sh
+++ b/common/environment/build-style/python3-pep517.sh
@@ -1,2 +1,3 @@
-hostmakedepends+=" python3-pip"
+hostmakedepends+=" python3-build python3-installer"
lib32disabled=yes
+build_helper+=" python3"
From 774c075f3026c2309588d81b9e31efc49a1cec1c Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:21:01 -0500
Subject: [PATCH 6/6] python3-tomli: build with packaged python3-flit_core
---
srcpkgs/python3-tomli/template | 24 ++++--------------------
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/srcpkgs/python3-tomli/template b/srcpkgs/python3-tomli/template
index 8e95733a2f9d..ec26197b0a62 100644
--- a/srcpkgs/python3-tomli/template
+++ b/srcpkgs/python3-tomli/template
@@ -1,35 +1,19 @@
# Template file for 'python3-tomli'
pkgname=python3-tomli
version=2.0.1
-revision=2
-create_wrksrc=yes
-build_wrksrc="tomli-${version}"
+revision=3
build_style=python3-pep517
-hostmakedepends="python3"
+hostmakedepends="python3-flit_core"
depends="python3"
short_desc="Little TOML parser for Python"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="MIT"
homepage="https://github.com/hukkin/tomli"
-# flit_core>=3.4.0 requires tomli to run, while tomli requires flit_core to
-# build. Both upstreams are aware of the cycle, but neither cares:
-# https://github.com/hukkin/tomli/issues/130
-# https://github.com/takluyver/flit/issues/451
-# As a result, we can't use python3-flit_core to build this package, so we have
-# to just fetch the flit_core tarball to bootstrap tomli. Sigh.
-_flit_version=3.6.0
-distfiles="${PYPI_SITE}/t/tomli/tomli-${version}.tar.gz
- ${PYPI_SITE}/f/flit_core/flit_core-${_flit_version}.tar.gz"
-checksum="de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
- 5892962ab8b8ea945835b3a288fe9dd69316f1903d5288c3f5cafdcdd04756ad"
+distfiles="${PYPI_SITE}/t/tomli/tomli-${version}.tar.gz"
+checksum="de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
# Archive includes no tests
make_check=no
-pre_build() {
- # Build requires that tomli be able to import flit_core *and* itself!
- export PYTHONPATH="${PWD}:${wrksrc}/flit_core-${_flit_version}"
-}
-
post_install() {
vlicense LICENSE
}
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [NOMERGE] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (5 preceding siblings ...)
2022-11-08 21:13 ` [PR PATCH] [Updated] " ahesford
@ 2022-11-08 21:14 ` ahesford
2022-11-08 21:51 ` eli-schwartz
` (12 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ahesford @ 2022-11-08 21:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 220 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#issuecomment-1307833815
Comment:
@eli-schwartz you at least convinced me to drop pip from `python3-flit_core`.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [NOMERGE] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (6 preceding siblings ...)
2022-11-08 21:14 ` ahesford
@ 2022-11-08 21:51 ` eli-schwartz
2022-11-08 23:06 ` [PR PATCH] [Updated] " ahesford
` (11 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: eli-schwartz @ 2022-11-08 21:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 792 bytes --]
New comment by eli-schwartz on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#issuecomment-1307874222
Comment:
Well, I'll take my victories where I can get them. :D Less pip in build recipes is always a good thing.
Maybe when I complete the work on a PEP 517 build backend inside Meson, I can just contribute meson.build files for all PyPA core infrastructure, and then you can switch to the meson build style... since Meson includes both a builder and an installer. :D
(The eventual goal is that Meson itself is built via a custom recipe to do `./meson.py setup builddir && DESTDIR=${DESTDIR} ./meson.py install -C builddir/` and still provides all the same metadata that setuptools or flit or `$build_tool_of_the_day` provides. Zero dependencies.)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] [NOMERGE] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (7 preceding siblings ...)
2022-11-08 21:51 ` eli-schwartz
@ 2022-11-08 23:06 ` ahesford
2022-11-08 23:08 ` ahesford
` (10 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ahesford @ 2022-11-08 23:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1376 bytes --]
There is an updated pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages pep517
https://github.com/void-linux/void-packages/pull/40385
[NOMERGE] Abandon pip in python3-pep517 build style
Using `pip`, the package manager, as a builder and installer in the `python3-pep517` build style was always a poor choice. Now that `python3-build` and `python3-installer` have apparently matured a bit and fall under the PyPA umbrella, let's use those instead.
This poses a bit of a bootstrap problem because PyPA doesn't seem to worry about dependency cycles, so we need to handle the core packages apart from the `python3-pep517` build style. Thus, we still use `pip` to install `python3-installer` and `python3-flit_core`.
Note that these packages are still in flux. For example, `pyproject-hooks` used to be called `pep517` and is still named that in the released version, but I'm using the new name to avoid a package rename in the future. Also, `python3-build` appears to have moved to `python3-flit_core` as the build backend, but the released version is still using `python3-setuptools`. We'll get there eventually...
I'm going to rebuild all of the `python3-pep517` packages to make sure this doesn't break anything.
A patch file from https://github.com/void-linux/void-packages/pull/40385.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pep517-40385.patch --]
[-- Type: text/x-diff, Size: 25826 bytes --]
From 4263a92ec9bd218942768a58401fda7d0d755e4d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:18:53 -0500
Subject: [PATCH 01/19] python3-flit_core: update to 3.8.0.
---
srcpkgs/python3-flit_core/template | 36 +++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/srcpkgs/python3-flit_core/template b/srcpkgs/python3-flit_core/template
index 73e8809560e8..95077e9f47c8 100644
--- a/srcpkgs/python3-flit_core/template
+++ b/srcpkgs/python3-flit_core/template
@@ -1,19 +1,39 @@
# Template file for 'python3-flit_core'
pkgname=python3-flit_core
-version=3.7.1
-revision=2
-build_wrksrc="flit_core"
-build_style=python3-pep517
-depends="python3-tomli"
+version=3.8.0
+revision=1
+build_wrksrc="flit-${version}/flit_core"
+# This package is required by python3-build and python3-installer, used by the
+# python3-pep517 style; so using that style here would create a cycle
+build_style=python3-module
+hostmakedepends="python3"
+depends="python3"
checkdepends="python3-pytest python3-testpath $depends"
short_desc="Simplified packaging of Python modules - PEP 517 build backend"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="BSD-3-Clause"
homepage="https://flit.readthedocs.io"
changelog="https://flit.readthedocs.io/en/latest/history.html"
-distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz"
-checksum=3c9bd9c140515bfe62dd938c6610d10d6efb9e35cc647fc614fe5fb3a5036682
+# Pull the installer package directly to bootstrap the pep517 toolchain
+_installer_version="0.5.1"
+distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz
+ ${PYPI_SITE}/i/installer/installer-${_installer_version}.tar.gz
+"
+checksum="d0f2a8f4bd45dc794befbf5839ecc0fd3830d65a57bd52b5997542fac5d5e937
+ f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445"
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_install() {
+ local pypath="../../installer-${_installer_version}/src"
+ if [ -n "${PYTHONPATH}" ]; then
+ pypath="${pypath}:${PYTHONPATH}"
+ fi
+
+ PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \
+ "dist/flit_core-${version}-py3-none-any.whl"
-post_install() {
vlicense ../LICENSE
}
From d84a2c232231b9b094bd6dd7ce5ad4c6d82f9ee9 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 11:00:25 -0500
Subject: [PATCH 02/19] New package: python3-installer-0.5.1
---
srcpkgs/python3-installer/template | 36 ++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 srcpkgs/python3-installer/template
diff --git a/srcpkgs/python3-installer/template b/srcpkgs/python3-installer/template
new file mode 100644
index 000000000000..b8038996be30
--- /dev/null
+++ b/srcpkgs/python3-installer/template
@@ -0,0 +1,36 @@
+# Template file for 'python3-installer'
+pkgname=python3-installer
+version=0.5.1
+revision=1
+# This package is used by the python3-pep517 build style; using that style here
+# would create a build cycle
+build_style=python3-module
+hostmakedepends="python3-flit_core"
+depends="python3"
+checkdepends="python3-pytest-xdist"
+short_desc="Low-level library for installing from a Python wheel"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://installer.readthedocs.io/"
+distfiles="${PYPI_SITE}/i/installer/installer-${version}.tar.gz"
+checksum=f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_check() {
+ PYTHONPATH=src python3 -m pytest -n $XBPS_MAKEJOBS
+}
+
+do_install() {
+ local pypath="./src"
+ if [ -n "${PYTHONPATH}" ]; then
+ pypath="${pypath}:${PYTHONPATH}"
+ fi
+
+ PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \
+ "dist/installer-${version}-py3-none-any.whl"
+
+ vlicense LICENSE
+}
From 4eca051f623b45a7874f510b9339d281dbe9dad6 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:33:01 -0500
Subject: [PATCH 03/19] New package: python3-pyproject-hooks-0.13.0
---
srcpkgs/python3-pyproject-hooks/template | 32 ++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 srcpkgs/python3-pyproject-hooks/template
diff --git a/srcpkgs/python3-pyproject-hooks/template b/srcpkgs/python3-pyproject-hooks/template
new file mode 100644
index 000000000000..d29ed4dfdf2a
--- /dev/null
+++ b/srcpkgs/python3-pyproject-hooks/template
@@ -0,0 +1,32 @@
+# Template file for 'python3-pyproject-hooks'
+pkgname=python3-pyproject-hooks
+version=0.13.0
+revision=1
+# This package is required by python3-build, used by the python3-pep517 style;
+# using that style here would create a cycle
+build_style=python3-module
+hostmakedepends="python3-flit_core python3-installer"
+depends="python3"
+checkdepends="python3-pytest-xdist python3-testpath
+ python3-setuptools python3-flit_core python3-pip"
+short_desc="Low-level library for calling Python build backends"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://pyproject-hooks.readthedocs.io/"
+distfiles="${PYPI_SITE}/p/pep517/pep517-${version}.tar.gz"
+checksum=ae69927c5c172be1add9203726d4b84cf3ebad1edcd5f71fcdc746e66e829f59
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_check() {
+ rm pytest.ini
+ python3 -m pytest -n $XBPS_MAKEJOBS
+}
+
+do_install() {
+ python3 -m installer --destdir "${DESTDIR}" \
+ "dist/pep517-${version}-py3-none-any.whl"
+ vlicense LICENSE
+}
From 2837f6eae69520c320088cdc4c10de80edffb7ff Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:54:30 -0500
Subject: [PATCH 04/19] New package: python3-build-0.9.0
---
srcpkgs/python3-build/template | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 srcpkgs/python3-build/template
diff --git a/srcpkgs/python3-build/template b/srcpkgs/python3-build/template
new file mode 100644
index 000000000000..159b9e1ce534
--- /dev/null
+++ b/srcpkgs/python3-build/template
@@ -0,0 +1,34 @@
+# Template file for 'python3-build'
+pkgname=python3-build
+version=0.9.0
+revision=1
+# This package is used by the python3-pep517 build style; using that style here
+# would create a build cycle
+build_style=python3-module
+_depends="python3-packaging python3-pyproject-hooks"
+hostmakedepends="python3-setuptools python3-wheel python3-installer $_depends"
+depends="$_depends"
+short_desc="Simple, correct PEP 517 build frontend"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://pypa-build.readthedocs.io/"
+changelog="https://raw.githubusercontent.com/pypa/build/main/CHANGELOG.rst"
+distfiles="${PYPI_SITE}/b/build/build-${version}.tar.gz"
+checksum=1a07724e891cbd898923145eb7752ee7653674c511378eb9c7691aab1612bc3c
+# PyPI package provides no tests
+make_check=no
+
+do_build() {
+ local pypath="./src"
+ if [ -n "${PYTHONPATH}" ]; then
+ pypath="${pypath}:${PYTHONPATH}"
+ fi
+
+ PYTHONPATH="${pypath}" python3 -m build --no-isolation --wheel .
+}
+
+do_install() {
+ python3 -m installer --destdir "${DESTDIR}" \
+ "dist/build-${version}-py3-none-any.whl"
+ vlicense LICENSE
+}
From d9fb03be6ae6143d395d85458ead770c81c79f2a Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 11:48:04 -0500
Subject: [PATCH 05/19] build-style/python3-pep517.sh: abandon pip
---
common/build-style/python3-pep517.sh | 18 +++++-------------
.../environment/build-style/python3-pep517.sh | 3 ++-
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index da1e238e1192..6eb36924f813 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -3,13 +3,9 @@
#
do_build() {
- # No PEP517 build tool currently supports compiled extensions
- # Thus, there is no need to accommodate cross compilation here
: ${make_build_target:=.}
-
- mkdir -p build
- TMPDIR="${PWD}/build" python3 -m pip wheel --no-deps --use-pep517 --no-clean \
- --no-build-isolation ${make_build_args} ${make_build_target}
+ : ${make_build_args:=--no-isolation --wheel}
+ python3 -m build ${make_build_args} ${make_build_target}
}
do_check() {
@@ -26,16 +22,12 @@ do_check() {
}
do_install() {
- # As with do_build, no need to accommodate cross compilation here
if [ -z "${make_install_target}" ]; then
# Default wheel name normalizes hyphens to underscores
local wheelbase="${pkgname#python3-}"
- make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl"
+ make_install_target="dist/${wheelbase//-/_}-${version}-*-*-*.whl"
fi
- # If do_build was overridden, make sure the TMPDIR exists
- mkdir -p build
- TMPDIR="${PWD}/build" python3 -m pip install --use-pep517 --prefix /usr \
- --root ${DESTDIR} --no-deps --no-build-isolation \
- --no-clean ${make_install_args} ${make_install_target}
+ python3 -m installer --destdir ${DESTDIR} \
+ ${make_install_args} ${make_install_target}
}
diff --git a/common/environment/build-style/python3-pep517.sh b/common/environment/build-style/python3-pep517.sh
index 48f0c1b17f47..f4faf980f508 100644
--- a/common/environment/build-style/python3-pep517.sh
+++ b/common/environment/build-style/python3-pep517.sh
@@ -1,2 +1,3 @@
-hostmakedepends+=" python3-pip"
+hostmakedepends+=" python3-build python3-installer"
lib32disabled=yes
+build_helper+=" python3"
From 774c075f3026c2309588d81b9e31efc49a1cec1c Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:21:01 -0500
Subject: [PATCH 06/19] python3-tomli: build with packaged python3-flit_core
---
srcpkgs/python3-tomli/template | 24 ++++--------------------
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/srcpkgs/python3-tomli/template b/srcpkgs/python3-tomli/template
index 8e95733a2f9d..ec26197b0a62 100644
--- a/srcpkgs/python3-tomli/template
+++ b/srcpkgs/python3-tomli/template
@@ -1,35 +1,19 @@
# Template file for 'python3-tomli'
pkgname=python3-tomli
version=2.0.1
-revision=2
-create_wrksrc=yes
-build_wrksrc="tomli-${version}"
+revision=3
build_style=python3-pep517
-hostmakedepends="python3"
+hostmakedepends="python3-flit_core"
depends="python3"
short_desc="Little TOML parser for Python"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="MIT"
homepage="https://github.com/hukkin/tomli"
-# flit_core>=3.4.0 requires tomli to run, while tomli requires flit_core to
-# build. Both upstreams are aware of the cycle, but neither cares:
-# https://github.com/hukkin/tomli/issues/130
-# https://github.com/takluyver/flit/issues/451
-# As a result, we can't use python3-flit_core to build this package, so we have
-# to just fetch the flit_core tarball to bootstrap tomli. Sigh.
-_flit_version=3.6.0
-distfiles="${PYPI_SITE}/t/tomli/tomli-${version}.tar.gz
- ${PYPI_SITE}/f/flit_core/flit_core-${_flit_version}.tar.gz"
-checksum="de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
- 5892962ab8b8ea945835b3a288fe9dd69316f1903d5288c3f5cafdcdd04756ad"
+distfiles="${PYPI_SITE}/t/tomli/tomli-${version}.tar.gz"
+checksum="de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
# Archive includes no tests
make_check=no
-pre_build() {
- # Build requires that tomli be able to import flit_core *and* itself!
- export PYTHONPATH="${PWD}:${wrksrc}/flit_core-${_flit_version}"
-}
-
post_install() {
vlicense LICENSE
}
From 674489996a4b18d6253947fb469b3a2c23f369bc Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 13:55:25 -0500
Subject: [PATCH 07/19] python3-subprocess-tee: fix python3-pep517 build
---
srcpkgs/python3-subprocess-tee/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/python3-subprocess-tee/template b/srcpkgs/python3-subprocess-tee/template
index 0b22b99eaeb8..deea6f5226d7 100644
--- a/srcpkgs/python3-subprocess-tee/template
+++ b/srcpkgs/python3-subprocess-tee/template
@@ -15,7 +15,7 @@ checksum=ff5cced589a4b8ac973276ca1ba21bb6e3de600cde11a69947ff51f696efd577
make_check=no
post_patch() {
- vsed -e "/setuptools_scm_git_archive/d" -i pyproject.toml
+ vsed -e "/setuptools_scm_git_archive/d" -e "/pip/d" -i pyproject.toml
}
post_install() {
From ece69014cf0aac0d36f9beb932dd26e03f71624d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:06:28 -0500
Subject: [PATCH 08/19] python3-canonicaljson: update to 1.6.4.
---
srcpkgs/python3-canonicaljson/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/python3-canonicaljson/template b/srcpkgs/python3-canonicaljson/template
index f980468baf5f..b0d08e1ed59c 100644
--- a/srcpkgs/python3-canonicaljson/template
+++ b/srcpkgs/python3-canonicaljson/template
@@ -1,7 +1,7 @@
# Template file for 'python3-canonicaljson'
pkgname=python3-canonicaljson
-version=1.6.3
-revision=2
+version=1.6.4
+revision=1
build_style=python3-pep517
hostmakedepends="python3-setuptools python3-wheel"
depends="python3-simplejson python3-frozendict"
@@ -11,5 +11,5 @@ maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
license="Apache-2.0"
homepage="https://github.com/matrix-org/python-canonicaljson"
distfiles="${PYPI_SITE}/c/canonicaljson/canonicaljson-${version}.tar.gz"
-checksum=ca59760bc274a899a0da75809d6909ae43e5123381fd6ef040a44d1952c0b448
+checksum=6c09b2119511f30eb1126cfcd973a10824e20f1cfd25039cde3d1218dd9c8d8f
make_check_pre="env PYTHONPATH=src"
From 7d43a2d87f5466e1006d58c5442d03efa67ba423 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:11:35 -0500
Subject: [PATCH 09/19] synapse: fix python3-pep517 build
---
srcpkgs/synapse/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index 85b527ef1b51..982806af7cdc 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -5,7 +5,7 @@ revision=2
build_style=python3-pep517
build_helper=rust
make_check_target=tests
-make_install_target="matrix_synapse-${version}-*-*-*.whl"
+make_install_target="dist/matrix_synapse-${version}-*-*-*.whl"
hostmakedepends="python3-poetry-core python3-setuptools-rust cargo"
depends="python3-jsonschema python3-frozendict python3-canonicaljson
python3-signedjson python3-pynacl python3-service_identity python3-Twisted
From 6fad2a76bbccbe16dabd0dba0408db573a9ea268 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:28:05 -0500
Subject: [PATCH 10/19] python-b2sdk: fix python3-pep517 build
---
srcpkgs/python-b2sdk/patches/setuptools_scm.patch | 14 ++++++++++++++
srcpkgs/python-b2sdk/template | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/python-b2sdk/patches/setuptools_scm.patch
diff --git a/srcpkgs/python-b2sdk/patches/setuptools_scm.patch b/srcpkgs/python-b2sdk/patches/setuptools_scm.patch
new file mode 100644
index 000000000000..5b612e587256
--- /dev/null
+++ b/srcpkgs/python-b2sdk/patches/setuptools_scm.patch
@@ -0,0 +1,14 @@
+The setuptools_scm version restriction isn't relevant and causes the build to
+fail, so drop it.
+
+--- a/setup.py
++++ b/setup.py
+@@ -109,7 +109,7 @@
+ # for example:
+ # $ pip install -e .[dev,test]
+ extras_require={'doc': read_requirements('doc')},
+- setup_requires=['setuptools_scm<6.0'],
++ setup_requires=['setuptools_scm'],
+ use_scm_version=True,
+
+ # If there are data files included in your packages that need to be
diff --git a/srcpkgs/python-b2sdk/template b/srcpkgs/python-b2sdk/template
index b920b1d02e3e..58101fd48579 100644
--- a/srcpkgs/python-b2sdk/template
+++ b/srcpkgs/python-b2sdk/template
@@ -4,7 +4,7 @@ pkgname=python-b2sdk
version=1.18.0
revision=2
build_style=python3-pep517
-make_install_target="b2sdk-${version}-*-*-*.whl"
+make_install_target="dist/b2sdk-${version}-*-*-*.whl"
hostmakedepends="python3-setuptools_scm python3-wheel"
depends="python3-logfury python3-Arrow python3-requests python3-six"
checkdepends="python3-pytest-lazy-fixture $depends python3-dateutil
From d6e9420ac4431de0d0ef1e41b6bb1f5904c99ac3 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:40:36 -0500
Subject: [PATCH 11/19] python3-ytmusicapi: fix python3-pep517 build
---
srcpkgs/python3-ytmusicapi/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/python3-ytmusicapi/template b/srcpkgs/python3-ytmusicapi/template
index 3aec7f4b7721..2eff2b6d3190 100644
--- a/srcpkgs/python3-ytmusicapi/template
+++ b/srcpkgs/python3-ytmusicapi/template
@@ -1,18 +1,18 @@
# Template file for 'python3-ytmusicapi'
pkgname=python3-ytmusicapi
version=0.24.0
-revision=2
+revision=3
build_style=python3-pep517
-make_install_target="ytmusicapi-*.*.*-*-*-*.whl"
-hostmakedepends="python3-poetry-core python3-wheel"
+make_install_target="dist/ytmusicapi-*.*.*-*-*-*.whl"
+hostmakedepends="python3-setuptools_scm python3-wheel"
depends="python3-requests"
checkdepends="$depends python3-coverage"
short_desc="Unofficial API for YouTube Music"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="MIT"
homepage="https://github.com/sigma67/ytmusicapi"
-distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
-checksum=862094c2950c1c6687384f6275d6eb61eb2b2cabb923edcf86a6708e81a8ebea
+distfiles="${PYPI_SITE}/y/ytmusicapi/ytmusicapi-${version}.tar.gz"
+checksum=bdb496801cdeded14b1291dd8772578a3de6e51ea20214d28eb08c6922d96a56
post_install() {
vlicense LICENSE
From b86f10ec970a8b01126e054242e2897df5702389 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:42:19 -0500
Subject: [PATCH 12/19] python3-adblock: fix python3-pep517 build
---
srcpkgs/python3-adblock/template | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/srcpkgs/python3-adblock/template b/srcpkgs/python3-adblock/template
index bdf79abcb5f2..ebd4a7f62acc 100644
--- a/srcpkgs/python3-adblock/template
+++ b/srcpkgs/python3-adblock/template
@@ -29,7 +29,8 @@ do_build() {
# Drop platform specifiers from the wheel; pip will refuse to install,
# e.g., an armv7l wheel on an aarch64 system even if the masterdir is
# armv7l. The wheel is correct; no need for name compatibility checks.
- mv adblock-${version}-*.whl adblock-${version}-py3-none-any.whl
+ mkdir -p dist
+ mv adblock-${version}-*.whl dist/adblock-${version}-py3-none-any.whl
}
pre_check() {
From 8b6601887c1fae0de23907497ea965aa8d1152f1 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:42:27 -0500
Subject: [PATCH 13/19] python3-ansible-lint: fix python3-pep517 build
---
srcpkgs/python3-ansible-lint/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/python3-ansible-lint/template b/srcpkgs/python3-ansible-lint/template
index e2be291f2556..3e57c5aefaf4 100644
--- a/srcpkgs/python3-ansible-lint/template
+++ b/srcpkgs/python3-ansible-lint/template
@@ -3,7 +3,7 @@ pkgname=python3-ansible-lint
version=6.8.4
revision=2
build_style=python3-pep517
-make_install_target="ansible_lint-*-*-*-*.whl"
+make_install_target="dist/ansible_lint-*-*-*-*.whl"
hostmakedepends="python3-wheel python3-setuptools_scm"
depends="python3-ansible-compat ansible-core black python3-filelock
python3-jsonschema python3-packaging python3-yaml python3-rich
From 1100fb8cc1ba0a123edb7eb16f8488221722ebdc Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:43:20 -0500
Subject: [PATCH 14/19] python3-gnupg: fix python3-pep517 build
---
srcpkgs/python3-gnupg/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/python3-gnupg/template b/srcpkgs/python3-gnupg/template
index c834364b2ca8..2870ab8f1489 100644
--- a/srcpkgs/python3-gnupg/template
+++ b/srcpkgs/python3-gnupg/template
@@ -3,7 +3,7 @@ pkgname=python3-gnupg
version=0.4.9
revision=2
build_style=python3-pep517
-make_install_target=python_gnupg-${version}-py2.py3-none-any.whl
+make_install_target="dist/python_gnupg-${version}-py2.py3-none-any.whl"
hostmakedepends="python3-setuptools python3-wheel"
depends="python3 gnupg"
checkdepends="${depends} python3-pytest"
From f98a7c617987eeb1e9bab8a054c751ef833b672d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:43:35 -0500
Subject: [PATCH 15/19] python3-quart: fix python3-pep517 build
---
srcpkgs/python3-quart/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/python3-quart/template b/srcpkgs/python3-quart/template
index 5a6113453905..71aefd7c7ebc 100644
--- a/srcpkgs/python3-quart/template
+++ b/srcpkgs/python3-quart/template
@@ -3,7 +3,7 @@ pkgname=python3-quart
version=0.18.3
revision=2
build_style=python3-pep517
-make_install_target="quart-${version}-*-*-*.whl"
+make_install_target="dist/quart-${version}-*-*-*.whl"
hostmakedepends="python3-poetry-core"
depends="python3-aiofiles python3-hypercorn python3-click python3-MarkupSafe
python3-blinker python3-itsdangerous python3-Jinja2 python3-Werkzeug"
From ca9d5558ae2da5b0380f16719167e6f035001e72 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:43:43 -0500
Subject: [PATCH 16/19] rofi-rbw: fix python3-pep517 build
---
srcpkgs/rofi-rbw/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/rofi-rbw/template b/srcpkgs/rofi-rbw/template
index 5a2768a65b53..7c4f3a7ce36f 100644
--- a/srcpkgs/rofi-rbw/template
+++ b/srcpkgs/rofi-rbw/template
@@ -3,7 +3,7 @@ pkgname=rofi-rbw
version=1.0.1
revision=2
build_style=python3-pep517
-make_install_target="rofi_rbw-${version}-py3-none-any.whl"
+make_install_target="dist/rofi_rbw-${version}-py3-none-any.whl"
hostmakedepends="python3-setuptools python3-wheel"
depends="python3 python3-ConfigArgParse rbw"
short_desc="Rofi frontend for Bitwarden"
From 6469b8a3505185a651d81ed8844262192eace9dc Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:46:02 -0500
Subject: [PATCH 17/19] python3-versioningit: update to 2.1.0.
---
srcpkgs/python3-versioningit/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/python3-versioningit/template b/srcpkgs/python3-versioningit/template
index d2229519bc9a..7c4ab452b8c2 100644
--- a/srcpkgs/python3-versioningit/template
+++ b/srcpkgs/python3-versioningit/template
@@ -1,7 +1,7 @@
# Template file for 'python3-versioningit'
pkgname=python3-versioningit
-version=1.1.1
-revision=2
+version=2.1.0
+revision=1
build_style=python3-pep517
hostmakedepends="python3-wheel"
depends="python3-packaging python3-setuptools python3-tomli"
@@ -11,7 +11,7 @@ license="MIT"
homepage="https://github.com/jwodder/versioningit"
changelog="https://raw.githubusercontent.com/jwodder/versioningit/master/CHANGELOG.md"
distfiles="https://github.com/jwodder/versioningit/archive/refs/tags/v$version.tar.gz"
-checksum=45d611fa50f3ef25f678468927b6295e27e295f39d55a5d8c0c426a0fae69445
+checksum=6379b15a701836a00654a4c3ff82e72f591461289d2718789c1be9af67be7a2f
post_install() {
vlicense LICENSE
From 378d336ca5ffb0a1aaa87096d39890bfa49abe9e Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 15:14:19 -0500
Subject: [PATCH 18/19] python3-pendulum: fix python3-pep517 build
For some reason, python3-build will not produce a wheel, so fall back to
pip to build the wheel.
---
srcpkgs/python3-pendulum/template | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/srcpkgs/python3-pendulum/template b/srcpkgs/python3-pendulum/template
index 363e4fab1b14..67dc17644154 100644
--- a/srcpkgs/python3-pendulum/template
+++ b/srcpkgs/python3-pendulum/template
@@ -3,7 +3,8 @@ pkgname=python3-pendulum
version=2.1.2
revision=2
build_style=python3-pep517
-hostmakedepends="python3-poetry-core"
+hostmakedepends="python3-poetry-core python3-pip"
+makedepends="python3-devel"
depends="python3-dateutil python3-pytzdata"
checkdepends="python3-pytest python3-pytz python3-freezegun ${depends}"
short_desc="Python datetimes made easy"
@@ -14,6 +15,12 @@ changelog="https://github.com/sdispater/pendulum/blob/master/CHANGELOG.md"
distfiles="https://github.com/sdispater/pendulum/archive/refs/tags/${version}.tar.gz"
checksum=4185efa48358cb9dca57a6afbc471d4b260e70f56609d5030197373564ac4a07
+do_build() {
+ mkdir -p build
+ TMPDIR="${PWD}/build" python3 -m pip wheel --no-deps --no-clean \
+ --use-pep517 --no-build-isolation --wheel-dir dist .
+}
+
post_install() {
vlicense LICENSE
}
From f70624183b1bd21e24c99598851ddb56b0b6fdea Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 15:25:55 -0500
Subject: [PATCH 19/19] pex: fix python3-pep517 build
---
srcpkgs/pex/patches/flit_version.patch | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 srcpkgs/pex/patches/flit_version.patch
diff --git a/srcpkgs/pex/patches/flit_version.patch b/srcpkgs/pex/patches/flit_version.patch
new file mode 100644
index 000000000000..b3ef6fc61e25
--- /dev/null
+++ b/srcpkgs/pex/patches/flit_version.patch
@@ -0,0 +1,13 @@
+The upper restriction on the flit_core version appears to be a stock
+generational restriction rather than a specific requirement, and the package
+seems to build as expected anyway. Drop the requirement restriction.
+
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["flit_core >=2,<3"]
++requires = ["flit_core"]
+ build-backend = "flit_core.buildapi"
+
+ [tool.flit.metadata]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [NOMERGE] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (8 preceding siblings ...)
2022-11-08 23:06 ` [PR PATCH] [Updated] " ahesford
@ 2022-11-08 23:08 ` ahesford
2022-11-08 23:09 ` ahesford
` (9 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ahesford @ 2022-11-08 23:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#issuecomment-1307959193
Comment:
Having meson take care of building and installation without also trying to automatically manage dependencies like pip would be a great option.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (9 preceding siblings ...)
2022-11-08 23:08 ` ahesford
@ 2022-11-08 23:09 ` ahesford
2022-11-08 23:44 ` [PR REVIEW] " eli-schwartz
` (8 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ahesford @ 2022-11-08 23:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#issuecomment-1307960037
Comment:
With the extra commits added to this branch, every pep517 package now builds properly.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR REVIEW] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (10 preceding siblings ...)
2022-11-08 23:09 ` ahesford
@ 2022-11-08 23:44 ` eli-schwartz
2022-11-08 23:44 ` eli-schwartz
` (7 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: eli-schwartz @ 2022-11-08 23:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 278 bytes --]
New review comment by eli-schwartz on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#discussion_r1017224274
Comment:
Holy what the cow. Who on earth specifies that pip needs to be installed inside the virtualenv that pip creates for building?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR REVIEW] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (11 preceding siblings ...)
2022-11-08 23:44 ` [PR REVIEW] " eli-schwartz
@ 2022-11-08 23:44 ` eli-schwartz
2022-11-08 23:52 ` eli-schwartz
` (6 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: eli-schwartz @ 2022-11-08 23:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 529 bytes --]
New review comment by eli-schwartz on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#discussion_r1017230252
Comment:
This one is great. `python -m build` attempts to run poetry's undocumented `build.py` plugin.
I've always been pretty meh about the use of `python -m` anything unless the goal is very specifically to inject $PWD into the python module search path, which granted you may sometimes want to do (pytest, specifically).
`/usr/bin/pyproject-build` arguably works just as well.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR REVIEW] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (12 preceding siblings ...)
2022-11-08 23:44 ` eli-schwartz
@ 2022-11-08 23:52 ` eli-schwartz
2022-11-09 2:31 ` [PR PATCH] [Updated] " ahesford
` (5 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: eli-schwartz @ 2022-11-08 23:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 622 bytes --]
New review comment by eli-schwartz on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#discussion_r1017230252
Comment:
This one is great. `python -v -m build` attempts to run poetry's undocumented `build.py` plugin, you cannot even get https://github.com/pypa/build's --help text inside the pendulum repo.
I've always been pretty meh about the use of `python -m` anything unless the goal is very specifically to inject $PWD into the python module search path, which granted you may sometimes want to do (pytest, specifically).
`/usr/bin/pyproject-build` arguably works just as well.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (13 preceding siblings ...)
2022-11-08 23:52 ` eli-schwartz
@ 2022-11-09 2:31 ` ahesford
2022-11-09 2:34 ` [PR REVIEW] " ahesford
` (4 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ahesford @ 2022-11-09 2:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]
There is an updated pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages pep517
https://github.com/void-linux/void-packages/pull/40385
Abandon pip in python3-pep517 build style
Using `pip`, the package manager, as a builder and installer in the `python3-pep517` build style was always a poor choice. Now that `python3-build` and `python3-installer` have apparently matured a bit and fall under the PyPA umbrella, let's use those instead.
This poses a bit of a bootstrap problem because PyPA doesn't seem to worry about dependency cycles, so we need to handle the core packages apart from the `python3-pep517` build style. Thus, we still use `pip` to install `python3-installer` and `python3-flit_core`.
Note that these packages are still in flux. For example, `pyproject-hooks` used to be called `pep517` and is still named that in the released version, but I'm using the new name to avoid a package rename in the future. Also, `python3-build` appears to have moved to `python3-flit_core` as the build backend, but the released version is still using `python3-setuptools`. We'll get there eventually...
I'm going to rebuild all of the `python3-pep517` packages to make sure this doesn't break anything.
A patch file from https://github.com/void-linux/void-packages/pull/40385.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pep517-40385.patch --]
[-- Type: text/x-diff, Size: 25663 bytes --]
From 4263a92ec9bd218942768a58401fda7d0d755e4d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:18:53 -0500
Subject: [PATCH 01/19] python3-flit_core: update to 3.8.0.
---
srcpkgs/python3-flit_core/template | 36 +++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/srcpkgs/python3-flit_core/template b/srcpkgs/python3-flit_core/template
index 73e8809560e8..95077e9f47c8 100644
--- a/srcpkgs/python3-flit_core/template
+++ b/srcpkgs/python3-flit_core/template
@@ -1,19 +1,39 @@
# Template file for 'python3-flit_core'
pkgname=python3-flit_core
-version=3.7.1
-revision=2
-build_wrksrc="flit_core"
-build_style=python3-pep517
-depends="python3-tomli"
+version=3.8.0
+revision=1
+build_wrksrc="flit-${version}/flit_core"
+# This package is required by python3-build and python3-installer, used by the
+# python3-pep517 style; so using that style here would create a cycle
+build_style=python3-module
+hostmakedepends="python3"
+depends="python3"
checkdepends="python3-pytest python3-testpath $depends"
short_desc="Simplified packaging of Python modules - PEP 517 build backend"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="BSD-3-Clause"
homepage="https://flit.readthedocs.io"
changelog="https://flit.readthedocs.io/en/latest/history.html"
-distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz"
-checksum=3c9bd9c140515bfe62dd938c6610d10d6efb9e35cc647fc614fe5fb3a5036682
+# Pull the installer package directly to bootstrap the pep517 toolchain
+_installer_version="0.5.1"
+distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz
+ ${PYPI_SITE}/i/installer/installer-${_installer_version}.tar.gz
+"
+checksum="d0f2a8f4bd45dc794befbf5839ecc0fd3830d65a57bd52b5997542fac5d5e937
+ f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445"
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_install() {
+ local pypath="../../installer-${_installer_version}/src"
+ if [ -n "${PYTHONPATH}" ]; then
+ pypath="${pypath}:${PYTHONPATH}"
+ fi
+
+ PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \
+ "dist/flit_core-${version}-py3-none-any.whl"
-post_install() {
vlicense ../LICENSE
}
From d84a2c232231b9b094bd6dd7ce5ad4c6d82f9ee9 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 11:00:25 -0500
Subject: [PATCH 02/19] New package: python3-installer-0.5.1
---
srcpkgs/python3-installer/template | 36 ++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 srcpkgs/python3-installer/template
diff --git a/srcpkgs/python3-installer/template b/srcpkgs/python3-installer/template
new file mode 100644
index 000000000000..b8038996be30
--- /dev/null
+++ b/srcpkgs/python3-installer/template
@@ -0,0 +1,36 @@
+# Template file for 'python3-installer'
+pkgname=python3-installer
+version=0.5.1
+revision=1
+# This package is used by the python3-pep517 build style; using that style here
+# would create a build cycle
+build_style=python3-module
+hostmakedepends="python3-flit_core"
+depends="python3"
+checkdepends="python3-pytest-xdist"
+short_desc="Low-level library for installing from a Python wheel"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://installer.readthedocs.io/"
+distfiles="${PYPI_SITE}/i/installer/installer-${version}.tar.gz"
+checksum=f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_check() {
+ PYTHONPATH=src python3 -m pytest -n $XBPS_MAKEJOBS
+}
+
+do_install() {
+ local pypath="./src"
+ if [ -n "${PYTHONPATH}" ]; then
+ pypath="${pypath}:${PYTHONPATH}"
+ fi
+
+ PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \
+ "dist/installer-${version}-py3-none-any.whl"
+
+ vlicense LICENSE
+}
From 4eca051f623b45a7874f510b9339d281dbe9dad6 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:33:01 -0500
Subject: [PATCH 03/19] New package: python3-pyproject-hooks-0.13.0
---
srcpkgs/python3-pyproject-hooks/template | 32 ++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 srcpkgs/python3-pyproject-hooks/template
diff --git a/srcpkgs/python3-pyproject-hooks/template b/srcpkgs/python3-pyproject-hooks/template
new file mode 100644
index 000000000000..d29ed4dfdf2a
--- /dev/null
+++ b/srcpkgs/python3-pyproject-hooks/template
@@ -0,0 +1,32 @@
+# Template file for 'python3-pyproject-hooks'
+pkgname=python3-pyproject-hooks
+version=0.13.0
+revision=1
+# This package is required by python3-build, used by the python3-pep517 style;
+# using that style here would create a cycle
+build_style=python3-module
+hostmakedepends="python3-flit_core python3-installer"
+depends="python3"
+checkdepends="python3-pytest-xdist python3-testpath
+ python3-setuptools python3-flit_core python3-pip"
+short_desc="Low-level library for calling Python build backends"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://pyproject-hooks.readthedocs.io/"
+distfiles="${PYPI_SITE}/p/pep517/pep517-${version}.tar.gz"
+checksum=ae69927c5c172be1add9203726d4b84cf3ebad1edcd5f71fcdc746e66e829f59
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_check() {
+ rm pytest.ini
+ python3 -m pytest -n $XBPS_MAKEJOBS
+}
+
+do_install() {
+ python3 -m installer --destdir "${DESTDIR}" \
+ "dist/pep517-${version}-py3-none-any.whl"
+ vlicense LICENSE
+}
From 2837f6eae69520c320088cdc4c10de80edffb7ff Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:54:30 -0500
Subject: [PATCH 04/19] New package: python3-build-0.9.0
---
srcpkgs/python3-build/template | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 srcpkgs/python3-build/template
diff --git a/srcpkgs/python3-build/template b/srcpkgs/python3-build/template
new file mode 100644
index 000000000000..159b9e1ce534
--- /dev/null
+++ b/srcpkgs/python3-build/template
@@ -0,0 +1,34 @@
+# Template file for 'python3-build'
+pkgname=python3-build
+version=0.9.0
+revision=1
+# This package is used by the python3-pep517 build style; using that style here
+# would create a build cycle
+build_style=python3-module
+_depends="python3-packaging python3-pyproject-hooks"
+hostmakedepends="python3-setuptools python3-wheel python3-installer $_depends"
+depends="$_depends"
+short_desc="Simple, correct PEP 517 build frontend"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://pypa-build.readthedocs.io/"
+changelog="https://raw.githubusercontent.com/pypa/build/main/CHANGELOG.rst"
+distfiles="${PYPI_SITE}/b/build/build-${version}.tar.gz"
+checksum=1a07724e891cbd898923145eb7752ee7653674c511378eb9c7691aab1612bc3c
+# PyPI package provides no tests
+make_check=no
+
+do_build() {
+ local pypath="./src"
+ if [ -n "${PYTHONPATH}" ]; then
+ pypath="${pypath}:${PYTHONPATH}"
+ fi
+
+ PYTHONPATH="${pypath}" python3 -m build --no-isolation --wheel .
+}
+
+do_install() {
+ python3 -m installer --destdir "${DESTDIR}" \
+ "dist/build-${version}-py3-none-any.whl"
+ vlicense LICENSE
+}
From d9fb03be6ae6143d395d85458ead770c81c79f2a Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 11:48:04 -0500
Subject: [PATCH 05/19] build-style/python3-pep517.sh: abandon pip
---
common/build-style/python3-pep517.sh | 18 +++++-------------
.../environment/build-style/python3-pep517.sh | 3 ++-
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index da1e238e1192..6eb36924f813 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -3,13 +3,9 @@
#
do_build() {
- # No PEP517 build tool currently supports compiled extensions
- # Thus, there is no need to accommodate cross compilation here
: ${make_build_target:=.}
-
- mkdir -p build
- TMPDIR="${PWD}/build" python3 -m pip wheel --no-deps --use-pep517 --no-clean \
- --no-build-isolation ${make_build_args} ${make_build_target}
+ : ${make_build_args:=--no-isolation --wheel}
+ python3 -m build ${make_build_args} ${make_build_target}
}
do_check() {
@@ -26,16 +22,12 @@ do_check() {
}
do_install() {
- # As with do_build, no need to accommodate cross compilation here
if [ -z "${make_install_target}" ]; then
# Default wheel name normalizes hyphens to underscores
local wheelbase="${pkgname#python3-}"
- make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl"
+ make_install_target="dist/${wheelbase//-/_}-${version}-*-*-*.whl"
fi
- # If do_build was overridden, make sure the TMPDIR exists
- mkdir -p build
- TMPDIR="${PWD}/build" python3 -m pip install --use-pep517 --prefix /usr \
- --root ${DESTDIR} --no-deps --no-build-isolation \
- --no-clean ${make_install_args} ${make_install_target}
+ python3 -m installer --destdir ${DESTDIR} \
+ ${make_install_args} ${make_install_target}
}
diff --git a/common/environment/build-style/python3-pep517.sh b/common/environment/build-style/python3-pep517.sh
index 48f0c1b17f47..f4faf980f508 100644
--- a/common/environment/build-style/python3-pep517.sh
+++ b/common/environment/build-style/python3-pep517.sh
@@ -1,2 +1,3 @@
-hostmakedepends+=" python3-pip"
+hostmakedepends+=" python3-build python3-installer"
lib32disabled=yes
+build_helper+=" python3"
From 774c075f3026c2309588d81b9e31efc49a1cec1c Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:21:01 -0500
Subject: [PATCH 06/19] python3-tomli: build with packaged python3-flit_core
---
srcpkgs/python3-tomli/template | 24 ++++--------------------
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/srcpkgs/python3-tomli/template b/srcpkgs/python3-tomli/template
index 8e95733a2f9d..ec26197b0a62 100644
--- a/srcpkgs/python3-tomli/template
+++ b/srcpkgs/python3-tomli/template
@@ -1,35 +1,19 @@
# Template file for 'python3-tomli'
pkgname=python3-tomli
version=2.0.1
-revision=2
-create_wrksrc=yes
-build_wrksrc="tomli-${version}"
+revision=3
build_style=python3-pep517
-hostmakedepends="python3"
+hostmakedepends="python3-flit_core"
depends="python3"
short_desc="Little TOML parser for Python"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="MIT"
homepage="https://github.com/hukkin/tomli"
-# flit_core>=3.4.0 requires tomli to run, while tomli requires flit_core to
-# build. Both upstreams are aware of the cycle, but neither cares:
-# https://github.com/hukkin/tomli/issues/130
-# https://github.com/takluyver/flit/issues/451
-# As a result, we can't use python3-flit_core to build this package, so we have
-# to just fetch the flit_core tarball to bootstrap tomli. Sigh.
-_flit_version=3.6.0
-distfiles="${PYPI_SITE}/t/tomli/tomli-${version}.tar.gz
- ${PYPI_SITE}/f/flit_core/flit_core-${_flit_version}.tar.gz"
-checksum="de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
- 5892962ab8b8ea945835b3a288fe9dd69316f1903d5288c3f5cafdcdd04756ad"
+distfiles="${PYPI_SITE}/t/tomli/tomli-${version}.tar.gz"
+checksum="de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
# Archive includes no tests
make_check=no
-pre_build() {
- # Build requires that tomli be able to import flit_core *and* itself!
- export PYTHONPATH="${PWD}:${wrksrc}/flit_core-${_flit_version}"
-}
-
post_install() {
vlicense LICENSE
}
From 674489996a4b18d6253947fb469b3a2c23f369bc Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 13:55:25 -0500
Subject: [PATCH 07/19] python3-subprocess-tee: fix python3-pep517 build
---
srcpkgs/python3-subprocess-tee/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/python3-subprocess-tee/template b/srcpkgs/python3-subprocess-tee/template
index 0b22b99eaeb8..deea6f5226d7 100644
--- a/srcpkgs/python3-subprocess-tee/template
+++ b/srcpkgs/python3-subprocess-tee/template
@@ -15,7 +15,7 @@ checksum=ff5cced589a4b8ac973276ca1ba21bb6e3de600cde11a69947ff51f696efd577
make_check=no
post_patch() {
- vsed -e "/setuptools_scm_git_archive/d" -i pyproject.toml
+ vsed -e "/setuptools_scm_git_archive/d" -e "/pip/d" -i pyproject.toml
}
post_install() {
From ece69014cf0aac0d36f9beb932dd26e03f71624d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:06:28 -0500
Subject: [PATCH 08/19] python3-canonicaljson: update to 1.6.4.
---
srcpkgs/python3-canonicaljson/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/python3-canonicaljson/template b/srcpkgs/python3-canonicaljson/template
index f980468baf5f..b0d08e1ed59c 100644
--- a/srcpkgs/python3-canonicaljson/template
+++ b/srcpkgs/python3-canonicaljson/template
@@ -1,7 +1,7 @@
# Template file for 'python3-canonicaljson'
pkgname=python3-canonicaljson
-version=1.6.3
-revision=2
+version=1.6.4
+revision=1
build_style=python3-pep517
hostmakedepends="python3-setuptools python3-wheel"
depends="python3-simplejson python3-frozendict"
@@ -11,5 +11,5 @@ maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
license="Apache-2.0"
homepage="https://github.com/matrix-org/python-canonicaljson"
distfiles="${PYPI_SITE}/c/canonicaljson/canonicaljson-${version}.tar.gz"
-checksum=ca59760bc274a899a0da75809d6909ae43e5123381fd6ef040a44d1952c0b448
+checksum=6c09b2119511f30eb1126cfcd973a10824e20f1cfd25039cde3d1218dd9c8d8f
make_check_pre="env PYTHONPATH=src"
From 7d43a2d87f5466e1006d58c5442d03efa67ba423 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:11:35 -0500
Subject: [PATCH 09/19] synapse: fix python3-pep517 build
---
srcpkgs/synapse/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index 85b527ef1b51..982806af7cdc 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -5,7 +5,7 @@ revision=2
build_style=python3-pep517
build_helper=rust
make_check_target=tests
-make_install_target="matrix_synapse-${version}-*-*-*.whl"
+make_install_target="dist/matrix_synapse-${version}-*-*-*.whl"
hostmakedepends="python3-poetry-core python3-setuptools-rust cargo"
depends="python3-jsonschema python3-frozendict python3-canonicaljson
python3-signedjson python3-pynacl python3-service_identity python3-Twisted
From 6fad2a76bbccbe16dabd0dba0408db573a9ea268 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:28:05 -0500
Subject: [PATCH 10/19] python-b2sdk: fix python3-pep517 build
---
srcpkgs/python-b2sdk/patches/setuptools_scm.patch | 14 ++++++++++++++
srcpkgs/python-b2sdk/template | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/python-b2sdk/patches/setuptools_scm.patch
diff --git a/srcpkgs/python-b2sdk/patches/setuptools_scm.patch b/srcpkgs/python-b2sdk/patches/setuptools_scm.patch
new file mode 100644
index 000000000000..5b612e587256
--- /dev/null
+++ b/srcpkgs/python-b2sdk/patches/setuptools_scm.patch
@@ -0,0 +1,14 @@
+The setuptools_scm version restriction isn't relevant and causes the build to
+fail, so drop it.
+
+--- a/setup.py
++++ b/setup.py
+@@ -109,7 +109,7 @@
+ # for example:
+ # $ pip install -e .[dev,test]
+ extras_require={'doc': read_requirements('doc')},
+- setup_requires=['setuptools_scm<6.0'],
++ setup_requires=['setuptools_scm'],
+ use_scm_version=True,
+
+ # If there are data files included in your packages that need to be
diff --git a/srcpkgs/python-b2sdk/template b/srcpkgs/python-b2sdk/template
index b920b1d02e3e..58101fd48579 100644
--- a/srcpkgs/python-b2sdk/template
+++ b/srcpkgs/python-b2sdk/template
@@ -4,7 +4,7 @@ pkgname=python-b2sdk
version=1.18.0
revision=2
build_style=python3-pep517
-make_install_target="b2sdk-${version}-*-*-*.whl"
+make_install_target="dist/b2sdk-${version}-*-*-*.whl"
hostmakedepends="python3-setuptools_scm python3-wheel"
depends="python3-logfury python3-Arrow python3-requests python3-six"
checkdepends="python3-pytest-lazy-fixture $depends python3-dateutil
From d6e9420ac4431de0d0ef1e41b6bb1f5904c99ac3 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:40:36 -0500
Subject: [PATCH 11/19] python3-ytmusicapi: fix python3-pep517 build
---
srcpkgs/python3-ytmusicapi/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/python3-ytmusicapi/template b/srcpkgs/python3-ytmusicapi/template
index 3aec7f4b7721..2eff2b6d3190 100644
--- a/srcpkgs/python3-ytmusicapi/template
+++ b/srcpkgs/python3-ytmusicapi/template
@@ -1,18 +1,18 @@
# Template file for 'python3-ytmusicapi'
pkgname=python3-ytmusicapi
version=0.24.0
-revision=2
+revision=3
build_style=python3-pep517
-make_install_target="ytmusicapi-*.*.*-*-*-*.whl"
-hostmakedepends="python3-poetry-core python3-wheel"
+make_install_target="dist/ytmusicapi-*.*.*-*-*-*.whl"
+hostmakedepends="python3-setuptools_scm python3-wheel"
depends="python3-requests"
checkdepends="$depends python3-coverage"
short_desc="Unofficial API for YouTube Music"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="MIT"
homepage="https://github.com/sigma67/ytmusicapi"
-distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
-checksum=862094c2950c1c6687384f6275d6eb61eb2b2cabb923edcf86a6708e81a8ebea
+distfiles="${PYPI_SITE}/y/ytmusicapi/ytmusicapi-${version}.tar.gz"
+checksum=bdb496801cdeded14b1291dd8772578a3de6e51ea20214d28eb08c6922d96a56
post_install() {
vlicense LICENSE
From b86f10ec970a8b01126e054242e2897df5702389 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:42:19 -0500
Subject: [PATCH 12/19] python3-adblock: fix python3-pep517 build
---
srcpkgs/python3-adblock/template | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/srcpkgs/python3-adblock/template b/srcpkgs/python3-adblock/template
index bdf79abcb5f2..ebd4a7f62acc 100644
--- a/srcpkgs/python3-adblock/template
+++ b/srcpkgs/python3-adblock/template
@@ -29,7 +29,8 @@ do_build() {
# Drop platform specifiers from the wheel; pip will refuse to install,
# e.g., an armv7l wheel on an aarch64 system even if the masterdir is
# armv7l. The wheel is correct; no need for name compatibility checks.
- mv adblock-${version}-*.whl adblock-${version}-py3-none-any.whl
+ mkdir -p dist
+ mv adblock-${version}-*.whl dist/adblock-${version}-py3-none-any.whl
}
pre_check() {
From 8b6601887c1fae0de23907497ea965aa8d1152f1 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:42:27 -0500
Subject: [PATCH 13/19] python3-ansible-lint: fix python3-pep517 build
---
srcpkgs/python3-ansible-lint/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/python3-ansible-lint/template b/srcpkgs/python3-ansible-lint/template
index e2be291f2556..3e57c5aefaf4 100644
--- a/srcpkgs/python3-ansible-lint/template
+++ b/srcpkgs/python3-ansible-lint/template
@@ -3,7 +3,7 @@ pkgname=python3-ansible-lint
version=6.8.4
revision=2
build_style=python3-pep517
-make_install_target="ansible_lint-*-*-*-*.whl"
+make_install_target="dist/ansible_lint-*-*-*-*.whl"
hostmakedepends="python3-wheel python3-setuptools_scm"
depends="python3-ansible-compat ansible-core black python3-filelock
python3-jsonschema python3-packaging python3-yaml python3-rich
From 1100fb8cc1ba0a123edb7eb16f8488221722ebdc Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:43:20 -0500
Subject: [PATCH 14/19] python3-gnupg: fix python3-pep517 build
---
srcpkgs/python3-gnupg/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/python3-gnupg/template b/srcpkgs/python3-gnupg/template
index c834364b2ca8..2870ab8f1489 100644
--- a/srcpkgs/python3-gnupg/template
+++ b/srcpkgs/python3-gnupg/template
@@ -3,7 +3,7 @@ pkgname=python3-gnupg
version=0.4.9
revision=2
build_style=python3-pep517
-make_install_target=python_gnupg-${version}-py2.py3-none-any.whl
+make_install_target="dist/python_gnupg-${version}-py2.py3-none-any.whl"
hostmakedepends="python3-setuptools python3-wheel"
depends="python3 gnupg"
checkdepends="${depends} python3-pytest"
From f98a7c617987eeb1e9bab8a054c751ef833b672d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:43:35 -0500
Subject: [PATCH 15/19] python3-quart: fix python3-pep517 build
---
srcpkgs/python3-quart/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/python3-quart/template b/srcpkgs/python3-quart/template
index 5a6113453905..71aefd7c7ebc 100644
--- a/srcpkgs/python3-quart/template
+++ b/srcpkgs/python3-quart/template
@@ -3,7 +3,7 @@ pkgname=python3-quart
version=0.18.3
revision=2
build_style=python3-pep517
-make_install_target="quart-${version}-*-*-*.whl"
+make_install_target="dist/quart-${version}-*-*-*.whl"
hostmakedepends="python3-poetry-core"
depends="python3-aiofiles python3-hypercorn python3-click python3-MarkupSafe
python3-blinker python3-itsdangerous python3-Jinja2 python3-Werkzeug"
From ca9d5558ae2da5b0380f16719167e6f035001e72 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:43:43 -0500
Subject: [PATCH 16/19] rofi-rbw: fix python3-pep517 build
---
srcpkgs/rofi-rbw/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/rofi-rbw/template b/srcpkgs/rofi-rbw/template
index 5a2768a65b53..7c4f3a7ce36f 100644
--- a/srcpkgs/rofi-rbw/template
+++ b/srcpkgs/rofi-rbw/template
@@ -3,7 +3,7 @@ pkgname=rofi-rbw
version=1.0.1
revision=2
build_style=python3-pep517
-make_install_target="rofi_rbw-${version}-py3-none-any.whl"
+make_install_target="dist/rofi_rbw-${version}-py3-none-any.whl"
hostmakedepends="python3-setuptools python3-wheel"
depends="python3 python3-ConfigArgParse rbw"
short_desc="Rofi frontend for Bitwarden"
From 6469b8a3505185a651d81ed8844262192eace9dc Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:46:02 -0500
Subject: [PATCH 17/19] python3-versioningit: update to 2.1.0.
---
srcpkgs/python3-versioningit/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/python3-versioningit/template b/srcpkgs/python3-versioningit/template
index d2229519bc9a..7c4ab452b8c2 100644
--- a/srcpkgs/python3-versioningit/template
+++ b/srcpkgs/python3-versioningit/template
@@ -1,7 +1,7 @@
# Template file for 'python3-versioningit'
pkgname=python3-versioningit
-version=1.1.1
-revision=2
+version=2.1.0
+revision=1
build_style=python3-pep517
hostmakedepends="python3-wheel"
depends="python3-packaging python3-setuptools python3-tomli"
@@ -11,7 +11,7 @@ license="MIT"
homepage="https://github.com/jwodder/versioningit"
changelog="https://raw.githubusercontent.com/jwodder/versioningit/master/CHANGELOG.md"
distfiles="https://github.com/jwodder/versioningit/archive/refs/tags/v$version.tar.gz"
-checksum=45d611fa50f3ef25f678468927b6295e27e295f39d55a5d8c0c426a0fae69445
+checksum=6379b15a701836a00654a4c3ff82e72f591461289d2718789c1be9af67be7a2f
post_install() {
vlicense LICENSE
From 08686b8576dcead9ce745c5c2834c7d53fe299be Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 15:14:19 -0500
Subject: [PATCH 18/19] python3-pendulum: fix python3-pep517 build
---
srcpkgs/python3-pendulum/template | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/srcpkgs/python3-pendulum/template b/srcpkgs/python3-pendulum/template
index 363e4fab1b14..cf52d5cf0291 100644
--- a/srcpkgs/python3-pendulum/template
+++ b/srcpkgs/python3-pendulum/template
@@ -4,6 +4,7 @@ version=2.1.2
revision=2
build_style=python3-pep517
hostmakedepends="python3-poetry-core"
+makedepends="python3-devel"
depends="python3-dateutil python3-pytzdata"
checkdepends="python3-pytest python3-pytz python3-freezegun ${depends}"
short_desc="Python datetimes made easy"
@@ -14,6 +15,12 @@ changelog="https://github.com/sdispater/pendulum/blob/master/CHANGELOG.md"
distfiles="https://github.com/sdispater/pendulum/archive/refs/tags/${version}.tar.gz"
checksum=4185efa48358cb9dca57a6afbc471d4b260e70f56609d5030197373564ac4a07
+do_build() {
+ # pendulum ships a build.py script to compile some extensions;
+ # this will shadow the build package with python3 -m build
+ pyproject-build --no-isolation --wheel .
+}
+
post_install() {
vlicense LICENSE
}
From d9ccabf8cd1f2a9f40d514d5137243db8086d2ac Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 15:25:55 -0500
Subject: [PATCH 19/19] pex: fix python3-pep517 build
---
srcpkgs/pex/patches/flit_version.patch | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 srcpkgs/pex/patches/flit_version.patch
diff --git a/srcpkgs/pex/patches/flit_version.patch b/srcpkgs/pex/patches/flit_version.patch
new file mode 100644
index 000000000000..b3ef6fc61e25
--- /dev/null
+++ b/srcpkgs/pex/patches/flit_version.patch
@@ -0,0 +1,13 @@
+The upper restriction on the flit_core version appears to be a stock
+generational restriction rather than a specific requirement, and the package
+seems to build as expected anyway. Drop the requirement restriction.
+
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["flit_core >=2,<3"]
++requires = ["flit_core"]
+ build-backend = "flit_core.buildapi"
+
+ [tool.flit.metadata]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR REVIEW] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (14 preceding siblings ...)
2022-11-09 2:31 ` [PR PATCH] [Updated] " ahesford
@ 2022-11-09 2:34 ` ahesford
2022-11-09 3:15 ` [PR PATCH] [Updated] " ahesford
` (3 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ahesford @ 2022-11-09 2:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
New review comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#discussion_r1017344879
Comment:
Thanks for catching this; it completely escaped me!
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (15 preceding siblings ...)
2022-11-09 2:34 ` [PR REVIEW] " ahesford
@ 2022-11-09 3:15 ` ahesford
2022-11-09 4:15 ` [PR REVIEW] " eli-schwartz
` (2 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ahesford @ 2022-11-09 3:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]
There is an updated pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages pep517
https://github.com/void-linux/void-packages/pull/40385
Abandon pip in python3-pep517 build style
Using `pip`, the package manager, as a builder and installer in the `python3-pep517` build style was always a poor choice. Now that `python3-build` and `python3-installer` have apparently matured a bit and fall under the PyPA umbrella, let's use those instead.
This poses a bit of a bootstrap problem because PyPA doesn't seem to worry about dependency cycles, so we need to handle the core packages apart from the `python3-pep517` build style. Thus, we still use `pip` to install `python3-installer` and `python3-flit_core`.
Note that these packages are still in flux. For example, `pyproject-hooks` used to be called `pep517` and is still named that in the released version, but I'm using the new name to avoid a package rename in the future. Also, `python3-build` appears to have moved to `python3-flit_core` as the build backend, but the released version is still using `python3-setuptools`. We'll get there eventually...
I'm going to rebuild all of the `python3-pep517` packages to make sure this doesn't break anything.
A patch file from https://github.com/void-linux/void-packages/pull/40385.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pep517-40385.patch --]
[-- Type: text/x-diff, Size: 25789 bytes --]
From 4263a92ec9bd218942768a58401fda7d0d755e4d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:18:53 -0500
Subject: [PATCH 01/19] python3-flit_core: update to 3.8.0.
---
srcpkgs/python3-flit_core/template | 36 +++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/srcpkgs/python3-flit_core/template b/srcpkgs/python3-flit_core/template
index 73e8809560e8..95077e9f47c8 100644
--- a/srcpkgs/python3-flit_core/template
+++ b/srcpkgs/python3-flit_core/template
@@ -1,19 +1,39 @@
# Template file for 'python3-flit_core'
pkgname=python3-flit_core
-version=3.7.1
-revision=2
-build_wrksrc="flit_core"
-build_style=python3-pep517
-depends="python3-tomli"
+version=3.8.0
+revision=1
+build_wrksrc="flit-${version}/flit_core"
+# This package is required by python3-build and python3-installer, used by the
+# python3-pep517 style; so using that style here would create a cycle
+build_style=python3-module
+hostmakedepends="python3"
+depends="python3"
checkdepends="python3-pytest python3-testpath $depends"
short_desc="Simplified packaging of Python modules - PEP 517 build backend"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="BSD-3-Clause"
homepage="https://flit.readthedocs.io"
changelog="https://flit.readthedocs.io/en/latest/history.html"
-distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz"
-checksum=3c9bd9c140515bfe62dd938c6610d10d6efb9e35cc647fc614fe5fb3a5036682
+# Pull the installer package directly to bootstrap the pep517 toolchain
+_installer_version="0.5.1"
+distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz
+ ${PYPI_SITE}/i/installer/installer-${_installer_version}.tar.gz
+"
+checksum="d0f2a8f4bd45dc794befbf5839ecc0fd3830d65a57bd52b5997542fac5d5e937
+ f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445"
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_install() {
+ local pypath="../../installer-${_installer_version}/src"
+ if [ -n "${PYTHONPATH}" ]; then
+ pypath="${pypath}:${PYTHONPATH}"
+ fi
+
+ PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \
+ "dist/flit_core-${version}-py3-none-any.whl"
-post_install() {
vlicense ../LICENSE
}
From d84a2c232231b9b094bd6dd7ce5ad4c6d82f9ee9 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 11:00:25 -0500
Subject: [PATCH 02/19] New package: python3-installer-0.5.1
---
srcpkgs/python3-installer/template | 36 ++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 srcpkgs/python3-installer/template
diff --git a/srcpkgs/python3-installer/template b/srcpkgs/python3-installer/template
new file mode 100644
index 000000000000..b8038996be30
--- /dev/null
+++ b/srcpkgs/python3-installer/template
@@ -0,0 +1,36 @@
+# Template file for 'python3-installer'
+pkgname=python3-installer
+version=0.5.1
+revision=1
+# This package is used by the python3-pep517 build style; using that style here
+# would create a build cycle
+build_style=python3-module
+hostmakedepends="python3-flit_core"
+depends="python3"
+checkdepends="python3-pytest-xdist"
+short_desc="Low-level library for installing from a Python wheel"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://installer.readthedocs.io/"
+distfiles="${PYPI_SITE}/i/installer/installer-${version}.tar.gz"
+checksum=f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_check() {
+ PYTHONPATH=src python3 -m pytest -n $XBPS_MAKEJOBS
+}
+
+do_install() {
+ local pypath="./src"
+ if [ -n "${PYTHONPATH}" ]; then
+ pypath="${pypath}:${PYTHONPATH}"
+ fi
+
+ PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \
+ "dist/installer-${version}-py3-none-any.whl"
+
+ vlicense LICENSE
+}
From 4eca051f623b45a7874f510b9339d281dbe9dad6 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:33:01 -0500
Subject: [PATCH 03/19] New package: python3-pyproject-hooks-0.13.0
---
srcpkgs/python3-pyproject-hooks/template | 32 ++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 srcpkgs/python3-pyproject-hooks/template
diff --git a/srcpkgs/python3-pyproject-hooks/template b/srcpkgs/python3-pyproject-hooks/template
new file mode 100644
index 000000000000..d29ed4dfdf2a
--- /dev/null
+++ b/srcpkgs/python3-pyproject-hooks/template
@@ -0,0 +1,32 @@
+# Template file for 'python3-pyproject-hooks'
+pkgname=python3-pyproject-hooks
+version=0.13.0
+revision=1
+# This package is required by python3-build, used by the python3-pep517 style;
+# using that style here would create a cycle
+build_style=python3-module
+hostmakedepends="python3-flit_core python3-installer"
+depends="python3"
+checkdepends="python3-pytest-xdist python3-testpath
+ python3-setuptools python3-flit_core python3-pip"
+short_desc="Low-level library for calling Python build backends"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://pyproject-hooks.readthedocs.io/"
+distfiles="${PYPI_SITE}/p/pep517/pep517-${version}.tar.gz"
+checksum=ae69927c5c172be1add9203726d4b84cf3ebad1edcd5f71fcdc746e66e829f59
+
+do_build() {
+ python3 -m flit_core.wheel
+}
+
+do_check() {
+ rm pytest.ini
+ python3 -m pytest -n $XBPS_MAKEJOBS
+}
+
+do_install() {
+ python3 -m installer --destdir "${DESTDIR}" \
+ "dist/pep517-${version}-py3-none-any.whl"
+ vlicense LICENSE
+}
From 2837f6eae69520c320088cdc4c10de80edffb7ff Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:54:30 -0500
Subject: [PATCH 04/19] New package: python3-build-0.9.0
---
srcpkgs/python3-build/template | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 srcpkgs/python3-build/template
diff --git a/srcpkgs/python3-build/template b/srcpkgs/python3-build/template
new file mode 100644
index 000000000000..159b9e1ce534
--- /dev/null
+++ b/srcpkgs/python3-build/template
@@ -0,0 +1,34 @@
+# Template file for 'python3-build'
+pkgname=python3-build
+version=0.9.0
+revision=1
+# This package is used by the python3-pep517 build style; using that style here
+# would create a build cycle
+build_style=python3-module
+_depends="python3-packaging python3-pyproject-hooks"
+hostmakedepends="python3-setuptools python3-wheel python3-installer $_depends"
+depends="$_depends"
+short_desc="Simple, correct PEP 517 build frontend"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://pypa-build.readthedocs.io/"
+changelog="https://raw.githubusercontent.com/pypa/build/main/CHANGELOG.rst"
+distfiles="${PYPI_SITE}/b/build/build-${version}.tar.gz"
+checksum=1a07724e891cbd898923145eb7752ee7653674c511378eb9c7691aab1612bc3c
+# PyPI package provides no tests
+make_check=no
+
+do_build() {
+ local pypath="./src"
+ if [ -n "${PYTHONPATH}" ]; then
+ pypath="${pypath}:${PYTHONPATH}"
+ fi
+
+ PYTHONPATH="${pypath}" python3 -m build --no-isolation --wheel .
+}
+
+do_install() {
+ python3 -m installer --destdir "${DESTDIR}" \
+ "dist/build-${version}-py3-none-any.whl"
+ vlicense LICENSE
+}
From d9fb03be6ae6143d395d85458ead770c81c79f2a Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 11:48:04 -0500
Subject: [PATCH 05/19] build-style/python3-pep517.sh: abandon pip
---
common/build-style/python3-pep517.sh | 18 +++++-------------
.../environment/build-style/python3-pep517.sh | 3 ++-
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index da1e238e1192..6eb36924f813 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -3,13 +3,9 @@
#
do_build() {
- # No PEP517 build tool currently supports compiled extensions
- # Thus, there is no need to accommodate cross compilation here
: ${make_build_target:=.}
-
- mkdir -p build
- TMPDIR="${PWD}/build" python3 -m pip wheel --no-deps --use-pep517 --no-clean \
- --no-build-isolation ${make_build_args} ${make_build_target}
+ : ${make_build_args:=--no-isolation --wheel}
+ python3 -m build ${make_build_args} ${make_build_target}
}
do_check() {
@@ -26,16 +22,12 @@ do_check() {
}
do_install() {
- # As with do_build, no need to accommodate cross compilation here
if [ -z "${make_install_target}" ]; then
# Default wheel name normalizes hyphens to underscores
local wheelbase="${pkgname#python3-}"
- make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl"
+ make_install_target="dist/${wheelbase//-/_}-${version}-*-*-*.whl"
fi
- # If do_build was overridden, make sure the TMPDIR exists
- mkdir -p build
- TMPDIR="${PWD}/build" python3 -m pip install --use-pep517 --prefix /usr \
- --root ${DESTDIR} --no-deps --no-build-isolation \
- --no-clean ${make_install_args} ${make_install_target}
+ python3 -m installer --destdir ${DESTDIR} \
+ ${make_install_args} ${make_install_target}
}
diff --git a/common/environment/build-style/python3-pep517.sh b/common/environment/build-style/python3-pep517.sh
index 48f0c1b17f47..f4faf980f508 100644
--- a/common/environment/build-style/python3-pep517.sh
+++ b/common/environment/build-style/python3-pep517.sh
@@ -1,2 +1,3 @@
-hostmakedepends+=" python3-pip"
+hostmakedepends+=" python3-build python3-installer"
lib32disabled=yes
+build_helper+=" python3"
From 774c075f3026c2309588d81b9e31efc49a1cec1c Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 10:21:01 -0500
Subject: [PATCH 06/19] python3-tomli: build with packaged python3-flit_core
---
srcpkgs/python3-tomli/template | 24 ++++--------------------
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/srcpkgs/python3-tomli/template b/srcpkgs/python3-tomli/template
index 8e95733a2f9d..ec26197b0a62 100644
--- a/srcpkgs/python3-tomli/template
+++ b/srcpkgs/python3-tomli/template
@@ -1,35 +1,19 @@
# Template file for 'python3-tomli'
pkgname=python3-tomli
version=2.0.1
-revision=2
-create_wrksrc=yes
-build_wrksrc="tomli-${version}"
+revision=3
build_style=python3-pep517
-hostmakedepends="python3"
+hostmakedepends="python3-flit_core"
depends="python3"
short_desc="Little TOML parser for Python"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="MIT"
homepage="https://github.com/hukkin/tomli"
-# flit_core>=3.4.0 requires tomli to run, while tomli requires flit_core to
-# build. Both upstreams are aware of the cycle, but neither cares:
-# https://github.com/hukkin/tomli/issues/130
-# https://github.com/takluyver/flit/issues/451
-# As a result, we can't use python3-flit_core to build this package, so we have
-# to just fetch the flit_core tarball to bootstrap tomli. Sigh.
-_flit_version=3.6.0
-distfiles="${PYPI_SITE}/t/tomli/tomli-${version}.tar.gz
- ${PYPI_SITE}/f/flit_core/flit_core-${_flit_version}.tar.gz"
-checksum="de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
- 5892962ab8b8ea945835b3a288fe9dd69316f1903d5288c3f5cafdcdd04756ad"
+distfiles="${PYPI_SITE}/t/tomli/tomli-${version}.tar.gz"
+checksum="de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
# Archive includes no tests
make_check=no
-pre_build() {
- # Build requires that tomli be able to import flit_core *and* itself!
- export PYTHONPATH="${PWD}:${wrksrc}/flit_core-${_flit_version}"
-}
-
post_install() {
vlicense LICENSE
}
From 674489996a4b18d6253947fb469b3a2c23f369bc Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 13:55:25 -0500
Subject: [PATCH 07/19] python3-subprocess-tee: fix python3-pep517 build
---
srcpkgs/python3-subprocess-tee/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/python3-subprocess-tee/template b/srcpkgs/python3-subprocess-tee/template
index 0b22b99eaeb8..deea6f5226d7 100644
--- a/srcpkgs/python3-subprocess-tee/template
+++ b/srcpkgs/python3-subprocess-tee/template
@@ -15,7 +15,7 @@ checksum=ff5cced589a4b8ac973276ca1ba21bb6e3de600cde11a69947ff51f696efd577
make_check=no
post_patch() {
- vsed -e "/setuptools_scm_git_archive/d" -i pyproject.toml
+ vsed -e "/setuptools_scm_git_archive/d" -e "/pip/d" -i pyproject.toml
}
post_install() {
From ece69014cf0aac0d36f9beb932dd26e03f71624d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:06:28 -0500
Subject: [PATCH 08/19] python3-canonicaljson: update to 1.6.4.
---
srcpkgs/python3-canonicaljson/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/python3-canonicaljson/template b/srcpkgs/python3-canonicaljson/template
index f980468baf5f..b0d08e1ed59c 100644
--- a/srcpkgs/python3-canonicaljson/template
+++ b/srcpkgs/python3-canonicaljson/template
@@ -1,7 +1,7 @@
# Template file for 'python3-canonicaljson'
pkgname=python3-canonicaljson
-version=1.6.3
-revision=2
+version=1.6.4
+revision=1
build_style=python3-pep517
hostmakedepends="python3-setuptools python3-wheel"
depends="python3-simplejson python3-frozendict"
@@ -11,5 +11,5 @@ maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
license="Apache-2.0"
homepage="https://github.com/matrix-org/python-canonicaljson"
distfiles="${PYPI_SITE}/c/canonicaljson/canonicaljson-${version}.tar.gz"
-checksum=ca59760bc274a899a0da75809d6909ae43e5123381fd6ef040a44d1952c0b448
+checksum=6c09b2119511f30eb1126cfcd973a10824e20f1cfd25039cde3d1218dd9c8d8f
make_check_pre="env PYTHONPATH=src"
From 7d43a2d87f5466e1006d58c5442d03efa67ba423 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:11:35 -0500
Subject: [PATCH 09/19] synapse: fix python3-pep517 build
---
srcpkgs/synapse/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index 85b527ef1b51..982806af7cdc 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -5,7 +5,7 @@ revision=2
build_style=python3-pep517
build_helper=rust
make_check_target=tests
-make_install_target="matrix_synapse-${version}-*-*-*.whl"
+make_install_target="dist/matrix_synapse-${version}-*-*-*.whl"
hostmakedepends="python3-poetry-core python3-setuptools-rust cargo"
depends="python3-jsonschema python3-frozendict python3-canonicaljson
python3-signedjson python3-pynacl python3-service_identity python3-Twisted
From 6fad2a76bbccbe16dabd0dba0408db573a9ea268 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:28:05 -0500
Subject: [PATCH 10/19] python-b2sdk: fix python3-pep517 build
---
srcpkgs/python-b2sdk/patches/setuptools_scm.patch | 14 ++++++++++++++
srcpkgs/python-b2sdk/template | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/python-b2sdk/patches/setuptools_scm.patch
diff --git a/srcpkgs/python-b2sdk/patches/setuptools_scm.patch b/srcpkgs/python-b2sdk/patches/setuptools_scm.patch
new file mode 100644
index 000000000000..5b612e587256
--- /dev/null
+++ b/srcpkgs/python-b2sdk/patches/setuptools_scm.patch
@@ -0,0 +1,14 @@
+The setuptools_scm version restriction isn't relevant and causes the build to
+fail, so drop it.
+
+--- a/setup.py
++++ b/setup.py
+@@ -109,7 +109,7 @@
+ # for example:
+ # $ pip install -e .[dev,test]
+ extras_require={'doc': read_requirements('doc')},
+- setup_requires=['setuptools_scm<6.0'],
++ setup_requires=['setuptools_scm'],
+ use_scm_version=True,
+
+ # If there are data files included in your packages that need to be
diff --git a/srcpkgs/python-b2sdk/template b/srcpkgs/python-b2sdk/template
index b920b1d02e3e..58101fd48579 100644
--- a/srcpkgs/python-b2sdk/template
+++ b/srcpkgs/python-b2sdk/template
@@ -4,7 +4,7 @@ pkgname=python-b2sdk
version=1.18.0
revision=2
build_style=python3-pep517
-make_install_target="b2sdk-${version}-*-*-*.whl"
+make_install_target="dist/b2sdk-${version}-*-*-*.whl"
hostmakedepends="python3-setuptools_scm python3-wheel"
depends="python3-logfury python3-Arrow python3-requests python3-six"
checkdepends="python3-pytest-lazy-fixture $depends python3-dateutil
From d6e9420ac4431de0d0ef1e41b6bb1f5904c99ac3 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:40:36 -0500
Subject: [PATCH 11/19] python3-ytmusicapi: fix python3-pep517 build
---
srcpkgs/python3-ytmusicapi/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/python3-ytmusicapi/template b/srcpkgs/python3-ytmusicapi/template
index 3aec7f4b7721..2eff2b6d3190 100644
--- a/srcpkgs/python3-ytmusicapi/template
+++ b/srcpkgs/python3-ytmusicapi/template
@@ -1,18 +1,18 @@
# Template file for 'python3-ytmusicapi'
pkgname=python3-ytmusicapi
version=0.24.0
-revision=2
+revision=3
build_style=python3-pep517
-make_install_target="ytmusicapi-*.*.*-*-*-*.whl"
-hostmakedepends="python3-poetry-core python3-wheel"
+make_install_target="dist/ytmusicapi-*.*.*-*-*-*.whl"
+hostmakedepends="python3-setuptools_scm python3-wheel"
depends="python3-requests"
checkdepends="$depends python3-coverage"
short_desc="Unofficial API for YouTube Music"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="MIT"
homepage="https://github.com/sigma67/ytmusicapi"
-distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
-checksum=862094c2950c1c6687384f6275d6eb61eb2b2cabb923edcf86a6708e81a8ebea
+distfiles="${PYPI_SITE}/y/ytmusicapi/ytmusicapi-${version}.tar.gz"
+checksum=bdb496801cdeded14b1291dd8772578a3de6e51ea20214d28eb08c6922d96a56
post_install() {
vlicense LICENSE
From b86f10ec970a8b01126e054242e2897df5702389 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:42:19 -0500
Subject: [PATCH 12/19] python3-adblock: fix python3-pep517 build
---
srcpkgs/python3-adblock/template | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/srcpkgs/python3-adblock/template b/srcpkgs/python3-adblock/template
index bdf79abcb5f2..ebd4a7f62acc 100644
--- a/srcpkgs/python3-adblock/template
+++ b/srcpkgs/python3-adblock/template
@@ -29,7 +29,8 @@ do_build() {
# Drop platform specifiers from the wheel; pip will refuse to install,
# e.g., an armv7l wheel on an aarch64 system even if the masterdir is
# armv7l. The wheel is correct; no need for name compatibility checks.
- mv adblock-${version}-*.whl adblock-${version}-py3-none-any.whl
+ mkdir -p dist
+ mv adblock-${version}-*.whl dist/adblock-${version}-py3-none-any.whl
}
pre_check() {
From 8b6601887c1fae0de23907497ea965aa8d1152f1 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:42:27 -0500
Subject: [PATCH 13/19] python3-ansible-lint: fix python3-pep517 build
---
srcpkgs/python3-ansible-lint/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/python3-ansible-lint/template b/srcpkgs/python3-ansible-lint/template
index e2be291f2556..3e57c5aefaf4 100644
--- a/srcpkgs/python3-ansible-lint/template
+++ b/srcpkgs/python3-ansible-lint/template
@@ -3,7 +3,7 @@ pkgname=python3-ansible-lint
version=6.8.4
revision=2
build_style=python3-pep517
-make_install_target="ansible_lint-*-*-*-*.whl"
+make_install_target="dist/ansible_lint-*-*-*-*.whl"
hostmakedepends="python3-wheel python3-setuptools_scm"
depends="python3-ansible-compat ansible-core black python3-filelock
python3-jsonschema python3-packaging python3-yaml python3-rich
From 1100fb8cc1ba0a123edb7eb16f8488221722ebdc Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:43:20 -0500
Subject: [PATCH 14/19] python3-gnupg: fix python3-pep517 build
---
srcpkgs/python3-gnupg/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/python3-gnupg/template b/srcpkgs/python3-gnupg/template
index c834364b2ca8..2870ab8f1489 100644
--- a/srcpkgs/python3-gnupg/template
+++ b/srcpkgs/python3-gnupg/template
@@ -3,7 +3,7 @@ pkgname=python3-gnupg
version=0.4.9
revision=2
build_style=python3-pep517
-make_install_target=python_gnupg-${version}-py2.py3-none-any.whl
+make_install_target="dist/python_gnupg-${version}-py2.py3-none-any.whl"
hostmakedepends="python3-setuptools python3-wheel"
depends="python3 gnupg"
checkdepends="${depends} python3-pytest"
From f98a7c617987eeb1e9bab8a054c751ef833b672d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:43:35 -0500
Subject: [PATCH 15/19] python3-quart: fix python3-pep517 build
---
srcpkgs/python3-quart/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/python3-quart/template b/srcpkgs/python3-quart/template
index 5a6113453905..71aefd7c7ebc 100644
--- a/srcpkgs/python3-quart/template
+++ b/srcpkgs/python3-quart/template
@@ -3,7 +3,7 @@ pkgname=python3-quart
version=0.18.3
revision=2
build_style=python3-pep517
-make_install_target="quart-${version}-*-*-*.whl"
+make_install_target="dist/quart-${version}-*-*-*.whl"
hostmakedepends="python3-poetry-core"
depends="python3-aiofiles python3-hypercorn python3-click python3-MarkupSafe
python3-blinker python3-itsdangerous python3-Jinja2 python3-Werkzeug"
From ca9d5558ae2da5b0380f16719167e6f035001e72 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:43:43 -0500
Subject: [PATCH 16/19] rofi-rbw: fix python3-pep517 build
---
srcpkgs/rofi-rbw/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/rofi-rbw/template b/srcpkgs/rofi-rbw/template
index 5a2768a65b53..7c4f3a7ce36f 100644
--- a/srcpkgs/rofi-rbw/template
+++ b/srcpkgs/rofi-rbw/template
@@ -3,7 +3,7 @@ pkgname=rofi-rbw
version=1.0.1
revision=2
build_style=python3-pep517
-make_install_target="rofi_rbw-${version}-py3-none-any.whl"
+make_install_target="dist/rofi_rbw-${version}-py3-none-any.whl"
hostmakedepends="python3-setuptools python3-wheel"
depends="python3 python3-ConfigArgParse rbw"
short_desc="Rofi frontend for Bitwarden"
From 6469b8a3505185a651d81ed8844262192eace9dc Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 14:46:02 -0500
Subject: [PATCH 17/19] python3-versioningit: update to 2.1.0.
---
srcpkgs/python3-versioningit/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/python3-versioningit/template b/srcpkgs/python3-versioningit/template
index d2229519bc9a..7c4ab452b8c2 100644
--- a/srcpkgs/python3-versioningit/template
+++ b/srcpkgs/python3-versioningit/template
@@ -1,7 +1,7 @@
# Template file for 'python3-versioningit'
pkgname=python3-versioningit
-version=1.1.1
-revision=2
+version=2.1.0
+revision=1
build_style=python3-pep517
hostmakedepends="python3-wheel"
depends="python3-packaging python3-setuptools python3-tomli"
@@ -11,7 +11,7 @@ license="MIT"
homepage="https://github.com/jwodder/versioningit"
changelog="https://raw.githubusercontent.com/jwodder/versioningit/master/CHANGELOG.md"
distfiles="https://github.com/jwodder/versioningit/archive/refs/tags/v$version.tar.gz"
-checksum=45d611fa50f3ef25f678468927b6295e27e295f39d55a5d8c0c426a0fae69445
+checksum=6379b15a701836a00654a4c3ff82e72f591461289d2718789c1be9af67be7a2f
post_install() {
vlicense LICENSE
From bb25a533ddaa449c0f2348d1bbcc40e7dffafce3 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 15:14:19 -0500
Subject: [PATCH 18/19] python3-pendulum: fix python3-pep517 build, enable
compiled extensions
---
srcpkgs/python3-pendulum/template | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/srcpkgs/python3-pendulum/template b/srcpkgs/python3-pendulum/template
index 363e4fab1b14..6c7ab9846248 100644
--- a/srcpkgs/python3-pendulum/template
+++ b/srcpkgs/python3-pendulum/template
@@ -1,9 +1,10 @@
# Template file for 'python3-pendulum'
pkgname=python3-pendulum
version=2.1.2
-revision=2
+revision=3
build_style=python3-pep517
hostmakedepends="python3-poetry-core"
+makedepends="python3-devel"
depends="python3-dateutil python3-pytzdata"
checkdepends="python3-pytest python3-pytz python3-freezegun ${depends}"
short_desc="Python datetimes made easy"
@@ -14,6 +15,12 @@ changelog="https://github.com/sdispater/pendulum/blob/master/CHANGELOG.md"
distfiles="https://github.com/sdispater/pendulum/archive/refs/tags/${version}.tar.gz"
checksum=4185efa48358cb9dca57a6afbc471d4b260e70f56609d5030197373564ac4a07
+do_build() {
+ # pendulum ships a build.py script to compile some extensions;
+ # this will shadow the build package with python3 -m build
+ pyproject-build --no-isolation --wheel .
+}
+
post_install() {
vlicense LICENSE
}
From aa9630cc5183f32c279bacf74efaf62295bd192d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 8 Nov 2022 15:25:55 -0500
Subject: [PATCH 19/19] pex: fix python3-pep517 build
---
srcpkgs/pex/patches/flit_version.patch | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 srcpkgs/pex/patches/flit_version.patch
diff --git a/srcpkgs/pex/patches/flit_version.patch b/srcpkgs/pex/patches/flit_version.patch
new file mode 100644
index 000000000000..b3ef6fc61e25
--- /dev/null
+++ b/srcpkgs/pex/patches/flit_version.patch
@@ -0,0 +1,13 @@
+The upper restriction on the flit_core version appears to be a stock
+generational restriction rather than a specific requirement, and the package
+seems to build as expected anyway. Drop the requirement restriction.
+
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["flit_core >=2,<3"]
++requires = ["flit_core"]
+ build-backend = "flit_core.buildapi"
+
+ [tool.flit.metadata]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR REVIEW] Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (16 preceding siblings ...)
2022-11-09 3:15 ` [PR PATCH] [Updated] " ahesford
@ 2022-11-09 4:15 ` eli-schwartz
2022-11-10 2:24 ` [PR PATCH] [Merged]: " ahesford
2022-11-10 21:50 ` eli-schwartz
19 siblings, 0 replies; 21+ messages in thread
From: eli-schwartz @ 2022-11-09 4:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
New review comment by eli-schwartz on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#discussion_r1017230252
Comment:
This one is great. `python -v -m build` attempts to run poetry's undocumented `build.py` plugin, you cannot even get [https://github.com/pypa/build](https://github.com/pypa/build)'s --help text inside the pendulum repo.
I've always been pretty meh about the use of `python -m` anything unless the goal is very specifically to inject $PWD into the python module search path, which granted you may sometimes want to do (pytest, specifically).
`/usr/bin/pyproject-build` arguably works just as well.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Merged]: Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (17 preceding siblings ...)
2022-11-09 4:15 ` [PR REVIEW] " eli-schwartz
@ 2022-11-10 2:24 ` ahesford
2022-11-10 21:50 ` eli-schwartz
19 siblings, 0 replies; 21+ messages in thread
From: ahesford @ 2022-11-10 2:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]
There's a merged pull request on the void-packages repository
Abandon pip in python3-pep517 build style
https://github.com/void-linux/void-packages/pull/40385
Description:
Using `pip`, the package manager, as a builder and installer in the `python3-pep517` build style was always a poor choice. Now that `python3-build` and `python3-installer` have apparently matured a bit and fall under the PyPA umbrella, let's use those instead.
This poses a bit of a bootstrap problem because PyPA doesn't seem to worry about dependency cycles, so we need to handle the core packages apart from the `python3-pep517` build style. Thus, we still use `pip` to install `python3-installer` and `python3-flit_core`.
Note that these packages are still in flux. For example, `pyproject-hooks` used to be called `pep517` and is still named that in the released version, but I'm using the new name to avoid a package rename in the future. Also, `python3-build` appears to have moved to `python3-flit_core` as the build backend, but the released version is still using `python3-setuptools`. We'll get there eventually...
I'm going to rebuild all of the `python3-pep517` packages to make sure this doesn't break anything.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Abandon pip in python3-pep517 build style
2022-11-08 17:38 [PR PATCH] [NOMERGE] Abandon pip in python3-pep517 build style ahesford
` (18 preceding siblings ...)
2022-11-10 2:24 ` [PR PATCH] [Merged]: " ahesford
@ 2022-11-10 21:50 ` eli-schwartz
19 siblings, 0 replies; 21+ messages in thread
From: eli-schwartz @ 2022-11-10 21:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
New comment by eli-schwartz on void-packages repository
https://github.com/void-linux/void-packages/pull/40385#issuecomment-1310950746
Comment:
https://github.com/void-linux/void-packages/blob/208681d556e650549447f32276e1b645b44c5b5b/srcpkgs/python3-Sphinx/template#L6
Missed one needed change to add dist/, /cc @q66
^ permalink raw reply [flat|nested] 21+ messages in thread