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

Brent Earl brent at exitstatusone.com
Mon Dec 14 20:37:54 UTC 2015


I think that package duplication is unnecessary.   An if else statment in
the SlackBuild would be the solution I think.  Where I live there is a
large snow storm that knocked out my internet connection.  It may not be
until tomorrow or the next day that I can test this.  All I have for now is
a 1GB data plan on 4G.
On Dec 14, 2015 2:56 AM, "Philip Lacroix" <slackph at posteo.de> wrote:

> Am 13.12.2015 20:54 schrieb Larry Hajali:
>
>> 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.
>>
>
> Perhaps we could also avoid duplicating packages where such conflicts are
> possible, by adding an "else" statement in order to build either with
> Python OR Python3 support. For example:
>
> if ["${PYTHON3SUPPORT:-no}" == "yes" ]; then
>   python3 setup.py install --root=$PKG
> else
>   python setup.py install --root=$PKG
> fi
>
> Philip
>
>
> 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/20151214/dd72dfd9/attachment.html>


More information about the SlackBuilds-users mailing list