kicad-developers team mailing list archive
Mailing list archive
Re: Python-a-mingw-us Windows Debug Scripting Builds
> Can the Python-a-mingw-us build script be used to build a local version
> of Python to use as part of KiCad similar to what some of the other
> projects (Blender, FreeCAD, Bazaar, etc.) provide for their Windows
> builds? I've been wanting to give it a try without have to remove my
> existing Python installation. By the way, thank you for a heck of
> effort. When I originally looked at this I knew it was going to more
> time than I could handle.
This is exactly how it's done right now with KiCad-Winbuilder, except it
does not build locally. KiCad-Winbuilder downloads the zip and "installs"
Python-a-mingw-us locally. When KiCad is built, the executables are
arranged locally in the standard install format (i.e. kicad/bin kicad/doc
kicad/share, etc.). Python-a-mingw-us is copied to kicad/bin, and
PYTHONHOME is set to kicad/bin.
You can install Python-a-mingw-us alongside Python without a problem.
Generally it is recommended to install in the default location of
c:\python\2.7.4 - this means you do not need to supply a PYTHON_ROOT_DIR
setting for the CMake scripts that want to use it. The modified
FindPython*.cmake modules are included in the KiCad source.
To switch between python versions you need to control your PATH environment
variable so the Python-a-mingw-us python is visible first. Then you can set
PYTHONHOME to the path of python. I have both Python and Python-a-mingw-us
installed. Python-a-mingw-us doesn't touch the registry, it just copies
files into your chosen path. You can simply grab the zip and extract.
The Python-a-mingw-us installer doesn't currently set PYTHONHOME. There is
a new installer to release, which I will do soon once I've got a debug
build sorted out. Then there'll also be a source archive too so you can
debug Python-a-mingw-us with source. You can set a source file path replace
rule in GDB so that the source file references work wherever you've
extracted the source.