summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2014-04-30 18:59:19 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2014-04-30 19:14:02 +0300
commit927320a247116c610e95c6285eca3e7c37b5dd2b (patch)
treee9df240cb2cf1b9fdd849f7f4bcc6c68b99ae407
parent7f0dba10c7d6759660d7e924760a9be5d54f321c (diff)
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.
-rw-r--r--INSTALL8
-rw-r--r--MANIFEST.in5
-rwxr-xr-xsetup.py6
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 @@
26----------------------- 26-----------------------
27 27
28 Once EFL is built and installed in your desired destination, proceed with 28 Once EFL is built and installed in your desired destination, proceed with
29 building the wrapper. 29 building the wrapper. If you downloaded a tarball with pre-generated
30 C sources you can proceed to use those, or force distutils to use pyx
31 sources by setting the environment variable USE_CYTHON to 1.
30 32
31 33
32 * BUILDING WITH GCC/G++ (Linux, OS X, etc.) 34 * BUILDING WITH GCC/G++ (Linux, OS X, etc.)
@@ -41,6 +43,10 @@
41 43
42 python setup.py build -c mingw32 44 python setup.py build -c mingw32
43 45
46 * FORCING PYX SOURCES FOR BUILD
47
48 env USE_CYTHON=1 python setup.py build
49
44 50
45 51
463. INSTALLATION: 523. INSTALLATION:
diff --git a/MANIFEST.in b/MANIFEST.in
index 4abd738..efbc169 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,5 +1,6 @@
1include README INSTALL COPYING COPYING.LESSER AUTHORS changes.html 1include README.rst INSTALL COPYING COPYING.LESSER AUTHORS changes.html
2recursive-include efl *.c *.h 2recursive-include efl *.c *.h *.pyx *.pxi
3graft include
3graft tests 4graft tests
4recursive-exclude tests *.pyc 5recursive-exclude tests *.pyc
5graft examples 6graft 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):
84 84
85 85
86# use cython or pre-generated c files 86# use cython or pre-generated c files
87if os.path.exists(os.path.join(script_path, "efl", "eo", "efl.eo.pyx")): 87
88if os.getenv("USE_CYTHON") or \
89 not os.path.exists(
90 os.path.join(script_path, "efl", "eo", "efl.eo.c")
91 ):
88 92
89 module_suffix = ".pyx" 93 module_suffix = ".pyx"
90 94