* [gentoo-dev] [PATCH 0/8] Next Python eclass batch (incl. PyPy slots and non-urgent changes)
@ 2024-11-22 13:38 Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 1/8] python-any-r1.eclass: Fix python_gen_any_dep w/ PYTHON_REQ_USE Michał Górny
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Michał Górny @ 2024-11-22 13:38 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Hi,
Part of this has been sent as part of the original PyPy slotting
proposal, the rest are extra "non-urgent" changes and cleanups.
This will be pushed sometime between new pkgcheck release (which is
required to avoid tons of false positives) and next PyPy slot/subslot.
The primary change is replacing dev-python/pypy3:= compatibility package
dep with the new dev-lang/pypy:=[symlink] dep. The idea is that when we
get a new slot/subslot, the existing := dep will trigger rebuilds
and the packages will therefore be rebuilt with the new dependency.
Some time after that, we'll be able to lastrite dev-python/pypy3.
Other changes are:
- fixing python_gen_any_dep with PYTHON_REQ_USE (the bug doesn't trigger
right now)
- moving python3_13t earlier in impl list, so that the experimental impl
doesn't get used for common phases
- updating for newer maturin versions
- disabling trove-classifier validation that can cause pointless build
failures if users have too old dev-python/trove-classifiers installed
Ionen Wolkens (1):
distutils-r1.eclass: Update maturin's skip auditwheel option
Michał Górny (7):
python-any-r1.eclass: Fix python_gen_any_dep w/ PYTHON_REQ_USE
python-any-r1.eclass: Remove obsolete variable
python-utils-r1.eclass: Depend on dev-lang/pypy directly
python-utils-r1.eclass: Move python3_13t before other python*
distutils-r1.eclass: Use HATCH_METADATA_CLASSIFIERS_NO_VERIFY
distutils-r1.eclass: Also do SETUPTOOLS_RUST_CARGO_PROFILE uncond.
distutils-r1.eclass: Disable setuptools trove-classifier validation
eclass/distutils-r1.eclass | 15 ++++++++++-----
eclass/python-any-r1.eclass | 5 ++---
eclass/python-utils-r1.eclass | 11 +++--------
eclass/tests/python-utils-r1.sh | 4 +++-
4 files changed, 18 insertions(+), 17 deletions(-)
--
2.47.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-dev] [PATCH 1/8] python-any-r1.eclass: Fix python_gen_any_dep w/ PYTHON_REQ_USE
2024-11-22 13:38 [gentoo-dev] [PATCH 0/8] Next Python eclass batch (incl. PyPy slots and non-urgent changes) Michał Górny
@ 2024-11-22 13:38 ` Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 2/8] python-any-r1.eclass: Remove obsolete variable Michał Górny
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2024-11-22 13:38 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Fix `python_gen_any_dep()` to correctly strip the `:=` operator when
it does not occur at the end of `PYTHON_PKG_DEP`, i.e. when
`PYTHON_REQ_USE` is used and a USE dependency string is appended.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/python-any-r1.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index 0c01a49f9000..ca2ddf146406 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -259,7 +259,7 @@ python_gen_any_dep() {
local i_depstr=${depstr//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
i_depstr=${i_depstr//\$\{PYTHON_SINGLE_USEDEP\}/${PYTHON_SINGLE_USEDEP}}
# note: need to strip '=' slot operator for || deps
- out="( ${PYTHON_PKG_DEP%:=} ${i_depstr} ) ${out}"
+ out="( ${PYTHON_PKG_DEP/:=} ${i_depstr} ) ${out}"
done
echo "|| ( ${out})"
}
--
2.47.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-dev] [PATCH 2/8] python-any-r1.eclass: Remove obsolete variable
2024-11-22 13:38 [gentoo-dev] [PATCH 0/8] Next Python eclass batch (incl. PyPy slots and non-urgent changes) Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 1/8] python-any-r1.eclass: Fix python_gen_any_dep w/ PYTHON_REQ_USE Michał Górny
@ 2024-11-22 13:38 ` Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 3/8] python-utils-r1.eclass: Depend on dev-lang/pypy directly Michał Górny
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2024-11-22 13:38 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Remove a leftover variable from before PYTHON_PKG_DEP was used.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/python-any-r1.eclass | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index ca2ddf146406..adc7b1bfec47 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -167,8 +167,7 @@ inherit python-utils-r1
# @CODE
_python_any_set_globals() {
- local usestr deps i PYTHON_PKG_DEP
- [[ ${PYTHON_REQ_USE} ]] && usestr="[${PYTHON_REQ_USE}]"
+ local deps i PYTHON_PKG_DEP
_python_set_impls
--
2.47.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-dev] [PATCH 3/8] python-utils-r1.eclass: Depend on dev-lang/pypy directly
2024-11-22 13:38 [gentoo-dev] [PATCH 0/8] Next Python eclass batch (incl. PyPy slots and non-urgent changes) Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 1/8] python-any-r1.eclass: Fix python_gen_any_dep w/ PYTHON_REQ_USE Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 2/8] python-any-r1.eclass: Remove obsolete variable Michał Górny
@ 2024-11-22 13:38 ` Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 4/8] python-utils-r1.eclass: Move python3_13t before other python* Michał Górny
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2024-11-22 13:38 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Depend on `>=dev-lang/pypy-3.10:=` rather than the backwards
compatibility `dev-python/pypy3` package. Note that the package needs
to remain at least for some time after the next subslot bump, so that
users rebuild all packages and get the updated dependency across
the system.
Note that this requires pkgcheck to be updated first.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/python-utils-r1.eclass | 9 ++-------
eclass/tests/python-utils-r1.sh | 4 +++-
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 555b6c561a18..1c0e63a2621f 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -450,20 +450,15 @@ _python_export() {
local d
case ${impl} in
python*)
- PYTHON_PKG_DEP="dev-lang/python:${impl#python}"
+ PYTHON_PKG_DEP="dev-lang/python:${impl#python}${PYTHON_REQ_USE:+[${PYTHON_REQ_USE}]}"
;;
pypy3)
- PYTHON_PKG_DEP="dev-python/${impl}:="
+ PYTHON_PKG_DEP=">=dev-lang/pypy-3.10:=[symlink${PYTHON_REQ_USE:+,${PYTHON_REQ_USE}}]"
;;
*)
die "Invalid implementation: ${impl}"
esac
- # use-dep
- if [[ ${PYTHON_REQ_USE} ]]; then
- PYTHON_PKG_DEP+=[${PYTHON_REQ_USE}]
- fi
-
export PYTHON_PKG_DEP
debug-print "${FUNCNAME}: PYTHON_PKG_DEP = ${PYTHON_PKG_DEP}"
;;
diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 732f53381b22..81c3c6f78158 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -79,6 +79,7 @@ for minor in {10..13} 13t; do
test_var PYTHON_LIBS "python3_${minor}" "*-lpython3.${minor}*"
fi
test_var PYTHON_PKG_DEP "python3_${minor}" "*dev-lang/python*:3.${minor}"
+ PYTHON_REQ_USE=sqlite test_var PYTHON_PKG_DEP "python3_${minor}" "*dev-lang/python*:3.${minor}\[sqlite\]"
test_var PYTHON_SCRIPTDIR "python3_${minor}" "/usr/lib/python-exec/python3.${minor}"
tbegin "Testing that python3_${minor} is present in an impl array"
@@ -126,7 +127,8 @@ if [[ -x /usr/bin/pypy3 ]]; then
test_var PYTHON_SITEDIR pypy3 "/usr/lib*/pypy3.*/site-packages"
test_var PYTHON_INCLUDEDIR pypy3 "/usr/include/pypy3.*"
fi
-test_var PYTHON_PKG_DEP pypy3 '*dev-python/pypy3*:='
+test_var PYTHON_PKG_DEP pypy3 '*dev-lang/pypy*:=\[symlink\]'
+PYTHON_REQ_USE=sqlite test_var PYTHON_PKG_DEP pypy3 '*dev-lang/pypy*:=\[symlink,sqlite\]'
test_var PYTHON_SCRIPTDIR pypy3 /usr/lib/python-exec/pypy3
eoutdent
--
2.47.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-dev] [PATCH 4/8] python-utils-r1.eclass: Move python3_13t before other python*
2024-11-22 13:38 [gentoo-dev] [PATCH 0/8] Next Python eclass batch (incl. PyPy slots and non-urgent changes) Michał Górny
` (2 preceding siblings ...)
2024-11-22 13:38 ` [gentoo-dev] [PATCH 3/8] python-utils-r1.eclass: Depend on dev-lang/pypy directly Michał Górny
@ 2024-11-22 13:38 ` Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 5/8] distutils-r1.eclass: Update maturin's skip auditwheel option Michał Górny
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2024-11-22 13:38 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Move the python3_13t target on the list before other CPython targets.
This means it's technically "less preferred", so e.g. *all phases
would rather be performed with regular CPython, which should generally
be more faster.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/python-utils-r1.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 1c0e63a2621f..0cb132b72e3a 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -40,8 +40,8 @@ inherit multiprocessing toolchain-funcs
# All supported Python implementations, most preferred last.
_PYTHON_ALL_IMPLS=(
pypy3
- python3_{10..13}
python3_13t
+ python3_{10..13}
)
readonly _PYTHON_ALL_IMPLS
--
2.47.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-dev] [PATCH 5/8] distutils-r1.eclass: Update maturin's skip auditwheel option
2024-11-22 13:38 [gentoo-dev] [PATCH 0/8] Next Python eclass batch (incl. PyPy slots and non-urgent changes) Michał Górny
` (3 preceding siblings ...)
2024-11-22 13:38 ` [gentoo-dev] [PATCH 4/8] python-utils-r1.eclass: Move python3_13t before other python* Michał Górny
@ 2024-11-22 13:38 ` Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 6/8] distutils-r1.eclass: Use HATCH_METADATA_CLASSIFIERS_NO_VERIFY Michał Górny
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2024-11-22 13:38 UTC (permalink / raw
To: gentoo-dev; +Cc: Ionen Wolkens, Michał Górny
From: Ionen Wolkens <ionen@gentoo.org>
>=maturin-1.7.1 has deprecated --skip-auditwheel and added
--auditwheel=<check|repair|skip> to replace it. Update and set
the lower bound to latest stable rather than use has_version.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/39204
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 7ab8dcae3265..7e65bcb964a1 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -271,7 +271,7 @@ _distutils_set_globals() {
;;
maturin)
bdep+='
- >=dev-util/maturin-1.4.0[${PYTHON_USEDEP}]
+ >=dev-util/maturin-1.7.4[${PYTHON_USEDEP}]
'
;;
no)
@@ -1262,8 +1262,8 @@ distutils_pep517_install() {
# `maturin pep517 build-wheel --help` for options
local maturin_args=(
"${DISTUTILS_ARGS[@]}"
+ --auditwheel=skip # see bug #831171
--jobs="$(makeopts_jobs)"
- --skip-auditwheel # see bug #831171
$(in_iuse debug && usex debug '--profile=dev' '')
)
--
2.47.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-dev] [PATCH 6/8] distutils-r1.eclass: Use HATCH_METADATA_CLASSIFIERS_NO_VERIFY
2024-11-22 13:38 [gentoo-dev] [PATCH 0/8] Next Python eclass batch (incl. PyPy slots and non-urgent changes) Michał Górny
` (4 preceding siblings ...)
2024-11-22 13:38 ` [gentoo-dev] [PATCH 5/8] distutils-r1.eclass: Update maturin's skip auditwheel option Michał Górny
@ 2024-11-22 13:38 ` Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 7/8] distutils-r1.eclass: Also do SETUPTOOLS_RUST_CARGO_PROFILE uncond Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 8/8] distutils-r1.eclass: Disable setuptools trove-classifier validation Michał Górny
7 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2024-11-22 13:38 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Bug: https://github.com/pypa/hatch/issues/1368
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 3 +++
1 file changed, 3 insertions(+)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 7e65bcb964a1..51bf005271c1 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1257,6 +1257,9 @@ distutils_pep517_install() {
cmd+=( cargo_env )
fi
+ # set it globally in case we were using "standalone" wrapper
+ local -x HATCH_METADATA_CLASSIFIERS_NO_VERIFY=1
+
case ${DISTUTILS_USE_PEP517} in
maturin)
# `maturin pep517 build-wheel --help` for options
--
2.47.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-dev] [PATCH 7/8] distutils-r1.eclass: Also do SETUPTOOLS_RUST_CARGO_PROFILE uncond.
2024-11-22 13:38 [gentoo-dev] [PATCH 0/8] Next Python eclass batch (incl. PyPy slots and non-urgent changes) Michał Górny
` (5 preceding siblings ...)
2024-11-22 13:38 ` [gentoo-dev] [PATCH 6/8] distutils-r1.eclass: Use HATCH_METADATA_CLASSIFIERS_NO_VERIFY Michał Górny
@ 2024-11-22 13:38 ` Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 8/8] distutils-r1.eclass: Disable setuptools trove-classifier validation Michał Górny
7 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2024-11-22 13:38 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 51bf005271c1..de54b17fa9b3 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1259,6 +1259,9 @@ distutils_pep517_install() {
# set it globally in case we were using "standalone" wrapper
local -x HATCH_METADATA_CLASSIFIERS_NO_VERIFY=1
+ if in_iuse debug && use debug; then
+ local -x SETUPTOOLS_RUST_CARGO_PROFILE=dev
+ fi
case ${DISTUTILS_USE_PEP517} in
maturin)
@@ -1351,9 +1354,6 @@ distutils_pep517_install() {
)
;;
setuptools)
- if in_iuse debug && use debug; then
- local -x SETUPTOOLS_RUST_CARGO_PROFILE=dev
- fi
if [[ -n ${DISTUTILS_ARGS[@]} ]]; then
config_settings=$(
"${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die
--
2.47.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-dev] [PATCH 8/8] distutils-r1.eclass: Disable setuptools trove-classifier validation
2024-11-22 13:38 [gentoo-dev] [PATCH 0/8] Next Python eclass batch (incl. PyPy slots and non-urgent changes) Michał Górny
` (6 preceding siblings ...)
2024-11-22 13:38 ` [gentoo-dev] [PATCH 7/8] distutils-r1.eclass: Also do SETUPTOOLS_RUST_CARGO_PROFILE uncond Michał Górny
@ 2024-11-22 13:38 ` Michał Górny
7 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2024-11-22 13:38 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index de54b17fa9b3..9691c9067b7e 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1259,6 +1259,8 @@ distutils_pep517_install() {
# set it globally in case we were using "standalone" wrapper
local -x HATCH_METADATA_CLASSIFIERS_NO_VERIFY=1
+ local -x VALIDATE_PYPROJECT_NO_NETWORK=1
+ local -x VALIDATE_PYPROJECT_NO_TROVE_CLASSIFIERS=1
if in_iuse debug && use debug; then
local -x SETUPTOOLS_RUST_CARGO_PROFILE=dev
fi
--
2.47.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-11-22 13:48 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-22 13:38 [gentoo-dev] [PATCH 0/8] Next Python eclass batch (incl. PyPy slots and non-urgent changes) Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 1/8] python-any-r1.eclass: Fix python_gen_any_dep w/ PYTHON_REQ_USE Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 2/8] python-any-r1.eclass: Remove obsolete variable Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 3/8] python-utils-r1.eclass: Depend on dev-lang/pypy directly Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 4/8] python-utils-r1.eclass: Move python3_13t before other python* Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 5/8] distutils-r1.eclass: Update maturin's skip auditwheel option Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 6/8] distutils-r1.eclass: Use HATCH_METADATA_CLASSIFIERS_NO_VERIFY Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 7/8] distutils-r1.eclass: Also do SETUPTOOLS_RUST_CARGO_PROFILE uncond Michał Górny
2024-11-22 13:38 ` [gentoo-dev] [PATCH 8/8] distutils-r1.eclass: Disable setuptools trove-classifier validation Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox