Skip to content

Commit 8551d30

Browse files
committed
more tweaks to setup.py, make travis install with -e
1 parent 2389529 commit 8551d30

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ before_install:
1818
- conda config --add channels conda-forge
1919
install:
2020
- conda install --yes python=$TRAVIS_PYTHON_VERSION pip numpy scipy matplotlib cython nose future
21-
- pip install -v .
21+
- pip install -e .
2222
script: nosetests tests

setup.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
import sys
88
from glob import glob
99

10-
# generate list of .c extension modules based on the .pyx files
10+
# generate list of .c extension modules based on the .pyx files, which are
11+
# included in the pypi package (but aren't included in the git repo)
1112
extension_pathspec = os.path.join('pylds','*.pyx') # only searches pylds/*.pyx!
1213
paths = [os.path.splitext(fp)[0] for fp in glob(extension_pathspec)]
1314
names = ['.'.join(os.path.split(p)) for p in paths]
@@ -16,19 +17,21 @@
1617
for name, path in zip(names,paths)]
1718

1819
# alternatively, use cython to generate extension modules if we can import it
20+
# (which is required if we're installing from the git repo)
1921
try:
2022
from Cython.Distutils import build_ext as _build_ext
2123
except ImportError:
2224
use_cython = False
2325
else:
2426
use_cython = True
2527

26-
if use_cython and not os.environ.get('NO_USE_CYTHON'):
28+
if use_cython:
2729
from Cython.Build import cythonize
2830
try:
2931
ext_modules = cythonize('**/*.pyx') # recursive globbing!
3032
except:
3133
warn('Failed to generate extension module code from Cython files')
34+
sys.exit(1)
3235

3336
# if we run the dist command, regenerate the sources from cython
3437
class sdist(_sdist):

0 commit comments

Comments
 (0)