On 2024/08/09 6:41, Timofei Zhakov wrote: > On Thu, Aug 8, 2024 at 9:44 PM <rin...@apache.org> wrote: >> >> Author: rinrab >> Date: Thu Aug 8 18:44:01 2024 >> New Revision: 1919757 >> >> URL: http://svn.apache.org/viewvc?rev=1919757&view=rev >> Log: >> On the 'cmake' branch: Finally, support compilation of Python SWIG bindings. >> ... > > Hi, > > Since this revision, the minimal SWIG bindings into Python can be > successfully built. I didn't run any test program with the bindings > compiled, but I think they should work, possibly requiring a few > little fixes. I'd appreciate any help related to the bindings. > Additionally, I will implement the compilation of the SWIG for Perl > and Ruby soon (I had experimented with them in my working copy > already, but didn't finish yet). > > Little note about compilation of the bindings: Currently, it's > required to run the following commands before the build: > > $ python .\build\generator\swig\external_runtime.py .\build.conf swig python > $ python .\build\generator\swig\header_wrappers.py .\build.conf swig > > Otherwise, there will be a failure due to missing include files. In > the feature these commands will be executed from somewhere else > automatically. Also don't forget to enable the SVN_ENABLE_SWIG_PYTHON > option. > > Thanks! > > -- > Timofei Zhakov
I tried to build Python bindings and the building is done successfully. However, I have two questions. 1. *.pyd files are generated with "_python_<name>.pyd" named if building using cmake. I think we must keep the file naming if no reasons between ./configure and gen-make.py with/without cmake. Why? [[[ --- "trunk-py312\\subversion\\bindings\\swig\\python\\core.py" 2024-08-13 11:00:06.402495600 +0900 +++ "cmake-py312\\out\\core.py" 2024-08-13 11:09:02.361319300 +0900 @@ -27,7 +27,7 @@ _dll_paths = _dll_paths() try: - from . import _core + from . import _python_core finally: _dll_path = None for _dll_path in _dll_paths: ... ]]] 2. I run build and install using cmake, however Python bindings are not installed (libsvn_swig_py*.dll is installed but *.py and *.pyd files not). C> cmake -B %CD:\=/%/out -D CMAKE_INSTALL_PREFIX=%CD:\=/%/dist ... C> cmake --build %CD:\=/%/out --target install ... -- Jun Omae <jun6...@gmail.com> (大前 潤)