Changeset 12735


Ignore:
Timestamp:
07/25/12 11:48:26 (13 years ago)
Author:
Mathieu Morlighem
Message:

Make separate installation scripts for different versions (same as other packages like petsc, mpich2, etc)

Location:
issm/trunk-jpl/externalpackages/python
Files:
3 added
3 moved

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/externalpackages/python/install-2.7.2-linux64.sh

    r12734 r12735  
    11#!/bin/bash
    2 #wget http://python.org/ftp/python/version/Python-version.tgz
    3 
    4 #version=3.2.2
    5 version=2.7.2
    62
    73#Some cleanup
    84rm -rf install src
    9 rm -rf Python-$version
     5rm -rf Python-2.7.2
    106mkdir install src
    117
    128#Download from ISSM server
    13 $ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
     9$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-2.7.2.tgz Python-2.7.2.tgz
    1410
    1511#exports
     
    1713
    1814#Untar and move python into install directory
    19 tar -zxvf  Python-$version.tgz
    20 mv Python-$version/* src
    21 rm -rf Python-$version
     15tar -zxvf  Python-2.7.2.tgz
     16mv Python-2.7.2/* src
     17rm -rf Python-2.7.2
    2218
    2319#Configure python
    2420cd src
    25 ./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-shared
     21./configure \
     22 --prefix="$ISSM_DIR/externalpackages/python/install" \
     23 --enable-shared
    2624
    2725if [ -z $1 ]; then
     
    3230make install
    3331
    34 #Some modifications to be done in case version is 3.2:
    35 if [[ $version == "3.2.2" ]]; then
    36         cd ../install/bin
    37         ln -s python3.2 python
    38         cd ../
    39         ln -s Python.framework/Versions/3.2/include/python3.2m include
    40         ln -s Python.framework/Versions/3.2/lib/ lib
    41 fi
    42 if [[ $version == "2.7.2" ]]; then
    43         cd ../install/include
    44         cp python2.7/* ./
    45         cd ../lib
    46         ln -s  libpython2.7.so.1.0 libpython.so
    47        
    48 fi
     32cd ../install/include
     33cp python2.7/* ./
     34cd ../lib
     35ln -s  libpython2.7.so.1.0 libpython.so
  • issm/trunk-jpl/externalpackages/python/install-2.7.2-macosx-lion.sh

    r12734 r12735  
    11#!/bin/bash
    2 #wget http://python.org/ftp/python/version/Python-version.tgz
    3 #version=3.2.2
    4 version=2.7.2
    52
    63#Some cleanup
    74rm -rf install src
    8 rm -rf Python-$version
     5rm -rf Python-2.7.2
    96mkdir install src
    107
    118#Download from ISSM server
    12 $ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
     9$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-2.7.2.tgz Python-2.7.2.tgz
    1310
    1411#exports
     
    1613
    1714#Untar and move python into install directory
    18 tar -zxvf  Python-$version.tgz
    19 mv Python-$version/* src
    20 rm -rf Python-$version
     15tar -zxvf  Python-2.7.2.tgz
     16mv Python-2.7.2/* src
     17rm -rf Python-2.7.2
    2118
    2219#Configure doxygen
    2320cd src
    24 ./configure --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks"
     21./configure \
     22 --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks"
     23
    2524#obsolete?
    2625#./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install"
     
    3433make install
    3534
    36 #Some modifications to be done in case version is 3.2:
    37 if [[ $version == "3.2.2" ]]; then
    38         cd install/bin
    39         ln -s python3.2 python
    40         cd ../
    41         ln -s Python.framework/Versions/3.2/include/python3.2m include
    42         ln -s Python.framework/Versions/3.2/lib/ lib
    43 fi
     35cd ../install
     36ln -s Library/Frameworks/Python.framework/Headers include
     37ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
    4438
    45 #Some modifications to be done in case version is 2.7
    46 if [[ $version == "2.7.2" ]]; then
    47         cd ../install
    48         ln -s Library/Frameworks/Python.framework/Headers include
    49         ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
    50 
    51         #Patch pyport.h:
    52         cd include
    53         patch pyport.h ../patch/pyport.h.patch
    54 fi
     39#Patch pyport.h:
     40cd include
     41patch pyport.h ../patch/pyport.h.patch
  • issm/trunk-jpl/externalpackages/python/install-2.7.2-macosx-snowleopard.sh

    r12734 r12735  
    11#!/bin/bash
    2 #wget http://python.org/ftp/python/version/Python-version.tgz
    3 
    4 #version=3.2.2
    5 version=2.7.2
    62
    73#Some cleanup
    84rm -rf install src
    9 rm -rf Python-$version
     5rm -rf Python-2.7.2
    106mkdir install src
    117
    128#Download from ISSM server
    13 $ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
     9$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-2.7.2.tgz Python-2.7.2.tgz
    1410
    1511#exports
     
    1814
    1915#Untar and move python into install directory
    20 tar -zxvf  Python-$version.tgz
    21 mv Python-$version/* src
    22 rm -rf Python-$version
     16tar -zxvf  Python-2.7.2.tgz
     17mv Python-2.7.2/* src
     18rm -rf Python-2.7.2
    2319
    2420#Configure doxygen
     
    3632make install
    3733
    38 #Some modifications to be done in case version is 3.2:
    39 if [[ $version == "3.2.2" ]]; then
    40         cd install/bin
    41         ln -s python3.2 python
    42         cd ../
    43         ln -s Python.framework/Versions/3.2/include/python3.2m include
    44         ln -s Python.framework/Versions/3.2/lib/ lib
    45 fi
     34cd ../install
     35ln -s Library/Frameworks/Python.framework/Headers include
     36ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
    4637
    47 #Some modifications to be done in case version is 2.7
    48 if [[ $version == "2.7.2" ]]; then
    49         cd ../install
    50         ln -s Library/Frameworks/Python.framework/Headers include
    51         ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
    52        
    53         #Patch pyport.h:
    54         cd include
    55         patch pyport.h ../patch/pyport.h.patch
    56 fi
     38#Patch pyport.h:
     39cd include
     40patch pyport.h ../patch/pyport.h.patch
Note: See TracChangeset for help on using the changeset viewer.