← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] get initial Python 3 support

 

Hi Nick!
As a python plugin writer, I am starting to get bug reports from ubuntu 18.04 users, as with 5.1 supporting GTK3 they've finally managed to run python plugins.More than half a year ago, you've made a Kicad python3 windows installer with WXPYTHON disabled. At that time this enabled me to test the business logic of my plugins. 

I would really appreciate if you could make a 5.1 windows installer with python3 support and WXPYTHON disabled. But if you are tight on time, I can totally understand.
Best regards, Mitja

      From: Nick Østergaard <oe.nick@xxxxxxxxx>
 To: thomas.pointhuber@xxxxxx 
Cc: KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
 Sent: Tuesday, 14 August 2018, 23:26
 Subject: Re: [Kicad-developers] [PATCH] get initial Python 3 support
   
Hi Thomas,

I am happy to see that we port to python3 for various reasons, that
should be obvious to everyone.

I have been testing your branch a bit on windows, just to get an
overview of what changes might be needed. So far I think I made it
work as you have on linux.

A lite installer is available on [link will disappear eventually]
http://downloads.kicad-pcb.org/windows/testing/patched/kicad-patched-88-review-8244-gef7a2fcc3-x86_64.exe

The build is of course with wxpython disabled, as it is my
understanding that it does not support python3, and the next step is
to migrate to wx phoenix which should indeed support python3.

I could start the python.exe inside the kicad/bin dir and import
pcbnew without errors.

I did not try to run any standalone scripts.

I did try a couple of footprint wizards in the footprint editor, and
some of them seemingly worked. But the BARCODE USS-39 errors. It looks
like it needs to be updated to py3k syntax.

Regards
Nick Østergaard
Den lør. 4. aug. 2018 kl. 12.23 skrev Thomas Pointhuber
<thomas.pointhuber@xxxxxx>:
>
> Hi,
>
> I managed to get KiCad to run with Python 3 as well as did some quick
> verification that basic methods are working using CLI (loading boards,
> calling a method of it).
>
> Bugreport: https://bugs.launchpad.net/kicad/+bug/1785119
>
> My Branch: https://github.com/pointhi/kicad-source-mirror/tree/python3
>
> scripting inside of kicad was not tested because I'm not really familiar
> with it right now, as well as because of known wx problems with that stuff.
>
> For now it can be enabled using -DKICAD_SCRIPTING_PYTHON3=ON
> It is not possible to export modules for python 2 and python 3 with one
> build at the moment, but this should a thing which can be fixed in the
> build-script.
>
> I made some small changes to existing python code to get it working on
> both versions. To my knowledge and tests the scripts should not have
> changed behavior.
>
> Regards, Thomas
>
> _______________________________________________
> 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

_______________________________________________
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