Skip to content

Commit 964c38a

Browse files
committed
build: switch to scikit-build-core, use gitmodules & peru, clarify license
build: use prebuilt Tcl/Tk from CPython, fontconfig from vcpkg on win32 msvc ci: add cibuildwheel and dependabot
1 parent bbbfb0a commit 964c38a

30 files changed

+951
-1072
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

+60-45
Original file line numberDiff line numberDiff line change
@@ -1,50 +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
19-
with:
20-
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39'
21-
build-requirements: 'scikit-build'
22-
system-packages: 'python3-tkinter fontconfig-devel fontconfig cmake gcc gcc-c++ make pkgconfig tcl tcl-devel tk tk-devel'
23-
package-path: '.'
24-
- name: Update wheel ownership
25-
run: |
26-
sudo chown $USER:$USER dist/*
27-
- name: Post-process manylinux wheels
28-
run: |
29-
sudo python ci/post_process_manylinux.py
30-
- name: Create Release
31-
uses: ncipollo/release-action@v1
32-
with:
33-
allowUpdates: true
34-
omitBody: true
35-
token: ${{ secrets.DEPLOY_TOKEN }}
36-
- name: Upload binaries to release
37-
uses: svenstaro/upload-release-action@v2
38-
with:
39-
repo_token: ${{ secrets.DEPLOY_TOKEN }}
40-
file: dist/*-manylinux*.whl
41-
tag: ${{ github.ref }}
42-
overwrite: true
43-
file_glob: true
44-
- name: PyPI Dispatch
45-
uses: peter-evans/repository-dispatch@v1
46-
with:
47-
token: ${{ secrets.DEPLOY_TOKEN }}
48-
repository: TkinterEP/python-tkextrafont
49-
event-type: pypi-upload
50-
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
39+
- uses: actions/checkout@v4
40+
with:
41+
submodules: true
42+
43+
- name: Build SDist
44+
run: pipx run build --sdist
45+
46+
- uses: actions/upload-artifact@v4
47+
with:
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
60+
with:
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)