diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 801ccad..3780d2d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v4 diff --git a/portable-python.yml b/portable-python.yml index c48c4fa..b87383b 100644 --- a/portable-python.yml +++ b/portable-python.yml @@ -5,7 +5,7 @@ include: +pp-dev.yml folders: - build: "build/{family}-{version}" # Allows keeping builds per versions, and inspect them in parallel + build: "build/{family}-{version}{abi_suffix}" # Allows keeping builds per versions, and inspect them in parallel # For quick iteration locally, you can add this to your pp-dev.yml: #folders: diff --git a/requirements.txt b/requirements.txt index 66a438b..bbb8259 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ click~=8.0 pyyaml~=6.0 requests<3.0 -runez~=5.0 +runez~=5.5 urllib3~=1.26 diff --git a/setup.py b/setup.py index 0aa1dd1..b9d38d4 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ author="Zoran Simic zoran@simicweb.com", keywords="python, portable, binary", url="https://github.com/codrsquad/portable-python", - python_requires=">=3.9", + python_requires=">=3.10", entry_points={ "console_scripts": [ "portable-python = portable_python.__main__:main", @@ -22,11 +22,11 @@ "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Build Tools", "Topic :: System :: Installation/Setup", diff --git a/src/portable_python/__init__.py b/src/portable_python/__init__.py index a797d76..e4b5439 100644 --- a/src/portable_python/__init__.py +++ b/src/portable_python/__init__.py @@ -222,7 +222,9 @@ def __init__(self, python_spec=None, modules=None, prefix=None): runez.abort("Please provide full desired version: %s is not good enough" % runez.red(python_spec)) self.python_spec = python_spec - self.folders = PPG.get_folders(base=os.getcwd(), family=python_spec.family, version=python_spec.version) + self.folders = PPG.get_folders( + base=os.getcwd(), family=python_spec.family, version=python_spec.version, abi_suffix=python_spec.abi_suffix + ) self.desired_modules = modules prefix = self.folders.formatted(prefix) self.prefix = prefix @@ -237,7 +239,9 @@ def __init__(self, python_spec=None, modules=None, prefix=None): self.tarball_name = PPG.target.composed_basename(dest, extension=ext) else: - self.tarball_name = PPG.target.composed_basename(python_spec.family, python_spec.version, extension=ext) + self.tarball_name = PPG.target.composed_basename( + python_spec.family, python_spec.version, abi_suffix=python_spec.abi_suffix, extension=ext + ) builder = PPG.family(python_spec.family).get_builder() self.python_builder = builder(self) # type: PythonBuilder diff --git a/src/portable_python/config.py b/src/portable_python/config.py index 7e381ea..3aee760 100644 --- a/src/portable_python/config.py +++ b/src/portable_python/config.py @@ -17,7 +17,7 @@ destdir: "{build}" dist: dist logs: "{build}/logs" - ppp-marker: /ppp-marker/{version} + ppp-marker: /ppp-marker/{version}{abi_suffix} sources: build/sources manifest: diff --git a/src/portable_python/cpython.py b/src/portable_python/cpython.py index 118e427..d6a83f6 100644 --- a/src/portable_python/cpython.py +++ b/src/portable_python/cpython.py @@ -172,6 +172,9 @@ def c_configure_args(self): yield f"-ltcl{version.mm}" yield f"-ltk{version.mm}" + if self.setup.python_spec.freethreading: + yield "--disable-gil" + def xenv_LIBZSTD_CFLAGS(self): if self.version >= "3.14" and PPG.target.is_macos: # Normally ./configure will autodetect using pkg-config, but @@ -199,7 +202,7 @@ def xenv_LIBMPDEC_LIBS(self): @runez.cached_property def prefix_lib_folder(self): """Path to /lib/pythonM.m folder""" - return self.install_folder / f"lib/python{self.version.mm}" + return self.install_folder / f"lib/python{self.version.mm}{self.setup.python_spec.abi_suffix}" @runez.cached_property def prefix_config_folder(self): diff --git a/src/portable_python/versions.py b/src/portable_python/versions.py index 294426a..a078789 100644 --- a/src/portable_python/versions.py +++ b/src/portable_python/versions.py @@ -117,13 +117,13 @@ def get_builder(self): class Folders: - def __init__(self, config: Config, base=None, family=None, version=None): + def __init__(self, config: Config, base=None, family=None, version=None, abi_suffix=None): self.config = config self.base_folder = runez.resolved_path(base) self.family = family self.version = Version.from_object(version) self.mm = self.version and self.version.mm - self.completions = config.completions(family=family, version=version, mm=self.mm) + self.completions = config.completions(family=family, version=version, mm=self.mm, abi_suffix=abi_suffix or "") self.build_folder = self._get_path("build") self.completions["build"] = self.build_folder self.components = self.build_folder / "components" @@ -197,9 +197,9 @@ def grab_config(cls, paths=None, target=None): cls.target = cls.config.target @classmethod - def get_folders(cls, base=None, family="cpython", version=None): + def get_folders(cls, base=None, family="cpython", version=None, abi_suffix=None): config = cls.config or Config() - return Folders(config, base=base, family=family, version=version) + return Folders(config, base=base, family=family, version=version, abi_suffix=abi_suffix) @classmethod def family(cls, family_name, fatal=True) -> VersionFamily: diff --git a/tox.ini b/tox.ini index 088414e..63f2887 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{310,311,312,313}, coverage, docs, style +envlist = py{310,311,312,313,314}, coverage, docs, style skip_missing_interpreters = true [testenv]