Merge pull request #314645 from Moraxyc/add-bilibili-api-python

python3Packages.bilibili-api-python: init
This commit is contained in:
OTABI Tomoya 2024-06-01 09:59:06 +09:00 committed by GitHub
commit f99897f4e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 118 additions and 0 deletions

View File

@ -0,0 +1,76 @@
{
aiohttp,
apscheduler,
beautifulsoup4,
brotli,
buildPythonPackage,
colorama,
fetchPypi,
httpx,
lib,
lxml,
pillow,
pycryptodomex,
pyyaml,
qrcode,
qrcode-terminal,
requests,
rsa,
setuptools,
setuptools-scm,
tqdm,
yarl,
}:
buildPythonPackage rec {
pname = "bilibili-api-python";
version = "16.2.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-ecv9lzp2L13seBosahgnglaZP8YZCD/13nlTPP8LCs0=";
};
postPatch = ''
# The upstream uses requirements.txt, which overly strict version constraints.
substituteInPlace requirements.txt \
--replace-fail "~=" ">="
'';
build-system = [
setuptools-scm
setuptools
];
dependencies = [
aiohttp
beautifulsoup4
colorama
lxml
pyyaml
brotli
httpx
qrcode
requests
apscheduler
rsa
pillow
tqdm
yarl
pycryptodomex
qrcode-terminal
];
# tests require network
doCheck = false;
pythonImportsCheck = [ "bilibili_api" ];
meta = {
changelog = "https://github.com/Nemo2011/bilibili-api/releases/tag/${version}";
description = "A python module providing convenient integration for various Bilibili API along with some additional common features";
homepage = "https://nemo2011.github.io/bilibili-api";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ moraxyc ];
};
}

View File

@ -0,0 +1,38 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
qrcode,
pillow,
}:
buildPythonPackage rec {
pname = "qrcode-terminal";
version = "0.8";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-Hitp5mK5NG6Y3ZWYMDPp1Dz/BkPYr9oSYF9RVCjmZsA=";
};
build-system = [ setuptools ];
dependencies = [
qrcode
pillow
];
# have no test
doCheck = false;
pythonImportsCheck = [ "qrcode_terminal" ];
meta = {
description = "Display QRCode in Terminal";
homepage = "https://github.com/alishtory/qrcode-terminal";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ moraxyc ];
mainProgram = "qrcode-terminal-py";
};
}

View File

@ -1525,6 +1525,8 @@ self: super: with self; {
biliass = callPackage ../development/python-modules/biliass { };
bilibili-api-python = callPackage ../development/python-modules/bilibili-api-python { };
billiard = callPackage ../development/python-modules/billiard { };
bimmer-connected = callPackage ../development/python-modules/bimmer-connected { };
@ -12907,6 +12909,8 @@ self: super: with self; {
qrcode = callPackage ../development/python-modules/qrcode { };
qrcode-terminal = callPackage ../development/python-modules/qrcode-terminal { };
qreactor = callPackage ../development/python-modules/qreactor { };
qscintilla-qt5 = pkgs.libsForQt5.callPackage ../development/python-modules/qscintilla-qt5 {