[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Python Bindings under Windows (ViewCvS on windows)

From: Walter Nicholls <walter.nicholls_at_cornerstone.co.nz>
Date: 2003-08-12 05:57:05 CEST

>> Is there a step by step guide (that works) somewhere?
>> P.S. I only want to get viewcvs running - and no, I can't just change
to linux :-)

I couldn't change to Linux either.

I've got it working .. internally. I haven't put it on the 'production'
SVN server yet (subversion is hardly production). I suppose I should
write a step-by-step guide for my own documentation purposes.

Here's some of the key issues/steps. I'm sorry I'm not going to show too
many of the sources of this information, because I'm looking at my
C:\DOWNLOADS to see what files I got.

I'm running Subversion 0.25.0, so I downloaded
svn-win32-0.25.0_python.zip (from files section on tigris.org, same dir
as the svn-0.25.0-setup.exe). This has been compiled against Python 2.2
NOT 2.3. This was my biggest initial problem.

1. Apache 2.0.47 from httpd.apache.org

2. Python for Windows VERSION 2.2!!
Get Python-2.2.3.exe from http://www.python.org/2.2.3/
Installed in c:\program files\python2.2
win32all-154.exe (ie the version that matches 2.2, -155 is for python
2.3) from a link on the same page, and install that

3. mod_python for Apache:
mod_python-3.0.3.win32.exe from http://www.modpython.org/ Follow normal
instructions to install.

4. You must get the HEAD of ViewCVS. ViewCVS 0.9.2 does not have the
Subversion support in it.
I can't remember the CVS command for this perhaps:

        C:\temp\> cvs -d
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/viewcvs co viewcvs

5. Run the viewcvs-install program
      C:\temp\viewcvs\> python viewcvs-install

  and follow the prompts

I installed to C:\webroot\viewcvs-1.0-dev\

6. Modify apache's httpd.conf to include:

LoadModule python_module modules/mod_python.so

ScriptAlias /viewcvs
"c:/webroot/viewcvs-1.0-dev/www/mod_python/viewcvs.py"
<location /viewcvs>
    AddHandler python-program .py
    PythonPath "[r'c:\\webroot\\viewcvs-1.0-dev\\lib']+sys.path"
    PythonHandler apache
    PythonDebug On
</location>

7. Modify viewcvs.conf

[general]
svn_parent_path = //moria/svnrepos
# This is a share on my server Moria; or use c:\subversion\repos or
whatever...
default_root = sandpit

8. You may need to ensure the user account that is running Apache has
appropriate rights to the repository. I needed to change this because my
ViewCVS is on a different box to Subversion, and the by default Apache
runs under the local system account, which can't access across the
network. If your repository is on the same machine as the web server
then LocalSystem should be fine.

Clear as mud? I've probably forgotten something.

For syntax-aware colour coding, you need to do a bit more

1. go to http://gnuwin32.sourceforge.net/packages.html and start
downloading all the binaries.

I got this lot:
diffutils-2.8.1-3-bin.zip
enscript-1.6.3-9-bin.zip
enscript-1.6.3-9-doc.zip
gzip-1.2.4-bin.zip
libiconv-1.8-1-bin.zip
libintl-0.11.5-2-bin.zip
sed-4.0.7-bin.zip
zlib-1.1.4-1-bin.zip

I'm not sure if it is *all* needed.

Install into C:\gnuwin32\, and have c:\gnuwin32\bin in the PATH
environment variable. (You might be able to get it working with explicit
pathing, but.. good luck).

Then in viewcvs.conf set use_enscript = 1 and things should be sweet.

I haven't got cvsgraph or DIFFs working. Yet. One of the reasons this
hasn't gone to production.

DISCLAIMER: I haven't retested any of this to see if my instructions are
correct or complete. It took me a good couple (ie 5 or so!) of hours to
get this straight. I hope this saves you some time, but be prepared to
debug in case I'm an idiot.

There are howtos, and complete downloadable packages of ViewCVS for
Windows with instructions, but I found them useless. Of course, they
are based on the released version of ViewCVS without SUbversion support!
If anyone wants to turn this email into a howto, feel free!

- Walter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Aug 12 05:53:03 2003

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.