| 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
|
|---|
| [13540] | 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
|
|---|
| [13540] | 19 | ./configure --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks"
|
|---|
| [13249] | 20 | if [ $# -eq 0 ]; then
|
|---|
| [12233] | 21 | make
|
|---|
| 22 | else
|
|---|
| 23 | make -j $1
|
|---|
| 24 | fi
|
|---|
| 25 | make install
|
|---|
| 26 |
|
|---|
| [12735] | 27 | cd ../install
|
|---|
| [12833] | 28 |
|
|---|
| 29 | #get rid of bin, because it's just a copy of
|
|---|
| 30 | #Library/Frameworks/Python.framework/Versions/2.7/bin, and will not reflect
|
|---|
| 31 | #new changes being made
|
|---|
| 32 | rm -rf bin
|
|---|
| [12735] | 33 | ln -s Library/Frameworks/Python.framework/Headers include
|
|---|
| 34 | ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
|
|---|
| [12833] | 35 | ln -s Library/Frameworks/Python.framework/Versions/2.7/bin bin
|
|---|
| [12233] | 36 |
|
|---|
| [12833] | 37 | #Patch pyport.h:
|
|---|
| 38 | cd include
|
|---|
| 39 | patch pyport.h $ISSM_DIR/externalpackages/python/patches/pyport.h.patch
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.