davemds pushed a commit to branch master.

http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=4ad8fc60ae7ae569e6bbbbdf915337b27c3cb9d0

commit 4ad8fc60ae7ae569e6bbbbdf915337b27c3cb9d0
Author: Dave Andreoli <d...@gurumeditation.it>
Date:   Sun Jul 12 19:35:55 2015 +0200

    Fix build when ecore-x is not available
---
 setup.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 9c7a3ca..b5e0032 100755
--- a/setup.py
+++ b/setup.py
@@ -69,8 +69,10 @@ def pkg_config(name, require, min_vers=None):
         call = subprocess.Popen(["pkg-config", "--modversion", require],
                                 stdout=subprocess.PIPE)
         out, err = call.communicate()
-        ver = out.decode("utf-8").strip()
+        if call.returncode != 0:
+            raise SystemExit("Did not find " + name + " with 'pkg-config'.")
 
+        ver = out.decode("utf-8").strip()
         if min_vers is not None:
             assert (LooseVersion(ver) >= LooseVersion(min_vers)) is True
 
@@ -313,7 +315,7 @@ if set(("build", "build_ext", "install", "bdist", "sdist")) 
& set(sys.argv):
         ecore_x_cflags, ecore_x_libs = pkg_config('EcoreX', 'ecore-x',
                                                   EFL_MIN_VER)
     except SystemExit:
-        pass
+        print("Not found, will not be built")
     else:
         ecore_x_ext = Extension("ecore_x",
                                 ["efl/ecore_x/efl.ecore_x" + module_suffix],

-- 


Reply via email to