python310Packages.scramp: 1.4.1 -> 1.4.3

This commit is contained in:
Fabian Affolter 2022-10-29 10:24:34 +02:00
parent ed236e542f
commit c9711faf63

View File

@ -2,26 +2,35 @@
, asn1crypto , asn1crypto
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, importlib-metadata
, pytest-mock , pytest-mock
, pytestCheckHook , pytestCheckHook
, pythonOlder , pythonOlder
, setuptools
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "scramp"; pname = "scramp";
version = "1.4.1"; version = "1.4.3";
format = "pyproject";
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "tlocke"; owner = "tlocke";
repo = "scramp"; repo = "scramp";
rev = version; rev = version;
sha256 = "sha256-HEt2QxNHX9Oqx+o0++ZtS61SVHra3nLAqv7NbQWVV+E="; hash = "sha256-BKZam2zLS/SK6rqiUkoeFpQ0bO4pU8CKVNhOM1fv10Y=";
}; };
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
asn1crypto asn1crypto
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
]; ];
checkInputs = [ checkInputs = [
@ -29,7 +38,19 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
pythonImportsCheck = [ "scramp" ]; postPatch = ''
# Upstream uses versioningit to set the version
sed -i '/^name =.*/a version = "${version}"' pyproject.toml
sed -i "/dynamic =/d" pyproject.toml
'';
pythonImportsCheck = [
"scramp"
];
disabledTests = [
"test_readme"
];
meta = with lib; { meta = with lib; {
description = "Implementation of the SCRAM authentication protocol"; description = "Implementation of the SCRAM authentication protocol";