diff options
author | David Lord <davidism@gmail.com> | 2021-02-07 00:05:26 -0800 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2021-02-07 07:31:29 -0800 |
commit | 8fa9449867bab90d8c765f865819a5ce8177cd9b (patch) | |
tree | 885b10cac2f2436bc3b25cc687d1becb7ad45ec1 | |
parent | 6e24924d6b85811b961f640089711957e8aa355c (diff) | |
download | markupsafe-8fa9449867bab90d8c765f865819a5ce8177cd9b.tar.gz |
use latest wheel and cibuildwheel features
use limited api to build one wheel for 3.6+
use cibuildwheel action
build mac universal2 wheel
-rw-r--r-- | .github/workflows/build.yaml | 18 | ||||
-rw-r--r-- | setup.cfg | 3 | ||||
-rw-r--r-- | setup.py | 6 |
3 files changed, 17 insertions, 10 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5089d72..b9492be 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,6 +6,9 @@ on: - '*.x' tags: - '*' + pull_request: + branches: + - master jobs: wheels: name: ${{ matrix.os }} @@ -14,21 +17,18 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - env: - CIBW_SKIP: 'cp27-* cp35-* pp*' - CIBW_ARCHS_LINUX: auto aarch64 steps: + - uses: actions/checkout@v2 - name: Set up QEMU if: runner.os == 'Linux' uses: docker/setup-qemu-action@v1 with: platforms: arm64 - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - run: pip install cibuildwheel - - run: cibuildwheel + - uses: joerick/cibuildwheel@v1.9.0 + env: + CIBW_BUILD: cp36-* + CIBW_ARCHS_LINUX: auto aarch64 + CIBW_ARCHS_MACOS: auto universal2 - uses: actions/upload-artifact@v2 with: path: ./wheelhouse @@ -34,6 +34,9 @@ python_requires = >= 3.6 [options.packages.find] where = src +[bdist_wheel] +py-limited-api = cp36 + [tool:pytest] testpaths = tests filterwarnings = @@ -9,7 +9,11 @@ from setuptools import Extension from setuptools import setup from setuptools.command.build_ext import build_ext -ext_modules = [Extension("markupsafe._speedups", ["src/markupsafe/_speedups.c"])] +ext_modules = [ + Extension( + "markupsafe._speedups", ["src/markupsafe/_speedups.c"], py_limited_api=True + ) +] class BuildFailed(Exception): |