--- a/setup.py Sat Nov 23 05:50:43 2024 +0100
+++ b/setup.py Thu Oct 24 15:13:23 2024 +0200
@@ -3,7 +3,6 @@
import os
import sys
-import platform
import sysconfig
@@ -54,26 +53,15 @@
"Couldn't import standard zlib (incomplete Python install)."
)
-# The base IronPython distribution (as of 2.7.1) doesn't support bz2
-isironpython = False
+
try:
- isironpython = (
- platform.python_implementation().lower().find("ironpython") != -1
- )
-except AttributeError:
- pass
+ import bz2
-if isironpython:
- sys.stderr.write("warning: IronPython detected (no bz2 support)\n")
-else:
- try:
- import bz2
-
- bz2.BZ2Compressor # silence unused import warning
- except ImportError:
- raise SystemExit(
- "Couldn't import standard bz2 (incomplete Python install)."
- )
+ bz2.BZ2Compressor # silence unused import warning
+except ImportError:
+ raise SystemExit(
+ "Couldn't import standard bz2 (incomplete Python install)."
+ )
ispypy = "PyPy" in sys.version