mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 03:10:19 +00:00
python3Packages.napalm-ros: fix build; python3Packages.napalm-hp-procurve: fix build (#549982)
This commit is contained in:
@@ -11,15 +11,15 @@
|
||||
standard-telnetlib,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "napalm-hp-procurve";
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "napalm-procurve";
|
||||
version = "0.7.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "napalm-automation-community";
|
||||
repo = "napalm-hp-procurve";
|
||||
tag = version;
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-cO4kxI90krj1knzixRKWxa77OAaxjO8dLTy02VpkV9M=";
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ buildPythonPackage rec {
|
||||
# Dependency installation in setup.py doesn't work
|
||||
echo -n > requirements.txt
|
||||
substituteInPlace setup.cfg \
|
||||
--replace " --pylama" ""
|
||||
--replace-fail " --pylama" ""
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
@@ -62,8 +62,8 @@ buildPythonPackage rec {
|
||||
meta = {
|
||||
description = "HP ProCurve Driver for NAPALM automation frontend";
|
||||
homepage = "https://github.com/napalm-automation-community/napalm-hp-procurve";
|
||||
changelog = "https://github.com/napalm-automation-community/napalm-hp-procurve/releases/tag/${src.tag}";
|
||||
changelog = "https://github.com/napalm-automation-community/napalm-hp-procurve/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
napalm,
|
||||
librouteros,
|
||||
pytestCheckHook,
|
||||
pythonAtLeast,
|
||||
poetry-core,
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "napalm-ros";
|
||||
version = "1.2.6";
|
||||
pyproject = true;
|
||||
@@ -16,19 +16,31 @@ buildPythonPackage rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "napalm-automation-community";
|
||||
repo = "napalm-ros";
|
||||
tag = version;
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-Fv11Blx44vZZ8NuhQQIFpDr+dH2gDJtQP7b0kAk3U/s=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
# Setuptools is wrong, upstream uses poetry
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail 'requires = ["setuptools>=56.0.0", "wheel"]' 'requires = ["poetry-core"]' \
|
||||
--replace-fail 'build-backend = "setuptools.build_meta"' 'build-backend = "poetry.core.masonry.api"'
|
||||
'';
|
||||
|
||||
dependencies = [ librouteros ];
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
dependencies = [
|
||||
librouteros
|
||||
napalm
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"librouteros"
|
||||
"napalm"
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
disabledTests = [
|
||||
# AssertionError: Some methods vary.
|
||||
"test_method_signatures"
|
||||
@@ -39,9 +51,9 @@ buildPythonPackage rec {
|
||||
meta = {
|
||||
description = "MikroTik RouterOS NAPALM driver";
|
||||
homepage = "https://github.com/napalm-automation-community/napalm-ros";
|
||||
changelog = "https://github.com/napalm-automation-community/napalm-ros/releases/tag/${src.tag}";
|
||||
changelog = "https://github.com/napalm-automation-community/napalm-ros/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [ felbinger ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user