From 9f6422a80721dcca67c0e54620e7d761c9fd1530 Mon Sep 17 00:00:00 2001 From: Kai Huuhko Date: Sat, 9 Nov 2013 13:26:09 +0200 Subject: [PATCH] setup.py: Output error traceback from Cython check This will hopefully shed more light on what's going wrong in onefang's build script. Also use script dir instead of cwd for relative path. --- setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5789cb3..410e85a 100755 --- a/setup.py +++ b/setup.py @@ -8,6 +8,8 @@ from distutils.extension import Extension from distutils.version import StrictVersion +script_path = os.path.dirname(os.path.abspath(__file__)) + # Sphinx try: from sphinx.setup_command import BuildDoc @@ -38,7 +40,7 @@ def pkg_config(name, require, min_vers=None): # use cython or pre-generated c files -if os.path.exists(os.path.join(os.getcwd(), "efl", "eo", "efl.eo.pyx")): +if os.path.exists(os.path.join(script_path, "efl", "eo", "efl.eo.pyx")): module_suffix = ".pyx" min_ver = "0.17.0" try: @@ -52,7 +54,8 @@ if os.path.exists(os.path.join(os.getcwd(), "efl", "eo", "efl.eo.pyx")): Cython.Compiler.Options.docstrings = True # Set to False to disable docstrings except (ImportError, AssertionError): - raise SystemExit("Requires Cython >= %s (http://cython.org/)" % min_ver) + print("Requires Cython >= %s (http://cython.org/)" % min_ver) + raise else: module_suffix = ".c" from distutils.command.build_ext import build_ext