File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 66 * NSApplicationMain() looks for Info.plist using the path in argv[0], which
77 * goes wrong if your interpreter is /usr/bin/python.
88 */
9- #include <Python.h>
9+ #include <Python/Python .h>
1010#include <string.h>
1111#include <unistd.h>
1212
Original file line number Diff line number Diff line change @@ -2,14 +2,19 @@ exec >&2
22redo- ifchange runpython.c
33ARCHES= " "
44printf " Platforms: "
5- for d in /usr/libexec/gcc/darwin/* ; do
6- PLAT=$(basename "$d")
7- [ "$PLAT" != "ppc64" ] || continue # fails for some reason on my Mac
8- ARCHES="$ARCHES -arch $PLAT"
9- printf "$PLAT "
10- done
5+ if [ - d /usr/libexec/gcc/darwin ]; then
6+ for d in /usr/libexec/gcc/darwin/* ; do
7+ PLAT=$(basename "$d")
8+ [ "$PLAT" != "ppc64" ] || continue # fails for some reason on my Mac
9+ ARCHES="$ARCHES -arch $PLAT"
10+ printf "$PLAT "
11+ done
12+ fi
1113printf "\n"
14+ PYTHON_LDFLAGS=$(python-config --ldflags)
15+ PYTHON_INCLUDES=$(python-config --includes)
1216gcc $ARCHES \
13- -Wall -o $3 runpython.c \
14- -I/usr/include/python2.5 \
15- -lpython2.5
17+ -Wall -o $3 runpython.c \
18+ $PYTHON_INCLUDES \
19+ $PYTHON_LDFLAGS \
20+ -framework Python
You can’t perform that action at this time.
0 commit comments