repo: resdb
action: commit
revision: 
path_from: 
revision_from: 78e607b3e4c55b830193dee5711b220e6ca79720:
path_to: 
revision_to: 
git.thebackupbox.net
resdb
git clone git://git.thebackupbox.net/resdb
commit 78e607b3e4c55b830193dee5711b220e6ca79720
Author: d3v11 
Date:   Sat Oct 29 11:37:41 2011 -0400

    SpliceX patched compiler for /path/to/Python.h and /path/to/structmember.h

diff --git a/contrib/splicex/CHANGES b/contrib/splicex/CHANGES
index 3a0e43bd8903f529e93f6701bc9e41da4c95cda5..
index ..442a19ee973e79eece9fa9ec0ed1f9f2d9924a6f 100644
--- a/contrib/splicex/CHANGES
+++ b/contrib/splicex/CHANGES
@@ -25,3 +25,23 @@ CHANGES:
 		via Cython. see README for dependencies
 		and installation details.

+		SpliceX compiler flags patched. recent
+		update did not distinguish:
+
+			/usr/include/
+
+				-FROM-
+
+			/usr/local/include/
+
+		Thus, if you have debian python-dev or 
+		source python-dev the ./configure script
+		should choose the appropriate option.
+		if the configure still failed to locate
+		the python development files (headers)
+		please let me know and I will correct.
+
+		SpliceX can now optionally do a pure
+		python install. This cuts down on
+		dependencies and is useful if you just
+		want to test, try, and/or debug.
diff --git a/contrib/splicex/README b/contrib/splicex/README
index 2a446775e09bd83578e53888d639140794ef60db..
index ..1a8bf8a7eab8bed7458bf8e6e726a62d450415bc 100644
--- a/contrib/splicex/README
+++ b/contrib/splicex/README
@@ -32,6 +32,20 @@ AUTHOR:
 	If your goal is simply to test, try, and/or debug splicex then
 	using the pythonic install will be more practical.

+	NOTES:
+
+		If you installed Python from source you can ignore
+		the python-dev dependency below. However, your source
+		install of Python must have the development files. IE:
+
+		tar xvf Python-*.tgz
+		cd Python-*
+		./configure --with-pydebug
+		make install
+
+		This generates Python.h and structmember.h, which are
+		need for gcc to compile splicex.
+
 	DEPENDS ON:

 		python (>=2.6), python-dev(>=2.6), cython (>=0.12.1), 
diff --git a/contrib/splicex/configure b/contrib/splicex/configure
index 535520e633ac959b6645146037a80d504804b047..
index ..933b51d74f2f1fded34cbfeb71327cbdafcb6da8 100755
--- a/contrib/splicex/configure
+++ b/contrib/splicex/configure
@@ -57,7 +57,15 @@ echo
 echo -e "	python version == $1"
 echo -e "	interpreter path == $PYPATH"
 if [ -z "$2" ]; then
- echo -e "	compiler flags == gcc -I/usr/include/$1"
+ if [ -e /usr/include/"$1"/Python.h ] && [ -e /usr/include/"$1"/structmember.h ]; then
+  PYHEADERS="/usr/include/$1"
+  echo -e "	compiler flags == gcc -I /usr/include/$1"
+ elif [ -e /usr/local/include/"$1"/Python.h ] && [ -e /usr/local/include/"$1"/structmember.h ]; then
+  PYHEADERS="/usr/local/include/$1"
+  echo -e "	compiler flags == gcc -I /usr/local/include/$1"
+ else
+  echo -e "	Python.h and structmember.h could not be found... FAILED"
+ fi
 fi
 echo
 if [ -z "$2" ]; then
@@ -69,6 +77,7 @@ sed -e s^PYTHON^"$PYPATH"^g src/deshadow.pyx >build/deshadow.pyx || exit 1
 echo -ne "	generating Makefile..."
 if [ -z "$2" ]; then
  sed -e s^PYTHON^"$1"^g src/make.in >Makefile || exit 1
+ sed -i s^HEADERS^"$PYHEADERS"^g Makefile || exit 1
  echo -ne ' DONE'
  echo
 else
diff --git a/contrib/splicex/src/make.in b/contrib/splicex/src/make.in
index 5393658e7b3ed1b4112589d3a9c0fd0c09f3d8f8..
index ..3ebd9a0ea8a687e66ba5eda7fc583ca812fa8c55 100644
--- a/contrib/splicex/src/make.in
+++ b/contrib/splicex/src/make.in
@@ -1,10 +1,10 @@
 compile:
 	cython build/deshadow.pyx -o build/deshadow.c
-	gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/PYTHON -c build/deshadow.c -o build/deshadow.o
+	gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I HEADERS -c build/deshadow.c -o build/deshadow.o
 	gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/deshadow.o -o build/deshadow.so

 	cython build/splicex.pyx -o build/splicex.c
-	gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/PYTHON -c build/splicex.c -o build/splicex.o
+	gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I HEADERS -c build/splicex.c -o build/splicex.o
 	gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/splicex.o -o build/splicex.so

 install-deb:

-----END OF PAGE-----