Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use uv for requirements #243

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 13 additions & 31 deletions requirements/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,23 @@
import os
import subprocess
import sys
from functools import partial
from pathlib import Path

if __name__ == "__main__":
os.chdir(Path(__file__).parent)
os.environ["CUSTOM_COMPILE_COMMAND"] = "requirements/compile.py"
os.environ["PIP_REQUIRE_VIRTUALENV"] = "0"
common_args = [
"-m",
"piptools",
"uv",
"pip",
"compile",
"--quiet",
"--generate-hashes",
"--allow-unsafe",
] + sys.argv[1:]
subprocess.run(
["python3.8", *common_args, "-o", "py38.txt"],
check=True,
capture_output=True,
)
subprocess.run(
["python3.9", *common_args, "-o", "py39.txt"],
check=True,
capture_output=True,
)
subprocess.run(
["python3.10", *common_args, "-o", "py310.txt"],
check=True,
capture_output=True,
)
subprocess.run(
["python3.11", *common_args, "-o", "py311.txt"],
check=True,
capture_output=True,
)
subprocess.run(
["python3.12", *common_args, "-o", "py312.txt"],
check=True,
capture_output=True,
)
"requirements.in",
*sys.argv[1:],
]
run = partial(subprocess.run, check=True)
run([*common_args, "--python", "3.8", "--output-file", "py38.txt"])
run([*common_args, "--python", "3.9", "--output-file", "py39.txt"])
run([*common_args, "--python", "3.10", "--output-file", "py310.txt"])
run([*common_args, "--python", "3.11", "--output-file", "py311.txt"])
run([*common_args, "--python", "3.12", "--output-file", "py312.txt"])
15 changes: 3 additions & 12 deletions requirements/py310.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# requirements/compile.py
#
# This file was autogenerated by uv via the following command:
# uv pip compile --generate-hashes requirements.in --python 3.10 --output-file py310.txt
exceptiongroup==1.2.1 \
--hash=sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad \
--hash=sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16
# via pytest
flake8==7.0.0 \
--hash=sha256:33f96621059e65eec474169085dc92bf26e7b2d47366b70be2f67ab80dc25132 \
--hash=sha256:a6dfbb75e03252917f2473ea9653f7cd799c3064e54d4c8140044c5c065f53c3
# via
# -r requirements.in
# pytest-flake8-path
# via pytest-flake8-path
iniconfig==2.0.0 \
--hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \
--hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374
Expand Down Expand Up @@ -42,17 +36,14 @@ pytest==8.1.1 \
--hash=sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7 \
--hash=sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044
# via
# -r requirements.in
# pytest-flake8-path
# pytest-randomly
pytest-flake8-path==1.5.0 \
--hash=sha256:2c144a3127995d34e82df397350dbef7780c9920c5b7e9ebc81f63299011381e \
--hash=sha256:8766879344883e67762fc3f4f8f0d624a0d143de71f6488788599b3583e279a9
# via -r requirements.in
pytest-randomly==3.15.0 \
--hash=sha256:0516f4344b29f4e9cdae8bce31c4aeebf59d0b9ef05927c33354ff3859eeeca6 \
--hash=sha256:b908529648667ba5e54723088edd6f82252f540cc340d748d1fa985539687047
# via -r requirements.in
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
Expand Down
15 changes: 3 additions & 12 deletions requirements/py311.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# requirements/compile.py
#
# This file was autogenerated by uv via the following command:
# uv pip compile --generate-hashes requirements.in --python 3.11 --output-file py311.txt
flake8==7.0.0 \
--hash=sha256:33f96621059e65eec474169085dc92bf26e7b2d47366b70be2f67ab80dc25132 \
--hash=sha256:a6dfbb75e03252917f2473ea9653f7cd799c3064e54d4c8140044c5c065f53c3
# via
# -r requirements.in
# pytest-flake8-path
# via pytest-flake8-path
iniconfig==2.0.0 \
--hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \
--hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374
Expand Down Expand Up @@ -38,14 +32,11 @@ pytest==8.1.1 \
--hash=sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7 \
--hash=sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044
# via
# -r requirements.in
# pytest-flake8-path
# pytest-randomly
pytest-flake8-path==1.5.0 \
--hash=sha256:2c144a3127995d34e82df397350dbef7780c9920c5b7e9ebc81f63299011381e \
--hash=sha256:8766879344883e67762fc3f4f8f0d624a0d143de71f6488788599b3583e279a9
# via -r requirements.in
pytest-randomly==3.15.0 \
--hash=sha256:0516f4344b29f4e9cdae8bce31c4aeebf59d0b9ef05927c33354ff3859eeeca6 \
--hash=sha256:b908529648667ba5e54723088edd6f82252f540cc340d748d1fa985539687047
# via -r requirements.in
15 changes: 3 additions & 12 deletions requirements/py312.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# requirements/compile.py
#
# This file was autogenerated by uv via the following command:
# uv pip compile --generate-hashes requirements.in --python 3.12 --output-file py312.txt
flake8==7.0.0 \
--hash=sha256:33f96621059e65eec474169085dc92bf26e7b2d47366b70be2f67ab80dc25132 \
--hash=sha256:a6dfbb75e03252917f2473ea9653f7cd799c3064e54d4c8140044c5c065f53c3
# via
# -r requirements.in
# pytest-flake8-path
# via pytest-flake8-path
iniconfig==2.0.0 \
--hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \
--hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374
Expand Down Expand Up @@ -38,14 +32,11 @@ pytest==8.1.1 \
--hash=sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7 \
--hash=sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044
# via
# -r requirements.in
# pytest-flake8-path
# pytest-randomly
pytest-flake8-path==1.5.0 \
--hash=sha256:2c144a3127995d34e82df397350dbef7780c9920c5b7e9ebc81f63299011381e \
--hash=sha256:8766879344883e67762fc3f4f8f0d624a0d143de71f6488788599b3583e279a9
# via -r requirements.in
pytest-randomly==3.15.0 \
--hash=sha256:0516f4344b29f4e9cdae8bce31c4aeebf59d0b9ef05927c33354ff3859eeeca6 \
--hash=sha256:b908529648667ba5e54723088edd6f82252f540cc340d748d1fa985539687047
# via -r requirements.in
15 changes: 3 additions & 12 deletions requirements/py38.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# requirements/compile.py
#
# This file was autogenerated by uv via the following command:
# uv pip compile --generate-hashes requirements.in --python 3.8 --output-file py38.txt
exceptiongroup==1.2.1 \
--hash=sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad \
--hash=sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16
# via pytest
flake8==7.0.0 \
--hash=sha256:33f96621059e65eec474169085dc92bf26e7b2d47366b70be2f67ab80dc25132 \
--hash=sha256:a6dfbb75e03252917f2473ea9653f7cd799c3064e54d4c8140044c5c065f53c3
# via
# -r requirements.in
# pytest-flake8-path
# via pytest-flake8-path
importlib-metadata==7.1.0 \
--hash=sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570 \
--hash=sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2
Expand Down Expand Up @@ -46,17 +40,14 @@ pytest==8.1.1 \
--hash=sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7 \
--hash=sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044
# via
# -r requirements.in
# pytest-flake8-path
# pytest-randomly
pytest-flake8-path==1.5.0 \
--hash=sha256:2c144a3127995d34e82df397350dbef7780c9920c5b7e9ebc81f63299011381e \
--hash=sha256:8766879344883e67762fc3f4f8f0d624a0d143de71f6488788599b3583e279a9
# via -r requirements.in
pytest-randomly==3.15.0 \
--hash=sha256:0516f4344b29f4e9cdae8bce31c4aeebf59d0b9ef05927c33354ff3859eeeca6 \
--hash=sha256:b908529648667ba5e54723088edd6f82252f540cc340d748d1fa985539687047
# via -r requirements.in
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
Expand Down
15 changes: 3 additions & 12 deletions requirements/py39.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# requirements/compile.py
#
# This file was autogenerated by uv via the following command:
# uv pip compile --generate-hashes requirements.in --python 3.9 --output-file py39.txt
exceptiongroup==1.2.1 \
--hash=sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad \
--hash=sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16
# via pytest
flake8==7.0.0 \
--hash=sha256:33f96621059e65eec474169085dc92bf26e7b2d47366b70be2f67ab80dc25132 \
--hash=sha256:a6dfbb75e03252917f2473ea9653f7cd799c3064e54d4c8140044c5c065f53c3
# via
# -r requirements.in
# pytest-flake8-path
# via pytest-flake8-path
importlib-metadata==7.1.0 \
--hash=sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570 \
--hash=sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2
Expand Down Expand Up @@ -46,17 +40,14 @@ pytest==8.1.1 \
--hash=sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7 \
--hash=sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044
# via
# -r requirements.in
# pytest-flake8-path
# pytest-randomly
pytest-flake8-path==1.5.0 \
--hash=sha256:2c144a3127995d34e82df397350dbef7780c9920c5b7e9ebc81f63299011381e \
--hash=sha256:8766879344883e67762fc3f4f8f0d624a0d143de71f6488788599b3583e279a9
# via -r requirements.in
pytest-randomly==3.15.0 \
--hash=sha256:0516f4344b29f4e9cdae8bce31c4aeebf59d0b9ef05927c33354ff3859eeeca6 \
--hash=sha256:b908529648667ba5e54723088edd6f82252f540cc340d748d1fa985539687047
# via -r requirements.in
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
Expand Down