diff options
author | d3v11 <d3v11@d3v11.ano> | 2011-10-29 11:37:41 -0400 |
---|---|---|
committer | d3v11 <d3v11@d3v11.ano> | 2011-10-29 11:37:41 -0400 |
commit | 78e607b3e4c55b830193dee5711b220e6ca79720 (patch) | |
tree | 70d6fc4c63ed4cd46204350b11e96955e5138d73 /contrib | |
parent | 81aab712cfe805dc00010cb2ff5761787d0a4050 (diff) | |
download | resdb-78e607b3e4c55b830193dee5711b220e6ca79720.tar.gz resdb-78e607b3e4c55b830193dee5711b220e6ca79720.zip |
SpliceX patched compiler for /path/to/Python.h and /path/to/structmember.h
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/splicex/CHANGES | 20 | ||||
-rw-r--r-- | contrib/splicex/README | 14 | ||||
-rwxr-xr-x | contrib/splicex/configure | 11 | ||||
-rw-r--r-- | contrib/splicex/src/make.in | 4 |
4 files changed, 46 insertions, 3 deletions
diff --git a/contrib/splicex/CHANGES b/contrib/splicex/CHANGES index 3a0e43b..442a19e 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/<python version> + + -FROM- + + /usr/local/include/<python version> + + 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 2a44677..1a8bf8a 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 535520e..933b51d 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 5393658..3ebd9a0 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: |