Skip to content

Commit

Permalink
build: switch to scikit-build-core, use peru, clarify license (#12)
Browse files Browse the repository at this point in the history
build: use prebuilt Tcl/Tk from CPython on win32 msvc
ci: add cibuildwheel and dependabot
  • Loading branch information
mochaaP authored Oct 11, 2024
1 parent bbbfb0a commit 6bf8638
Show file tree
Hide file tree
Showing 30 changed files with 950 additions and 1,072 deletions.
65 changes: 0 additions & 65 deletions .appveyor.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
46 changes: 0 additions & 46 deletions .github/workflows/pypi.yml

This file was deleted.

105 changes: 60 additions & 45 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,65 @@
name: Python package build and publish
name: Build

on:
push:
tags:
- 'v*'
on: [push, pull_request]

jobs:
deploy:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-12, macos-13, macos-14]

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
CIBW_ARCHS_WINDOWS: all

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Build manylinux Python wheels
uses: RalfG/[email protected]_x86_64
with:
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39'
build-requirements: 'scikit-build'
system-packages: 'python3-tkinter fontconfig-devel fontconfig cmake gcc gcc-c++ make pkgconfig tcl tcl-devel tk tk-devel'
package-path: '.'
- name: Update wheel ownership
run: |
sudo chown $USER:$USER dist/*
- name: Post-process manylinux wheels
run: |
sudo python ci/post_process_manylinux.py
- name: Create Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitBody: true
token: ${{ secrets.DEPLOY_TOKEN }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.DEPLOY_TOKEN }}
file: dist/*-manylinux*.whl
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: PyPI Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.DEPLOY_TOKEN }}
repository: TkinterEP/python-tkextrafont
event-type: pypi-upload
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
- uses: actions/checkout@v4
with:
submodules: true

- name: Build SDist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

upload_all:
needs: [build_wheels, make_sdist]
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
Loading

0 comments on commit 6bf8638

Please sign in to comment.