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

login
register
mail settings
Submitter Maciej Fijalkowski
Date July 11, 2016, 9:08 a.m.
Message ID <065fb34034a3849f07ca.1468228128@brick.arcode.com>
Download mbox | patch
Permalink /patch/15786/
State Accepted
Headers show

Comments

Maciej Fijalkowski - July 11, 2016, 9:08 a.m.
# HG changeset patch
# User Maciej Fijalkowski <fijall@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
Yuya Nishihara - July 12, 2016, 1:53 p.m.
On Mon, 11 Jul 2016 11:08:48 +0200, Maciej Fijalkowski wrote:
> # HG changeset patch
> # User Maciej Fijalkowski <fijall@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

LGTM, queued this, thanks.

Patch

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):