diff --git a/CHANGELOG b/CHANGELOG index 84bba88..c9204ab 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,6 @@ v0.7.2 (unreleased): -- ... +- Fix building on non-CPython implementations like PyPy. (#341) v0.7.1 (released June 30, 2025): diff --git a/docs/changelog.rst b/docs/changelog.rst index 89d27fb..4fe3949 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,7 +7,8 @@ v0.7.2 Unreleased (`changes `__): -- ... +- Fix building on non-CPython implementations like PyPy. + (`#341 `_) v0.7.1 ------ diff --git a/setup.py b/setup.py index 5cfc667..cd14eda 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ from __future__ import annotations import glob import os +import platform import sys from enum import Enum @@ -63,8 +64,10 @@ elif "WITHOUT_EXTENSION" in os.environ: f"Unknown value for $WITHOUT_EXTENSION; should be '1', or '0', " f"but found {value!r}" ) -else: +elif platform.python_implementation() == "CPython": use_extension = UseExtension.REQUIRED +else: + use_extension = UseExtension.IGNORED if use_extension == UseExtension.IGNORED: ext_modules = []