# RUN ALL TESTS!
ROOTDIR = os.path.join(os.getcwd(), os.path.dirname(sys.argv[0]), 'tests')
WORKDIR = os.path.join(os.getcwd(), 'BUILD')
- if os.path.exists(WORKDIR):
- shutil.rmtree(WORKDIR, ignore_errors=True)
- os.makedirs(WORKDIR)
-
- print "Running tests against Cython %s" % version
- print "Python", sys.version
- print
+ if WITH_CYTHON:
+ if os.path.exists(WORKDIR):
+ shutil.rmtree(WORKDIR, ignore_errors=True)
+ if not os.path.exists(WORKDIR):
+ os.makedirs(WORKDIR)
+
- if not sys.path or sys.path[0] != WORKDIR:
- sys.path.insert(0, WORKDIR)
-
+ if WITH_CYTHON:
+ from Cython.Compiler.Version import version
+ from Cython.Compiler.Main import \
+ CompilationOptions, \
+ default_options as pyrex_default_options, \
+ compile as cython_compile
+ print("Running tests against Cython %s" % version)
+ else:
+ print("Running tests without Cython.")
+ print("Python", sys.version)
+ print("")
try:
sys.argv.remove("-C")