[Slackbuilds-users] improvement to python slackbuilds template

Glenn glimrick at epilitimus.com
Sat Nov 22 01:29:06 UTC 2025


Hello,

I have come up with what I think is an improvement to the existing 
template for python builds, patch attached.

1. Adds PYTHONVER as an input variable. The default is "3" if none is 
given on the command line.

2. Changes the calls to python3 to python$PYTHONVER

3. If PYTHONVER was provided adds a tag to the package name.

This allows something like:

$PYTHONVER=3.14 ./some_python_build.Slackbuild

The python build will be done against the requested version of python 
and the package name will end with -py3.14-SBO so that it won't clobber 
any other versions of the build you may have installed in 
/var/log/packages/. This way if you upgrade python on your machine you 
can easily rebuild modules for the new version. If you don't supply a 
PYTHONVER then the build defaults to the system python3.

Hope this is found useful.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pythonver.patch
Type: text/x-patch
Size: 3002 bytes
Desc: not available
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20251121/6f354e20/attachment.bin>


More information about the SlackBuilds-users mailing list