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. > > * build/cmake/Findpy3c.cmake: New CMake module for the py3c library. > * build/generator/templates/targets.cmake.ezt > (swig.python): Add -nofastunpack option to Python SWIG compilation using > SWIG_COMPILE_OPTIONS target property. > * CMakeLists.txt > (python dependency): Rework finding of the package to request the > Development.Embed component if it is required by Python SWIG bindings. > (external-python): aAdd finding of py3c library, create the target with > correct include directories and link it against found py3c library. > > Added: > subversion/branches/cmake/build/cmake/Findpy3c.cmake > Modified: > subversion/branches/cmake/CMakeLists.txt > subversion/branches/cmake/build/generator/templates/targets.cmake.ezt [cut]
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