-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cibuildwheel with GitHub Actions (#9)
- Loading branch information
Showing
3 changed files
with
76 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build wheels | ||
|
||
on: | ||
push: | ||
branches: [master, cibw] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-22.04 | ||
- windows-2022 | ||
- macos-12 | ||
env: | ||
CIBW_ARCHS_LINUX: x86_64 i686 | ||
CIBW_ARCHS_MACOS: x86_64 universal2 | ||
CIBW_ARCHS_WINDOWS: AMD64 x86 ARM64 | ||
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-*" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install cibuildwheel | ||
run: | | ||
python -m pip install cibuildwheel==2.15.0 | ||
- name: Build wheels | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
|
||
|
||
upload_all: | ||
name: Upload if release | ||
needs: [build_wheels] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
|
||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.pypi_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel", "Cython"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
#! /usr/bin/env python | ||
import glob | ||
from setuptools import setup, Extension | ||
from Cython.Build import cythonize | ||
|
||
|
||
extensions = [ | ||
Extension( | ||
"dawg", | ||
sources=glob.glob('src/*.pyx') + glob.glob('lib/b64/*.c'), | ||
include_dirs=['lib'], | ||
language="c++", | ||
) | ||
] | ||
|
||
setup( | ||
name="DAWG2", | ||
|
@@ -11,14 +22,7 @@ | |
author_email='[email protected]', | ||
url='https://github.com/pymorphy2-fork/DAWG/', | ||
|
||
ext_modules=[ | ||
Extension( | ||
"dawg", | ||
sources=glob.glob('src/*.cpp') + glob.glob('lib/b64/*.c'), | ||
include_dirs=['lib'], | ||
language="c++", | ||
) | ||
], | ||
ext_modules=cythonize(extensions, language="c++", annotate=False), | ||
|
||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
|
@@ -27,12 +31,7 @@ | |
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Cython', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
|