[Slackbuilds-users] Python (Again!)

Gerardo Zamudio gerardo.zamudio at linux.com
Tue Apr 20 21:48:43 UTC 2021


On 2021-04-20 4:00 pm, Barry J. Grundy wrote:
> I know this has come up before and perhaps been answered and I've also
> read through the related threads on LQ, but I still have not seen a
> definitive answer (if there is one):
> 
> Since python2 is EOL and -current/15 ships with python3, is it good
> practice now to build python packages with python3 by default? 

Wait until submissions for 15 are open. For now, build with python2 by 
default and make a separate python3 package or add a python3 switch. 
But, submissions are closed, so new packages are no longer an option :)

> For example, I maintain dpkt.  The version in the -current (ponce's)
> repo works, but I have an update ready to go when submissions open
> again.  Right now dpkt builds for python2. Here's my question:
> 
> My "ready to go" update switches to python3 by default and uses a
> "PYTHON2=yes" option to build python2 modules if the user wants. Would
> it be better to create python3-dpkt and leave the dpkt script at
> python2?  I see it both ways in the 14.2 repo.

SlackBuilds target a default full install of Slackware. Your script 
should always use whatever is the default. If python3 is the default 
python version in a full install of Slackware, then your script should 
use that. This means for the upcoming Slackware 15 repo in SlackBuilds, 
your dpkt script should use python3 by default and if you want to add 
python2 support it could be a separate switch or you could create a 
separate  python2-dpkt script.

Regards
Gerardo Zamudio


More information about the SlackBuilds-users mailing list