Windows development environment

This page contains instructions on how to set up a Zope development environment with ZTM Topic Maps on Microsoft Windows operating systems.

Warning

While you can use this for production environments by not running in debug mode, this is not recommended.

Production environments should probably be configured differently, but since we have not yet operated any ZTM (version 3) websites on Windows we can not provide recommendations.

The primary problem is that you depend on PyPI which is essentially a dynamic package assembly.

Dependencies

While most dependencies are retrieved from python.org’s Package Index (PyPI) by the build system, there are a few packages that need to be downloaded directly to bootstrap your setup:

  • Python 2.5.4 (Or the latest version of 2.5, not tested with 2.6 or higher.)
  • setuptools 0.6c9

Note

You will also need a decent text-editor, meaning something other than Windows’ built-in notepad. If you do not have a preferred text editor you can try downloading pspad.

Downloading and installing Python

You can download Python at python.orgs download section. Look for the latest 2.5.x version.

To avoid any problems just install Python to the default C:\Python25\. Or at least avoid paths with a path segment with a space like C:\Program Files\ or My documents.

Downloading and installing setuptools

You can find an executable installer on setuptools’ PyPI-page.

Alternatively you can download ez_setup.py to c:\Python25\ and run it from the command line like this:

c:\> cd \Python25\
c:\Python25> bin\python ez_setup.py

You should now have a script called easy_install in c:\Python25\bin\. this script can be used to download and install Python packages.

Getting zopeproject

zopeproject is a script that sets up a simple project folder with scripts and daemons to publish Zope content through a WSGI pipeline with at Paste web server.

It must be installed like this from the console:

c:\Python25> bin\easy_install zopeproject

Running zopeproject

Projects are just folders and can be placed anywhere. Below we call the folder mysite, but you can use more or less anything. Just remember to avoid spaces in the path.:

c:\Python25> cd \
c:\> \Python25\scripts\zopeproject mysite

Follow the on-screen instructions. Point the Eggs-directory to c:\buildout-eggs.

Make sure you remember the administrator account’s user-name and password. :-)

Note

The eggs-directory is just a shared cache where setuptools will check before trying to download a package again.

Waiting

Now let buildout do its job.

Expect this to take some time depending on how fast your internet-connection is.

Testing your server

Before getting ZTM you should test your server:

c:\> cd mysite
c:\mysite\> bin\paster serve debug.ini
Your server is now running at localhost:8080

You can test your instance by starting it up with binpaster serve debug.ini and checking http://localhost:8080

Try logging in by clicking log in in the upper right corner.

Entering the administrator account’s user-name and password you typed in above will take you to Zope’s Management Interface (ZMI).

Installing ZTM

Next we need to tell the zope project to include ZTM.

Start your text-editor and open c:\mysite\buildout.cfg

Look for the [buildout] section and add the following line below it:

find-links = http://ztmproject.org/snapshots/

Next look for the [app] section and add the ztm.publishing and ztm.demonstration as eggs:

[app]
eggs = mysite
       ztm.publishing
       ztm.demonstration
       ...[snipped other eggs]...

You have now told the buildsystem that the next time it runs it should try to find the packages ztm.publishing and ztm.demonstration and their dependencies.

First you need to stop the running server. This is done by focusing the console window and holding down Ctrl while pressing c. Now you can run the build-system and look for updates like this:

c:\mysite> bin\buildout -n

Once again you need to wait a short while for it to download more packages and complete.

Note

Occasionally the update finishes without printing a newline. Press enter to check if no new lines has been printed for a while.

The final edit should is in the c:\mysite\site.zcml which tells Zope to load the package configuration:

<configuration>
  ...
  <include package="ztm.publishing"/>
  <include package="ztm.demonstration"/>
  ...
</configuration>

Starting ZTM

Now start the server in debug mode again with:

c:\mysite> bin/paster serve debug.ini

Again go to http://localhost:8080/ and log in as administrator.

Next click [top] in the top left corner. The left column should now have the ability to create a Topic Map object. (It might have been translated depending on your browser settings.)

Add the topic map and give it a name. We just call it topicmap by convention.

Et Voilá, you have installed ZTM 3, created your first topic map and you are ready to fill it with topics!

Starting the console

Hold down the Windows-key and press r. Write cmd in the input field and press enter. You should now get a console.

© Copyright 2009-2010, ztmproject.org. Created using Sphinx 0.6.3.