* github/workflows: include build_setup as requirement for all wheels
* setup.py: enable c++17 option * gitignore: add wheelhouse/ * README.md: cibuildwheel references
This commit is contained in:
parent
a099849caa
commit
8c1f068406
14
.github/workflows/pypi-deploy.yml
vendored
14
.github/workflows/pypi-deploy.yml
vendored
@ -7,9 +7,20 @@ on:
|
||||
|
||||
jobs:
|
||||
|
||||
build_setup:
|
||||
name: Prepare environment for wheel builds
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
-name: Install make
|
||||
run: apt-get install make
|
||||
- name: Prepare files
|
||||
run: make setup
|
||||
working-directory: python/
|
||||
|
||||
build_wheels:
|
||||
name: Build binary wheels on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: [build_setup]
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-20.04, windows-2019, macOS-10.15]
|
||||
@ -24,10 +35,13 @@ jobs:
|
||||
- name: Build wheels
|
||||
run: python -m cibuildwheel --output-dir wheelhouse
|
||||
working-directory: python/
|
||||
# env:
|
||||
# CIBW_BUILD: cp36-* cp37-* cp38-* cp39-* cp310-*
|
||||
|
||||
build_sdist:
|
||||
name: Build source distribution
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build_setup]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install cython
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -41,3 +41,4 @@ python/dist
|
||||
python/*.soc
|
||||
python/lib/
|
||||
python/*.cpp
|
||||
python/wheelhouse/
|
||||
|
@ -224,3 +224,7 @@ can be found in the `python/examples` folder.
|
||||
- https://github.com/Apollo3zehn/ImcFamosFile
|
||||
- https://apollo3zehn.github.io/ImcFamosFile/api/ImcFamosFile.FamosFileKeyType.html
|
||||
- https://pypi.org/help/#apitoken
|
||||
- https://sgoel.dev/posts/uploading-binary-wheels-to-pypi-from-github-actions/
|
||||
- https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
|
||||
- https://cibuildwheel.readthedocs.io/en/stable/deliver-to-pypi/
|
||||
|
@ -4,4 +4,3 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.cibuildwheel]
|
||||
before-all = ""
|
||||
|
||||
|
@ -7,7 +7,7 @@ version = file: VERSION
|
||||
author = Record Evolution GmbH
|
||||
author_email = mario.fink@record-evolution.de
|
||||
maintainer = Record Evolution GmbH
|
||||
url= 'https://github.com/RecordEvolution/IMCtermite.git'
|
||||
url= https://github.com/RecordEvolution/IMCtermite.git
|
||||
license = MIT License
|
||||
license_files = LICENSE
|
||||
keywords = IMC, raw, imcFAMOS, imcSTUDIO, imcCRONOS
|
||||
@ -15,5 +15,7 @@ classifiers =
|
||||
Programming Language :: Python :: 3,
|
||||
License :: OSI Approved :: MIT License,
|
||||
Operating System :: OS Independent
|
||||
Topic :: Scientific/Engineering
|
||||
Topic :: Software Development :: Libraries :: Python Modules
|
||||
|
||||
[options]
|
||||
|
@ -1,6 +1,22 @@
|
||||
from setuptools import setup
|
||||
from setuptools import Extension, setup
|
||||
from Cython.Build import cythonize
|
||||
import os
|
||||
import sys
|
||||
|
||||
print("building on platform: "+sys.platform)
|
||||
|
||||
cmpArgs = {
|
||||
"linux": ['-std=c++17','-Wno-unused-variable'],
|
||||
"darwin": ['-std=c++17','-Wno-unused-variable'],
|
||||
"win32": ['/EHsc','/std:c++17']
|
||||
}
|
||||
|
||||
extension = Extension(
|
||||
"IMCtermite",
|
||||
sources=["IMCtermite.pyx"],
|
||||
extra_compile_args=cmpArgs[sys.platform]
|
||||
)
|
||||
|
||||
setup(
|
||||
ext_modules=cythonize(["IMCtermite.pyx"],language_level=3)
|
||||
ext_modules=cythonize(extension,language_level=3)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user