summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt4
-rw-r--r--setup.py13
2 files changed, 16 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index d3ddf148..1925d796 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -14,7 +14,11 @@ Version 3.5.2b1
- Now the exit status of your product code is properly used as the process
status when running ``python -m coverage run ...``. Thanks, JT Olds.
+- When installing into pypy, we no longer attempt (and fail) to compile
+ the C tracer function, closing `issue 166`_.
+
.. _issue 155: https://bitbucket.org/ned/coveragepy/issue/155/cant-use-coverage-run-m-unittest-discover
+.. _issue 166: https://bitbucket.org/ned/coveragepy/issue/166/dont-try-to-compile-c-extension-on-pypy
Version 3.5.1 --- 23 September 2011
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"])