Created
August 18, 2015 11:51
-
-
Save jiegec/e66b13361c1f8109a1a7 to your computer and use it in GitHub Desktop.
numpy build fix in Mac OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/numpy/distutils/command/build_ext.py b/numpy/distutils/command/build_ext.py | |
| index b48e422..4311758 100644 | |
| --- a/numpy/distutils/command/build_ext.py | |
| +++ b/numpy/distutils/command/build_ext.py | |
| @@ -46,10 +46,14 @@ class build_ext (old_build_ext): | |
| self.fcompiler = None | |
| def finalize_options(self): | |
| - incl_dirs = self.include_dirs | |
| + if isinstance(self.include_dirs, str): | |
| + self.include_dirs = self.include_dirs.split(os.pathsep) | |
| + incl_dirs = self.include_dirs or [] | |
| + if self.distribution.include_dirs is None: | |
| + self.distribution.include_dirs = [] | |
| + self.include_dirs = self.distribution.include_dirs | |
| + self.include_dirs.extend(incl_dirs) | |
| old_build_ext.finalize_options(self) | |
| - if incl_dirs is not None: | |
| - self.include_dirs.extend(self.distribution.include_dirs or []) | |
| def run(self): | |
| if not self.extensions: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment