← Back to team overview

kicad-developers team mailing list archive

Getting kicad to work with wxPython Phoenix

 

In a recent thread
<https://lists.launchpad.net/kicad-developers/msg31700.html> on this list,
it was mentioned that kicad may need to drop support for SWIG/Python due to
wx and wxPython limitations.

Perhaps I misinterpreted what was said.
It's my perception that the kicad team doesn't see the value in a python
interface that I see
<https://kicad.mmccoo.com/2017/01/26/real-scripting-the-most-important-feature-a-tool-can-have/>.
Perhaps I'm wrong in that too

Anyway, I have a version of kicad working with wxPython 4.0 (AKA Phoenix)

A more detailed summary can be read here on my blog
<https://kicad.mmccoo.com/2017/11/23/learnings-from-moving-kicad-to-wxpython-4-0/>
and
a diff file of my changes is here:
http://mmccoo.com/random/diffs_for_phoenix


The short version: Kicad will probably want to wait to move to the Phoenix
version of wxPython.

The main issue is that the Phoenix equivalent of wx/wxPython/wxPython.h
(called from pcbnew/swig/python_scripting.h) exists, but isn't in the
releases yet. See here
<https://groups.google.com/forum/#!topic/wxpython-users/rIwPMKjQBeI>.

Beyond that, I had some difficulties ensuring that the correct wx and
wxPython versions are installed and used[1]

Once I did get it running, my kicad python scripts all work (save for the
things that broke since last time I updated kicad).





Having said all that, I don't know that there is urgency to move to
Phoenix. AFAIK, wxPython 3.0 works fine with recent wxWidgets.


Hope it's helpful.
Miles

PS - AFAIK, the patch that triggered mention of dumping python due to
wxPython still hasn't been denied or merged. :-)
https://lists.launchpad.net/kicad-developers/msg31700.html





[1] on ubuntu, unstalling wxwidget package didn't remove the wxwidgets
libraries. It's quite possible that I was just confused and/or doing it
wrong.

Follow ups