Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: move to scikit-build-core #126

Merged
merged 5 commits into from
May 25, 2024
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
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
artifact_suffix: "windows_x86"
use_qemu: false
- os: macos-14
arch: "arm64 universal2 x86_64"
arch: "universal2"
build: ""
artifact_suffix: "macos"
use_qemu: false
Expand Down Expand Up @@ -102,7 +102,6 @@ jobs:
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS: "${{ matrix.arch }}"
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
CIBW_BUILD: "cp39-${{ matrix.build }}*"

- uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.15)

project(SwigPythonDistributions NONE)

Expand Down
7 changes: 0 additions & 7 deletions MANIFEST.in

This file was deleted.

53 changes: 24 additions & 29 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
[build-system]
requires = ["setuptools>=64", "wheel", "scikit-build", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[tool.cibuildwheel]
build = "cp39-*"
before-all = [
"pipx install -f cmake==3.21.4",
"cmake --version",
"pipx install -f ninja==1.10.2.2",
"ninja --version",
]
test-command = [
"swig -version",
"swig -pcreversion",
"swig -help",
]

[tool.cibuildwheel.linux]
manylinux-x86_64-image = "manylinux1"
manylinux-i686-image = "manylinux1"
requires = ["scikit-build-core"]
build-backend = "scikit_build_core.build"

[project]
name = "swig"
Expand All @@ -39,6 +21,28 @@ classifiers = [
]
dynamic = ["version"]


[tool.scikit-build]
wheel.py-api = "py2.py3"
wheel.expand-macos-universal-tags = true
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = ["src/swig/_version.py"]
wheel.install-dir = "swig/data"

[tool.cibuildwheel]
build = "cp39-*"
test-command = [
"swig -version",
"swig -pcreversion",
"swig -help",
]
environment.PIP_ONLY_BINARY = ":all:"

[tool.cibuildwheel.linux]
manylinux-x86_64-image = "manylinux1"
manylinux-i686-image = "manylinux1"


[project.scripts]
swig = "swig:swig"
"swig4.0" = "swig:swig"
Expand All @@ -49,14 +53,5 @@ Download = "https://swig.org/download.html"
"Source Code" = "https://github.com/nightlark/swig-pypi"
"Bug Tracker" = "https://github.com/nightlark/swig-pypi/issues"

# Should be possible to specify these fields too, except then "shared" data files end up in the wrong subfolder
# Eventually should try migrating to scikit-build-core and ditching setuptools entirely
#[tool.setuptools]
#packages = ["swig"]
#package-dir = {"" = "src"}
#
#[tool.setuptools.package-data]
#swig = ["data/*"]

[tool.setuptools_scm]
write_to = "src/swig/_version.py"
26 changes: 0 additions & 26 deletions setup.py

This file was deleted.