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