1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytest-mock,
6 pytestCheckHook,
7 pythonOlder,
8 requests,
9 requests-mock,
10}:
11
12buildPythonPackage rec {
13 pname = "pydiscourse";
14 version = "1.7.0";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "pydiscourse";
21 repo = "pydiscourse";
22 tag = "v${version}";
23 hash = "sha256-KqJ6ag4owG7US5Q4Ygjq263ds1o/JhEJ3bNa8YecYtE=";
24 };
25
26 propagatedBuildInputs = [ requests ];
27
28 nativeCheckInputs = [
29 pytest-mock
30 pytestCheckHook
31 requests-mock
32 ];
33
34 pythonImportsCheck = [ "pydiscourse" ];
35
36 meta = with lib; {
37 description = "Python library for working with Discourse";
38 mainProgram = "pydiscoursecli";
39 homepage = "https://github.com/pydiscourse/pydiscourse";
40 changelog = "https://github.com/pydiscourse/pydiscourse/releases/tag/v${version}";
41 license = licenses.mit;
42 maintainers = with maintainers; [ Dettorer ];
43 };
44}