labscript-c-extensions 1.2.0__tar.gz → 1.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. labscript_c_extensions-1.2.1/.github/workflows/release-vars.sh +47 -0
  2. labscript_c_extensions-1.2.1/.github/workflows/release.yml +447 -0
  3. {labscript_c_extensions-1.2.0/labscript_c_extensions.egg-info → labscript_c_extensions-1.2.1}/PKG-INFO +3 -8
  4. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1/labscript_c_extensions.egg-info}/PKG-INFO +3 -8
  5. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/labscript_c_extensions.egg-info/SOURCES.txt +1 -0
  6. labscript_c_extensions-1.2.1/labscript_c_extensions.egg-info/requires.txt +1 -0
  7. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/pyproject.toml +1 -7
  8. labscript_c_extensions-1.2.0/.github/workflows/release.yml +0 -259
  9. labscript_c_extensions-1.2.0/labscript_c_extensions.egg-info/requires.txt +0 -2
  10. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/.gitignore +0 -0
  11. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/LICENSE.txt +0 -0
  12. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/README.md +0 -0
  13. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/labscript_c_extensions/__init__.py +0 -0
  14. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/labscript_c_extensions/__version__.py +0 -0
  15. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/labscript_c_extensions/runviewer/__init__.py +0 -0
  16. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/labscript_c_extensions.egg-info/dependency_links.txt +0 -0
  17. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/labscript_c_extensions.egg-info/not-zip-safe +0 -0
  18. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/labscript_c_extensions.egg-info/top_level.txt +0 -0
  19. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/setup.cfg +0 -0
  20. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/setup.py +0 -0
  21. {labscript_c_extensions-1.2.0 → labscript_c_extensions-1.2.1}/src/runviewer/resample.pyx +0 -0
@@ -0,0 +1,47 @@
1
+ # This repository. PyPI and Anaconda test and release package uploads are only done if
2
+ # the repository the workflow is running in matches this (i.e. is not a fork). Optional,
3
+ # if not set, package uploads are skipped.
4
+ export RELEASE_REPO="labscript-suite/labscript-c-extensions"
5
+
6
+ # Username with which to upload conda packages. If not given, anaconda uploads are
7
+ # skipped.
8
+ export ANACONDA_USER="labscript-suite"
9
+
10
+ # Whether (true or false) to upload releases to PyPI, non-releases to Test PyPI,
11
+ # releases to Anaconda, non-releases to Anaconda test label. Only used if the repository
12
+ # the workflow is running in matches RELEASE_REPO, otherwise uploads are skipped.
13
+ # Anaconda uploads require ANACONDA_USER be specified and ANACONDA_API_TOKEN secret be
14
+ # set. Optional, all default to true.
15
+ export PYPI_UPLOAD=""
16
+ export TESTPYPI_UPLOAD=""
17
+ export ANACONDA_UPLOAD=""
18
+ export TEST_ANACONDA_UPLOAD=""
19
+
20
+ # Which Python version to use for pure wheel builds, sdists, and as the host Python for
21
+ # cibuildwheel. Optional, defaults to the second-most recent minor Python version.
22
+ export DEFAULT_PYTHON=""
23
+
24
+ # Comma-separated list of Python versions to build conda packages for. Only used if
25
+ # HAS_ENV_MARKERS=true or PURE=false, otherwise a noarch conda package is built instead.
26
+ # Optional, defaults to all non-end-of-life stable Python minor versions.
27
+ export CONDA_PYTHONS=""
28
+
29
+ # Environment variable set in the envionment that `cibuildwheel` runs in instructing it
30
+ # which Pythons to build for, as a space-separated list of specifiers in the format
31
+ # specified by `cibuildwheel`. Only used if PURE=false. Optional, defaults to all
32
+ # non-end-of-life stable CPython versions.
33
+ export CIBW_BUILD=""
34
+
35
+ # Name of Python package. Optional, defaults to name from the package metadata
36
+ export PKGNAME=""
37
+
38
+ # Version of Python package. Optional, defaults to version from the package metadata
39
+ export PKGVER=""
40
+
41
+ # Whether the Python package is pure (true) or impure (false). Optional, defaults to
42
+ # false if the setuptools package has extension modules or libraries, otherwise true.
43
+ export PURE=""
44
+
45
+ # Whether (true or false) the Python package has dependencies that vary by platform or
46
+ # Python version. Optional, Defaults to presence of env markers in package metadata.
47
+ export HAS_ENV_MARKERS=""
@@ -0,0 +1,447 @@
1
+ name: Build and Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ - maintenance/*
8
+ tags:
9
+ - 'v[0-9]+.[0-9]+.[0-9]+*'
10
+
11
+ env:
12
+ OS_LIST_UBUNTU: '["ubuntu-latest"]'
13
+ OS_LIST_ALL: '["ubuntu-latest", "windows-latest", "macos-latest", "macos-13"]'
14
+
15
+
16
+ jobs:
17
+ configure:
18
+ name: Configure workflow run
19
+ runs-on: ubuntu-latest
20
+ outputs:
21
+ DEFAULT_PYTHON: ${{ steps.config.outputs.DEFAULT_PYTHON }}
22
+ CIBW_BUILD: ${{ steps.config.outputs.CIBW_BUILD }}
23
+ PKGNAME: ${{ steps.config.outputs.PKGNAME }}
24
+ PKGVER: ${{ steps.config.outputs.PKGVER }}
25
+ PURE: ${{ steps.config.outputs.PURE }}
26
+ ANACONDA_USER: ${{ steps.config.outputs.ANACONDA_USER }}
27
+ CONDA_BUILD_ARGS: ${{ steps.config.outputs.CONDA_BUILD_ARGS }}
28
+ BUILD_OS_LIST: ${{ steps.config.outputs.BUILD_OS_LIST }}
29
+ RELEASE: ${{ steps.config.outputs.RELEASE }}
30
+ TESTPYPI_UPLOAD_THIS_RUN: ${{ steps.config.outputs.TESTPYPI_UPLOAD_THIS_RUN }}
31
+ PYPI_UPLOAD_THIS_RUN: ${{ steps.config.outputs.PYPI_UPLOAD_THIS_RUN }}
32
+ TEST_ANACONDA_UPLOAD_THIS_RUN: ${{ steps.config.outputs.TEST_ANACONDA_UPLOAD_THIS_RUN }}
33
+ ANACONDA_UPLOAD_THIS_RUN: ${{ steps.config.outputs.ANACONDA_UPLOAD_THIS_RUN }}
34
+
35
+ steps:
36
+ - name: Checkout
37
+ uses: actions/checkout@v4
38
+ with:
39
+ fetch-depth: 0
40
+
41
+ - name: Ignore Tags for non-tag pushes
42
+ if: "!startsWith(github.ref, 'refs/tags/')"
43
+ run: git tag -d $(git tag --points-at HEAD)
44
+
45
+ - name: Install Python
46
+ uses: actions/setup-python@v5
47
+ with:
48
+ python-version: '3.x'
49
+
50
+ - name: Configure workflow
51
+ id: config
52
+ run: |
53
+ pip install ci-helper cython
54
+
55
+ # Load repo-specific variables and overrides:
56
+ VARS_FILE=".github/workflows/release-vars.sh"
57
+ if [ -f "${VARS_FILE}" ]; then
58
+ source "${VARS_FILE}"
59
+ fi
60
+
61
+ # Python version used to build sdists, pure wheels, and as host Python for
62
+ # `cibuildwheel`:
63
+ if [ -z "${DEFAULT_PYTHON}" ]; then
64
+ # Default to second-most recent supported Python version:
65
+ DEFAULT_PYTHON=$(ci-helper defaultpython)
66
+ fi
67
+
68
+ # Versions of Python to build conda packages for:
69
+ if [ -z "${CONDA_PYTHONS}" ]; then
70
+ # Default to all supported Python versions:
71
+ CONDA_PYTHONS=$(ci-helper pythons)
72
+ fi
73
+
74
+ # Env var for `cibuildwheel` specifying target Python versions:
75
+ if [ -z "${CIBW_BUILD}" ]; then
76
+ # default to all supported CPython versions:
77
+ CIBW_BUILD=$(ci-helper pythons --cibw)
78
+ fi
79
+
80
+ # Package name and version
81
+ if [ -z "${PKGNAME}" ]; then
82
+ # Default to package name from project metadata:
83
+ PKGNAME=$(ci-helper distinfo name .)
84
+ fi
85
+ if [ -z "${PKGVER}" ]; then
86
+ # Default to package version from project metadata:
87
+ PKGVER=$(ci-helper distinfo version .)
88
+ fi
89
+
90
+ # Whether the package is pure python
91
+ if [ -z "${PURE}" ]; then
92
+ # Default to whether the setuptools package declares no modules/libraries:
93
+ PURE=$(ci-helper distinfo is_pure .)
94
+ fi
95
+
96
+ # Whether the package requirements depend on platform or Python version:
97
+ if [ -z "${HAS_ENV_MARKERS}" ]; then
98
+ # Default to the presence of env markers in package metadata:
99
+ HAS_ENV_MARKERS=$(ci-helper distinfo has_env_markers .)
100
+ fi
101
+
102
+ # List of OSs we need to run the build job on and arguments to
103
+ # `setuptools-conda build`:
104
+ if [[ "${PURE}" == false || "${HAS_ENV_MARKERS}" == true ]]; then
105
+ BUILD_OS_LIST="${OS_LIST_ALL}"
106
+ CONDA_BUILD_ARGS="--pythons=${CONDA_PYTHONS}"
107
+ else
108
+ BUILD_OS_LIST="${OS_LIST_UBUNTU}"
109
+ CONDA_BUILD_ARGS="--noarch"
110
+ fi
111
+
112
+ # Release if a tag was pushed:
113
+ if [ "${{ contains(github.ref, '/tags') }}" == true ]; then
114
+ RELEASE=true
115
+ else
116
+ RELEASE=false
117
+ fi
118
+
119
+ # What types of package uploads are enabled:
120
+ if [ -z "${PYPI_UPLOAD}" ]; then
121
+ PYPI_UPLOAD=true
122
+ else
123
+ PYPI_UPLOAD=false
124
+ fi
125
+ if [ -z "${TESTPYPI_UPLOAD}" ]; then
126
+ TESTPYPI_UPLOAD=true
127
+ else
128
+ TESTPYPI_UPLOAD=false
129
+ fi
130
+ if [ -z "${ANACONDA_UPLOAD}" ]; then
131
+ ANACONDA_UPLOAD=true
132
+ else
133
+ ANACONDA_UPLOAD=false
134
+ fi
135
+ if [ -z "${TEST_ANACONDA_UPLOAD}" ]; then
136
+ TEST_ANACONDA_UPLOAD=true
137
+ else
138
+ TEST_ANACONDA_UPLOAD=false
139
+ fi
140
+
141
+ if [ "${{ github.repository }}" != "${RELEASE_REPO}" ]; then
142
+ echo "Workflow repo doesn't match ${RELEASE_REPO}, disabling package uploads"
143
+ PYPI_UPLOAD=false
144
+ TESTPYPI_UPLOAD=false
145
+ ANACONDA_UPLOAD=false
146
+ TEST_ANACONDA_UPLOAD=false
147
+ fi
148
+
149
+ # If Anaconda uploads enabled, check necessary username and token are
150
+ # available:
151
+ if [[ "${ANACONDA_UPLOAD}" == true || "${TEST_ANACONDA_UPLOAD}" == true ]]; then
152
+ if [ -z "${{ secrets.ANACONDA_API_TOKEN }}" ]; then
153
+ echo "Anaconda uploads enabled but ANACONDA_API_TOKEN secret not set"
154
+ exit 1
155
+ fi
156
+ if [ -z "${ANACONDA_USER}" ]; then
157
+ echo "Anaconda uploads enabled but ANACONDA_USER not set"
158
+ exit 1
159
+ fi
160
+ fi
161
+
162
+ # If enabled, upload releases to PyPI and Anaconda:
163
+ if [[ "${RELEASE}" == true && "${PYPI_UPLOAD}" == true ]]; then
164
+ PYPI_UPLOAD_THIS_RUN=true
165
+ else
166
+ PYPI_UPLOAD_THIS_RUN=false
167
+ fi
168
+ if [[ "${RELEASE}" == true && "${ANACONDA_UPLOAD}" == true ]]; then
169
+ ANACONDA_UPLOAD_THIS_RUN=true
170
+ else
171
+ ANACONDA_UPLOAD_THIS_RUN=false
172
+ fi
173
+
174
+ # If enabled, upload non-releases to Test PyPI and Anaconda test label:
175
+ if [[ "${RELEASE}" == false && "${TESTPYPI_UPLOAD}" == true ]]; then
176
+ TESTPYPI_UPLOAD_THIS_RUN=true
177
+ else
178
+ TESTPYPI_UPLOAD_THIS_RUN=false
179
+ fi
180
+ if [[ "${RELEASE}" == false && "${TEST_ANACONDA_UPLOAD}" == true ]]; then
181
+ TEST_ANACONDA_UPLOAD_THIS_RUN=true
182
+ else
183
+ TEST_ANACONDA_UPLOAD_THIS_RUN=false
184
+ fi
185
+
186
+ echo "DEFAULT_PYTHON=${DEFAULT_PYTHON}" >> "${GITHUB_OUTPUT}"
187
+ echo "CIBW_BUILD=${CIBW_BUILD}" >> "${GITHUB_OUTPUT}"
188
+ echo "PKGNAME=${PKGNAME}" >> "${GITHUB_OUTPUT}"
189
+ echo "PKGVER=${PKGVER}" >> "${GITHUB_OUTPUT}"
190
+ echo "PURE=${PURE}" >> "${GITHUB_OUTPUT}"
191
+ echo "ANACONDA_USER=${ANACONDA_USER}" >> "${GITHUB_OUTPUT}"
192
+ echo "CONDA_BUILD_ARGS=${CONDA_BUILD_ARGS}" >> "${GITHUB_OUTPUT}"
193
+ echo "BUILD_OS_LIST=${BUILD_OS_LIST}" >> "${GITHUB_OUTPUT}"
194
+ echo "RELEASE=${RELEASE}" >> "${GITHUB_OUTPUT}"
195
+ echo "TESTPYPI_UPLOAD_THIS_RUN=${TESTPYPI_UPLOAD_THIS_RUN}" >> "${GITHUB_OUTPUT}"
196
+ echo "PYPI_UPLOAD_THIS_RUN=${PYPI_UPLOAD_THIS_RUN}" >> "${GITHUB_OUTPUT}"
197
+ echo "TEST_ANACONDA_UPLOAD_THIS_RUN=${TEST_ANACONDA_UPLOAD_THIS_RUN}" >> "${GITHUB_OUTPUT}"
198
+ echo "ANACONDA_UPLOAD_THIS_RUN=${ANACONDA_UPLOAD_THIS_RUN}" >> "${GITHUB_OUTPUT}"
199
+
200
+ echo
201
+ echo "=========================="
202
+ echo "Workflow run configuration:"
203
+ echo "--------------------------"
204
+ cat "${GITHUB_OUTPUT}"
205
+ echo "=========================="
206
+ echo
207
+
208
+
209
+ build:
210
+ name: Build
211
+ runs-on: ${{ matrix.os }}
212
+ needs: configure
213
+ strategy:
214
+ matrix:
215
+ os: ${{ fromJSON(needs.configure.outputs.BUILD_OS_LIST) }}
216
+
217
+ env:
218
+ DEFAULT_PYTHON: ${{ needs.configure.outputs.DEFAULT_PYTHON }}
219
+ CIBW_BUILD: ${{ needs.configure.outputs.CIBW_BUILD }}
220
+ PURE: ${{ needs.configure.outputs.PURE }}
221
+ CONDA_BUILD_ARGS: ${{ needs.configure.outputs.CONDA_BUILD_ARGS }}
222
+
223
+ steps:
224
+ - name: Checkout
225
+ uses: actions/checkout@v4
226
+ with:
227
+ fetch-depth: 0
228
+
229
+ - name: Ignore Tags for non-tag pushes
230
+ if: "!startsWith(github.ref, 'refs/tags/')"
231
+ run: git tag -d $(git tag --points-at HEAD)
232
+
233
+ - name: Install Python
234
+ uses: actions/setup-python@v5
235
+ with:
236
+ python-version: ${{ env.DEFAULT_PYTHON }}
237
+
238
+ - name: Install Python tools
239
+ run: python -m pip install --upgrade pip setuptools wheel build cibuildwheel
240
+
241
+ - name: Source distribution
242
+ if: strategy.job-index == 0
243
+ run: python -m build -s .
244
+
245
+ - name: Wheel distribution (pure)
246
+ if: env.PURE == 'true' && strategy.job-index == 0
247
+ run: python -m build -w .
248
+
249
+ - name: Wheel distribution (impure)
250
+ if: env.PURE == 'false'
251
+ run: cibuildwheel --output-dir dist
252
+
253
+ - name: Upload artifact
254
+ if: env.PURE == 'false' || strategy.job-index == 0
255
+ uses: actions/upload-artifact@v4
256
+ with:
257
+ name: dist-${{ matrix.os }}
258
+ path: ./dist
259
+ if-no-files-found: error
260
+
261
+ - name: Install Miniforge
262
+ uses: conda-incubator/setup-miniconda@v3
263
+ with:
264
+ miniforge-version: "latest"
265
+ auto-update-conda: true
266
+ conda-remove-defaults: true
267
+ auto-activate-base: true
268
+ activate-environment: ""
269
+
270
+ - name: Conda package
271
+ shell: bash -l {0}
272
+ run: |
273
+ if [ "${{ runner.os }}" == Windows ]; then
274
+ # Short path to minimise odds of hitting Windows max path length
275
+ CONDA_BUILD_ARGS+=" --croot ${{ runner.temp }}\cb"
276
+ fi
277
+ conda install -c labscript-suite setuptools-conda "conda-build<25"
278
+ setuptools-conda build $CONDA_BUILD_ARGS .
279
+
280
+ - name: Upload artifact
281
+ uses: actions/upload-artifact@v4
282
+ with:
283
+ name: conda_packages-${{ matrix.os }}
284
+ path: ./conda_packages
285
+ if-no-files-found: error
286
+
287
+
288
+ github-release:
289
+ name: Publish release (GitHub)
290
+ runs-on: ubuntu-latest
291
+ needs: [configure, build]
292
+ if: ${{ needs.configure.outputs.RELEASE == 'true' }}
293
+ permissions:
294
+ contents: write
295
+ env:
296
+ PKGNAME: ${{ needs.configure.outputs.PKGNAME }}
297
+ PKGVER: ${{ needs.configure.outputs.PKGVER }}
298
+
299
+ steps:
300
+ - name: Download Artifact
301
+ uses: actions/download-artifact@v4
302
+ with:
303
+ pattern: dist*
304
+ path: ./dist
305
+ merge-multiple: true
306
+
307
+ - name: Create GitHub release and upload release asset
308
+ uses: softprops/action-gh-release@v2
309
+ env:
310
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
311
+ with:
312
+ tag_name: ${{ github.event.ref }}
313
+ name: ${{ env.PKGNAME }} ${{ env.PKGVER }}
314
+ draft: true
315
+ prerelease: ${{ contains(github.event.ref, 'rc') }}
316
+ files: ./dist/*.tar.gz
317
+
318
+
319
+ testpypi-upload:
320
+ name: Publish on Test PyPI
321
+ runs-on: ubuntu-latest
322
+ needs: [configure, build]
323
+ if: ${{ needs.configure.outputs.TESTPYPI_UPLOAD_THIS_RUN == 'true' }}
324
+ env:
325
+ PKGNAME: ${{ needs.configure.outputs.PKGNAME }}
326
+ PKGVER: ${{ needs.configure.outputs.PKGVER }}
327
+ environment:
328
+ name: testpypi
329
+ url: https://test.pypi.org/project/${{ env.PKGNAME }}/${{ env.PKGVER }}
330
+ permissions:
331
+ id-token: write
332
+
333
+ steps:
334
+ - name: Download Artifact
335
+ uses: actions/download-artifact@v4
336
+ with:
337
+ pattern: dist*
338
+ path: ./dist
339
+ merge-multiple: true
340
+
341
+ - name: Publish on TestPyPI
342
+ uses: pypa/gh-action-pypi-publish@release/v1
343
+ with:
344
+ repository-url: https://test.pypi.org/legacy/
345
+
346
+
347
+ pypi-upload:
348
+ name: Publish on PyPI
349
+ runs-on: ubuntu-latest
350
+ needs: [configure, build]
351
+ if: ${{ needs.configure.outputs.PYPI_UPLOAD_THIS_RUN == 'true' }}
352
+ env:
353
+ PKGNAME: ${{ needs.configure.outputs.PKGNAME }}
354
+ PKGVER: ${{ needs.configure.outputs.PKGVER }}
355
+ environment:
356
+ name: pypi
357
+ url: https://pypi.org/project/${{ env.PKGNAME }}/${{ env.PKGVER }}
358
+ permissions:
359
+ id-token: write
360
+
361
+ steps:
362
+ - name: Download Artifact
363
+ uses: actions/download-artifact@v4
364
+ with:
365
+ pattern: dist*
366
+ path: ./dist
367
+ merge-multiple: true
368
+
369
+ - name: Publish on PyPI
370
+ uses: pypa/gh-action-pypi-publish@release/v1
371
+
372
+
373
+ test-anaconda-upload:
374
+ name: Publish on Anaconda (test label)
375
+ runs-on: ubuntu-latest
376
+ needs: [configure, build]
377
+ if: ${{ needs.configure.outputs.TEST_ANACONDA_UPLOAD_THIS_RUN == 'true' }}
378
+
379
+ steps:
380
+ - name: Download Artifact
381
+ uses: actions/download-artifact@v4
382
+ with:
383
+ pattern: conda_packages-*
384
+ path: ./conda_packages
385
+ merge-multiple: true
386
+
387
+ - name: Install Miniforge
388
+ uses: conda-incubator/setup-miniconda@v3
389
+ with:
390
+ miniforge-version: "latest"
391
+ auto-update-conda: true
392
+ conda-remove-defaults: true
393
+ auto-activate-base: true
394
+ activate-environment: ""
395
+
396
+ - name: Install Anaconda cloud client
397
+ shell: bash -l {0}
398
+ run: conda install anaconda-client
399
+
400
+ - name: Publish to Anaconda test label
401
+ shell: bash -l {0}
402
+ run: |
403
+ anaconda \
404
+ --token ${{ secrets.ANACONDA_API_TOKEN }} \
405
+ upload \
406
+ --skip-existing \
407
+ --user ${{ needs.configure.outputs.ANACONDA_USER }} \
408
+ --label test \
409
+ conda_packages/*/*
410
+
411
+
412
+ anaconda-upload:
413
+ name: Publish on Anaconda
414
+ runs-on: ubuntu-latest
415
+ needs: [configure, build]
416
+ if: ${{ needs.configure.outputs.ANACONDA_UPLOAD_THIS_RUN == 'true' }}
417
+
418
+ steps:
419
+ - name: Download Artifact
420
+ uses: actions/download-artifact@v4
421
+ with:
422
+ pattern: conda_packages-*
423
+ path: ./conda_packages
424
+ merge-multiple: true
425
+
426
+ - name: Install Miniforge
427
+ uses: conda-incubator/setup-miniconda@v3
428
+ with:
429
+ miniforge-version: "latest"
430
+ auto-update-conda: true
431
+ conda-remove-defaults: true
432
+ auto-activate-base: true
433
+ activate-environment: ""
434
+
435
+ - name: Install Anaconda cloud client
436
+ shell: bash -l {0}
437
+ run: conda install anaconda-client
438
+
439
+ - name: Publish to Anaconda main
440
+ shell: bash -l {0}
441
+ run: |
442
+ anaconda \
443
+ --token ${{ secrets.ANACONDA_API_TOKEN }} \
444
+ upload \
445
+ --skip-existing \
446
+ --user ${{ needs.configure.outputs.ANACONDA_USER }} \
447
+ conda_packages/*/*
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: labscript-c-extensions
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: A module containing C-extensions for the labscript suite
5
5
  Author-email: The labscript suite community <labscriptsuite@googlegroups.com>
6
6
  License: BSD 2-Clause License
@@ -37,16 +37,11 @@ Project-URL: Tracker, https://github.com/labscript-suite/labscript-c-extension/i
37
37
  Keywords: experiment control,automation,visualization
38
38
  Classifier: License :: OSI Approved :: BSD License
39
39
  Classifier: Programming Language :: Python :: 3 :: Only
40
- Classifier: Programming Language :: Python :: 3.8
41
- Classifier: Programming Language :: Python :: 3.9
42
- Classifier: Programming Language :: Python :: 3.10
43
- Classifier: Programming Language :: Python :: 3.11
44
- Classifier: Programming Language :: Python :: 3.12
45
40
  Requires-Python: >=3.8
46
41
  Description-Content-Type: text/markdown
47
42
  License-File: LICENSE.txt
48
- Requires-Dist: importlib_metadata
49
43
  Requires-Dist: numpy>=1.17.3
44
+ Dynamic: license-file
50
45
 
51
46
  <img src="https://raw.githubusercontent.com/labscript-suite/labscript-suite/master/art/labscript_32nx32n.svg" height="64" alt="the labscript suite" align="right">
52
47
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: labscript-c-extensions
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: A module containing C-extensions for the labscript suite
5
5
  Author-email: The labscript suite community <labscriptsuite@googlegroups.com>
6
6
  License: BSD 2-Clause License
@@ -37,16 +37,11 @@ Project-URL: Tracker, https://github.com/labscript-suite/labscript-c-extension/i
37
37
  Keywords: experiment control,automation,visualization
38
38
  Classifier: License :: OSI Approved :: BSD License
39
39
  Classifier: Programming Language :: Python :: 3 :: Only
40
- Classifier: Programming Language :: Python :: 3.8
41
- Classifier: Programming Language :: Python :: 3.9
42
- Classifier: Programming Language :: Python :: 3.10
43
- Classifier: Programming Language :: Python :: 3.11
44
- Classifier: Programming Language :: Python :: 3.12
45
40
  Requires-Python: >=3.8
46
41
  Description-Content-Type: text/markdown
47
42
  License-File: LICENSE.txt
48
- Requires-Dist: importlib_metadata
49
43
  Requires-Dist: numpy>=1.17.3
44
+ Dynamic: license-file
50
45
 
51
46
  <img src="https://raw.githubusercontent.com/labscript-suite/labscript-suite/master/art/labscript_32nx32n.svg" height="64" alt="the labscript suite" align="right">
52
47
 
@@ -3,6 +3,7 @@ LICENSE.txt
3
3
  README.md
4
4
  pyproject.toml
5
5
  setup.py
6
+ .github/workflows/release-vars.sh
6
7
  .github/workflows/release.yml
7
8
  labscript_c_extensions/__init__.py
8
9
  labscript_c_extensions/__version__.py
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["setuptools>=64", "wheel", "setuptools_scm>=8", "cython",
2
+ requires = ["setuptools>=64", "setuptools_scm>=8", "cython",
3
3
  "numpy>=2.0,<3; python_version>'3.8'"]
4
4
  build-backend = "setuptools.build_meta"
5
5
 
@@ -26,15 +26,9 @@ license = {file = 'LICENSE.txt'}
26
26
  classifiers = [
27
27
  "License :: OSI Approved :: BSD License",
28
28
  "Programming Language :: Python :: 3 :: Only",
29
- "Programming Language :: Python :: 3.8",
30
- "Programming Language :: Python :: 3.9",
31
- "Programming Language :: Python :: 3.10",
32
- "Programming Language :: Python :: 3.11",
33
- "Programming Language :: Python :: 3.12",
34
29
  ]
35
30
  requires-python = ">=3.8"
36
31
  dependencies = [
37
- "importlib_metadata",
38
32
  "numpy>=1.17.3",
39
33
  ]
40
34
  dynamic = ["version"]
@@ -1,259 +0,0 @@
1
- name: Build and Release
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- - maintenance/*
8
- create:
9
- tags:
10
- - 'v[0-9]+.[0-9]+.[0-9]+*'
11
-
12
- env:
13
- PACKAGE_NAME: labscript_c_extensions
14
- ANACONDA_USER: labscript-suite
15
-
16
- # Configuration for a package with compiled extensions:
17
- PURE: false
18
- NOARCH: false
19
-
20
- # Configuration for a package with no extensions, but with dependencies that differ by
21
- # platform or Python version:
22
- # PURE: true
23
- # NOARCH: false
24
-
25
- # Configuration for a package with no extensions and the same dependencies on all
26
- # platforms and Python versions. For this configuration you should comment out all but
27
- # the first entry in the job matrix of the build job since multiple platforms are not
28
- # needed.
29
- # PURE: true
30
- # NOARCH: true
31
-
32
- jobs:
33
- build:
34
- name: Build
35
- runs-on: ${{ matrix.os }}
36
- strategy:
37
- fail-fast: false
38
- matrix:
39
- include:
40
- - { os: ubuntu-latest, python: '3.12', arch: x64, conda: true}
41
- - { os: ubuntu-latest, python: '3.11', arch: x64, conda: true}
42
- - { os: ubuntu-latest, python: '3.10', arch: x64, conda: true }
43
- - { os: ubuntu-latest, python: '3.9', arch: x64, conda: true }
44
- - { os: ubuntu-latest, python: '3.8', arch: x64, conda: true }
45
-
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 }
51
-
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 }
58
- - { os: windows-latest, python: '3.11', arch: x64, conda: true }
59
- - { os: windows-latest, python: '3.10', arch: x64, conda: true }
60
- - { os: windows-latest, python: '3.9', arch: x64, conda: true }
61
- - { os: windows-latest, python: '3.8', arch: x64, conda: true }
62
-
63
- - { os: windows-latest, python: '3.12', arch: x86, conda: false } # conda not yet available
64
- - { os: windows-latest, python: '3.11', arch: x86, conda: false } # conda not yet available
65
- - { os: windows-latest, python: '3.10', arch: x86, conda: false } # setuptools/setuptools-scm deps not met
66
- - { os: windows-latest, python: '3.9', arch: x86, conda: false } # setuptools/setuptools-scm deps not met
67
- - { os: windows-latest, python: '3.8', arch: x86, conda: false } # setuptools/setuptools-scm deps not met
68
-
69
- if: github.repository == 'labscript-suite/labscript-c-extensions' && (github.event_name != 'create' || github.event.ref_type != 'branch')
70
- steps:
71
- - name: Checkout
72
- uses: actions/checkout@v4
73
- with:
74
- fetch-depth: 0
75
-
76
- - name: Ignore Tags
77
- if: github.event.ref_type != 'tag'
78
- run: git tag -d $(git tag --points-at HEAD)
79
-
80
- - name: Install Python
81
- uses: actions/setup-python@v5
82
- with:
83
- python-version: ${{ matrix.python }}
84
- architecture: ${{ matrix.arch }}
85
-
86
- - name: Source Distribution
87
- if: strategy.job-index == 0
88
- run: |
89
- python -m pip install --upgrade pip setuptools wheel build
90
- python -m build -s .
91
-
92
- - name: Wheel Distribution
93
- # Impure Linux wheels are built in the manylinux job.
94
- if: (env.PURE == 'true' && strategy.job-index == 0) || (env.PURE == 'false' && runner.os != 'Linux')
95
- run: |
96
- python -m pip install --upgrade pip setuptools wheel build
97
- python -m build -w .
98
-
99
- - name: Upload Artifact
100
- if: strategy.job-index == 0 || (env.PURE == 'false' && runner.os != 'Linux')
101
- uses: actions/upload-artifact@v4
102
- with:
103
- name: dist-${{ matrix.os }}_${{ matrix.arch }}-py${{ matrix.python}}
104
- path: ./dist
105
-
106
- - name: Set Variables for Conda Build
107
- # build conda package from wheel
108
- # avoids conda build issues on github osx-x64 and win runners
109
- if: matrix.conda
110
- shell: bash
111
- run: |
112
- if [ $NOARCH == true ]; then
113
- CONDA_BUILD_ARGS="--noarch"
114
- else
115
- CONDA_BUILD_ARGS="--from-wheel"
116
- fi
117
- echo "CONDA_BUILD_ARGS=$CONDA_BUILD_ARGS" >> $GITHUB_ENV
118
-
119
- - name: Install Miniconda
120
- if: matrix.conda
121
- uses: conda-incubator/setup-miniconda@v3
122
- with:
123
- auto-update-conda: true
124
- python-version: ${{ matrix.python }}
125
- architecture: ${{ matrix.arch }}
126
- miniconda-version: "latest"
127
-
128
- - name: Conda package (Unix)
129
- if: (matrix.conda && runner.os != 'Windows')
130
- shell: bash -l {0}
131
- run: |
132
- conda install -c labscript-suite setuptools-conda
133
- setuptools-conda build $CONDA_BUILD_ARGS .
134
-
135
- - name: Conda Package (Windows)
136
- if: (matrix.conda && runner.os == 'Windows')
137
- shell: cmd /C CALL {0}
138
- run: |
139
- conda install -c labscript-suite setuptools-conda && ^
140
- setuptools-conda build %CONDA_BUILD_ARGS% --croot ${{ runner.temp }}\cb .
141
-
142
- - name: Upload Artifact
143
- if: matrix.conda
144
- uses: actions/upload-artifact@v4
145
- with:
146
- name: conda_packages-${{ matrix.os }}_${{ matrix.arch }}-py${{ matrix.python}}
147
- path: ./conda_packages
148
-
149
-
150
- manylinux:
151
- name: Build Manylinux
152
- runs-on: ubuntu-latest
153
- if: github.repository == 'labscript-suite/labscript-c-extensions' && (github.event_name != 'create' || github.event.ref_type != 'branch')
154
- steps:
155
- - name: Checkout
156
- if: env.PURE == 'false'
157
- uses: actions/checkout@v4
158
- with:
159
- fetch-depth: 0
160
-
161
- - name: Ignore Tags
162
- if: github.event.ref_type != 'tag' && env.PURE == 'false'
163
- run: git tag -d $(git tag --points-at HEAD)
164
-
165
- - name: Build Manylinux Wheels
166
- if: env.PURE == 'false'
167
- uses: RalfG/python-wheels-manylinux-build@v0.7.1
168
- with:
169
- python-versions: 'cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312'
170
- pre-build-command: 'git config --global --add safe.directory "*"'
171
-
172
- - name: Upload Artifact
173
- if: env.PURE == 'false'
174
- uses: actions/upload-artifact@v4
175
- with:
176
- name: dist
177
- path: dist/*manylinux*.whl
178
-
179
- release:
180
- name: Release
181
- runs-on: ubuntu-latest
182
- needs: [build, manylinux]
183
- steps:
184
-
185
- - name: Download Wheels and Source
186
- uses: actions/download-artifact@v4
187
- with:
188
- pattern: dist*
189
- path: ./dist
190
- merge-multiple: true
191
-
192
- - name: Download Conda Packages
193
- uses: actions/download-artifact@v4
194
- with:
195
- pattern: conda_packages-*
196
- path: ./conda_packages
197
- merge-multiple: true
198
-
199
- - name: Get Version Number
200
- if: github.event.ref_type == 'tag'
201
- run: |
202
- VERSION="${GITHUB_REF/refs\/tags\/v/}"
203
- echo "VERSION=$VERSION" >> $GITHUB_ENV
204
-
205
- - name: Create GitHub Release and Upload Release Asset
206
- if: github.event.ref_type == 'tag'
207
- uses: softprops/action-gh-release@v2
208
- env:
209
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
210
- with:
211
- tag_name: ${{ github.event.ref }}
212
- name: ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
213
- draft: true
214
- prerelease: ${{ contains(github.event.ref, 'rc') }}
215
- files: ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
216
-
217
- - name: Publish on TestPyPI
218
- uses: pypa/gh-action-pypi-publish@release/v1
219
- with:
220
- user: __token__
221
- password: ${{ secrets.testpypi }}
222
- repository-url: https://test.pypi.org/legacy/
223
-
224
- - name: Publish on PyPI
225
- if: github.event.ref_type == 'tag'
226
- uses: pypa/gh-action-pypi-publish@release/v1
227
- with:
228
- user: __token__
229
- password: ${{ secrets.pypi }}
230
-
231
- - name: Install Miniconda
232
- uses: conda-incubator/setup-miniconda@v3
233
- with:
234
- auto-update-conda: true
235
-
236
- - name: Install Anaconda cloud client
237
- shell: bash -l {0}
238
- run: conda install anaconda-client
239
-
240
- - name: Publish to Anaconda test label
241
- if: github.event.ref_type != 'tag'
242
- shell: bash -l {0}
243
- run: |
244
- anaconda \
245
- --token ${{ secrets.ANACONDA_API_TOKEN }} \
246
- upload \
247
- --user $ANACONDA_USER \
248
- --label test \
249
- conda_packages/*/*
250
-
251
- - name: Publish to Anaconda main label
252
- shell: bash -l {0}
253
- if: github.event.ref_type == 'tag'
254
- run: |
255
- anaconda \
256
- --token ${{ secrets.ANACONDA_API_TOKEN }} \
257
- upload \
258
- --user $ANACONDA_USER \
259
- conda_packages/*/*
@@ -1,2 +0,0 @@
1
- importlib_metadata
2
- numpy>=1.17.3