You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mike Cowperthwaite <mi...@lathropengineering.com> on 2008/11/11 18:17:43 UTC

Problems with python 2.5 bindings on Windows

This is following up to a thread from August:

Dominik Guder <os...@guder.org> wrote:
>> Miha Vitorovic wrote:
>> I'm having problems with python bindings on windows box. I used to have
>> Python 2.3 and it worked like a charm, but now I upgraded to Python 2.5,
>> since only this version is pre-compiled for Windows.
>>    [snip]
>> I even tried to add C:\Program Files\Python25\Lib\site-packages\libsvn to
>> PythonPath (some things that I read on the Internet seemed to hint this
>> might solve the problems), but still no luck.
>>
>> All I'm trying to do is get the ViewVC to work.
>>
>> Can someone with more Python experience please help?
>
> starting from 2.5 (I think) python don't load *.dlls by default they must be
> renamed to *.pyd.
> I use following solution:
> - Open a command shell
> - Goto your libsvn dir (C:\Program Files\Python25\Lib\site-packages\libsvn)
> - rename *.dll to *.pyd:  for %i in (*.dll) do copy %i %~dpni.pyd
>
> IMHO this should be taken into account by the python 2.5 build script.

I need the python bindings in order to run the Trac system.  When I went 
to install the python bindings for svn 1.5.1, there was an executable 
that I found (from a link at the Trac site, searching at tigris doesn't 
work very well) at this page:
   http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
That executable did whatever it needed to do, correctly; I didn't have 
to futz with this to make things work.

That page now has an executable for the 1.5.3 bindings, but only a ZIP 
file for the 1.5.4 bindings, which is what I want.  I extracted the 
ZIP's svn and libsvn folders into the site-packages folder, and tried 
restarting Trac -- which reported "Can't synchronize with the 
repository."  I found the hint above, renamed the DLLs, restarted Trac, 
same error.

The 1.5.1 installer had placed the DLLs with names mapping to the Python 
file names (_client, _core, _delta, _fs, _ra, _repos, _wc) all named as 
PYDs.  libsvn_swig_py-1.dll was left as a DLL.

In addition, several other DLLs were placed in the libsvn folder which 
aren't included in the 1.5.4 ZIP file, presumably because they're 
Subversion DLLs that were copied by the earlier installer.  With svn 
1.5.4, the names of these DLLs have largely changed to get a "-1" 
suffix, but I copied them over anyway, having no other idea how to 
proceed.  The one DLL from the 1.5.1 installation that doesn't appear in 
either the bindings ZIP or in the Subversion binaries is "intl3_svn.dll" 
but the ZIP file points to a version (0.14.1.1519) on tigris which 
apparently hasn't changed for a while.

So now my 1.5.4 libsvn folder has the same basic contents as the 1.5.1 
version created by the installer, and I still can't get Trac to run. 
When I try the     import svn.repos     statement that Miha described in 
his original message, I get essentially the same error: specified module 
could not be found.

Is there some reason why the Subversion project is posting the .ZIP 
instead of the installer .EXE that worked so nicely?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Problems with python 2.5 bindings on Windows

Posted by "D.J. Heap" <dj...@gmail.com>.
On Tue, Nov 11, 2008 at 11:17 AM, Mike Cowperthwaite
<mi...@lathropengineering.com> wrote:
[snip]
>
> Is there some reason why the Subversion project is posting the .ZIP instead
> of the installer .EXE that worked so nicely?


No, it was unintentional and should be remedied this weekend when I
have time.  The python bindings installer is rather a pain to create,
though, consisting of several manual steps (collecting files, renaming
dll's, executing the python script).  It would be very nice if someone
could incorporate those steps into the Windows 'make_dist.py'
packaging process (as I have been meaning to do for a long time now).

The python bindings packaging process is basically written up at:

http://svn.collab.net/repos/svn/trunk/packages/python-windows

Although I think it is somewhat out of date (doesn't mention all the
Subversion dll's that are new with 1.5).

DJ

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org