about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pydiscourse/default.nix
blob: f897509c182e1f566438594beba040c570942117 (plain) (blame)
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
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest-mock
, pytestCheckHook
, pythonOlder
, requests
, requests-mock
}:

buildPythonPackage rec {
  pname = "pydiscourse";
  version = "1.6.1";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "pydiscourse";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-BvVKOfc/PiAnkEnH5jsd8/0owr+ZvJIz/tpZx6K0fP0=";
  };

  propagatedBuildInputs = [
    requests
  ];

  nativeCheckInputs = [
    pytest-mock
    pytestCheckHook
    requests-mock
  ];

  pythonImportsCheck = [
    "pydiscourse"
  ];

  meta = with lib; {
    description = "A Python library for working with Discourse";
    homepage = "https://github.com/pydiscourse/pydiscourse";
    changelog = "https://github.com/pydiscourse/pydiscourse/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ Dettorer ];
  };
}