dev-lang/python: no zstd dep with build USE flag

Gentoo prefix bootstrap needs to compile Python without support for
zstd initially to avoid a circular dependency:
python->zstd->meson->python

Explicity setting USE=build now this chain.

This is only needed for 3.14+, as older versions don't depend on
zstd.

https://github.com/gentoo/prefix/pull/43
is needed to actually set USE=build when emerging python

Closes: https://bugs.gentoo.org/977378
Signed-off-by: Bart Oldeman <bart.oldeman@calculquebec.ca>
Part-of: https://github.com/gentoo/gentoo/pull/46407
Closes: https://github.com/gentoo/gentoo/pull/46407
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Bart Oldeman
2026-06-14 16:09:43 +00:00
committed by Michał Górny
parent c8b192db59
commit d8c1184751
8 changed files with 24 additions and 16 deletions

View File

@@ -36,7 +36,7 @@ if [[ ${PV} != *_rc* ]]; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
IUSE="
bluetooth debug +ensurepip examples gdbm libedit +ncurses pgo
bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo
+readline +sqlite +ssl tail-call-interp test tk valgrind
"
RESTRICT="!test? ( test )"
@@ -49,7 +49,6 @@ RESTRICT="!test? ( test )"
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-arch/zstd:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
@@ -58,6 +57,7 @@ RDEPEND="
sys-apps/util-linux
>=virtual/zlib-1.1.3:=
virtual/libintl
!build? ( app-arch/zstd:= )
gdbm? ( sys-libs/gdbm:=[berkdb] )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
@@ -419,6 +419,7 @@ src_configure() {
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev build '_zstd')
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')

View File

@@ -25,7 +25,7 @@ EGIT_BRANCH=${PYVER%t}
LICENSE="PSF-2"
SLOT="${PYVER}"
IUSE="
bluetooth debug +ensurepip examples gdbm libedit +ncurses pgo
bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo
+readline +sqlite +ssl tail-call-interp test tk valgrind
"
RESTRICT="!test? ( test )"
@@ -38,7 +38,6 @@ RESTRICT="!test? ( test )"
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-arch/zstd:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
@@ -47,6 +46,7 @@ RDEPEND="
sys-apps/util-linux
>=virtual/zlib-1.1.3:=
virtual/libintl
!build? ( app-arch/zstd:= )
gdbm? ( sys-libs/gdbm:=[berkdb] )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
@@ -408,6 +408,7 @@ src_configure() {
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev build '_zstd')
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')

View File

@@ -32,7 +32,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
IUSE="
bluetooth debug +ensurepip examples gdbm libedit +ncurses pgo
bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo
+readline +sqlite +ssl tail-call-interp test tk valgrind
"
RESTRICT="!test? ( test )"
@@ -45,7 +45,6 @@ RESTRICT="!test? ( test )"
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-arch/zstd:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
@@ -54,6 +53,7 @@ RDEPEND="
sys-apps/util-linux
>=virtual/zlib-1.1.3:=
virtual/libintl
!build? ( app-arch/zstd:= )
gdbm? ( sys-libs/gdbm:=[berkdb] )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
@@ -422,6 +422,7 @@ src_configure() {
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev build '_zstd')
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')

View File

@@ -24,7 +24,7 @@ EGIT_REPO_URI="https://github.com/python/cpython.git"
LICENSE="PSF-2"
SLOT="${PYVER}"
IUSE="
bluetooth debug +ensurepip examples gdbm libedit +ncurses pgo
bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo
+readline +sqlite +ssl tail-call-interp test tk valgrind
"
RESTRICT="!test? ( test )"
@@ -37,7 +37,6 @@ RESTRICT="!test? ( test )"
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-arch/zstd:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
@@ -46,6 +45,7 @@ RDEPEND="
sys-apps/util-linux
>=virtual/zlib-1.1.3:=
virtual/libintl
!build? ( app-arch/zstd:= )
gdbm? ( sys-libs/gdbm:=[berkdb] )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
@@ -408,6 +408,7 @@ src_configure() {
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev build '_zstd')
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')

View File

@@ -37,7 +37,7 @@ if [[ ${PV} != *_rc* ]]; then
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
fi
IUSE="
bluetooth debug +ensurepip examples gdbm jit libedit +ncurses pgo
bluetooth build debug +ensurepip examples gdbm jit libedit +ncurses pgo
+readline +sqlite +ssl tail-call-interp test tk valgrind
"
REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
@@ -51,7 +51,6 @@ RESTRICT="!test? ( test )"
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-arch/zstd:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
@@ -60,6 +59,7 @@ RDEPEND="
sys-apps/util-linux
>=virtual/zlib-1.1.3:=
virtual/libintl
!build? ( app-arch/zstd:= )
gdbm? ( sys-libs/gdbm:=[berkdb] )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
@@ -437,6 +437,7 @@ src_configure() {
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev build '_zstd')
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')

View File

@@ -27,7 +27,7 @@ EGIT_BRANCH=${PYVER}
LICENSE="PSF-2"
SLOT="${PYVER}"
IUSE="
bluetooth debug +ensurepip examples gdbm jit libedit +ncurses pgo
bluetooth build debug +ensurepip examples gdbm jit libedit +ncurses pgo
+readline +sqlite +ssl tail-call-interp test tk valgrind
"
REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
@@ -41,7 +41,6 @@ RESTRICT="!test? ( test )"
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-arch/zstd:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
@@ -50,6 +49,7 @@ RDEPEND="
sys-apps/util-linux
>=virtual/zlib-1.1.3:=
virtual/libintl
!build? ( app-arch/zstd:= )
gdbm? ( sys-libs/gdbm:=[berkdb] )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
@@ -421,6 +421,7 @@ src_configure() {
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev build '_zstd')
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')

View File

@@ -33,7 +33,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
IUSE="
bluetooth debug +ensurepip examples gdbm jit libedit +ncurses pgo
bluetooth build debug +ensurepip examples gdbm jit libedit +ncurses pgo
+readline +sqlite +ssl tail-call-interp test tk valgrind
"
REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
@@ -47,7 +47,6 @@ RESTRICT="!test? ( test )"
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-arch/zstd:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
@@ -56,6 +55,7 @@ RDEPEND="
sys-apps/util-linux
>=virtual/zlib-1.1.3:=
virtual/libintl
!build? ( app-arch/zstd:= )
gdbm? ( sys-libs/gdbm:=[berkdb] )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
@@ -434,6 +434,7 @@ src_configure() {
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev build '_zstd')
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')

View File

@@ -26,7 +26,7 @@ EGIT_REPO_URI="https://github.com/python/cpython.git"
LICENSE="PSF-2"
SLOT="${PYVER}"
IUSE="
bluetooth debug +ensurepip examples gdbm jit libedit +ncurses pgo
bluetooth build debug +ensurepip examples gdbm jit libedit +ncurses pgo
+readline +sqlite +ssl tail-call-interp test tk valgrind
"
REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
@@ -40,7 +40,6 @@ RESTRICT="!test? ( test )"
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-arch/zstd:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
@@ -49,6 +48,7 @@ RDEPEND="
sys-apps/util-linux
>=virtual/zlib-1.1.3:=
virtual/libintl
!build? ( app-arch/zstd:= )
gdbm? ( sys-libs/gdbm:=[berkdb] )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
@@ -421,6 +421,7 @@ src_configure() {
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev build '_zstd')
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')