← Back to team overview

kicad-developers team mailing list archive

Re: Python scripting cmake build macros.

 

Hi Guys,

Sorry I'm late to the party, I've been doing wedding stuff for a while.
It'll continue for the next few months.

I tried the MinGW python to build wxPython, but it falls over instantly
because there's no binascii package. I fear that the base packages all need
to be built with this python first before the wxPython can be built with
it. It is probably worth noting to anyone desperate that the multiple crt
problem is only apparent for Python V2.6 and greater. Python 2.5 does not
suffer this problem apparently.

Another problem is that GLCANVAS is not currently supported by wxPython.
But I expect that just means that scripting will not have access to a 3D
canvas?

On another note, whilst building with a standard python install I get the
following error:

Traceback (most recent call last):
  File
"C:/kicad-winbuilder-dev/kicad-winbuilder/src/kicad/pcbnew/../scripting/fixswigimports.py",
line 26, in <module>
    f = open(filename,"rb")
IOError: [Errno 2] No such file or directory:
'C:/kicad-winbuilder-dev/kicad-winbuilder/build/release/pcbnew/pcbnew.py'
mingw32-make[2]: *** [pcbnew/CMakeFiles/FixSwigImportsScripting] Error 1
mingw32-make[1]: *** [pcbnew/CMakeFiles/FixSwigImportsScripting.dir/all]
Error 2
mingw32-make[1]: *** Waiting for unfinished jobs....
mingw32-make: *** [all] Error 2

Best Regards, Brian.

On 20 January 2013 20:55, Wayne Stambaugh <stambaughw@xxxxxxxxxxx> wrote:

> On 1/20/2013 2:08 PM, Miguel Angel Ajo Pelayo wrote:
> > Argh, no need to apologize Wayne, I hope they can recover your system
> > and provide you with something that works in an stable way.
> >
> > I really hate when those things happen, 4-5 years ago I had a problem
> like
> > this with a couple of laptops, after some time we suspected of power
> surges
> > in the electrical line, because some more little things died around, and
> > I was
> > astonished with the fact that the power adapter (2 different models)
> > didn't kill those surges properly, which surprisingly only killed the
> > hard-disks ...
> >
> > I wish you good luck with the repair.
> >
> > for the time being, I've been able to build a couple of packages:
> >
> > http://dev.kicad-pcb.org/pkgs/Python-2.7.1-mingw32.tar.gz
> > http://dev.kicad-pcb.org/pkgs/Python-2.7.1-mingw32-builder.tar.gz  <--
> > those are my cross build scripts at the moment that expect some files in
> > "archive" directory.
>
> I'll download them and take a look at them.  I'm using my laptop right
> now which is way to slow to be building really big projects like Python.
>  By the time I get them built, my desktop will be back from HP's repair
> department.
>
> >
> > The python-2.7.1 we've built runs for win32, and I'm installing it to
> > C:\Python, but could go other places
>
> The binary archive is a good start but most Window's users will expect
> an installer.  I didn't see any CPack stuff in the CMake files used to
> build Python so there will be a lot of work to do in that regard.
>
> >
> > It's important to set those vars before execution:
> >
> > set PYTHONHOME=C:\Python
> > set PYTHONPATH=C:\Python\lib\python2.7;C:\Python\pyd
> >
> >
> > And it also provides include files and .a libs
>
> These are key to building other extensions.
>
> >
> > It took me ages to figure that I had missaplied one of the patches (the
> > 05 one, that needed patch -p1 instead of -p0) and didn't let me build
> > the .dll version for win32.
> >
> > Also "CRYPT" and "PYEXPAT" packages are disabled now for a lack of
> > libraries.
>
> I'm pretty sure libexpat builds on MinGW.  There is an expat package
> available for MinGW.  I'm not sure about the crypt library.
>
> >
> > This killed all my spare time from the last email on the topic, which
> > it's been a lot more than expected.
>
> I'm not surprised, these things always end up taking more time than I
> think they will.  Thank you for all of you efforts.
>
> Wayne
>
> >
> > I'm afraid that I'll need to ask for a lot of help if we really want to
> > build a set of shiny packages.
> >
> > My next step is trying to compile the wxpython + kicad with this python
> > binary package, but I will wait until you can recover your data, may be
> > others are happy trying our shiny mingw-win32 python package :-)
> >
> > Greetings, Mike
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 2013/1/20 Wayne Stambaugh <stambaughw@xxxxxxxxxxx
> > <mailto:stambaughw@xxxxxxxxxxx>>
> >
> >     On 1/16/2013 12:56 PM, Wayne Stambaugh wrote:
> >     > On 1/16/2013 12:16 PM, Miguel Angel Ajo Pelayo wrote:
> >     >> Other option we could have right now is compile out the wxpython
> >     support and provide
> >     >> only embedded python scripting + python pcbnew module for windows
> >     users.
> >     >>
> >     >> In that case, next functionalities are lost:
> >     >>
> >     >> 1) PyCrust shell inside pcbnew
> >     >> 2) Ability to create and run own wx-uis in the embedded python
> >     scripting.
> >     >>
> >     >> And we keep:
> >     >>
> >     >> 3) pcbnew module for commandline python scripting
> >     >> 4) embedded pcbnew wizards & plugins
> >     >>
> >     >> Wayne, could you document the steps you followed until now so I
> >     can try to reproduce it and fight a little bit in this war ?
> >     >
> >     > Please see my response to Adam.  I'll add the Pthon command line
> >     > scripting build instructions for Windows using MinGW to
> >     > Documentation/compiling/COMPILING.txt in my next commit.
> >
> >     Bad news Miguel.  I was almost ready to commit this when my home
> system,
> >     which I just got back from HP's warranty repair service the week
> before
> >     Christmas, died again.  I've already contacted HP service but it will
> >     likely be at least a week before I get my system back.  Needless to
> say
> >     I am not happy.  This will be the third time (one disk drive and one
> >     motherboard) the system has had problems since I bought it.  I
> apologize
> >     for the delay.  As soon as I get my system back, I'll get this
> >     committed.
> >
> >     Wayne
> >
> >     >
> >     >>
> >     >>
> >     >> Miguel Angel Ajo
> >     >> http://www.nbee.es
> >     >> +34911407752 <tel:%2B34911407752>
> >     >> skype: ajoajoajo
> >     >>
> >
> >     <<<snipped>>>
> >
> >
> >
> >
> > --
> >
> > Miguel Angel Ajo Pelayo
> > http://www.nbee.es
> > +34 636 52 25 69
> > skype: ajoajoajo
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References