What's new? | Help | Directory | Sign in
Google
getpaid
GetPaid with Plone: Project Collaboration Area
  
  
  
  
    
Search
for
Updated Jan 11, 2008 by cjj.ifpeople
Labels: Featured
DevGettingStarted  
Hopefully simple steps to get you ready to be a productive GetPaid developer

Getting Started

Setting up a development environment is now easy thanks to our use of zc.buildout ( http://python.org/pypi/zc.buildout )

zc.buildout is a framework for creating repeatable installs, and is in widespread use in the Zope3 and Plone 3 communities. It installs Zope, Plone, all the getpaid products, the requisite python libraries, and setups an instance that's usable out of the box for development.

Ingredients

You'll need:

To Get Started

Checkout the getpaid.buildout infrastructure. The code for both Plone 2.5 and 3.0 buildouts can be obtained together, so only one place to check out from. Make sure you check it out to a location outside of any existing Zope instances.

svn co https://getpaid.googlecode.com/svn/trunk/getpaid.buildout

Make sure you use https and not http, as you will have authentication problems later if you do.

If you wish to do anonymous checkout, use:

svn co http://getpaid.googlecode.com/svn/trunk/getpaid-anonymous-buildout

Note: For the rest of the documentation, we will simply use "getpaid.buildout" as the name of your buildout folder. Depending on which version you checked out in the above step, you will need to adjust the name of the folder for the commands shown.

For using authorize.net payment processor, uncomment zc.authorizeddotnetet and getpaid.authorizenet in buildout.cfg

Run the buildout bootstrap script using a python interpreter that Zope likes (for example, python2.4):

cd getpaid.buildout
python2.4 bootstrap.py

This creates a few directories used by buildout. Then you run a command depending on which version of Plone you want:

For Plone 2.5 run:

bin/buildout -v

For Plone 3.0 run:

bin/buildout -c 30.cfg

The -v isn't necessary, but may make you feel better in the knowledge that a lot is going on.

Brew your caffeinated beverage of choice: this will take a long time and use up to 200Mb of disk space. It will:

If you've done this once, see "Updating the buildout" below.

To start Zope 2, you can now do:

bin/instance fg

By default, the ZMI adminisration username/password is admin/admin. If the ZMI hangs, check your console: PDBDebugMode is installed by default, so you get a debugger prompt whenever there would have been a traceback.

Installing the product

Create a Plone site within your zope instance. Go to site setup. Install the GetPaid product. It is not necessary to install the other products listed.

Debugging and testing

If you wish to have an interactive python prompt that has all the packages Zope is aware of, e.g. for testing purposes, you can run:

bin/zopepy

Updating the buildout

Just do a

svn up

from your getpaid.buildout folder to update the buildout. Then run the buildout again:

For Plone 2.5

./bin/buildout -N

For Plone 3.0

./bin/buildout -c 30.cfg

That's it!

Troubleshooting

hurry.workflow errors

You need to re-run the build-out to get the latest .cfg file. Try:

~/getpaid.buildout/bin/buildout -v -N

M2Crypto errors and Authorize.net

Authorize.net requires some new crypto libraries. We removed this from buildout.cfg so that dependencies aren't needed at this point for a general audience.

future Steps to install:

On OSX: It looks like we need to install SWIG via DarwinPorts: sudo apt-get install swig

M2Crytpo had some additional dependencies that still need to be worked out for the buildout...

GoogleCode profile page doesn't show the SVN password

It seems that it only works for Google accounts that have subscribed to Gmail.

Errors during checkout

The initial checkout takes a long time, connects to a multitude of servers, and in general has several interesting ways it can fail. If it does, just enter the getpaid-buildout directory and do an svn up:

cd getpaid-buildout
svn up

the svn fu will continue where it left off.

No such file or directory while doing execfile

We really meant it about using the commandline svn client; if you use a GUI client, make sure it correctly supports svn:externals. For example, rapidsvn prior to 0.9.4 does not. Do a svn up; make certain all externals are pulled in.

The instance hangs!

Installation of the PloneGetPaid product may appear to hang. There's an installed product called PDBDebugMode that brings up a Python Debugger prompt whenever there's an error (which is why it looks like it's freezing). When you're running in debug mode, you'll see a prompt appear in your terminal window. Just hit 'r' (sometimes several times) to continue. If in doubt, stop your Zope instance and restart it.

AccessControl/cAccessControl

internal error occured due to a bug in either zc.buildout or in a recipe being used:
AccessControl/cAccessControl.c:2312: error: ‘PROBLEM’ undeclared (first use in this function)

Seems to be caused by using the wrong version of Python. You can correct this by providing the full path to Python2.4 when running bootstrap.py

/path/to/python24/python bootstrap.py

You may need to install PIL to make it run:

http://www.pythonware.com/products/pil/

AttributeError: ore.member

If you got that error trying to install PloneGetPaid on your plone site, please restart the zope instance and try again. Now ore.member should exist and you should have no problems for finishing the PloneGetPaid installation.


Comment by peter2win, Apr 16, 2008

"Libraries: profiler, simplejson and elementtree. For testing authorized.net with buildout, you'll also need libssl-dev and swig does not work with the latest version of SWIG (1.3.31)"

How to get and install all of these?


Sign in to add a comment