Mercurial > hg > anonet-resdb
comparison contrib/splicex/configure @ 705:dc8f88270f6a draft
SpliceX update: pyinstall added
author | d3v11 <d3v11@d3v11.ano> |
---|---|
date | Sat, 29 Oct 2011 10:17:30 -0400 |
parents | 2cbcd5edb31d |
children | de6fd9fc14e5 |
comparison
equal
deleted
inserted
replaced
703:db9ea3bb0e3a | 705:dc8f88270f6a |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 if [ -z "$1" ]; then | 2 if [ -z "$1" ]; then |
3 echo 'usage: ./configure <python[version]>' | 3 echo 'usage: ./configure <python[version]> {optional: <--no-compile>}' |
4 exit 1 | |
5 fi | |
6 | |
7 if [ -n "$2" ] && [[ "$2" != *--no-compile* ]]; then | |
8 echo 'usage: ./configure <python[version]> {optional: <--no-compile>}' | |
4 exit 1 | 9 exit 1 |
5 fi | 10 fi |
6 | 11 |
7 echo -e 'checking dependencies: ' | 12 echo -e 'checking dependencies: ' |
8 echo -ne " checking for python as <$1>..." | 13 echo -ne " checking for python as <$1>..." |
9 if which `which "$1"` >/dev/null; then | 14 if which `which "$1"` >/dev/null; then |
10 PYPATH=`which "$1"` | 15 PYPATH=`which "$1"` |
11 echo -ne ' OK' | 16 echo -ne ' OK' |
12 echo | 17 echo |
13 else | 18 else |
22 else | 27 else |
23 echo -ne ' FAILED' | 28 echo -ne ' FAILED' |
24 exit 1 | 29 exit 1 |
25 fi | 30 fi |
26 | 31 |
27 echo -ne ' checking for cython...' | 32 if [ -z "$2" ]; then |
28 if which cython >/dev/null; then | 33 echo -ne ' checking for cython...' |
29 echo -ne ' OK' | 34 if which cython >/dev/null; then |
30 echo | 35 echo -ne ' OK' |
31 else | 36 echo |
32 echo -ne ' FAILED' | 37 else |
33 exit 1 | 38 echo -ne ' FAILED' |
39 exit 1 | |
40 fi | |
34 fi | 41 fi |
35 | 42 |
36 echo -ne ' checking for gcc...' | 43 if [ -z "$2" ]; then |
37 if which gcc >/dev/null; then | 44 echo -ne ' checking for gcc...' |
38 echo -ne ' OK' | 45 if which gcc >/dev/null; then |
39 echo | 46 echo -ne ' OK' |
40 else | 47 echo |
41 echo -ne ' FAILED' | 48 else |
42 exit 1 | 49 echo -ne ' FAILED' |
50 exit 1 | |
51 fi | |
43 fi | 52 fi |
44 | 53 |
45 echo | 54 echo |
46 echo -ne "configuring splicex: " | 55 echo -ne "configuring splicex: " |
47 echo | 56 echo |
48 echo -e " python version == $1" | 57 echo -e " python version == $1" |
49 echo -e " interpreter path == $PYPATH" | 58 echo -e " interpreter path == $PYPATH" |
50 echo -e " compiler flags == gcc -I/usr/include/$1" | 59 if [ -z "$2" ]; then |
51 sed -e s^PYTHON^"$1"^g src/make.in >Makefile | 60 echo -e " compiler flags == gcc -I/usr/include/$1" |
52 sed -e s^PYTHON^"$PYPATH"^g src/splicex.py >build/splicex | 61 fi |
53 sed -e s^PYTHON^"$PYPATH"^g src/splicex-deshadow.py >build/splicex-deshadow | 62 echo |
63 if [ -z "$2" ]; then | |
64 sed -e s^PYTHON^"$PYPATH"^g src/splicex.py >build/splicex || exit 1 | |
65 sed -e s^PYTHON^"$PYPATH"^g src/splicex-deshadow.py >build/splicex-deshadow || exit 1 | |
66 fi | |
67 sed -e s^PYTHON^"$PYPATH"^g src/splicex.pyx >build/splicex.pyx || exit 1 | |
68 sed -e s^PYTHON^"$PYPATH"^g src/deshadow.pyx >build/deshadow.pyx || exit 1 | |
69 echo -ne " generating Makefile..." | |
70 if [ -z "$2" ]; then | |
71 sed -e s^PYTHON^"$1"^g src/make.in >Makefile || exit 1 | |
72 echo -ne ' DONE' | |
73 echo | |
74 else | |
75 sed -e s^PYTHON^"$1"^g src/pymake.in >Makefile || exit 1 | |
76 echo -ne ' DONE' | |
77 echo | |
78 fi | |
54 echo | 79 echo |
55 echo -e 'splicex configured' | 80 echo -e 'splicex configured' |