From 3c44ac52855657c6f83847022dc639782a66ac2f Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Sun, 7 Feb 2021 09:24:40 -0500 Subject: [PATCH] feat: use py limited ABI --- .github/workflows/build.yaml | 6 +++--- setup.cfg | 3 +++ setup.py | 8 +++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5089d729..60898614 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,7 +15,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] env: - CIBW_SKIP: 'cp27-* cp35-* pp*' + CIBW_BUILD: 'cp36-*' CIBW_ARCHS_LINUX: auto aarch64 steps: - name: Set up QEMU @@ -24,11 +24,11 @@ jobs: with: platforms: arm64 - uses: actions/checkout@v2 + - uses: joerick/cibuildwheel@v1.9.0 - uses: actions/setup-python@v2 with: python-version: '3.9' - - run: pip install cibuildwheel - - run: cibuildwheel + # Install and test on 3.9 here! - uses: actions/upload-artifact@v2 with: path: ./wheelhouse diff --git a/setup.cfg b/setup.cfg index 59c05339..f461affb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -84,3 +84,6 @@ warn_unused_configs = true warn_unused_ignores = true warn_return_any = true warn_unreachable = true + +[bdist_wheel] +py-limited-api = cp36 diff --git a/setup.py b/setup.py index c6ee5bf1..f9440eda 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,13 @@ 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):