AprilRobotics / apriltag

AprilTag is a visual fiducial system popular for robotics research.
https://april.eecs.umich.edu/software/apriltag
Other
1.47k stars 522 forks source link

enable Python bindings for Windows and macOS #311

Closed christian-rauch closed 5 months ago

christian-rauch commented 5 months ago

The FindPythonLibs module has been deprecated since CMake 3.12. The newer FindPython provides a better and more portable way to build Python modules without the need for a dedicated script to determine the system configuration. This allows us now to build the Python bindings on Windows and macOS. This PR also changes the install path for the resulting Python module from the "user site" to something determined by the given CMake install path. This allows us to properly install the Python bindings when distributing binary packages.

Addresses https://github.com/AprilRobotics/apriltag/issues/267#issuecomment-1335871722.

christian-rauch commented 5 months ago

@mkrogius @wxmerkt In order to make the Python bindings usable for binary distributed packages and other OSes, the "breaking change" in this PR is the install location for the Python module. I assume you are ok with this, as the new install location is the proper path determined from the CMake install path.

mkrogius commented 5 months ago

For sure!