diff --git a/.gitignore b/.gitignore index fe25cf9..a695268 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ /streamlink-2.1.2.tar.gz /streamlink-2.2.0.tar.gz /streamlink-2.3.0.tar.gz +/streamlink-2.4.0.tar.gz diff --git a/python-streamlink-2.0.0-doc.patch b/python-streamlink-2.0.0-doc.patch deleted file mode 100644 index 4320bfb..0000000 --- a/python-streamlink-2.0.0-doc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up ./docs/conf.py.orig ./docs/conf.py ---- ./docs/conf.py.orig 2020-12-22 10:43:42.000000000 +0100 -+++ ./docs/conf.py 2021-01-18 06:37:18.679269871 +0100 -@@ -90,7 +90,7 @@ github_project = 'streamlink/streamlink' - - # The theme to use for HTML and HTML Help pages. See the documentation for - # a list of builtin themes. --html_theme = 'furo' -+html_theme = 'sphinx_rtd_theme' - - # Theme options are theme-specific and customize the look and feel of a theme - # further. For a list of options available for each theme, see the diff --git a/python-streamlink-2.3.0-dependencies.patch b/python-streamlink-2.3.0-dependencies.patch deleted file mode 100644 index 870efa6..0000000 --- a/python-streamlink-2.3.0-dependencies.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up ./setup.py.orig ./setup.py ---- ./setup.py.orig 2021-07-26 09:17:58.318942485 +0200 -+++ ./setup.py 2021-07-26 09:22:22.063788820 +0200 -@@ -10,12 +10,9 @@ import versioneer - - data_files = [] - deps = [ -- # Temporarily set requests to 2.25.1 on Windows to fix issues with randomly failing tests -- # Don't force an older requests version on non-Windows systems due to packaging reasons -- "requests>=2.26.0,<3.0 ; platform_system!='Windows'", -- "requests==2.25.1 ; platform_system=='Windows'", -+ "requests", - "isodate", -- "websocket-client>=0.58.0", -+ "websocket-client", - # Support for SOCKS proxies - "PySocks!=1.5.7,>=1.5.6", - ] diff --git a/python-streamlink-2.3.0-pycryptodomex.patch b/python-streamlink-2.3.0-pycryptodomex.patch deleted file mode 100644 index 10461e9..0000000 --- a/python-streamlink-2.3.0-pycryptodomex.patch +++ /dev/null @@ -1,132 +0,0 @@ -diff -up ./setup.py.orig ./setup.py ---- ./setup.py.orig 2021-07-26 02:19:08.000000000 +0200 -+++ ./setup.py 2021-07-26 09:17:58.318942485 +0200 -@@ -25,7 +25,7 @@ if environ.get("STREAMLINK_USE_PYCRYPTO" - deps.append("pycrypto") - else: - # this version of pycryptodome is known to work and has a Windows wheel for py2.7, py3.3-3.6 -- deps.append("pycryptodome>=3.4.3,<4") -+ deps.append("pycryptodomex>=3.4.3,<4") - - # for localization - if environ.get("STREAMLINK_USE_PYCOUNTRY"): -diff -up ./src/streamlink/plugins/abematv.py.orig ./src/streamlink/plugins/abematv.py ---- ./src/streamlink/plugins/abematv.py.orig 2021-07-26 02:19:08.000000000 +0200 -+++ ./src/streamlink/plugins/abematv.py 2021-07-26 09:19:28.261213446 +0200 -@@ -8,7 +8,7 @@ import uuid - from base64 import urlsafe_b64encode - from binascii import unhexlify - --from Crypto.Cipher import AES -+from Cryptodome.Cipher import AES - from requests import Response - from requests.adapters import BaseAdapter - -diff -up ./src/streamlink/plugins/mjunoon.py.orig ./src/streamlink/plugins/mjunoon.py ---- ./src/streamlink/plugins/mjunoon.py.orig 2021-07-26 02:19:08.000000000 +0200 -+++ ./src/streamlink/plugins/mjunoon.py 2021-07-26 09:19:28.265213505 +0200 -@@ -3,8 +3,8 @@ import logging - import re - from urllib.parse import urljoin - --from Crypto.Cipher import AES --from Crypto.Util.Padding import unpad -+from Cryptodome.Cipher import AES -+from Cryptodome.Util.Padding import unpad - - from streamlink.plugin import Plugin, pluginmatcher - from streamlink.plugin.api import validate -diff -up ./src/streamlink/plugins/rtve.py.orig ./src/streamlink/plugins/rtve.py ---- ./src/streamlink/plugins/rtve.py.orig 2021-07-26 02:19:08.000000000 +0200 -+++ ./src/streamlink/plugins/rtve.py 2021-07-26 09:19:28.269213564 +0200 -@@ -3,7 +3,7 @@ import logging - import re - from functools import partial - --from Crypto.Cipher import Blowfish -+from Cryptodome.Cipher import Blowfish - - from streamlink.plugin import Plugin, PluginArgument, PluginArguments, pluginmatcher - from streamlink.plugin.api import useragents, validate -diff -up ./src/streamlink/plugins/steam.py.orig ./src/streamlink/plugins/steam.py ---- ./src/streamlink/plugins/steam.py.orig 2021-07-26 02:19:08.000000000 +0200 -+++ ./src/streamlink/plugins/steam.py 2021-07-26 09:19:28.273213624 +0200 -@@ -4,8 +4,8 @@ import re - import time - from html import unescape as html_unescape - --from Crypto.Cipher import PKCS1_v1_5 --from Crypto.PublicKey import RSA -+from Cryptodome.Cipher import PKCS1_v1_5 -+from Cryptodome.PublicKey import RSA - - import streamlink - from streamlink.exceptions import FatalPluginError -diff -up ./src/streamlink/plugins/ustvnow.py.orig ./src/streamlink/plugins/ustvnow.py ---- ./src/streamlink/plugins/ustvnow.py.orig 2021-07-26 02:19:08.000000000 +0200 -+++ ./src/streamlink/plugins/ustvnow.py 2021-07-26 09:19:28.277213683 +0200 -@@ -5,9 +5,9 @@ import re - from urllib.parse import urljoin, urlparse - from uuid import uuid4 - --from Crypto.Cipher import AES --from Crypto.Hash import SHA256 --from Crypto.Util.Padding import pad, unpad -+from Cryptodome.Cipher import AES -+from Cryptodome.Hash import SHA256 -+from Cryptodome.Util.Padding import pad, unpad - - from streamlink.plugin import Plugin, PluginArgument, PluginArguments, PluginError, pluginmatcher - from streamlink.stream import HLSStream -diff -up ./src/streamlink/plugins/webtv.py.orig ./src/streamlink/plugins/webtv.py ---- ./src/streamlink/plugins/webtv.py.orig 2021-07-26 02:19:08.000000000 +0200 -+++ ./src/streamlink/plugins/webtv.py 2021-07-26 09:19:28.281213742 +0200 -@@ -3,7 +3,7 @@ import binascii - import logging - import re - --from Crypto.Cipher import AES -+from Cryptodome.Cipher import AES - - from streamlink.plugin import Plugin, pluginmatcher - from streamlink.plugin.api import validate -diff -up ./src/streamlink/stream/hls.py.orig ./src/streamlink/stream/hls.py ---- ./src/streamlink/stream/hls.py.orig 2021-07-26 02:19:08.000000000 +0200 -+++ ./src/streamlink/stream/hls.py 2021-07-26 09:19:28.285213802 +0200 -@@ -8,9 +8,9 @@ from typing import List, NamedTuple, Opt - from urllib.parse import urlparse - - # noinspection PyPackageRequirements --from Crypto.Cipher import AES -+from Cryptodome.Cipher import AES - # noinspection PyPackageRequirements --from Crypto.Util.Padding import unpad -+from Cryptodome.Util.Padding import unpad - from requests import Response - from requests.exceptions import ChunkedEncodingError - -diff -up ./src/streamlink/utils/crypto.py.orig ./src/streamlink/utils/crypto.py ---- ./src/streamlink/utils/crypto.py.orig 2021-07-26 02:19:08.000000000 +0200 -+++ ./src/streamlink/utils/crypto.py 2021-07-26 09:19:28.289213861 +0200 -@@ -1,6 +1,6 @@ - import hashlib - --from Crypto.Cipher import AES -+from Cryptodome.Cipher import AES - - - def evp_bytestokey(password, salt, key_len, iv_len): -diff -up ./tests/streams/test_hls.py.orig ./tests/streams/test_hls.py ---- ./tests/streams/test_hls.py.orig 2021-07-26 02:19:08.000000000 +0200 -+++ ./tests/streams/test_hls.py 2021-07-26 09:19:28.293213920 +0200 -@@ -5,8 +5,8 @@ from unittest.mock import Mock, call, pa - - import pytest - import requests_mock --from Crypto.Cipher import AES --from Crypto.Util.Padding import pad -+from Cryptodome.Cipher import AES -+from Cryptodome.Util.Padding import pad - - from streamlink.session import Streamlink - from streamlink.stream import hls diff --git a/python-streamlink-2.4.0-dependencies.patch b/python-streamlink-2.4.0-dependencies.patch new file mode 100644 index 0000000..b2458b6 --- /dev/null +++ b/python-streamlink-2.4.0-dependencies.patch @@ -0,0 +1,16 @@ +diff -up ./setup.py.orig ./setup.py +--- ./setup.py.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./setup.py 2021-09-07 05:52:09.001364740 +0200 +@@ -10,10 +10,10 @@ import versioneer + + data_files = [] + deps = [ +- "requests>=2.26.0,<3.0", ++ "requests<3.0", + "isodate", + "lxml>=4.6.3", +- "websocket-client>=0.58.0", ++ "websocket-client", + # Support for SOCKS proxies + "PySocks!=1.5.7,>=1.5.6", + ] diff --git a/python-streamlink-2.4.0-doc.patch b/python-streamlink-2.4.0-doc.patch new file mode 100644 index 0000000..34302ef --- /dev/null +++ b/python-streamlink-2.4.0-doc.patch @@ -0,0 +1,20 @@ +diff -up ./docs/conf.py.orig ./docs/conf.py +--- ./docs/conf.py.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./docs/conf.py 2021-09-07 07:11:07.300172544 +0200 +@@ -90,7 +90,7 @@ github_project = 'streamlink/streamlink' + + # The theme to use for HTML and HTML Help pages. See the documentation for + # a list of builtin themes. +-html_theme = 'furo' ++html_theme = 'sphinx_rtd_theme' + + # Theme options are theme-specific and customize the look and feel of a theme + # further. For a list of options available for each theme, see the +diff -up ./docs-requirements.txt.orig ./docs-requirements.txt +--- ./docs-requirements.txt.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./docs-requirements.txt 2021-09-07 07:11:38.331663357 +0200 +@@ -1,3 +1,3 @@ + sphinx>=3.0 +-furo==2020.12.28.beta23 ++sphinx_rtd_theme + recommonmark>=0.5.0 diff --git a/python-streamlink-2.4.0-pycryptodomex.patch b/python-streamlink-2.4.0-pycryptodomex.patch new file mode 100644 index 0000000..84181ec --- /dev/null +++ b/python-streamlink-2.4.0-pycryptodomex.patch @@ -0,0 +1,132 @@ +diff -up ./setup.py.orig ./setup.py +--- ./setup.py.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./setup.py 2021-09-07 05:47:52.703517898 +0200 +@@ -23,7 +23,7 @@ if environ.get("STREAMLINK_USE_PYCRYPTO" + deps.append("pycrypto") + else: + # this version of pycryptodome is known to work and has a Windows wheel for py2.7, py3.3-3.6 +- deps.append("pycryptodome>=3.4.3,<4") ++ deps.append("pycryptodomex>=3.4.3,<4") + + # for localization + if environ.get("STREAMLINK_USE_PYCOUNTRY"): +diff -up ./src/streamlink/plugins/abematv.py.orig ./src/streamlink/plugins/abematv.py +--- ./src/streamlink/plugins/abematv.py.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./src/streamlink/plugins/abematv.py 2021-09-07 05:49:16.301772649 +0200 +@@ -8,7 +8,7 @@ import uuid + from base64 import urlsafe_b64encode + from binascii import unhexlify + +-from Crypto.Cipher import AES ++from Cryptodome.Cipher import AES + from requests import Response + from requests.adapters import BaseAdapter + +diff -up ./src/streamlink/plugins/mjunoon.py.orig ./src/streamlink/plugins/mjunoon.py +--- ./src/streamlink/plugins/mjunoon.py.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./src/streamlink/plugins/mjunoon.py 2021-09-07 05:49:16.306772724 +0200 +@@ -3,8 +3,8 @@ import logging + import re + from urllib.parse import urljoin + +-from Crypto.Cipher import AES +-from Crypto.Util.Padding import unpad ++from Cryptodome.Cipher import AES ++from Cryptodome.Util.Padding import unpad + + from streamlink.plugin import Plugin, pluginmatcher + from streamlink.plugin.api import validate +diff -up ./src/streamlink/plugins/rtve.py.orig ./src/streamlink/plugins/rtve.py +--- ./src/streamlink/plugins/rtve.py.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./src/streamlink/plugins/rtve.py 2021-09-07 05:49:16.310772784 +0200 +@@ -3,7 +3,7 @@ import logging + import re + from urllib.parse import urlparse + +-from Crypto.Cipher import Blowfish ++from Cryptodome.Cipher import Blowfish + + from streamlink.plugin import Plugin, PluginArgument, PluginArguments, pluginmatcher + from streamlink.plugin.api import validate +diff -up ./src/streamlink/plugins/steam.py.orig ./src/streamlink/plugins/steam.py +--- ./src/streamlink/plugins/steam.py.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./src/streamlink/plugins/steam.py 2021-09-07 05:49:16.314772844 +0200 +@@ -4,8 +4,8 @@ import re + import time + from html import unescape as html_unescape + +-from Crypto.Cipher import PKCS1_v1_5 +-from Crypto.PublicKey import RSA ++from Cryptodome.Cipher import PKCS1_v1_5 ++from Cryptodome.PublicKey import RSA + + import streamlink + from streamlink.exceptions import FatalPluginError +diff -up ./src/streamlink/plugins/ustvnow.py.orig ./src/streamlink/plugins/ustvnow.py +--- ./src/streamlink/plugins/ustvnow.py.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./src/streamlink/plugins/ustvnow.py 2021-09-07 05:49:16.318772904 +0200 +@@ -5,9 +5,9 @@ import re + from urllib.parse import urljoin, urlparse + from uuid import uuid4 + +-from Crypto.Cipher import AES +-from Crypto.Hash import SHA256 +-from Crypto.Util.Padding import pad, unpad ++from Cryptodome.Cipher import AES ++from Cryptodome.Hash import SHA256 ++from Cryptodome.Util.Padding import pad, unpad + + from streamlink.plugin import Plugin, PluginArgument, PluginArguments, PluginError, pluginmatcher + from streamlink.stream import HLSStream +diff -up ./src/streamlink/plugins/webtv.py.orig ./src/streamlink/plugins/webtv.py +--- ./src/streamlink/plugins/webtv.py.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./src/streamlink/plugins/webtv.py 2021-09-07 05:49:16.323772979 +0200 +@@ -3,7 +3,7 @@ import binascii + import logging + import re + +-from Crypto.Cipher import AES ++from Cryptodome.Cipher import AES + + from streamlink.plugin import Plugin, pluginmatcher + from streamlink.plugin.api import validate +diff -up ./src/streamlink/stream/hls.py.orig ./src/streamlink/stream/hls.py +--- ./src/streamlink/stream/hls.py.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./src/streamlink/stream/hls.py 2021-09-07 05:49:16.327773039 +0200 +@@ -8,9 +8,9 @@ from typing import List, NamedTuple, Opt + from urllib.parse import urlparse + + # noinspection PyPackageRequirements +-from Crypto.Cipher import AES ++from Cryptodome.Cipher import AES + # noinspection PyPackageRequirements +-from Crypto.Util.Padding import unpad ++from Cryptodome.Util.Padding import unpad + from requests import Response + from requests.exceptions import ChunkedEncodingError, ConnectionError, ContentDecodingError + +diff -up ./src/streamlink/utils/crypto.py.orig ./src/streamlink/utils/crypto.py +--- ./src/streamlink/utils/crypto.py.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./src/streamlink/utils/crypto.py 2021-09-07 05:49:16.332773114 +0200 +@@ -1,6 +1,6 @@ + import hashlib + +-from Crypto.Cipher import AES ++from Cryptodome.Cipher import AES + + + def evp_bytestokey(password, salt, key_len, iv_len): +diff -up ./tests/streams/test_hls.py.orig ./tests/streams/test_hls.py +--- ./tests/streams/test_hls.py.orig 2021-09-07 04:29:55.000000000 +0200 ++++ ./tests/streams/test_hls.py 2021-09-07 05:49:16.336773174 +0200 +@@ -6,8 +6,8 @@ from unittest.mock import Mock, call, pa + + import pytest + import requests_mock +-from Crypto.Cipher import AES +-from Crypto.Util.Padding import pad ++from Cryptodome.Cipher import AES ++from Cryptodome.Util.Padding import pad + + from streamlink.session import Streamlink + from streamlink.stream import hls diff --git a/python-streamlink.spec b/python-streamlink.spec index 5ca6a54..552d2f0 100644 --- a/python-streamlink.spec +++ b/python-streamlink.spec @@ -7,7 +7,7 @@ who want access to the video stream data. This project was forked from Livestreamer, which is no longer maintained.} Name: python-%{srcname} -Version: 2.3.0 +Version: 2.4.0 Release: 1%{?dist} Summary: Python library for extracting streams from various websites @@ -16,33 +16,15 @@ License: BSD and ASL 2.0 URL: https://streamlink.github.io/ Source0: https://github.com/%{srcname}/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz # Use pycryptodomex library instead of crypto/pycryptodome -Patch0: %{name}-2.3.0-pycryptodomex.patch +Patch0: %{name}-2.4.0-pycryptodomex.patch # Use sphinx-rtd-theme to build documentation instead of furo (not available in # Fedora, see also https://bugzilla.redhat.com/show_bug.cgi?id=1910798) -Patch1: %{name}-2.0.0-doc.patch +Patch1: %{name}-2.4.0-doc.patch # Fix dependencies version -Patch2: %{name}-2.3.0-dependencies.patch +Patch2: %{name}-2.4.0-dependencies.patch BuildRequires: python3-devel -BuildRequires: %{py3_dist setuptools} -# Needed for documentation BuildRequires: make -BuildRequires: %{py3_dist iso-639} -BuildRequires: %{py3_dist iso3166} -BuildRequires: %{py3_dist isodate} -BuildRequires: %{py3_dist pycryptodomex} -BuildRequires: %{py3_dist pysocks} -BuildRequires: %{py3_dist recommonmark} -BuildRequires: %{py3_dist requests} -BuildRequires: %{py3_dist setuptools} -BuildRequires: %{py3_dist sphinx} -BuildRequires: %{py3_dist sphinx-rtd-theme} -BuildRequires: %{py3_dist websocket-client} -# Needed for tests -BuildRequires: %{py3_dist freezegun} -BuildRequires: %{py3_dist mock} -BuildRequires: %{py3_dist pytest} -BuildRequires: %{py3_dist requests-mock} BuildArch: noarch %description @@ -51,8 +33,6 @@ BuildArch: noarch %package -n python3-%{srcname} Summary: %{summary} -Requires: %{py3_dist setuptools} -%{?python_provide:%python_provide python3-%{srcname}} Provides: %{srcname} = %{version}-%{release} %description -n python3-%{srcname} @@ -74,75 +54,46 @@ This package provides documentation for %{name}. %prep %autosetup -n %{srcname}-%{version} -p1 -# Remove shebang -for i in $(find src/%{srcname}/ -name "*.py"); do - sed '1{\@^#!/usr/bin/env python@d}' $i >$i.new && \ - touch -r $i $i.new && \ - mv $i.new $i -done +%generate_buildrequires +%pyproject_buildrequires -r dev-requirements.txt docs-requirements.txt %build -%py3_build +%pyproject_wheel # Generate documentation -%{__python3} setup.py build_sphinx -b man -%{__python3} setup.py build_sphinx -b html -rm build/sphinx/html/.buildinfo - -# Drop bundled web fonts in HTML documentation -if [[ -d build/sphinx/html/_static/fonts/ ]]; then - pushd build/sphinx/html/_static/fonts/ - - for f in fontawesome-webfont.*; do - rm "$f" - [[ "${f##*.}" = "ttf" ]] && ln -s "%{_fontbasedir}/fontawesome/$f" . - done - - pushd Lato/ - rm * - for i in Bold BoldItalic Italic Regular; do - ln -s "%{_fontbasedir}/lato/Lato-$i.ttf" "lato-${i,,}.ttf" - done - popd - - pushd RobotoSlab/ - rm * - for i in Bold Regular; do - ln -s "%{_fontbasedir}/google-roboto-slab-fonts/RobotoSlab-$i.ttf" "roboto-slab-v7-${i,,}.ttf" - done - popd - popd -fi +PYTHONPATH=$PWD/src/ %make_build -C docs/ html man +rm docs/_build/html/.buildinfo %install -%py3_install +%pyproject_install +%pyproject_save_files %{srcname} %{srcname}_cli # Install man page -install -Dpm 0644 build/sphinx/man/%{srcname}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{srcname}.1 +install -Dpm 0644 docs/_build/man/%{srcname}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{srcname}.1 %check TZ=UTC %pytest -%files -n python3-%{srcname} +%files -n python3-%{srcname} -f %{pyproject_files} %doc AUTHORS CHANGELOG.md CONTRIBUTING.md KNOWN_ISSUES.md README.md %license LICENSE NOTICE %{_bindir}/%{srcname} -%{python3_sitelib}/%{srcname}/ -%{python3_sitelib}/%{srcname}-*.egg-info/ -%{python3_sitelib}/%{srcname}_cli/ %{_mandir}/man1/%{srcname}.1.* %files doc -%doc build/sphinx/html/ +%doc docs/_build/html/ %license LICENSE %changelog +* Tue Sep 07 2021 Mohamed El Morabity - 2.4.0-1 +- Update to 2.4.0 + * Mon Jul 26 2021 Mohamed El Morabity - 2.3.0-1 - Update to 2.3.0 diff --git a/sources b/sources index 1595789..d834673 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (streamlink-2.3.0.tar.gz) = f52766df5e417ab951022f4a0656b1e8213120ef55f2db6237bfd504b3e4ed0e18e180363e4966fcfe32d42f9f1aecb93107572ad23c122366c8ecb3359fc732 +SHA512 (streamlink-2.4.0.tar.gz) = 91debae0a72351985b0d67c644a81002e82137224937b7742aa74b43eb44112ba21f9ee41537462e4ee75102a02e2415d774fdf4356f83592140cd9c6c614e92