-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Wheel tags #202
Comments
In theory |
PEP517 has an interface to pass extra settings to backends, it's called As Dustin mentioned, we do already support it via the For eg., {
'my_setting': 'true',
'some_value': '9',
'something': 'something',
} It's up to the build backends, in this case setuptools, to support passing configuration options this way. |
There are some limitations with this, it only maps keys to strings. I wanted to wait for backends to start using this to see what kind of interface would make sense to use here. |
|
Uh, I think |
It needs to be split up so that |
Ah, right. Perhaps setuptools could help here by treating a string as a single element list. I think |
|
It really should be the build backend that has a setting that says "python version specific / OS specific / arch specific", I'd think. But that workaround does work, thanks! |
I think this is resolved, as far as build is concerned, you can close unless there's anything to be done. |
There should be similar (working) examples in the docs. Is there anything specifically that's missing? |
I'm not certain what is missing per say, since I do not see any end to end examples in the docs on https://pypa-build.readthedocs.io/en/stable/index.html Using the global-option flag generates a setuptools warning:
To avoid this warning, I was previously using
I'm not 100% certain if this is a case of holding the tool wrong, or if there is some aspect of the changelog entry related to #627 that I do not understand properly. Bisecting the |
Ahh, I got this confused for a different issue in a completely different repo (wheel). Do you have a repo I could test? I’ll look at it very soon. The correct way to work around this setuptools bug is in #264 (comment), have you tried that? |
For reference, the repo I am working with is here https://github.com/vertexproject/synapse but I imagine it would be a pretty generic issue. I will review that thread you linked and try it. |
Probably related to pypa/setuptools#3896 (which is a pending "FR" that still needs desgin+implementation) For the time being, it is not possible to pass The error happens because only For the time being, the safe way to do that is to have a [bdist_wheel]
python_tag = py39 You can also use a trick like: export DIST_EXTRA_CONFIG=... # e.g. /tmp/build-opts.cfg
echo -e "[bdist_wheel]\npython_tag=py39" > $DIST_EXTRA_CONFIG But there might be tools (maybe |
"Correct" might be stretching it 😛 |
Testing henryii's solution in #264 (comment) did not work to produce a build that was tagged with the options I provided. The solution from @abravalheri seems to be the most straightforward and allows for doing dynamic tag generation. With |
What command did you run that failed? Edit, yes, does seem to not work correctly. The cfg method is actually a closer to "correct" workaround anyway, so probably just use that. :) Though @abravalheri is correct, you can't cross compile to Windows ARM using this trick, since cibuildwheel sets Ideally this bug should get fixed in setuptools, I hope. |
Is there a way to control the wheel tags? I was just suggesting to someone to use
build
, and found they neededpython3 setup.py bdist_wheel --python-tag py39
to build wheels, since the package depends on building the unicode tables in each Python version to make a wheel. Is there a way to pass this through or set it? It could be something simple in setuptools, likeuniversal=1
was, but I realize I don't know what it would be. I triedpyproject-build --config-setting "--python-tag py39"
(yes, off my pipx install ;) ), but that didn't fail or do anything different, just produced the normal py3 wheel.The text was updated successfully, but these errors were encountered: