category_name=hidden

MacBook Pro Development Environment

October 1, 2010 | 6 Comments

This article covers the steps I went through to setup my MacBook Pro for Google App Engine (GAE) development. I am using the Python runtime in GAE so the focus here is on a Python development environment.

Python

Setting Python 2.5 as Default

My MacBook Pro is running Snow Leopard. I am planning to host my projects on Google App Engine and it requires Python 2.5. Snow Leopard ships with Python 2.6 as the default. You can switch to Python 2.5 using a few simple commands, as follows:

$ defaults write com.apple.versioner.python Version 2.5
$ sudo defaults write /Library/Preferences/com.apple.versioner.python Version 2.5

After issuing these commands you should logout and login, launch a Terminal window and issue the command

$ python --version

It should report Python 2.5.4 as the result. If it still says Python 2.6.1 then your change did not take effect. To troubleshoot the problem start with man python. It includes information on how to switch the default version of Python on your system.

Additional Python Modules

Google App Engine expects that the ssl module is installed. This is so it can verify the identity of the GAE servers when trying to deploy your projects. Install it like this:

$ curl http://pypi.python.org/packages/source/s/ssl/ssl-1.15.tar.gz --output ssl-1.15.tar.gz
$ tar xvf ssl-1.15.tar.gz
$ cd ssl-1.15
$ sudo python setup.py install

If you want to use the GAE image manipulation classes while running on the local development server you will need to install PIL using the following command.

$ sudo easy_install pil

The following will be necessary for building some other python libraries later in the process.

$ sudo easy_install docutils

The following modules are necessary if you choose to install IPython (see next section). If you are planning on skipping the IPython installation these can be skipped as well.

$ sudo easy_install readline
$ sudo easy_install nose
$ sudo easy_install pexpect

IPython

The IPython interactive interpreter is a good addition to your Python development environment. It does not come pre-installed on Snow Leopard. You can download the latest stable version using this command:

$ curl http://ipython.scipy.org/dist/0.10/ipython-0.10.tar.gz --output ipython-0.10.tar.gz
$ tar -xzf ipython-0.10.tar.gz
$ cd ipython
$ sudo python setup.py install

Google App Engine SDK

The Google App Engine SDK for Python is available at http://code.google.com/appengine/downloads.html. As of this writing you can use the following command to grab the latest version:

$ curl http://googleappengine.googlecode.com/files/GoogleAppEngineLauncher-1.3.7.dmg --output GoogleAppEngineLauncher-1.3.7.dmg

Once you download the dmg file open it in Finder and run the installer. It will place all of the necessary files on your machine. Once complete locate the GoogleAppEngineLauncher.app icon in Finder and double-click on it. This application provides a nice UI for managing your GAE projects.

Source Code Management Tools

Git

I am planning on managing the source code for my projects with git and will store my master repositories on http://github.com. Apple does not include a copy of git on the machine by default. An installer is available at http://help.github.com/mac-git-installation/. While you are at it also create an account on github if you don’t already have one. It is useful for social coding in the wider open-source community.

Mercurial

Some of the Django open source software I plan on using is maintained using a distributed source control management tool called Mercurial. An installer for this is available at http://mercurial.selenic.com. Download and install the software.

$ curl http://mercurial.selenic.com/release/mercurial-1.6.3.tar.gz --output mercurial-1.6.3.tar.gz
$ tar xvf mercurial-1.6.3.tar.gz
$ cd mercurial-1.6.3
$ make PREFIX=/System/Library/Frameworks/Python.framework/Versions/2.5 all
$ sudo make PREFIX=/System/Library/Frameworks/Python.framework/Versions/2.5 install
$ hg version

Django-nonrel

I plan on implementing my web applications on top of the Django framework. Some modifications are required in order for this framework to run properly on GAE since Google uses Big Table for data storage instead of a relational database. Everything necessary to get Django working in GAE is included as part of the Django-nonrel project. Specific instructions for GAE are available at http://www.allbuttonspressed.com/projects/djangoappengine.

Use the commands listed below to install copies of all the necessary components onto your machine. Everything will be stored in a folder called DjangoStuff under your home directory.

$ mkdir $HOME/DjangoStuff
$ cd $HOME/DjangoStuff
$ hg clone https://bitbucket.org/wkornewald/django-nonrel
$ hg clone https://bitbucket.org/wkornewald/djangoappengine
$ hg clone https://bitbucket.org/wkornewald/djangotoolbox
$ hg clone https://bitbucket.org/wkornewald/django-dbindexer
$ hg clone https://bitbucket.org/wkornewald/django-testapp

Now, pick another folder where you want to setup a practice application. I am calling mine cs-practice since this is also the name of my Google App Engine application.

Use the following commands to configure the practice application for Django-nonrel development.

$ mkdir $HOME/cs-practice
$ cd $HOME/cs-practice
$ ln -s $HOME/DjangoStuff/django-nonrel/django django
$ ln -s $HOME/DjangoStuff/djangoappengine djangoappengine
$ ln -s $HOME/DjangoStuff/djangotoolbox/djangotoolbox djangotoolbox
$ ln -s $HOME/DjangoStuff/django-dbindexer/dbindexer dbindexer
$ cp -r $HOME/DjangoStuff/django-testapp/* .

Once you have the practice folder setup you need to edit the app.yaml file and change the application name to reflect the Google App Engine application name you selected when registering on http://appengine.google.com.

RESTful .NET by Jon Flanders

June 9, 2009 | Comments Off

RESTful .NET is the first book that teaches Windows developers to build RESTful web services using the latest Microsoft tools. Written by WFC expert Jon Flanders, this hands-on tutorial demonstrates how you can use WCF and other components of the .NET 3.5 Framework to build, deploy and use REST-based web services in a variety of application scenarios. No prior knowledge of REST or WCF is required to get started.

Kindle: Amazon’s 6″ Wireless Reading Device (Latest Generation)

June 9, 2009 | Comments Off

For a while the idea of a Kindle has intrigued me. In early May I took the plunge and purchased one of the new and improved models from Amazon. The main thing I was looking for was a way to reduce the number of technology books I lug back and forth to work each day.

Adobe Creative Suite 4 – Web Premium

June 9, 2009 | Comments Off

Tackle websites, applications, user interfaces, and other digital experiences with complete confidence in the power of Adobe® Creative Suite® 4 Web Premium software. From world-class image editing prowess to sophisticated code-handling capabilities to multiplatform deployment options, Web Premium is the comprehensive solution for the professional web designer and developer.

Web Premium combines Adobe Dreamweaver® CS4, Flash® CS4 Professional, Photoshop® CS4 Extended, Illustrator® CS4, Fireworks® CS4, Acrobat® 9 Pro, Soundbooth® CS4, and Contribute® CS4 with additional tools and services.


Web Premium CS4

WS_FTP Professional

June 9, 2009 | Comments Off

WS_FTP Professional delivers industry-leading security, automation, and customization capabilities, offering the highest level of encryption available for files and a superior range of features that enhance productivity and communication.

With more than 40 million users worldwide, the award-winning WS_FTP Professional is the world’s most popular file transfer client. It boasts the fastest transfer speeds and highest level of reliability and security of any file transfer client on the market.


USA: NEW! WS_FTP Professional 12 no support

February 4, 2009 | Comments Off

My name is Bennett Smith. I’m pleased to welcome you to my site, and hope you come back often. Information about my professional experience, details on how I can help you with your projects and general ramblings about the technologies I use are published here.

Feel free to surf around and see if you like what’s on my site. I have some strong opinions about software development. Comments are encouraged so please don’t be shy.

Here’s A Place to Welcome Visitors

January 25, 2009 | Comments Off

Welcome to the my website – I am glad you are here, and hope you come back often.  Feel free to surf around and see if you like what’s on my site.

This is an area on your website where you can add text. This will serve as an informative location on your website, where you can talk about your site.

If you are looking to bring back site visitors, make this an informative paragraph that links to a more detailed explanation of what your site is all about.

www.idevelopsoftware.com is Stephen Fry proof thanks to caching by WP Super Cache