Closed belm0 closed 2 months ago
@belm0 thanks for report, try it now with new version.
Thank you. There seems to be a problem with parsing when there are comments on the same line.
$ cat requirements/dev.in
-c base.txt # relative to this file
...
$ $ .venv/venv_python3.8/bin/pip_compile_universal 3.8,3.12 requirements/dev.in --output-file requirements/dev.txt
Traceback (most recent call last):
File ".venv/venv_python3.8/bin/pip_compile_universal", line 769, in <module>
main()
File ".venv/venv_python3.8/bin/pip_compile_universal", line 765, in main
pip_compile(args.versions, compile_args, Path(args.virtualenvs_dir))
File ".venv/venv_python3.8/bin/pip_compile_universal", line 688, in pip_compile
first_input_data = copy_dependencies(first_input_data)
File ".venv/venv_python3.8/bin/pip_compile_universal", line 676, in copy_dependencies
with open(filename) as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'base.txt # relative to this file'
With the comment removed, there is a 2nd bug about relative paths when the requirements files are not in the local directory (-c
etc. are relative to the location of the containing requirements file):
$ .venv/venv_python3.8/bin/pip_compile_universal 3.8,3.12 requirements/dev.in --output-file requirements/dev.txt -q --no-emit-index-url
Traceback (most recent call last):
File ".venv/venv_python3.8/bin/pip_compile_universal", line 769, in <module>
main()
File ".venv/venv_python3.8/bin/pip_compile_universal", line 765, in main
pip_compile(args.versions, compile_args, Path(args.virtualenvs_dir))
File ".venv/venv_python3.8/bin/pip_compile_universal", line 688, in pip_compile
first_input_data = copy_dependencies(first_input_data)
File ".venv/venv_python3.8/bin/pip_compile_universal", line 676, in copy_dependencies
with open(filename) as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'base.txt'
@belm0 i have updated package, please check if it's fixed. Thanks.
Thank you.
It's minor, but I noticed the paths in the -c comments changed:
trio-typing[mypy]==0.9.0
# via
# -c base.txt
# -r requirements/dev.in
It used to be # -c requirements/base.txt
, so I wonder if the -c file is in a different relative location within the temp directory.
@belm0 thanks for report, it should be fixed now.
looks good, thank you!
requirements.in:
$ pip_compile_universal 3.8 requirements.in