diff --git a/INSTALL b/INSTALL index df9a404..c8cbcd8 100644 --- a/INSTALL +++ b/INSTALL @@ -68,12 +68,14 @@ videos you need the YouTube module from sphinx contrib repository. packages: python-sphinx, graphviz - Once installed run: + To build the docs just run: python setup.py build_doc You will find the generated html docs under the folder: build/sphinx/html + Note: you must build the bindings before building the docs, or you will end + up with empty documentation. 5. TESTS and EXAMPLES: diff --git a/TODO b/TODO index 222d426..b1eed5e 100644 --- a/TODO +++ b/TODO @@ -3,8 +3,7 @@ BUGS: * Evas: smart object doesn't work * Elm: remove tooltips.pxi -* Using the string conversion functions will leave dangling a pointer if - reference to the python string object is lost. + TODO: @@ -23,16 +22,8 @@ TODO: * include python-e_dbus (or make edbus2 ??) * elm.Notify align_set/get/prop * cleanup elementary_object -* Investigate the string reference problem. - - Possible solutions: - - memcpy the string, can we reliably prevent it from leaking? - - incref the string object, can we reliably decref after use? - - use eina stringshare, some APIs actually seem to expect this instead of a - normal char array and call eina_stringshare_del when freeing - the object/struct. * Review the internal functions and name them consistently -* Find out the minimum Cython version required + STUFF LEFT OUT: @@ -52,7 +43,7 @@ CHANGES FROM 1.7 to 1.8: * added efl container package * ecore.file.Download => efl.ecore.FileDownload * Emotion(module_filename="xxx") => Emotion(module_name="xxx") -* elementary.need_e_dbus => elementary.need_e_dbus +* elementary.need_e_dbus => elementary.need_edbus * elm.domain_translatable_text_part_set => elm.domain_translatable_part_text_set * elm.Scroller.custom_widget_base_theme_set => elm.Layout.theme_set TODO is this right? * elm.notify.orient_set/get/prop removed => align_set (TODO) diff --git a/setup.py b/setup.py index db39829..7261676 100755 --- a/setup.py +++ b/setup.py @@ -5,6 +5,8 @@ import subprocess from distutils.core import setup, Command from distutils.extension import Extension + +# Cython try: from Cython.Distutils import build_ext from Cython.Build import cythonize @@ -14,6 +16,8 @@ try: except ImportError: raise SystemExit("Requires Cython (http://cython.org/)") + +# Sphinx try: from sphinx.setup_command import BuildDoc except ImportError: @@ -24,26 +28,27 @@ except ImportError: def finalize_options(self): pass def run(self): print("Error: sphinx not found") -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() - if min_vers is not None: - assert 0 == subprocess.call(["pkg-config", "--atleast-version", min_vers, require]) - cflags = subprocess.check_output(["pkg-config", "--cflags", require]).decode("utf-8").split() - libs = subprocess.check_output(["pkg-config", "--libs", require]).decode("utf-8").split() - sys.stdout.write("OK, found " + ver + "\n") - return (cflags, libs) - except (OSError, subprocess.CalledProcessError): - raise SystemExit("Failed to find Evas with 'pkg-config'. Please make sure that it is installed and available on your system path.") - except (AssertionError): - raise SystemExit("Failed to match version. Found: " + ver + " Needed: " + min_vers) + +# pkg-config +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() + if min_vers is not None: + assert 0 == subprocess.call(["pkg-config", "--atleast-version", min_vers, require]) + cflags = subprocess.check_output(["pkg-config", "--cflags", require]).decode("utf-8").split() + libs = subprocess.check_output(["pkg-config", "--libs", require]).decode("utf-8").split() + sys.stdout.write("OK, found " + ver + "\n") + return (cflags, libs) + except (OSError, subprocess.CalledProcessError): + raise SystemExit("Failed to find Evas with 'pkg-config'. Please make sure that it is installed and available on your system path.") + except (AssertionError): + raise SystemExit("Failed to match version. Found: " + ver + " Needed: " + min_vers) +modules = [] +if not "build_doc" in sys.argv: ## 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) @@ -53,9 +58,6 @@ else: # subprocess.call("rm -rfv efl/emotion/*.c", shell=True) # subprocess.call("rm -rfv efl/elementary/*.c", shell=True) - - modules = [] - # Eo eo_cflags, eo_libs = pkg_config('Eo', 'eo', "1.7.99") eina_cflags, eina_libs = pkg_config('Eina', 'eina', "1.7.99") @@ -116,7 +118,6 @@ else: #modules.append(edbus_ext) # 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"]), @@ -188,6 +189,7 @@ else: Extension("efl.elementary.window", ["efl/elementary/window.pyx"]), ] + elm_cflags, elm_libs = pkg_config('Elementary', 'elementary', "1.7.99") for e in elm_exts: e.include_dirs = ['include/'] e.extra_compile_args = elm_cflags @@ -215,5 +217,7 @@ if __name__ == "__main__": #"builder": (None, "coverage"), }, }, - ext_modules = cythonize(modules, include_path=["include",], compiler_directives={"embedsignature": False}), + ext_modules = cythonize(modules, + include_path=["include",], + compiler_directives={"embedsignature": False}), )