Skip to content

Commit e7bdf2d

Browse files
authored
Merge pull request #17 from SciKit-Surgery/py313
Uses https://github.com/pypa/cibuildwheel to build wheels for many targets.
2 parents 1fd38ab + 206f075 commit e7bdf2d

7 files changed

Lines changed: 69 additions & 117 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

.github/workflows/wheels.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
on: push
2+
3+
jobs:
4+
build_wheels:
5+
name: Build wheels on ${{ matrix.os }}
6+
runs-on: ${{ matrix.os }}
7+
strategy:
8+
matrix:
9+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-15-intel, macos-latest]
10+
11+
steps:
12+
- uses: actions/checkout@v6
13+
with:
14+
persist-credentials: false
15+
16+
# Used to host cibuildwheel
17+
- uses: actions/setup-python@v6
18+
19+
- name: Install cibuildwheel
20+
run: python -m pip install cibuildwheel==4.0.0
21+
22+
- name: Build wheels
23+
run: python -m cibuildwheel --output-dir wheelhouse
24+
# to supply options, put them in 'env', like:
25+
# env:
26+
# CIBW_SOME_OPTION: value
27+
# ...
28+
29+
- uses: actions/upload-artifact@v6
30+
with:
31+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
32+
path: ./wheelhouse/*.whl
33+
34+
make_sdist:
35+
name: Make SDist
36+
runs-on: ubuntu-slim
37+
steps:
38+
- uses: actions/checkout@v6
39+
with:
40+
persist-credentials: false
41+
42+
- name: Build SDist
43+
run: pipx run build --sdist
44+
45+
- uses: actions/upload-artifact@v4
46+
with:
47+
name: cibw-sdist
48+
path: dist/*.tar.gz
49+
50+
51+
upload_all:
52+
needs: [build_wheels, make_sdist]
53+
environment: pypi
54+
permissions:
55+
id-token: write
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/download-artifact@v5
59+
with:
60+
pattern: cibw-*
61+
path: dist
62+
merge-multiple: true
63+
64+
- uses: pypa/gh-action-pypi-publish@release/v1
65+
with:
66+
password: ${{ secrets.PYPI_API_TOKEN }}
67+
skip-existing: true

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
.idea
22
CMakeLists.txt.user
3-
/ndicapiExport.h
43
/build
5-
setup.py

CMakeLists.txt

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CMAKE_MINIMUM_REQUIRED(VERSION 4.0.0)
22
PROJECT(ndicapi)
33

4-
SET(ndicapi_VERSION 3.7.3)
4+
SET(ndicapi_VERSION 3.7.4)
55

66
# --------------------------------------------------------------------------
77
# Configure output paths for libraries and executables.
@@ -65,20 +65,6 @@ IF(BUILD_PYTHON)
6565
" shared library (CMake option BUILD_SHARED_LIBS)."
6666
)
6767
ENDIF()
68-
SET(SETUP_PY_FILEPATH ${CMAKE_CURRENT_SOURCE_DIR}/setup.py)
69-
CONFIGURE_FILE(
70-
${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
71-
${SETUP_PY_FILEPATH}
72-
)
73-
MESSAGE(
74-
"Successfully generated ${SETUP_PY_FILEPATH} for the Python"
75-
" extension module. To install the Python extension module:"
76-
"\n\t0) Install the C++ library: make && make install"
77-
" (might need admin access)"
78-
"\n\t1) Go to ${CMAKE_CURRENT_SOURCE_DIR}"
79-
"\n\t2) Build and install the Python extension:"
80-
" python setup.py install (might require admin access)"
81-
)
8268
ENDIF()
8369

8470
FIND_PACKAGE(Threads)

MANIFEST.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
include *.cxx
22
include *.h
33
include README.pypi.md
4-
include ndicapiExport.h.in
54
include CMakeLists.txt
65
include ndicapiConfig.cmake.in
76
include ndicapiConfigVersion.cmake.in
8-
include ndicapiExport.h.in
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#ifndef __ndicapiExport_h
1313
#define __ndicapiExport_h
1414

15-
#cmakedefine ndicapi_STATIC
16-
1715
#if defined(WIN32) && !defined(ndicapi_STATIC)
1816
#if defined(ndicapi_EXPORTS)
1917
#define ndicapiExport __declspec( dllexport )

setup.py.in renamed to setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
)
3333

3434
setuptools.setup(name='ndicapi',
35-
version='3.7.3',
35+
version='3.7.4',
3636
url='https://github.com/SciKit-Surgery/ndicapi',
3737
license='MIT',
3838
description='This package allows interfacing with NDI tracking devices',

0 commit comments

Comments
 (0)