From d426586ebd57c49235f3938412c4432e2e474bd7 Mon Sep 17 00:00:00 2001 From: David Heejong Park Date: Tue, 25 Nov 2025 07:43:42 +0100 Subject: [PATCH 1/4] Add Python 3.14 support to CI and project classifiers --- .github/workflows/ci-main.yml | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 75395b6..cbc1f7a 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -34,7 +34,7 @@ jobs: fail-fast: false matrix: platform: [ 'windows-latest', 'ubuntu-latest' ] - python-version: [ 'cp310', 'cp311', 'cp312', 'cp313' ] + python-version: [ 'cp310', 'cp311', 'cp312', 'cp313', 'cp314' ] timeout-minutes: 35 env: CONAN_REVISIONS_ENABLED: 1 diff --git a/pyproject.toml b/pyproject.toml index b1924cb..a2d308f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux" From 96deb073266534f4864f9c23d98f09d6f2e3923c Mon Sep 17 00:00:00 2001 From: David Heejong Park Date: Tue, 25 Nov 2025 07:50:47 +0100 Subject: [PATCH 2/4] Update Python version requirement to support up to 3.15 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a2d308f..4f812cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ maintainers = [ ] description = "Python wrapper for the libcosim library" readme = "README.md" -requires-python = ">=3.10, <3.14" +requires-python = ">=3.10, <3.15" classifiers = [ "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", From 6d13cb197c801670b2208b51bb9cdb326f5ad7fc Mon Sep 17 00:00:00 2001 From: David Heejong Park Date: Tue, 25 Nov 2025 15:38:26 +0100 Subject: [PATCH 3/4] Remove Python 3.10 from CI matrix to streamline supported versions --- .github/workflows/ci-main.yml | 4 ++-- pyproject.toml | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index cbc1f7a..0421693 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -34,7 +34,7 @@ jobs: fail-fast: false matrix: platform: [ 'windows-latest', 'ubuntu-latest' ] - python-version: [ 'cp310', 'cp311', 'cp312', 'cp313', 'cp314' ] + python-version: [ 'cp311', 'cp312', 'cp313', 'cp314' ] timeout-minutes: 35 env: CONAN_REVISIONS_ENABLED: 1 @@ -49,7 +49,7 @@ jobs: enable-cache: true cache-dependency-glob: "uv.lock" - name: Build wheels - uses: pypa/cibuildwheel@v2.23.3 + uses: pypa/cibuildwheel@v3.3.0 env: CIBW_BUILD: "${{ matrix.python-version }}-win_amd64 ${{ matrix.python-version }}-manylinux_x86_64" CIBW_BUILD_FRONTEND: build[uv] diff --git a/pyproject.toml b/pyproject.toml index 4f812cc..bcce48d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,10 +13,9 @@ maintainers = [ ] description = "Python wrapper for the libcosim library" readme = "README.md" -requires-python = ">=3.10, <3.15" +requires-python = ">=3.11, <3.15" classifiers = [ "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", From 5b29ef0d03460d60e78197997b7a56ad0dce062b Mon Sep 17 00:00:00 2001 From: David Heejong Park Date: Tue, 25 Nov 2025 15:52:20 +0100 Subject: [PATCH 4/4] Update CI configuration and improve Conan installation process --- .github/workflows/ci-main.yml | 8 ++++---- hatch_build.py | 8 ++++---- pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 0421693..e171f29 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version-file: 'pyproject.toml' - name: Install uv uses: astral-sh/setup-uv@v6 with: @@ -62,7 +62,7 @@ jobs: pip install twine twine check --strict ./wheelhouse/* - uses: actions/upload-artifact@v4 - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' name: Upload artifact (wheels) with: name: libcosimpy-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.python-version }}-wheel @@ -82,14 +82,14 @@ jobs: python -m build --sdist twine check --strict ./dist/* - uses: actions/upload-artifact@v4 - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' name: Upload artifact (source) with: name: libcosimpy-${{ github.ref_name }}-source path: ./dist/*.tar.gz publish: - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' needs: - code_quality - build_wheels_and_test diff --git a/hatch_build.py b/hatch_build.py index 683fe5d..4c43c48 100644 --- a/hatch_build.py +++ b/hatch_build.py @@ -21,7 +21,7 @@ def initialize(self, version: str, build_data: dict[str, Any]) -> None: frame = frame_info.frame module = inspect.getmodule(frame) if module and module.__name__.startswith("hatchling.build") and "config_settings" in frame.f_locals: - config_settings = frame.f_locals["config_settings"] + config_settings = frame.f_locals["config_settings"] or {} package_list = config_settings.get("CONAN_BUILD") if package_list: @@ -29,9 +29,9 @@ def initialize(self, version: str, build_data: dict[str, Any]) -> None: else: build_packages = "-b missing" - assert os.system(f"conan install . -u {build_packages} -of build --format json --out-file graph.json") == 0, ( - "Conan install failed" - ) + assert ( + os.system(f"conan install . -u {build_packages} -of build --format json -b b2/* --out-file graph.json") == 0 + ), "Conan install failed" if "CONAN_UPLOAD_OSP" in os.environ: print("Uploading packages..") diff --git a/pyproject.toml b/pyproject.toml index bcce48d..98321ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ test-command = "uv run --with pytest pytest {package}" [tool.cibuildwheel.linux] before-all = [ "yum install -y libatomic", - "yum install -y perl-IPC-Cmd perl-Digest-SHA", + "yum install -y perl-IPC-Cmd perl-Digest-SHA perl-Time-Piece", ] manylinux-x86_64-image = "manylinux_2_28"