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

Maciej Fijalkowski fijall at gmail.com
Mon Jul 11 04:44:35 EDT 2016


# HG changeset patch
# User fijal
# Date 1468226658 -7200
#      Mon Jul 11 10:44:18 2016 +0200
# Node ID ca04d5d32dd234f7d7a06e165248cde6005dd308
# Parent  4b16a5bd99484cac96ade9af76e6deee1fc57b54
setup: prepare for future cffi modules by adding placeholder in setup

diff -r 4b16a5bd9948 -r ca04d5d32dd2 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