python312Packages.pysnmp: 4.4.2 -> 6.2.5

https://github.com/lextudio/pysnmp/blob/v6.2.5/CHANGES.rst
https://github.com/etingof/pysnmp/issues/429

Promotes the lextudio fork to the the primary pysnmp package.
This commit is contained in:
Martin Weinelt 2024-09-01 15:31:24 +02:00 committed by Robert Schütz
parent d05ede7bac
commit ce9c1ef119
6 changed files with 67 additions and 96 deletions

View File

@ -3,7 +3,7 @@
buildPythonPackage,
fetchPypi,
async-timeout,
pysnmp-lextudio,
pysnmp,
pythonOlder,
poetry-core,
}:
@ -20,11 +20,16 @@ buildPythonPackage rec {
hash = "sha256-KzRoE4tE/tQkKYroq5PbWKREmEl8AwbIOg3IHRZZtsQ=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail pysnmp-lextudio pysnmp
'';
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
async-timeout
pysnmp-lextudio
pysnmp
];
# Module has no test

View File

@ -4,7 +4,7 @@
fetchFromGitHub,
freezegun,
dacite,
pysnmp-lextudio,
pysnmp,
pytest-asyncio,
pytest-error-for-skips,
pytestCheckHook,
@ -27,11 +27,16 @@ buildPythonPackage rec {
hash = "sha256-5fd+UznnOFnqYL8CPX90Y2z6q35oUH638mz4l+Ux6oE=";
};
postPatch = ''
substituteInPlace requirements.txt \
--replace-fail pysnmp-lextudio pysnmp
'';
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
dacite
pysnmp-lextudio
pysnmp
];
nativeCheckInputs = [

View File

@ -1,72 +0,0 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
poetry-core,
# dependencies
pyasn1,
pysmi,
pysnmpcrypto,
# tests
pytestCheckHook,
pytest-asyncio,
}:
buildPythonPackage rec {
pname = "pysnmp-lextudio";
version = "6.1.2";
pyproject = true;
src = fetchFromGitHub {
owner = "lextudio";
repo = "pysnmp";
rev = "refs/tags/v${version}";
hash = "sha256-iVej39OmTPiZL11+IetnqHaxFAhZ/YR7tjiRoc7pu8U=";
};
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
pyasn1
pysmi
pysnmpcrypto
];
nativeCheckInputs = [
pytestCheckHook
pytest-asyncio
];
disabledTests = [
# Temporary failure in name resolutionc
"test_custom_asn1_mib_search_path"
"test_send_notification"
"test_send_trap"
"test_send_v3_inform_notification"
"test_send_v3_inform_sync"
"test_usm_sha_aes128"
"test_v1_get"
"test_v1_next"
"test_v1_set"
"test_v2c_bulk"
# pysnmp.smi.error.MibNotFoundError
"test_send_v3_trap_notification"
"test_addAsn1MibSource"
"test_v1_walk"
"test_v2_walk"
];
pythonImportsCheck = [ "pysnmp" ];
meta = with lib; {
description = "Python SNMP library";
homepage = "https://github.com/lextudio/pysnmp";
changelog = "https://github.com/lextudio/pysnmp/blob/${src.rev}/CHANGES.txt";
license = licenses.bsd2;
maintainers = with maintainers; [ hexa ];
};
}

View File

@ -1,40 +1,74 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
# build-system
poetry-core,
# dependencies
pyasn1,
pycryptodomex,
pysmi,
pysnmpcrypto,
# tests
pytestCheckHook,
pytest-asyncio,
}:
buildPythonPackage rec {
pname = "pysnmp";
version = "4.4.12";
format = "setuptools";
version = "6.2.5";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "1acbfvpbr45i137s00mbhh21p71ywjfw3r8z0ybcmjjqz7rbwg8c";
src = fetchFromGitHub {
owner = "lextudio";
repo = "pysnmp";
rev = "refs/tags/v${version}";
hash = "sha256-EGMUTUN95wykU756GJSiXwr8Hi3kyaLPfqhuDgvhbBE=";
};
patches = [ ./setup.py-Fix-the-setuptools-version-check.patch ];
pythonRemoveDeps = [ "pytest-cov" ];
# NameError: name 'mibBuilder' is not defined
doCheck = false;
build-system = [ poetry-core ];
propagatedBuildInputs = [
dependencies = [
pyasn1
pycryptodomex
pysmi
pysnmpcrypto
];
nativeCheckInputs = [
pytestCheckHook
pytest-asyncio
];
disabledTests = [
# Temporary failure in name resolution
"test_custom_asn1_mib_search_path"
"test_send_notification"
"test_send_trap"
"test_send_v3_inform_notification"
"test_send_v3_inform_sync"
"test_usm_sha_aes128"
"test_v1_get"
"test_v1_next"
"test_v1_set"
"test_v2c_bulk"
# pysnmp.smi.error.MibNotFoundError
"test_send_v3_trap_notification"
"test_addAsn1MibSource"
"test_v1_walk"
"test_v2_walk"
];
pythonImportsCheck = [ "pysnmp" ];
meta = with lib; {
homepage = "http://snmplabs.com/pysnmp/index.html";
description = "Pure-Python SNMPv1/v2c/v3 library";
description = "Python SNMP library";
homepage = "https://github.com/lextudio/pysnmp";
changelog = "https://github.com/lextudio/pysnmp/blob/${src.rev}/CHANGES.txt";
license = licenses.bsd2;
maintainers = with maintainers; [
primeos
koral
];
maintainers = with maintainers; [ hexa ];
};
}

View File

@ -470,6 +470,7 @@ mapAliases ({
pysmart-smartx = pysmart; # added 2021-10-22
pySmartDL = pysmartdl; # added 2023-10-11
pysmi-lextudio = pysmi; # added 2024-07-18
pysnmp-lextudio = pysnmp; # added 2024-07-18
pysparse = throw "pysparse has been abandoned upstream."; # added 2023-02-28
pyspotify = throw "pyspotify has been removed because Spotify stopped supporting libspotify"; # added 2022-05-29
PyStemmer = pystemmer; # added 2023-02-19

View File

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