From: Stefan Behnel Date: Fri, 16 May 2008 18:49:12 +0000 (+0200) Subject: trunk merge X-Git-Tag: 0.9.8rc1~11^2~10^2~15^2~41 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=99a724e1dce064331131e3031e6083e14dddb0d2;p=cython.git trunk merge --- 99a724e1dce064331131e3031e6083e14dddb0d2 diff --cc runtests.py index e7ce124a,331e066f..d255ba7c --- a/runtests.py +++ b/runtests.py @@@ -236,26 -220,13 +242,23 @@@ if __name__ == '__main__' # 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")