summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-03-17 23:31:49 -0400
committerNed Batchelder <ned@nedbatchelder.com>2012-03-17 23:31:49 -0400
commitfbc6a789ed025ac114c36c414b418ca6dd3c5a38 (patch)
treef8eb1283d96e1b7c671a70a9f7f3b0909df858a0 /setup.py
parentd5f5b3f739681ffd57391c188d0b442cbdbccb7a (diff)
downloadpython-coveragepy-fbc6a789ed025ac114c36c414b418ca6dd3c5a38.tar.gz
Don't try to compile the C extension under pypy. #166.
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 d6e92c1..bc4a45c 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"])