def run(self):
     """Build extensions in build directory, then copy if --inplace"""
     old_inplace, self.inplace = self.inplace, 0
     _build_ext.run(self)
     self.inplace = old_inplace
     if old_inplace:
         self.copy_extensions_to_source()
Esempio n. 2
0
 def run(self):
     """Build extensions in build directory, then copy if --inplace"""
     old_inplace, self.inplace = self.inplace, 0
     _build_ext.run(self)
     self.inplace = old_inplace
     if old_inplace:
         self.copy_extensions_to_source()
Esempio n. 3
0
 def run(self):
     # According to https://pip.pypa.io/en/stable/reference/pip_install.html#installation-order
     # at this point we can be sure pip has already installed numpy
     from numpy import get_include
     numpy_includes = get_include()
     # Alternatively
     # numpy_includes = pkg_resources.resource_filename('numpy', 'core/include')
     for ext in self.extensions:
         if hasattr(ext, 'include_dirs'):
             if numpy_includes not in ext.include_dirs:
                 ext.include_dirs.append(numpy_includes)
     build_ext.run(self)