-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Python + Mac _ GAE set up
Make sure you've got Xcode Make sure you open up the AppEngine GUI And make all the symlinks it wants you to (into /usr/local)
'sudo easy_install pip' 'sudo pip install virtualenv' 'sudo pip install virtualenvwrapper' 'mkdir ~/.virtualenvs' 'cd ~/.virtualenvs'
Figure out which version of python is 2.5 - type 'which python'. for each of those, run the full path python i.e. /usr/bin/python and append -v to it. i.e. '/usr/bin/python -v'. you should get the version when it starts. Ctrl-D to exit python
'virtualenv --no-site-packages -p <2.5 python version: mine is /usr/local/bin/python> gae25' edit ~/.bashrc to include: WORKON_HOME=$HOME/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh export PIP_VIRTUALENV_BASE=$WORKON_HOME export PIP_RESPECT_VIRTUALENV=true
'pip install yolk' 'pip install simplejson' 'pip install mox'
Create a new file at ~/.virtualenvs/gae25/lib/python2.5/site-packages/gae.pth, and add: /usr/local/google_appengine /usr/local/google_appengine/lib/antlr3 /usr/local/google_appengine/lib/cacerts /usr/local/google_appengine/lib/django /usr/local/google_appengine/lib/fancy_urllib /usr/local/google_appengine/lib/ipaddr /usr/local/google_appengine/lib/webob /usr/local/google_appengine/lib/yaml/lib
At this point, you should be able to get started:
- 'cd ~/Projects'
- If you haven't already, 'git clone [email protected]:mattrjacobs/Prdict.git'
- 'cd Prdict'
- 'git pull' (updates in case I've checked something in)
- 'rake test' - runs all unit tests
One more bit of Google weirdness to work around to actually run the damn thing: You need to edit the dev-appserver.py that comes in the SDK. Wherever you downloaded it you need to open that file. Mine is at: /Users/matthewjacobs/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py. So '/Users/matthewjacobs/Desktop' is the only thing that should be different for your installation.
Open that file and make the edits suggested here : http://code.google.com/p/googleappengine/issues/attachmentText?id=4339&aid=1868397035160173198&name=fixup-gae-in-venv.patch&token=d7dea7af85ac73986f54ca3b0b65ea5d
Now you should be able to do 'rake run' and get the webapp showing up at http://localhost:8080. Go to http://localhost:8080/dev/populate to fill up sports/teams/leagues/users