Browse Source

l/zope.deprecation: Removed Python2 support.

slackware-15.0
parent
commit
c68ded19e6
  1. 15
      l/zope.deprecation/zope.deprecation.SlackBuild

15
l/zope.deprecation/zope.deprecation.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2019 Damien Goutte-Gattat
# Copyright (C) 2019,2020 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -29,7 +29,6 @@
NAMESRC=${NAMESRC:-zope.deprecation}
VERSION=${VERSION:-4.4.0}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-https://files.pythonhosted.org/packages/34/da/46e92d32d545dd067b9436279d84c339e8b16de2ca393d7b892bc1e1e9fd/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-zope.deprecation}
@ -43,6 +42,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
@ -58,8 +58,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)
@ -69,8 +68,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
@ -80,9 +77,9 @@ install -m 644 CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst \
$PKG/usr/doc/$NAME
# Build API docs if Sphinx is available
if type -p sphinx-build ; then
make -C docs html
cp -r docs/_build/html $PKG/usr/doc/$NAME/html
export PYTHONPATH=$PKG$PYTHONDIR
if sphinx-build -b html docs $PKG/usr/doc/$NAME/html ; then
rm -rf $PKG/usr/doc/$NAME/html/.{buildinfo,doctrees}
fi
# Copy slack-desc and doinst.sh file

Loading…
Cancel
Save