[Slackbuilds-users] Merging python / python3 packages

Benjamin Trigona-Harany slackbuilds at jaxartes.net
Wed Feb 20 22:51:56 UTC 2019


On 2019-02-20 2:37 p.m., B Watson wrote:
> On 2/19/19, Benjamin Trigona-Harany <slackbuilds at jaxartes.net> wrote:
>>
>> As Matteo mentioned, it's come up a few times on the list if you check
>> the archives. I'm strongly in favour of merging 2/3 into single
>> SlackBuilds and while this will mostly happen during the freeze before
>> 15.0, maintainers can start doing it now if they are comfortable making
>> Python 3 a *mandatory* dependency for their SlackBuilds. I'm doing it
>> for a lot of my Python scripts, e.g.
>> https://git.slackbuilds.org/slackbuilds/commit/?h=14.2&id=e41084eb60be64574dca5a993bb9ca3ceef6a1ea
> 
> Why does it have to be mandatory?
> 
> Currently we have in the template:
> 
>    python setup.py install --root=$PKG
> 
> Just after (or just before) this line, add this:
> 
>    python3 -c 0 &>/dev/null && python3 setup.py install --root=$PKG
> 
> In other words actually check for the existence of python3. I've done
> this for a few (as yet unsubmitted) python libraries and it works for
> them at least.

Anyone can put conditional Python 3 builds today (I do so in some of my 
scripts), but I don't think it's worth deprecating a Python 3 SlackBuild 
if it's not mandatory since anyone with a dependency will need to update 
their README files to explain build orders. Myself I maintain a number 
of python3-xxxx scripts because otherwise my downstream builds wouldn't 
be able to rely on the REQUIRES line in .info.

For example, I will remove python3-Pygments when Pygments makes Python 3 
mandatory because I don't want my python3-ipython script to require a 
specific build order.

It's also possible to end up with broken executables when you do 
conditional Python 3 installs and have no visibility into how 
dependencies were built.

Ben



More information about the SlackBuilds-users mailing list