← Back to team overview

kicad-developers team mailing list archive

Re: boost.python


DELIZY Florian a écrit :

> Hello,
> In order to compile Kicad on Mingw with support of Python, somebody
> can give me a pointer of how to install boost.python (only for this
> purpose).
That's right you have to install both boost.python and wxpython to run
the python support ...

I can't help you for installing it under windows though ... I am only
building it under Linux. JP. Charras told me to have done so, maybe you
can get some info there...

Assuming you have installed mingw, mys, python and boost you must:
1 - build bjam which is a tool used to build boost
2 - build boost.

1 - Building bjam:
bjam is in boost\tools\build\jam_src.
The script used to build bjam is build.bat, in window command interpreter format (cmd.exe)
- run cmd
- go to boost\tools\build\jam_src
- run build.bat with the correct parameter: build.bat mingw
- the build process creates bin.ntx86\bjam.exe. copy it in boost\tools\build\jam_src.
- quit cmd.

2 - build boost:
after bjam.exe was created in boost\tools\build\jam_src:
run mys and goto boost.
run configure with the correct parameters like:
./configure --with-python-root=/c/python25 --with-python-version=2.5)
run make.

But the main problem is with Python itself:
Python under Windows is compiled with microsof C compiler, and has no makefile for mingw. when you want add a binding to python, the binding MUST be compiled with the same compiler.

Because boost, wxPython and kicad are compiled with mingw there is a big problem.

It seems possible to convert the python dlls and python configuration in order to add mingw compiled extensions,
but yet, i do not make it.
So i was not able to install the entire wxPython tool cahin.

Here is the scripts I have used to build and install wxPython extensions:

in wxPython-2.8.3/wxPython: (now, you can use wxPython 2.8.4 )

build wxPython extensions:
export WXWIN=/f/wxPython-2.8.3/
/c/Python25/python setup.py build_ext -c mingw32 --inplace MONOLITHIC=1 UNICODE=1 HYBRID=0 FINAL=1 WX_CONFIG=$WXWIN/wx-config

install python extensions (does not work because Python distribution is compiled with MSWC)

export WXWIN=/f/wxPython-2.8.3/
/c/Python25/python setup.py install

Good luck ...

Jean-Pierre CHARRAS
Maître de conférences
Directeur d'études 2ieme année.
Génie Electrique et Informatique Industrielle 2
Institut Universitaire de Technologie 1 de Grenoble
BP 67, 38402 St Martin d'Heres Cedex

Recherche :
Grenoble Image Parole Signal Automatique (GIPSA - INPG)
46, Avenue Félix Viallet
38031 Grenoble Cedex

Follow ups