← Back to team overview

kicad-developers team mailing list archive

Python scripting cmake build macros.


I've been attempting to resolve my Python scripting build issues on MinGW32 on Windows and I have a few questions for the folks who wrote the cmake build code. Why are we not using cmake's FindPythonInterp() instead of specifying the python executable on the path? Specifying the Python interpreter on the command line at build time seems unnecessary to me. CMake's FindPythonInterp supports defining a a specific version of Python by defining Python_ADDITIONAL_VERSIONS. I'm guessing we would want to do that because python2 is currently defined as the default Python interpreter so I'm also assuming that the scripting code generated does not work with Python3.

There is also a link bug on MinGW because rt is defined as one of the link libraries in SWIG_LINK_LIBRARIES. Actually, someone attempted to fix it by adding and conditional statement to only add rt on Linux but they forgot to take it out of the original list.

For future reference the indentation level for CMake files is 4 spaces and CMake statements should be lower case.

If no one objects, I will fix these issues which should make the Python scripting builds more reliable.

Thank you for all your efforts in bringing scripting to KiCad.


Follow ups