From 455aa75595be456373f17cb42294700349bd76ac Mon Sep 17 00:00:00 2001 From: marscher Date: Mon, 27 Jul 2015 18:45:02 +0200 Subject: [PATCH] [setup] use pre-cythonized files, if cython has not been requested during build. Also do not ship ipython notebooks, since there is currently no easy way to make them useable. Fixes #453. --- MANIFEST.in | 13 +++---------- setup.py | 11 +++++++++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 28eabe9e8..c25963e65 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -29,21 +29,14 @@ prune doc/source/generated prune doc/source/api/generated # ipython notebooks -graft pyemma-ipython -recursive-exclude pyemma-ipython .ipynb_checkpoints +#graft pyemma-ipython +#recursive-exclude pyemma-ipython .ipynb_checkpoints # exclude git related files recursive-exclude * git .git* # sources of extensions (incl. cython) -include pyemma/msm/estimation/dense/*.h -include pyemma/msm/estimation/sparse/*.h -include pyemma/msm/estimation/dense/mle_trev_given_pi.c -include pyemma/msm/estimation/sparse/mle_trev_given_pi.c -include pyemma/coordinates/clustering/include/clustering.h - -#include cython files -recursive-include pyemma *.pyx +recursive-include pyemma *.pyx *.h *.c # do not include eventually present eggs (installed during setup runtime) prune .eggs diff --git a/setup.py b/setup.py index f157d29df..7b67c7c71 100755 --- a/setup.py +++ b/setup.py @@ -126,7 +126,7 @@ def extensions(): else: lib_prefix = '' regspatial_module = \ - Extension('pyemma.coordinates.clustering.regspatial', + Extension('pyemma.coordinates.clustering.regspatial', sources=[ 'pyemma/coordinates/clustering/src/regspatial.c', 'pyemma/coordinates/clustering/src/clustering.c'], @@ -157,6 +157,13 @@ def extensions(): if USE_CYTHON: # if we have cython available now, cythonize module exts = cythonize(exts) + else: + # replace pyx files by their pre generated c code. + for e in exts: + new_src = [] + for s in e.sources: + new_src.append(s.replace('.pyx', '.c')) + e.sources = new_src if openmp_enabled: warnings.warn('enabled openmp') @@ -291,7 +298,7 @@ def script_entry_points(): metadata['install_requires'] += ['argparse'] # include ipython notebooks. Will be installed directly in site-packages - metadata['packages'] += ['pyemma-ipython'] + #metadata['packages'] += ['pyemma-ipython'] #metadata['include_package_data'] = True try: