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