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