Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
[setup] use pre-cythonized files, if cython has not been requested du…
Browse files Browse the repository at this point in the history
…ring build.

Also do not ship ipython notebooks, since there is currently no easy way to make them useable.
Fixes #453.
  • Loading branch information
marscher committed Jul 27, 2015
1 parent 65cbf18 commit 455aa75
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
13 changes: 3 additions & 10 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 455aa75

Please sign in to comment.