Skip to content

Instantly share code, notes, and snippets.

@blturner
Forked from rmyers/mkappenginevenv.sh
Created November 15, 2011 20:16
Show Gist options
  • Select an option

  • Save blturner/1368191 to your computer and use it in GitHub Desktop.

Select an option

Save blturner/1368191 to your computer and use it in GitHub Desktop.

Revisions

  1. @rmyers rmyers revised this gist Nov 15, 2011. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -130,6 +130,10 @@ echo "$VIRTUAL_ENV/google_appengine" > $VIRTUAL_ENV/lib/python2.5/site-packages/
    cd $VIRTUAL_ENV/bin
    ln -s $VIRTUAL_ENV/google_appengine/*.py .


    # The Real python2.5 prefix
    REALPREFIX=`python2.5 -c "import sys;print sys.real_prefix"`

    # link os.pyc to make appengine happy
    # On lion pyc files are out of date :(
    if [[ $PLATFORM == "Darwin" && $VERSION == "11.2.0" ]]
    @@ -138,7 +142,6 @@ then
    sudo $REALPREFIX/bin/python2.5 -m compileall
    fi

    REALPREFIX=`python2.5 -c "import sys;print sys.real_prefix"`
    cd $VIRTUAL_ENV/lib/python2.5
    echo "Linking os.pyc to $REALPREFIX/lib/python2.5/os.pyc"
    rm -rf os.pyc
  2. @rmyers rmyers revised this gist Nov 1, 2011. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -24,6 +24,11 @@
    # 2) sudo add-apt-repository ppa:fkrull/deadsnakes
    # 3) sudo apt-get update
    # 4) sudo apt-get install curl python-setuptools python2.5
    #
    # CHANGELOG
    # 11-01-11 - Adding support for Macosx Lion.
    # 11-01-11 - Fixing bug in platform check which was always true.
    # 10-03-11 - Adding support for Ubunutu.

    PLATFORM=`uname -s`
    VERSION=`uname -r`
  3. @rmyers rmyers revised this gist Nov 1, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -130,7 +130,7 @@ ln -s $VIRTUAL_ENV/google_appengine/*.py .
    if [[ $PLATFORM == "Darwin" && $VERSION == "11.2.0" ]]
    then
    echo "Fixing pyc files in $REALPREFIX/lib/python2.5/"
    sudo python2.5 -m compileall
    sudo $REALPREFIX/bin/python2.5 -m compileall
    fi

    REALPREFIX=`python2.5 -c "import sys;print sys.real_prefix"`
  4. @rmyers rmyers revised this gist Nov 1, 2011. 1 changed file with 18 additions and 8 deletions.
    26 changes: 18 additions & 8 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -1,29 +1,32 @@
    #!/bin/bash
    #
    # Build a virtual environment suitable for running appengine.
    # This uses virtualenvwrapper to make the virtual environment
    # and modifies the postactivate/postdeactivate scripts to make
    # the appengine code happy.
    # This uses virtualenvwrapper to make the virtual environment.
    # Which you can activate with 'workon appengine'
    #
    # Usage:
    # Everyone loves one-liners!
    # Mac one-liner:
    # $ curl -s https://raw.github.com/gist/1012769 | bash
    #
    # Ubuntu one-liner:
    # $ sudo apt-get install curl && curl -s https://raw.github.com/gist/1012769 | bash
    #
    #
    # Install steps:
    # 1) Checks for virtualenvwrapper and install if needed.
    # 2) Activates virtualenvwrapper and creates $WORKON_HOME
    # 3) Makes 'appengine' virtual environment
    # 4) Modifies postactivate scripts
    # 5) Downloads and extracts google appengine source
    # 6) pip installs a few extra packages
    # 4) Downloads and extracts google appengine source
    # 5) pip installs a few extra packages
    #
    # Ubuntu Install Help
    # 1) First Install python2.5, python-setuptools and curl
    # 1) First Install python2.5, python-setuptools
    # 2) sudo add-apt-repository ppa:fkrull/deadsnakes
    # 3) sudo apt-get update
    # 4) sudo apt-get install curl python-setuptools python2.5

    PLATFORM=`uname -s`
    VERSION=`uname -r`

    if [[ $PLATFORM == "Linux" ]]
    then
    @@ -123,6 +126,13 @@ cd $VIRTUAL_ENV/bin
    ln -s $VIRTUAL_ENV/google_appengine/*.py .

    # link os.pyc to make appengine happy
    # On lion pyc files are out of date :(
    if [[ $PLATFORM == "Darwin" && $VERSION == "11.2.0" ]]
    then
    echo "Fixing pyc files in $REALPREFIX/lib/python2.5/"
    sudo python2.5 -m compileall
    fi

    REALPREFIX=`python2.5 -c "import sys;print sys.real_prefix"`
    cd $VIRTUAL_ENV/lib/python2.5
    echo "Linking os.pyc to $REALPREFIX/lib/python2.5/os.pyc"
  5. @rmyers rmyers revised this gist Nov 1, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@

    PLATFORM=`uname -s`

    if [[ $PLATFORM -eq "Linux" ]]
    if [[ $PLATFORM == "Linux" ]]
    then
    # Check if python2.5 installed and install other prereqs
    # Ubuntu no longer has python2.5 in a main repository.
    @@ -130,7 +130,7 @@ rm -rf os.pyc
    ln -s $REALPREFIX/lib/python2.5/os.pyc

    # On mac's add some compiler flags.
    if [[ $PLATFORM -eq "Darwin" ]]
    if [[ $PLATFORM == "Darwin" ]]
    then
    ARCHFLAGS="-arch i386 -arch x86_64"
    fi
  6. @rmyers rmyers revised this gist Oct 3, 2011. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -34,8 +34,10 @@ then
    then
    sudo add-apt-repository ppa:fkrull/deadsnakes
    sudo apt-get update
    sudo apt-get install curl python-setuptools python2.5-dev
    sudo apt-get install curl python-setuptools python2.5-dev libssl-dev libbluetooth-dev
    fi
    # check for individual packages in case they already had python2.5
    # just in case
    if [ ! -e /usr/bin/curl ]
    then
    sudo apt-get install curl
  7. @rmyers rmyers revised this gist Oct 3, 2011. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -49,6 +49,11 @@ then
    then
    sudo apt-get install libssl-dev
    fi
    # check for libbluetooth-dev
    if [ ! -e /usr/include/bluetooth/bluetooth.h ]
    then
    sudo apt-get install libbluetooth-dev
    fi
    fi

    LATEST_VERSION=`curl -s http://appengine.google.com/api/updatecheck | awk '$1 ~/release/ {print $2};' | sed s/\"//g`
  8. @rmyers rmyers revised this gist Oct 3, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -128,7 +128,7 @@ then
    ARCHFLAGS="-arch i386 -arch x86_64"
    fi

    for package in webtest PIL fabric coverage ipython django==1.1
    for package in webtest PIL fabric coverage ipython==0.10.2 django==1.1
    do
    echo "Installing $package ..."
    pip install -q $package
  9. @rmyers rmyers revised this gist Oct 3, 2011. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -49,8 +49,6 @@ then
    then
    sudo apt-get install libssl-dev
    fi
    if [ ! -e /

    fi

    LATEST_VERSION=`curl -s http://appengine.google.com/api/updatecheck | awk '$1 ~/release/ {print $2};' | sed s/\"//g`
  10. @rmyers rmyers revised this gist Oct 3, 2011. 1 changed file with 10 additions and 5 deletions.
    15 changes: 10 additions & 5 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -34,18 +34,23 @@ then
    then
    sudo add-apt-repository ppa:fkrull/deadsnakes
    sudo apt-get update
    sudo apt-get install curl python-setuptools python2.5
    sudo apt-get install curl python-setuptools python2.5-dev
    fi
    which curl
    if [ ! $? == 0 ]
    if [ ! -e /usr/bin/curl ]
    then
    sudo apt-get install curl
    fi
    which easy_install
    if [ ! $? == 0 ]
    if [ ! -e /usr/bin/easy_install ]
    then
    sudo apt-get install python-setuptools
    fi
    # check for ssl
    if [ ! -e /usr/include/openssl/ssl.h ]
    then
    sudo apt-get install libssl-dev
    fi
    if [ ! -e /

    fi

    LATEST_VERSION=`curl -s http://appengine.google.com/api/updatecheck | awk '$1 ~/release/ {print $2};' | sed s/\"//g`
  11. @rmyers rmyers revised this gist Oct 3, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -133,7 +133,7 @@ done

    # SSL needs to be installed with sudo!! lame!
    echo "Installing ssl with sudo:"
    sudo pip install -q ssl
    sudo $VIRTUAL_ENV/bin/pip install -q ssl
    echo "Fixing perms"
    sudo chown -R `whoami` $VIRTUAL_ENV

  12. @rmyers rmyers revised this gist Oct 3, 2011. 1 changed file with 25 additions and 1 deletion.
    26 changes: 25 additions & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -23,12 +23,36 @@
    # 3) sudo apt-get update
    # 4) sudo apt-get install curl python-setuptools python2.5

    PLATFORM=`uname -s`

    if [[ $PLATFORM -eq "Linux" ]]
    then
    # Check if python2.5 installed and install other prereqs
    # Ubuntu no longer has python2.5 in a main repository.
    which python2.5
    if [ ! $? == 0 ]
    then
    sudo add-apt-repository ppa:fkrull/deadsnakes
    sudo apt-get update
    sudo apt-get install curl python-setuptools python2.5
    fi
    which curl
    if [ ! $? == 0 ]
    then
    sudo apt-get install curl
    fi
    which easy_install
    if [ ! $? == 0 ]
    then
    sudo apt-get install python-setuptools
    fi
    fi

    LATEST_VERSION=`curl -s http://appengine.google.com/api/updatecheck | awk '$1 ~/release/ {print $2};' | sed s/\"//g`

    # Modify me as new versions are released.
    APPENGINE_VERSION=google_appengine_$LATEST_VERSION.zip

    PLATFORM=`uname -s`

    which virtualenvwrapper.sh
    VWNOTFOUND=$?
  13. @rmyers rmyers revised this gist Oct 3, 2011. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,11 @@
    # 5) Downloads and extracts google appengine source
    # 6) pip installs a few extra packages
    #
    #
    # Ubuntu Install Help
    # 1) First Install python2.5, python-setuptools and curl
    # 2) sudo add-apt-repository ppa:fkrull/deadsnakes
    # 3) sudo apt-get update
    # 4) sudo apt-get install curl python-setuptools python2.5

    LATEST_VERSION=`curl -s http://appengine.google.com/api/updatecheck | awk '$1 ~/release/ {print $2};' | sed s/\"//g`

  14. @rmyers rmyers revised this gist Sep 20, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@
    #
    #

    LATEST_VERSION=curl -s http://appengine.google.com/api/updatecheck | awk '$1 ~/release/ {print $2};' | sed s/\"//g
    LATEST_VERSION=`curl -s http://appengine.google.com/api/updatecheck | awk '$1 ~/release/ {print $2};' | sed s/\"//g`

    # Modify me as new versions are released.
    APPENGINE_VERSION=google_appengine_$LATEST_VERSION.zip
  15. @rmyers rmyers revised this gist Sep 20, 2011. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -19,8 +19,10 @@
    #
    #

    LATEST_VERSION=curl -s http://appengine.google.com/api/updatecheck | awk '$1 ~/release/ {print $2};' | sed s/\"//g

    # Modify me as new versions are released.
    APPENGINE_VERSION=google_appengine_1.5.2.zip
    APPENGINE_VERSION=google_appengine_$LATEST_VERSION.zip

    PLATFORM=`uname -s`

  16. @rmyers rmyers revised this gist Jul 27, 2011. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -69,6 +69,12 @@ fi
    echo "Extracting Google App Engine source..."
    unzip -q $APPENGINE_VERSION -d $VIRTUAL_ENV

    if [ ! $? == 0 ]
    then
    echo "Problem unzipping file $APPENGINE_VERISON"
    echo "Please delete it and try again!"
    exit $?
    fi
    # Create a pth file for App Engine source
    echo "$VIRTUAL_ENV/google_appengine" > $VIRTUAL_ENV/lib/python2.5/site-packages/gae.pth

  17. @rmyers rmyers revised this gist Jul 27, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@
    #

    # Modify me as new versions are released.
    APPENGINE_VERSION=google_appengine_1.5.1.zip
    APPENGINE_VERSION=google_appengine_1.5.2.zip

    PLATFORM=`uname -s`

  18. @rmyers rmyers revised this gist Jul 6, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@
    #

    # Modify me as new versions are released.
    APPENGINE_VERSION=google_appengine_1.5.0.zip
    APPENGINE_VERSION=google_appengine_1.5.1.zip

    PLATFORM=`uname -s`

    @@ -89,7 +89,7 @@ then
    ARCHFLAGS="-arch i386 -arch x86_64"
    fi

    for package in webtest PIL fabric coverage django==1.1
    for package in webtest PIL fabric coverage ipython django==1.1
    do
    echo "Installing $package ..."
    pip install -q $package
  19. @rmyers rmyers revised this gist Jun 20, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@
    #

    # Modify me as new versions are released.
    APPENGINE_VERSION=google_appengine_1.5.1.zip
    APPENGINE_VERSION=google_appengine_1.5.0.zip

    PLATFORM=`uname -s`

  20. @rmyers rmyers revised this gist Jun 20, 2011. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -46,6 +46,12 @@ source `which virtualenvwrapper.sh`

    cd $WORKON_HOME

    if [[ -e appengine ]]
    then
    echo "Deleting existing appengine ENV"
    rm -rf appengine
    fi

    mkvirtualenv --no-site-packages --distribute --python=python2.5 appengine

    if [[ ! $VIRTUAL_ENV ]]
  21. @rmyers rmyers revised this gist Jun 20, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@
    #

    # Modify me as new versions are released.
    APPENGINE_VERSION=google_appengine_1.5.0.zip
    APPENGINE_VERSION=google_appengine_1.5.1.zip

    PLATFORM=`uname -s`

  22. @rmyers rmyers revised this gist Jun 10, 2011. 1 changed file with 7 additions and 17 deletions.
    24 changes: 7 additions & 17 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -54,37 +54,26 @@ then
    exit 1
    fi

    POSTACTIVATE=$VIRTUAL_ENV/bin/postactivate
    POSTDEACTIVATE=$VIRTUAL_ENV/bin/postdeactivate
    PREDEACTIVATE=$VIRTUAL_ENV/bin/predeactivate

    # EDIT postactivate script
    #echo 'export REALPREFIX=`python2.5 -c "import sys;print sys.real_prefix"`' >> $POSTACTIVATE
    #echo 'export PREPATH=$PATH' >> $POSTACTIVATE
    #echo 'export PATH=$PATH:$VIRTUAL_ENV/bin/google_appengine' >> $POSTACTIVATE
    #echo 'export PYTHONPATH=$VIRTUAL_ENV/bin/google_appengine:$REALPREFIX/lib/python2.5' >> $POSTACTIVATE

    # EDIT postdeactivate script
    #echo 'unset PYTHONPATH' >> $PREDEACTIVATE
    #echo 'export PATH=$PREPATH' >> $POSTDEACTIVATE
    #echo 'unset REALPREFIX' >> $POSTDEACTIVATE
    #echo 'unset PREPATH' >> $POSTDEACTIVATE

    # Don't download the file over again.
    if [ ! -e $APPENGINE_VERSION ]
    then
    curl -O http://googleappengine.googlecode.com/files/$APPENGINE_VERSION
    fi

    unzip $APPENGINE_VERSION -d $VIRTUAL_ENV
    echo "Extracting Google App Engine source..."
    unzip -q $APPENGINE_VERSION -d $VIRTUAL_ENV

    # Create a pth file for App Engine source
    echo "$VIRTUAL_ENV/google_appengine" > $VIRTUAL_ENV/lib/python2.5/site-packages/gae.pth

    # Link scripts
    cd $VIRTUAL_ENV/bin
    ln -s $VIRTUAL_ENV/google_appengine/*.py .

    # link os.pyc to make appengine happy
    REALPREFIX=`python2.5 -c "import sys;print sys.real_prefix"`
    cd $VIRTUAL_ENV/lib/python2.5
    echo "Linking os.pyc to $REALPREFIX/lib/python2.5/os.pyc"
    rm -rf os.pyc
    ln -s $REALPREFIX/lib/python2.5/os.pyc

    @@ -107,6 +96,7 @@ echo "Fixing perms"
    sudo chown -R `whoami` $VIRTUAL_ENV

    # uninstall webob as it conflicts with the bundled one in app engine.
    echo "Uninstalling webob ..."
    pip uninstall -q -y webob

    echo "You are ready to roll. Edit .bashrc as needed and run 'workon appengine'"
  23. @rmyers rmyers revised this gist Jun 10, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -86,7 +86,7 @@ ln -s $VIRTUAL_ENV/google_appengine/*.py .
    REALPREFIX=`python2.5 -c "import sys;print sys.real_prefix"`
    cd $VIRTUAL_ENV/lib/python2.5
    rm -rf os.pyc
    ln -s $REALPREFIX/os.pyc
    ln -s $REALPREFIX/lib/python2.5/os.pyc

    # On mac's add some compiler flags.
    if [[ $PLATFORM -eq "Darwin" ]]
  24. @rmyers rmyers revised this gist Jun 10, 2011. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -77,11 +77,16 @@ fi

    unzip $APPENGINE_VERSION -d $VIRTUAL_ENV

    echo "$VIRTUAL_ENV/google_appengine" > $VIRTUAL_ENV/lib/python2.5/gae.pth
    echo "$VIRTUAL_ENV/google_appengine" > $VIRTUAL_ENV/lib/python2.5/site-packages/gae.pth

    cd $VIRTUAL_ENV/bin
    ln -s $VIRTUAL_ENV/google_appengine/*.py .
    cd $VIRTUAL_ENV

    # link os.pyc to make appengine happy
    REALPREFIX=`python2.5 -c "import sys;print sys.real_prefix"`
    cd $VIRTUAL_ENV/lib/python2.5
    rm -rf os.pyc
    ln -s $REALPREFIX/os.pyc

    # On mac's add some compiler flags.
    if [[ $PLATFORM -eq "Darwin" ]]
  25. @rmyers rmyers revised this gist Jun 10, 2011. 1 changed file with 15 additions and 9 deletions.
    24 changes: 15 additions & 9 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -59,23 +59,29 @@ POSTDEACTIVATE=$VIRTUAL_ENV/bin/postdeactivate
    PREDEACTIVATE=$VIRTUAL_ENV/bin/predeactivate

    # EDIT postactivate script
    echo 'export REALPREFIX=`python2.5 -c "import sys;print sys.real_prefix"`' >> $POSTACTIVATE
    echo 'export PREPATH=$PATH' >> $POSTACTIVATE
    echo 'export PATH=$PATH:$VIRTUAL_ENV/bin/google_appengine' >> $POSTACTIVATE
    echo 'export PYTHONPATH=$VIRTUAL_ENV/bin/google_appengine:$REALPREFIX/lib/python2.5' >> $POSTACTIVATE
    #echo 'export REALPREFIX=`python2.5 -c "import sys;print sys.real_prefix"`' >> $POSTACTIVATE
    #echo 'export PREPATH=$PATH' >> $POSTACTIVATE
    #echo 'export PATH=$PATH:$VIRTUAL_ENV/bin/google_appengine' >> $POSTACTIVATE
    #echo 'export PYTHONPATH=$VIRTUAL_ENV/bin/google_appengine:$REALPREFIX/lib/python2.5' >> $POSTACTIVATE

    # EDIT postdeactivate script
    echo 'unset PYTHONPATH' >> $PREDEACTIVATE
    echo 'export PATH=$PREPATH' >> $POSTDEACTIVATE
    echo 'unset REALPREFIX' >> $POSTDEACTIVATE
    echo 'unset PREPATH' >> $POSTDEACTIVATE
    #echo 'unset PYTHONPATH' >> $PREDEACTIVATE
    #echo 'export PATH=$PREPATH' >> $POSTDEACTIVATE
    #echo 'unset REALPREFIX' >> $POSTDEACTIVATE
    #echo 'unset PREPATH' >> $POSTDEACTIVATE

    if [ ! -e $APPENGINE_VERSION ]
    then
    curl -O http://googleappengine.googlecode.com/files/$APPENGINE_VERSION
    fi

    unzip $APPENGINE_VERSION -d $VIRTUAL_ENV/bin/
    unzip $APPENGINE_VERSION -d $VIRTUAL_ENV

    echo "$VIRTUAL_ENV/google_appengine" > $VIRTUAL_ENV/lib/python2.5/gae.pth

    cd $VIRTUAL_ENV/bin
    ln -s $VIRTUAL_ENV/google_appengine/*.py .
    cd $VIRTUAL_ENV

    # On mac's add some compiler flags.
    if [[ $PLATFORM -eq "Darwin" ]]
  26. @rmyers rmyers revised this gist Jun 10, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -62,7 +62,7 @@ PREDEACTIVATE=$VIRTUAL_ENV/bin/predeactivate
    echo 'export REALPREFIX=`python2.5 -c "import sys;print sys.real_prefix"`' >> $POSTACTIVATE
    echo 'export PREPATH=$PATH' >> $POSTACTIVATE
    echo 'export PATH=$PATH:$VIRTUAL_ENV/bin/google_appengine' >> $POSTACTIVATE
    echo 'export PYTHONPATH=$VIRTUAL_ENV/lib/python2.5:$VIRTUAL_ENV/bin/google_appengine:$REALPREFIX/lib/python2.5' >> $POSTACTIVATE
    echo 'export PYTHONPATH=$VIRTUAL_ENV/bin/google_appengine:$REALPREFIX/lib/python2.5' >> $POSTACTIVATE

    # EDIT postdeactivate script
    echo 'unset PYTHONPATH' >> $PREDEACTIVATE
  27. @rmyers rmyers revised this gist Jun 10, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -75,7 +75,7 @@ then
    curl -O http://googleappengine.googlecode.com/files/$APPENGINE_VERSION
    fi

    unzip -f $APPENGINE_VERSION -d $VIRTUAL_ENV/bin/
    unzip $APPENGINE_VERSION -d $VIRTUAL_ENV/bin/

    # On mac's add some compiler flags.
    if [[ $PLATFORM -eq "Darwin" ]]
  28. @rmyers rmyers revised this gist Jun 10, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -75,7 +75,7 @@ then
    curl -O http://googleappengine.googlecode.com/files/$APPENGINE_VERSION
    fi

    unzip $APPENGINE_VERSION -f -d $VIRTUAL_ENV/bin/
    unzip -f $APPENGINE_VERSION -d $VIRTUAL_ENV/bin/

    # On mac's add some compiler flags.
    if [[ $PLATFORM -eq "Darwin" ]]
  29. @rmyers rmyers revised this gist Jun 10, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -75,7 +75,7 @@ then
    curl -O http://googleappengine.googlecode.com/files/$APPENGINE_VERSION
    fi

    unzip $APPENGINE_VERSION -fd $VIRTUAL_ENV/bin/
    unzip $APPENGINE_VERSION -f -d $VIRTUAL_ENV/bin/

    # On mac's add some compiler flags.
    if [[ $PLATFORM -eq "Darwin" ]]
  30. @rmyers rmyers revised this gist Jun 10, 2011. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions mkappenginevenv.sh
    Original file line number Diff line number Diff line change
    @@ -92,6 +92,8 @@ done
    # SSL needs to be installed with sudo!! lame!
    echo "Installing ssl with sudo:"
    sudo pip install -q ssl
    echo "Fixing perms"
    sudo chown -R `whoami` $VIRTUAL_ENV

    # uninstall webob as it conflicts with the bundled one in app engine.
    pip uninstall -q -y webob