changeset 24192:390410a6545d

setup.py: do not install c extensions on pypy These extensions are slower on pypy because pypy has a JIT compiler. And also, they often do not compile (it depends on the pypy configuration).
author Joan Massich <mailsik@gmail.com>
date Sun, 22 Feb 2015 15:40:36 +0100
parents 8fe5fc8d7b8e
children fa4642439aa0
files setup.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Mon Mar 02 14:52:04 2015 +0100
+++ b/setup.py	Sun Feb 22 15:40:36 2015 +0100
@@ -63,6 +63,8 @@
         raise SystemExit(
             "Couldn't import standard bz2 (incomplete Python install).")
 
+ispypy = "PyPy" in sys.version
+
 import os, stat, subprocess, time
 import re
 import shutil
@@ -276,7 +278,7 @@
 
 
 class hgdist(Distribution):
-    pure = 0
+    pure = ispypy
 
     global_options = Distribution.global_options + \
                      [('pure', None, "use pure (slow) Python "