commit:     a23c5eace1413968b8056b9db0dd968307e56448
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 18 14:37:57 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Apr 18 14:55:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a23c5eac

dev-python/distlib: Enable py3.13t

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/distlib/distlib-0.3.9.ebuild            |  6 +++--
 .../files/distlib-0.3.9-freethreading.patch        | 26 ++++++++++++++++++++++
 2 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/dev-python/distlib/distlib-0.3.9.ebuild 
b/dev-python/distlib/distlib-0.3.9.ebuild
index 657bd83fd1b1..77dd9df8987a 100644
--- a/dev-python/distlib/distlib-0.3.9.ebuild
+++ b/dev-python/distlib/distlib-0.3.9.ebuild
@@ -4,14 +4,14 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
+PYTHON_COMPAT=( python3_{10..13} python3_13t pypy3 pypy3_11 )
 
 inherit distutils-r1
 
 DESCRIPTION="Low-level components of distutils2/packaging"
 HOMEPAGE="
        https://pypi.org/project/distlib/
-       https://github.com/pypa/distlib
+       https://github.com/pypa/distlib/
 "
 SRC_URI="
        https://github.com/pypa/distlib/archive/${PV}.tar.gz -> ${P}.gh.tar.gz
@@ -35,6 +35,8 @@ src_prepare() {
        local PATCHES=(
                # use system pypiserver instead of bundled one
                "${FILESDIR}"/distlib-0.3.9-system-pypiserver.py
+               # https://github.com/pypa/distlib/pull/244
+               "${FILESDIR}/${P}-freethreading.patch"
        )
 
        # make sure it's not used

diff --git a/dev-python/distlib/files/distlib-0.3.9-freethreading.patch 
b/dev-python/distlib/files/distlib-0.3.9-freethreading.patch
new file mode 100644
index 000000000000..5f7ccb28bfcd
--- /dev/null
+++ b/dev-python/distlib/files/distlib-0.3.9-freethreading.patch
@@ -0,0 +1,26 @@
+From 99248e3681036af5132bf5338ec939148da13478 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]>
+Date: Fri, 18 Apr 2025 16:33:35 +0200
+Subject: [PATCH] Update `test_wheel.WheelTestCase.test_abi` for freethreading
+
+Update `test_wheel.WheelTestCase.test_abi` to account for the `t` suffix
+added in freethreaded CPython builds.
+
+Fixes #243
+---
+ tests/test_wheel.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/test_wheel.py b/tests/test_wheel.py
+index da5bd58..c14bba3 100644
+--- a/tests/test_wheel.py
++++ b/tests/test_wheel.py
+@@ -719,6 +719,8 @@ def test_abi(self):
+                 us = sysconfig.get_config_var('Py_UNICODE_SIZE')
+                 if us == 4 or (us is None and sys.maxunicode == 0x10FFFF):
+                     parts.append('u')
++            if bool(sysconfig.get_config_var("Py_GIL_DISABLED")):
++                parts.append('t')
+         if vi < (3, 5):
+             abi = ABI
+         else:

Reply via email to