Commit 99c75057 authored by Kirill Smelkov's avatar Kirill Smelkov

X Cythonize in py2 mode

Previously it was failing with master:

(neo) (z-dev) (g.env) kirr@deco:~/src/tools/py/cython/t/compilebench$ ./doit.sh
/home/kirr/src/tools/py/cython/Cython/Compiler/Main.py:344: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/kirr/src/tools/py/cython/t/compilebench/pystone_pyxtest.py
  tree = Parsing.p_module(s, pxd, full_module_name)

Error compiling Cython file:
------------------------------------------------------------
...
TRUE = 1
FALSE = 0

def main(loops=LOOPS):
    benchtime, stones = pystones(loops)
    print "Pystone(%s) time for %d passes = %g" % \
         ^
------------------------------------------------------------

pystone_pyxtest.py:62:10: Syntax error in simple statement list
parent 1c5d9006
#!/bin/sh
#!/bin/sh -e
# this program compares timings to compile and run pystone.py via cython and gcc/clang/tcc.
export LANG=C.UTF-8 # . for floating point in e.g. time output
......@@ -6,7 +6,7 @@ export LANG=C.UTF-8 # . for floating point in e.g. time output
git clean -fdX
cp pystone.py pystone_pyxtest.py # to be sure that 'import pystone_pyxtest' does not pick up py code
cython pystone_pyxtest.py # -> pystone_pyxtest.c
cython -2 pystone_pyxtest.py # -> pystone_pyxtest.c
wc -l pystone_pyxtest.{py,c}
rm pystone_pyxtest.py
......
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