bgneal@4
|
1 Upgrading Trac on Windows Gotcha - Part 2
|
bgneal@4
|
2 #########################################
|
bgneal@4
|
3
|
bgneal@4
|
4 :date: 2012-03-21 20:10
|
bgneal@4
|
5 :tags: Python, Trac, Subversion, Windows
|
bgneal@4
|
6 :slug: upgrading-trac-on-windows-gotcha-part-2
|
bgneal@4
|
7 :author: Brian Neal
|
bgneal@4
|
8
|
bgneal@4
|
9 I have `previously reported`_ on some problems I had when upgrading our Trac_
|
bgneal@4
|
10 install at work. Today I attempted another upgrade to Subversion_ 1.7.4 and Trac
|
bgneal@4
|
11 0.12.3 on Windows. I upgraded to Python_ 2.7.2 along the way. I ran into another
|
bgneal@4
|
12 problem with the Python bindings to Subversion which took a while to figure out.
|
bgneal@4
|
13 I had no problems upgrading Subversion, but Trac could not see our repository.
|
bgneal@4
|
14 The symptoms were that the Trac "timeline" and "browse source" features were
|
bgneal@4
|
15 missing.
|
bgneal@4
|
16
|
bgneal@4
|
17 Following the `Trac troubleshooting advice`_, I opened an interactive Python
|
bgneal@4
|
18 session and tried this:
|
bgneal@4
|
19
|
bgneal@4
|
20 ::
|
bgneal@4
|
21
|
bgneal@4
|
22 E:\Trac_Data>python
|
bgneal@4
|
23 Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win
|
bgneal@4
|
24 32
|
bgneal@4
|
25 Type "help", "copyright", "credits" or "license" for more information.
|
bgneal@4
|
26 >>> from svn import client
|
bgneal@4
|
27 Traceback (most recent call last):
|
bgneal@4
|
28 File "<stdin>", line 1, in <module>
|
bgneal@4
|
29 File "C:\Python27\lib\site-packages\svn\client.py", line 26, in <module>
|
bgneal@4
|
30 from libsvn.client import *
|
bgneal@4
|
31 File "C:\Python27\lib\site-packages\libsvn\client.py", line 25, in <module>
|
bgneal@4
|
32 _client = swig_import_helper()
|
bgneal@4
|
33 File "C:\Python27\lib\site-packages\libsvn\client.py", line 21, in swig_import
|
bgneal@4
|
34 _helper
|
bgneal@4
|
35 _mod = imp.load_module('_client', fp, pathname, description)
|
bgneal@4
|
36 ImportError: DLL load failed: The operating system cannot run %1
|
bgneal@4
|
37
|
bgneal@4
|
38 After some head scratching and googling I finally found the problem. I had used
|
bgneal@4
|
39 the Windows .msi installer, `graciously provided by Alagazam`_, aka David Darj,
|
bgneal@4
|
40 to install Subversion. This placed the Subversion binaries and DLL's in
|
bgneal@4
|
41 ``C:\Program Files\Subversion\bin``. I then unzipped the Python 2.7 bindings to
|
bgneal@4
|
42 the ``C:\Python27\Lib\site-packages`` folder. The bindings depend on the DLL's
|
bgneal@4
|
43 in the ``Subversion\bin`` folder. But unfortunately for me, there were already
|
bgneal@4
|
44 two older versions of the DLL's, ``libeay32.dll`` and ``ssleay32.dll`` on my
|
bgneal@4
|
45 path. So when the bindings went looking for those two DLL's, instead of finding
|
bgneal@4
|
46 them in ``Subversion\bin``, it found the older versions somewhere else.
|
bgneal@4
|
47
|
bgneal@4
|
48 To fix this, you can either rearrange your path, or copy those two DLL's to your
|
bgneal@4
|
49 ``Python27\Lib\site-packages\libsvn`` folder. In the future, I am going to just
|
bgneal@4
|
50 copy all the DLL's from ``Subversion\bin`` to the ``libsvn`` folder.
|
bgneal@4
|
51
|
bgneal@4
|
52 I examined the pre-built Subversion packages from Bitnami_ and CollabNet_. They
|
bgneal@4
|
53 had packaged all of the Subversion DLL's with the Python bindings together in
|
bgneal@4
|
54 the same directory, so this seems reasonable. Later, on the Subversion users'
|
bgneal@4
|
55 mailing list, Alagazam gave the nod to this approach.
|
bgneal@4
|
56
|
bgneal@4
|
57 A big thank you to Alagazam for the help and for the Windows binaries. And of
|
bgneal@4
|
58 course thanks to the Apache_, Subversion_, Trac_, & Python_ teams for making
|
bgneal@4
|
59 great tools.
|
bgneal@4
|
60
|
bgneal@4
|
61 .. _previously reported: /2011/09/12/upgrading-trac-on-windows-gotchas
|
bgneal@4
|
62 .. _Trac: http://trac.edgewall.org/
|
bgneal@4
|
63 .. _Subversion: http://subversion.apache.org/
|
bgneal@4
|
64 .. _Trac troubleshooting advice: http://trac.edgewall.org/wiki/TracSubversion#Checklist
|
bgneal@4
|
65 .. _graciously provided by Alagazam: http://sourceforge.net/projects/win32svn/
|
bgneal@4
|
66 .. _Bitnami: http://bitnami.org/
|
bgneal@4
|
67 .. _CollabNet: http://www.collab.net/
|
bgneal@4
|
68 .. _Python: http://www.python.org/
|
bgneal@4
|
69 .. _Apache: http://subversion.apache.org/
|