diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 75395b6..e171f29 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: [ 'cp311', 'cp312', 'cp313', 'cp314' ] timeout-minutes: 35 env: CONAN_REVISIONS_ENABLED: 1 @@ -42,14 +42,14 @@ 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: 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] @@ -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 b1924cb..98321ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,13 +13,13 @@ maintainers = [ ] description = "Python wrapper for the libcosim library" readme = "README.md" -requires-python = ">=3.10, <3.14" +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", + "Programming Language :: Python :: 3.14", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux" @@ -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"