Fix build when ecore-x is not available
This commit is contained in:
parent
37930f389d
commit
4ad8fc60ae
6
setup.py
6
setup.py
|
@ -69,8 +69,10 @@ def pkg_config(name, require, min_vers=None):
|
||||||
call = subprocess.Popen(["pkg-config", "--modversion", require],
|
call = subprocess.Popen(["pkg-config", "--modversion", require],
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
out, err = call.communicate()
|
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:
|
if min_vers is not None:
|
||||||
assert (LooseVersion(ver) >= LooseVersion(min_vers)) is True
|
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',
|
ecore_x_cflags, ecore_x_libs = pkg_config('EcoreX', 'ecore-x',
|
||||||
EFL_MIN_VER)
|
EFL_MIN_VER)
|
||||||
except SystemExit:
|
except SystemExit:
|
||||||
pass
|
print("Not found, will not be built")
|
||||||
else:
|
else:
|
||||||
ecore_x_ext = Extension("ecore_x",
|
ecore_x_ext = Extension("ecore_x",
|
||||||
["efl/ecore_x/efl.ecore_x" + module_suffix],
|
["efl/ecore_x/efl.ecore_x" + module_suffix],
|
||||||
|
|
Loading…
Reference in New Issue