Last change
on this file since 13370 was 13370, checked in by Mathieu Morlighem, 13 years ago |
NEW: changed default python version to 2.7.3
|
-
Property svn:executable
set to
*
|
File size:
1012 bytes
|
Rev | Line | |
---|
[12233] | 1 | #!/bin/bash
|
---|
[13246] | 2 | set -eu
|
---|
[12233] | 3 |
|
---|
| 4 | #Some cleanup
|
---|
| 5 | rm -rf install src
|
---|
[13370] | 6 | rm -rf Python-2.7.3
|
---|
[12233] | 7 | mkdir install src
|
---|
| 8 |
|
---|
| 9 | #Download from ISSM server
|
---|
[13370] | 10 | $ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-2.7.3.tgz Python-2.7.3.tgz
|
---|
[12233] | 11 |
|
---|
| 12 | #Untar and move python into install directory
|
---|
[13370] | 13 | tar -zxvf Python-2.7.3.tgz
|
---|
| 14 | mv Python-2.7.3/* src
|
---|
| 15 | rm -rf Python-2.7.3
|
---|
[12233] | 16 |
|
---|
[12833] | 17 | #Configure and compile
|
---|
[12233] | 18 | cd src
|
---|
[12735] | 19 | ./configure \
|
---|
| 20 | --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks"
|
---|
[13249] | 21 | if [ $# -eq 0 ]; then
|
---|
[12233] | 22 | make
|
---|
| 23 | else
|
---|
| 24 | make -j $1
|
---|
| 25 | fi
|
---|
| 26 | make install
|
---|
| 27 |
|
---|
[12735] | 28 | cd ../install
|
---|
[12833] | 29 |
|
---|
| 30 | #get rid of bin, because it's just a copy of
|
---|
| 31 | #Library/Frameworks/Python.framework/Versions/2.7/bin, and will not reflect
|
---|
| 32 | #new changes being made
|
---|
| 33 | rm -rf bin
|
---|
[12735] | 34 | ln -s Library/Frameworks/Python.framework/Headers include
|
---|
| 35 | ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
|
---|
[12833] | 36 | ln -s Library/Frameworks/Python.framework/Versions/2.7/bin bin
|
---|
[12233] | 37 |
|
---|
[12833] | 38 | #Patch pyport.h:
|
---|
| 39 | cd include
|
---|
| 40 | patch pyport.h $ISSM_DIR/externalpackages/python/patches/pyport.h.patch
|
---|
Note:
See
TracBrowser
for help on using the repository browser.