Commit 43913485 authored by Denis Bilenko's avatar Denis Bilenko

recognize CYTHON env var

parent be1c5263
......@@ -2,6 +2,7 @@
# run it. If you want setup.py to run "make" automatically, rename it back to "Makefile".
PYTHON ?= python
CYTHON ?= cython
all: gevent/gevent.core.c gevent/gevent.ares.c gevent/gevent._semaphore.c gevent/gevent._util.c
......@@ -12,15 +13,15 @@ gevent/gevent.core.c: gevent/core.ppyx gevent/libev.pxd util/cythonpp.py
mv gevent.core.* gevent/
gevent/gevent.ares.c: gevent/ares.pyx gevent/core.pyx gevent/*.pxd
cython -o gevent.ares.c gevent/ares.pyx
$(CYTHON) -o gevent.ares.c gevent/ares.pyx
mv gevent.ares.* gevent/
gevent/gevent._semaphore.c: gevent/_semaphore.pyx
cython -o gevent._semaphore.c gevent/_semaphore.pyx
$(CYTHON) -o gevent._semaphore.c gevent/_semaphore.pyx
mv gevent._semaphore.* gevent/
gevent/gevent._util.c: gevent/_util.pyx
cython -o gevent._util.c gevent/_util.pyx
$(CYTHON) -o gevent._util.c gevent/_util.pyx
mv gevent._util.* gevent/
clean:
......
......@@ -17,6 +17,7 @@ else:
_ex = lambda: sys.exc_info()[1]
CYTHON = os.environ.get('CYTHON') or 'cython'
DEBUG = False
WRITE_OUTPUT = False
......@@ -521,7 +522,7 @@ def run_cython(filename, sourcehash, output_filename, banner, comment, cache={})
result = cache.get(sourcehash)
if result is not None:
return result
system('cython -o %s %s' % (pipes.quote(output_filename), pipes.quote(filename)), comment)
system('%s -o %s %s' % (CYTHON, pipes.quote(output_filename), pipes.quote(filename)), comment)
result = postprocess_cython_output(output_filename, banner)
cache[sourcehash] = result
return result
......
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