Skip to content

Commit 8235306

Browse files
authored
Migrate to pyproject.toml and scikit-build-core (#6)
1 parent bc48ad0 commit 8235306

19 files changed

+1015
-6191
lines changed

.appveyor.yml

-65
This file was deleted.

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/pypi.yml

-46
This file was deleted.

.github/workflows/wheels.yml

+57-36
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,65 @@
1-
name: Python package build and publish
1+
name: Build
22

3-
on:
4-
push:
5-
tags:
6-
- 'v*'
3+
on: [push, pull_request]
74

85
jobs:
9-
deploy:
6+
build_wheels:
7+
name: Build wheels on ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, windows-latest, macos-12, macos-13, macos-14]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: true
17+
18+
- name: Set up QEMU
19+
if: runner.os == 'Linux'
20+
uses: docker/setup-qemu-action@v3
21+
with:
22+
platforms: all
23+
24+
- name: Build wheels
25+
uses: pypa/[email protected]
26+
env:
27+
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
28+
CIBW_ARCHS_WINDOWS: all
29+
30+
- uses: actions/upload-artifact@v4
31+
with:
32+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
33+
path: ./wheelhouse/*.whl
34+
35+
make_sdist:
36+
name: Make SDist
1037
runs-on: ubuntu-latest
1138
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up Python
14-
uses: actions/setup-python@v1
15-
with:
16-
python-version: 3.8
17-
- name: Build manylinux Python wheels
18-
uses: RalfG/[email protected]_x86_64
39+
- uses: actions/checkout@v4
1940
with:
20-
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39'
21-
build-requirements: 'scikit-build'
22-
system-packages: 'python3-tkinter cmake gcc gcc-c++ make tcl tcl-devel tk tk-devel'
23-
package-path: '.'
24-
- name: Create Release
25-
uses: ncipollo/release-action@v1
26-
with:
27-
allowUpdates: true
28-
omitBody: true
29-
token: ${{ secrets.DEPLOY_TOKEN }}
30-
- name: Upload binaries to release
31-
uses: svenstaro/upload-release-action@v2
41+
submodules: true
42+
43+
- name: Build SDist
44+
run: pipx run build --sdist
45+
46+
- uses: actions/upload-artifact@v4
3247
with:
33-
repo_token: ${{ secrets.DEPLOY_TOKEN }}
34-
file: dist/*-manylinux*.whl
35-
tag: ${{ github.ref }}
36-
overwrite: true
37-
file_glob: true
38-
- name: PyPI Dispatch
39-
uses: peter-evans/repository-dispatch@v1
48+
name: cibw-sdist
49+
path: dist/*.tar.gz
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+
if: github.event_name == 'release' && github.event.action == 'published'
58+
steps:
59+
- uses: actions/download-artifact@v4
4060
with:
41-
token: ${{ secrets.DEPLOY_TOKEN }}
42-
repository: TkinterEP/python-tksvg
43-
event-type: pypi-upload
44-
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
61+
pattern: cibw-*
62+
path: dist
63+
merge-multiple: true
64+
65+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)