Skip to content

Commit fd610ba

Browse files
committed
Allow to specify Python 3 headers location.
1 parent 4cba038 commit fd610ba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

compile_linux.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/sh
2+
3+
if [ -z $1 ]; then
4+
echo "Please specify the location of your Python 3 header files, E.G: /usr/include/python3.5"
5+
exit 1
6+
fi
7+
28
Kernel=$(uname -s)
39
case "$Kernel" in
410
Linux) Kernel="linux" ;;
@@ -38,4 +44,4 @@ cp -f NeticaEx.o Netica_API_504_Linux/lib/NeticaEx.o
3844
#compiling cython to c
3945
cython -a NeticaPy.pyx
4046
#compiling C to .so file
41-
gcc -shared -pthread -fPIC -fwrapv -O2 -Wall -fno-strict-aliasing -I/usr/include/python3.5 Netica_API_504_Linux/lib/NeticaEx.o NeticaPy.c -o NeticaPy.so -INetica_API_504_Linux/src -LNetica_API_504_Linux/lib -lrt -lnetica -lpthread -lstdc++ -lm
47+
gcc -shared -pthread -fPIC -fwrapv -O2 -Wall -fno-strict-aliasing -I$1 Netica_API_504_Linux/lib/NeticaEx.o NeticaPy.c -o NeticaPy.so -INetica_API_504_Linux/src -LNetica_API_504_Linux/lib -lrt -lnetica -lpthread -lstdc++ -lm

0 commit comments

Comments
 (0)