-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Can't build wheels on CPython 3.13t
(no GIL / PEP 703) when bdist_wheel
's py-limited-api
option is set
#4420
Comments
Hi @bastimeyer, thank you very much for reporting this. If I understood correctly, you mention that the following piece of code is the main problem, right? Do you have a suggestion on how to fix the checks/abi assignment? setuptools/setuptools/command/bdist_wheel.py Lines 351 to 355 in f91fa3d
This is curious... If the developer sets a configuration option that cannot be satisfied, isn't it the right thing to raise an exception? Maybe we need to refine the exception... |
The setuptools/setuptools/_vendor/packaging/tags.py Lines 144 to 151 in f91fa3d
The If you want to prevent (or allow) building non-abi3 wheels while the option is set, then I guess another option needs to be implemented which package authors need to set in addition to edit: |
Thank you very much @bastimeyer for the information.
Have you consider the following workaround while we figure this out? For # using build to build from source code
python -m build -C "--build-option=--py-limited-api ''"
# using pip>=23.1 to install from source-code (may also work with sdist)
pip install . -C "--build-option=--py-limited-api ''" Note however that the support for |
This is how
There is some comments on the original commit. So I guess that the original intent was that Hi @dholth, do you know if it would make sense to separate the Do you have any suggestions or hints regarding the original issue? Or do you think that an exception is the best when trying to build |
Change the check from startswith("cp3") to match("^cp\d*$")? |
That won't have any effect (apart from accepting non-
|
I mean "match cp3(digit)" but "don't match cp3(digit)(letter)" |
setuptools version
latest commit from the main branch
Python version
3.13t
OS
Arch Linux
Additional environment information
CPython 3.13 built without global interpreter lock (
--disable-gil
) - PEP 703.Description
I've just been redirected here to this issue tracker from
pypa/wheel#624
because the
bdist_wheel
command has just been vendored intosetuptools
. There hasn't been a newsetuptools
releasee since, so I'm actually reporting a bug that currently only affects thewheel
package, but will affectsetuptools
soon unless fixed.Original report (with adjusted code links):
I ran into this issue while trying to build a
pycryptodome
wheel on CPython3.13t
.See Legrandin/pycryptodome#813
The
pycryptodome
project sets thepy-limited-api
option tocp35
in order to limit itsabi3
wheels tocp35
and above.However, when using CPython
3.13t
(built without global interpreter lock - PEP 703), this option raises anAssertionError
when trying to build the wheel.The reason for this is this if-else-block:
setuptools/setuptools/command/bdist_wheel.py
Lines 351 to 355 in f91fa3d
Building CPython 3.13 without the GIL adds the
t
ABI flag, so the(impl_name + impl_ver).startswith("cp3")
check is incorrect where it setsabi_tag = "abi3"
if the condition is true. TheAssertionError
is then raised afterwards when it checks for supported tags:setuptools/setuptools/command/bdist_wheel.py
Lines 356 to 363 in f91fa3d
pypa/wheel#624 (comment)
Expected behavior
.
How to Reproduce
--disable-gil
as build optionpycryptodome
wheel (which sets thepy-limited-api
option tocp35
in order to limit itsabi3
wheels tocp35
and above, but which is irrelevant, as we can't buildabi3
wheels due to the no GIL CPython build option)As said in the beginning, I've been redirected here, so this issue currently doesn't apply to
setuptools
yet, since the vendoredbdist_wheel
command hasn't arrived in a new release yet.Output
.
The text was updated successfully, but these errors were encountered: