Open belm0 opened 11 months ago
Pip doesn't put them into comments like that, though. Said section is reserved for the environment markers.
Also, it appears you confuse the function of constraint files compared to the incoming requirements. Constraints probably don't need this.
Just to add to workaround thoughts (not sure if I'm using the option syntax right, but this is what I understand from the docs):
r.in
:
scipy==1.10.1
$ pip-compile r.in
configured.txt
:
-r r.txt
--config-settings="setup-args=-Dblas=blas" scipy
$ pip install -r configured.txt
Would that work?
Just to add to workaround thoughts
That works for me, thanks @AndydeCleyre
What's the problem this feature will solve?
pip
supports per-requirement options, e.g.--config-settings
I'm forced to use per-requirement
--config-settings
, because there are cases where pip intentionally does not honor the command-line--config-settings
.But
pip-compile
does not seem to propagate per-requirement options.Describe the solution you'd like
I'd like pip-compile to propagate per-requirement options from
.in
to.txt
Alternative Solutions
Command line
pip --config-settings
doesn't work, because I'm passing a requirements file topip wheel
, and pip intentionally doesn't propagate the settings.My current workaround is to build the affected packages separately, avoiding use of a requirements file. But it's not good for my use case, which is to build all the transitive dependencies for an application (targeting an alternative python implementation).
pip wheel -r ...
is best suited for this.