Commit 1cab15b0 authored by Stefan Behnel's avatar Stefan Behnel

add test runner option to test a built or installed Cython

parent d88465bb
...@@ -1372,6 +1372,8 @@ def main(): ...@@ -1372,6 +1372,8 @@ def main():
help="working directory") help="working directory")
parser.add_option("--work-dir", dest="work_dir", default=os.path.join(os.getcwd(), 'BUILD'), parser.add_option("--work-dir", dest="work_dir", default=os.path.join(os.getcwd(), 'BUILD'),
help="working directory") help="working directory")
parser.add_option("--cython-dir", dest="cython_dir", default=os.getcwd(),
help="Cython installation directory (default: use local source version)")
parser.add_option("--debug", dest="for_debugging", default=False, action="store_true", parser.add_option("--debug", dest="for_debugging", default=False, action="store_true",
help="configure for easier use with a debugger (e.g. gdb)") help="configure for easier use with a debugger (e.g. gdb)")
parser.add_option("--pyximport-py", dest="pyximport_py", default=False, action="store_true", parser.add_option("--pyximport-py", dest="pyximport_py", default=False, action="store_true",
...@@ -1385,6 +1387,7 @@ def main(): ...@@ -1385,6 +1387,7 @@ def main():
if sys.version_info[0] >= 3: if sys.version_info[0] >= 3:
options.doctests = False options.doctests = False
if options.with_cython: if options.with_cython:
sys.path.insert(0, options.cython_dir)
try: try:
# try if Cython is installed in a Py3 version # try if Cython is installed in a Py3 version
import Cython.Compiler.Main import Cython.Compiler.Main
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment