Posted originally here:
https://discussion.fedoraproject.org/t/how-to-pass-arbritary-options-in-spec-file-for-python-build/135434/

I’m currently refactoring the picard spec file to conform to the new python 
build guidelines (used pyprojectize, thanks!), 
everything fine there so I thought I’d add --disable-autoupdate so as to remove 
the new update 
option at runtime. Picard allows for this by using --disable-update. When I try:

    %pyproject_wheel -C–disable-autoupdate=None

It build fine, but doesn’t work. I’ve asked the good folks at the Picard forum 
and here is the response:

    I tried getting options to pass with python -m build, but without success.
    Picard is using the setuptools backend, and it looks like passing arbitrary 
    options is currently not working there. See the discussion at Setuptools 
    does not pass config_settings through backend · Issue #2491 · 
pypa/setuptools · GitHub .

    I would have expected something like python -m build --wheel 
-C--disable-autoupdate 
    or maybe python -m build --wheel -C--disable-autoupdate=True should work, 
    but it doesn’t for now, as the parameters are not passed on.

    One workaround seems to be to add a custom build backend that overrides the 
relevant 
    parts to handle the customer build parameters as it was done for example in 
Add custom 
    build backend to support    build args by tobiasah · Pull Request #328 · 
capnproto/pycapnp · GitHub

    We could also maybe check for specific environment variables or such. But 
ideally the issue gets solved in setuptools itself.

Am I missing some functionality in the Fedora buildtools or is this just not 
possible. Thanks for any insights.
-- 
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to