From ffb043b76939c274c798ff93b449e802a6180684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 27 Aug 2017 15:57:01 +0100 Subject: [PATCH] python.pkgs.requests: 2.13.0 -> 2.18.4 --- .../python-modules/requests/default.nix | 25 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 20 +-------------- 2 files changed, 26 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/requests/default.nix diff --git a/pkgs/development/python-modules/requests/default.nix b/pkgs/development/python-modules/requests/default.nix new file mode 100644 index 00000000000..b85bb54a4f1 --- /dev/null +++ b/pkgs/development/python-modules/requests/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchPypi, buildPythonPackage +, urllib3, idna, chardet, certifi +, pytest }: + +buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "requests"; + version = "2.18.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "0zi3v9nsmv9j27d0c0m1dvqyvaxz53g8m0aa1h3qanxs4irkwi4w"; + }; + + nativeBuildInputs = [ pytest ]; + propagatedBuildInputs = [ urllib3 idna chardet certifi ]; + # sadly, tests require networking + doCheck = false; + + meta = with stdenv.lib; { + description = "An Apache2 licensed HTTP library, written in Python, for human beings"; + homepage = http://docs.python-requests.org/en/latest/; + license = licenses.asl20; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 353fa9eec82..ccc01a4abf4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -19269,25 +19269,7 @@ in { requests2 = throw "requests2 has been deprecated. Use requests instead."; # use requests, not requests_2 - requests = buildPythonPackage rec { - name = "requests-${version}"; - version = "2.13.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/r/requests/${name}.tar.gz"; - sha256 = "5722cd09762faa01276230270ff16af7acf7c5c45d623868d9ba116f15791ce8"; - }; - - nativeBuildInputs = [ self.pytest ]; - # sadly, tests require networking - doCheck = false; - - meta = { - description = "An Apache2 licensed HTTP library, written in Python, for human beings"; - homepage = http://docs.python-requests.org/en/latest/; - license = licenses.asl20; - }; - }; + requests = callPackage ../development/python-modules/requests { }; requests_download = buildPythonPackage rec { pname = "requests_download";