Prerequisites

If you want to play with pyramid_starter_seed you'll need to install NodeJS and, obviously, Python. Once installed Python and Pyramid, you'll have to clone the pyramid_starter_seed repository from github and initialize the Yeoman stuff.

Python and Pyramid

pyramid_starter_seed was tested with Python 2.7. Create an isolated Python environment as explained in the official Pyramid documentation and install Pyramid.

Official Pyramid installation documentation

NodeJS

You won't use NodeJS at all in your code, you just need to install development dependencies required by the Yeoman tools.

Once installed NodeJS (if you want to easily install different versions on your system and manage them you can use the NodeJS Version Manager utility: NVM), you need to enable the following tools:

$ npm install -g bower
$ npm install -g grunt-cli
$ npm install -g karma

Tested with NodeJS version 0.10.31.

How to install pyramid_starter_seed

Clone pyramid_starter_seed from github:

$ git clone git@github.com:davidemoro/pyramid_starter_seed.git
$ cd pyramid_starter_seed
$ YOUR_VIRTUALENV_PYTHON_PATH/bin/python setup.py develop

Yeoman initialization

Go to the folder where it lives our Yeoman project and initialize it.

These are the standard commands (but, wait a moment, see the "Notes and known issues" subsection):

$ cd pyramid_starter_seed/webapp
$ bower install
$ npm install

Known issues

You'll need to perform these additional steps in order to get a working environment (the generator-webapp's version used by pyramid_starter_seed has a couple of known issues).

Avoid imagemin errors on build:

$ npm cache clean
$ npm install grunt-contrib-imagemin

Avoid Mocha/PhantomJS issue (see issues #446):

$ cd test
$ bower install

Build

Run:

$ grunt build

Run pyramid_starter_seed

Now can choose to run Pyramid in development or production mode.

Go to the root of your project directory, where the files development.ini and production.ini are located.

cd ../../..

Just type:

$ YOUR_VIRTUALENV_PYTHON_PATH/bin/pserve development.ini

or:

$ YOUR_VIRTUALENV_PYTHON_PATH/bin/pserve production.ini