I have a compile.py script:
from distutils.core import setup
from Cython.Build import cythonize
setup(ext_modules = cythonize("module1.pyx"))
that compiles my Cython code. The drawback is that I have to call it with a command-line parameter build
:
python compile.py build
Instead, I would like to be able to call this compile.py
directly from Sublime Text, as usual, with CTRL+B. To do that, it should work from:
python compile.py
Question: how to modify the above script so that it can be run with python compile.py
?