diff --git a/n/streamlink/streamlink-1.2.0-fix-bbciplayer-nonce.patch b/n/streamlink/streamlink-1.2.0-fix-bbciplayer-nonce.patch deleted file mode 100644 index cf0924dd..00000000 --- a/n/streamlink/streamlink-1.2.0-fix-bbciplayer-nonce.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -Naur streamlink-1.2.0.orig/src/streamlink/plugins/bbciplayer.py streamlink-1.2.0/src/streamlink/plugins/bbciplayer.py ---- streamlink-1.2.0.orig/src/streamlink/plugins/bbciplayer.py 2019-08-19 17:14:19.000000000 +0100 -+++ streamlink-1.2.0/src/streamlink/plugins/bbciplayer.py 2019-09-19 21:16:47.762446397 +0100 -@@ -108,16 +108,9 @@ - :rtype: string - """ - -- # Extract the redirect URL from the last call -- last_redirect_url = urlparse(http_result.history[-1].request.url) -- last_redirect_query = dict(parse_qsl(last_redirect_url.query)) -- # Extract the nonce from the query string in the redirect URL -- final_url = urlparse(last_redirect_query['goto']) -- goto_url = dict(parse_qsl(final_url.query)) -- goto_url_query = parse_json(goto_url['state']) -- -- # Return the nonce we can use for future queries -- return goto_url_query['nonce'] -+ p = urlparse(http_result.url) -+ d = dict(parse_qsl(p.query)) -+ return d.get("nonce") - - def find_vpid(self, url, res=None): - """ diff --git a/n/streamlink/streamlink-1.2.0.tar.gz.sha256 b/n/streamlink/streamlink-1.2.0.tar.gz.sha256 deleted file mode 100644 index 9158f93a..00000000 --- a/n/streamlink/streamlink-1.2.0.tar.gz.sha256 +++ /dev/null @@ -1 +0,0 @@ -7aa6e02d914e29fe2e344afd185760b11e46a6a31f9d99f7f9dc87b808812992 streamlink-1.2.0.tar.gz diff --git a/n/streamlink/streamlink-1.3.0.tar.gz.sha256 b/n/streamlink/streamlink-1.3.0.tar.gz.sha256 new file mode 100644 index 00000000..36d6cfd6 --- /dev/null +++ b/n/streamlink/streamlink-1.3.0.tar.gz.sha256 @@ -0,0 +1 @@ +00649658b74c76022a04564919431e4d6156d974caf56f25cd52a07fa5732315 streamlink-1.3.0.tar.gz diff --git a/n/streamlink/streamlink.SlackBuild b/n/streamlink/streamlink.SlackBuild index 9c91ba03..c3969a83 100755 --- a/n/streamlink/streamlink.SlackBuild +++ b/n/streamlink/streamlink.SlackBuild @@ -25,15 +25,16 @@ # Latest streamlink sourcecode is available at: # . # -# Depends: l/python-futures, l/python-singledispatch, l/python-requests -# Depends: l/python-isodate, l/python-websocket-client, l/pysocks -# Depends: l/pycryptodome, l/python-iso639, l/python-iso3166 +# Note: Optional dependencies are required for Python 2 only. +# +# Depends: l/pycryptodome, l/pysocks, l/python-iso3166, l/python-iso639 +# Depends: l/python-isodate, l/python-websocket-client +# Optional: l/python-backports, l/python-futures, l/python-singledispatch # Source package infos NAMESRC=${NAMESRC:-streamlink} -VERSION=${VERSION:-1.2.0} +VERSION=${VERSION:-1.3.0} ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} -WGET=${WGET:-https://files.pythonhosted.org/packages/5e/c6/a3b694ca299e6fcc6e8f25b293d7a3b79f688819198e9aa8a88036a306a5/$ARCHIVE} # Build infos NAMEPKG=${NAMEPKG:-streamlink} @@ -62,8 +63,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) @@ -73,11 +73,11 @@ cd $TMP echo "Building $ARCHIVE..." tar xf $CWD/$ARCHIVE cd $NAME -# Fix nonce extraction in BBC iPlayer plugin -# -patch -p 1 < $CWD/streamlink-1.2.0-fix-bbciplayer-nonce.patch -python setup.py build -python setup.py install --root=$PKG +# We build for Python 3 only to avoid depending on backported modules. +# For Python 2 support, add the appropriate stanza here and make sure +# the optional dependencies listed above are available. +python3 setup.py build +python3 setup.py install --root=$PKG # Install the documentation mkdir -p $PKG/usr/doc/$NAME @@ -90,12 +90,9 @@ install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc cat < $PKG/install/slack-required pycryptodome pysocks -python-futures python-iso3166 python-iso639 python-isodate -python-requests -python-singledispatch python-websocket-client EOF