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