portable-python 1.9.5__tar.gz → 1.9.7__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.
Files changed (38) hide show
  1. {portable_python-1.9.5/src/portable_python.egg-info → portable_python-1.9.7}/PKG-INFO +14 -2
  2. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python/__init__.py +7 -6
  3. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python/cli.py +6 -4
  4. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python/cpython.py +3 -3
  5. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python/external/__init__.py +2 -2
  6. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python/external/xcpython.py +8 -8
  7. portable_python-1.9.5/src/portable_python/external/tkinter.py → portable_python-1.9.7/src/portable_python/external/xtkinter.py +1 -1
  8. {portable_python-1.9.5 → portable_python-1.9.7/src/portable_python.egg-info}/PKG-INFO +14 -2
  9. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python.egg-info/SOURCES.txt +1 -1
  10. {portable_python-1.9.5 → portable_python-1.9.7}/tests/test_failed.py +1 -1
  11. {portable_python-1.9.5 → portable_python-1.9.7}/tests/test_invoker.py +1 -1
  12. {portable_python-1.9.5 → portable_python-1.9.7}/tests/test_setup.py +1 -1
  13. {portable_python-1.9.5 → portable_python-1.9.7}/DEVELOP.md +0 -0
  14. {portable_python-1.9.5 → portable_python-1.9.7}/LICENSE +0 -0
  15. {portable_python-1.9.5 → portable_python-1.9.7}/MANIFEST.in +0 -0
  16. {portable_python-1.9.5 → portable_python-1.9.7}/README.rst +0 -0
  17. {portable_python-1.9.5 → portable_python-1.9.7}/SECURITY.md +0 -0
  18. {portable_python-1.9.5 → portable_python-1.9.7}/pyproject.toml +0 -0
  19. {portable_python-1.9.5 → portable_python-1.9.7}/requirements.txt +0 -0
  20. {portable_python-1.9.5 → portable_python-1.9.7}/setup.cfg +0 -0
  21. {portable_python-1.9.5 → portable_python-1.9.7}/setup.py +0 -0
  22. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python/__main__.py +0 -0
  23. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python/config.py +0 -0
  24. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python/external/_inspect.py +0 -0
  25. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python/inspector.py +0 -0
  26. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python/tracking.py +0 -0
  27. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python/versions.py +0 -0
  28. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python.egg-info/dependency_links.txt +0 -0
  29. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python.egg-info/entry_points.txt +0 -0
  30. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python.egg-info/requires.txt +0 -0
  31. {portable_python-1.9.5 → portable_python-1.9.7}/src/portable_python.egg-info/top_level.txt +0 -0
  32. {portable_python-1.9.5 → portable_python-1.9.7}/tests/test_build.py +0 -0
  33. {portable_python-1.9.5 → portable_python-1.9.7}/tests/test_cleanup.py +0 -0
  34. {portable_python-1.9.5 → portable_python-1.9.7}/tests/test_inspector.py +0 -0
  35. {portable_python-1.9.5 → portable_python-1.9.7}/tests/test_list.py +0 -0
  36. {portable_python-1.9.5 → portable_python-1.9.7}/tests/test_prefix.py +0 -0
  37. {portable_python-1.9.5 → portable_python-1.9.7}/tests/test_recompress.py +0 -0
  38. {portable_python-1.9.5 → portable_python-1.9.7}/tests/test_report.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: portable-python
3
- Version: 1.9.5
3
+ Version: 1.9.7
4
4
  Summary: Portable python binaries
5
5
  Home-page: https://github.com/codrsquad/portable-python
6
6
  Author: Zoran Simic
@@ -38,6 +38,18 @@ Requires-Dist: pyyaml~=6.0
38
38
  Requires-Dist: requests<3.0
39
39
  Requires-Dist: runez~=5.0
40
40
  Requires-Dist: urllib3~=1.26
41
+ Dynamic: author
42
+ Dynamic: author-email
43
+ Dynamic: classifier
44
+ Dynamic: description
45
+ Dynamic: description-content-type
46
+ Dynamic: home-page
47
+ Dynamic: keywords
48
+ Dynamic: license
49
+ Dynamic: project-url
50
+ Dynamic: requires-dist
51
+ Dynamic: requires-python
52
+ Dynamic: summary
41
53
 
42
54
  Portable python binaries
43
55
  ========================
@@ -539,8 +539,7 @@ class ModuleBuilder:
539
539
  yield f"{self.deps_lib}/pkgconfig"
540
540
 
541
541
  def _do_run(self, program, *args, fatal=True, env=None):
542
- logger = self._log_handler
543
- return runez.run(program, *args, passthrough=logger, stdout=None, stderr=None, fatal=fatal, env=env, logger=logger or runez.UNSET)
542
+ return runez.run(program, *args, passthrough=self._log_handler, stdout=None, stderr=None, fatal=fatal, env=env)
544
543
 
545
544
  def run_configure(self, program, *args, prefix=None):
546
545
  """
@@ -558,11 +557,13 @@ class ModuleBuilder:
558
557
 
559
558
  def run_make(self, *args, program="make", cpu_count=None):
560
559
  cmd = program.split()
561
- if cpu_count is None:
562
- cpu_count = multiprocessing.cpu_count()
560
+ if cpu_count and cpu_count < 0:
561
+ available = multiprocessing.cpu_count()
562
+ if available and available > 0:
563
+ cpu_count += available
563
564
 
564
- if cpu_count and cpu_count > 3:
565
- cmd.append("-j%s" % (cpu_count - 2))
565
+ if cpu_count and cpu_count > 1:
566
+ cmd.append("-j%s" % cpu_count)
566
567
 
567
568
  self._do_run(*cmd, *args)
568
569
 
@@ -14,19 +14,21 @@ LOG = logging.getLogger(__name__)
14
14
  @runez.click.group()
15
15
  @runez.click.version()
16
16
  @runez.click.color()
17
- @runez.click.debug("-v")
18
17
  @runez.click.dryrun("-n")
19
18
  @click.option("--config", "-c", metavar="PATH", default="portable-python.yml", show_default=True, help="Path to config file to use")
19
+ @click.option("--quiet", "-q", is_flag=True, help="Turn off DEBUG logging")
20
20
  @click.option("--target", "-t", hidden=True, help="For internal use / testing")
21
- def main(debug, config, target):
21
+ def main(config, quiet, target):
22
22
  """
23
23
  Build (optionally portable) python binaries
24
24
  """
25
+ level = logging.INFO if quiet else logging.DEBUG
25
26
  runez.system.AbortException = SystemExit
26
27
  runez.log.setup(
27
- debug=debug,
28
+ debug=not quiet,
29
+ level=level,
28
30
  console_format="%(levelname)s %(message)s",
29
- console_level=logging.INFO,
31
+ console_level=level,
30
32
  default_logger=LOG.info,
31
33
  locations=None,
32
34
  )
@@ -8,8 +8,8 @@ import yaml
8
8
  from runez.pyenv import Version
9
9
 
10
10
  from portable_python import LOG, patch_file, patch_folder, PPG, PythonBuilder
11
- from portable_python.external.tkinter import TkInter
12
11
  from portable_python.external.xcpython import Bdb, Bzip2, Gdbm, LibFFI, Openssl, Readline, Sqlite, Uuid, Xz, Zlib
12
+ from portable_python.external.xtkinter import TkInter
13
13
  from portable_python.inspector import LibAutoCorrect, PythonInspector
14
14
 
15
15
  # https://github.com/docker-library/python/issues/160
@@ -204,7 +204,7 @@ class Cpython(PythonBuilder):
204
204
 
205
205
  self.run_make(*make_args)
206
206
  # Don't parallelize `make install`, see https://github.com/python/cpython/issues/109796
207
- self.run_make("install", f"DESTDIR={self.destdir}", cpu_count=0)
207
+ self.run_make("install", f"DESTDIR={self.destdir}")
208
208
 
209
209
  def _finalize(self):
210
210
  is_shared = self.setup.prefix or self.has_configure_opt("--enable-shared", "yes")
@@ -229,7 +229,7 @@ class Cpython(PythonBuilder):
229
229
 
230
230
  self.run_python(cmd)
231
231
 
232
- self.run_python("-mpip", "install", *runez.flattened(additional))
232
+ self.run_python("-mpip", "install", "--no-cache-dir", "--upgrade", *runez.flattened(additional))
233
233
 
234
234
  runez.abort_if(not runez.DRYRUN and not self.bin_python, f"Can't find bin/python in {self.bin_folder}")
235
235
  PPG.config.ensure_main_file_symlinks(self)
@@ -13,8 +13,8 @@ class GettextTiny(ModuleBuilder):
13
13
  return self.cfg_version("0.3.2")
14
14
 
15
15
  def _do_linux_compile(self):
16
- self.run_make("LIBINTL=NOOP", cpu_count=0)
17
- self.run_make("LIBINTL=NOOP", f"DESTDIR={self.deps}", "prefix=/", "install", cpu_count=0)
16
+ self.run_make("LIBINTL=NOOP")
17
+ self.run_make("LIBINTL=NOOP", f"DESTDIR={self.deps}", "prefix=/", "install")
18
18
 
19
19
 
20
20
  class Toolchain(ModuleBuilder):
@@ -74,7 +74,7 @@ class Gdbm(ModuleBuilder):
74
74
 
75
75
  @property
76
76
  def version(self):
77
- return self.cfg_version("1.23")
77
+ return self.cfg_version("1.24")
78
78
 
79
79
  def _do_linux_compile(self):
80
80
  self.run_configure(
@@ -114,7 +114,7 @@ class LibFFI(ModuleBuilder):
114
114
 
115
115
  @property
116
116
  def version(self):
117
- return self.cfg_version("3.4.4")
117
+ return self.cfg_version("3.4.6")
118
118
 
119
119
  def _do_linux_compile(self):
120
120
  self.run_configure(
@@ -178,7 +178,7 @@ class Ncurses(ModuleBuilder):
178
178
 
179
179
  @property
180
180
  def version(self):
181
- return self.cfg_version("6.4")
181
+ return self.cfg_version("6.5")
182
182
 
183
183
  def c_configure_args(self):
184
184
  yield "--disable-shared"
@@ -231,7 +231,7 @@ class Readline(ModuleBuilder):
231
231
 
232
232
  @property
233
233
  def version(self):
234
- return self.cfg_version("8.2")
234
+ return self.cfg_version("8.2.13")
235
235
 
236
236
  def _do_linux_compile(self):
237
237
  self.run_configure(
@@ -244,8 +244,8 @@ class Readline(ModuleBuilder):
244
244
  "--disable-docs",
245
245
  "--enable-portable-binary",
246
246
  )
247
- self.run_make(cpu_count=0)
248
- self.run_make("install", cpu_count=0)
247
+ self.run_make()
248
+ self.run_make("install")
249
249
 
250
250
 
251
251
  class Sqlite(ModuleBuilder):
@@ -271,7 +271,7 @@ class Sqlite(ModuleBuilder):
271
271
 
272
272
  @property
273
273
  def version(self):
274
- return self.cfg_version("3.45.1")
274
+ return self.cfg_version("3.47.0")
275
275
 
276
276
  def _do_linux_compile(self):
277
277
  self.run_configure(
@@ -325,7 +325,7 @@ class Xz(ModuleBuilder):
325
325
 
326
326
  @property
327
327
  def version(self):
328
- return self.cfg_version("5.4.6")
328
+ return self.cfg_version("5.6.3")
329
329
 
330
330
  def _do_linux_compile(self):
331
331
  self.run_configure(
@@ -116,4 +116,4 @@ class TkInter(ModuleBuilder):
116
116
 
117
117
  @property
118
118
  def version(self):
119
- return self.cfg_version("8.6.10")
119
+ return self.cfg_version("8.6.15")
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: portable-python
3
- Version: 1.9.5
3
+ Version: 1.9.7
4
4
  Summary: Portable python binaries
5
5
  Home-page: https://github.com/codrsquad/portable-python
6
6
  Author: Zoran Simic
@@ -38,6 +38,18 @@ Requires-Dist: pyyaml~=6.0
38
38
  Requires-Dist: requests<3.0
39
39
  Requires-Dist: runez~=5.0
40
40
  Requires-Dist: urllib3~=1.26
41
+ Dynamic: author
42
+ Dynamic: author-email
43
+ Dynamic: classifier
44
+ Dynamic: description
45
+ Dynamic: description-content-type
46
+ Dynamic: home-page
47
+ Dynamic: keywords
48
+ Dynamic: license
49
+ Dynamic: project-url
50
+ Dynamic: requires-dist
51
+ Dynamic: requires-python
52
+ Dynamic: summary
41
53
 
42
54
  Portable python binaries
43
55
  ========================
@@ -22,8 +22,8 @@ src/portable_python.egg-info/requires.txt
22
22
  src/portable_python.egg-info/top_level.txt
23
23
  src/portable_python/external/__init__.py
24
24
  src/portable_python/external/_inspect.py
25
- src/portable_python/external/tkinter.py
26
25
  src/portable_python/external/xcpython.py
26
+ src/portable_python/external/xtkinter.py
27
27
  tests/test_build.py
28
28
  tests/test_cleanup.py
29
29
  tests/test_failed.py
@@ -7,7 +7,7 @@ def test_build_bogus_platform(cli):
7
7
  def test_failed_build(cli):
8
8
  cli.run("-tmacos-arm64", "build", "3.12.0")
9
9
  assert cli.failed
10
- assert "Error while compiling xz:5.4.6: ForbiddenHttpError" in cli.logged
10
+ assert "Error while compiling xz:5.6.3: ForbiddenHttpError" in cli.logged
11
11
  assert "Overall compilation failed:" in cli.logged
12
12
 
13
13
 
@@ -3,7 +3,7 @@ import sys
3
3
 
4
4
 
5
5
  def test_invoker(cli):
6
- cli.run("-v", "inspect", "invoker", "-v", "-mall")
6
+ cli.run("inspect", "invoker", "-v", "-mall")
7
7
 
8
8
  # Invoker may not be completely clean, but it has to have at least one OK .so usage
9
9
  m = re.search(r"^\.so files: .+, (\d+) OK", cli.logged.stdout.contents(), re.MULTILINE)
@@ -11,7 +11,7 @@ def test_config(cli):
11
11
 
12
12
  cli.run("-ntmacos-arm64", "-c", cli.tests_path("sample-config1.yml"), "build", "3.9.7", "-mnone")
13
13
  assert cli.succeeded
14
- assert " -mpip install my-additional-package" in cli.logged
14
+ assert " -mpip install --no-cache-dir --upgrade my-additional-package" in cli.logged
15
15
  assert "env MACOSX_DEPLOYMENT_TARGET=12" in cli.logged # Comes from more specific macos-arm64.yml
16
16
  assert " -> dist/cpython-3.9.7-macos-arm64.tar.xz" in cli.logged # Comes from macos.yml (not defined in macos-arm64.yml)
17
17
  cli.match("Would run: build/cpython-.../bin/python -mpip install -U wheel")
File without changes