diff options
author | Dave Andreoli <dave@gurumeditation.it> | 2015-07-12 19:35:55 +0200 |
---|---|---|
committer | Dave Andreoli <dave@gurumeditation.it> | 2015-07-12 19:35:55 +0200 |
commit | 4ad8fc60ae7ae569e6bbbbdf915337b27c3cb9d0 (patch) | |
tree | 92cbc3e0780ee4e057189923f61e83b2577a4d47 | |
parent | 37930f389d31c40a6ec90a6c154ffa574ad96ce7 (diff) |
Fix build when ecore-x is not available
-rwxr-xr-x | setup.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -69,8 +69,10 @@ def pkg_config(name, require, min_vers=None): | |||
69 | call = subprocess.Popen(["pkg-config", "--modversion", require], | 69 | call = subprocess.Popen(["pkg-config", "--modversion", require], |
70 | stdout=subprocess.PIPE) | 70 | stdout=subprocess.PIPE) |
71 | out, err = call.communicate() | 71 | out, err = call.communicate() |
72 | ver = out.decode("utf-8").strip() | 72 | if call.returncode != 0: |
73 | raise SystemExit("Did not find " + name + " with 'pkg-config'.") | ||
73 | 74 | ||
75 | ver = out.decode("utf-8").strip() | ||
74 | if min_vers is not None: | 76 | if min_vers is not None: |
75 | assert (LooseVersion(ver) >= LooseVersion(min_vers)) is True | 77 | assert (LooseVersion(ver) >= LooseVersion(min_vers)) is True |
76 | 78 | ||
@@ -313,7 +315,7 @@ if set(("build", "build_ext", "install", "bdist", "sdist")) & set(sys.argv): | |||
313 | ecore_x_cflags, ecore_x_libs = pkg_config('EcoreX', 'ecore-x', | 315 | ecore_x_cflags, ecore_x_libs = pkg_config('EcoreX', 'ecore-x', |
314 | EFL_MIN_VER) | 316 | EFL_MIN_VER) |
315 | except SystemExit: | 317 | except SystemExit: |
316 | pass | 318 | print("Not found, will not be built") |
317 | else: | 319 | else: |
318 | ecore_x_ext = Extension("ecore_x", | 320 | ecore_x_ext = Extension("ecore_x", |
319 | ["efl/ecore_x/efl.ecore_x" + module_suffix], | 321 | ["efl/ecore_x/efl.ecore_x" + module_suffix], |