Add Python 3.14 builds

This commit is contained in:
Andrej730
2025-10-08 15:59:42 +05:00
parent 389d481364
commit d3beae1374
8 changed files with 24 additions and 6 deletions
+4
View File
@@ -72,6 +72,10 @@ jobs:
# We don't use gmpcxx, but it comes preinstalled on macos runner as arm64 bottle # We don't use gmpcxx, but it comes preinstalled on macos runner as arm64 bottle
# and CGAL detects it and breaks cross compilation. # and CGAL detects it and breaks cross compilation.
brew uninstall --ignore-dependencies gmp brew uninstall --ignore-dependencies gmp
# Otherwise Python will fallback to use arm64 `pkg-config`,
# will pick up arm64 libraries ('zstd' in particular),
# and break the build.
/usr/local/bin/brew install pkg-config
# Required by Python. # Required by Python.
/usr/local/bin/brew install gettext openssl /usr/local/bin/brew install gettext openssl
fi fi
@@ -24,7 +24,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
pyver: [py39, py310, py311, py312, py313] pyver: [py39, py310, py311, py312, py313, py314]
config: config:
- { - {
name: "Windows 64bit", name: "Windows 64bit",
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
pyver: [py39, py310, py311, py312, py313] pyver: [py39, py310, py311, py312, py313, py314]
config: config:
- { - {
name: "Windows 64bit", name: "Windows 64bit",
+11 -2
View File
@@ -135,7 +135,7 @@ PROJECT_NAME = "IfcOpenShell"
USE_CURRENT_PYTHON_VERSION = os.getenv("USE_CURRENT_PYTHON_VERSION") USE_CURRENT_PYTHON_VERSION = os.getenv("USE_CURRENT_PYTHON_VERSION")
ADD_COMMIT_SHA = os.getenv("ADD_COMMIT_SHA") ADD_COMMIT_SHA = os.getenv("ADD_COMMIT_SHA")
PYTHON_VERSIONS = ["3.9.11", "3.10.3", "3.11.8", "3.12.1", "3.13.6"] PYTHON_VERSIONS = ["3.9.11", "3.10.3", "3.11.8", "3.12.1", "3.13.6", "3.14.0"]
JSON_VERSION = "3.11.3" JSON_VERSION = "3.11.3"
OCE_VERSION = "0.18.3" OCE_VERSION = "0.18.3"
OCCT_VERSION = "7.8.1" OCCT_VERSION = "7.8.1"
@@ -373,8 +373,9 @@ for cmd in required_commands:
if missing_commands: if missing_commands:
raise ValueError(f"Required tools not installed or not added to PATH: {', '.join(missing_commands)}") raise ValueError(f"Required tools not installed or not added to PATH: {', '.join(missing_commands)}")
MAC_INTEL_BIN_PATH = "/usr/local/bin"
if MAC_CROSS_COMPILE_INTEL: if MAC_CROSS_COMPILE_INTEL:
brew = "/usr/local/bin/brew" brew = f"{MAC_INTEL_BIN_PATH}/brew"
assert os.path.exists(brew), f"For intel cross compilation the brew path is expected to be '{brew}'." assert os.path.exists(brew), f"For intel cross compilation the brew path is expected to be '{brew}'."
# identifiers for the download tool (could be less memory consuming as ints, but are more verbose as strings) # identifiers for the download tool (could be less memory consuming as ints, but are more verbose as strings)
@@ -1012,6 +1013,7 @@ if "python" in targets and not USE_CURRENT_PYTHON_VERSION and "wasm" not in flag
# On OSX a dynamic python library is built or it would not be compatible # On OSX a dynamic python library is built or it would not be compatible
# with the system python because of some threading initialization # with the system python because of some threading initialization
PYTHON_CONFIGURE_ARGS: "list[str]" = [] PYTHON_CONFIGURE_ARGS: "list[str]" = []
original_path = ""
if platform.system() == "Darwin": if platform.system() == "Darwin":
PYTHON_CONFIGURE_ARGS = ["--enable-shared"] PYTHON_CONFIGURE_ARGS = ["--enable-shared"]
open_ssl_prefix = run([brew, "--prefix", "openssl@3"]).strip() open_ssl_prefix = run([brew, "--prefix", "openssl@3"]).strip()
@@ -1020,6 +1022,10 @@ if "python" in targets and not USE_CURRENT_PYTHON_VERSION and "wasm" not in flag
PYTHON_CONFIGURE_ARGS.append(f"--with-openssl={open_ssl_prefix}") PYTHON_CONFIGURE_ARGS.append(f"--with-openssl={open_ssl_prefix}")
if MAC_CROSS_COMPILE_INTEL: if MAC_CROSS_COMPILE_INTEL:
original_path = os.environ["PATH"]
# Need to ensure python will pick up intel's `pkg-config`,
# otherwise it might attempt to use ARM libraries (e.g. `zstd`) and fail.
os.environ["PATH"] = f"{MAC_INTEL_BIN_PATH}{os.pathsep}{original_path}"
PYTHON_CONFIGURE_ARGS.extend(["--with-universal-archs=intel-64", "--enable-universalsdk"]) PYTHON_CONFIGURE_ARGS.extend(["--with-universal-archs=intel-64", "--enable-universalsdk"])
for PYTHON_VERSION in PYTHON_VERSIONS: for PYTHON_VERSION in PYTHON_VERSIONS:
@@ -1041,6 +1047,9 @@ if "python" in targets and not USE_CURRENT_PYTHON_VERSION and "wasm" not in flag
if not os.path.exists(os.path.join(DEPS_DIR, "install", f"python-{PYTHON_VERSION}")): if not os.path.exists(os.path.join(DEPS_DIR, "install", f"python-{PYTHON_VERSION}")):
raise e raise e
if MAC_CROSS_COMPILE_INTEL:
assert original_path
os.environ["PATH"] = original_path
os.environ["CPPFLAGS"] = OLD_CPP_FLAGS os.environ["CPPFLAGS"] = OLD_CPP_FLAGS
os.environ["CXXFLAGS"] = OLD_CXX_FLAGS os.environ["CXXFLAGS"] = OLD_CXX_FLAGS
os.environ["CFLAGS"] = OLD_C_FLAGS os.environ["CFLAGS"] = OLD_C_FLAGS
+3
View File
@@ -43,6 +43,9 @@ endif
ifeq ($(PYVERSION), py313) ifeq ($(PYVERSION), py313)
PYNUMBER:=313 PYNUMBER:=313
endif endif
ifeq ($(PYVERSION), py314)
PYNUMBER:=314
endif
ifndef PYNUMBER ifndef PYNUMBER
$(error Unsupported PYVERSION '$(PYVERSION)') $(error Unsupported PYVERSION '$(PYVERSION)')
endif endif
@@ -44,6 +44,8 @@ ZIP packages
+-------------+---------------------------------+-------------------------------+---------------------------------+-----------------------------------+ +-------------+---------------------------------+-------------------------------+---------------------------------+-----------------------------------+
| Python 3.13 | :ios_python_url:`py313-linux64` | :ios_python_url:`py313-win64` | :ios_python_url:`py313-macos64` | :ios_python_url:`py313-macosm164` | | Python 3.13 | :ios_python_url:`py313-linux64` | :ios_python_url:`py313-win64` | :ios_python_url:`py313-macos64` | :ios_python_url:`py313-macosm164` |
+-------------+---------------------------------+-------------------------------+---------------------------------+-----------------------------------+ +-------------+---------------------------------+-------------------------------+---------------------------------+-----------------------------------+
| Python 3.14 | :ios_python_url:`py314-linux64` | :ios_python_url:`py314-win64` | :ios_python_url:`py314-macos64` | :ios_python_url:`py314-macosm164` |
+-------------+---------------------------------+-------------------------------+---------------------------------+-----------------------------------+
2. Unzip the downloaded file and copy the ``ifcopenshell`` directory into your 2. Unzip the downloaded file and copy the ``ifcopenshell`` directory into your
Python path. If you're not sure where your Python path is, run the following Python path. If you're not sure where your Python path is, run the following
+1 -1
View File
@@ -30,7 +30,7 @@ import test.bootstrap
# - .github/workflows/ci-ifcopenshell-python.yml # - .github/workflows/ci-ifcopenshell-python.yml
# - .github/workflows/ci-ifcopenshell-python-pypi.yml # - .github/workflows/ci-ifcopenshell-python-pypi.yml
# - src/ifcopenshell-python/Makefile (PYVERSION check) # - src/ifcopenshell-python/Makefile (PYVERSION check)
SUPPORTED_PY_VERSIONS = ("39", "310", "311", "312", "313") SUPPORTED_PY_VERSIONS = ("39", "310", "311", "312", "313", "314")
SUPPORTED_PLATFORMS = ("win64", "linux64", "macos64", "macosm164") SUPPORTED_PLATFORMS = ("win64", "linux64", "macos64", "macosm164")
+1 -1
View File
@@ -11,7 +11,7 @@ from zipfile import ZipFile
assert Path.cwd() == Path(__file__).parent, "Run this script from the 'win' directory." assert Path.cwd() == Path(__file__).parent, "Run this script from the 'win' directory."
PYTHON_VERSIONS = ["3.9.13", "3.10.3", "3.11.8", "3.12.1", "3.13.0"] PYTHON_VERSIONS = ["3.9.13", "3.10.3", "3.11.8", "3.12.1", "3.13.0", "3.14.0"]
REPO_PATH = Path(__file__).parent.parent REPO_PATH = Path(__file__).parent.parent
REPO_WIN = REPO_PATH / "win" REPO_WIN = REPO_PATH / "win"
VERSION = (REPO_PATH / "VERSION").read_text().strip() VERSION = (REPO_PATH / "VERSION").read_text().strip()