Skip to content

Allows use of this library in macOS#132

Open
adevaucorbeil wants to merge 1 commit intolava:masterfrom
adevaucorbeil:master
Open

Allows use of this library in macOS#132
adevaucorbeil wants to merge 1 commit intolava:masterfrom
adevaucorbeil:master

Conversation

@adevaucorbeil
Copy link
Copy Markdown

This is a small change to allow the use of this library with macOS:
"#include <Python.h>" is conditionally changed to "#include <Python/Python.h>"

@lava
Copy link
Copy Markdown
Owner

lava commented Oct 25, 2019

I'm curious how does MacOS handle python2 vs python3? The extended include path doesn't seem to include a version number.

@mdaley
Copy link
Copy Markdown

mdaley commented Apr 27, 2020

I've just started playing with this (very useful!) library on OSX using Python 3. It all seems to work fine and I didn't need to do anything unusual to get Python.h to be available. My cmake reports this:

Python_VERSION:3.7.7
Python_NumPy_VERSION:1.18.3
Python_LIBRARIES:/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib
Python_INCLUDE_DIRS:/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/python3.7m
Python_NumPy_INCLUDE_DIRS:/usr/local/lib/python3.7/site-packages/numpy/core/include

and Python.h is available in the Python include dir.

@mdaley
Copy link
Copy Markdown

mdaley commented Apr 28, 2020

Sorry, I may have got confused. I can quite happily use this library, i.e. the header file and the various python libraries and header files in my own project. This works fine. However, I can't build this project on my Mac either. I get the same error. I think it might be to do with how the cmake file is set up. I am investigating...

@Cryoris
Copy link
Copy Markdown
Contributor

Cryoris commented May 23, 2020

Using the provided Makefile and Python 3 I'm not having any issues on Mac (Catalina, 10.15.4). I'm not sure if this conditional change is ideal.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants