Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion portable-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
click~=8.0
pyyaml~=6.0
requests<3.0
runez~=5.0
runez~=5.5
urllib3~=1.26
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/portable_python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ 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
Expand All @@ -237,7 +237,7 @@ 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
Expand Down
2 changes: 1 addition & 1 deletion src/portable_python/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion src/portable_python/cpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -199,7 +202,7 @@ def xenv_LIBMPDEC_LIBS(self):
@runez.cached_property
def prefix_lib_folder(self):
"""Path to <prefix>/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):
Expand Down
8 changes: 4 additions & 4 deletions src/portable_python/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
self.build_folder = self._get_path("build")
self.completions["build"] = self.build_folder
self.components = self.build_folder / "components"
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Loading