Skip to content

Commit

Permalink
Merge pull request h5py#576 from jlombacher/master
Browse files Browse the repository at this point in the history
Requirements for setup (numpy, Cython) added
  • Loading branch information
andrewcollette committed May 26, 2015
2 parents 71665d9 + ab38f55 commit 8061032
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ def run(self):
ext_modules = [Extension('h5py.x',['x.c'])], # To trick build into running build_ext
requires = ['numpy (>=1.6.1)', 'Cython (>=0.17)'],
install_requires = ['numpy>=1.6.1', 'Cython>=0.17', 'six'],
setup_requires = ['pkgconfig', 'six'],
setup_requires = ['numpy>=1.6.1', 'Cython>=0.17', 'pkgconfig', 'six'],
cmdclass = CMDCLASS,
)
9 changes: 8 additions & 1 deletion setup_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ def _make_extensions(config):
except EnvironmentError:
pass

settings['include_dirs'] += [numpy.get_include()]
try:
numpy_includes = numpy.get_include()
except AttributeError:
# if numpy is not installed get the headers from the .egg directory
import numpy.core
numpy_includes = os.path.join(os.path.dirname(numpy.core.__file__), 'include')

settings['include_dirs'] += [numpy_includes]
if config.mpi:
import mpi4py
settings['include_dirs'] += [mpi4py.get_include()]
Expand Down

0 comments on commit 8061032

Please sign in to comment.