Skip to content

Commit

Permalink
Migrate to pyproject.toml and scikit-build-core (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
mochaaP authored Sep 24, 2024
1 parent bc48ad0 commit 8235306
Show file tree
Hide file tree
Showing 19 changed files with 1,015 additions and 6,191 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.

93 changes: 57 additions & 36 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,44 +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
- uses: actions/checkout@v4
with:
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39'
build-requirements: 'scikit-build'
system-packages: 'python3-tkinter cmake gcc gcc-c++ make tcl tcl-devel tk tk-devel'
package-path: '.'
- 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
submodules: true

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

- uses: actions/upload-artifact@v4
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
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:
token: ${{ secrets.DEPLOY_TOKEN }}
repository: TkinterEP/python-tksvg
event-type: pypi-upload
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
pattern: cibw-*
path: dist
merge-multiple: true

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

0 comments on commit 8235306

Please sign in to comment.