Browse Source

l/python-websocket-client: Updated.

current-20191101
Damien Goutte-Gattat 2 years ago
parent
commit
05cb312cb0
  1. 20
      l/python-websocket-client/python-websocket-client.SlackBuild

20
l/python-websocket-client/python-websocket-client.SlackBuild

@ -25,13 +25,14 @@
# Latest websocket_client sourcecode is available at:
# <https://github.com/websocket-client/websocket-client.git>.
#
# Depends: l/python-backports
# Note: Optional dependencies are only needed for Python 2.
#
# Optional: l/python-backports
# Source package infos
NAMESRC=${NAMESRC:-websocket_client}
VERSION=${VERSION:-0.56.0}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-https://files.pythonhosted.org/packages/c5/01/8c9c7de6c46f88e70b5a3276c791a2be82ae83d8e0d0cc030525ee2866fd/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-python-websocket-client}
@ -60,8 +61,7 @@ fi
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
pip3 download --no-binary :all: --no-deps $NAMESRC==$VERSION
fi
sha256sum -c $ARCHIVE.sha256
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
@ -71,8 +71,11 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
python setup.py build
python setup.py install --root=$PKG
# We only build for Python 3 to avoid depending on backported modules.
# If Python 2 support is needed, add the corresponding stanza here and
# make the optional dependencies are available.
python3 setup.py build
python3 setup.py install --root=$PKG
# Install the documentation
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION
@ -81,11 +84,6 @@ install -m 644 ChangeLog LICENSE README.rst $PKG/usr/doc/$NAMEPKG-$VERSION
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
# Add dependency infos
cat <<EOF > $PKG/install/slack-required
python-backports
EOF
# Package the tree
cd $PKG
mkdir -p $OUT

Loading…
Cancel
Save