mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-05 23:41:44 +00:00
Add Python 3.14 builds
This commit is contained in:
@@ -72,6 +72,10 @@ jobs:
|
||||
# We don't use gmpcxx, but it comes preinstalled on macos runner as arm64 bottle
|
||||
# and CGAL detects it and breaks cross compilation.
|
||||
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.
|
||||
/usr/local/bin/brew install gettext openssl
|
||||
fi
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
pyver: [py39, py310, py311, py312, py313]
|
||||
pyver: [py39, py310, py311, py312, py313, py314]
|
||||
config:
|
||||
- {
|
||||
name: "Windows 64bit",
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
pyver: [py39, py310, py311, py312, py313]
|
||||
pyver: [py39, py310, py311, py312, py313, py314]
|
||||
config:
|
||||
- {
|
||||
name: "Windows 64bit",
|
||||
|
||||
+11
-2
@@ -135,7 +135,7 @@ PROJECT_NAME = "IfcOpenShell"
|
||||
USE_CURRENT_PYTHON_VERSION = os.getenv("USE_CURRENT_PYTHON_VERSION")
|
||||
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"
|
||||
OCE_VERSION = "0.18.3"
|
||||
OCCT_VERSION = "7.8.1"
|
||||
@@ -373,8 +373,9 @@ for cmd in required_commands:
|
||||
if 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:
|
||||
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}'."
|
||||
|
||||
# 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
|
||||
# with the system python because of some threading initialization
|
||||
PYTHON_CONFIGURE_ARGS: "list[str]" = []
|
||||
original_path = ""
|
||||
if platform.system() == "Darwin":
|
||||
PYTHON_CONFIGURE_ARGS = ["--enable-shared"]
|
||||
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}")
|
||||
|
||||
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"])
|
||||
|
||||
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}")):
|
||||
raise e
|
||||
|
||||
if MAC_CROSS_COMPILE_INTEL:
|
||||
assert original_path
|
||||
os.environ["PATH"] = original_path
|
||||
os.environ["CPPFLAGS"] = OLD_CPP_FLAGS
|
||||
os.environ["CXXFLAGS"] = OLD_CXX_FLAGS
|
||||
os.environ["CFLAGS"] = OLD_C_FLAGS
|
||||
|
||||
@@ -43,6 +43,9 @@ endif
|
||||
ifeq ($(PYVERSION), py313)
|
||||
PYNUMBER:=313
|
||||
endif
|
||||
ifeq ($(PYVERSION), py314)
|
||||
PYNUMBER:=314
|
||||
endif
|
||||
ifndef PYNUMBER
|
||||
$(error Unsupported PYVERSION '$(PYVERSION)')
|
||||
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.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
|
||||
Python path. If you're not sure where your Python path is, run the following
|
||||
|
||||
@@ -30,7 +30,7 @@ import test.bootstrap
|
||||
# - .github/workflows/ci-ifcopenshell-python.yml
|
||||
# - .github/workflows/ci-ifcopenshell-python-pypi.yml
|
||||
# - 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")
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from zipfile import ZipFile
|
||||
|
||||
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_WIN = REPO_PATH / "win"
|
||||
VERSION = (REPO_PATH / "VERSION").read_text().strip()
|
||||
|
||||
Reference in New Issue
Block a user