astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.82k stars 467 forks source link

support constraints.txt file for `rye sync` and `rye lock` #1046

Open getumen opened 6 months ago

getumen commented 6 months ago

Dependencies of some frameworks such as Apache Airflow are broken and not working in Pypi. They require constraints file when installing them. uv and pip-tools supports constraints file. If rye also supports constraint file, it must be helpful for users.

utkarshgupta137 commented 4 months ago

You can use UV_CONSTRAINT environment variable:

UV_CONSTRAINT='https://raw.githubusercontent.com/apache/airflow/constraints-2.9.2/constraints-no-providers-3.11.txt' rye sync --update-all
getumen commented 4 months ago

@utkarshgupta137 It works. Thank you very much.