req-compile 1.2.0__tar.gz → 1.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {req_compile-1.2.0 → req_compile-1.3.0}/CHANGELOG.rst +16 -0
- {req_compile-1.2.0/req_compile.egg-info → req_compile-1.3.0}/PKG-INFO +30 -7
- {req_compile-1.2.0 → req_compile-1.3.0}/README.rst +13 -6
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/target.py +2 -6
- {req_compile-1.2.0 → req_compile-1.3.0/req_compile.egg-info}/PKG-INFO +30 -7
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_repositories.py +4 -2
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_target.py +3 -2
- {req_compile-1.2.0 → req_compile-1.3.0}/version.bzl +1 -1
- {req_compile-1.2.0 → req_compile-1.3.0}/LICENSE.txt +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/MANIFEST.in +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/pyproject.toml +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/__init__.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/__main__.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/candidates.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/cmdline.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/compile.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/config.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/containers.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/dists.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/errors.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/filename.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/metadata/__init__.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/metadata/dist_info.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/metadata/extractor.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/metadata/metadata.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/metadata/patch.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/metadata/pyproject.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/metadata/source.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/py.typed +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/repos/__init__.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/repos/findlinks.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/repos/multi.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/repos/pypi.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/repos/repository.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/repos/solution.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/repos/source.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/utils.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile/versions.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile.egg-info/SOURCES.txt +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile.egg-info/dependency_links.txt +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile.egg-info/entry_points.txt +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile.egg-info/requires.txt +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/req_compile.egg-info/top_level.txt +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/requirements.in +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/setup.cfg +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/setup.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_cmdline.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_compile.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_containers.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_cross_platform.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_dists.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_egg_info.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_extractor.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_filename.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_integration.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_merge_requirements.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_metadata.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_no_setup_py.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_solution_target.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_utils.py +0 -0
- {req_compile-1.2.0 → req_compile-1.3.0}/tests/test_versions.py +0 -0
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
New in version 1.2.0:
|
|
2
2
|
|
|
3
|
+
* ``requirements.parse`` now maps lock files to ids in ``requirements_locks`` and config settings to those
|
|
4
|
+
ids in the new ``config_settings`` attribute. Both are label keyed, so each is resolved by the module
|
|
5
|
+
defining the hub and any config setting visible to it can be used. ``//conditions:default`` names a
|
|
6
|
+
fallback lock. Without ``config_settings``, locks compiled with the ``platform`` attribute of
|
|
7
|
+
``py_reqs_compiler`` are selected by the platform read from the header of the file. Label strings as
|
|
8
|
+
``requirements_locks`` values still work but are deprecated.
|
|
9
|
+
* Every distinct wheel is downloaded once into a repository named ``{package}_{version}_{sha256[:8]}``
|
|
10
|
+
and shared by all hubs of all modules pinning it. Each hub keeps its own dependency edges, so extras
|
|
11
|
+
and version differences between hubs are preserved. Hub names must be unique across modules.
|
|
12
|
+
* ``package_annotation`` applies to the hubs of the module declaring it unless its new ``hubs``
|
|
13
|
+
attribute names particular hubs or ``"*"`` for every hub. Hubs annotated differently get their own
|
|
14
|
+
repository for the package.
|
|
15
|
+
* Hubs whose locks do not all contain the same packages are supported. A package missing from a lock
|
|
16
|
+
is incompatible with that lock's platform, so targets depending on it are skipped there.
|
|
17
|
+
* Removed the ``defs_id_map`` attribute of the ``parse`` tag and the WORKSPACE-only ``repositories()``
|
|
18
|
+
flow. ``py_requirements_repository`` is now only instantiated by the module extension.
|
|
3
19
|
* Cross-platform compilation. ``--platform``, ``--python-version`` and ``--implementation`` select
|
|
4
20
|
wheels and evaluate environment markers for an environment other than the one running ``req-compile``.
|
|
5
21
|
``--platform`` takes a wheel platform tag such as ``manylinux_2_28_x86_64`` or ``macosx_11_0_arm64``,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: req-compile
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: Python requirements compiler
|
|
5
5
|
Home-page: https://github.com/periareon/req-compile
|
|
6
6
|
Author: Spencer Putt
|
|
@@ -40,6 +40,22 @@ Dynamic: summary
|
|
|
40
40
|
|
|
41
41
|
New in version 1.2.0:
|
|
42
42
|
|
|
43
|
+
* ``requirements.parse`` now maps lock files to ids in ``requirements_locks`` and config settings to those
|
|
44
|
+
ids in the new ``config_settings`` attribute. Both are label keyed, so each is resolved by the module
|
|
45
|
+
defining the hub and any config setting visible to it can be used. ``//conditions:default`` names a
|
|
46
|
+
fallback lock. Without ``config_settings``, locks compiled with the ``platform`` attribute of
|
|
47
|
+
``py_reqs_compiler`` are selected by the platform read from the header of the file. Label strings as
|
|
48
|
+
``requirements_locks`` values still work but are deprecated.
|
|
49
|
+
* Every distinct wheel is downloaded once into a repository named ``{package}_{version}_{sha256[:8]}``
|
|
50
|
+
and shared by all hubs of all modules pinning it. Each hub keeps its own dependency edges, so extras
|
|
51
|
+
and version differences between hubs are preserved. Hub names must be unique across modules.
|
|
52
|
+
* ``package_annotation`` applies to the hubs of the module declaring it unless its new ``hubs``
|
|
53
|
+
attribute names particular hubs or ``"*"`` for every hub. Hubs annotated differently get their own
|
|
54
|
+
repository for the package.
|
|
55
|
+
* Hubs whose locks do not all contain the same packages are supported. A package missing from a lock
|
|
56
|
+
is incompatible with that lock's platform, so targets depending on it are skipped there.
|
|
57
|
+
* Removed the ``defs_id_map`` attribute of the ``parse`` tag and the WORKSPACE-only ``repositories()``
|
|
58
|
+
flow. ``py_requirements_repository`` is now only instantiated by the module extension.
|
|
43
59
|
* Cross-platform compilation. ``--platform``, ``--python-version`` and ``--implementation`` select
|
|
44
60
|
wheels and evaluate environment markers for an environment other than the one running ``req-compile``.
|
|
45
61
|
``--platform`` takes a wheel platform tag such as ``manylinux_2_28_x86_64`` or ``macosx_11_0_arm64``,
|
|
@@ -114,19 +130,26 @@ To get started with Bazel, add the following to your ``MODULE.bazel`` file:
|
|
|
114
130
|
# Find {version} on the req-compile GitHub releases page.
|
|
115
131
|
bazel_dep(name = "rules_req_compile", version = "{version}")
|
|
116
132
|
|
|
117
|
-
requirements = use_extension("//extensions:python.bzl", "requirements")
|
|
133
|
+
requirements = use_extension("@rules_req_compile//extensions:python.bzl", "requirements")
|
|
118
134
|
requirements.parse(
|
|
119
135
|
name = "my_pip_deps",
|
|
120
136
|
requirements_locks = {
|
|
121
|
-
"//3rdparty:requirements.
|
|
122
|
-
"//3rdparty:requirements.
|
|
123
|
-
"//3rdparty:requirements.
|
|
137
|
+
"//3rdparty:requirements.linux_x86_64.txt": "linux_x86_64",
|
|
138
|
+
"//3rdparty:requirements.macos_aarch64.txt": "macos_aarch64",
|
|
139
|
+
"//3rdparty:requirements.windows_x86_64.txt": "windows_x86_64",
|
|
124
140
|
},
|
|
125
141
|
)
|
|
126
142
|
use_repo(requirements, "my_pip_deps")
|
|
127
143
|
|
|
128
|
-
|
|
129
|
-
``py_reqs_compiler
|
|
144
|
+
Each lock is the solution for one platform and is given an id. Locks compiled with the ``platform``
|
|
145
|
+
attribute of ``py_reqs_compiler`` record their platform, which is used to select them. To decide
|
|
146
|
+
yourself, map your own ``config_setting`` labels to the lock ids with ``config_settings``. The solutions
|
|
147
|
+
for every platform can be compiled from a single machine.
|
|
148
|
+
|
|
149
|
+
Every wheel is downloaded once and shared by all the hubs of all the modules pinning it, while each hub
|
|
150
|
+
keeps the dependencies it resolved. Packages missing from the lock of a platform make the targets using
|
|
151
|
+
them incompatible with that platform instead of failing the build.
|
|
152
|
+
See the `Bazel rules documentation <docs/docs.md>`_ for details.
|
|
130
153
|
|
|
131
154
|
|
|
132
155
|
Why use it?
|
|
@@ -36,19 +36,26 @@ To get started with Bazel, add the following to your ``MODULE.bazel`` file:
|
|
|
36
36
|
# Find {version} on the req-compile GitHub releases page.
|
|
37
37
|
bazel_dep(name = "rules_req_compile", version = "{version}")
|
|
38
38
|
|
|
39
|
-
requirements = use_extension("//extensions:python.bzl", "requirements")
|
|
39
|
+
requirements = use_extension("@rules_req_compile//extensions:python.bzl", "requirements")
|
|
40
40
|
requirements.parse(
|
|
41
41
|
name = "my_pip_deps",
|
|
42
42
|
requirements_locks = {
|
|
43
|
-
"//3rdparty:requirements.
|
|
44
|
-
"//3rdparty:requirements.
|
|
45
|
-
"//3rdparty:requirements.
|
|
43
|
+
"//3rdparty:requirements.linux_x86_64.txt": "linux_x86_64",
|
|
44
|
+
"//3rdparty:requirements.macos_aarch64.txt": "macos_aarch64",
|
|
45
|
+
"//3rdparty:requirements.windows_x86_64.txt": "windows_x86_64",
|
|
46
46
|
},
|
|
47
47
|
)
|
|
48
48
|
use_repo(requirements, "my_pip_deps")
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
``py_reqs_compiler
|
|
50
|
+
Each lock is the solution for one platform and is given an id. Locks compiled with the ``platform``
|
|
51
|
+
attribute of ``py_reqs_compiler`` record their platform, which is used to select them. To decide
|
|
52
|
+
yourself, map your own ``config_setting`` labels to the lock ids with ``config_settings``. The solutions
|
|
53
|
+
for every platform can be compiled from a single machine.
|
|
54
|
+
|
|
55
|
+
Every wheel is downloaded once and shared by all the hubs of all the modules pinning it, while each hub
|
|
56
|
+
keeps the dependencies it resolved. Packages missing from the lock of a platform make the targets using
|
|
57
|
+
them incompatible with that platform instead of failing the build.
|
|
58
|
+
See the `Bazel rules documentation <docs/docs.md>`_ for details.
|
|
52
59
|
|
|
53
60
|
|
|
54
61
|
Why use it?
|
|
@@ -90,14 +90,10 @@ def _mac_platform_tags(
|
|
|
90
90
|
arch = plat_arch
|
|
91
91
|
key = (major, minor)
|
|
92
92
|
|
|
93
|
-
#
|
|
93
|
+
# packaging already yields x86_64 and intel for an x86_64 target.
|
|
94
|
+
# Never add them for arm64: a native arm64 interpreter cannot load them.
|
|
94
95
|
mac_platforms[key].add(plat)
|
|
95
96
|
|
|
96
|
-
if major == 10 and plat_arch == "universal2":
|
|
97
|
-
mac_platforms[key].add(plat.replace(plat_arch, "x86_64"))
|
|
98
|
-
if int(minor) <= 10:
|
|
99
|
-
mac_platforms[key].add(plat.replace(plat_arch, "intel"))
|
|
100
|
-
|
|
101
97
|
def _rank(plat: str) -> Tuple[int, str]:
|
|
102
98
|
# Within a release, prefer wheels built for exactly this architecture,
|
|
103
99
|
# then universal wheels, then anything else.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: req-compile
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: Python requirements compiler
|
|
5
5
|
Home-page: https://github.com/periareon/req-compile
|
|
6
6
|
Author: Spencer Putt
|
|
@@ -40,6 +40,22 @@ Dynamic: summary
|
|
|
40
40
|
|
|
41
41
|
New in version 1.2.0:
|
|
42
42
|
|
|
43
|
+
* ``requirements.parse`` now maps lock files to ids in ``requirements_locks`` and config settings to those
|
|
44
|
+
ids in the new ``config_settings`` attribute. Both are label keyed, so each is resolved by the module
|
|
45
|
+
defining the hub and any config setting visible to it can be used. ``//conditions:default`` names a
|
|
46
|
+
fallback lock. Without ``config_settings``, locks compiled with the ``platform`` attribute of
|
|
47
|
+
``py_reqs_compiler`` are selected by the platform read from the header of the file. Label strings as
|
|
48
|
+
``requirements_locks`` values still work but are deprecated.
|
|
49
|
+
* Every distinct wheel is downloaded once into a repository named ``{package}_{version}_{sha256[:8]}``
|
|
50
|
+
and shared by all hubs of all modules pinning it. Each hub keeps its own dependency edges, so extras
|
|
51
|
+
and version differences between hubs are preserved. Hub names must be unique across modules.
|
|
52
|
+
* ``package_annotation`` applies to the hubs of the module declaring it unless its new ``hubs``
|
|
53
|
+
attribute names particular hubs or ``"*"`` for every hub. Hubs annotated differently get their own
|
|
54
|
+
repository for the package.
|
|
55
|
+
* Hubs whose locks do not all contain the same packages are supported. A package missing from a lock
|
|
56
|
+
is incompatible with that lock's platform, so targets depending on it are skipped there.
|
|
57
|
+
* Removed the ``defs_id_map`` attribute of the ``parse`` tag and the WORKSPACE-only ``repositories()``
|
|
58
|
+
flow. ``py_requirements_repository`` is now only instantiated by the module extension.
|
|
43
59
|
* Cross-platform compilation. ``--platform``, ``--python-version`` and ``--implementation`` select
|
|
44
60
|
wheels and evaluate environment markers for an environment other than the one running ``req-compile``.
|
|
45
61
|
``--platform`` takes a wheel platform tag such as ``manylinux_2_28_x86_64`` or ``macosx_11_0_arm64``,
|
|
@@ -114,19 +130,26 @@ To get started with Bazel, add the following to your ``MODULE.bazel`` file:
|
|
|
114
130
|
# Find {version} on the req-compile GitHub releases page.
|
|
115
131
|
bazel_dep(name = "rules_req_compile", version = "{version}")
|
|
116
132
|
|
|
117
|
-
requirements = use_extension("//extensions:python.bzl", "requirements")
|
|
133
|
+
requirements = use_extension("@rules_req_compile//extensions:python.bzl", "requirements")
|
|
118
134
|
requirements.parse(
|
|
119
135
|
name = "my_pip_deps",
|
|
120
136
|
requirements_locks = {
|
|
121
|
-
"//3rdparty:requirements.
|
|
122
|
-
"//3rdparty:requirements.
|
|
123
|
-
"//3rdparty:requirements.
|
|
137
|
+
"//3rdparty:requirements.linux_x86_64.txt": "linux_x86_64",
|
|
138
|
+
"//3rdparty:requirements.macos_aarch64.txt": "macos_aarch64",
|
|
139
|
+
"//3rdparty:requirements.windows_x86_64.txt": "windows_x86_64",
|
|
124
140
|
},
|
|
125
141
|
)
|
|
126
142
|
use_repo(requirements, "my_pip_deps")
|
|
127
143
|
|
|
128
|
-
|
|
129
|
-
``py_reqs_compiler
|
|
144
|
+
Each lock is the solution for one platform and is given an id. Locks compiled with the ``platform``
|
|
145
|
+
attribute of ``py_reqs_compiler`` record their platform, which is used to select them. To decide
|
|
146
|
+
yourself, map your own ``config_setting`` labels to the lock ids with ``config_settings``. The solutions
|
|
147
|
+
for every platform can be compiled from a single machine.
|
|
148
|
+
|
|
149
|
+
Every wheel is downloaded once and shared by all the hubs of all the modules pinning it, while each hub
|
|
150
|
+
keeps the dependencies it resolved. Packages missing from the lock of a platform make the targets using
|
|
151
|
+
them incompatible with that platform instead of failing the build.
|
|
152
|
+
See the `Bazel rules documentation <docs/docs.md>`_ for details.
|
|
130
153
|
|
|
131
154
|
|
|
132
155
|
Why use it?
|
|
@@ -2,6 +2,7 @@ import random
|
|
|
2
2
|
import sys
|
|
3
3
|
|
|
4
4
|
import pytest
|
|
5
|
+
from req_compile.target import TargetEnvironment
|
|
5
6
|
from req_compile.utils import parse_version
|
|
6
7
|
|
|
7
8
|
from req_compile.repos.repository import (
|
|
@@ -165,8 +166,9 @@ def test_sort_macos():
|
|
|
165
166
|
["macosx_10_9_x86_64"],
|
|
166
167
|
None,
|
|
167
168
|
)
|
|
168
|
-
|
|
169
|
-
assert
|
|
169
|
+
target = TargetEnvironment.from_spec("macosx_10_15_x86_64", "3.7")
|
|
170
|
+
assert candidate1.sort_key(target) > candidate2.sort_key(target)
|
|
171
|
+
assert candidate2.sort_key(target) > candidate3.sort_key(target)
|
|
170
172
|
|
|
171
173
|
|
|
172
174
|
@pytest.mark.parametrize(
|
|
@@ -273,8 +273,9 @@ WINDOWS = TargetEnvironment.from_spec("win_amd64", "3.11")
|
|
|
273
273
|
("cp311-cp311-musllinux_1_2_x86_64", []),
|
|
274
274
|
("cp311-cp311-macosx_11_0_arm64", [MACOS]),
|
|
275
275
|
("cp311-cp311-macosx_10_9_universal2", [MACOS, MACOS_INTEL]),
|
|
276
|
-
("cp311-cp311-macosx_10_9_x86_64", [
|
|
277
|
-
("cp311-cp311-
|
|
276
|
+
("cp311-cp311-macosx_10_9_x86_64", [MACOS_INTEL]),
|
|
277
|
+
("cp311-cp311-macosx_10_9_intel", [MACOS_INTEL]),
|
|
278
|
+
("cp311-cp311-macosx_10_15_x86_64", [MACOS_INTEL]),
|
|
278
279
|
("cp311-cp311-macosx_12_0_arm64", []),
|
|
279
280
|
("cp311-cp311-win_amd64", [WINDOWS]),
|
|
280
281
|
("cp311-cp311-win32", []),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|