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

RE: Compiling python bindings (VS2012, Windows 7)

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 9 Oct 2014 16:49:55 +0200

> -----Original Message-----
> From: Cooke, Mark [mailto:mark.cooke_at_siemens.com]
> Sent: donderdag 9 oktober 2014 14:32
> To: users_at_subversion.apache.org
> Subject: Compiling python bindings (VS2012, Windows 7)
>
> Dear list,
>
> I thought I had subversion compiled OK, all the tests appear to be
passing,
> but when I went looking for the python bindings they were missing.
Looking
> at the VS2012 solution file, the __SWIG_PYTHON__ project seems to be
> empty and does nothing when rebuilt.
>
> So I have re-built the following [Libraries > Swig] projects:
> - libsvn_swig_py
> - swig_python_core
> - swig_python_client
> - swig_python_delta
> - swig_python_diff
> - swig_python_fs
> - swig_python_ra
> - swig_python_repos
> - swig_python_wc
>
> All appear to build OK (although with plenty of warnings) and I end up
with a
> collection of pyd files in
> D:\svn\src\Release\subversion\bindings\swig\python
> ...plus
> D:\svn\src\Release\subversion\bindings\swig\python\libsvn_swig_py\libsvn
> _swig_py-1.dll
>
> I copied the files following the instructions here:
>
> [1] http://www.lejordet.com/2009/03/compiling-subversion-python-
> bindings-on-windows/
>
> ...creating `svn` and `libsvn` folders, then copied those to my python
install
> [Lib\site-packages].
>
> However, I still get the dreaded "ImportError: DLL load failed: The
specified
> module could not be found."
>
> I tried copying the three APR DLLs to libsvn in case but that does not
seem to
> have helped.
>
> Should I compile subversion with the "--disable-shared" option?
>
> Or, there is a comment at [1] concerning the _USE_32BIT_TIME_T
> preprocessor definition for APR and Swig, is this still an issue for
subversion
> 1.8.10 builds?
>
> Thanks for any pointers...

On the buildbot I use two scripts for running the python tests:

For trunk/1.9 I use:
################
python win-tests.py -r -f fsfs --swig=python "%TESTDIR%\tests"
(The actual script is in win-tests.py)

For older versions:
################
    IF EXIST "%TESTDIR%\swig" rmdir /s /q "%TESTDIR%\swig"
    mkdir "%TESTDIR%\swig\py-release\libsvn"
    mkdir "%TESTDIR%\swig\py-release\svn"

    xcopy "release\subversion\bindings\swig\python\*.pyd"
"%TESTDIR%\swig\py-release\libsvn\*.pyd" > nul:
    xcopy "release\subversion\bindings\swig\python\libsvn_swig_py\*.dll"
"%TESTDIR%\swig\py-release\libsvn\*.dll" > nul:
    xcopy "subversion\bindings\swig\python\*.py"
"%TESTDIR%\swig\py-release\libsvn\*.py" > nul:
    xcopy "subversion\bindings\swig\python\svn\*.py"
"%TESTDIR%\swig\py-release\svn\*.py" > nul:

    SET PYTHONPATH=%TESTDIR%\swig\py-release

    python subversion\bindings\swig\python\tests\run_all.py

I'm not sure if this really follows recommended practice, but it does allow
me to run the python tests on Windows as a non admin.

        Bert
Received on 2014-10-09 16:50:25 CEST

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.