Skip to content

Commit aa55cc2

Browse files
authored
Merge pull request #4 from dihm/project_updates
Add osx-arm64 builds
2 parents 8674016 + 6ed7068 commit aa55cc2

File tree

6 files changed

+99
-84
lines changed

6 files changed

+99
-84
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111

1212
env:
1313
PACKAGE_NAME: labscript-c-extensions
14-
SCM_LOCAL_SCHEME: no-local-version
1514
ANACONDA_USER: labscript-suite
1615

1716
# Configuration for a package with compiled extensions:
@@ -35,36 +34,42 @@ jobs:
3534
name: Build
3635
runs-on: ${{ matrix.os }}
3736
strategy:
37+
fail-fast: false
3838
matrix:
3939
include:
40+
- { os: ubuntu-latest, python: '3.12', arch: x64, conda: true}
4041
- { os: ubuntu-latest, python: '3.11', arch: x64, conda: true}
4142
- { os: ubuntu-latest, python: '3.10', arch: x64, conda: true }
4243
- { os: ubuntu-latest, python: '3.9', arch: x64, conda: true }
4344
- { os: ubuntu-latest, python: '3.8', arch: x64, conda: true }
44-
- { os: ubuntu-latest, python: '3.7', arch: x64, conda: true }
4545

46-
- { os: macos-11, python: '3.11', arch: x64, conda: true }
47-
- { os: macos-11, python: '3.10', arch: x64, conda: true }
48-
- { os: macos-11, python: '3.9', arch: x64, conda: true }
49-
- { os: macos-11, python: '3.8', arch: x64, conda: true }
50-
- { os: macos-11, python: '3.7', arch: x64, conda: true }
46+
- { os: macos-13, python: '3.12', arch: x64, conda: true }
47+
- { os: macos-13, python: '3.11', arch: x64, conda: true }
48+
- { os: macos-13, python: '3.10', arch: x64, conda: true }
49+
- { os: macos-13, python: '3.9', arch: x64, conda: true }
50+
- { os: macos-13, python: '3.8', arch: x64, conda: true }
5151

52+
- { os: macos-latest, python: '3.12', arch: arm64, conda: true }
53+
- { os: macos-latest, python: '3.11', arch: arm64, conda: true }
54+
- { os: macos-latest, python: '3.10', arch: arm64, conda: true }
55+
- { os: macos-latest, python: '3.9', arch: arm64, conda: true }
56+
57+
- { os: windows-latest, python: '3.12', arch: x64, conda: true }
5258
- { os: windows-latest, python: '3.11', arch: x64, conda: true }
5359
- { os: windows-latest, python: '3.10', arch: x64, conda: true }
5460
- { os: windows-latest, python: '3.9', arch: x64, conda: true }
5561
- { os: windows-latest, python: '3.8', arch: x64, conda: true }
56-
- { os: windows-latest, python: '3.7', arch: x64, conda: true }
5762

63+
- { os: windows-latest, python: '3.12', arch: x86, conda: false } # conda not yet available
5864
- { os: windows-latest, python: '3.11', arch: x86, conda: false } # conda not yet available
5965
- { os: windows-latest, python: '3.10', arch: x86, conda: true }
6066
- { os: windows-latest, python: '3.9', arch: x86, conda: true }
6167
- { os: windows-latest, python: '3.8', arch: x86, conda: true }
62-
- { os: windows-latest, python: '3.7', arch: x86, conda: true }
6368

6469
if: github.repository == 'labscript-suite/labscript-c-extensions' && (github.event_name != 'create' || github.event.ref_type != 'branch')
6570
steps:
6671
- name: Checkout
67-
uses: actions/checkout@v3
72+
uses: actions/checkout@v4
6873
with:
6974
fetch-depth: 0
7075

@@ -73,7 +78,7 @@ jobs:
7378
run: git tag -d $(git tag --points-at HEAD)
7479

7580
- name: Install Python
76-
uses: actions/setup-python@v4
81+
uses: actions/setup-python@v5
7782
with:
7883
python-version: ${{ matrix.python }}
7984
architecture: ${{ matrix.arch }}
@@ -93,9 +98,9 @@ jobs:
9398
9499
- name: Upload Artifact
95100
if: strategy.job-index == 0 || (env.PURE == 'false' && runner.os != 'Linux')
96-
uses: actions/upload-artifact@v3
101+
uses: actions/upload-artifact@v4
97102
with:
98-
name: dist
103+
name: dist-${{ matrix.os }}_${{ matrix.arch }}-py${{ matrix.python}}
99104
path: ./dist
100105

101106
- name: Set Variables for Conda Build
@@ -111,19 +116,13 @@ jobs:
111116
112117
- name: Install Miniconda
113118
if: matrix.conda
114-
uses: conda-incubator/setup-miniconda@v2
119+
uses: conda-incubator/setup-miniconda@v3
115120
with:
116121
auto-update-conda: true
117122
python-version: ${{ matrix.python }}
118123
architecture: ${{ matrix.arch }}
119124
miniconda-version: "latest"
120125

121-
- name: Workaround conda-build incompatibility with xcode 12+
122-
if: runner.os == 'macOS'
123-
uses: maxim-lobanov/setup-xcode@v1
124-
with:
125-
xcode-version: 11.7
126-
127126
- name: Conda package (Unix)
128127
if: (matrix.conda && runner.os != 'Windows')
129128
shell: bash -l {0}
@@ -140,9 +139,9 @@ jobs:
140139
141140
- name: Upload Artifact
142141
if: matrix.conda
143-
uses: actions/upload-artifact@v3
142+
uses: actions/upload-artifact@v4
144143
with:
145-
name: conda_packages
144+
name: conda_packages-${{ matrix.os }}_${{ matrix.arch }}-py${{ matrix.python}}
146145
path: ./conda_packages
147146

148147

@@ -153,7 +152,7 @@ jobs:
153152
steps:
154153
- name: Checkout
155154
if: env.PURE == 'false'
156-
uses: actions/checkout@v3
155+
uses: actions/checkout@v4
157156
with:
158157
fetch-depth: 0
159158

@@ -163,14 +162,14 @@ jobs:
163162

164163
- name: Build Manylinux Wheels
165164
if: env.PURE == 'false'
166-
uses: RalfG/python-wheels-manylinux-build@v0.4.2
165+
uses: RalfG/python-wheels-manylinux-build@v0.7.1
167166
with:
168-
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311'
167+
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312'
169168
pre-build-command: 'git config --global --add safe.directory "*"'
170169

171170
- name: Upload Artifact
172171
if: env.PURE == 'false'
173-
uses: actions/upload-artifact@v3
172+
uses: actions/upload-artifact@v4
174173
with:
175174
name: dist
176175
path: dist/*manylinux*.whl
@@ -181,17 +180,19 @@ jobs:
181180
needs: [build, manylinux]
182181
steps:
183182

184-
- name: Download Artifact
185-
uses: actions/download-artifact@v3
183+
- name: Download Wheels and Source
184+
uses: actions/download-artifact@v4
186185
with:
187-
name: dist
186+
pattern: dist*
188187
path: ./dist
188+
merge-multiple: true
189189

190-
- name: Download Artifact
191-
uses: actions/download-artifact@v3
190+
- name: Download Conda Packages
191+
uses: actions/download-artifact@v4
192192
with:
193-
name: conda_packages
193+
pattern: conda_packages-*
194194
path: ./conda_packages
195+
merge-multiple: true
195196

196197
- name: Get Version Number
197198
if: github.event.ref_type == 'tag'
@@ -226,7 +227,7 @@ jobs:
226227
password: ${{ secrets.pypi }}
227228

228229
- name: Install Miniconda
229-
uses: conda-incubator/setup-miniconda@v2
230+
uses: conda-incubator/setup-miniconda@v3
230231
with:
231232
auto-update-conda: true
232233

LICENSE renamed to LICENSE.txt

File renamed without changes.

labscript_c_extensions/__version__.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,28 @@
1010
# root of the project for the full license. #
1111
# #
1212
#####################################################################
13-
import os
1413
from pathlib import Path
1514
try:
1615
import importlib.metadata as importlib_metadata
1716
except ImportError:
1817
import importlib_metadata
1918

20-
VERSION_SCHEME = {
21-
"version_scheme": os.getenv("SCM_VERSION_SCHEME", "guess-next-dev"),
22-
"local_scheme": os.getenv("SCM_LOCAL_SCHEME", "node-and-date"),
23-
}
24-
2519
root = Path(__file__).parent.parent
2620
if (root / '.git').is_dir():
27-
from setuptools_scm import get_version
28-
__version__ = get_version(root, **VERSION_SCHEME)
21+
try:
22+
from setuptools_scm import get_version
23+
VERSION_SCHEME = {
24+
"version_scheme": "guess-next-dev",
25+
"local_scheme": "node-and-date",
26+
}
27+
scm_version = get_version(root, **VERSION_SCHEME)
28+
except ImportError:
29+
scm_version = None
30+
else:
31+
scm_version = None
32+
33+
if scm_version is not None:
34+
__version__ = scm_version
2935
else:
3036
try:
3137
__version__ = importlib_metadata.version(__package__)

pyproject.toml

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "setuptools_scm", "cython"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["setuptools>=64", "wheel", "setuptools_scm>=8", "cython",
3+
"oldest-supported-numpy; python_version<='3.8'",
4+
"numpy>=2.0,<3; python_version>'3.8'"]
5+
build-backend = "setuptools.build_meta"
6+
7+
[tool.setuptools_scm]
8+
version_scheme = "guess-next-dev"
9+
local_scheme = "no-local-version"
10+
11+
[tool.setuptools]
12+
zip-safe = false
13+
include-package-data = true
14+
15+
[tool.setuptools.packages]
16+
find = {namespaces = false}
17+
18+
19+
[project]
20+
name = "labscript-c-extensions"
21+
description = "A module containing C-extensions for the labscript suite"
22+
authors = [
23+
{name = "The labscript suite community", email = "[email protected]"},
24+
]
25+
keywords = ["experiment control", "automation", "visualization"]
26+
license = {file = 'LICENSE.txt'}
27+
classifiers = [
28+
"License :: OSI Approved :: BSD License",
29+
"Programming Language :: Python :: 3 :: Only",
30+
"Programming Language :: Python :: 3.8",
31+
"Programming Language :: Python :: 3.9",
32+
"Programming Language :: Python :: 3.10",
33+
"Programming Language :: Python :: 3.11",
34+
"Programming Language :: Python :: 3.12",
35+
]
36+
requires-python = ">=3.8"
37+
dependencies = [
38+
"importlib_metadata",
39+
"numpy>=1.17.3",
40+
]
41+
dynamic = ["version"]
42+
43+
[project.readme]
44+
file = "README.md"
45+
content-type = "text/markdown"
46+
47+
[project.urls]
48+
Homepage = "http://labscriptsuite.org/"
49+
Documentation = "https://docs.labscriptsuite.org/"
50+
Repository = "https://github.com/labscript-suite/labscript-c-extension/"
51+
Downloads = "https://github.com/labscript-suite/labscript-c-extension/releases/"
52+
Tracker = "https://github.com/labscript-suite/labscript-c-extension/issues/"

setup.cfg

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

setup.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@
66

77
CMDCLASS = {"build_ext": build_ext}
88

9-
10-
VERSION_SCHEME = {
11-
"version_scheme": os.getenv("SCM_VERSION_SCHEME", "guess-next-dev"),
12-
"local_scheme": os.getenv("SCM_LOCAL_SCHEME", "node-and-date"),
13-
}
14-
15-
169
EXT_MODULES = [
1710
Extension(
1811
"labscript_c_extensions.runviewer.resample",
@@ -21,7 +14,6 @@
2114
]
2215

2316
setup(
24-
use_scm_version=VERSION_SCHEME,
2517
cmdclass=CMDCLASS,
2618
ext_modules=EXT_MODULES,
2719
)

0 commit comments

Comments
 (0)