portable-python 1.10.1__tar.gz → 2.0.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.
- {portable_python-1.10.1/src/portable_python.egg-info → portable_python-2.0.0}/PKG-INFO +4 -4
- {portable_python-1.10.1 → portable_python-2.0.0}/requirements.txt +1 -1
- {portable_python-1.10.1 → portable_python-2.0.0}/setup.py +2 -2
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python/__init__.py +10 -4
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python/config.py +1 -1
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python/cpython.py +30 -3
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python/external/_inspect.py +1 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python/external/xcpython.py +77 -1
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python/inspector.py +1 -1
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python/versions.py +4 -4
- {portable_python-1.10.1 → portable_python-2.0.0/src/portable_python.egg-info}/PKG-INFO +4 -4
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python.egg-info/requires.txt +1 -1
- {portable_python-1.10.1 → portable_python-2.0.0}/DEVELOP.md +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/LICENSE +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/MANIFEST.in +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/README.rst +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/SECURITY.md +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/pyproject.toml +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/setup.cfg +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python/__main__.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python/cli.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python/external/__init__.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python/external/xtkinter.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python/tracking.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python.egg-info/SOURCES.txt +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python.egg-info/dependency_links.txt +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python.egg-info/entry_points.txt +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/src/portable_python.egg-info/top_level.txt +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/tests/test_build.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/tests/test_cleanup.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/tests/test_failed.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/tests/test_inspector.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/tests/test_invoker.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/tests/test_list.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/tests/test_prefix.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/tests/test_recompress.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/tests/test_report.py +0 -0
- {portable_python-1.10.1 → portable_python-2.0.0}/tests/test_setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: portable-python
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Portable python binaries
|
|
5
5
|
Home-page: https://github.com/codrsquad/portable-python
|
|
6
6
|
Author: Zoran Simic
|
|
@@ -18,23 +18,23 @@ Classifier: Operating System :: POSIX
|
|
|
18
18
|
Classifier: Operating System :: Unix
|
|
19
19
|
Classifier: Programming Language :: Python
|
|
20
20
|
Classifier: Programming Language :: Python :: 3
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
25
24
|
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
26
26
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
27
27
|
Classifier: Topic :: Software Development :: Build Tools
|
|
28
28
|
Classifier: Topic :: System :: Installation/Setup
|
|
29
29
|
Classifier: Topic :: System :: Software Distribution
|
|
30
30
|
Classifier: Topic :: Utilities
|
|
31
|
-
Requires-Python: >=3.
|
|
31
|
+
Requires-Python: >=3.10
|
|
32
32
|
Description-Content-Type: text/x-rst
|
|
33
33
|
License-File: LICENSE
|
|
34
34
|
Requires-Dist: click~=8.0
|
|
35
35
|
Requires-Dist: pyyaml~=6.0
|
|
36
36
|
Requires-Dist: requests<3.0
|
|
37
|
-
Requires-Dist: runez~=5.
|
|
37
|
+
Requires-Dist: runez~=5.5
|
|
38
38
|
Requires-Dist: urllib3~=1.26
|
|
39
39
|
Dynamic: author
|
|
40
40
|
Dynamic: author-email
|
|
@@ -7,7 +7,7 @@ setup(
|
|
|
7
7
|
author="Zoran Simic zoran@simicweb.com",
|
|
8
8
|
keywords="python, portable, binary",
|
|
9
9
|
url="https://github.com/codrsquad/portable-python",
|
|
10
|
-
python_requires=">=3.
|
|
10
|
+
python_requires=">=3.10",
|
|
11
11
|
entry_points={
|
|
12
12
|
"console_scripts": [
|
|
13
13
|
"portable-python = portable_python.__main__:main",
|
|
@@ -22,11 +22,11 @@ setup(
|
|
|
22
22
|
"Operating System :: Unix",
|
|
23
23
|
"Programming Language :: Python",
|
|
24
24
|
"Programming Language :: Python :: 3",
|
|
25
|
-
"Programming Language :: Python :: 3.9",
|
|
26
25
|
"Programming Language :: Python :: 3.10",
|
|
27
26
|
"Programming Language :: Python :: 3.11",
|
|
28
27
|
"Programming Language :: Python :: 3.12",
|
|
29
28
|
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Programming Language :: Python :: 3.14",
|
|
30
30
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
31
31
|
"Topic :: Software Development :: Build Tools",
|
|
32
32
|
"Topic :: System :: Installation/Setup",
|
|
@@ -222,7 +222,9 @@ class BuildSetup:
|
|
|
222
222
|
runez.abort("Please provide full desired version: %s is not good enough" % runez.red(python_spec))
|
|
223
223
|
|
|
224
224
|
self.python_spec = python_spec
|
|
225
|
-
self.folders = PPG.get_folders(
|
|
225
|
+
self.folders = PPG.get_folders(
|
|
226
|
+
base=os.getcwd(), family=python_spec.family, version=python_spec.version, abi_suffix=python_spec.abi_suffix
|
|
227
|
+
)
|
|
226
228
|
self.desired_modules = modules
|
|
227
229
|
prefix = self.folders.formatted(prefix)
|
|
228
230
|
self.prefix = prefix
|
|
@@ -237,7 +239,9 @@ class BuildSetup:
|
|
|
237
239
|
self.tarball_name = PPG.target.composed_basename(dest, extension=ext)
|
|
238
240
|
|
|
239
241
|
else:
|
|
240
|
-
self.tarball_name = PPG.target.composed_basename(
|
|
242
|
+
self.tarball_name = PPG.target.composed_basename(
|
|
243
|
+
python_spec.family, python_spec.version, abi_suffix=python_spec.abi_suffix, extension=ext
|
|
244
|
+
)
|
|
241
245
|
|
|
242
246
|
builder = PPG.family(python_spec.family).get_builder()
|
|
243
247
|
self.python_builder = builder(self) # type: PythonBuilder
|
|
@@ -605,10 +609,12 @@ class ModuleBuilder:
|
|
|
605
609
|
|
|
606
610
|
def run_make(self, *args, program="make", cpu_count=None):
|
|
607
611
|
cmd = program.split()
|
|
608
|
-
if cpu_count
|
|
612
|
+
if cpu_count is None:
|
|
609
613
|
available = multiprocessing.cpu_count()
|
|
614
|
+
# If we can't retrieve the number of cores, leave cpu_count as None
|
|
615
|
+
# and we'll omit -j below.
|
|
610
616
|
if available and available > 0:
|
|
611
|
-
cpu_count
|
|
617
|
+
cpu_count = available
|
|
612
618
|
|
|
613
619
|
if cpu_count and cpu_count > 1:
|
|
614
620
|
cmd.append("-j%s" % cpu_count)
|
|
@@ -8,7 +8,7 @@ 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.xcpython import Bdb, Bzip2, Gdbm, LibFFI, Openssl, Readline, Sqlite, Uuid, Xz, Zlib
|
|
11
|
+
from portable_python.external.xcpython import Bdb, Bzip2, Gdbm, LibFFI, Mpdec, Openssl, Readline, Sqlite, Uuid, Xz, Zlib, Zstd
|
|
12
12
|
from portable_python.external.xtkinter import TkInter
|
|
13
13
|
from portable_python.inspector import LibAutoCorrect, PythonInspector
|
|
14
14
|
|
|
@@ -96,7 +96,7 @@ class Cpython(PythonBuilder):
|
|
|
96
96
|
|
|
97
97
|
@classmethod
|
|
98
98
|
def candidate_modules(cls):
|
|
99
|
-
return [LibFFI, Zlib, Xz, Bzip2, Readline, Openssl, Sqlite, Bdb, Gdbm, Uuid, TkInter]
|
|
99
|
+
return [LibFFI, Zlib, Zstd, Xz, Bzip2, Readline, Openssl, Sqlite, Bdb, Gdbm, Uuid, TkInter, Mpdec]
|
|
100
100
|
|
|
101
101
|
@property
|
|
102
102
|
def url(self):
|
|
@@ -172,10 +172,37 @@ class Cpython(PythonBuilder):
|
|
|
172
172
|
yield f"-ltcl{version.mm}"
|
|
173
173
|
yield f"-ltk{version.mm}"
|
|
174
174
|
|
|
175
|
+
if self.setup.python_spec.freethreading:
|
|
176
|
+
yield "--disable-gil"
|
|
177
|
+
|
|
178
|
+
def xenv_LIBZSTD_CFLAGS(self):
|
|
179
|
+
if self.version >= "3.14" and PPG.target.is_macos:
|
|
180
|
+
# Normally ./configure will autodetect using pkg-config, but
|
|
181
|
+
# this doesn't typically work on Mac (the pkg-config binary is
|
|
182
|
+
# in homebrew, which we omit from path) so we have to provide
|
|
183
|
+
# some hints about how to staticly include it.
|
|
184
|
+
yield f"-I{self.deps}/include"
|
|
185
|
+
|
|
186
|
+
def xenv_LIBZSTD_LIBS(self):
|
|
187
|
+
if self.version >= "3.14" and PPG.target.is_macos:
|
|
188
|
+
yield f"{self.deps_lib_dir}/libzstd.a"
|
|
189
|
+
|
|
190
|
+
def xenv_LIBMPDEC_CFLAGS(self):
|
|
191
|
+
if self.version >= "3.14" and PPG.target.is_macos:
|
|
192
|
+
# Normally ./configure will autodetect using pkg-config, but
|
|
193
|
+
# this doesn't typically work on Mac (the pkg-config binary is
|
|
194
|
+
# in homebrew, which we omit from path) so we have to provide
|
|
195
|
+
# some hints about how to staticly include it.
|
|
196
|
+
yield f"-I{self.deps}/include"
|
|
197
|
+
|
|
198
|
+
def xenv_LIBMPDEC_LIBS(self):
|
|
199
|
+
if self.version >= "3.14" and PPG.target.is_macos:
|
|
200
|
+
yield f"{self.deps_lib_dir}/libmpdec.a"
|
|
201
|
+
|
|
175
202
|
@runez.cached_property
|
|
176
203
|
def prefix_lib_folder(self):
|
|
177
204
|
"""Path to <prefix>/lib/pythonM.m folder"""
|
|
178
|
-
return self.install_folder / f"lib/python{self.version.mm}"
|
|
205
|
+
return self.install_folder / f"lib/python{self.version.mm}{self.setup.python_spec.abi_suffix}"
|
|
179
206
|
|
|
180
207
|
@runez.cached_property
|
|
181
208
|
def prefix_config_folder(self):
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import os.path
|
|
1
2
|
from typing import ClassVar
|
|
2
3
|
|
|
3
4
|
import runez
|
|
@@ -202,7 +203,7 @@ class Ncurses(ModuleBuilder):
|
|
|
202
203
|
|
|
203
204
|
@property
|
|
204
205
|
def url(self):
|
|
205
|
-
return self.cfg_url(self.version) or f"https://
|
|
206
|
+
return self.cfg_url(self.version) or f"https://ftpmirror.gnu.org/gnu/ncurses/ncurses-{self.version}.tar.gz"
|
|
206
207
|
|
|
207
208
|
@property
|
|
208
209
|
def version(self):
|
|
@@ -428,3 +429,78 @@ class Zlib(ModuleBuilder):
|
|
|
428
429
|
self.run_configure("./configure", self.c_configure_args())
|
|
429
430
|
self.run_make()
|
|
430
431
|
self.run_make("install")
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
class Zstd(ModuleBuilder):
|
|
435
|
+
"""
|
|
436
|
+
Newer compression format present in most 3.14+ builds
|
|
437
|
+
"""
|
|
438
|
+
|
|
439
|
+
m_debian = "!libzstd-dev"
|
|
440
|
+
m_telltale = "{include}/zstd.h"
|
|
441
|
+
|
|
442
|
+
xenv_CFLAGS = "-fPIC"
|
|
443
|
+
|
|
444
|
+
def auto_select_reason(self):
|
|
445
|
+
if self.setup.python_spec.version >= "3.14":
|
|
446
|
+
if PPG.target.is_macos:
|
|
447
|
+
return "Required for 3.14 and up" # Well, "expected" anyway
|
|
448
|
+
if not self.resolved_telltale:
|
|
449
|
+
return "Required for 3.14 and up"
|
|
450
|
+
|
|
451
|
+
@property
|
|
452
|
+
def url(self):
|
|
453
|
+
return (
|
|
454
|
+
self.cfg_url(self.version) or f"https://github.com/facebook/zstd/releases/download/v{self.version}/zstd-{self.version}.tar.gz"
|
|
455
|
+
)
|
|
456
|
+
|
|
457
|
+
@property
|
|
458
|
+
def version(self):
|
|
459
|
+
return self.cfg_version("1.5.7")
|
|
460
|
+
|
|
461
|
+
def _do_linux_compile(self):
|
|
462
|
+
# Notably, this does not build when given a relative path.
|
|
463
|
+
self.run_make(f"prefix={os.path.abspath(self.deps)}")
|
|
464
|
+
# the libdir on the resulting .dylib on Mac is wrong, but as long as we
|
|
465
|
+
# staticly compile this doesn't need a fixup. I got as far as:
|
|
466
|
+
# "libdir=\\$(executable_path)/../lib")
|
|
467
|
+
self.run_make("install", f"prefix={os.path.abspath(self.deps)}")
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
class Mpdec(ModuleBuilder):
|
|
471
|
+
"""
|
|
472
|
+
Prevent falling back to bundled libmpdec (deprecated and scheduled for removal in Python 3.16)
|
|
473
|
+
"""
|
|
474
|
+
|
|
475
|
+
m_debian = "!libmpdec-dev"
|
|
476
|
+
m_telltale = "{include}/mpdecimal.h"
|
|
477
|
+
|
|
478
|
+
xenv_CFLAGS = "-fPIC"
|
|
479
|
+
|
|
480
|
+
def auto_select_reason(self):
|
|
481
|
+
if self.setup.python_spec.version >= "3.16":
|
|
482
|
+
if PPG.target.is_macos:
|
|
483
|
+
return "Required for 3.16 and up"
|
|
484
|
+
if not self.resolved_telltale:
|
|
485
|
+
return "Required for 3.16 and up"
|
|
486
|
+
|
|
487
|
+
@property
|
|
488
|
+
def url(self):
|
|
489
|
+
return self.cfg_url(self.version) or f"https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-{self.version}.tar.gz"
|
|
490
|
+
|
|
491
|
+
@property
|
|
492
|
+
def version(self):
|
|
493
|
+
return self.cfg_version("4.0.1")
|
|
494
|
+
|
|
495
|
+
def c_configure_args(self):
|
|
496
|
+
if config_args := self.cfg_configure(self.deps_lib_dir, self.deps_lib64_dir):
|
|
497
|
+
yield config_args
|
|
498
|
+
|
|
499
|
+
else:
|
|
500
|
+
pass # yield "--static"
|
|
501
|
+
yield "--disable-cxx"
|
|
502
|
+
|
|
503
|
+
def _do_linux_compile(self):
|
|
504
|
+
self.run_configure("./configure", self.c_configure_args())
|
|
505
|
+
self.run_make()
|
|
506
|
+
self.run_make("install")
|
|
@@ -397,7 +397,7 @@ def get_lib_type(install_folder, path, basename):
|
|
|
397
397
|
|
|
398
398
|
|
|
399
399
|
class PythonInspector:
|
|
400
|
-
default = "_bz2,_ctypes,_curses,_decimal,_dbm,_gdbm,_lzma,_tkinter,_sqlite3,_ssl,_uuid,pip,readline,pyexpat,setuptools,zlib"
|
|
400
|
+
default = "_bz2,_ctypes,_curses,_decimal,_dbm,_gdbm,_lzma,_tkinter,_sqlite3,_ssl,_uuid,_zstd,pip,readline,pyexpat,setuptools,zlib"
|
|
401
401
|
additional = "_asyncio,_functools,_tracemalloc,dbm.gnu,ensurepip,ossaudiodev,spwd,sys,tkinter,venv,wheel"
|
|
402
402
|
|
|
403
403
|
def __init__(self, spec, modules=None):
|
|
@@ -117,13 +117,13 @@ class CPythonFamily(VersionFamily):
|
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
class Folders:
|
|
120
|
-
def __init__(self, config: Config, base=None, family=None, version=None):
|
|
120
|
+
def __init__(self, config: Config, base=None, family=None, version=None, abi_suffix=None):
|
|
121
121
|
self.config = config
|
|
122
122
|
self.base_folder = runez.resolved_path(base)
|
|
123
123
|
self.family = family
|
|
124
124
|
self.version = Version.from_object(version)
|
|
125
125
|
self.mm = self.version and self.version.mm
|
|
126
|
-
self.completions = config.completions(family=family, version=version, mm=self.mm)
|
|
126
|
+
self.completions = config.completions(family=family, version=version, mm=self.mm, abi_suffix=abi_suffix or "")
|
|
127
127
|
self.build_folder = self._get_path("build")
|
|
128
128
|
self.completions["build"] = self.build_folder
|
|
129
129
|
self.components = self.build_folder / "components"
|
|
@@ -197,9 +197,9 @@ class PPG:
|
|
|
197
197
|
cls.target = cls.config.target
|
|
198
198
|
|
|
199
199
|
@classmethod
|
|
200
|
-
def get_folders(cls, base=None, family="cpython", version=None):
|
|
200
|
+
def get_folders(cls, base=None, family="cpython", version=None, abi_suffix=None):
|
|
201
201
|
config = cls.config or Config()
|
|
202
|
-
return Folders(config, base=base, family=family, version=version)
|
|
202
|
+
return Folders(config, base=base, family=family, version=version, abi_suffix=abi_suffix)
|
|
203
203
|
|
|
204
204
|
@classmethod
|
|
205
205
|
def family(cls, family_name, fatal=True) -> VersionFamily:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: portable-python
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Portable python binaries
|
|
5
5
|
Home-page: https://github.com/codrsquad/portable-python
|
|
6
6
|
Author: Zoran Simic
|
|
@@ -18,23 +18,23 @@ Classifier: Operating System :: POSIX
|
|
|
18
18
|
Classifier: Operating System :: Unix
|
|
19
19
|
Classifier: Programming Language :: Python
|
|
20
20
|
Classifier: Programming Language :: Python :: 3
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
25
24
|
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
26
26
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
27
27
|
Classifier: Topic :: Software Development :: Build Tools
|
|
28
28
|
Classifier: Topic :: System :: Installation/Setup
|
|
29
29
|
Classifier: Topic :: System :: Software Distribution
|
|
30
30
|
Classifier: Topic :: Utilities
|
|
31
|
-
Requires-Python: >=3.
|
|
31
|
+
Requires-Python: >=3.10
|
|
32
32
|
Description-Content-Type: text/x-rst
|
|
33
33
|
License-File: LICENSE
|
|
34
34
|
Requires-Dist: click~=8.0
|
|
35
35
|
Requires-Dist: pyyaml~=6.0
|
|
36
36
|
Requires-Dist: requests<3.0
|
|
37
|
-
Requires-Dist: runez~=5.
|
|
37
|
+
Requires-Dist: runez~=5.5
|
|
38
38
|
Requires-Dist: urllib3~=1.26
|
|
39
39
|
Dynamic: author
|
|
40
40
|
Dynamic: author-email
|
|
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.10.1 → portable_python-2.0.0}/src/portable_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{portable_python-1.10.1 → portable_python-2.0.0}/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
|
|
File without changes
|