|
DevGettingStarted
Hopefully simple steps to get you ready to be a productive GetPaid developer
Getting StartedSetting 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. IngredientsYou'll need:
To Get StartedNew fashioned wayThis checkout method is possible for Plone 3.2.x and later which are purely Python egg based Plone distributions.
Old fashioned wayCheckout 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/getpaid.buildout/trunk getpaid.buildout Make sure you use https and not http, as you will have authentication problems later if you do. Note: The anonymous buildout is no more supported. 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 -v For Plone 3.1.6 run: bin/buildout -c 316.cfg -v The -v isn't necessary, but may make you feel better in the knowledge that a lot is going on. Note: Do NOT attempt to run a buildout of one instance in a buildout directory that you had a different version in already. Start with a clean buildout directory and choose either the 2.5, 3.0, or 3.1 buildout config for that buildout (do not run a 3.0 buildout in the directory that you had a 2.5 buildout.) You can copy the cfg and alter the Plone version it's pinned to, if you'd prefer to attempt a different, possibly more recent Plone version. 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 productCreate 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 testingIf 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 buildoutJust do a svn up from your getpaid.buildout folder to update the buildout. Then run the buildout again. Be sure to run the command corresponding to the same version of Plone you built originally, otherwise this will break your build. For Plone 2.5 ./bin/buildout -N For Plone 3.0 ./bin/buildout -c 30.cfg For Plone 3.1.6 ./bin/buildout -c 316.cfg That's it! Troubleshootinghurry.workflow errorsYou need to re-run the build-out to get the latest .cfg file. Try: ~/getpaid.buildout/bin/buildout -v -N M2Crypto errors and Authorize.netAuthorize.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 passwordIt seems that it only works for Google accounts that have subscribed to Gmail. Errors during checkoutThe 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 execfileWe 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/cAccessControlinternal 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.memberIf 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. |
Sign in to add a comment
"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?
I am having a lot of trouble installing GetPaid?. First I tried a new zope instance and the tarball. This gave me an attribute error when trying to create new sites. Now I try the buildout and...
An internal error occured due to a bug in either zc.buildout or in a recipe being used:
URLError: <urlopen error unknown url type: https>
Usually products take 10 mins to install. I have spent a day now :-( will all zope3 style products be this difficult to set up?
geoff, here is an upgrade doc I just wrote, but it should tell you what you need for a new install of getpaid as well. http://ejahn.net/Members/eric/stories/getpaid-.6-update
If you get "urlopen error unknown url type: https" using buildout make sure you have openssl and libssl-dev installed before you install python (on ubuntu sudo apt-get install openssl libssl-dev)
In a clean installation, during first bin/buildout -c 316.cfg -v
I've encountered this error:
Installing 'zc.recipe.testrunner'.
We have the best distribution that satisfies 'zc.recipe.testrunner'.
Picked: zc.recipe.testrunner = 1.1.0
While:
Error: There is a version conflict.
We already have: zope.testing 3.5.0
but zc.recipe.testrunner 1.1.0 requires 'zope.testing>=3.6.0'.
Do you have any solution ?
I have a Plone 3.1.6 buildout installation. I am having trouble finding clear instructions on adding GetPaid? to it. It seems like it should be straightforward... any pointers?
You can use the getpaid recipe.
http://pypi.python.org/pypi/getpaid.recipe.release/1.0
nhajratw, For production environments, I use getpaid 0.6.2 with Plone 3.1.6. lucielejard's comment would be suited for a development environment. To go the production route, I'm working on a how-to located here: http://ejahn.net/Members/eric/stories/getpaid-.6.2-with-plone-3.1.6 Essentially, after you have your 3.1.6 buildout installation, you add getpaid's dependencies into buildout, then rerun buildout. Then get the 0.6.2 getpaid tarball and extract its contents into appropriate places into the plone installation, then activate getpaid in as an add-on in Plone's setup screen. It works great, but I only have Google Checkout working seamlessly. Waiting for Paypal.
When trying bootstrap.py I get the following error:
Downloading http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c9-py2.4.egg Traceback (most recent call last):
AttributeError?: 'NoneType?' object has no attribute 'location'with the aim of this firm establishment, I hereby commend all the cooperatives and board of directors to keep it on the there drive to success. am Kingsley Simeon Duru with great aim and focus towards success will gladly join this association. thanks.