Skip to content

Commit 4860387

Browse files
committed
Disable C tokenizer building on PyPy (fixes #341)
1 parent dd61445 commit 4860387

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
v0.7.2 (unreleased):
22

3-
- ...
3+
- Fix building on non-CPython implementations like PyPy. (#341)
44

55
v0.7.1 (released June 30, 2025):
66

docs/changelog.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ v0.7.2
77
Unreleased
88
(`changes <https://github.com/earwig/mwparserfromhell/compare/v0.7.1...main>`__):
99

10-
- ...
10+
- Fix building on non-CPython implementations like PyPy.
11+
(`#341 <https://github.com/earwig/mwparserfromhell/issues/341>`_)
1112

1213
v0.7.1
1314
------

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import glob
2626
import os
27+
import platform
2728
import sys
2829
from enum import Enum
2930

@@ -63,8 +64,10 @@ class UseExtension(Enum):
6364
f"Unknown value for $WITHOUT_EXTENSION; should be '1', or '0', "
6465
f"but found {value!r}"
6566
)
66-
else:
67+
elif platform.python_implementation() == "CPython":
6768
use_extension = UseExtension.REQUIRED
69+
else:
70+
use_extension = UseExtension.IGNORED
6871

6972
if use_extension == UseExtension.IGNORED:
7073
ext_modules = []

0 commit comments

Comments
 (0)