Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cibuildwheel #3

Merged
merged 12 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# continuous integration
name: ci

on:
workflow_dispatch:
push:
# branches: [ "main" ]
pull_request:

jobs:
lint:
name: 'publish to pypi'
uses: ./.github/workflows/publish.yml
64 changes: 64 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# publish package to pypi
name: publish

on:
workflow_call:
workflow_dispatch:

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [
ubuntu-20.04,
# macos-11,
# macos-12,
# windows-2019,
# windows-2022,
]

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

- name: build wheels
uses: pypa/cibuildwheel@v2.12.0

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # gets full history for setuptools-scm
submodules: true

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

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

upload_all:
needs: [build_wheels, make_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:

- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.pypi_password }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode
wheelhouse

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include third-party/sicgl/include *
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
[project]
name = "pysicgl"
authors = [
{name = "oclyke", email = "oclyke@gmail.com"},
]
description = "sicgl for Python"
readme = "README.md"
requires-python = ">=3.7"
keywords = [
"sicgl",
"2d", "2D",
"small",
"iterator",
"graphics",
"library",
"c",
"extension",
]
classifiers = [
"Topic :: Multimedia :: Graphics",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Development Status :: 3 - Alpha",
]
dynamic = [
"version"
]

[project.urls]
Source = "https://github.com/oclyke-dev/pysicgl"

[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]

[tool.cibuildwheel]

[tool.black]
include = '''
src\/.*\.pyi?$|
Expand Down
6 changes: 1 addition & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@
)

setup(
name="pysicgl",
version="0.0.0",
description="sicgl for Python",
author="oclyke",
url="https://github.com/oclyke/pysicgl",
ext_modules=[pysicgl],
setup_requires=["setuptools_scm"],
)