[Zope3-dev] Re: help with buddydemo tutorial

Philipp von Weitershausen philipp at weitershausen.de
Mon Sep 27 12:07:16 EDT 2004


Reilly, Joseph M wrote:
> Hi,
> 	Now that I have a functioning laptop I'm going through the
> buddydemo tutorial. I'm stuck at the beginning trying to run the
> unittests. Here is what I've done so far.
> 
> Installed Python23 in default location c:\python23
> Installed ZopeX3-3.0.0c1 into c:\python23
> Downloaded Zope3 head into c:\zope3
> Created Zope 3 instance at c:\zope3BDM
> Created a buddydemo like package call SDM at c:\zope3BDM\lib\python\SDM
> Started up Zope and was able to add an instance in the UI.
> 
> However when I try and run the unit tests from 
> C:\zope3BDM\lib\python
> with this command
> python \Python23\Lib\site-packages\zope\app\tests\test.py  -vds SDM

Don't run stuff out of installed python modules. Noone ever does this, 
except maybe Florian who posted a similar message earlier on this list. 
I wonder if we need to make it clear where you run stuff from...?

There are two ways to install Zope X3:

- SVN checkout:

   This works *in-place*, which means you hit 'make' within the checkout
   and then you start working. The top-level directory as well as the
   'utilities' subdirectory contain common utility scripts, such as
   test.py and i18nextract.py.

   This type of checkout is only recommended for developers of Zope 3
   itself. Unfortunately, Stephan's book discusses only this way of
   setting up Zope, confusing many people who download a packaged version
   because locations are very different.

- Release package:

   Here, the Zope libraries is installed in a separate directory (Unix)
   or into Python's site-packages directory (Windows). In order to
   actually use Zope, you make an *instance*. You can make as many
   instances as you want. They can all have different configurations etc.
   They're only using the same software libraries.

   To create an instance you run the mkzopeinstance script with
   appropriate parameters (README should tell you how). Then, inside that
   instance, you have 'etc' for configuration and 'bin' which contains a
   number of utility scripts, including 'runzope', 'zopectl' (Unix) and
   'test'. The latter is equivalent to the 'test.py' script in an SVN
   checkout. Use this to execute tests.

   It is important to run the scripts from the instance's bin directory,
   because these scripts know how to setup the environment so that Zope
   libraries are found as well as additional Python packages that were
   installed into the instance's lib/python directory. The test.py module
   from within the zope.app.tests package does not know how to do that.

> ImportError: No module named ydemo.tests

That looks like a typo?

Philipp



More information about the Zope3-dev mailing list