summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index d6e92c1e..bc4a45c5 100644
--- a/setup.py
+++ b/setup.py
@@ -102,8 +102,19 @@ setup_args = dict(
url = __url__,
)
-# Jython can't compile C extensions
+# There are a few reasons we might not be able to compile the C extension.
+
+compile_extension = True
+
if not sys.platform.startswith('java'):
+ # Jython can't compile C extensions
+ compile_extension = False
+
+if hasattr(sys, "pypy_version_info"):
+ # Pypy can't compile C extensions
+ compile_extension = False
+
+if compile_extension:
setup_args.update(dict(
ext_modules = [
Extension("coverage.tracer", sources=["coverage/tracer.c"])