How are you supposed to use config_settings_build_wheel correctly? #3544
Unanswered
henryborchers
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm confused by the docs regarding config_settings_build_wheel and the rest of the config_settings_* settings.
From what I can tell, to config_settings_build_wheel can ONLY be used within a build env and ONLY when you set "package=wheel" in [testenv].
When I do that, each environment has it's own package environment. So this means that if I want to change anything in the arguments sent to the pep-517 builder, I have to create a [testenv:.pkg-cpython39], [testenv:.pkg-cpython310],[testenv:.pkg-cpython311], etc... for each environment. Please correct me if I'm wrong.
I see that I can set "wheel_build_env" in [testenv] to ".pkg" and set "config_settings_build_wheel" within [testenv:.pkg]. However, this only works if it's a universal wheel and not helpful if you have C-extensions that need to be built. (Also, I can't figure out how to override that from the command line) Again, please correctly me if I'm wrong here too.
How are you supposed to run ALL your test environments with "--config-setting=some_setting=somevalue" being passed to the PEP-517 backend builder.
Here is my use use case to show you what I want to do.
I have a custom PEP-517 builder that helps me build my C extension and link them to libraries provided by a package manager. What I would do to help reduced the build time is use a config-setting to point to the already built compiled packages so I don't have rebuild them every time. I would like to run "tox run" and override the "conan_cache" value in my config-settings to point to somewhere on my computer where I have all my C dependencies already compiled. In my mind the command should work something like "tox run -x testenv.config-setting="conan_cache=/some/place/on/my/computer" .
My workaround has been using environment variables for everything I want to use in addition to having pep-517 config-settings.
Beta Was this translation helpful? Give feedback.
All reactions