If you have Stackless Python installed and are familiar with zc.buildout, then here's the quick installation instructions. If you're just impatient, then this section will get you up and running quickly.
$ python bootstrap.py $ bin/buildout $ bin/paster make-config pypesvds production.ini $ bin/paster setup-app production.ini $ bin/paster serve production.ini
Default user is 'admin' and default password is '123'
Detailed Installation Instructions
If you're new to Python, unfamiliar with zc.buildout, or just want a deeper understanding of the process then read through this section. It provides details pertaining to each of the commands outlined above.
Pypes has a number of requirements that will be installed during the setup procedure. The only external requirement is Stackless Python 2.6.x. Stackless Python is an enhanced version of the Python interpreter. It is completely compatible with regular Python but adds some performance enhancing features required by pypes.
During the installation, pypes will create a virtual environment where it will install itself along with any of its dependencies. You can rest assured that pypes will not add any files outside its parent directory.
This also means that you can install Stackless Python in your home directory or somewhere not visible to the system at large. There is no need to install Stackless system wide and/or overwrite your existing Python installation. If Python is not currently installed on your system (i.e., you're on Windows) then the suggested method is to install Stackless system wide (easiest solution).
Stackless packages for each operating system can be found here.
Once you've installed Stackless you can verify the installation by invoking the interpreter:
$ python Python 2.6.4 Stackless 3.1b3 060516 (release26-maint, Jan 17 2010, 22:51:55) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
To exit the interactive Python shell, press Ctrl-D (I believe on Windows it;s Ctrl-Z).
If all is well, you can proceed to the next section. Otherwise, you will need to locate the Stackless interpreter. On Linux you can try the whereis and locate utilities. On Windows you can use the Find Files and Folders dialog. Here is an example using whereis on Linux:
$ whereis python python: /usr/bin/python2.6 /usr/bin/python /usr/local/bin/python2.6 /usr/local/bin/python $ $ /usr/local/bin/python Python 2.6.4 Stackless 3.1b3 060516 (release26-maint, Jan 23 2010, 19:03:48) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
Once you have located the Stackless interpreter you can proceed to the next section.
For the remainder of this guide we will assume your Stackless interpreter is /usr/local/bin/python.
Go to the download page and grab the latest release.
If you're a developer you can also clone the repository to get the latest development version. Be warned that it could be unstable.
Running the buildout
Pypes uses zc.buildout to create an operable instance of itself.
The word "buildout" refers to a description of a set of parts and the software to create and assemble them. It is often used informally to refer to an installed system based on a buildout definition. For example, if we are creating an application named "Foo", then "the Foo buildout" is the collection of configuration and application-specific software that allows an instance of the application to be created. We may refer to such an instance of the application informally as "a Foo buildout".
During the buildout process, a virtual environment will be created to house the entire pypes instance along with all of its dependencies. To uninstall pypes, simply delete the directory and this will completely remove all remnants from your system.
To run the buildout process, execute the following commands (make the appropriate changes where necessary).
Begin by unpacking the pypes download using the appropriate tool (i.e, Winzip, tar, gzip, bzip)
$ tar xzf pypes-1.0.0.tar.gz
Next we'll need to bootstrap the system. You'll want to use the Stackless Python interpreter here so provide the proper path to it. The bootstrap command takes care of setting up the virtual environment.
$ /usr/local/bin/python bootstrap.py
Once the bootstrap process is complete, execute the buildout script (this script was created during the bootstrap process under the bin directory).
This command will take some time to complete. It takes care of downloading the necessary dependencies required to run pypes. You'll need to be connected to the Internet to run this command successfully.
Once this command completes we need to create a configuration. Pypes provides config templates that can be used as a good starting point. In most cases, you won't need to modify it at all. Execute the following command (you can name the configuration file anything you like - below we've named it production.ini)
$ bin/paster make-config pypesvds production.ini
If the command was successful, a new file named production.ini should have been created in your current directory (or whatever you've decided to name the configuration file).
The last step is to initial the application. This command will also create a plugins directory that can be used to install 3rd party and/or custom components. Substitute the name of the configuration file with the name you've used in the previous steps.
$ bin/paster setup-app production.ini
You can start the application. By default the application will start on port 5000. This can be changed in the configuration file created in the buildout process (see previous section).
The application can be started using the following command.
$ bin/paster serve production.ini
This starts the application in the foreground meaning it will continue executing in the shell where you invoked it. This works well if your developing new code or testing the application but it doesn't work well for long running tasks.
In order to start the application in the background or "daemon" mode, execute the following command.
$ bin/paster serve production.ini start
Default user is 'admin' and default password is '123'
If pypes is running in the foreground then typing Ctrl-c will shut it down. If it's running in the background (i.e. daemon mode) then executing the following command will shut it down.
$ bin/paster serve production.ini stop
For details pertaining to paster options, the following command will display detailed help information.
$ bin/paster serve -help