portable-python 1.9.7__tar.gz → 1.9.8__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.7/src/portable_python.egg-info → portable_python-1.9.8}/PKG-INFO +3 -4
  2. {portable_python-1.9.7 → portable_python-1.9.8}/setup.py +2 -3
  3. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python/__init__.py +47 -10
  4. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python/cpython.py +10 -3
  5. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python/external/xcpython.py +147 -88
  6. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python/external/xtkinter.py +3 -3
  7. {portable_python-1.9.7 → portable_python-1.9.8/src/portable_python.egg-info}/PKG-INFO +3 -4
  8. {portable_python-1.9.7 → portable_python-1.9.8}/DEVELOP.md +0 -0
  9. {portable_python-1.9.7 → portable_python-1.9.8}/LICENSE +0 -0
  10. {portable_python-1.9.7 → portable_python-1.9.8}/MANIFEST.in +0 -0
  11. {portable_python-1.9.7 → portable_python-1.9.8}/README.rst +0 -0
  12. {portable_python-1.9.7 → portable_python-1.9.8}/SECURITY.md +0 -0
  13. {portable_python-1.9.7 → portable_python-1.9.8}/pyproject.toml +0 -0
  14. {portable_python-1.9.7 → portable_python-1.9.8}/requirements.txt +0 -0
  15. {portable_python-1.9.7 → portable_python-1.9.8}/setup.cfg +0 -0
  16. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python/__main__.py +0 -0
  17. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python/cli.py +0 -0
  18. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python/config.py +0 -0
  19. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python/external/__init__.py +0 -0
  20. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python/external/_inspect.py +0 -0
  21. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python/inspector.py +0 -0
  22. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python/tracking.py +0 -0
  23. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python/versions.py +0 -0
  24. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python.egg-info/SOURCES.txt +0 -0
  25. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python.egg-info/dependency_links.txt +0 -0
  26. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python.egg-info/entry_points.txt +0 -0
  27. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python.egg-info/requires.txt +0 -0
  28. {portable_python-1.9.7 → portable_python-1.9.8}/src/portable_python.egg-info/top_level.txt +0 -0
  29. {portable_python-1.9.7 → portable_python-1.9.8}/tests/test_build.py +0 -0
  30. {portable_python-1.9.7 → portable_python-1.9.8}/tests/test_cleanup.py +0 -0
  31. {portable_python-1.9.7 → portable_python-1.9.8}/tests/test_failed.py +0 -0
  32. {portable_python-1.9.7 → portable_python-1.9.8}/tests/test_inspector.py +0 -0
  33. {portable_python-1.9.7 → portable_python-1.9.8}/tests/test_invoker.py +0 -0
  34. {portable_python-1.9.7 → portable_python-1.9.8}/tests/test_list.py +0 -0
  35. {portable_python-1.9.7 → portable_python-1.9.8}/tests/test_prefix.py +0 -0
  36. {portable_python-1.9.7 → portable_python-1.9.8}/tests/test_recompress.py +0 -0
  37. {portable_python-1.9.7 → portable_python-1.9.8}/tests/test_report.py +0 -0
  38. {portable_python-1.9.7 → portable_python-1.9.8}/tests/test_setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: portable-python
3
- Version: 1.9.7
3
+ Version: 1.9.8
4
4
  Summary: Portable python binaries
5
5
  Home-page: https://github.com/codrsquad/portable-python
6
6
  Author: Zoran Simic
@@ -18,19 +18,18 @@ 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.6
22
- Classifier: Programming Language :: Python :: 3.7
23
21
  Classifier: Programming Language :: Python :: 3.8
24
22
  Classifier: Programming Language :: Python :: 3.9
25
23
  Classifier: Programming Language :: Python :: 3.10
26
24
  Classifier: Programming Language :: Python :: 3.11
27
25
  Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
28
27
  Classifier: Programming Language :: Python :: Implementation :: CPython
29
28
  Classifier: Topic :: Software Development :: Build Tools
30
29
  Classifier: Topic :: System :: Installation/Setup
31
30
  Classifier: Topic :: System :: Software Distribution
32
31
  Classifier: Topic :: Utilities
33
- Requires-Python: >=3.6
32
+ Requires-Python: >=3.8
34
33
  Description-Content-Type: text/x-rst
35
34
  License-File: LICENSE
36
35
  Requires-Dist: click~=8.0
@@ -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.6",
10
+ python_requires=">=3.8",
11
11
  entry_points={
12
12
  "console_scripts": [
13
13
  "portable-python = portable_python.__main__:main",
@@ -22,13 +22,12 @@ setup(
22
22
  "Operating System :: Unix",
23
23
  "Programming Language :: Python",
24
24
  "Programming Language :: Python :: 3",
25
- "Programming Language :: Python :: 3.6",
26
- "Programming Language :: Python :: 3.7",
27
25
  "Programming Language :: Python :: 3.8",
28
26
  "Programming Language :: Python :: 3.9",
29
27
  "Programming Language :: Python :: 3.10",
30
28
  "Programming Language :: Python :: 3.11",
31
29
  "Programming Language :: Python :: 3.12",
30
+ "Programming Language :: Python :: 3.13",
32
31
  "Programming Language :: Python :: Implementation :: CPython",
33
32
  "Topic :: Software Development :: Build Tools",
34
33
  "Topic :: System :: Installation/Setup",
@@ -15,6 +15,7 @@ import multiprocessing
15
15
  import os
16
16
  import pathlib
17
17
  import re
18
+ from string import Template
18
19
  from typing import ClassVar, List
19
20
 
20
21
  import runez
@@ -491,6 +492,19 @@ class ModuleBuilder:
491
492
  def cfg_version(self, default):
492
493
  return PPG.config.get_value("%s-version" % self.m_name) or default
493
494
 
495
+ def cfg_url(self, version):
496
+ if config_url := PPG.config.get_value("%s-url" % self.m_name):
497
+ url_template = Template(config_url)
498
+ return url_template.substitute(version=version)
499
+
500
+ def cfg_configure(self, deps_lib_dir, deps_lib64_dir):
501
+ if configure := PPG.config.get_value("%s-configure" % self.m_name):
502
+ configure_template = Template(configure)
503
+ return configure_template.substitute(lib_dir=deps_lib_dir, lib64_dir=deps_lib64_dir)
504
+
505
+ def cfg_patches(self):
506
+ return PPG.config.get_value("%s-patches" % self.m_name)
507
+
494
508
  @property
495
509
  def url(self):
496
510
  """Url of source tarball, if any"""
@@ -507,9 +521,20 @@ class ModuleBuilder:
507
521
  return self.setup.folders.deps
508
522
 
509
523
  @property
510
- def deps_lib(self):
524
+ def deps_lib_dir(self):
511
525
  return self.deps / "lib"
512
526
 
527
+ @property
528
+ def deps_lib64_dir(self):
529
+ return self.deps / "lib64"
530
+
531
+ @property
532
+ def deps_lib_dirs(self):
533
+ lib_dirs = [self.deps_lib_dir]
534
+ if self.deps_lib64_dir.exists():
535
+ lib_dirs.append(self.deps_lib64_dir)
536
+ return lib_dirs
537
+
513
538
  def xenv_CPATH(self):
514
539
  folder = self.deps / "include"
515
540
  if folder.exists():
@@ -522,7 +547,7 @@ class ModuleBuilder:
522
547
 
523
548
  def xenv_LDFLAGS(self):
524
549
  if self.modules.selected:
525
- yield f"-L{self.deps_lib}"
550
+ yield from (f"-L{lib_dir}" for lib_dir in self.deps_lib_dirs)
526
551
 
527
552
  def xenv_PATH(self):
528
553
  yield f"{self.deps}/bin"
@@ -536,7 +561,7 @@ class ModuleBuilder:
536
561
  def xenv_PKG_CONFIG_PATH(self):
537
562
  yield from os.environ.get("PKG_CONFIG_PATH", "").split(":")
538
563
  if self.modules.selected:
539
- yield f"{self.deps_lib}/pkgconfig"
564
+ yield from (f"{lib_dir}/pkgconfig" for lib_dir in self.deps_lib_dirs)
540
565
 
541
566
  def _do_run(self, program, *args, fatal=True, env=None):
542
567
  return runez.run(program, *args, passthrough=self._log_handler, stdout=None, stderr=None, fatal=fatal, env=env)
@@ -639,6 +664,7 @@ class ModuleBuilder:
639
664
  folder = folder / self.m_build_cwd
640
665
 
641
666
  with runez.CurrentFolder(folder):
667
+ self._apply_patches()
642
668
  self._prepare()
643
669
  func()
644
670
  self._finalize()
@@ -652,6 +678,15 @@ class ModuleBuilder:
652
678
  else:
653
679
  os.environ[k] = v
654
680
 
681
+ def _apply_patches(self):
682
+ if patches := self.cfg_patches():
683
+ for patch in patches:
684
+ if runez.DRYRUN:
685
+ print(f"Would apply patch: {patch}")
686
+ else:
687
+ print(f"Applying patch: {patch}")
688
+ patch_file(patch["file"], patch["regex"], patch["replacement"])
689
+
655
690
  def _get_env_vars(self):
656
691
  """Yield all found env vars, first found wins"""
657
692
  result = {}
@@ -747,10 +782,12 @@ class PythonBuilder(ModuleBuilder):
747
782
  # Some libs get funky permissions for some reason
748
783
  super()._prepare()
749
784
  self.setup.ensure_clean_folder(self.install_folder)
750
- for path in runez.ls_dir(self.deps_lib):
751
- if not path.name.endswith(".la"):
752
- expected = 0o755 if path.is_dir() else 0o644
753
- current = path.stat().st_mode & 0o777
754
- if current != expected:
755
- LOG.info("Corrected permissions for %s (was %s)", runez.short(path), oct(current))
756
- path.chmod(expected)
785
+
786
+ for lib_dir in self.deps_lib_dirs:
787
+ for path in runez.ls_dir(lib_dir):
788
+ if not path.name.endswith(".la"):
789
+ expected = 0o755 if path.is_dir() else 0o644
790
+ current = path.stat().st_mode & 0o777
791
+ if current != expected:
792
+ LOG.info("Corrected permissions for %s (was %s)", runez.short(path), oct(current))
793
+ path.chmod(expected)
@@ -104,10 +104,13 @@ class Cpython(PythonBuilder):
104
104
  if PPG.config.get_value("cpython-use-github"):
105
105
  return f"https://github.com/python/cpython/archive/refs/tags/v{self.version}.tar.gz"
106
106
 
107
+ if cfg_url := self.cfg_url(self.version):
108
+ return cfg_url
109
+
107
110
  return f"https://www.python.org/ftp/python/{self.version.main}/Python-{self.version}.tar.xz"
108
111
 
109
112
  def xenv_LDFLAGS_NODIST(self):
110
- yield f"-L{self.deps_lib}"
113
+ yield from (f"-L{lib_dir}" for lib_dir in self.deps_lib_dirs)
111
114
  if PPG.target.is_linux:
112
115
  yield "-Wl,-z,origin"
113
116
  # rpath intentionally long to give 'patchelf' some room
@@ -139,7 +142,7 @@ class Cpython(PythonBuilder):
139
142
 
140
143
  if not self.has_configure_opt("--with-system-ffi"):
141
144
  if self.active_module(LibFFI):
142
- yield f"LIBFFI_INCLUDEDIR={self.deps_lib}"
145
+ yield f"LIBFFI_INCLUDEDIR={self.deps_lib_dir}"
143
146
  yield "--with-system-ffi=no"
144
147
 
145
148
  else:
@@ -163,7 +166,11 @@ class Cpython(PythonBuilder):
163
166
  # TODO: this doesn't seem to be enough, on macos cpython's ./configure still picks up the shared macos tcl/tk libs
164
167
  version = Version(tkinter.version)
165
168
  yield f"--with-tcltk-includes=-I{self.deps}/include"
166
- yield f"--with-tcltk-libs=-L{self.deps_lib} -ltcl{version.mm} -ltk{version.mm}"
169
+
170
+ lib_dir_flags = " ".join(f"-L{lib_dir}" for lib_dir in self.deps_lib_dirs)
171
+ yield f"--with-tcltk-libs={lib_dir_flags}"
172
+ yield f"-ltcl{version.mm}"
173
+ yield f"-ltk{version.mm}"
167
174
 
168
175
  @runez.cached_property
169
176
  def prefix_lib_folder(self):
@@ -21,14 +21,24 @@ class Bdb(ModuleBuilder):
21
21
 
22
22
  @property
23
23
  def url(self):
24
- return f"https://ftp.osuosl.org/pub/blfs/conglomeration/db/db-{self.version}.tar.gz"
24
+ return self.cfg_url(self.version) or f"https://ftp.osuosl.org/pub/blfs/conglomeration/db/db-{self.version}.tar.gz"
25
25
 
26
26
  @property
27
27
  def version(self):
28
28
  return self.cfg_version("6.2.32")
29
29
 
30
+ def c_configure_args(self):
31
+ if config_args := self.cfg_configure(self.deps_lib_dir, self.deps_lib64_dir):
32
+ yield config_args
33
+
34
+ else:
35
+ yield "--enable-shared=no"
36
+ yield "--enable-static=yes"
37
+ yield "--enable-dbm"
38
+ yield "--with-pic=yes"
39
+
30
40
  def _do_linux_compile(self):
31
- self.run_configure("../dist/configure", "--enable-shared=no", "--enable-static=yes", "--enable-dbm", "--with-pic=yes")
41
+ self.run_configure("../dist/configure", self.c_configure_args())
32
42
  self.run_make()
33
43
  self.run_make("install")
34
44
 
@@ -46,7 +56,7 @@ class Bzip2(ModuleBuilder):
46
56
 
47
57
  @property
48
58
  def url(self):
49
- return f"https://sourceware.org/pub/bzip2/bzip2-{self.version}.tar.gz"
59
+ return self.cfg_url(self.version) or f"https://sourceware.org/pub/bzip2/bzip2-{self.version}.tar.gz"
50
60
 
51
61
  @property
52
62
  def version(self):
@@ -70,27 +80,30 @@ class Gdbm(ModuleBuilder):
70
80
 
71
81
  @property
72
82
  def url(self):
73
- return f"https://ftp.gnu.org/gnu/gdbm/gdbm-{self.version}.tar.gz"
83
+ return self.cfg_url(self.version) or f"https://ftp.gnu.org/gnu/gdbm/gdbm-{self.version}.tar.gz"
74
84
 
75
85
  @property
76
86
  def version(self):
77
87
  return self.cfg_version("1.24")
78
88
 
89
+ def c_configure_args(self):
90
+ if config_args := self.cfg_configure(self.deps_lib_dir, self.deps_lib64_dir):
91
+ yield config_args
92
+
93
+ else:
94
+ yield "--enable-shared=no"
95
+ yield "--enable-static=yes"
96
+ yield "--with-pic=yes"
97
+ yield "--disable-nls"
98
+ yield "--disable-dependency-tracking"
99
+ yield "--disable-rpath"
100
+ yield "--disable-silent-rules"
101
+ yield "--without-libiconv-prefix"
102
+ yield "--without-libintl-prefix"
103
+ yield "--without-readline"
104
+
79
105
  def _do_linux_compile(self):
80
- self.run_configure(
81
- "./configure",
82
- "--enable-shared=no",
83
- "--enable-static=yes",
84
- "--with-pic=yes",
85
- "--enable-libgdbm-compat",
86
- "--disable-dependency-tracking",
87
- "--disable-nls",
88
- "--disable-rpath",
89
- "--disable-silent-rules",
90
- "--without-libiconv-prefix",
91
- "--without-libintl-prefix",
92
- "--without-readline",
93
- )
106
+ self.run_configure("./configure", self.c_configure_args())
94
107
  self.run_make()
95
108
  self.run_make("install")
96
109
  runez.move(self.deps / "include/ndbm.h", self.deps / "include/gdbm-ndbm.h")
@@ -110,21 +123,27 @@ class LibFFI(ModuleBuilder):
110
123
 
111
124
  @property
112
125
  def url(self):
113
- return f"https://github.com/libffi/libffi/releases/download/v{self.version}/libffi-{self.version}.tar.gz"
126
+ return (
127
+ self.cfg_url(self.version) or f"https://github.com/libffi/libffi/releases/download/v{self.version}/libffi-{self.version}.tar.gz"
128
+ )
114
129
 
115
130
  @property
116
131
  def version(self):
117
132
  return self.cfg_version("3.4.6")
118
133
 
134
+ def c_configure_args(self):
135
+ if config_args := self.cfg_configure(self.deps_lib_dir, self.deps_lib64_dir):
136
+ yield config_args
137
+
138
+ else:
139
+ yield "--enable-shared=no"
140
+ yield "--enable-static=yes"
141
+ yield "--with-pic=yes"
142
+ yield PPG.target.is_macos and "--disable-multi-os-directory"
143
+ yield "--disable-docs"
144
+
119
145
  def _do_linux_compile(self):
120
- self.run_configure(
121
- "./configure",
122
- "--enable-shared=no",
123
- "--enable-static=yes",
124
- "--with-pic=yes",
125
- PPG.target.is_macos and "--disable-multi-os-directory",
126
- "--disable-docs",
127
- )
146
+ self.run_configure("./configure", self.c_configure_args())
128
147
  self.run_make()
129
148
  self.run_make("install")
130
149
 
@@ -146,7 +165,10 @@ class Openssl(ModuleBuilder):
146
165
  if self.version and self.version.startswith("1.1.1"):
147
166
  # Not sure why URL suddenly changed for this on github...
148
167
  vfolder = self.version.replace(".", "_")
149
- return f"https://github.com/openssl/openssl/releases/download/OpenSSL_{vfolder}/openssl-{self.version}.tar.gz"
168
+ return (
169
+ self.cfg_url(self.version)
170
+ or f"https://github.com/openssl/openssl/releases/download/OpenSSL_{vfolder}/openssl-{self.version}.tar.gz"
171
+ )
150
172
 
151
173
  return f"https://github.com/openssl/openssl/releases/download/openssl-{self.version}/openssl-{self.version}.tar.gz"
152
174
 
@@ -157,11 +179,16 @@ class Openssl(ModuleBuilder):
157
179
  return self.cfg_version("3.0.15")
158
180
 
159
181
  def c_configure_args(self):
160
- yield "--openssldir=/etc/ssl"
161
- yield "no-shared", "no-idea", "no-tests"
182
+ if config_args := self.cfg_configure(self.deps_lib_dir, self.deps_lib64_dir):
183
+ yield config_args
184
+
185
+ else:
186
+ yield "-v"
187
+ yield "--openssldir=/etc/ssl"
188
+ yield "no-shared", "no-idea", "no-tests"
162
189
 
163
190
  def _do_linux_compile(self):
164
- self.run_configure("./config", "-v", self.c_configure_args())
191
+ self.run_configure("./config", self.c_configure_args())
165
192
  self.run_make("depend")
166
193
  self.run_make()
167
194
  self.run_make("install_sw") # See https://github.com/openssl/openssl/issues/8170
@@ -174,33 +201,37 @@ class Ncurses(ModuleBuilder):
174
201
 
175
202
  @property
176
203
  def url(self):
177
- return f"https://ftp.gnu.org/pub/gnu/ncurses/ncurses-{self.version}.tar.gz"
204
+ return self.cfg_url(self.version) or f"https://ftp.gnu.org/pub/gnu/ncurses/ncurses-{self.version}.tar.gz"
178
205
 
179
206
  @property
180
207
  def version(self):
181
208
  return self.cfg_version("6.5")
182
209
 
183
210
  def c_configure_args(self):
184
- yield "--disable-shared"
185
- yield "--enable-static"
186
- yield "--without-ada"
187
- yield "--disable-db-install"
188
- yield "--without-manpages"
189
- yield "--without-progs"
190
- yield "--without-tests"
191
- yield f"--with-pkg-config-libdir={self.deps_lib}/pkgconfig"
192
- yield "--enable-pc-files"
193
- yield "--with-debug=no"
194
- yield "--with-gpm=no"
195
- yield "--enable-widec"
196
- yield "--enable-symlinks"
197
- yield "--enable-sigwinch"
198
- yield "--without-develop"
199
- if PPG.target.is_linux:
200
- yield "--with-terminfo-dirs=/etc/terminfo:/lib/terminfo:/usr/share/terminfo"
201
-
202
- if PPG.target.is_macos:
203
- yield "--with-terminfo-dirs=/usr/share/terminfo"
211
+ if config_args := self.cfg_configure(self.deps_lib_dir, self.deps_lib64_dir):
212
+ yield config_args
213
+
214
+ else:
215
+ yield "--disable-shared"
216
+ yield "--enable-static"
217
+ yield "--without-ada"
218
+ yield "--disable-db-install"
219
+ yield "--without-manpages"
220
+ yield "--without-progs"
221
+ yield "--without-tests"
222
+ yield f"--with-pkg-config-libdir={self.deps_lib_dir}/pkgconfig"
223
+ yield "--enable-pc-files"
224
+ yield "--with-debug=no"
225
+ yield "--with-gpm=no"
226
+ yield "--enable-widec"
227
+ yield "--enable-symlinks"
228
+ yield "--enable-sigwinch"
229
+ yield "--without-develop"
230
+ if PPG.target.is_linux:
231
+ yield "--with-terminfo-dirs=/etc/terminfo:/lib/terminfo:/usr/share/terminfo"
232
+
233
+ if PPG.target.is_macos:
234
+ yield "--with-terminfo-dirs=/usr/share/terminfo"
204
235
 
205
236
  def _do_linux_compile(self):
206
237
  self.run_configure("./configure", self.c_configure_args())
@@ -227,23 +258,27 @@ class Readline(ModuleBuilder):
227
258
 
228
259
  @property
229
260
  def url(self):
230
- return f"https://ftp.gnu.org/gnu/readline/readline-{self.version}.tar.gz"
261
+ return self.cfg_url(self.version) or f"https://ftp.gnu.org/gnu/readline/readline-{self.version}.tar.gz"
231
262
 
232
263
  @property
233
264
  def version(self):
234
265
  return self.cfg_version("8.2.13")
235
266
 
267
+ def c_configure_args(self):
268
+ if config_args := self.cfg_configure(self.deps_lib_dir, self.deps_lib64_dir):
269
+ yield config_args
270
+
271
+ else:
272
+ yield "--enable-shared=no"
273
+ yield "--enable-static=yes"
274
+ yield "--with-curses"
275
+ yield "--enable-multibyte"
276
+ yield "--disable-install-examples"
277
+ yield "--disable-docs"
278
+ yield "--enable-portable-binary"
279
+
236
280
  def _do_linux_compile(self):
237
- self.run_configure(
238
- "./configure",
239
- "--disable-shared",
240
- "--enable-static",
241
- "--with-curses",
242
- "--enable-multibyte",
243
- "--disable-install-examples",
244
- "--disable-docs",
245
- "--enable-portable-binary",
246
- )
281
+ self.run_configure("./configure", self.c_configure_args())
247
282
  self.run_make()
248
283
  self.run_make("install")
249
284
 
@@ -267,21 +302,25 @@ class Sqlite(ModuleBuilder):
267
302
 
268
303
  @property
269
304
  def url(self):
270
- return f"https://github.com/sqlite/sqlite/archive/refs/tags/version-{self.version}.tar.gz"
305
+ return self.cfg_url(self.version) or f"https://github.com/sqlite/sqlite/archive/refs/tags/version-{self.version}.tar.gz"
271
306
 
272
307
  @property
273
308
  def version(self):
274
309
  return self.cfg_version("3.47.0")
275
310
 
311
+ def c_configure_args(self):
312
+ if config_args := self.cfg_configure(self.deps_lib_dir, self.deps_lib64_dir):
313
+ yield config_args
314
+
315
+ else:
316
+ yield "--enable-shared=no"
317
+ yield "--enable-static=yes"
318
+ yield "--disable-tcl"
319
+ yield "--disable-readline"
320
+ yield "--with-pic=yes"
321
+
276
322
  def _do_linux_compile(self):
277
- self.run_configure(
278
- "./configure",
279
- "--enable-shared=no",
280
- "--enable-static=yes",
281
- "--disable-tcl",
282
- "--disable-readline",
283
- "--with-pic=yes",
284
- )
323
+ self.run_configure("./configure", self.c_configure_args())
285
324
  self.run_make()
286
325
  self.run_make("install")
287
326
 
@@ -300,14 +339,23 @@ class Uuid(ModuleBuilder):
300
339
 
301
340
  @property
302
341
  def url(self):
303
- return f"https://sourceforge.net/projects/libuuid/files/libuuid-{self.version}.tar.gz"
342
+ return self.cfg_url(self.version) or f"https://sourceforge.net/projects/libuuid/files/libuuid-{self.version}.tar.gz"
304
343
 
305
344
  @property
306
345
  def version(self):
307
346
  return self.cfg_version("1.0.3")
308
347
 
348
+ def c_configure_args(self):
349
+ if config_args := self.cfg_configure(self.deps_lib_dir, self.deps_lib64_dir):
350
+ yield config_args
351
+
352
+ else:
353
+ yield "--enable-shared=no"
354
+ yield "--enable-static=yes"
355
+ yield "--with-pic=yes"
356
+
309
357
  def _do_linux_compile(self):
310
- self.run_configure("./configure", "--enable-shared=no", "--enable-static=yes", "--with-pic=yes")
358
+ self.run_configure("./configure", self.c_configure_args())
311
359
  self.run_make()
312
360
  self.run_make("install")
313
361
 
@@ -321,24 +369,28 @@ class Xz(ModuleBuilder):
321
369
 
322
370
  @property
323
371
  def url(self):
324
- return f"https://downloads.sourceforge.net/project/lzmautils/xz-{self.version}.tar.gz"
372
+ return self.cfg_url(self.version) or f"https://downloads.sourceforge.net/project/lzmautils/xz-{self.version}.tar.gz"
325
373
 
326
374
  @property
327
375
  def version(self):
328
376
  return self.cfg_version("5.6.3")
329
377
 
378
+ def c_configure_args(self):
379
+ if config_args := self.cfg_configure(self.deps_lib_dir, self.deps_lib64_dir):
380
+ yield config_args
381
+
382
+ else:
383
+ yield "--enable-shared=no"
384
+ yield "--enable-static=yes"
385
+ yield "--with-pic=yes"
386
+ yield "--disable-rpath"
387
+ yield "--disable-dependency-tracking"
388
+ yield "--disable-doc"
389
+ yield "--disable-nls"
390
+ yield "--without-libintl-prefix"
391
+
330
392
  def _do_linux_compile(self):
331
- self.run_configure(
332
- "./configure",
333
- "--enable-shared=no",
334
- "--enable-static=yes",
335
- "--with-pic=yes",
336
- "--disable-rpath",
337
- "--disable-dependency-tracking",
338
- "--disable-doc",
339
- "--disable-nls",
340
- "--without-libintl-prefix",
341
- )
393
+ self.run_configure("./configure", self.c_configure_args())
342
394
  self.run_make()
343
395
  self.run_make("install")
344
396
 
@@ -360,13 +412,20 @@ class Zlib(ModuleBuilder):
360
412
 
361
413
  @property
362
414
  def url(self):
363
- return f"https://zlib.net/fossils/zlib-{self.version}.tar.gz"
415
+ return self.cfg_url(self.version) or f"https://zlib.net/fossils/zlib-{self.version}.tar.gz"
364
416
 
365
417
  @property
366
418
  def version(self):
367
419
  return self.cfg_version("1.3.1")
368
420
 
421
+ def c_configure_args(self):
422
+ if config_args := self.cfg_configure(self.deps_lib_dir, self.deps_lib64_dir):
423
+ yield config_args
424
+
425
+ else:
426
+ yield "--static"
427
+
369
428
  def _do_linux_compile(self):
370
- self.run_configure("./configure", "--static")
429
+ self.run_configure("./configure", self.c_configure_args())
371
430
  self.run_make()
372
431
  self.run_make("install")
@@ -53,7 +53,7 @@ class Tk(ModuleBuilder):
53
53
  def c_configure_args(self):
54
54
  yield "--enable-shared=no"
55
55
  yield "--enable-threads"
56
- yield f"--with-tcl={self.deps_lib}"
56
+ yield f"--with-tcl={self.deps_lib_dir}"
57
57
  yield "--without-x"
58
58
  if PPG.target.is_macos: # pragma: no cover, tcl/tk is "best effort"
59
59
  yield "--enable-aqua=yes"
@@ -89,8 +89,8 @@ class Tix(ModuleBuilder):
89
89
  def c_configure_args(self):
90
90
  yield "--enable-shared=no"
91
91
  yield "--enable-threads"
92
- yield f"--with-tcl={self.deps_lib}"
93
- yield f"--with-tk={self.deps_lib}"
92
+ yield f"--with-tcl={self.deps_lib_dir}"
93
+ yield f"--with-tk={self.deps_lib_dir}"
94
94
  yield "--without-x"
95
95
 
96
96
  def _do_linux_compile(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: portable-python
3
- Version: 1.9.7
3
+ Version: 1.9.8
4
4
  Summary: Portable python binaries
5
5
  Home-page: https://github.com/codrsquad/portable-python
6
6
  Author: Zoran Simic
@@ -18,19 +18,18 @@ 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.6
22
- Classifier: Programming Language :: Python :: 3.7
23
21
  Classifier: Programming Language :: Python :: 3.8
24
22
  Classifier: Programming Language :: Python :: 3.9
25
23
  Classifier: Programming Language :: Python :: 3.10
26
24
  Classifier: Programming Language :: Python :: 3.11
27
25
  Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
28
27
  Classifier: Programming Language :: Python :: Implementation :: CPython
29
28
  Classifier: Topic :: Software Development :: Build Tools
30
29
  Classifier: Topic :: System :: Installation/Setup
31
30
  Classifier: Topic :: System :: Software Distribution
32
31
  Classifier: Topic :: Utilities
33
- Requires-Python: >=3.6
32
+ Requires-Python: >=3.8
34
33
  Description-Content-Type: text/x-rst
35
34
  License-File: LICENSE
36
35
  Requires-Dist: click~=8.0
File without changes