From cfdc79cad824af45717e508c7b2c2bb734f2027d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 24 Mar 2022 18:40:36 +0000 Subject: [PATCH 1/2] python310Packages.requests-aws4auth: 1.1.1 -> 1.1.2 --- pkgs/development/python-modules/requests-aws4auth/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/requests-aws4auth/default.nix b/pkgs/development/python-modules/requests-aws4auth/default.nix index fa97942e226f..64e0c1e17435 100644 --- a/pkgs/development/python-modules/requests-aws4auth/default.nix +++ b/pkgs/development/python-modules/requests-aws4auth/default.nix @@ -3,11 +3,11 @@ with lib; buildPythonPackage rec { pname = "requests-aws4auth"; - version = "1.1.1"; + version = "1.1.2"; src = fetchPypi { inherit pname version; - sha256 = "c0883346ce30b5018903a67da88df72f73ff06e1a320845bba9cd85e811ba0ba"; + sha256 = "sha256-694GYtzNpQI1RgVexMvkRwyuAX7L/OjTaLgLXkqU1hk="; }; propagatedBuildInputs = [ requests six ]; From 104e4f7d23455e7b6fa24b6a6e1d4c3e8a8db0de Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 26 Mar 2022 15:57:33 +0100 Subject: [PATCH 2/2] python3Packages.requests-aws4auth: enable tests --- .../requests-aws4auth/default.nix | 48 ++++++++++++------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/requests-aws4auth/default.nix b/pkgs/development/python-modules/requests-aws4auth/default.nix index 64e0c1e17435..d2de7dff212f 100644 --- a/pkgs/development/python-modules/requests-aws4auth/default.nix +++ b/pkgs/development/python-modules/requests-aws4auth/default.nix @@ -1,30 +1,46 @@ -{ lib, buildPythonPackage, fetchPypi, python, requests, six }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, httpx +, pytestCheckHook +, python +, pythonOlder +, requests +, six +}: -with lib; buildPythonPackage rec { pname = "requests-aws4auth"; version = "1.1.2"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-694GYtzNpQI1RgVexMvkRwyuAX7L/OjTaLgLXkqU1hk="; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "tedder"; + repo = pname; + rev = "v${version}"; + hash = "sha256-/SqU/ojP9I4JXzR0c5tLzxx9UyNaVsON7LG/dbdeiH0="; }; - propagatedBuildInputs = [ requests six ]; + propagatedBuildInputs = [ + httpx + requests + six + ]; - # pypi package no longer contains tests - doCheck = false; - checkPhase = '' - cd requests_aws4auth - ${python.interpreter} test/requests_aws4auth_test.py - ''; + checkInputs = [ + pytestCheckHook + ]; - pythonImportsCheck = [ "requests_aws4auth" ]; + pythonImportsCheck = [ + "requests_aws4auth" + ]; - meta = { - description = "Amazon Web Services version 4 authentication for the Python Requests library."; + meta = with lib; { + description = "Amazon Web Services version 4 authentication for the Python Requests library"; homepage = "https://github.com/sam-washington/requests-aws4auth"; license = licenses.mit; - maintainers = [ maintainers.basvandijk ]; + maintainers = with maintainers; [ basvandijk ]; }; }