← Back to team overview

kicad-developers team mailing list archive

Re: Win32 compilation for kicad scripting

 

I think you're right Mike, it isn't the best place. For developers'
use we could add some cmake code to find where Python modules are
installed (probably some standard path on linux but anything on
chaotic windows...).

Regarding users' experience, this should be hidden in the installer
package. On Linux Python is IIRC always present and available. Binary
package install recipe (or how is it called) should take care of
proper installation. On Windows this is not so simple. Python is often
part of several installed applications but is not installed system
wide and usually every application installs it on its own. So I think
that some minimal form of Python could be included in KiCad installer.
This would simplify our position because (at least on Windows) we
could be sure where to put all the files.

Regarding the example scripts, I 100% agree with you. Adding command
line file name passing is an elegant and (hopefully :) platform
independent solution.

Nice enhancement to the footprint wizard, Mike! Thanks!

Adam

On Sun, Jul 22, 2012 at 11:58 PM, Miguel Angel Ajo Pelayo
<miguelangel@xxxxxxx> wrote:
> Hi Adam,
>
>     but <kicad_path>\lib\python\dist-packages doesn't seem like
> the best place, right?, may be we should be able to discover where
> python2.7 is installed, or may be just provide it within kicad Win32
> installation, if it isn't too big :)
>
>
>     About the OS differences for the examples, may be it could make
> sense to just forget about /tmp or C:\TEMP and let the user provide
> the output filename with sys.argv to keep the examples as simple as
> possible.
>
>     I will fix those examples to avoid any problem with that.
>
>
>
> 2012/7/22 Adam Vašíček <vasiceka@xxxxxxxxx>:
>> Hi Mike,
>>
>> yes, now the _pcbnew.pyd is copied to
>> <kiad_path>\lib\python\dist-packages by cmake.
>>
>> In order to get example scripts to run on Windows properly, platform
>> differences should be taken into account (see attached diff for
>> createPcb.py example script).
>>
>> Thanks for your valuable work Mike!
>> Adam
>>
>> On Sun, Jul 22, 2012 at 2:25 PM, Miguel Angel Ajo Pelayo
>> <miguelangel@xxxxxxx> wrote:
>>> I've added a couple of fixes by Adam Vašíček that might get the
>>> scripting part compiling
>>> into WIN32 targets,
>>>
>>> http://bazaar.launchpad.net/~kicad-testing-committers/kicad/testing/revision/3656
>>>
>>> He told me that he managed to get it compiled with:
>>>
>>> * compiler GCC (mingw32-gcc) version 4.5.2
>>> * Python 2.7.3
>>> * SWIG 2.0.7
>>>
>>> I'm not sure if the _pcbnew.pyd will get installed in the right place.
>>>
>>> --
>>>
>>> Miguel Angel Ajo Pelayo
>>> http://www.nbee.es
>>> +34 636 52 25 69
>>> skype: ajoajoajo
>
>
>
> --
>
> Miguel Angel Ajo Pelayo
> http://www.nbee.es
> +34 636 52 25 69
> skype: ajoajoajo


Follow ups

References