summaryrefslogtreecommitdiff
path: root/dev-lang/python/python-3.13.2.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/python/python-3.13.2.ebuild')
-rw-r--r--dev-lang/python/python-3.13.2.ebuild79
1 files changed, 24 insertions, 55 deletions
diff --git a/dev-lang/python/python-3.13.2.ebuild b/dev-lang/python/python-3.13.2.ebuild
index 065f402a8b46..802ec7c0aa23 100644
--- a/dev-lang/python/python-3.13.2.ebuild
+++ b/dev-lang/python/python-3.13.2.ebuild
@@ -1,6 +1,6 @@
-# Copyright 2021-2024 Liguros Authors
+# Copyright 2021-2025 Liguros Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="8"
+EAPI=8
LLVM_COMPAT=( 18 )
LLVM_OPTIONAL=1
@@ -10,12 +10,12 @@ inherit autotools check-reqs flag-o-matic linux-info llvm-r1
inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs
inherit verify-sig
-MY_PV=${PV/_}
+MY_PV=${PV}
MY_P="Python-${MY_PV%_p*}"
-PYVER="$(ver_cut 1-2)t"
+PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
-DESCRIPTION="Freethreading (no-GIL) version of Python programming language"
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
@@ -34,7 +34,7 @@ SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build debug +ensurepip examples gdbm jit
- libedit libressl +ncurses pgo +readline +sqlite +ssl test tk valgrind
+ libressl libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind
"
REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
@@ -112,7 +112,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
# large file tests involve a 2.5G file being copied (duplicated)
CHECKREQS_DISK_BUILD=5500M
-QA_PKGCONFIG_VERSION=${PYVER%t}
+QA_PKGCONFIG_VERSION=${PYVER}
# false positives -- functions specific to *BSD
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
@@ -126,11 +126,13 @@ pkg_pretend() {
check-reqs_pkg_pretend
fi
- ewarn "Freethreading build is considered experimental upstream. Using it"
- ewarn "could lead to unexpected breakage, including race conditions"
- ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
- ewarn "you can reproduce the problem with dev-lang/python. Instead,"
- ewarn "please consider reporting freethreading problems upstream."
+ if use jit; then
+ ewarn "USE=jit is considered experimental upstream. Using it"
+ ewarn "could lead to unexpected breakage, including race conditions"
+ ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
+ ewarn "you can reproduce the problem with dev-lang/python[-jit]. Instead,"
+ ewarn "please consider reporting JIT problems upstream."
+ fi
}
pkg_setup() {
@@ -291,6 +293,11 @@ src_configure() {
-x test_strtod
)
;;
+ hppa*)
+ COMMON_TEST_SKIPS+=(
+ -x test_gdb
+ )
+ ;;
mips*)
COMMON_TEST_SKIPS+=(
-x test_ctypes
@@ -376,47 +383,16 @@ src_configure() {
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
# bug #900429
-x test_tools
-
- # Fails in profiling run, passes in src_test().
- -x test_capi
- -x test_external_inspection
)
- # Arch-specific skips. See #931888 for a collection of these.
- case ${CHOST} in
- alpha*)
- profile_task_flags+=(
- -x test_os
- )
- ;;
- hppa*)
- profile_task_flags+=(
- -x test_descr
- # bug 931908
- -x test_exceptions
- -x test_os
- )
- ;;
- powerpc64-*) # big endian
- profile_task_flags+=(
- # bug 931908
- -x test_exceptions
- )
- ;;
- riscv*)
- profile_task_flags+=(
- -x test_statistics
- )
- ;;
- esac
-
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
profile_task_flags+=(
-x test_distutils
)
fi
- local -x PROFILE_TASK="${profile_task_flags[*]}"
+ # PGO sometimes fails randomly
+ local -x PROFILE_TASK="${profile_task_flags[*]} || true"
fi
local myeconfargs=(
@@ -441,7 +417,7 @@ src_configure() {
--with-platlibdir=lib
--with-pkg-config=yes
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
- --disable-gil
+ --enable-gil
$(use_with debug assertions)
$(use_enable jit experimental-jit)
@@ -581,10 +557,6 @@ src_install() {
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
- # Fix collision with GIL-enabled build.
- rm "${ED}/usr/bin/python${PYVER%t}" || die
- mv "${ED}"/usr/bin/pydoc{${PYVER%t},${PYVER}} || die
- mv "${ED}"/usr/share/man/man1/python{${PYVER%t},${PYVER}}.1 || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
@@ -610,11 +582,8 @@ src_install() {
if ! use sqlite; then
rm -r "${libdir}/"sqlite3 || die
fi
- if use tk; then
- # rename to avoid collision with dev-lang/python
- mv "${ED}"/usr/bin/idle{${PYVER%t},${PYVER}} || die
- else
- rm -r "${ED}/usr/bin/idle${PYVER%t}" || die
+ if ! use tk; then
+ rm -r "${ED}/usr/bin/idle${PYVER}" || die
rm -r "${libdir}/"{idlelib,tkinter} || die
fi