[PATCH v2] setup: prepare for future cffi modules by adding placeholder in setup

Maciej Fijalkowski fijall at gmail.com
Mon Jul 11 05:08:48 EDT 2016


# HG changeset patch
# User Maciej Fijalkowski <fijall at gmail.com>
# Date 1468226658 -7200
#      Mon Jul 11 10:44:18 2016 +0200
# Node ID 065fb34034a3849f07ca836ce2f4eb17c7f543db
# Parent  4b16a5bd99484cac96ade9af76e6deee1fc57b54
setup: prepare for future cffi modules by adding placeholder in setup

diff -r 4b16a5bd9948 -r 065fb34034a3 setup.py
--- a/setup.py	Wed Jul 06 21:16:00 2016 -0700
+++ b/setup.py	Mon Jul 11 10:44:18 2016 +0200
@@ -262,7 +262,8 @@
 
 
 class hgdist(Distribution):
-    pure = ispypy
+    pure = False
+    cffi = ispypy
 
     global_options = Distribution.global_options + \
                      [('pure', None, "use pure (slow) Python "
@@ -316,6 +317,10 @@
 
         if self.distribution.pure:
             self.distribution.ext_modules = []
+        elif self.distribution.cffi:
+            exts = []
+            # cffi modules go here
+            self.distribution.ext_modules = exts
         else:
             h = os.path.join(get_python_inc(), 'Python.h')
             if not os.path.exists(h):


More information about the Mercurial-devel mailing list