← Back to team overview

kicad-developers team mailing list archive

Re: Python scripting cmake build macros.

 

On 14/01/2013, at 23:05, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:

> 
> On Jan 14, 2013 3:59 PM, "Wayne Stambaugh" <stambaughw@xxxxxxxxxxx> wrote:
> >
> > On 1/14/2013 3:12 AM, Miguel Angel Ajo Pelayo wrote:
> > > It's two different problems,
> > >
> > > 1) the fixswigimports.py fix the way swig (inside pcbnew.py) loads
> > > pcbnew.so/pyd <http://pcbnew.so/pyd> internally, the swig generated .py
> > > has problems to support "internal" (inside your own program) object
> > > bindings. It's documented, but not widespread used. We fix it to make it
> > > work in both cases, when doing "import pcbnew" from inside an
> > > scripting-pcbnew  and when doing import pcbnew from
> > > standalone/commandline python.
> > >
> > > 2) At the time we started with scripting, I raised some discussion about
> > > this topic, and thought that python2.x has more widespread library
> > > support (compared to python 3 advantages).
> >
> > I'll take a look at it and see if I can make the KiCad scripting work on
> > Python 2 & 3.  I may have to write some creative CMake code to get it to
> > work but it should be possible.
> >
> > I have a quick question regarding the KICAD_SCRIPTIN_WXPYTHON option.
> > When this option is enabled, is wxPython.h included in any of the SWIG
> > generated code.  I did quick grep of the scripting folders and didn't
> > see wxPython.h included anywhere so the only other place I can think
> > that it would end up is in the SWIG generated code.  If it's not, that
> > will make life a whole lot easier.  If it is, building wxPython on
> > Windows to install the development files is proving to be painful.
> 
> 
> We talked about providing prebuilt [wx] python binaries.
> 

I think we talked about providing python binaries because the .pyd compiled in gcc
wouldn't be compatible with mainstream python (compiled in MSVC) or some similar problem.

But I think it definitely needed to provide wxpython with the full set, or we are loosing a lot
of functionality/scripting power.

I'm trying to make it work at OSX, and I managed to do it, but now I'm trying to find
a way to pack it all together (libraries + exe) or build it all statically (as Marco Serantoni recommended me),
but I'm yet a little bit lost in OSX.




References