From 206f9ce2e008ac85e58fcfbf731e60ab2847e5d8 Mon Sep 17 00:00:00 2001 From: "nagato.pain" Date: Sat, 13 Oct 2018 10:24:23 -0700 Subject: [PATCH] pythonPackages.mwclient: 0.8.3 -> 0.9.1 | move to a seperate file --- .../python-modules/mwclient/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 30 ++----------------- 2 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 pkgs/development/python-modules/mwclient/default.nix diff --git a/pkgs/development/python-modules/mwclient/default.nix b/pkgs/development/python-modules/mwclient/default.nix new file mode 100644 index 000000000000..186bc26f002f --- /dev/null +++ b/pkgs/development/python-modules/mwclient/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, requests, requests_oauthlib +, responses, mock, pytestcov, pytest, pytestcache, pytestpep8, coverage, six }: + +buildPythonPackage rec { + version = "0.9.1"; + pname = "mwclient"; + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "mwclient"; + repo = "mwclient"; + rev = "v${version}"; + sha256 = "0l7l5j7znlyn2yqvdfxr4dq23wyp6d8z49pnkjqy2kan11nrjzym"; + }; + + buildInputs = [ mock responses pytestcov pytest pytestcache pytestpep8 coverage ]; + + propagatedBuildInputs = [ six requests requests_oauthlib ]; + + checkPhase = '' + py.test + ''; + + meta = with stdenv.lib; { + description = "Python client library to the MediaWiki API"; + maintainers = with maintainers; [ ]; + license = licenses.mit; + homepage = https://github.com/mwclient/mwclient; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3ab1af6c32a9..30c9de1c445a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -390,6 +390,8 @@ in { mpi = pkgs.openmpi; }; + mwclient = callPackage ../development/python-modules/mwclient { }; + mwoauth = callPackage ../development/python-modules/mwoauth { }; nest-asyncio = callPackage ../development/python-modules/nest-asyncio { }; @@ -7479,34 +7481,6 @@ in { mypy-protobuf = callPackage ../development/python-modules/mypy-protobuf { }; - mwclient = buildPythonPackage rec { - version = "0.8.3"; - pname = "mwclient"; - name = "${pname}-${version}"; - - src = pkgs.fetchFromGitHub { - owner = "mwclient"; - repo = "mwclient"; - rev = "v${version}"; - sha256 = "0kl1yp9z5f1wl6lkm0vix87zkrbl9wcmkrrj1x5c35xvf95laf53"; - }; - - buildInputs = with self; [ mock responses pytestcov pytest pytestcache pytestpep8 coverage ]; - - propagatedBuildInputs = with self; [ six requests requests_oauthlib ]; - - checkPhase = '' - py.test - ''; - - meta = { - description = "Python client library to the MediaWiki API"; - maintainers = with maintainers; [ ]; - license = licenses.mit; - homepage = https://github.com/mwclient/mwclient; - }; - }; - neuronpy = buildPythonPackage rec { name = "neuronpy-${version}"; version = "0.1.6";