How to Bootstrap numpy installation in setup.py
The following works at least with numpy1.8 and python{2.6,2.7,3.3}: from setuptools import setup from setuptools.command.build_ext import build_ext as _build_ext class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_options(self) # Prevent numpy from thinking it is still in its setup process: __builtins__.__NUMPY_SETUP__ = False import numpy self.include_dirs.append(numpy.get_include()) setup( … cmdclass={‘build_ext’:build_ext}, setup_requires=[‘numpy’], … ) For a small explanation, see why it … Read more