portable-python 1.8.0__tar.gz → 1.8.2__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.8.0/src/portable_python.egg-info → portable-python-1.8.2}/PKG-INFO +1 -1
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python/__init__.py +6 -1
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python/config.py +1 -2
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python/cpython.py +14 -25
- {portable-python-1.8.0 → portable-python-1.8.2/src/portable_python.egg-info}/PKG-INFO +1 -1
- {portable-python-1.8.0 → portable-python-1.8.2}/tests/test_build.py +1 -1
- {portable-python-1.8.0 → portable-python-1.8.2}/tests/test_failed.py +7 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/DEVELOP.md +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/LICENSE +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/MANIFEST.in +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/README.rst +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/SECURITY.md +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/pyproject.toml +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/requirements.txt +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/setup.cfg +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/setup.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python/__main__.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python/cli.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python/external/__init__.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python/external/_inspect.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python/external/tkinter.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python/external/xcpython.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python/inspector.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python/tracking.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python/versions.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python.egg-info/SOURCES.txt +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python.egg-info/dependency_links.txt +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python.egg-info/entry_points.txt +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python.egg-info/requires.txt +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python.egg-info/top_level.txt +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/tests/test_cleanup.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/tests/test_inspector.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/tests/test_invoker.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/tests/test_list.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/tests/test_prefix.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/tests/test_recompress.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/tests/test_report.py +0 -0
- {portable-python-1.8.0 → portable-python-1.8.2}/tests/test_setup.py +0 -0
|
@@ -520,7 +520,8 @@ class ModuleBuilder:
|
|
|
520
520
|
yield f"{self.deps_lib}/pkgconfig"
|
|
521
521
|
|
|
522
522
|
def _do_run(self, program, *args, fatal=True, env=None):
|
|
523
|
-
|
|
523
|
+
logger = self._log_handler
|
|
524
|
+
return runez.run(program, *args, passthrough=logger, stdout=None, stderr=None, fatal=fatal, env=env, logger=logger or runez.UNSET)
|
|
524
525
|
|
|
525
526
|
def run_configure(self, program, *args, prefix=None):
|
|
526
527
|
"""
|
|
@@ -562,6 +563,10 @@ class ModuleBuilder:
|
|
|
562
563
|
|
|
563
564
|
yield
|
|
564
565
|
|
|
566
|
+
except Exception as e:
|
|
567
|
+
LOG.error("Error while compiling %r: %r", self, e)
|
|
568
|
+
raise
|
|
569
|
+
|
|
565
570
|
finally:
|
|
566
571
|
if self._log_handler:
|
|
567
572
|
logging.root.removeHandler(self._log_handler)
|
|
@@ -29,14 +29,13 @@ ext: gz
|
|
|
29
29
|
|
|
30
30
|
# Pre -mcompileall, cleanup tests and useless files (~94 MB)
|
|
31
31
|
cpython-clean-1st-pass:
|
|
32
|
-
- __phello__.foo.py
|
|
33
32
|
- __pycache__/
|
|
34
33
|
- _test*capi.*
|
|
35
34
|
- idle_test/
|
|
36
35
|
- test/
|
|
37
36
|
- tests/
|
|
38
37
|
# By default, simplify bin/ folder
|
|
39
|
-
- bin/2to3* bin/easy_install* bin/idle3*
|
|
38
|
+
- bin/2to3* bin/easy_install* bin/idle3*
|
|
40
39
|
|
|
41
40
|
# wininst-* is probably an old goof (~2 MB of .exe binaries)
|
|
42
41
|
cpython-clean-1st-pass-linux: wininst-*
|
|
@@ -135,17 +135,6 @@ class Cpython(PythonBuilder):
|
|
|
135
135
|
self.run_make(*make_args)
|
|
136
136
|
self.run_make("install", f"DESTDIR={self.destdir}")
|
|
137
137
|
|
|
138
|
-
def _pip_upgrade(self, *lib_names):
|
|
139
|
-
for lib_name in runez.flattened(lib_names, split=True, unique=True):
|
|
140
|
-
do_install = True
|
|
141
|
-
if lib_name.startswith("?"):
|
|
142
|
-
lib_name = lib_name[1:]
|
|
143
|
-
path = self.install_folder / f"lib/python{self.version.mm}/site-packages/{lib_name}"
|
|
144
|
-
do_install = path.exists()
|
|
145
|
-
|
|
146
|
-
if do_install:
|
|
147
|
-
self.run_python("-mpip", "install", "-U", lib_name)
|
|
148
|
-
|
|
149
138
|
def _finalize(self):
|
|
150
139
|
is_shared = self.setup.prefix or self.has_configure_opt("--enable-shared", "yes")
|
|
151
140
|
if is_shared:
|
|
@@ -153,15 +142,6 @@ class Cpython(PythonBuilder):
|
|
|
153
142
|
lib_auto_correct.run()
|
|
154
143
|
|
|
155
144
|
runez.abort_if(not runez.DRYRUN and not self.bin_python, f"Can't find bin/python in {self.bin_folder}")
|
|
156
|
-
if "--with-ensurepip=no" not in self.c_configure_args_from_config:
|
|
157
|
-
# Ensure that `pip` is indeed installed and up-to-date
|
|
158
|
-
cmd = ["-mensurepip"]
|
|
159
|
-
if "--with-ensurepip=install" not in self.c_configure_args_from_config:
|
|
160
|
-
cmd.append("--upgrade")
|
|
161
|
-
|
|
162
|
-
self.run_python(cmd)
|
|
163
|
-
|
|
164
|
-
self._pip_upgrade("?pip", "?setuptools", PPG.config.get_value("cpython-pip-install"))
|
|
165
145
|
PPG.config.ensure_main_file_symlinks(self)
|
|
166
146
|
if not self.setup.prefix:
|
|
167
147
|
# See https://manpages.debian.org/stretch/pkg-config/pkg-config.1.en.html#PKG-CONFIG_DERIVED_VARIABLES
|
|
@@ -182,10 +162,6 @@ class Cpython(PythonBuilder):
|
|
|
182
162
|
|
|
183
163
|
PPG.config.cleanup_folder(self, "cpython-clean-1st-pass")
|
|
184
164
|
PPG.config.symlink_duplicates(self.install_folder)
|
|
185
|
-
py_inspector = PythonInspector(self.install_folder)
|
|
186
|
-
print(py_inspector.represented())
|
|
187
|
-
problem = py_inspector.full_so_report.get_problem(portable=not is_shared)
|
|
188
|
-
runez.abort_if(problem and self.setup.x_debug != "direct-finalize", "Build failed: %s" % problem)
|
|
189
165
|
validation_script = PPG.config.resolved_path("cpython-validate-script")
|
|
190
166
|
if validation_script:
|
|
191
167
|
LOG.info("Exercising configured validation script: %s" % runez.short(validation_script))
|
|
@@ -193,6 +169,14 @@ class Cpython(PythonBuilder):
|
|
|
193
169
|
|
|
194
170
|
additional = PPG.config.get_value("cpython-additional-packages")
|
|
195
171
|
if additional:
|
|
172
|
+
# Config wants additional packages installed, ensure that `pip` is installed first
|
|
173
|
+
if "--with-ensurepip=no" not in self.c_configure_args_from_config:
|
|
174
|
+
cmd = ["-mensurepip"]
|
|
175
|
+
if "--with-ensurepip=install" not in self.c_configure_args_from_config:
|
|
176
|
+
cmd.append("--upgrade")
|
|
177
|
+
|
|
178
|
+
self.run_python(cmd)
|
|
179
|
+
|
|
196
180
|
self.run_python("-mpip", "install", *runez.flattened(additional))
|
|
197
181
|
|
|
198
182
|
check_venvs = PPG.config.get_value("cpython-check-venvs")
|
|
@@ -220,6 +204,11 @@ class Cpython(PythonBuilder):
|
|
|
220
204
|
|
|
221
205
|
PPG.config.cleanup_folder(self, "cpython-clean-2nd-pass", "cpython-clean")
|
|
222
206
|
|
|
207
|
+
py_inspector = PythonInspector(self.install_folder)
|
|
208
|
+
print(py_inspector.represented())
|
|
209
|
+
problem = py_inspector.full_so_report.get_problem(portable=not is_shared)
|
|
210
|
+
runez.abort_if(problem and self.setup.x_debug != "direct-finalize", "Build failed: %s" % problem)
|
|
211
|
+
|
|
223
212
|
def _check_venv(self, copies=False):
|
|
224
213
|
"""Verify that the freshly compiled python can create venvs without issue"""
|
|
225
214
|
folder = "venv"
|
|
@@ -230,7 +219,7 @@ class Cpython(PythonBuilder):
|
|
|
230
219
|
|
|
231
220
|
folder = self.setup.folders.build_folder / "test-venvs" / folder
|
|
232
221
|
self.run_python(*args, folder)
|
|
233
|
-
self.
|
|
222
|
+
self._do_run(folder / "bin/pip", "--version")
|
|
234
223
|
|
|
235
224
|
@staticmethod
|
|
236
225
|
def _represented_yaml(bits):
|
|
@@ -72,7 +72,7 @@ def test_finalization(cli, monkeypatch):
|
|
|
72
72
|
manifest = list(runez.readlines(f"build/ppp-marker/{f.version}/.manifest.yml"))
|
|
73
73
|
assert " some_env: some-env-value" in manifest
|
|
74
74
|
assert "selected: bzip2" in cli.logged
|
|
75
|
-
assert "INFO Cleaned
|
|
75
|
+
assert "INFO Cleaned 1 build artifact (0 B): idle_test" in cli.logged
|
|
76
76
|
assert f"Symlink {bin}/foo-python <- {bin}/python" in cli.logged
|
|
77
77
|
assert f"Symlink {bin}/pip{f.mm} <- {bin}/pip" in cli.logged
|
|
78
78
|
assert f"Auto-corrected shebang for {bin}/some-exe" in cli.logged
|
|
@@ -4,6 +4,13 @@ def test_build_bogus_platform(cli):
|
|
|
4
4
|
assert "Compiling on platform 'foo' is not yet supported" in cli.logged
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
def test_failed_build(cli):
|
|
8
|
+
cli.run("-tmacos-arm64", "build", "3.12.0")
|
|
9
|
+
assert cli.failed
|
|
10
|
+
assert "Error while compiling xz:5.4.5: ForbiddenHttpError" in cli.logged
|
|
11
|
+
assert "Overall compilation failed:" in cli.logged
|
|
12
|
+
|
|
13
|
+
|
|
7
14
|
def test_invalid(cli):
|
|
8
15
|
cli.run("-n", "build", "foo")
|
|
9
16
|
assert cli.failed
|
|
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
|
{portable-python-1.8.0 → portable-python-1.8.2}/src/portable_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{portable-python-1.8.0 → portable-python-1.8.2}/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
|