Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] SwigBinding: Add support for the Python binding with SWIG on Windows #1661

Merged
merged 10 commits into from
Mar 14, 2025

Conversation

cbentejac
Copy link
Contributor

@cbentejac cbentejac commented Feb 5, 2024

Description

This PR adds support to build the Python binding introduced in #1647 on Windows.

In particular, the required Python3 libraries are now correctly linked to the binded modules, and platform-induced differences on size_t are handled. Similarly, elements that were not initialized with the same values when using the default constructor depending on the platform are now explicitly set (e.g. Vec2 and Vec3 in Observation and Landmark objects).

The Python unit tests have also been updated to be compatible on both Linux and Windows platforms.

The binding, which used to be generated at the root folder, is now installed directly in the bin directory. The CI is updated accordingly to ensure that the Python unit tests keep on running.

Finally, the Windows CI now enables the generation of the binding and runs the Python unit tests.

@cbentejac cbentejac added windows wip work in progress labels Feb 5, 2024
@cbentejac cbentejac added this to the 3.3.0 milestone Feb 5, 2024
@cbentejac cbentejac self-assigned this Feb 5, 2024
@cbentejac cbentejac force-pushed the build/swigWindows branch 4 times, most recently from 516df8a to e33458c Compare September 30, 2024 09:43
@cbentejac cbentejac force-pushed the build/swigWindows branch 5 times, most recently from e512958 to 680b0d5 Compare March 12, 2025 10:31
@cbentejac cbentejac force-pushed the build/swigWindows branch 14 times, most recently from 199889a to ac097e9 Compare March 13, 2025 17:20
@cbentejac cbentejac force-pushed the build/swigWindows branch 4 times, most recently from 4dca4e7 to e54ea1c Compare March 13, 2025 17:33
@cbentejac cbentejac requested a review from fabiencastan March 13, 2025 19:02
@cbentejac cbentejac marked this pull request as ready for review March 13, 2025 19:02
@cbentejac cbentejac removed the wip work in progress label Mar 13, 2025
@fabiencastan
Copy link
Member

Python binding moved to "bin" folder as the behavior of python as changed in 3.8 regarding dll search and PATH, see:
https://docs.python.org/3/library/os.html#os.add_dll_directory

@cbentejac cbentejac marked this pull request as draft March 14, 2025 11:29
@cbentejac cbentejac force-pushed the build/swigWindows branch 3 times, most recently from 1799199 to 158a910 Compare March 14, 2025 11:53
@cbentejac cbentejac marked this pull request as ready for review March 14, 2025 12:07
@fabiencastan fabiencastan merged commit 94f67d9 into develop Mar 14, 2025
5 checks passed
@fabiencastan fabiencastan deleted the build/swigWindows branch March 14, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants