Skip to content

Commit 8308d8a

Browse files
committed
don't include <Python/Python.h> when using conda
1 parent 1f7e520 commit 8308d8a

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

build/gnumake-mac-gcc.inc

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ endif
3838

3939
else
4040

41+
DEFS += -DPY_USE_FRAMEWORK
42+
4143
# don't use -framework Python, since this will stick to the default system version
4244

4345
_LOCAL_FRAMEWORK := /Library/Frameworks/Python.framework/Versions/$(PY_MAJOR_VERSION).$(PY_MINOR_VERSION)

source/pybuffer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
1515
#error You need at least flext version 0.5.0
1616
#endif
1717

18-
#if FLEXT_OS == FLEXT_OS_MAC
18+
#ifdef PY_USE_FRAMEWORK
1919
#include <Python/Python.h>
2020
#else
2121
#include <Python.h>

source/pybundle.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
1515
#error You need at least flext version 0.5.0
1616
#endif
1717

18-
#if FLEXT_OS == FLEXT_OS_MAC
18+
#ifdef PY_USE_FRAMEWORK
1919
#include <Python/Python.h>
2020
#else
2121
#include <Python.h>

source/pyprefix.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
1616
// otherwise some functions don't get defined
1717
#include <cmath>
1818

19-
#if FLEXT_OS == FLEXT_OS_MAC
19+
#ifdef PY_USE_FRAMEWORK
2020
#include <Python/Python.h>
2121
#else
2222
#include <Python.h>

source/pysymbol.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
1515
#error You need at least flext version 0.5.0
1616
#endif
1717

18-
#if FLEXT_OS == FLEXT_OS_MAC
18+
#ifdef PY_USE_FRAMEWORK
1919
#include <Python/Python.h>
2020
#else
2121
#include <Python.h>

0 commit comments

Comments
 (0)