python311Packages.pysnmpcrypto: init at 0.0.4

Strong cryptography support for PySNMP
This commit is contained in:
Martin Weinelt 2024-01-16 14:11:34 +01:00
parent c143177e25
commit b86c5299cc
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
2 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,57 @@
{ lib
, buildPythonPackage
, fetchPypi
# build-system
, setuptools
# dependencies
, cryptography
, pycryptodomex
# tests
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pysnmpcrypto";
version = "0.0.4";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-tjX7Ox7GY3uaADP1BQYhThbrhFdLHSWrAnu95MqlUSk=";
};
postPatch = ''
# ValueError: invalid literal for int() with base 10: 'post0' in File "<string>", line 104, in <listcomp>
substituteInPlace setup.py --replace \
"observed_version = [int(x) for x in setuptools.__version__.split('.')]" \
"observed_version = [36, 2, 0]"
'';
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
cryptography
pycryptodomex
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"pysnmpcrypto"
];
meta = with lib; {
description = "Strong crypto support for Python SNMP library";
homepage = "https://github.com/etingof/pysnmpcrypto";
changelog = "https://github.com/etingof/pysnmpcrypto/blob/${version}/CHANGES.txt";
license = licenses.bsd2;
maintainers = with maintainers; [ ];
};
}

View File

@ -11291,6 +11291,8 @@ self: super: with self; {
pysnmp = callPackage ../development/python-modules/pysnmp { };
pysnmpcrypto = callPackage ../development/python-modules/pysnmpcrypto { };
pysnmp-pyasn1 = callPackage ../development/python-modules/pysnmp-pyasn1 { };
pysnmp-pysmi = callPackage ../development/python-modules/pysnmp-pysmi { };