[arch-commits] Commit in streamlink/repos/community-any (3 files)

Giancarlo Razzolini grazzolini at gemini.archlinux.org
Tue Aug 17 18:00:58 UTC 2021


    Date: Tuesday, August 17, 2021 @ 18:00:58
  Author: grazzolini
Revision: 1002303

archrelease: copy trunk to community-any

Added:
  streamlink/repos/community-any/0001-fix_test_cookie_clear_unbound.patch
    (from rev 1002301, streamlink/trunk/0001-fix_test_cookie_clear_unbound.patch)
  streamlink/repos/community-any/PKGBUILD
    (from rev 1002301, streamlink/trunk/PKGBUILD)
Deleted:
  streamlink/repos/community-any/PKGBUILD

------------------------------------------+
 0001-fix_test_cookie_clear_unbound.patch |  122 +++++++++++++++++++++++++++++
 PKGBUILD                                 |   92 ++++++++++++---------
 2 files changed, 173 insertions(+), 41 deletions(-)

Copied: streamlink/repos/community-any/0001-fix_test_cookie_clear_unbound.patch (from rev 1002301, streamlink/trunk/0001-fix_test_cookie_clear_unbound.patch)
===================================================================
--- 0001-fix_test_cookie_clear_unbound.patch	                        (rev 0)
+++ 0001-fix_test_cookie_clear_unbound.patch	2021-08-17 18:00:58 UTC (rev 1002303)
@@ -0,0 +1,122 @@
+From 5f2c051635fc2a0a1426f1d5a3af91e438f66148 Mon Sep 17 00:00:00 2001
+From: bastimeyer <mail at bastimeyer.de>
+Date: Tue, 17 Aug 2021 19:45:35 +0200
+Subject: [PATCH] tests: fix Plugin.bind(session) calls
+
+---
+ tests/plugins/test_dash.py    | 8 ++++----
+ tests/plugins/test_filmon.py  | 3 +--
+ tests/plugins/test_qq.py      | 3 +--
+ tests/plugins/test_youtube.py | 5 ++---
+ 4 files changed, 8 insertions(+), 11 deletions(-)
+
+diff --git a/tests/plugins/test_dash.py b/tests/plugins/test_dash.py
+index d7dc082d4..5baf49fa3 100644
+--- a/tests/plugins/test_dash.py
++++ b/tests/plugins/test_dash.py
+@@ -3,7 +3,7 @@
+ 
+ import pytest
+ 
+-from streamlink.plugin.plugin import BIT_RATE_WEIGHT_RATIO, LOW_PRIORITY, NORMAL_PRIORITY, NO_PRIORITY, Plugin
++from streamlink.plugin.plugin import BIT_RATE_WEIGHT_RATIO, LOW_PRIORITY, NORMAL_PRIORITY, NO_PRIORITY
+ from streamlink.plugins.dash import MPEGDASH
+ from tests.plugins import PluginCanHandleUrl
+ 
+@@ -26,7 +26,7 @@ class TestPluginCanHandleUrlMPEGDASH(PluginCanHandleUrl):
+ ])
+ def test_priority(url, priority):
+     session = Mock()
+-    Plugin.bind(session, "tests.plugins.test_dash")
++    MPEGDASH.bind(session, "tests.plugins.test_dash")
+     assert next((matcher.priority for matcher in MPEGDASH.matchers if matcher.pattern.match(url)), NO_PRIORITY) == priority
+ 
+ 
+@@ -41,7 +41,7 @@ def test_stream_weight(self):
+     @patch("streamlink.stream.DASHStream.parse_manifest")
+     def test_get_streams_prefix(self, parse_manifest):
+         session = Mock()
+-        Plugin.bind(session, "tests.plugins.test_dash")
++        MPEGDASH.bind(session, "tests.plugins.test_dash")
+         p = MPEGDASH("dash://http://example.com/foo.mpd")
+         p.streams()
+         parse_manifest.assert_called_with(session, "http://example.com/foo.mpd")
+@@ -49,7 +49,7 @@ def test_get_streams_prefix(self, parse_manifest):
+     @patch("streamlink.stream.DASHStream.parse_manifest")
+     def test_get_streams(self, parse_manifest):
+         session = Mock()
+-        Plugin.bind(session, "tests.plugins.test_dash")
++        MPEGDASH.bind(session, "tests.plugins.test_dash")
+         p = MPEGDASH("http://example.com/foo.mpd")
+         p.streams()
+         parse_manifest.assert_called_with(session, "http://example.com/foo.mpd")
+diff --git a/tests/plugins/test_filmon.py b/tests/plugins/test_filmon.py
+index 93a9e770c..2deac646e 100644
+--- a/tests/plugins/test_filmon.py
++++ b/tests/plugins/test_filmon.py
+@@ -2,7 +2,6 @@
+ 
+ import pytest
+ 
+-from streamlink.plugin import Plugin
+ from streamlink.plugins.filmon import Filmon
+ from tests.plugins import PluginCanHandleUrl
+ 
+@@ -35,7 +34,7 @@ class TestPluginCanHandleUrlFilmon(PluginCanHandleUrl):
+     ('http://www.filmon.tv/vod/view/10250-0-crime-boss', [None, None, '10250'])
+ ])
+ def test_match_url(url, expected):
+-    Plugin.bind(Mock(), "tests.plugins.test_filmon")
++    Filmon.bind(Mock(), "tests.plugins.test_filmon")
+     plugin = Filmon(url)
+     assert plugin.match is not None
+     # expected must return [is_group, channel, vod_id]
+diff --git a/tests/plugins/test_qq.py b/tests/plugins/test_qq.py
+index c32b2c80d..7985e1191 100644
+--- a/tests/plugins/test_qq.py
++++ b/tests/plugins/test_qq.py
+@@ -2,7 +2,6 @@
+ 
+ import pytest
+ 
+-from streamlink.plugin import Plugin
+ from streamlink.plugins.qq import QQ
+ from tests.plugins import PluginCanHandleUrl
+ 
+@@ -31,7 +30,7 @@ class TestPluginCanHandleUrlQQ(PluginCanHandleUrl):
+     ("http://m.live.qq.com/10039165", "room_id", "10039165")
+ ])
+ def test_match_url(url, group, expected):
+-    Plugin.bind(Mock(), "tests.plugins.test_qq")
++    QQ.bind(Mock(), "tests.plugins.test_qq")
+     plugin = QQ(url)
+     assert plugin.match is not None
+     assert plugin.match.group(group) == expected
+diff --git a/tests/plugins/test_youtube.py b/tests/plugins/test_youtube.py
+index f05e070df..ea14da4ca 100644
+--- a/tests/plugins/test_youtube.py
++++ b/tests/plugins/test_youtube.py
+@@ -2,7 +2,6 @@
+ 
+ import pytest
+ 
+-from streamlink.plugin import Plugin
+ from streamlink.plugins.youtube import YouTube
+ from tests.plugins import PluginCanHandleUrl
+ 
+@@ -54,7 +53,7 @@ class TestPluginCanHandleUrlYouTube(PluginCanHandleUrl):
+     ("https://www.youtube.com/watch?v=aqz-KE-bpKQ", "video_id", "aqz-KE-bpKQ"),
+ ])
+ def test_match_url(url, group, expected):
+-    Plugin.bind(Mock(), "tests.plugins.test_youtube")
++    YouTube.bind(Mock(), "tests.plugins.test_youtube")
+     plugin = YouTube(url)
+     assert plugin.match is not None
+     assert plugin.match.group(group) == expected
+@@ -68,5 +67,5 @@ def test_match_url(url, group, expected):
+     ("http://www.youtube.com/watch?v=0123456789A", "https://www.youtube.com/watch?v=0123456789A"),
+ ])
+ def test_translate_url(url, expected):
+-    Plugin.bind(Mock(), "tests.plugins.test_youtube")
++    YouTube.bind(Mock(), "tests.plugins.test_youtube")
+     assert YouTube(url).url == expected

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-08-17 18:00:48 UTC (rev 1002302)
+++ PKGBUILD	2021-08-17 18:00:58 UTC (rev 1002303)
@@ -1,41 +0,0 @@
-# Maintainer: Giancarlo Razzolini <grazzolini at archlinux.org>
-# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
-
-pkgname=streamlink
-pkgver=2.2.0
-pkgrel=1
-pkgdesc='CLI program that launches streams from various streaming services in a custom video player (livestreamer fork)'
-arch=('any')
-url='https://streamlink.github.io/'
-license=('BSD')
-depends=("python-"{pycryptodome,isodate,pycountry,requests,pysocks,websocket-client} 'rtmpdump')
-checkdepends=("python-"{freezegun,mock,pytest,requests-mock})
-makedepends=("python-"{recommonmark,setuptools,sphinx})
-optdepends=('ffmpeg: Required to play streams that are made up of separate audio and video streams, eg. YouTube 1080p+')
-source=("https://github.com/${pkgname}/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz"{,.asc})
-validpgpkeys=('E2B794C7C2C37162E5E2A097E3DB9E282E390FA0') # Streamlink Signing Key <streamlink at protonmail.com>
-sha256sums=('0f8e3d4d4eb530e4fe16e82a9d8919c0432d26e53af1dcce2a3dd2adbefbf109'
-            'SKIP')
-sha512sums=('f7e314446a641d168907f8d671543d300434c71ac1c1ace17398d7220fbed1de8f824112348235bd06494b55c32e2200714ce6064e00f5a2131a2fb3e68a2a7c'
-            'SKIP')
-
-build() {
-  cd "$pkgname-$pkgver"
-  export STREAMLINK_USE_PYCOUNTRY="true"
-  python setup.py build
-  python setup.py build_sphinx -b man
-}
-
-check() {
-  cd "$pkgname-$pkgver"
-  python setup.py test
-}
-
-package() {
-  cd "$pkgname-$pkgver"
-  export PYTHONHASHSEED=0
-  python setup.py install --root="$pkgdir" --optimize=1
-  install -Dm644 build/sphinx/man/streamlink.1 \
-    "$pkgdir/usr/share/man/man1/streamlink.1"
-  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}

Copied: streamlink/repos/community-any/PKGBUILD (from rev 1002301, streamlink/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-08-17 18:00:58 UTC (rev 1002303)
@@ -0,0 +1,51 @@
+# Maintainer: Giancarlo Razzolini <grazzolini at archlinux.org>
+# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
+
+pkgname=streamlink
+pkgver=2.3.0
+pkgrel=1
+pkgdesc='CLI program that launches streams from various streaming services in a custom video player (livestreamer fork)'
+arch=('any')
+url='https://streamlink.github.io/'
+license=('BSD')
+depends=("python-"{pycryptodome,isodate,pycountry,requests,pysocks,websocket-client} 'rtmpdump')
+checkdepends=("python-"{freezegun,mock,pytest,requests-mock})
+makedepends=("python-"{recommonmark,setuptools,sphinx})
+optdepends=('ffmpeg: Required to play streams that are made up of separate audio and video streams, eg. YouTube 1080p+')
+source=("https://github.com/${pkgname}/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz"{,.asc}
+        0001-fix_test_cookie_clear_unbound.patch)
+validpgpkeys=('E2B794C7C2C37162E5E2A097E3DB9E282E390FA0') # Streamlink Signing Key <streamlink at protonmail.com>
+sha256sums=('1497e6dc5d2fb8c5b17688f20ca2e8989a279de804a4de37d2107af33b9faa04'
+            'SKIP'
+            '193ce085e1655551865ea0d1055de0814bbdf6bcd4df510656538fb483482901')
+sha512sums=('928cddecb4b91bf29a5c2cb5c5de037863323434a4e20b72261740b6a8703508fbd3b14c6ac99592548205ebf7282d35890f02a493372b74908f4d974c468084'
+            'SKIP'
+            '215af7f630661a95d6f30ef2024253fdf0fb25e3abc4a611e56d808cde485b9c88e0dd3bf569adc0ba2391355c5170218c2b05357e31e633ba3fbdaa480b830d')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+
+  # fix the test_cookie_clear_unbound issue
+  patch -Np1 < "$srcdir/0001-fix_test_cookie_clear_unbound.patch"
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  export STREAMLINK_USE_PYCOUNTRY="true"
+  python setup.py build
+  python setup.py build_sphinx -b man
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+  python setup.py test
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  export PYTHONHASHSEED=0
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 build/sphinx/man/streamlink.1 \
+    "$pkgdir/usr/share/man/man1/streamlink.1"
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}



More information about the arch-commits mailing list