Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ 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
steps:
- 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]
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ 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:
build_packages = " ".join([f"-b {p}/*" for p in package_list.split(",")])
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..")
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand Down