-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathcompile.py
executable file
·28 lines (26 loc) · 957 Bytes
/
compile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python
from __future__ import annotations
import os
import subprocess
import sys
from functools import partial
from pathlib import Path
if __name__ == "__main__":
os.chdir(Path(__file__).parent)
common_args = [
"uv",
"pip",
"compile",
"--quiet",
# On Windows, pytest also depends on colorama, which we aren’t pinning
# "--generate-hashes",
"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"])
run([*common_args, "--python", "3.13", "--output-file", "py313.txt"])