1{ lib
2, buildPythonPackage
3, six
4, pyjwt
5, requests
6, oauthlib
7, requests_oauthlib
8, fetchPypi
9}:
10
11buildPythonPackage rec {
12 pname = "mwoauth";
13 version = "0.3.7";
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "9e0d70a1fa6f452584de1cb853ae6c11f41233549f7839cfb879f99410f6ad46";
18 };
19
20 propagatedBuildInputs = [
21 oauthlib
22 pyjwt
23 requests
24 requests_oauthlib
25 six
26 ];
27
28 postPatch = ''
29 # https://github.com/mediawiki-utilities/python-mwoauth/pull/43
30 substituteInPlace setup.py --replace "PyJWT>=1.0.1,<2.0.0" "PyJWT>=1.0.1"
31 '';
32
33 # PyPI source has no tests included
34 # https://github.com/mediawiki-utilities/python-mwoauth/issues/44
35 doCheck = false;
36
37 pythonImportsCheck = [ "mwoauth" ];
38
39 meta = with lib; {
40 description = "Python library to perform OAuth handshakes with a MediaWiki installation";
41 homepage = "https://github.com/mediawiki-utilities/python-mwoauth";
42 license = licenses.mit;
43 maintainers = with maintainers; [ ixxie ];
44 };
45}