Skip to content
Open
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
87 changes: 87 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Wheels

on:
pull_request:
push:
branches:
- main
workflow_dispatch:
release:
types:
- published

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-13
- macos-14

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- uses: pypa/cibuildwheel@v2.23.3
env:
CIBW_BUILD: cp311-* cp312-* cp313-* cp314-*
CIBW_SKIP: pp* *-win32 *-manylinux_i686 *-musllinux_*
CIBW_TEST_COMMAND: python -c "import pyclipper2; print(pyclipper2.__version__)"

- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl

build_sdist:
name: Build sdist
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Build sdist
run: |
python -m pip install --upgrade build
python -m build --sdist

- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz

publish:
name: Publish to PyPI
if: github.event_name == 'release'
needs:
- build_wheels
- build_sdist
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: dist
merge-multiple: true

- uses: actions/download-artifact@v4
with:
name: sdist
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ While one could leverage [Shapely](https://shapely.readthedocs.io/en/stable/) fo

### ⚠️ Warning!

This package is very very early. I have only published wheels for python 3.13 and ARM Macs
This package is very very early. Published wheels may lag behind some Python and platform combinations while CI coverage expands.


2 changes: 1 addition & 1 deletion external/clipper2
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(
'cpp',
version: '0.0.8',
meson_version: '>=1.0.0',
default_options: ['cpp_std=c++23', 'b_ndebug=if-release'],
default_options: ['cpp_std=c++23,vc++latest,c++20,vc++20', 'b_ndebug=if-release'],
)

clipper2_inc = include_directories('external/clipper2/CPP/Clipper2Lib/include')
Expand Down