Browse Source

n/gunicorn: Rebuild for Python 3 by default.

current-20191101
Damien Goutte-Gattat 2 years ago
parent
commit
f8b21383ec
  1. 19
      n/gunicorn/gunicorn.SlackBuild

19
n/gunicorn/gunicorn.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2016,2019 Damien Goutte-Gattat
# Copyright (C) 2016,2019,2020 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -28,11 +28,10 @@
NAMESRC=${NAMESRC:-gunicorn}
VERSION=${VERSION:-19.9.0}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-https://files.pythonhosted.org/packages/47/52/68ba8e5e8ba251e54006a49441f7ccabca83b6bef5aedacb4890596c7911/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-gunicorn}
BUILD=${BUILD:-1GGD}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
@ -57,8 +56,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)
@ -70,21 +68,10 @@ tar xf $CWD/$ARCHIVE
cd $NAME
python2 setup.py build
python2 setup.py install --root=$PKG
for f in gunicorn gunicorn_paster ; do
mv $PKG/usr/bin/$f $PKG/usr/bin/$f-2.7
done
# And now for Python 3
python3 setup.py build
python3 setup.py install --root=$PKG
for f in gunicorn gunicorn_paster ; do
mv $PKG/usr/bin/$f $PKG/usr/bin/$f-3.7
done
# Add default symlinks to the -2.7 executables
for f in gunicorn gunicorn_paster ; do
ln -s $f-2.7 $PKG/usr/bin/$f
done
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME

Loading…
Cancel
Save