File: compile.py

package info (click to toggle)
python-whitenoise 6.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 472 kB
  • sloc: python: 2,040; makefile: 132; javascript: 10
file content (134 lines) | stat: -rwxr-xr-x 2,816 bytes parent folder | download
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/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, Django also depends on tzdata, which we aren’t pinning
        # "--generate-hashes",
        "--constraint",
        "-",
        "requirements.in",
        *sys.argv[1:],
    ]
    run = partial(subprocess.run, check=True)
    run(
        [
            *common_args,
            "--python",
            "3.9",
            "--output-file",
            "py39-django42.txt",
        ],
        input=b"Django>=4.2a1,<5.0",
    )
    run(
        [
            *common_args,
            "--python",
            "3.10",
            "--output-file",
            "py310-django42.txt",
        ],
        input=b"Django>=4.2a1,<5.0",
    )
    run(
        [
            *common_args,
            "--python",
            "3.10",
            "--output-file",
            "py310-django50.txt",
        ],
        input=b"Django>=5.0a1,<5.1",
    )
    run(
        [
            *common_args,
            "--python",
            "3.10",
            "--output-file",
            "py310-django51.txt",
        ],
        input=b"Django>=5.1a1,<5.2",
    )
    run(
        [
            *common_args,
            "--python",
            "3.11",
            "--output-file",
            "py311-django42.txt",
        ],
        input=b"Django>=4.2a1,<5.0",
    )
    run(
        [
            *common_args,
            "--python",
            "3.11",
            "--output-file",
            "py311-django50.txt",
        ],
        input=b"Django>=5.0a1,<5.1",
    )
    run(
        [
            *common_args,
            "--python",
            "3.11",
            "--output-file",
            "py311-django51.txt",
        ],
        input=b"Django>=5.1a1,<5.2",
    )
    run(
        [
            *common_args,
            "--python",
            "3.12",
            "--output-file",
            "py312-django42.txt",
        ],
        input=b"Django>=4.2a1,<5.0",
    )
    run(
        [
            *common_args,
            "--python",
            "3.12",
            "--output-file",
            "py312-django50.txt",
        ],
        input=b"Django>=5.0a1,<5.1",
    )
    run(
        [
            *common_args,
            "--python",
            "3.12",
            "--output-file",
            "py312-django51.txt",
        ],
        input=b"Django>=5.1a1,<5.2",
    )
    run(
        [
            *common_args,
            "--python",
            "3.13",
            "--output-file",
            "py313-django51.txt",
        ],
        input=b"Django>=5.1a1,<5.2",
    )