dev-python/distlib: Sync with Gentoo

It's from Gentoo commit a23c5eace1413968b8056b9db0dd968307e56448.
This commit is contained in:
Flatcar Buildbot 2025-04-28 07:13:38 +00:00
parent f7222de11a
commit f162e47db2
2 changed files with 31 additions and 2 deletions

View File

@ -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
@ -27,6 +27,7 @@ RESTRICT="!test? ( test )"
BDEPEND="
test? (
dev-python/pypiserver
dev-python/test[${PYTHON_USEDEP}]
)
"
@ -34,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

View File

@ -0,0 +1,26 @@
From 99248e3681036af5132bf5338ec939148da13478 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
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: