pex 2.54.2__py2.py3-none-any.whl → 2.69.0__py2.py3-none-any.whl
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.
Potentially problematic release.
This version of pex might be problematic. Click here for more details.
- pex/auth.py +1 -1
- pex/bin/pex.py +15 -2
- pex/build_backend/configuration.py +5 -5
- pex/build_backend/wrap.py +27 -23
- pex/build_system/pep_517.py +4 -1
- pex/cache/dirs.py +17 -12
- pex/cli/commands/lock.py +302 -165
- pex/cli/commands/pip/core.py +4 -12
- pex/cli/commands/pip/wheel.py +1 -1
- pex/cli/commands/run.py +13 -20
- pex/cli/commands/venv.py +85 -16
- pex/cli/pex.py +11 -4
- pex/common.py +57 -7
- pex/compatibility.py +1 -1
- pex/dependency_configuration.py +87 -15
- pex/dist_metadata.py +143 -25
- pex/docs/html/_pagefind/fragment/en_4250138.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_7125dad.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_785d562.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_8e94bb8.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_a0396bb.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_a8a3588.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_c07d988.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_d718411.pf_fragment +0 -0
- pex/docs/html/_pagefind/index/en_a2e3c5e.pf_index +0 -0
- pex/docs/html/_pagefind/pagefind-entry.json +1 -1
- pex/docs/html/_pagefind/pagefind.en_4ce1afa9e3.pf_meta +0 -0
- pex/docs/html/_static/documentation_options.js +1 -1
- pex/docs/html/_static/pygments.css +164 -146
- pex/docs/html/_static/styles/furo.css +1 -1
- pex/docs/html/_static/styles/furo.css.map +1 -1
- pex/docs/html/api/vars.html +25 -34
- pex/docs/html/buildingpex.html +25 -34
- pex/docs/html/genindex.html +24 -33
- pex/docs/html/index.html +25 -34
- pex/docs/html/recipes.html +25 -34
- pex/docs/html/scie.html +25 -34
- pex/docs/html/search.html +24 -33
- pex/docs/html/whatispex.html +25 -34
- pex/entry_points_txt.py +98 -0
- pex/environment.py +54 -33
- pex/finders.py +1 -1
- pex/hashing.py +71 -9
- pex/installed_wheel.py +141 -0
- pex/interpreter.py +41 -38
- pex/interpreter_constraints.py +25 -25
- pex/interpreter_implementation.py +40 -0
- pex/jobs.py +13 -6
- pex/pep_376.py +68 -384
- pex/pep_425.py +11 -2
- pex/pep_427.py +937 -205
- pex/pep_508.py +4 -5
- pex/pex_builder.py +5 -8
- pex/pex_info.py +14 -9
- pex/pip/dependencies/__init__.py +85 -13
- pex/pip/dependencies/requires.py +38 -3
- pex/pip/foreign_platform/__init__.py +4 -3
- pex/pip/installation.py +2 -2
- pex/pip/local_project.py +6 -14
- pex/pip/package_repositories/__init__.py +78 -0
- pex/pip/package_repositories/link_collector.py +96 -0
- pex/pip/tool.py +139 -33
- pex/pip/vcs.py +109 -43
- pex/pip/version.py +8 -1
- pex/requirements.py +121 -16
- pex/resolve/config.py +5 -1
- pex/resolve/configured_resolve.py +32 -10
- pex/resolve/configured_resolver.py +10 -39
- pex/resolve/downloads.py +4 -3
- pex/resolve/lock_downloader.py +16 -23
- pex/resolve/lock_resolver.py +41 -51
- pex/resolve/locked_resolve.py +89 -32
- pex/resolve/locker.py +145 -101
- pex/resolve/locker_patches.py +123 -197
- pex/resolve/lockfile/create.py +232 -87
- pex/resolve/lockfile/download_manager.py +5 -1
- pex/resolve/lockfile/json_codec.py +103 -28
- pex/resolve/lockfile/model.py +13 -35
- pex/resolve/lockfile/pep_751.py +117 -98
- pex/resolve/lockfile/requires_dist.py +17 -262
- pex/resolve/lockfile/subset.py +11 -0
- pex/resolve/lockfile/targets.py +445 -0
- pex/resolve/lockfile/updater.py +22 -10
- pex/resolve/package_repository.py +406 -0
- pex/resolve/pex_repository_resolver.py +1 -1
- pex/resolve/pre_resolved_resolver.py +19 -16
- pex/resolve/project.py +233 -47
- pex/resolve/requirement_configuration.py +28 -10
- pex/resolve/resolver_configuration.py +18 -32
- pex/resolve/resolver_options.py +234 -28
- pex/resolve/resolvers.py +3 -12
- pex/resolve/target_options.py +18 -2
- pex/resolve/target_system.py +908 -0
- pex/resolve/venv_resolver.py +670 -0
- pex/resolver.py +673 -209
- pex/scie/__init__.py +40 -1
- pex/scie/model.py +2 -0
- pex/scie/science.py +25 -3
- pex/sdist.py +219 -0
- pex/sh_boot.py +24 -21
- pex/sysconfig.py +5 -3
- pex/targets.py +31 -10
- pex/third_party/__init__.py +1 -1
- pex/tools/commands/repository.py +48 -25
- pex/vendor/__init__.py +4 -9
- pex/vendor/__main__.py +65 -41
- pex/vendor/_vendored/ansicolors/.layout.json +1 -1
- pex/vendor/_vendored/ansicolors/ansicolors-1.1.8.dist-info/RECORD +11 -0
- pex/vendor/_vendored/ansicolors/ansicolors-1.1.8.pex-info/original-whl-info.json +1 -0
- pex/vendor/_vendored/appdirs/.layout.json +1 -1
- pex/vendor/_vendored/appdirs/appdirs-1.4.4.dist-info/RECORD +7 -0
- pex/vendor/_vendored/appdirs/appdirs-1.4.4.pex-info/original-whl-info.json +1 -0
- pex/vendor/_vendored/attrs/.layout.json +1 -1
- pex/vendor/_vendored/attrs/attrs-21.5.0.dev0.dist-info/RECORD +37 -0
- pex/vendor/_vendored/attrs/attrs-21.5.0.dev0.pex-info/original-whl-info.json +1 -0
- pex/vendor/_vendored/packaging_20_9/.layout.json +1 -1
- pex/vendor/_vendored/packaging_20_9/packaging-20.9.dist-info/RECORD +20 -0
- pex/vendor/_vendored/packaging_20_9/packaging-20.9.pex-info/original-whl-info.json +1 -0
- pex/vendor/_vendored/packaging_20_9/pyparsing-2.4.7.dist-info/RECORD +7 -0
- pex/vendor/_vendored/packaging_20_9/pyparsing-2.4.7.pex-info/original-whl-info.json +1 -0
- pex/vendor/_vendored/packaging_21_3/.layout.json +1 -1
- pex/vendor/_vendored/packaging_21_3/packaging-21.3.dist-info/RECORD +20 -0
- pex/vendor/_vendored/packaging_21_3/packaging-21.3.pex-info/original-whl-info.json +1 -0
- pex/vendor/_vendored/packaging_21_3/pyparsing-3.0.7.dist-info/RECORD +18 -0
- pex/vendor/_vendored/packaging_21_3/pyparsing-3.0.7.pex-info/original-whl-info.json +1 -0
- pex/vendor/_vendored/packaging_24_0/.layout.json +1 -1
- pex/vendor/_vendored/packaging_24_0/packaging-24.0.dist-info/RECORD +22 -0
- pex/vendor/_vendored/packaging_24_0/packaging-24.0.pex-info/original-whl-info.json +1 -0
- pex/vendor/_vendored/packaging_25_0/.layout.json +1 -1
- pex/vendor/_vendored/packaging_25_0/packaging-25.0.dist-info/RECORD +24 -0
- pex/vendor/_vendored/packaging_25_0/packaging-25.0.pex-info/original-whl-info.json +1 -0
- pex/vendor/_vendored/pip/.layout.json +1 -1
- pex/vendor/_vendored/pip/pip/_vendor/certifi/cacert.pem +63 -1
- pex/vendor/_vendored/pip/pip-20.3.4.dist-info/RECORD +388 -0
- pex/vendor/_vendored/pip/pip-20.3.4.pex-info/original-whl-info.json +1 -0
- pex/vendor/_vendored/setuptools/.layout.json +1 -1
- pex/vendor/_vendored/setuptools/setuptools-44.0.0+3acb925dd708430aeaf197ea53ac8a752f7c1863.dist-info/RECORD +107 -0
- pex/vendor/_vendored/setuptools/setuptools-44.0.0+3acb925dd708430aeaf197ea53ac8a752f7c1863.pex-info/original-whl-info.json +1 -0
- pex/vendor/_vendored/toml/.layout.json +1 -1
- pex/vendor/_vendored/toml/toml-0.10.2.dist-info/RECORD +11 -0
- pex/vendor/_vendored/toml/toml-0.10.2.pex-info/original-whl-info.json +1 -0
- pex/vendor/_vendored/tomli/.layout.json +1 -1
- pex/vendor/_vendored/tomli/tomli-2.0.1.dist-info/RECORD +10 -0
- pex/vendor/_vendored/tomli/tomli-2.0.1.pex-info/original-whl-info.json +1 -0
- pex/venv/installer.py +46 -19
- pex/venv/venv_pex.py +6 -3
- pex/version.py +1 -1
- pex/wheel.py +188 -40
- pex/whl.py +67 -0
- pex/windows/__init__.py +14 -11
- {pex-2.54.2.dist-info → pex-2.69.0.dist-info}/METADATA +6 -5
- {pex-2.54.2.dist-info → pex-2.69.0.dist-info}/RECORD +157 -133
- {pex-2.54.2.dist-info → pex-2.69.0.dist-info}/entry_points.txt +1 -0
- {pex-2.54.2.dist-info → pex-2.69.0.dist-info}/pylock/pylock.toml +1 -1
- pex/docs/html/_pagefind/fragment/en_42c9d8c.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_45dd5a2.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_4ca74d2.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_77273d5.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_87a59c5.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_8dc89b5.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_9d1319b.pf_fragment +0 -0
- pex/docs/html/_pagefind/fragment/en_e55df9d.pf_fragment +0 -0
- pex/docs/html/_pagefind/index/en_1e98c6f.pf_index +0 -0
- pex/docs/html/_pagefind/pagefind.en_d1c488ecae.pf_meta +0 -0
- pex/vendor/_vendored/ansicolors/ansicolors-1.1.8.dist-info/INSTALLER +0 -1
- pex/vendor/_vendored/appdirs/appdirs-1.4.4.dist-info/INSTALLER +0 -1
- pex/vendor/_vendored/attrs/attrs-21.5.0.dev0.dist-info/INSTALLER +0 -1
- pex/vendor/_vendored/packaging_20_9/packaging-20.9.dist-info/INSTALLER +0 -1
- pex/vendor/_vendored/packaging_20_9/pyparsing-2.4.7.dist-info/INSTALLER +0 -1
- pex/vendor/_vendored/packaging_21_3/packaging-21.3.dist-info/INSTALLER +0 -1
- pex/vendor/_vendored/packaging_21_3/pyparsing-3.0.7.dist-info/INSTALLER +0 -1
- pex/vendor/_vendored/packaging_24_0/packaging-24.0.dist-info/INSTALLER +0 -1
- pex/vendor/_vendored/packaging_25_0/packaging-25.0.dist-info/INSTALLER +0 -1
- pex/vendor/_vendored/pip/pip-20.3.4.dist-info/INSTALLER +0 -1
- pex/vendor/_vendored/setuptools/setuptools-44.0.0+3acb925dd708430aeaf197ea53ac8a752f7c1863.dist-info/INSTALLER +0 -1
- pex/vendor/_vendored/toml/toml-0.10.2.dist-info/INSTALLER +0 -1
- pex/vendor/_vendored/tomli/tomli-2.0.1.dist-info/INSTALLER +0 -1
- {pex-2.54.2.dist-info → pex-2.69.0.dist-info}/WHEEL +0 -0
- {pex-2.54.2.dist-info → pex-2.69.0.dist-info}/licenses/LICENSE +0 -0
- {pex-2.54.2.dist-info → pex-2.69.0.dist-info}/top_level.txt +0 -0
pex/whl.py
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Copyright 2025 Pex project contributors.
|
|
2
|
+
# Licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
3
|
+
|
|
4
|
+
from __future__ import absolute_import
|
|
5
|
+
|
|
6
|
+
import hashlib
|
|
7
|
+
import os
|
|
8
|
+
|
|
9
|
+
from pex.atomic_directory import atomic_directory
|
|
10
|
+
from pex.cache.dirs import CacheDir
|
|
11
|
+
from pex.dist_metadata import Distribution
|
|
12
|
+
from pex.fingerprinted_distribution import FingerprintedDistribution
|
|
13
|
+
from pex.installed_wheel import InstalledWheel
|
|
14
|
+
from pex.pep_427 import repack
|
|
15
|
+
from pex.typing import TYPE_CHECKING
|
|
16
|
+
from pex.util import CacheHelper
|
|
17
|
+
|
|
18
|
+
if TYPE_CHECKING:
|
|
19
|
+
from typing import Optional, Union
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def repacked_whl(
|
|
23
|
+
installed_wheel, # type: Union[str, InstalledWheel]
|
|
24
|
+
fingerprint, # type: str
|
|
25
|
+
distribution_name=None, # type: Optional[str]
|
|
26
|
+
use_system_time=False, # type: bool
|
|
27
|
+
):
|
|
28
|
+
# type: (...) -> FingerprintedDistribution
|
|
29
|
+
|
|
30
|
+
installed_wheel = (
|
|
31
|
+
installed_wheel
|
|
32
|
+
if isinstance(installed_wheel, InstalledWheel)
|
|
33
|
+
else InstalledWheel.load(installed_wheel)
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
repack_dir = CacheDir.REPACKED_WHEELS.path(fingerprint)
|
|
37
|
+
with atomic_directory(target_dir=repack_dir) as atomic_dir:
|
|
38
|
+
if not atomic_dir.is_finalized():
|
|
39
|
+
whl = repack(
|
|
40
|
+
installed_wheel=installed_wheel,
|
|
41
|
+
dest_dir=atomic_dir.work_dir,
|
|
42
|
+
# N.B.: Some compressed tag set wheels in the wild have a wheel filename with tags
|
|
43
|
+
# in a different order from their WHEEL metadata; e.g.:
|
|
44
|
+
# cffi-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
|
|
45
|
+
# vs its WHEEL metadata:
|
|
46
|
+
# Wheel-Version: 1.0
|
|
47
|
+
# Generator: setuptools (80.9.0)
|
|
48
|
+
# Root-Is-Purelib: false
|
|
49
|
+
# Tag: cp310-cp310-manylinux_2_17_x86_64
|
|
50
|
+
# Tag: cp310-cp310-manylinux2014_x86_64
|
|
51
|
+
#
|
|
52
|
+
# This override allows higher levels to adjust for this.
|
|
53
|
+
override_wheel_file_name=distribution_name,
|
|
54
|
+
use_system_time=use_system_time,
|
|
55
|
+
)
|
|
56
|
+
with open(os.path.join(atomic_dir.work_dir, "FINGERPRINT"), "w") as fp:
|
|
57
|
+
fp.write(CacheHelper.hash(whl, hasher=hashlib.sha256))
|
|
58
|
+
|
|
59
|
+
with open(os.path.join(repack_dir, "FINGERPRINT")) as fp:
|
|
60
|
+
fingerprint = fp.read()
|
|
61
|
+
|
|
62
|
+
return FingerprintedDistribution(
|
|
63
|
+
distribution=Distribution.load(
|
|
64
|
+
os.path.join(repack_dir, distribution_name or installed_wheel.wheel_file_name())
|
|
65
|
+
),
|
|
66
|
+
fingerprint=fingerprint,
|
|
67
|
+
)
|
pex/windows/__init__.py
CHANGED
|
@@ -142,21 +142,24 @@ def create_script(
|
|
|
142
142
|
platform=SysPlatform.CURRENT, # type: SysPlatform.Value
|
|
143
143
|
gui=False, # type: bool
|
|
144
144
|
python_path=None, # type: Optional[Text]
|
|
145
|
+
overwrite=True, # type: bool
|
|
145
146
|
):
|
|
146
147
|
# type: (...) -> _Text
|
|
147
148
|
|
|
148
|
-
with safe_open("{path}.{unique}".format(path=path, unique=uuid.uuid4().hex), "wb") as fp:
|
|
149
|
-
fp.write(_load_stub(platform=platform, gui=gui).read_data())
|
|
150
|
-
with contextlib.closing(zipfile.ZipFile(fp, "a")) as zip_fp:
|
|
151
|
-
zip_fp.writestr("__main__.py", contents.encode("utf-8"), zipfile.ZIP_STORED)
|
|
152
|
-
python_path_bytes = platform.binary_name(
|
|
153
|
-
python_path or ("pythonw" if gui else "python")
|
|
154
|
-
).encode("utf-8")
|
|
155
|
-
fp.write(python_path_bytes)
|
|
156
|
-
fp.write(struct.pack("<I", len(python_path_bytes)))
|
|
157
|
-
fp.write(b"UVSC")
|
|
158
149
|
script = platform.binary_name(path)
|
|
159
|
-
|
|
150
|
+
if overwrite or not os.path.exists(script):
|
|
151
|
+
with safe_open("{path}.{unique}".format(path=path, unique=uuid.uuid4().hex), "wb") as fp:
|
|
152
|
+
fp.write(_load_stub(platform=platform, gui=gui).read_data())
|
|
153
|
+
with contextlib.closing(zipfile.ZipFile(fp, "a")) as zip_fp:
|
|
154
|
+
zip_fp.writestr("__main__.py", contents.encode("utf-8"), zipfile.ZIP_STORED)
|
|
155
|
+
python_path_bytes = platform.binary_name(
|
|
156
|
+
python_path or ("pythonw" if gui else "python")
|
|
157
|
+
).encode("utf-8")
|
|
158
|
+
fp.write(python_path_bytes)
|
|
159
|
+
fp.write(struct.pack("<I", len(python_path_bytes)))
|
|
160
|
+
fp.write(b"UVSC")
|
|
161
|
+
|
|
162
|
+
safe_rename(fp.name, script)
|
|
160
163
|
return script
|
|
161
164
|
|
|
162
165
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pex
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.69.0
|
|
4
4
|
Summary: The PEX packaging toolchain.
|
|
5
5
|
Home-page: https://github.com/pex-tool/pex
|
|
6
|
-
Download-URL: https://github.com/pex-tool/pex/releases/download/v2.
|
|
6
|
+
Download-URL: https://github.com/pex-tool/pex/releases/download/v2.69.0/pex
|
|
7
7
|
Author: The PEX developers
|
|
8
8
|
Author-email: developers@pex-tool.org
|
|
9
9
|
License-Expression: Apache-2.0
|
|
10
|
-
Project-URL: Changelog, https://github.com/pex-tool/pex/blob/v2.
|
|
10
|
+
Project-URL: Changelog, https://github.com/pex-tool/pex/blob/v2.69.0/CHANGES.md
|
|
11
11
|
Project-URL: Documentation, https://docs.pex-tool.org/
|
|
12
|
-
Project-URL: Source, https://github.com/pex-tool/pex/tree/v2.
|
|
12
|
+
Project-URL: Source, https://github.com/pex-tool/pex/tree/v2.69.0
|
|
13
13
|
Keywords: package,executable,virtualenv,lock,freeze
|
|
14
14
|
Classifier: Development Status :: 5 - Production/Stable
|
|
15
15
|
Classifier: Intended Audience :: Developers
|
|
@@ -30,13 +30,14 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
30
30
|
Classifier: Programming Language :: Python :: 3.12
|
|
31
31
|
Classifier: Programming Language :: Python :: 3.13
|
|
32
32
|
Classifier: Programming Language :: Python :: 3.14
|
|
33
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
33
34
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
34
35
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
35
36
|
Classifier: Topic :: Software Development :: Build Tools
|
|
36
37
|
Classifier: Topic :: System :: Archiving :: Packaging
|
|
37
38
|
Classifier: Topic :: System :: Software Distribution
|
|
38
39
|
Classifier: Topic :: Utilities
|
|
39
|
-
Requires-Python: !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<3.
|
|
40
|
+
Requires-Python: !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<3.16,>=2.7
|
|
40
41
|
Description-Content-Type: text/x-rst
|
|
41
42
|
License-File: LICENSE
|
|
42
43
|
Provides-Extra: subprocess
|