* [gentoo-dev] [PATCH 0/4] distutils-r1.eclass: cross support + minor updates
@ 2022-12-12 6:19 Michał Górny
2022-12-12 6:19 ` [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Pass -b to best_version for buildsys pkgs Michał Górny
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Michał Górny @ 2022-12-12 6:19 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Hi,
More patches to the last batch:
1. Fix build system package version output to work on cross (via passing
`-b` to best_version calls).
2. Add support for gpep517-12+ `--sysroot` option for better cross
support. Since this is only needed by some packages, we do not make
gpep-517-12+ requirement obligatory at this point and just warn when
cross-compiling with an older version.
3. Update minimum versions of dev-lang/python and dev-python/pypy3,
as well as clean the tests up after removing dead implementations.
Michał Górny (4):
distutils-r1.eclass: Pass -b to best_version for buildsys pkgs
distutils-r1.eclass: Pass --sysroot to gpep517 when cross-compiling
eclass/tests/python-utils-r1.sh: Remove old impls
python-utils.eclass: Bump minimal Python versions
eclass/distutils-r1.eclass | 21 +++++++++++++++------
eclass/python-utils-r1.eclass | 12 +++++-------
eclass/tests/python-utils-r1.sh | 18 +-----------------
3 files changed, 21 insertions(+), 30 deletions(-)
--
2.38.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Pass -b to best_version for buildsys pkgs
2022-12-12 6:19 [gentoo-dev] [PATCH 0/4] distutils-r1.eclass: cross support + minor updates Michał Górny
@ 2022-12-12 6:19 ` Michał Górny
2022-12-12 6:19 ` [gentoo-dev] [PATCH 2/4] distutils-r1.eclass: Pass --sysroot to gpep517 when cross-compiling Michał Górny
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2022-12-12 6:19 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, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 3064ba6a446c..6e8ff5467bdb 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -982,7 +982,7 @@ _distutils-r1_print_package_versions() {
local pkg
einfo "Build system packages:"
for pkg in "${packages[@]}"; do
- local installed=$(best_version "${pkg}")
+ local installed=$(best_version -b "${pkg}")
einfo " $(printf '%-30s' "${pkg}"): ${installed#${pkg}-}"
done
}
--
2.38.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-dev] [PATCH 2/4] distutils-r1.eclass: Pass --sysroot to gpep517 when cross-compiling
2022-12-12 6:19 [gentoo-dev] [PATCH 0/4] distutils-r1.eclass: cross support + minor updates Michał Górny
2022-12-12 6:19 ` [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Pass -b to best_version for buildsys pkgs Michał Górny
@ 2022-12-12 6:19 ` Michał Górny
2022-12-12 6:19 ` [gentoo-dev] [PATCH 3/4] eclass/tests/python-utils-r1.sh: Remove old impls Michał Górny
2022-12-12 6:19 ` [gentoo-dev] [PATCH 4/4] python-utils.eclass: Bump minimal Python versions Michał Górny
3 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2022-12-12 6:19 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 6e8ff5467bdb..371d52bcb7ef 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1033,6 +1033,11 @@ distutils-r1_python_prepare_all() {
python_export_utf8_locale
_distutils-r1_print_package_versions
+ if [[ -n ${SYSROOT} ]] && ! has_version -b ">=dev-python/gpep517-12"; then
+ ewarn ">=dev-python/gpep517-12 features cross-compilation fixes."
+ ewarn "Please consider upgrading to avoid issues."
+ fi
+
_DISTUTILS_DEFAULT_CALLED=1
}
@@ -1356,16 +1361,18 @@ distutils_pep517_install() {
local build_backend=$(_distutils-r1_get_backend)
einfo " Building the wheel for ${PWD#${WORKDIR}/} via ${build_backend}"
- local config_args=()
- [[ -n ${config_settings} ]] &&
- config_args+=( --config-json "${config_settings}" )
local cmd=(
gpep517 build-wheel
--backend "${build_backend}"
--output-fd 3
--wheel-dir "${WHEEL_BUILD_DIR}"
- "${config_args[@]}"
)
+ if [[ -n ${config_settings} ]]; then
+ cmd+=( --config-json "${config_settings}" )
+ fi
+ if [[ -n ${SYSROOT} ]] && has_version -b ">=dev-python/gpep517-12"; then
+ cmd+=( --sysroot "${SYSROOT}" )
+ fi
printf '%s\n' "${cmd[*]}"
local wheel=$(
"${cmd[@]}" 3>&1 >&2 || die "Wheel build failed"
@@ -1428,7 +1435,9 @@ distutils-r1_python_compile() {
#
# see extension.py for list of suffixes
# .pyx is added for Cython
- if [[ 1 -ne ${jobs} && 2 -eq $(
+ #
+ # esetup.py does not respect SYSROOT, so skip it there
+ if [[ -z ${SYSROOT} && 1 -ne ${jobs} && 2 -eq $(
find '(' -name '*.c' -o -name '*.cc' -o -name '*.cpp' \
-o -name '*.cxx' -o -name '*.c++' -o -name '*.m' \
-o -name '*.mm' -o -name '*.pyx' ')' -printf '\n' |
--
2.38.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-dev] [PATCH 3/4] eclass/tests/python-utils-r1.sh: Remove old impls
2022-12-12 6:19 [gentoo-dev] [PATCH 0/4] distutils-r1.eclass: cross support + minor updates Michał Górny
2022-12-12 6:19 ` [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Pass -b to best_version for buildsys pkgs Michał Górny
2022-12-12 6:19 ` [gentoo-dev] [PATCH 2/4] distutils-r1.eclass: Pass --sysroot to gpep517 when cross-compiling Michał Górny
@ 2022-12-12 6:19 ` Michał Górny
2022-12-12 6:19 ` [gentoo-dev] [PATCH 4/4] python-utils.eclass: Bump minimal Python versions Michał Górny
3 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2022-12-12 6:19 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/tests/python-utils-r1.sh | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 6abf10cadabd..6a1d2f98cbf9 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -64,23 +64,7 @@ tmpfile=$(mktemp)
inherit python-utils-r1
-ebegin "Testing python2.7"
-eindent
-test_var EPYTHON python2_7 python2.7
-test_var PYTHON python2_7 /usr/bin/python2.7
-if [[ -x /usr/bin/python2.7 ]]; then
- test_var PYTHON_SITEDIR python2_7 "/usr/lib*/python2.7/site-packages"
- test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
- test_var PYTHON_LIBPATH python2_7 "/usr/lib*/libpython2.7$(get_libname)"
- test_var PYTHON_CONFIG python2_7 /usr/bin/python2.7-config
- test_var PYTHON_CFLAGS python2_7 "*-I/usr/include/python2.7*"
- test_var PYTHON_LIBS python2_7 "*-lpython2.7*"
-fi
-test_var PYTHON_PKG_DEP python2_7 '*dev-lang/python*:2.7'
-test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
-eoutdent
-
-for minor in 6 7 8 9 10 11; do
+for minor in 8 9 10 11; do
ebegin "Testing python3.${minor}"
eindent
test_var EPYTHON "python3_${minor}" "python3.${minor}"
--
2.38.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-dev] [PATCH 4/4] python-utils.eclass: Bump minimal Python versions
2022-12-12 6:19 [gentoo-dev] [PATCH 0/4] distutils-r1.eclass: cross support + minor updates Michał Górny
` (2 preceding siblings ...)
2022-12-12 6:19 ` [gentoo-dev] [PATCH 3/4] eclass/tests/python-utils-r1.sh: Remove old impls Michał Górny
@ 2022-12-12 6:19 ` Michał Górny
3 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2022-12-12 6:19 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Bump minimal Python versions after the last security stabilizations,
plus PyPy3 sysconfig bugfix.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/python-utils-r1.eclass | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index df955371483e..d7b3df6105ab 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -445,17 +445,15 @@ _python_export() {
local d
case ${impl} in
python3.8)
- PYTHON_PKG_DEP=">=dev-lang/python-3.8.15_p3:3.8";;
+ PYTHON_PKG_DEP=">=dev-lang/python-3.8.16:3.8";;
python3.9)
- PYTHON_PKG_DEP=">=dev-lang/python-3.9.15_p3:3.9";;
+ PYTHON_PKG_DEP=">=dev-lang/python-3.9.16:3.9";;
python3.10)
- PYTHON_PKG_DEP=">=dev-lang/python-3.10.8_p3:3.10";;
+ PYTHON_PKG_DEP=">=dev-lang/python-3.10.9:3.10";;
python3.11)
- PYTHON_PKG_DEP=">=dev-lang/python-3.11.0_p2:3.11";;
- python*)
- PYTHON_PKG_DEP="dev-lang/python:${impl#python}";;
+ PYTHON_PKG_DEP=">=dev-lang/python-3.11.1:3.11";;
pypy3)
- PYTHON_PKG_DEP='>=dev-python/pypy3-7.3.9_p9:0=';;
+ PYTHON_PKG_DEP='>=dev-python/pypy3-7.3.10-r1:0=';;
*)
die "Invalid implementation: ${impl}"
esac
--
2.38.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-12-12 6:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-12 6:19 [gentoo-dev] [PATCH 0/4] distutils-r1.eclass: cross support + minor updates Michał Górny
2022-12-12 6:19 ` [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Pass -b to best_version for buildsys pkgs Michał Górny
2022-12-12 6:19 ` [gentoo-dev] [PATCH 2/4] distutils-r1.eclass: Pass --sysroot to gpep517 when cross-compiling Michał Górny
2022-12-12 6:19 ` [gentoo-dev] [PATCH 3/4] eclass/tests/python-utils-r1.sh: Remove old impls Michał Górny
2022-12-12 6:19 ` [gentoo-dev] [PATCH 4/4] python-utils.eclass: Bump minimal Python versions 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