Răsfoiți Sursa

Merge patch from Ronny to not compile C extensions when building in pypy.

Jelmer Vernooij 13 ani în urmă
părinte
comite
268095a7f6
2 a modificat fișierele cu 5 adăugiri și 2 ștergeri
  1. 3 0
      NEWS
  2. 2 2
      setup.py

+ 3 - 0
NEWS

@@ -32,6 +32,9 @@
   * Smart protocol clients can now change refs even if they are
     not uploading new data. (Jelmer Vernooij, #855993)
 
+ * Don't compile C extensions when running in pypy.
+   (Ronny Pfannschmidt, #881546)
+
  API CHANGES
 
   * ``Repo.revision_history`` is now deprecated in favor of ``Repo.get_walker``.

+ 2 - 2
setup.py

@@ -27,11 +27,11 @@ class DulwichDistribution(Distribution):
             return True
 
     def has_ext_modules(self):
-        return not self.pure
+        return not self.pure and not '__pypy__' in sys.modules
 
     global_options = Distribution.global_options + [
         ('pure', None, 
-            "use pure (slower) Python code instead of C extensions")]
+            "use pure Python code instead of C extensions (slower on CPython)")]
 
     pure = False