1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, mock
5, pytestCheckHook
6, pythonOlder
7, requests
8, requests-oauthlib
9, responses
10, six
11}:
12
13buildPythonPackage rec {
14 version = "0.10.1";
15 pname = "mwclient";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.6";
19
20 src = fetchFromGitHub {
21 owner = "mwclient";
22 repo = "mwclient";
23 rev = "v${version}";
24 sha256 = "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj";
25 };
26
27 propagatedBuildInputs = [
28 requests
29 requests-oauthlib
30 six
31 ];
32
33 checkInputs = [
34 mock
35 pytestCheckHook
36 responses
37 ];
38
39 postPatch = ''
40 substituteInPlace setup.cfg \
41 --replace " --cov mwclient test" ""
42 '';
43
44 pythonImportsCheck = [
45 "mwclient"
46 ];
47
48 meta = with lib; {
49 description = "Python client library to the MediaWiki API";
50 license = licenses.mit;
51 homepage = "https://github.com/mwclient/mwclient";
52 maintainers = with maintainers; [ ];
53 };
54}