svn_roots = RepositoryDirName: c:/path/to/parent/RepositoryDirName root_parents = c:/path/to/parent : svn default_root = RepositoryDirName
(this sets up path/to/parent as being the root of all SVN
repositories, with RepositoryDirName as the default repository to open)
LoadModule python_module modules/mod_python.so
ScriptAlias /viewcvs "C:/path/to/viewcvs/install/www/mod_python/viewcvs.py" <location /viewcvs> AddHandler python-program .py PythonPath "[r'c:\\path\\to\\viewcvs\\install\\lib']+sys.path" PythonHandler apache PythonDebug On AddDefaultCharset UTF-8 </location>
2 Errors with python2.5.1
I get the following error when I run the standalone.py file
An Exception Has Occurred
Python Traceback
Traceback (most recent call last): File "C:\Program Files\viewvc-1.0.4\lib\viewvc.py", line 3665, in main request.run_viewvc() File "C:\Program Files\viewvc-1.0.4\lib\viewvc.py", line 253, in run_viewvc import vclib.svn File "C:\Program Files\viewvc-1.0.4\lib\vclib\svn\__init__.py", line 25, in from svn import fs, repos, core, delta File "c:\Python25\lib\site-packages\svn\fs.py", line 19, in from libsvn.fs import * File "c:\Python25\lib\site-packages\libsvn\fs.py", line 5, in import _fs ImportError: No module named _fs-----------------------------------------------------------------
I get this error when try to import "svn.repos" while inside the python cli.
Traceback (most recent call last): File "", line 1, in File "c:\Python25\lib\site-packages\svn\repos.py", line 19, in from libsvn.repos import * File "c:\Python25\lib\site-packages\libsvn\repos.py", line 5, in import _repos ImportError: No module named _repos >>>Any help?
Python path
The Subversion libraries are not on your Python path.
Install Viewvc with Apache have a error
When open in browser have a error like below:
I have the same error message...
Mod_python error: "PythonHandler apache" Traceback (most recent call last): File "C:\PYTHON23\Lib\site-packages\mod_python\apache.py", line 287, in HandlerDispatch log=debug) File "C:\PYTHON23\Lib\site-packages\mod_python\apache.py", line 461, in import_module f, p, d = imp.find_module(parts[i], path) ImportError: No module named apacheI had to resort to the viewvc.cgi method to get everything work together.
I'm guessing that the "mod_python-3.2.8.win32-py2.3.exe" I downloaded is incompatible with Python/2.3.5, Apache/2.0.58
Can anyone confirm this or let me know where i am going wrong?
Thanks in advance,
Jay.
This phrase is the
This phrase is the key:
Install the ActivePython version that corresponds to those SVN python bindings
I am pretty sure that you need Python 2.2.
Sorry, still no joy
Thanks for the prompt response Martin,
I tried ActiveState Python 2.2 - complained incorrect Python library (versions).
Also, the Subversion svn-win32-1.3.2 release README states:
These binaries were built with: Neon 0.25.5 Berkeley DB 4.3.28 OpenSSL 0.9.8 ZLib 1.2.3 Apache 2.0.54 Python 2.3 libintl 0.14.1 (patched)mod_python with ActiveState Python 2.3.5 installs correctly and mptest.py and /mpinfo then both work normally. viewvc.py still same error message :(
As ViewVC.cgi works fine, i'll live with that.
However, I'd be interested to hear from anyone on WinXP platform that has managed to get SVN/1.3.2 Apache/2.0.54 (Win32) mod_python/3.2.8 Python/2.3.5 and viewvc-1.0.0 working with mod_python method.
PythonPath
It sounds like your PythonPath directive isn't correct. Is viewcvs.py in the folder pointed to by your PythonPath?
No viewcvs module Error
I am following your step by step guide, but when running the standalone py I receive the following error message:
C:\viewcvs-0.9.4>c:\Python23\python.exe standalone.py -g Traceback (most recent call last): File "standalone.py", line 511, in ? import viewcvs ImportError: No module named viewcvsBut the file viewcvs is inside the lib subdir
Here the list of Sw installed:
SVN 1.3.0
Python 2.3.5
viewcvs 0.9.4 (download from tigris, because http://russ.hn.org/viewcvs is unavailable)
Have I done something wrong?
Thanks for your help
PYTHONPATH
You will need to set your
PYTHONPATHenvironment variable to include the directory in which you installed ViewCVS (or ViewVC as it is now known). The Apache set up above does this in the Apache configuration file.cannot get it to work...
While these were certainly the best instructions for installing ViewCVS with SVN on Windows, I tried it and cannot get it to work, I believe I made all the right moves, however, when testing the standalone.py, the browser return with message:
An Exception Has Occurred Python Traceback Traceback (most recent call last): File "C:\Program Files\viewcvs-1.0-dev\lib\viewcvs.py", line 3194, in main request.run_viewcvs() File "C:\Program Files\viewcvs-1.0-dev\lib\viewcvs.py", line 264, in run_viewcvs self.rootpath, rev) File "C:\Program Files\viewcvs-1.0-dev\lib\vclib\svn\__init__.py", line 322, in __init__ self.repos = repos.svn_repos_open(rootpath, self.pool) SystemError: null argument to internal routineUsing SVN 1.2.3, Python 2.3 + svn bindings, viewcvs from http://russ.hn.org/viewcvs/ (that url no longer responds) ... followed the instructions meticulously ... to no avail.
relevant viewcvs.conf lines:
Anyone any ideas?
Harry
Bindings Problem?
This looks like a problem with the Python bindings to me. Did you install the SVN 1.2.3 binaries or build them yourself?
Setup experiences and simplification
Martin, this excellent guide got me started into the right direction. Please allow me to provide some feedback:
I downloaded CVS HEAD of viewcs from Sourceforge and seem to be able to use viewcvs quite successfully on Windows XP SP2, with Apache 2.0.54 and Python 2.3.
The only issue I faced was a firewall between myself and Sourceforge, preventing direct CVS access. I "fixed" this by using CVSGrab to download the CVS repository data.
I fully realize the benefits of running using mod_python - but I am unable to find an "offical" build of mod_python for Python 2.3 and Apache 2.0.54 on Windows.
With things being as they are, I have difficulties pushing "odd" things into the direction of those who will have to support the installation (and mod_auth_sspi already stretches that!). In the end, I decided to go the CGI route, reasoning that this
This approach reduces the paragraph "ViewCVS with Apache setup" above to
Add the line
ScriptAlias /viewcvs /www/cgi/viewcvs.cgiinto the Apache httpd.conf fileHope this helps
Stefan
Answers to some problems
ViewCVS with Apache setup:
Here is a link to binaries for the 2.4 version of python:
http://www.modpython.org/pipermail/mod_python/2005-February/017486.html
and here are the other versions:
http://www.apache.org/dist/httpd/modpython/win/
Otherwise these howto's are very good, saved me a lot of time! Many thanks! /Anders H.
Python Version
The Subversion bindings only work with Python 2.3, try that version.