setup.py: Make ecore.x an optional component
This commit is contained in:
parent
922a2ae893
commit
240f3a2c21
43
setup.py
43
setup.py
|
@ -231,11 +231,7 @@ if set(("build", "build_ext", "install", "bdist", "sdist")) & set(sys.argv):
|
|||
ecore_cflags, ecore_libs = pkg_config('Ecore', 'ecore', EFL_MIN_VERSION)
|
||||
ecore_file_cflags, ecore_file_libs = pkg_config(
|
||||
'EcoreFile', 'ecore-file', EFL_MIN_VERSION)
|
||||
ecore_input_cflags, ecore_input_libs = pkg_config(
|
||||
'EcoreInput', 'ecore-input', EFL_MIN_VERSION)
|
||||
ecore_x_cflags, ecore_x_libs = pkg_config(
|
||||
'EcoreX', 'ecore-x', EFL_MIN_VERSION)
|
||||
ecore_exts = (
|
||||
ecore_exts = [
|
||||
Extension(
|
||||
"ecore.__init__", ["efl/ecore/__init__" + module_suffix],
|
||||
include_dirs=['include/'],
|
||||
|
@ -243,19 +239,30 @@ if set(("build", "build_ext", "install", "bdist", "sdist")) & set(sys.argv):
|
|||
extra_link_args=ecore_libs + ecore_file_libs + eina_libs +
|
||||
evas_libs
|
||||
),
|
||||
Extension(
|
||||
"ecore.x", ["efl/ecore/x" + module_suffix],
|
||||
include_dirs=['include/'],
|
||||
extra_compile_args=
|
||||
list(set(
|
||||
ecore_cflags + ecore_file_cflags + ecore_x_cflags +
|
||||
ecore_input_cflags
|
||||
)),
|
||||
extra_link_args=
|
||||
ecore_libs + ecore_file_libs + ecore_x_libs + ecore_input_libs +
|
||||
eina_libs + evas_libs,
|
||||
)
|
||||
)
|
||||
]
|
||||
try:
|
||||
ecore_input_cflags, ecore_input_libs = pkg_config(
|
||||
'EcoreInput', 'ecore-input', EFL_MIN_VERSION)
|
||||
ecore_x_cflags, ecore_x_libs = pkg_config(
|
||||
'EcoreX', 'ecore-x', EFL_MIN_VERSION)
|
||||
except SystemExit: # FIXME: Change pkg-config to return a value
|
||||
pass
|
||||
else:
|
||||
ecore_exts.append(
|
||||
Extension(
|
||||
"ecore.x", ["efl/ecore/x" + module_suffix],
|
||||
include_dirs=['include/'],
|
||||
extra_compile_args=
|
||||
list(set(
|
||||
ecore_cflags + ecore_file_cflags + ecore_x_cflags +
|
||||
ecore_input_cflags
|
||||
)),
|
||||
extra_link_args=
|
||||
ecore_libs + ecore_file_libs + ecore_x_libs +
|
||||
ecore_input_libs +
|
||||
eina_libs + evas_libs,
|
||||
)
|
||||
)
|
||||
modules += ecore_exts
|
||||
packages.append("efl.ecore")
|
||||
|
||||
|
|
Loading…
Reference in New Issue