summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/bilibili-api-python/default.nix
blob: e5560e774213d6755c90242d2cdcfca92e94d9d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
  aiohttp,
  apscheduler,
  beautifulsoup4,
  brotli,
  buildPythonPackage,
  colorama,
  fetchPypi,
  httpx,
  lib,
  lxml,
  pillow,
  pycryptodomex,
  pyjwt,
  pyyaml,
  qrcode,
  qrcode-terminal,
  rsa,
  setuptools,
  setuptools-scm,
  tqdm,
  yarl,
}:

buildPythonPackage rec {
  pname = "bilibili-api-python";
  version = "17.4.1";
  pyproject = true;

  src = fetchPypi {
    pname = "bilibili_api_python";
    inherit version;
    hash = "sha256-Ww8WRoz7s+6AHH18yXD5CCJS9nWMbYxIxdjaxCI1y2I=";
  };

  # The upstream uses requirements.txt, which overly strict version constraints.
  pythonRelaxDeps = [
    "beautifulsoup4"
    "lxml"
    "pillow"
  ];

  build-system = [
    setuptools-scm
    setuptools
  ];

  dependencies = [
    aiohttp
    beautifulsoup4
    colorama
    lxml
    pyyaml
    brotli
    httpx
    qrcode
    apscheduler
    rsa
    pillow
    tqdm
    yarl
    pycryptodomex
    pyjwt
    qrcode-terminal
  ];

  # tests require network
  doCheck = false;

  pythonImportsCheck = [ "bilibili_api" ];

  meta = {
    changelog = "https://github.com/Nemo2011/bilibili-api/releases/tag/${version}";
    description = "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 ];
  };
}