2022-02-25 14:36:34 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-oauthlib
|
|
|
|
, responses
|
|
|
|
, six
|
2019-02-20 13:39:33 +00:00
|
|
|
}:
|
2018-10-13 17:24:23 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-07-06 14:32:08 +00:00
|
|
|
version = "0.10.1";
|
2018-10-13 17:24:23 +00:00
|
|
|
pname = "mwclient";
|
2022-02-25 14:36:34 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2018-10-13 17:24:23 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mwclient";
|
|
|
|
repo = "mwclient";
|
|
|
|
rev = "v${version}";
|
2020-07-06 14:32:08 +00:00
|
|
|
sha256 = "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj";
|
2018-10-13 17:24:23 +00:00
|
|
|
};
|
|
|
|
|
2022-02-25 14:36:34 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
requests-oauthlib
|
|
|
|
six
|
|
|
|
];
|
2018-10-13 17:24:23 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-25 14:36:34 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
responses
|
|
|
|
];
|
2018-10-13 17:24:23 +00:00
|
|
|
|
2022-02-25 14:36:34 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace " --cov mwclient test" ""
|
2018-10-13 17:24:23 +00:00
|
|
|
'';
|
|
|
|
|
2022-02-25 14:36:34 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"mwclient"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-13 17:24:23 +00:00
|
|
|
description = "Python client library to the MediaWiki API";
|
|
|
|
license = licenses.mit;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/mwclient/mwclient";
|
2022-02-25 14:36:34 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2018-10-13 17:24:23 +00:00
|
|
|
};
|
2018-10-17 04:04:24 +00:00
|
|
|
}
|