kuuko pushed a commit to branch master.

http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=927320a247116c610e95c6285eca3e7c37b5dd2b

commit 927320a247116c610e95c6285eca3e7c37b5dd2b
Author: Kai Huuhko <[email protected]>
Date:   Wed Apr 30 18:59:19 2014 +0300

    setup.py: Add env variable USE_CYTHON for compilation from pyx sources
    
    pyx source files are now used only when USE_CYTHON is set to 1 or the
    C source files have not yet been pre-compiled.
    
    Only efl.eo.c is checked for this so if you cancel an initial build make
    sure to enable USE_CYTHON when re-starting the build.
    
    The pyx sources will now be included in the source tarball.
---
 INSTALL     | 8 +++++++-
 MANIFEST.in | 5 +++--
 setup.py    | 6 +++++-
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/INSTALL b/INSTALL
index c486c16..4a850da 100644
--- a/INSTALL
+++ b/INSTALL
@@ -26,7 +26,9 @@
 -----------------------
 
  Once EFL is built and installed in your desired destination, proceed with
- building the wrapper.
+ building the wrapper. If you downloaded a tarball with pre-generated
+ C sources you can proceed to use those, or force distutils to use pyx
+ sources by setting the environment variable USE_CYTHON to 1.
 
 
  * BUILDING WITH GCC/G++ (Linux, OS X, etc.)
@@ -41,6 +43,10 @@
 
    python setup.py build -c mingw32
 
+ * FORCING PYX SOURCES FOR BUILD
+
+   env USE_CYTHON=1 python setup.py build
+
 
 
 3. INSTALLATION:
diff --git a/MANIFEST.in b/MANIFEST.in
index 4abd738..efbc169 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,5 +1,6 @@
-include README INSTALL COPYING COPYING.LESSER AUTHORS changes.html
-recursive-include efl *.c *.h
+include README.rst INSTALL COPYING COPYING.LESSER AUTHORS changes.html
+recursive-include efl *.c *.h *.pyx *.pxi
+graft include
 graft tests
 recursive-exclude tests *.pyc
 graft examples
diff --git a/setup.py b/setup.py
index 44ee4ec..2163fed 100755
--- a/setup.py
+++ b/setup.py
@@ -84,7 +84,11 @@ def pkg_config(name, require, min_vers=None):
 
 
 # use cython or pre-generated c files
-if os.path.exists(os.path.join(script_path, "efl", "eo", "efl.eo.pyx")):
+
+if os.getenv("USE_CYTHON") or \
+    not os.path.exists(
+        os.path.join(script_path, "efl", "eo", "efl.eo.c")
+        ):
 
     module_suffix = ".pyx"
 

-- 


Reply via email to