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
I am using pip-tools to compile requirements from pyproject.toml and write to requirements.txt files.
A once task to pip-compile the requirements, e.g.
[tool.thx.jobs.pip-compile]
run = "pip-compile -o requirements/dev.txt --extra dev --generate-hashes pyproject.toml"once = true
has the drawback that some requirements are specified as
exceptiongroup; python_version<3.11
and these requirements will only be pinned if this task is run on an interpreter older than 3.11. once = true runs on the highest version, so will typically fail to pin things.
once = true might be better to run on the lowest version, but really, the only correct solution is to pin dependencies for each interpreter. However this will require being able to substitute the python_version into the requirements:
[tool.thx]
python_versions = ["3.12", "3.11", "3.10"]
# Requirements to use for all jobsrequirements = ["requirements/dev-{python_version}.txt"]
[tool.thx.jobs.pip-compile]
run = "pip-compile -o requirements/dev-{python_version}.txt --extra dev --generate-hashes pyproject.toml"
Details
OS: Linux
Python version: 3.12
thx version: 0.6.0
Can you repro on main? Yes
Can you repro in a clean virtualenv? Yes
The text was updated successfully, but these errors were encountered:
Description
I am using
pip-tools
to compile requirements frompyproject.toml
and write torequirements.txt
files.A
once
task to pip-compile the requirements, e.g.has the drawback that some requirements are specified as
and these requirements will only be pinned if this task is run on an interpreter older than 3.11.
once = true
runs on the highest version, so will typically fail to pin things.once = true
might be better to run on the lowest version, but really, the only correct solution is to pin dependencies for each interpreter. However this will require being able to substitute thepython_version
into therequirements
:Details
The text was updated successfully, but these errors were encountered: