From c0a7ad626418fd057db7cc25f6222bbc244828b5 Mon Sep 17 00:00:00 2001 From: Christoph Groth <christoph.groth@cea.fr> Date: Sun, 25 Oct 2015 15:46:47 +0100 Subject: [PATCH] setup.py: implicitly enable --cython when running from git --- CONTRIBUTE.rst | 5 +---- setup.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTE.rst b/CONTRIBUTE.rst index 8063c8b2..978d5fd3 100644 --- a/CONTRIBUTE.rst +++ b/CONTRIBUTE.rst @@ -75,13 +75,10 @@ A useful trick for working on the source code is to build in-place so that there is no need to re-install after each change. This can be done with the following command :: - python setup.py build_ext -i --cython + python setup.py build_ext -i The ``kwant`` subdirectory of the source distribution will be thus turned into a proper Python package that can be imported. To be able to import Kwant from within Python, one can either work in the root directory of the distribution (where the subdirectory ``kwant`` is located), or make a (symbolic) link from somewhere in the Python search path to the the package subdirectory. - -The option ``--cython`` enables the translation of .pyx files into .c files. -It is only needed if any .pyx files have been modified. diff --git a/setup.py b/setup.py index cb9158a3..3b884b97 100755 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ try: sys.argv.remove(CYTHON_OPTION) use_cython = True except ValueError: - use_cython = False + use_cython = version_is_from_git if use_cython: try: -- GitLab