python/pytz: Add python3 support.

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
Jeremy Hansen 2017-04-04 17:15:27 +01:00 committed by Willy Sudiarto Raharjo
parent bae430e6ff
commit 8da796cf9c
No known key found for this signature in database
GPG key ID: 887B8374D7333381
2 changed files with 10 additions and 0 deletions

View file

@ -3,3 +3,8 @@ accurate and cross platform timezone calculations using Python 2.3
or higher. It also solves the issue of ambiguous times at the end
of daylight savings, which you can read more about in the Python
Library Reference (datetime.tzinfo).
python3 is an optional dependency. You need to set PYTHON3=yes,
for example:
PYTHON3=yes ./pytz.SlackBuild

View file

@ -57,6 +57,11 @@ find -L . \
python setup.py install --root=$PKG
# Install python3 bindings. Default is no.
if [ "${PYTHON3:-no}" = "yes" ]; then
python3 setup.py install --root=$PKG
fi
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true