← Back to team overview

kicad-developers team mailing list archive

Re: Python 3 now required

 

Could this work?

conda create --name py2 python=2.7

-----Original Message-----
From: Kicad-developers
<kicad-developers-bounces+crash=triad.rr.com@xxxxxxxxxxxxxxxxxxx> On Behalf
Of Marco Ciampa
Sent: Tuesday, June 15, 2021 6:32 AM
To: kicad-developers@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Kicad-developers] Python 3 now required

On Tue, Jun 15, 2021 at 12:22:42AM +0300, Eeli Kaikkonen wrote:
> On Mon, Jun 14, 2021 at 11:59 PM Kevin Cozens <kevin@xxxxxxxxx> wrote:
> > Not that simple. I tried passing -DPYTHON_EXECUTABLE=python3 and it 
> > still only finds 2.7. I tried it without the -D part. I have also 
> > tried it with and without a full path to python3. I even tried 
> > putting PYTHON_EXECUTABLE before 'cmake' on the line.
> >
> 
> That's where cmake UIs come handy. Try ccmake or cmake-gui (they are 
> both official user interfaces for cmake). You don't need to know the 
> variables beforehand, you can see them all in the UI. I already forgot 
> what those problematic variables were but it was easy to find them 
> because they pointed to python 2.

Exactly, Kevin is right but using the cmake-gui command it was very easy to
figure out how to change the variables to make it compile for me.

My CMAkeCache.txt (Ubunto 20.04) is now:

//Python module install path.
PYTHON_DEST:PATH=lib/python3.8/dist-packages

//Path to a program.
PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3

//Path to a file.
PYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8

//Path to a library.
PYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.8.so

I also switched on these two (not sure if I've done right though...)

//Run eeschema netlist QA tests (requires Python 3) KICAD_NETLIST_QA:BOOL=ON

//Build for Python 3 instead of 2 (default OFF).
KICAD_SCRIPTING_PYTHON3:BOOL=ON

Anyway it build all good.

--

Saluton,
Marco Ciampa

_______________________________________________
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