From 146fdc88cb092ca7c78f961f07cf1524b06c00d5 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 2 Sep 2017 13:40:49 +0200 Subject: [PATCH] python.pkgs.aiohttp: 1.3.5 -> 2.2.5 --- .../python-modules/aiohttp/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 33 +---------------- 2 files changed, 37 insertions(+), 32 deletions(-) create mode 100644 pkgs/development/python-modules/aiohttp/default.nix diff --git a/pkgs/development/python-modules/aiohttp/default.nix b/pkgs/development/python-modules/aiohttp/default.nix new file mode 100644 index 00000000000..72b28d01cea --- /dev/null +++ b/pkgs/development/python-modules/aiohttp/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, chardet +, multidict +, async-timeout +, yarl +, pytest +, gunicorn +, pytest-raisesregexp +}: + +buildPythonPackage rec { + pname = "aiohttp"; + version = "2.2.5"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "af5bfdd164256118a0a306b3f7046e63207d1f8cba73a67dcc0bd858dcfcd3bc"; + }; + + disabled = pythonOlder "3.4"; + + doCheck = false; # Too many tests fail. + + checkInputs = [ pytest gunicorn pytest-raisesregexp ]; + propagatedBuildInputs = [ async-timeout chardet multidict yarl ]; + + meta = { + description = "Http client/server for asyncio"; + license = with lib.licenses; [ asl20 ]; + homepage = https://github.com/KeepSafe/aiohttp/; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 74f5c715f8b..b592a4f2871 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -311,38 +311,7 @@ in { aiofiles = callPackage ../development/python-modules/aiofiles { }; - aiohttp = - let yarl_0_9_8 = self.yarl.overrideAttrs (old: rec { - pname = "yarl"; - version = "0.9.8"; - name = "${pname}-${version}"; - src = pkgs.fetchurl { - url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz"; - sha256 = "1v2dsmr7bqp0yx51pwhbxyvzza8m2f88prsnbd926mi6ah38p0d7"; - }; - }); - in buildPythonPackage rec { - name = "aiohttp-${version}"; - version = "1.3.5"; - - src = pkgs.fetchurl { - url = "mirror://pypi/a/aiohttp/${name}.tar.gz"; - sha256 = "0hpqdiaifgyfqmxkyzwypwvrnvz5rqzgzylzhihfidc5ldfs856d"; - }; - - disabled = pythonOlder "3.4"; - - doCheck = false; # Too many tests fail. - - buildInputs = with self; [ pytest gunicorn pytest-raisesregexp ]; - propagatedBuildInputs = with self; [ async-timeout chardet multidict yarl_0_9_8 ]; - - meta = { - description = "Http client/server for asyncio"; - license = with licenses; [ asl20 ]; - homepage = https://github.com/KeepSafe/aiohttp/; - }; - }; + aiohttp = callPackage ../development/python-modules/aiohttp { }; aiohttp-cors = buildPythonPackage rec { name = "${pname}-${version}";