File: compile.py

package info (click to toggle)
python-blacken-docs 1.19.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 264 kB
  • sloc: python: 900; sh: 17; makefile: 6
file content (26 lines) | stat: -rwxr-xr-x 802 bytes parent folder | download | duplicates (3)
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
#!/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",
        "--generate-hashes",
        "requirements.in",
        *sys.argv[1:],
    ]
    run = partial(subprocess.run, check=True)
    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"])