summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-twitch-client/default.nix
blob: 99c0672638e9cd6bb47404ca14bd1061e07a6ff8 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
  requests,
  responses,
  setuptools,
}:

buildPythonPackage rec {
  pname = "python-twitch-client";
  version = "0.7.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "tsifrer";
    repo = "python-twitch-client";
    tag = version;
    sha256 = "sha256-gxBpltwExb9bg3HLkz/MNlP5Q3/x97RHxhbwNqqanIM=";
  };

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [ requests ];

  nativeCheckInputs = [
    pytestCheckHook
    responses
  ];

  pythonImportsCheck = [ "twitch" ];

  disabledTests = [
    # Tests require network access
    "test_delete_from_community"
    "test_update"
  ];

  meta = {
    description = "Python wrapper for the Twitch API";
    homepage = "https://github.com/tsifrer/python-twitch-client";
    changelog = "https://github.com/tsifrer/python-twitch-client/blob/${version}/CHANGELOG.md";
    license = with lib.licenses; [ mit ];
    maintainers = with lib.maintainers; [ fab ];
  };
}