Merge pull request #304510 from fabaff/ifconfig-parser-refactor

python312Packages.ifconfig-parser: refactor
This commit is contained in:
Fabian Affolter 2024-04-16 16:52:30 +02:00 committed by GitHub
commit 532b6f44d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 17 additions and 5 deletions

View File

@ -1,24 +1,36 @@
{ lib, buildPythonPackage, fetchFromGitHub }:
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pythonOlder,
}:
buildPythonPackage rec {
pname = "ifconfig-parser";
version = "0.0.5";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "KnightWhoSayNi";
repo = pname;
repo = "ifconfig-parser";
rev = "4921ac9d6be6244b062d082c164f5a5e69522478";
sha256 = "07hbkbr1qspr7qgzldkaslzc6ripj5zlif12d4fk5j801yhvnxjd";
hash = "sha256-TXa7oQ8AyTIdaSK4SH+RN2bDPtVqNvofPvlqHPKaCx4=";
};
build-system = [ setuptools ];
checkPhase = ''
export PYTHONPATH=$PYTHONPATH:$(pwd)/ifconfigparser:$(pwd)/ifconfigparser/tests
python -m unittest -v test_ifconfig_parser.TestIfconfigParser
'';
pythonImportsCheck = [ "ifconfigparser" ];
meta = with lib; {
description = "Unsophisticated python package for parsing raw output of ifconfig.";
description = "Module for parsing raw output of ifconfig";
homepage = "https://github.com/KnightWhoSayNi/ifconfig-parser";
license = licenses.mit;
maintainers = with maintainers; [ atemu ];