ZC Buildout recipe for setting up a google appengine development environment
Project description
Buildout recipe for setting up a google appengine development environment.
The rod.recipe.appengine is a zc.buildout recipe to build, test and deploy projects for the google appengine. It makes it easy to use eggs and resolve their dependencies automatically.
To be honest, this is a recipe for scrambled eggs. It produces a zip file containing all configured external packages in a traditional folder hierarchy.
A brief documentation
This recipe takes a number of options:
- appengine-lib
Path to an already installed appengine library
- eggs
List of required eggs
- exclude
A list of basenames to be excluded when setting up the application files, e.g. the whole ‘tests’ directory.
- packages
A list of packages to be included into the zip archive, which will be uploaded to the appspot.
- src
The directory which contains the project source files.
- url
The url for fetching the google appengine distribution
- zip-name
The name of the zip archive containing all external packages ready to deploy.
- zip-packages
Flag whether external packages shall be zipped in single zip file. (Default=True)
Tests
We will define a buildout template used by the recipe:
>>> buildout_template = """ ... [buildout] ... develop = %(dev)s ... parts = sample ... ... [sample] ... recipe = rod.recipe.appengine ... eggs = foo.bar ... packages = bazpkg ... zip-packages = False ... exclude = tests ... url = http://googleappengine.googlecode.com/files/google_appengine_1.2.3.zip ... """
We’ll start by creating a buildout:
>>> import os.path >>> import rod.recipe.appengine.tests as tests >>> egg_src = os.path.join(os.path.split(tests.__file__)[0], 'foo.bar') >>> baz_pkg = os.path.join(os.path.split(tests.__file__)[0], 'bazpkg') >>> write('buildout.cfg', buildout_template % {'dev': egg_src+' '+baz_pkg})
Running the buildout gives us:
>>> output = system(buildout) >>> if output.endswith("Google App Engine distribution...\n"): True ... else: print output True
And now we try to run the appserver script:
>>> print system(os.path.join('bin', 'sample')) <BLANKLINE> ... Invalid arguments <BLANKLINE>
There should be a configuration script in bin as well:
>>> print system(os.path.join('bin', 'appcfg')) Usage: appcfg [options] <action> <BLANKLINE> ... <BLANKLINE>
Let’s see if the ‘tests’ directory has been excluded:
>>> l = os.listdir(os.sep.join(['parts', 'sample', 'foo', 'bar'])) >>> assert 'tests' not in l
There should be a baz package within our application directory:
>>> assert 'baz' in os.listdir(os.sep.join(['parts', 'sample']))
Changes
1.3.1 2009-07-15
Fixed issue when copying egg contents.
1.3.0 2009-07-04
Added options zip-packages and exclude.
1.2.1 2009-07-03
Uses a much better method for excluding optional c extensions and compiled modules.
A step forward in platform independence.
1.2.0 2009-06-24
Creates appcfg script.
1.1.1 2009-06-07
Makes symbolic links for application files.
Downloads stay untouched.
1.1.0 2009-04-08
Mostly rewritten.
Installs google appengine as part.
Adding dummy pkg_resources module to handle namespace package relicts.
Tests added.
Ready for Google App Engine SDK 1.2.0
1.0.0b5 2009-01-20
Requires Google App Engine SDK 1.1.8
1.0.0b4 2008-09-04
Create and use PROJECT_HOME/var to place temporary project files like data base files.
1.0.0b3 2008-09-02
Copy package contents to temporary library directory.
1.0.0b2 2008-09-02
Installs the whole distribution in the parts directory now. So it is ready to test and deploy.
1.0.0b1 2008-09-01
First beta release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rod.recipe.appengine-1.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f355f7b3e67e86aed208c0bfb296bc97881360707b30723481bb1a2d3e5a182d |
|
MD5 | 2ed65ae844fc105ff134ba32f021b96a |
|
BLAKE2b-256 | 6138e5a393a91686cb6d63b8f9868e0de794ea0f0754aa567d23b84eb72b7215 |
Hashes for rod.recipe.appengine-1.3.1-py2.5.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | a54e6b5041116ce8bcf264a2eb86ee201feb5affb195f659b304db32c6c1883d |
|
MD5 | 39a1f6b62ddd1be43103a0386760bf64 |
|
BLAKE2b-256 | 6cbb812f195831cf3496fbcab38866b6040ac4520095af31c2f1169debd132e6 |