Closed csalerno-asml closed 7 months ago
To add on this, if I run pip-compile pyproject.toml file.txt
, I get the expected result
A full repro would be helpful.
Hey @webknjaz , I created a repo to demo this: https://github.com/csalerno-asml/test-pip-compile
Basically, it looks like the tool ignores entirely the content of src-files
, and, when no src file is specified via CLI, it just pick the dependencies following a list:
requirements.in
pyproject.toml
You can see the behavior here:
src-files
are found, but only requirements.in
is used: https://github.com/csalerno-asml/test-pip-compile/actions/runs/6625134286/job/17995493296requirements.in
is removed and only pyproject.toml
is used: https://github.com/csalerno-asml/test-pip-compile/pull/1To add on this, the src-files
option in pyproject.toml
is used by the tool for sure, since all the paths specified there are checked, i.e., an error will raise if you put a non-existing-file
inside the list.
My concern is, then: maybe the code is missing the logic to handle src-files
when specified from a config, rather than CLI usage?
I believe we should first incorporate this PR https://github.com/jazzband/pip-tools/pull/1966 which will allow us to separately specify inputs and outputs for the compile
and sync
commands.
Actually, I found out what exactly causes this: According to pallets/click#390, default values won't work on arguments with unlimited length. So I think the proposed fix is the only solution.
Hi, I am using
pip-compile==7.3.0
, and trying to specify multiple source files within thepyproject.toml
file with the keywordsrc-files
.My desired outcome would be to specify
pyproject.toml
andrequirements.hotfix.txt
, so that the list of dependencies can be used together. However, I noticed that it's like these files - and the whole input in general - are ignored, because then the tool only use the dependencies specified inpyproject.toml
.I also tried to do something like these (see picture), but I ended up with again
pyproject.toml
being used.I know that the tool is reading the config, since the other options are used, and if I specify a non-existing file I get an error message
Is this a known bug? Should I change something on my end?
Environment Versions
Steps to replicate
pyproject.toml
andfile.txt
tools.pip-tools
/src_files = ["pyproject.toml", "file.txt"
file.txt
are picked up and translated in requirements.txtExpected result
Dependencies specified in both files are translated in
requirements.txt
Actual result
Only dependencies specified in
pyproject.toml
are picked up