Skip to content

Commit

Permalink
Modernize cibuildwheel setup
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanDunfield committed Nov 17, 2024
1 parent 71a9cf6 commit 5d60060
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 21 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,15 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-22.04, macos-12, macos-14, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/[email protected]
env:
# Skip Python 2.7 and 3.5, 32 bit Linux, and PyPy
CIBW_SKIP: cp27-* cp35-* *-manylinux_i686 *musllinux* pp*
CIBW_ARCHS_MACOS: "x86_64 arm64 universal2"
CIBW_BEFORE_BUILD: pip install cython
CIBW_REPAIR_WHEEL_COMMAND_LINUX: auditwheel repair --strip -w {dest_dir} {wheel}
CIBW_TEST_COMMAND: python -m knot_floer_homology.test
uses: pypa/[email protected]

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: knot_floer_homology_${{ matrix.os }}_wheels
path: ./wheelhouse/*.whl
35 changes: 34 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
[build-system]
requires = ["setuptools", "wheel", "cython"]
build-backend = "setuptools.build_meta"
build-backend = "setuptools.build_meta"

[project]
name = "knot_floer_homology"
dynamic = ["version"]
dependencies = ["spherogram"]
requires-python = ">=3.8"
description="Python wrapper for Zoltán Szabó's HFK Calculator"
authors = [
{name = "Zoltán Szabó"},
{name = "Marc Culler"},
{name = "Nathan M. Dunfield"},
{name = "Matthias Goerner"},
{email = "[email protected]"},
]
readme = "README.rst"
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Programming Language :: C++",
"Operating System :: OS Independent"
]

[project.urls]
Homepage = "https://github.com/3-manifolds/knot_floer_homology"

[tool.setuptools.dynamic]
version = {attr = "knot_floer_homology.__version__"}

[tool.cibuildwheel]
build = "cp38* cp39* cp310* cp311* cp312* cp313*"
skip = "*musllinux*"
archs = "auto64"
test-command = "python -m knot_floer_homology.test"
9 changes: 0 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ def run(self):
pass

setup(
name='knot_floer_homology',
version=version,
author='Zoltán Szabó, Marc Culler, Nathan M. Dunfield, and Matthias Goerner',
author_email='[email protected]',
url='https://github.com/3-manifolds/knot_floer_homology',
description="Python wrapper for Zoltán Szabó's HFK Calculator",
long_description=open('README.rst').read(),
long_description_content_type='text/x-rst',
packages=['knot_floer_homology'],
package_dir={'knot_floer_homology':'python_src'},
package_data={'knot_floer_homology':['HFK_data.json']},
Expand All @@ -66,6 +58,5 @@ def run(self):
'clean':HFKClean,
},
zip_safe = False,
requires = ['spherogram']
)

0 comments on commit 5d60060

Please sign in to comment.