Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using brew Python in OSX #1

Open
chaosct opened this issue Apr 7, 2016 · 1 comment
Open

Using brew Python in OSX #1

chaosct opened this issue Apr 7, 2016 · 1 comment

Comments

@chaosct
Copy link

chaosct commented Apr 7, 2016

I had to modify some parts of the gnumake-mac-gcc.inc in order to compile against an alternative Python installation (from brew). I'll put them here so it can serve as documentation to anyone having the same problem.

@@ -1,8 +1,8 @@
 # don't use -framework Python, since this will stick to the default system version

-_LOCAL_FRAMEWORK := /Library/Frameworks/Python.framework/Versions/$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)
+_LOCAL_FRAMEWORK := /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework
 _SYSTEM_FRAMEWORK := /System/Library/Frameworks/Python.framework/Versions/$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)
 _LOCAL_LIBRARY := /Library/Python/$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)
 _SYSTEM_LIBRARY := /System/Library/Python/$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)

 DEFS += -DPY_EXPORTS
@@ -19,11 +19,11 @@ endif
 ifdef PY_NUMARRAY
 DEFS += -DPY_NUMARRAY
 endif
 ifdef PY_NUMPY
 DEFS += -DPY_NUMPY
-INCPATH += -I$(_LOCAL_LIBRARY)/python$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)/site-packages/numpy/core/include
+INCPATH += -I/usr/local/lib/python2.7/site-packages/numpy/core/include
 ifeq ($(PY_DEFAULT),1)
 INCPATH += -I$(_SYSTEM_FRAMEWORK)/lib/python$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)/site-packages/numpy/core/include
 INCPATH += -I$(_SYSTEM_FRAMEWORK)/Extras/lib/python/numpy/core/include
 else
 INCPATH += -I$(_LOCAL_FRAMEWORK)/lib/python$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)/site-packages/numpy/core/include

It would be awesome if this could be configured in config.txt.

@grrrr
Copy link
Owner

grrrr commented Apr 7, 2016

Thank you, your input is much appreciated. I'll think of how to make the build system more flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants