Skip to content

Commit

Permalink
cibuildwheel (#3)
Browse files Browse the repository at this point in the history
* add cibuildwheel action

* Update build-wheels.yml

* Update .gitignore

* Update build-wheels.yml

* not sure what I'm doing

* Update setup.py

* blah

* more stuff

* eek

* Create MANIFEST.in

* organize more

* Update MANIFEST.in
  • Loading branch information
Owen committed Jan 18, 2023
1 parent ed054b3 commit 247576d
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 5 deletions.
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"],
)

0 comments on commit 247576d

Please sign in to comment.