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

Running Python bindings tests on Windows?

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2006-12-20 08:12:18 CET


As I mentioned in http://svn.haxx.se/users/archive-2006-12/0510.shtml
I'm going to try to get the Ruby bindings to build on windows. To
validate that I've got everything configured correctly, I want to
build the bindings for Python and Perl first.

I'm using VC6 SP6, SWIG 1.3.24. The batch file I'm using to build and
install the Python bindings is below. I suspect I'm not installing
correctly the bindings correctly, Since when I try to run the
bindings tests I get:

D:\SVN\src-trunk\subversion\bindings\swig\python>python tests\run_all.py
Traceback (most recent call last):
  File "tests\run_all.py", line 2, in ?
    import client, delta, pool, ra, wc, repository, trac.versioncontrol.tests
  File "D:\SVN\src-trunk\subversion\bindings\swig\python\tests\repository.py",
line 3, in ?
    import _core
ImportError: No module named _core

but I don't use Python day-to-day. Any suggestions?

Attached is the output of running the batch file.

Thanks, Joe

<batch file>

call %~dp0sub-setup-environment
if not %errorlevel% == 0 exit/b %errorlevel%

echo ===%time%=== Build Subversion Python bindings
pushd %DRIVE%:\SVN\src-%DIR%
msdev subversion_msvc.dsw /USEENV /MAKE "__SWIG_PYTHON__ - Win32 Release"
if not %errorlevel% == 0 exit/b %errorlevel%

echo ===%time%=== Install Subversion Python bindings
rem For Python, create two folders:
rem <PYTHON>\Lib\site-packages\svn
rem <PYTHON>\Lib\site-packages\libsvn
rem Copy subversion\bindings\swig\python\svn\*.py into the svn folder.
rem Copy subversion\bindings\swig\python\*.py and
rem Release\subversion\bindings\swig\python\*.dll into the libsvn folder.
for %%i in (%PYTHONDIR%\Lib\site-packages\svn
%PYTHONDIR%\Lib\site-packages\libsvn) do if EXIST %%i rd /q/s %%i
XCopy D:\SVN\src-%DIR%\subversion\bindings\swig\python\svn\*.py
XCopy D:\SVN\src-%DIR%\subversion\bindings\swig\python\*.py
XCopy D:\SVN\src-%DIR%\Release\subversion\bindings\swig\python\*.dll
REM This one isn't in the INSTALL file
XCopy D:\SVN\src-%DIR%\Release\subversion\bindings\swig\python\libsvn_swig_py\*.dll

echo ===%time%=== Test Subversion Python bindings
rem check-swig-py: swig-py
rem cd $(SWIG_PY_DIR); \
rem $(PYTHON) $(SWIG_PY_SRC_DIR)/tests/run_all.py
pushd %DRIVE%:\SVN\src-%DIR%\subversion\bindings\swig\python
python tests\run_all.py

exit /b 0

echo Must have Defined PYTHONDIR
exit /b 1

</batch file>

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

Received on Wed Dec 20 08:12:59 2006

This is an archived mail posted to the Subversion Users mailing list.