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
commitfeb254b507aefb18fe547f4b0ab47a61099740ac (patch)
treed514b02cf66fc7a8509e5170f5e276b970fb5bdd /setup.py
parent20a8e5253459693e939e824a359781e34dae779b (diff)
downloadpython-coveragepy-git-feb254b507aefb18fe547f4b0ab47a61099740ac.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 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"])