From d5e7d48f5e10d58bdb2ed08214b4e33333e69763 Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Sun, 26 Aug 2018 01:12:16 +0200 Subject: [PATCH] requests-aws4auth: only disable tests on python >= 3 --- .../python-modules/requests-aws4auth/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/requests-aws4auth/default.nix b/pkgs/development/python-modules/requests-aws4auth/default.nix index 05a15841c42b..b7010eccf0b3 100644 --- a/pkgs/development/python-modules/requests-aws4auth/default.nix +++ b/pkgs/development/python-modules/requests-aws4auth/default.nix @@ -1,4 +1,5 @@ -{ lib, buildPythonPackage, fetchPypi, requests }: +{ lib, buildPythonPackage, fetchPypi, fetchzip, isPy3k, requests }: +with lib; buildPythonPackage rec { pname = "requests-aws4auth"; version = "0.9"; @@ -8,11 +9,17 @@ buildPythonPackage rec { sha256 = "0g52a1pm53aqkc9qb5q1m918c1qy6q47c1qz63p5ilynfbs3m5y9"; }; + postPatch = optionalString isPy3k '' + sed "s/path_encoding_style/'path_encoding_style'/" \ + -i requests_aws4auth/service_parameters.py + ''; + propagatedBuildInputs = [ requests ]; - doCheck = false; + # The test fail on Python >= 3 because of module import errors. + doCheck = !isPy3k; - meta = with lib; { + meta = { description = "Amazon Web Services version 4 authentication for the Python Requests library."; homepage = https://github.com/sam-washington/requests-aws4auth; license = licenses.mit;