[Slackbuilds-users] Support for Python 3 in python-pillow?

Larry Hajali larryhaja at gmail.com
Sun Dec 13 19:54:26 UTC 2015


I've been on the fence about adding that auto-detection in my python
slackbuilds.  Some people think that this should be an option set at build
time to add python3 support by using a variable.

Eg.

if ["${PYTHON3SUPPORT:-no}" == "yes" ]; then

  python3 setup.py install --root=$PKG

fi


I'm not opposed to that, but I'm also not sure how to handle packages that
put files in /usr/bin directory (like python-pillow) for python2 and
python3 scripts.  If python3 files are built after python2 files, then
everything in /usr/bin/* will have a shebang with #!/usr/bin/python3.  I'm
not sure that is a desired outcome.

It may be best to create a second python3 package for python-pillow and
possibly other python slackbuilds that support python3 to avoid file
conflicts.

Thanks,
--Larry

On Sun, Dec 13, 2015 at 11:23 AM, Philip Lacroix <slackph at posteo.de> wrote:

> Greetings
>
> I wonder if something like the following test could be added to
> python-pillow.SlackBuild, in order to automatically add support for Python3
> if the latter is installed:
>
>  python setup.py install --root=$PKG
>>
>> + if $(python3 -c 'import sys' 2>/dev/null); then
>> +  python3 setup.py install --root=$PKG
>> + fi
>>
>
> I've been using this test in my script for glances, after borrowing it
> from Larry Hajali's script for psutil, and it seems to do its job nicely.
>
> The reason for my suggestion is that I'm preparing a new SlackBuild that
> will require both python3 and python-pillow. The software expects pillow to
> support Python 3, but it doesn't, unless the script is manually edited. I
> understand that Slackware-current, from which the python-pillow script was
> taken, doesn't include Python 3, however SBo does, so it would be nice to
> have it autodetected. :)
>
> Best regards
> Philip
> _______________________________________________
> SlackBuilds-users mailing list
> SlackBuilds-users at slackbuilds.org
> http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - http://slackbuilds.org/faq/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20151213/57d7bc07/attachment-0001.html>


More information about the SlackBuilds-users mailing list