python311Packages.tuf: init at 3.1.0

Python reference implementation of The Update Framework (TUF)

https://github.com/theupdateframework/python-tuf
This commit is contained in:
Fabian Affolter 2023-11-30 23:02:47 +01:00
parent 1e281d2212
commit 373336400c
2 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,61 @@
{ lib
, buildPythonPackage
, ed25519
, fetchFromGitHub
, hatchling
, pytestCheckHook
, pythonOlder
, requests
, securesystemslib
}:
buildPythonPackage rec {
pname = "tuf";
version = "3.1.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "theupdateframework";
repo = "python-tuf";
rev = "refs/tags/v${version}";
hash = "sha256-IGF/8RdX7Oxl6gdqPGN1w/6q4zaei+MnYXBZepB4KUA=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "hatchling==" "hatchling>="
'';
nativeBuildInputs = [
hatchling
];
propagatedBuildInputs = [
requests
securesystemslib
] ++ securesystemslib.optional-dependencies.pynacl
++ securesystemslib.optional-dependencies.crypto;
nativeCheckInputs = [
ed25519
pytestCheckHook
];
pythonImportsCheck = [
"tuf"
];
preCheck = ''
cd tests
'';
meta = with lib; {
description = "Python reference implementation of The Update Framework (TUF)";
homepage = "https://github.com/theupdateframework/python-tuf";
changelog = "https://github.com/theupdateframework/python-tuf/blob/v${version}/docs/CHANGELOG.md";
license = with licenses; [ asl20 mit ];
maintainers = with maintainers; [ fab ];
};
}

View File

@ -14327,6 +14327,8 @@ self: super: with self; {
tubes = callPackage ../development/python-modules/tubes { };
tuf = callPackage ../development/python-modules/tuf { };
tunigo = callPackage ../development/python-modules/tunigo { };
tubeup = callPackage ../development/python-modules/tubeup { };