← Back to team overview

kicad-developers team mailing list archive

Re: Python scripting cmake build macros.

 

Hey,

Thanks very much, definitely the right thing! ;-) and not long now!

Okay, I'll compile wxPython without GLCANVAS support then. GLCANVAS is used
by the current 3D viewer.

There is no pcbnew.py generated and I see no evidence of it trying to be
done. I will try with mingw32-make on a single process and I have seen
problems with that in the past (wxWidgets doesn't build with more than one
process! :( ).

SWIG is found as during configuration I get:
-- Found SWIG:
C:/kicad-winbuilder-dev/kicad-winbuilder/env/swig/swigwin-2.0.9/swig.exe
(found version "2.0.9")

I'll investigate some more tomorrow as I've just run out of time. Thanks
for all of your efforts to get this working on Windows!

Best Regards, Brian.



On 21 January 2013 21:27, Miguel Angel Ajo Pelayo <miguelangel@xxxxxxx>wrote:

> Hi Brian!!,
>
> On 21/01/2013, at 20:28, Brian Sidebotham <brian.sidebotham@xxxxxxxxx>
> wrote:
>
> 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.
>
>
> Hehehe, are you sure of what you're doing? (just joking, congratulations
> if I didn't already) ;)
>
> 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.
>
>
> Whoops, ok, binascii needed, yes I suppose that we will need packages here
> and there but eventually it must work.
>
> 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?
>
>
> Yes, that only means that the python side won't have access to the 3D
> canvas, but wx must be compiled with it enabled.
> GLCANVAS is used at the moment or in the GAL?, I've used 3D + wxpython in
> linux, for sure.
>
> 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
>
>
> Hmm, that .py is looking for the swig generated pcbnew.py file, to fix the
> way it imports. There is no "pcbnew.py" generated?
> is swig executed before that? (the result must be the .cxx/.cpp wrapper
> and the pcbnew.py
>
>
> 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
>>
>
>
>

References