|
|
|
@ -29,7 +29,6 @@
|
|
|
|
|
NAMESRC=${NAMESRC:-zope.event} |
|
|
|
|
VERSION=${VERSION:-4.4} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-https://files.pythonhosted.org/packages/4c/b2/51c0369adcf5be2334280eed230192ab3b03f81f8efda9ddea6f65cc7b32/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-zope.event} |
|
|
|
@ -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 PKG-INFO README.rst \
|
|
|
|
|
$PKG/usr/doc/$NAME |
|
|
|
|
|
|
|
|
|
# Build API docs if Sphinx is available |
|
|
|
|
if type -p sphinx-build ; then |
|
|
|
|
PYTHONPATH=$(ls -d $PKG/usr/lib*/python2.7/site-packages) 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 file |
|
|
|
|