python-efl: Skip build related code in setup.py when only generating
documentation. SVN revision: 84399
This commit is contained in:
parent
bb65ae91cb
commit
e02e6491d4
87
setup.py
87
setup.py
|
@ -24,7 +24,10 @@ except ImportError:
|
|||
def finalize_options(self): pass
|
||||
def run(self): print("Error: sphinx not found")
|
||||
|
||||
def pkg_config(name, require, min_vers=None):
|
||||
if len(sys.argv) is 2 and "build_doc" in sys.argv:
|
||||
modules = []
|
||||
else:
|
||||
def pkg_config(name, require, min_vers=None):
|
||||
try:
|
||||
sys.stdout.write("Checking for " + name + ": ")
|
||||
ver = subprocess.check_output(["pkg-config", "--modversion", require]).decode("utf-8").strip()
|
||||
|
@ -41,71 +44,71 @@ def pkg_config(name, require, min_vers=None):
|
|||
|
||||
|
||||
|
||||
## This is usefull while working on the source, to force the rebuild of modules.
|
||||
# subprocess.call("rm -rfv efl/*/*.c", shell=True)
|
||||
# subprocess.call("rm -rfv efl/eo/*.c", shell=True)
|
||||
# subprocess.call("rm -rfv efl/evas/*.c", shell=True)
|
||||
# subprocess.call("rm -rfv efl/ecore/*.c", shell=True)
|
||||
# subprocess.call("rm -rfv efl/edje/*.c", shell=True)
|
||||
# subprocess.call("rm -rfv efl/emotion/*.c", shell=True)
|
||||
# subprocess.call("rm -rfv efl/elementary/*.c", shell=True)
|
||||
## This is usefull while working on the source, to force the rebuild of modules.
|
||||
# subprocess.call("rm -rfv efl/*/*.c", shell=True)
|
||||
# subprocess.call("rm -rfv efl/eo/*.c", shell=True)
|
||||
# subprocess.call("rm -rfv efl/evas/*.c", shell=True)
|
||||
# subprocess.call("rm -rfv efl/ecore/*.c", shell=True)
|
||||
# subprocess.call("rm -rfv efl/edje/*.c", shell=True)
|
||||
# subprocess.call("rm -rfv efl/emotion/*.c", shell=True)
|
||||
# subprocess.call("rm -rfv efl/elementary/*.c", shell=True)
|
||||
|
||||
|
||||
modules = []
|
||||
modules = []
|
||||
|
||||
# Eo
|
||||
eo_cflags, eo_libs = pkg_config('Eo', 'eo', "1.7.99")
|
||||
eo_ext = Extension("efl.eo", ["efl/eo/efl.eo.pyx"],
|
||||
# Eo
|
||||
eo_cflags, eo_libs = pkg_config('Eo', 'eo', "1.7.99")
|
||||
eo_ext = Extension("efl.eo", ["efl/eo/efl.eo.pyx"],
|
||||
include_dirs = ['include/'],
|
||||
extra_compile_args = eo_cflags,
|
||||
extra_link_args = eo_libs)
|
||||
modules.append(eo_ext)
|
||||
modules.append(eo_ext)
|
||||
|
||||
# Evas
|
||||
evas_cflags, evas_libs = pkg_config('Evas', 'evas', "1.7.99")
|
||||
evas_ext = Extension("efl.evas", ["efl/evas/efl.evas.pyx"],
|
||||
# Evas
|
||||
evas_cflags, evas_libs = pkg_config('Evas', 'evas', "1.7.99")
|
||||
evas_ext = Extension("efl.evas", ["efl/evas/efl.evas.pyx"],
|
||||
include_dirs = ['include/'],
|
||||
extra_compile_args = evas_cflags + eo_cflags,
|
||||
extra_link_args = evas_libs)
|
||||
modules.append(evas_ext)
|
||||
modules.append(evas_ext)
|
||||
|
||||
# Ecore
|
||||
ecore_cflags, ecore_libs = pkg_config('Ecore', 'ecore', "1.7.99")
|
||||
efile_cflags, efile_libs = pkg_config('EcoreFile', 'ecore-file', "1.7.99")
|
||||
ecore_ext = Extension("efl.ecore", ["efl/ecore/efl.ecore.pyx"],
|
||||
# Ecore
|
||||
ecore_cflags, ecore_libs = pkg_config('Ecore', 'ecore', "1.7.99")
|
||||
efile_cflags, efile_libs = pkg_config('EcoreFile', 'ecore-file', "1.7.99")
|
||||
ecore_ext = Extension("efl.ecore", ["efl/ecore/efl.ecore.pyx"],
|
||||
include_dirs = ['include/'],
|
||||
extra_compile_args = ecore_cflags + efile_cflags + eo_cflags,
|
||||
extra_link_args = ecore_libs + efile_libs)
|
||||
modules.append(ecore_ext)
|
||||
modules.append(ecore_ext)
|
||||
|
||||
# Edje
|
||||
edje_cflags, edje_libs = pkg_config('Edje', 'edje', "1.7.99")
|
||||
edje_ext = Extension("efl.edje", ["efl/edje/efl.edje.pyx"],
|
||||
# Edje
|
||||
edje_cflags, edje_libs = pkg_config('Edje', 'edje', "1.7.99")
|
||||
edje_ext = Extension("efl.edje", ["efl/edje/efl.edje.pyx"],
|
||||
include_dirs = ['include/'],
|
||||
extra_compile_args = edje_cflags + eo_cflags,
|
||||
extra_link_args = edje_libs)
|
||||
modules.append(edje_ext)
|
||||
modules.append(edje_ext)
|
||||
|
||||
# Emotion
|
||||
emotion_cflags, emotion_libs = pkg_config('Emotion', 'emotion', "1.7.99")
|
||||
emotion_ext = Extension("efl.emotion", ["efl/emotion/efl.emotion.pyx"],
|
||||
# Emotion
|
||||
emotion_cflags, emotion_libs = pkg_config('Emotion', 'emotion', "1.7.99")
|
||||
emotion_ext = Extension("efl.emotion", ["efl/emotion/efl.emotion.pyx"],
|
||||
include_dirs = ['include/'],
|
||||
extra_compile_args = emotion_cflags + eo_cflags,
|
||||
extra_link_args = emotion_libs)
|
||||
modules.append(emotion_ext)
|
||||
modules.append(emotion_ext)
|
||||
|
||||
# EDBus
|
||||
edbus_cflags, edbus_libs = pkg_config('EDBus', 'edbus2', "1.7.99")
|
||||
pydbus_cflags, pydbus_libs = pkg_config('dbus-python', 'dbus-python')
|
||||
edbus_ext = Extension("efl.edbus", ["efl/edbus/edbus.pyx"],
|
||||
# EDBus
|
||||
edbus_cflags, edbus_libs = pkg_config('EDBus', 'edbus2', "1.7.99")
|
||||
pydbus_cflags, pydbus_libs = pkg_config('dbus-python', 'dbus-python')
|
||||
edbus_ext = Extension("efl.edbus", ["efl/edbus/edbus.pyx"],
|
||||
include_dirs = ['include/'],
|
||||
extra_compile_args = edbus_cflags + pydbus_cflags + ecore_cflags,
|
||||
extra_link_args = edbus_libs)
|
||||
modules.append(edbus_ext)
|
||||
modules.append(edbus_ext)
|
||||
|
||||
# Elementary
|
||||
elm_cflags, elm_libs = pkg_config('Elementary', 'elementary', "1.7.99")
|
||||
elm_exts = [
|
||||
# Elementary
|
||||
elm_cflags, elm_libs = pkg_config('Elementary', 'elementary', "1.7.99")
|
||||
elm_exts = [
|
||||
Extension("efl.elementary.actionslider", ["efl/elementary/actionslider.pyx"]),
|
||||
Extension("efl.elementary.background", ["efl/elementary/background.pyx"]),
|
||||
Extension("efl.elementary.box", ["efl/elementary/box.pyx"]),
|
||||
|
@ -174,14 +177,14 @@ elm_exts = [
|
|||
Extension("efl.elementary.video", ["efl/elementary/video.pyx"]),
|
||||
Extension("efl.elementary.web", ["efl/elementary/web.pyx"]),
|
||||
Extension("efl.elementary.window", ["efl/elementary/window.pyx"]),
|
||||
]
|
||||
]
|
||||
|
||||
for e in elm_exts:
|
||||
for e in elm_exts:
|
||||
e.include_dirs = ['include/']
|
||||
e.extra_compile_args = elm_cflags + eo_cflags
|
||||
e.extra_link_args = elm_libs
|
||||
|
||||
modules = modules + elm_exts
|
||||
modules = modules + elm_exts
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in New Issue