diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-10-11 15:35:46 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-10-14 14:38:50 +0200 |
commit | e3c29ca4138fdd292dd2cdf66433983ea8fbd437 (patch) | |
tree | 83da0f77c146dfae586a7fb90c42b5cd9c260c0e /dev-python/wheel | |
parent | dev-python/editables: Enable python3_13t (diff) | |
download | gentoo-e3c29ca4138fdd292dd2cdf66433983ea8fbd437.tar.gz gentoo-e3c29ca4138fdd292dd2cdf66433983ea8fbd437.tar.bz2 gentoo-e3c29ca4138fdd292dd2cdf66433983ea8fbd437.zip |
dev-python/wheel: Enable python3_13t
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/wheel')
-rw-r--r-- | dev-python/wheel/files/wheel-0.44.0-ft.patch | 38 | ||||
-rw-r--r-- | dev-python/wheel/wheel-0.44.0.ebuild | 14 |
2 files changed, 50 insertions, 2 deletions
diff --git a/dev-python/wheel/files/wheel-0.44.0-ft.patch b/dev-python/wheel/files/wheel-0.44.0-ft.patch new file mode 100644 index 000000000000..600318dc275e --- /dev/null +++ b/dev-python/wheel/files/wheel-0.44.0-ft.patch @@ -0,0 +1,38 @@ +From d30f834fcec7ecdbb74e263789db2fbe9ff37e99 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Fri, 11 Oct 2024 16:12:50 +0200 +Subject: [PATCH] Skip abi3 tests when freethreading Python build is used + +Skip the tests using abi3 extension when the freethreading build is +used, as Python 3.13 freethreading does not support the limited API +and its use results in a build error. + +Fixes #636 +--- + tests/conftest.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tests/conftest.py b/tests/conftest.py +index 5ee84da..d5bd356 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -7,6 +7,7 @@ from __future__ import annotations + import os.path + import subprocess + import sys ++import sysconfig + + import pytest + +@@ -22,7 +23,7 @@ def wheels_and_eggs(tmp_path_factory): + "unicode.dist", + ) + +- if sys.platform != "win32": ++ if sys.platform != "win32" and sysconfig.get_config_var("Py_GIL_DISABLED") != 1: + # ABI3 extensions don't really work on Windows + test_distributions += ("abi3extension.dist",) + +-- +2.47.0 + diff --git a/dev-python/wheel/wheel-0.44.0.ebuild b/dev-python/wheel/wheel-0.44.0.ebuild index effd34bd7d1a..aa0df30e0b2c 100644 --- a/dev-python/wheel/wheel-0.44.0.ebuild +++ b/dev-python/wheel/wheel-0.44.0.ebuild @@ -5,7 +5,7 @@ EAPI=8 DISTUTILS_USE_PEP517=flit -PYTHON_COMPAT=( python3_{10..13} pypy3 ) +PYTHON_COMPAT=( python3_{10..13} python3_13t pypy3 ) inherit distutils-r1 pypi @@ -36,10 +36,20 @@ EPYTEST_DESELECT=( distutils_enable_tests pytest src_prepare() { + local PATCHES=( + # https://github.com/pypa/wheel/pull/637 + "${FILESDIR}/${P}-ft.patch" + ) + + distutils-r1_src_prepare + # unbundle packaging rm -r src/wheel/vendored || die sed -i -e 's:\.vendored\.::' src/wheel/*.py || die sed -i -e 's:wheel\.vendored\.::' tests/*.py || die +} - distutils-r1_src_prepare +python_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest } |