Skip to content

Commit

Permalink
fixed cythonization in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
keflavich committed Feb 5, 2014
1 parent bfdca4a commit 37c831d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion plfit/cplfit.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
build_src.Pyrex = Cython
build_src.have_pyrex = True
from Cython.Distutils import build_ext
import Cython
from Cython.Build import cythonize
import numpy
import os
import shutil
Expand Down Expand Up @@ -46,14 +46,16 @@
numpy_include_dirs = numpy.get_include()


dirs = list(numpy_include_dirs)
dirs.extend(Cython.__path__)
dirs = list(Cython.__path__)
dirs.extend(numpy_include_dirs)
dirs.append('.')
print dirs

ext_cplfit = Extension("plfit/cplfit",
ext_cplfit = Extension("plfit",
["plfit/cplfit.pyx"],
include_dirs=dirs,
extra_compile_args=['-O3'])
#ext_cplfit = cythonize('plfit/cplfit.pyx', include_path=dirs, extra_compile_args=['-O3'])[0]

#ext_fplfit = numpyExtension(name="fplfit",
# sources=["fplfit.f"])
Expand Down Expand Up @@ -91,7 +93,7 @@
packages=['plfit','plfit.tests'],
# obsolete package_dir={'plfit':'.'},
install_requires=["numpy","cython"],
ext_modules=[ext_cplfit],
ext_modules=cythonize([ext_cplfit]),
cmdclass={'build_ext': build_ext}
)

Expand Down

0 comments on commit 37c831d

Please sign in to comment.