python3Packages.requests-aws4auth: enable tests

This commit is contained in:
Fabian Affolter 2022-03-26 15:57:33 +01:00 committed by GitHub
parent cfdc79cad8
commit 104e4f7d23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,30 +1,46 @@
{ lib, buildPythonPackage, fetchPypi, python, requests, six }: { lib
, buildPythonPackage
, fetchFromGitHub
, httpx
, pytestCheckHook
, python
, pythonOlder
, requests
, six
}:
with lib;
buildPythonPackage rec { buildPythonPackage rec {
pname = "requests-aws4auth"; pname = "requests-aws4auth";
version = "1.1.2"; version = "1.1.2";
format = "setuptools";
src = fetchPypi { disabled = pythonOlder "3.7";
inherit pname version;
sha256 = "sha256-694GYtzNpQI1RgVexMvkRwyuAX7L/OjTaLgLXkqU1hk="; 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 checkInputs = [
doCheck = false; pytestCheckHook
checkPhase = '' ];
cd requests_aws4auth
${python.interpreter} test/requests_aws4auth_test.py
'';
pythonImportsCheck = [ "requests_aws4auth" ]; pythonImportsCheck = [
"requests_aws4auth"
];
meta = { meta = with lib; {
description = "Amazon Web Services version 4 authentication for the Python Requests library."; description = "Amazon Web Services version 4 authentication for the Python Requests library";
homepage = "https://github.com/sam-washington/requests-aws4auth"; homepage = "https://github.com/sam-washington/requests-aws4auth";
license = licenses.mit; license = licenses.mit;
maintainers = [ maintainers.basvandijk ]; maintainers = with maintainers; [ basvandijk ];
}; };
} }