diff options
author | Christoph Willing <chris.willing@linux.com> | 2019-06-26 17:12:43 +1000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-06-29 08:17:48 +0700 |
commit | a77e44b2ccd6aea42ec48a1e5f0196375d4bb690 (patch) | |
tree | 3d7fffcd59e0bc3950b9cb097dc373c71538887c /python/feedparser/feedparser.SlackBuild | |
parent | 6f309be790ab3a703370e092fb760fdf3ee897da (diff) | |
download | slackbuilds-a77e44b2ccd6aea42ec48a1e5f0196375d4bb690.tar.gz |
python/feedparser: Added python3 support
Signed-off-by: Christoph Willing <chris.willing@linux.com>
Diffstat (limited to 'python/feedparser/feedparser.SlackBuild')
-rw-r--r-- | python/feedparser/feedparser.SlackBuild | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/python/feedparser/feedparser.SlackBuild b/python/feedparser/feedparser.SlackBuild index 8f657c6a38..3231c59195 100644 --- a/python/feedparser/feedparser.SlackBuild +++ b/python/feedparser/feedparser.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for feedparser # Modified by Luis Henrique <lmello.009@gmail.com> -# Maintained 2014-2016 by Christoph Willing <chris.willing@linux.com> +# Maintained 2014-2019 by Christoph Willing <chris.willing@linux.com> # Copyright 2008-2009 Chess Griffin <chess@chessgriffin.com> # All rights reserved. @@ -64,7 +64,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xf $CWD/$VERSION.tar.gz || tar xf $CWD/$PRGNAM-$VERSION.tar.gz +tar xf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -75,6 +75,19 @@ find -L . \ python setup.py build python setup.py install --root $PKG +if $(python3 -c 'import sys' 2>/dev/null); then + # Python3 doesn't have sgmllib so we provide it here for building + # and later installation as part of the feedparser package. + cp feedparser/sgmllib3.py feedparser/sgmllib.py + PYTHONPATH=$(pwd)/feedparser:$PYTHONPATH + + patch -p0 < $CWD/001_py37.diff + python3 setup.py build + python3 setup.py install --root $PKG + + PYSITEDIR=$(python3 -c "import site; print(site.getsitepackages()[0])") + install -m 0644 feedparser/sgmllib.py $PKG/$PYSITEDIR +fi find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true |