How to install build-system requirements depending on extra values given to pip? #3873
-
When pip builds a wheel from a source package to install a package, I’d like to add build-time requirements depending on the extra values given to pip. I’ve tried this in [build-system]
requires = ["setuptools", "extra_package; 'xxx' in extra"] And I’d like:
But unfortunately, it looks like Is there a way to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @liZe , I am afraid If I understood your question correctly, the build-front end (e.g. Probably the best place to ask information would be |
Beta Was this translation helpful? Give feedback.
Hi @liZe , I am afraid
setuptools
is not involved in the construction of the environment used for the build or the installation of[build-system] requires
. It will only be invoked after that is already done.If I understood your question correctly, the build-front end (e.g.
pypa/build
orpypa/pip
) would have to take into consideration the extra of the package you are trying to install when evaluating the markers in[build-system] requires
, but I am not sure if they support that (or plan to support)...Probably the best place to ask information would be
pypa/build
orpypa/pip
.