Skip to content

Commit 6ec579d

Browse files
authored
Update python supports (#18)
* Add Python 3.14 support to CI and project classifiers * Update Python version requirement to support up to 3.15 * Remove Python 3.10 from CI matrix to streamline supported versions * Update CI configuration and improve Conan installation process
1 parent bdff24b commit 6ec579d

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

.github/workflows/ci-main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
platform: [ 'windows-latest', 'ubuntu-latest' ]
37-
python-version: [ 'cp310', 'cp311', 'cp312', 'cp313' ]
37+
python-version: [ 'cp311', 'cp312', 'cp313', 'cp314' ]
3838
timeout-minutes: 35
3939
env:
4040
CONAN_REVISIONS_ENABLED: 1
4141
steps:
4242
- uses: actions/checkout@v3
4343
- uses: actions/setup-python@v5
4444
with:
45-
python-version: 3.11
45+
python-version-file: 'pyproject.toml'
4646
- name: Install uv
4747
uses: astral-sh/setup-uv@v6
4848
with:
4949
enable-cache: true
5050
cache-dependency-glob: "uv.lock"
5151
- name: Build wheels
52-
uses: pypa/cibuildwheel@v2.23.3
52+
uses: pypa/cibuildwheel@v3.3.0
5353
env:
5454
CIBW_BUILD: "${{ matrix.python-version }}-win_amd64 ${{ matrix.python-version }}-manylinux_x86_64"
5555
CIBW_BUILD_FRONTEND: build[uv]
@@ -62,7 +62,7 @@ jobs:
6262
pip install twine
6363
twine check --strict ./wheelhouse/*
6464
- uses: actions/upload-artifact@v4
65-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
65+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
6666
name: Upload artifact (wheels)
6767
with:
6868
name: libcosimpy-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.python-version }}-wheel
@@ -82,14 +82,14 @@ jobs:
8282
python -m build --sdist
8383
twine check --strict ./dist/*
8484
- uses: actions/upload-artifact@v4
85-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
85+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
8686
name: Upload artifact (source)
8787
with:
8888
name: libcosimpy-${{ github.ref_name }}-source
8989
path: ./dist/*.tar.gz
9090

9191
publish:
92-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
92+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
9393
needs:
9494
- code_quality
9595
- build_wheels_and_test

hatch_build.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ def initialize(self, version: str, build_data: dict[str, Any]) -> None:
2121
frame = frame_info.frame
2222
module = inspect.getmodule(frame)
2323
if module and module.__name__.startswith("hatchling.build") and "config_settings" in frame.f_locals:
24-
config_settings = frame.f_locals["config_settings"]
24+
config_settings = frame.f_locals["config_settings"] or {}
2525

2626
package_list = config_settings.get("CONAN_BUILD")
2727
if package_list:
2828
build_packages = " ".join([f"-b {p}/*" for p in package_list.split(",")])
2929
else:
3030
build_packages = "-b missing"
3131

32-
assert os.system(f"conan install . -u {build_packages} -of build --format json --out-file graph.json") == 0, (
33-
"Conan install failed"
34-
)
32+
assert (
33+
os.system(f"conan install . -u {build_packages} -of build --format json -b b2/* --out-file graph.json") == 0
34+
), "Conan install failed"
3535

3636
if "CONAN_UPLOAD_OSP" in os.environ:
3737
print("Uploading packages..")

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ maintainers = [
1313
]
1414
description = "Python wrapper for the libcosim library"
1515
readme = "README.md"
16-
requires-python = ">=3.10, <3.14"
16+
requires-python = ">=3.11, <3.15"
1717
classifiers = [
1818
"Programming Language :: Python :: 3 :: Only",
19-
"Programming Language :: Python :: 3.10",
2019
"Programming Language :: Python :: 3.11",
2120
"Programming Language :: Python :: 3.12",
2221
"Programming Language :: Python :: 3.13",
22+
"Programming Language :: Python :: 3.14",
2323
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
2424
"Operating System :: Microsoft :: Windows",
2525
"Operating System :: POSIX :: Linux"
@@ -62,7 +62,7 @@ test-command = "uv run --with pytest pytest {package}"
6262
[tool.cibuildwheel.linux]
6363
before-all = [
6464
"yum install -y libatomic",
65-
"yum install -y perl-IPC-Cmd perl-Digest-SHA",
65+
"yum install -y perl-IPC-Cmd perl-Digest-SHA perl-Time-Piece",
6666
]
6767
manylinux-x86_64-image = "manylinux_2_28"
6868

0 commit comments

Comments
 (0)