From 68c48545db9a30b18f997728e3f5e8bb3c4a6ea4 Mon Sep 17 00:00:00 2001 From: Alex Kaszynski Date: Mon, 15 Jul 2024 17:39:40 -0600 Subject: [PATCH] Fix build by updating actions and numpy<2.0 (#13) * update actions * ensure numpy <2.0 * fix mac os wheel build --- .github/workflows/build-and-deploy.yml | 17 +++++++---------- pyproject.toml | 4 +--- setup.py | 3 ++- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 4e84d8e..51aba02 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -18,13 +18,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, windows-latest, macos-14, macos-13] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.2 + uses: pypa/cibuildwheel@v2.19.2 - uses: actions/upload-artifact@v3 with: @@ -34,7 +34,7 @@ jobs: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build sdist run: pipx run build --sdist @@ -46,23 +46,20 @@ jobs: upload_pypi: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest - # upload to PyPI on every tag - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - # alternatively, to publish when a GitHub Release is created, use the following rule: - # if: github.event_name == 'release' && github.event.action == 'published' + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') # upload to PyPI on every tag steps: - uses: actions/download-artifact@v3 with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.8.6 + - uses: pypa/gh-action-pypi-publish@v1.9.0 with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} - name: Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: generate_release_notes: true files: | diff --git a/pyproject.toml b/pyproject.toml index 0b6c2a4..ffa3a77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,9 +23,7 @@ test-requires = "pytest pyvista" test-command = "pytest {project}/tests" [tool.cibuildwheel.macos] -# https://cibuildwheel.readthedocs.io/en/stable/faq/#apple-silicon -archs = ["x86_64", "universal2"] -test-skip = ["*_arm64", "*_universal2:arm64"] +archs = ["native"] [tool.codespell] skip = '*.cxx,*.h,*.gif,*.png,*.jpg,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,./doc/build/*,./doc/images/*,./dist/*,*~,.hypothesis*,*.cpp,*.c' diff --git a/setup.py b/setup.py index 3a59db7..2c4b259 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ """Setup for stl-reader.""" + from io import open as io_open import os import sys @@ -78,5 +79,5 @@ "stl_reader": ["*.pyx"], # include all .pyx files in the package }, keywords="read stl", - install_requires=["numpy>1.11.0"], + install_requires=["numpy>1.11.0,<2.0"], )