portable-python 1.9.1__tar.gz → 1.9.3__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.
- {portable-python-1.9.1/src/portable_python.egg-info → portable_python-1.9.3}/PKG-INFO +2 -2
- {portable-python-1.9.1 → portable_python-1.9.3}/pyproject.toml +3 -5
- {portable-python-1.9.1 → portable_python-1.9.3}/requirements.txt +1 -1
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python/__init__.py +13 -1
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python/external/xcpython.py +2 -2
- {portable-python-1.9.1 → portable_python-1.9.3/src/portable_python.egg-info}/PKG-INFO +2 -2
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python.egg-info/requires.txt +1 -1
- {portable-python-1.9.1 → portable_python-1.9.3}/tests/test_build.py +19 -19
- {portable-python-1.9.1 → portable_python-1.9.3}/DEVELOP.md +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/LICENSE +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/MANIFEST.in +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/README.rst +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/SECURITY.md +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/setup.cfg +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/setup.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python/__main__.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python/cli.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python/config.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python/cpython.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python/external/__init__.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python/external/_inspect.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python/external/tkinter.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python/inspector.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python/tracking.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python/versions.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python.egg-info/SOURCES.txt +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python.egg-info/dependency_links.txt +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python.egg-info/entry_points.txt +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python.egg-info/top_level.txt +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/tests/test_cleanup.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/tests/test_failed.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/tests/test_inspector.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/tests/test_invoker.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/tests/test_list.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/tests/test_prefix.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/tests/test_recompress.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/tests/test_report.py +0 -0
- {portable-python-1.9.1 → portable_python-1.9.3}/tests/test_setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: portable-python
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.3
|
|
4
4
|
Summary: Portable python binaries
|
|
5
5
|
Home-page: https://github.com/codrsquad/portable-python
|
|
6
6
|
Author: Zoran Simic
|
|
@@ -36,7 +36,7 @@ License-File: LICENSE
|
|
|
36
36
|
Requires-Dist: click~=8.0
|
|
37
37
|
Requires-Dist: pyyaml~=6.0
|
|
38
38
|
Requires-Dist: requests<3.0
|
|
39
|
-
Requires-Dist: runez~=5.0
|
|
39
|
+
Requires-Dist: runez~=5.0
|
|
40
40
|
Requires-Dist: urllib3~=1.26
|
|
41
41
|
|
|
42
42
|
Portable python binaries
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools", "
|
|
2
|
+
requires = ["setuptools", "setupmeta"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
3
4
|
|
|
4
5
|
[tool.ruff]
|
|
5
6
|
cache-dir = ".tox/.ruff_cache"
|
|
@@ -58,9 +59,6 @@ ignore = [
|
|
|
58
59
|
"RET503", # Missing explicit `return` at the end of function able to return non-`None` value
|
|
59
60
|
]
|
|
60
61
|
|
|
61
|
-
[tool.ruff.lint.flake8-builtins]
|
|
62
|
-
builtins-ignorelist = ["bin", "compile"]
|
|
63
|
-
|
|
64
62
|
[tool.ruff.lint.isort]
|
|
65
63
|
order-by-type = false
|
|
66
64
|
|
|
@@ -70,7 +68,7 @@ max-complexity = 14
|
|
|
70
68
|
[tool.ruff.lint.pydocstyle]
|
|
71
69
|
convention = "numpy"
|
|
72
70
|
|
|
73
|
-
[tool.ruff.per-file-ignores]
|
|
71
|
+
[tool.ruff.lint.per-file-ignores]
|
|
74
72
|
"tests/*" = [
|
|
75
73
|
"S", # No security checks for tests
|
|
76
74
|
]
|
|
@@ -526,10 +526,15 @@ class ModuleBuilder:
|
|
|
526
526
|
|
|
527
527
|
def xenv_PATH(self):
|
|
528
528
|
yield f"{self.deps}/bin"
|
|
529
|
+
yield from os.environ.get("PATH", "").split(":")
|
|
529
530
|
yield "/usr/bin"
|
|
530
531
|
yield "/bin"
|
|
531
532
|
|
|
533
|
+
def xenv_LD_LIBRARY_PATH(self):
|
|
534
|
+
yield from os.environ.get("LD_LIBRARY_PATH", "").split(":")
|
|
535
|
+
|
|
532
536
|
def xenv_PKG_CONFIG_PATH(self):
|
|
537
|
+
yield from os.environ.get("PKG_CONFIG_PATH", "").split(":")
|
|
533
538
|
if self.modules.selected:
|
|
534
539
|
yield f"{self.deps_lib}/pkgconfig"
|
|
535
540
|
|
|
@@ -605,7 +610,14 @@ class ModuleBuilder:
|
|
|
605
610
|
basename = runez.basename(self.url, extension_marker="#")
|
|
606
611
|
path = self.setup.folders.sources / basename
|
|
607
612
|
if not path.exists():
|
|
608
|
-
|
|
613
|
+
proxies = {}
|
|
614
|
+
http_proxy = os.environ.get("HTTP_PROXY") or os.environ.get("http_proxy")
|
|
615
|
+
if http_proxy:
|
|
616
|
+
proxies["http"] = http_proxy
|
|
617
|
+
https_proxy = os.environ.get("HTTPS_PROXY") or os.environ.get("https_proxy")
|
|
618
|
+
if https_proxy:
|
|
619
|
+
proxies["https"] = https_proxy
|
|
620
|
+
RestClient().download(self.url, path, proxies=proxies)
|
|
609
621
|
|
|
610
622
|
runez.decompress(path, self.m_src_build, simplify=True)
|
|
611
623
|
|
|
@@ -143,13 +143,13 @@ class Openssl(ModuleBuilder):
|
|
|
143
143
|
|
|
144
144
|
@property
|
|
145
145
|
def url(self):
|
|
146
|
-
return f"https://
|
|
146
|
+
return f"https://github.com/openssl/openssl/releases/download/openssl-{self.version}/openssl-{self.version}.tar.gz"
|
|
147
147
|
|
|
148
148
|
@property
|
|
149
149
|
def version(self):
|
|
150
150
|
# See https://endoflife.date/openssl
|
|
151
151
|
# This default here picks the most conservative longest supported version
|
|
152
|
-
return self.cfg_version("3.0.
|
|
152
|
+
return self.cfg_version("3.0.15")
|
|
153
153
|
|
|
154
154
|
def c_configure_args(self):
|
|
155
155
|
yield "--openssldir=/etc/ssl"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: portable-python
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.3
|
|
4
4
|
Summary: Portable python binaries
|
|
5
5
|
Home-page: https://github.com/codrsquad/portable-python
|
|
6
6
|
Author: Zoran Simic
|
|
@@ -36,7 +36,7 @@ License-File: LICENSE
|
|
|
36
36
|
Requires-Dist: click~=8.0
|
|
37
37
|
Requires-Dist: pyyaml~=6.0
|
|
38
38
|
Requires-Dist: requests<3.0
|
|
39
|
-
Requires-Dist: runez~=5.0
|
|
39
|
+
Requires-Dist: runez~=5.0
|
|
40
40
|
Requires-Dist: urllib3~=1.26
|
|
41
41
|
|
|
42
42
|
Portable python binaries
|
|
@@ -39,24 +39,24 @@ error = Global pip installations are not allowed
|
|
|
39
39
|
"""
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
def _setup_exes(
|
|
43
|
-
runez.ensure_folder(
|
|
44
|
-
runez.touch(
|
|
45
|
-
runez.touch(
|
|
46
|
-
runez.symlink(
|
|
47
|
-
runez.write(
|
|
48
|
-
runez.write(
|
|
49
|
-
runez.write(
|
|
50
|
-
runez.make_executable(
|
|
51
|
-
runez.make_executable(
|
|
52
|
-
runez.make_executable(
|
|
42
|
+
def _setup_exes(bin_folder):
|
|
43
|
+
runez.ensure_folder(bin_folder, clean=True, logger=None)
|
|
44
|
+
runez.touch(bin_folder / "foo-python", logger=None)
|
|
45
|
+
runez.touch(bin_folder / "pip3.9", logger=None)
|
|
46
|
+
runez.symlink(bin_folder / "foo-python", bin_folder / "python3", logger=None) # Simulate a funky symlink, to test edge cases
|
|
47
|
+
runez.write(bin_folder / "some-exe", "#!.../bin/python3\nhello", logger=None)
|
|
48
|
+
runez.write(bin_folder / "some-exe2", "#!/bin/sh\nhello", logger=None)
|
|
49
|
+
runez.write(bin_folder / "some-exe3", b"\xe4", logger=None) # Non-unicode char to trigger edge case
|
|
50
|
+
runez.make_executable(bin_folder / "some-exe", logger=None)
|
|
51
|
+
runez.make_executable(bin_folder / "some-exe2", logger=None)
|
|
52
|
+
runez.make_executable(bin_folder / "some-exe3", logger=None)
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
def test_finalization(cli, monkeypatch):
|
|
56
56
|
f = PPG.get_folders(version="3.9.7")
|
|
57
57
|
dummy_tarball(f, f"Python-{f.version}.tar.xz")
|
|
58
58
|
dummy_tarball(f, "bzip2-1.0.8.tar.gz")
|
|
59
|
-
|
|
59
|
+
bin_folder = f.resolved_destdir("bin")
|
|
60
60
|
lib = f.resolved_destdir(f"lib/python{f.mm}")
|
|
61
61
|
sys_cfg = lib / "_sysconfigdata__.py"
|
|
62
62
|
|
|
@@ -67,7 +67,7 @@ def test_finalization(cli, monkeypatch):
|
|
|
67
67
|
runez.touch(lib.parent / "idle_test/foo", logger=None)
|
|
68
68
|
runez.touch(lib.parent / "__phello__.foo.py", logger=None)
|
|
69
69
|
runez.touch(lib / "site-packages/pip", logger=None)
|
|
70
|
-
_setup_exes(
|
|
70
|
+
_setup_exes(bin_folder)
|
|
71
71
|
runez.touch(lib / "config-3.9/libpython3.9.a", logger=None)
|
|
72
72
|
|
|
73
73
|
monkeypatch.setenv("PP_X_DEBUG", "direct-finalize")
|
|
@@ -80,18 +80,18 @@ def test_finalization(cli, monkeypatch):
|
|
|
80
80
|
assert "selected: bzip2" in cli.logged
|
|
81
81
|
assert "Pass 1: Cleaned 1 build artifact (0 B): idle_test" in cli.logged
|
|
82
82
|
assert f"PEP 668: Cleaned 2 build artifacts (0 B): pip pip{f.mm}" in cli.logged
|
|
83
|
-
assert f"Symlink {
|
|
84
|
-
assert f"Symlink {
|
|
85
|
-
assert f"Auto-corrected shebang for {
|
|
83
|
+
assert f"Symlink {bin_folder}/foo-python <- {bin_folder}/python" in cli.logged
|
|
84
|
+
assert f"Symlink {bin_folder}/pip{f.mm} <- {bin_folder}/pip" in cli.logged
|
|
85
|
+
assert f"Auto-corrected shebang for {bin_folder}/some-exe" in cli.logged
|
|
86
86
|
assert f"Symlink {lib}/config-3.9/libpython3.9.a <- {lib.parent}/libpython3.9.a" in cli.logged
|
|
87
87
|
|
|
88
88
|
transformed = "\n".join(runez.readlines(sys_cfg))
|
|
89
89
|
assert transformed.strip() == SAMPLE_SYS_CONF_REL.strip()
|
|
90
90
|
|
|
91
91
|
expected = ["#!/bin/sh", '"exec" "$(dirname $0)/foo-python" "$0" "$@"', "# -*- coding: utf-8 -*-", "hello"]
|
|
92
|
-
assert list(runez.readlines(
|
|
93
|
-
assert list(runez.readlines(
|
|
94
|
-
assert runez.basename(
|
|
92
|
+
assert list(runez.readlines(bin_folder / "some-exe")) == expected
|
|
93
|
+
assert list(runez.readlines(bin_folder / "some-exe2")) == ["#!/bin/sh", "hello"]
|
|
94
|
+
assert runez.basename(bin_folder / "python", follow=True) == "foo-python"
|
|
95
95
|
|
|
96
96
|
assert (lib / "EXTERNALLY-MANAGED").read_text().strip() == EXPECTED_EXTERNALLY_MANAGED.strip()
|
|
97
97
|
|
|
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
|
{portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{portable-python-1.9.1 → portable_python-1.9.3}/src/portable_python.egg-info/entry_points.txt
RENAMED
|
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
|