From 375a1c9c668ee199712f8156be53d06506a666ba Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Sat, 20 Jun 2020 20:20:02 +0100 Subject: [PATCH] l/python-traitlets: Removed Python2 support. --- l/python-traitlets/python-traitlets.SlackBuild | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/l/python-traitlets/python-traitlets.SlackBuild b/l/python-traitlets/python-traitlets.SlackBuild index cc1e2372..5d3f6f05 100755 --- a/l/python-traitlets/python-traitlets.SlackBuild +++ b/l/python-traitlets/python-traitlets.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash # Build script for Slackware -# Copyright (C) 2018,2019 Damien Goutte-Gattat +# Copyright (C) 2018,2019,2020 Damien Goutte-Gattat # # Redistribution and use of this script, with or without modifications, # is permitted provided that the following conditions are met: @@ -24,9 +24,7 @@ # # Latest traitlets sourcecode is available at: . # -# NOTE: l/python-enum34 is only needed for Python 2. -# -# Recommends: l/python-enum34 +# Depends: l/ipython-genutils # Source package infos NAMESRC=${NAMESRC:-traitlets} @@ -45,6 +43,7 @@ TMP=${TMP:-/tmp} OUT=${OUT:-$TMP/build} PKG=${PKG:-$OUT/$NAMEPKG} CWD=$(pwd) +PYTHONDIR=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])') set -e # Quit if a command returns non-zero @@ -70,8 +69,6 @@ cd $TMP echo "Building $ARCHIVE..." tar xf $CWD/$ARCHIVE cd $NAME -python2 setup.py build -python2 setup.py install --root=$PKG python3 setup.py build python3 setup.py install --root=$PKG @@ -79,13 +76,18 @@ python3 setup.py install --root=$PKG mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION install -m 644 CONTRIBUTING.md COPYING.md README.md $PKG/usr/doc/$NAMEPKG-$VERSION +# Build HTML docs if possible +export PYTHONPATH=$PKG$PYTHONDIR +if sphinx-build -b html docs/source $PKG/usr/doc/$NAMEPKG-$VERSION/html ; then + rm -rf $PKG/usr/doc/$NAMEPKG-$VERSION/html/.{buildinfo,doctrees} +fi + # Copy slack-desc file install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc # Add dependency infos cat < $PKG/install/slack-required -python-decorator -python-enum34 +ipython-genutils EOF # Package the tree