bump feeluown and add new plugin (bilibili & youtube music) (#3361)

* media-sound/feeluown: bump feeluown version and add new plugin

* dev-python/feeluown-bilibili: patch feeluown bilibili to replace
pycryptodomex

* */*: fix pkgcheck error

* dev-python/*:  fix pkgcheck error

* */*: remove python 3.12 support
This commit is contained in:
wgjak47 authored and GitHub committed 2023-06-21 01:23:43 +08:00
1 parent ef00274c81
commit fa3bc39b5c
19 files changed
+195 -45

No files matched your search

+1
View File
@@ -0,0 +1 @@
DIST feeluown_bilibili-0.1.5.tar.gz 54756 BLAKE2B ab58acb7a55c37999b96497ea0fc82879f82f37714bf3ecac3f369973e107bb378ebe57c4feb08f3076bd544ad87a7abca75803bb9ab22fd168960e93de9c972 SHA512 e32b7ad1f9fa59fd5e61ab0b3863188c9348980ca083aed69a72655cc5ed06713d80949750038fe6646ee682c87a131feadbd8b2fcf174a37d91fa9c8a0f669d
@@ -0,0 +1,33 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=poetry
PYTHON_COMPAT=( python3_{10..11} )
inherit distutils-r1 pypi
DESCRIPTION="bilibili support for feeluown"
HOMEPAGE="https://github.com/feeluown/feeluown-bilibili"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
dev-python/pycryptodome[${PYTHON_USEDEP}]
dev-python/cachetools[${PYTHON_USEDEP}]
"
PDEPEND="
media-sound/feeluown
"
PATCHES=(
"${FILESDIR}/${PN}-0.1.5-replace-pycryptodomex.patch"
)
python_install_all() {
distutils-r1_python_install_all
}
@@ -0,0 +1,55 @@
From debeec6349611107f8421ef7f4c5cbf1effac4b7 Mon Sep 17 00:00:00 2001
From: wgjak47 <ak47m61@gmail.com>
Date: Tue, 20 Jun 2023 21:58:45 +0800
Subject: [PATCH] feat: replace pycryptodomex with pycryptodome
---
fuo_bilibili/util.py | 4 +-
pyproject.toml | 2 +-
setup.py | 2 +-
5 files changed, 205 insertions(+), 244 deletions(-)
diff --git a/fuo_bilibili/util.py b/fuo_bilibili/util.py
index bc9db3d..576ff6c 100644
--- a/fuo_bilibili/util.py
+++ b/fuo_bilibili/util.py
@@ -11,8 +11,8 @@ def rsa_encrypt(text: str, public_key: str) -> str:
:return:
"""
import base64
- from Cryptodome.PublicKey import RSA
- from Cryptodome.Cipher import PKCS1_v1_5
+ from Crypto.PublicKey import RSA
+ from Crypto.Cipher import PKCS1_v1_5
key = RSA.import_key(public_key.encode())
encrypted = PKCS1_v1_5.new(key).encrypt(text.encode())
return base64.b64encode(encrypted).decode()
diff --git a/poetry.lock b/poetry.lock
index 752b3e7..127cb3b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -14,7 +14,7 @@ python = "^3.10"
feeluown = ">=3.8.7"
cachetools = "*"
beautifulsoup4 = "*"
-pycryptodomex = "*"
+pycryptodome = "*"
[tool.poetry.dev-dependencies]
pytest = "*"
diff --git a/setup.py b/setup.py
index 0f696b6..4e629ae 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ package_data = \
{'': ['*'], 'fuo_bilibili': ['assets/*']}
install_requires = \
-['beautifulsoup4', 'cachetools', 'feeluown>=3.8.7', 'pycryptodomex']
+['beautifulsoup4', 'cachetools', 'feeluown>=3.8.7', 'pycryptodome']
entry_points = \
{'fuo.plugins_v1': ['bilibili = fuo_bilibili']}
--
2.39.3
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
<remote-id type="github">feeluown/feeluown-bilibili</remote-id>
<remote-id type="pypi">feeluown-bilibili</remote-id>
</upstream>
</pkgmetadata>
-1
View File
@@ -1 +0,0 @@
DIST fuo_local-0.3.tar.gz 10498 BLAKE2B 842ae39f302c78a896ab77c5c48a43b229188ec01b2f1f53b258390ffcf4c771446bfeba60cec9e415e08f40b7b6ea2de16c0fa6a8c55129a6b237a450558362 SHA512 af656ed48bff252699d4043b8bc5b0b931f530a047f38ac649f4e2b0d27f703ee6a711fb0bed62e051ce89382628c32820a3194555489ca858cbe41396a40032
-29
View File
@@ -1,29 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} )
inherit distutils-r1 pypi
DESCRIPTION="local music support for feeluown"
HOMEPAGE="https://github.com/feeluown/feeluown-local"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
dev-python/marshmallow[${PYTHON_USEDEP}]
dev-python/fuzzywuzzy[${PYTHON_USEDEP}]
media-libs/mutagen[${PYTHON_USEDEP}]
"
PDEPEND="
media-sound/feeluown
"
python_install_all() {
distutils-r1_python_install_all
}
+1 -1
View File
@@ -1 +1 @@
DIST fuo_netease-0.9.4.tar.gz 32991 BLAKE2B 8ca38e6202ad09169a85678e17f1f3fdb1123e33e9e9d65ed6061195249bcb445d7bfb44770511294e9acc7f599fe22e495660cf18935ff0fe6ae029c168fd9c SHA512 11f76786f8c1ef6b19f81c936f8387e9938ee62b07f562cbaff9cc12b4fc6240b0561d3219ac4b447449fe580457019d6d0c5e1433ce1622636f5fd0389e6f6b
DIST fuo_netease-0.9.6.tar.gz 32501 BLAKE2B 1069fa1d51c48998f5d7705ed8e2bf631ad0f642b4a1559e6f1f0444533e162f4d52062a7bcc5e97e02f26ed8d693fe8f2ffebf9879481d2d7e68f015aee5878 SHA512 9de056d4715760dac68c33d16b03e16c38b5bab0630ae1b2d58a4153af4e27118ae17f10dc55c05faebd548626a0f683c41fd2bee2944c14f1537580bd8df650
@@ -3,7 +3,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} )
PYTHON_COMPAT=( python3_{9..11} pypy)
inherit distutils-r1 pypi
@@ -19,6 +19,7 @@ RDEPEND="
dev-python/requests[${PYTHON_USEDEP}]
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
dev-python/pycryptodome[${PYTHON_USEDEP}]
media-libs/mutagen[${PYTHON_USEDEP}]
"
PDEPEND="
@@ -1,9 +1,9 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} )
PYTHON_COMPAT=( python3_{9..11} pypy)
inherit distutils-r1 pypi
+1
View File
@@ -0,0 +1 @@
DIST fuo-ytmusic-0.2.0.gh.tar.gz 53182 BLAKE2B 3545d8ea2e0333636deab29d33459d1e42efd92bed65a478a371b9853ecebf8a9e1448e773efd10631e4fb46c4c5a9f3761d1ede8b7c7fa5a1e3f8395f0b9ca7 SHA512 01e6f73581646a94925488fc885210d14a15f863f47c8ab560c5dcb0544acc1d61f16a1c0716a67e7c560c4584cbdfa31d54f09bfa29cc07cb2575428fedcd24
@@ -0,0 +1,34 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..11} pypy)
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1
DESCRIPTION="youtube music support for feeluown"
HOMEPAGE="https://github.com/feeluown/feeluown-ytmusic"
S="${WORKDIR}/feeluown-ytmusic-${PV}"
SRC_URI="https://github.com/feeluown/feeluown-ytmusic/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
dev-python/pycryptodome[${PYTHON_USEDEP}]
dev-python/cachetools[${PYTHON_USEDEP}]
dev-python/pytube[${PYTHON_USEDEP}]
dev-python/ytmusicapi[${PYTHON_USEDEP}]
"
PDEPEND="
media-sound/feeluown
"
python_install_all() {
distutils-r1_python_install_all
}
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
<remote-id type="github">feeluown/feeluown-ytmusic</remote-id>
<remote-id type="pypi">fuo-ytmusic</remote-id>
</upstream>
</pkgmetadata>
+1
View File
@@ -0,0 +1 @@
DIST pytube-15.0.0.tar.gz 67229 BLAKE2B 6894ec98c9c41ce42479278d47e3de2ee3564f670cb0a85e6591af152484ae2cbdc1d6e9613977c76bebe42ba963e0ab707ad99def5d4b1c0c50c2b82d2dae86 SHA512 68174a3392e5f2ff3059dc1f301783b1ce0a0334044b9e96b6066052066b3c3cee93bfc87449d10589795b3e43055cf6d629f1cac21bfc9ea2c4249b5f264c26
@@ -3,7 +3,7 @@
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
<remote-id type="github">feeluown/feeluown-local</remote-id>
<remote-id type="pypi">fuo-local</remote-id>
<remote-id type="github">pytube/pytube</remote-id>
<remote-id type="pypi">pytube</remote-id>
</upstream>
</pkgmetadata>
+33
View File
@@ -0,0 +1,33 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1 pypi
DESCRIPTION="Python tools for downloading YouTube Videos"
HOMEPAGE="https://github.com/pytube/pytube"
IUSE="test"
RESTRICT="!test? ( test )"
LICENSE="Unlicense"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/pytest-mock[${PYTHON_USEDEP}]
)
"
python_test() {
py.test -v || die "Tests fail with ${EPYTHON}"
}
python_install_all() {
distutils-r1_python_install_all
}