You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: handle inline comments and pip options in requirements.txt
Replace the per-line pip install loop in execute_install_script with
`pip install -r <path>`, delegating requirements parsing to pip. This
fixes inline comments being passed verbatim to pip (Invalid requirement
errors) and incidentally handles line continuations, -e, --index-url,
env markers, and hash specs.
Also strip inline comments (matching pip's COMMENT_RE regex) in:
- parse_req_file in uv.py, which feeds pip download/wheel argv.
- initialize_project_config in registry/config_parser.py, which produces
pyproject.toml [project.dependencies]; additionally skip pip-only
options (-r, -e, --index-url, --find-links) that are not valid PEP 508
specifiers and would corrupt the generated TOML.
The regex (^|\s+)#.*$ matches pip's exact rule: `#` only starts a
comment when preceded by whitespace, so VCS URL fragments like
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
#subdirectory=pkg and direct-URL #sha256= hashes survive.
0 commit comments