From 23d6d12bab49441bae10ade1de2d206095953c25 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 24 Sep 2024 07:03:31 +0000 Subject: [PATCH 1/2] python312Packages.oelint-parser: 4.0.2 -> 5.0.0 --- pkgs/development/python-modules/oelint-parser/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/oelint-parser/default.nix b/pkgs/development/python-modules/oelint-parser/default.nix index 3b28a9d8ee07..8e1337ce343d 100644 --- a/pkgs/development/python-modules/oelint-parser/default.nix +++ b/pkgs/development/python-modules/oelint-parser/default.nix @@ -10,13 +10,13 @@ buildPythonPackage rec { pname = "oelint-parser"; - version = "4.0.2"; + version = "5.0.0"; format = "setuptools"; src = fetchPypi { inherit version; pname = "oelint_parser"; - hash = "sha256-HBUrOyLvFKSp6OCN1hxEGhHLRYuBBcH725JjlCEzy8g="; + hash = "sha256-TrH3aqG1jZGK5oBlLnIZDu7B8KYZIkt68FXVAQPUEck="; }; buildInputs = [ pip ]; From 3a84013aa44d45306fd73cc5516c95738409a24d Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 24 Sep 2024 18:08:05 -0400 Subject: [PATCH 2/2] python312Packages.oelint-parser: modernize, use fetchFromGitHub, enable tests --- .../python-modules/oelint-parser/default.nix | 49 ++++++++++++------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/oelint-parser/default.nix b/pkgs/development/python-modules/oelint-parser/default.nix index 8e1337ce343d..a8785e4008a3 100644 --- a/pkgs/development/python-modules/oelint-parser/default.nix +++ b/pkgs/development/python-modules/oelint-parser/default.nix @@ -1,41 +1,54 @@ { lib, nix-update-script, - fetchPypi, + fetchFromGitHub, buildPythonPackage, + setuptools, deprecated, regex, - pip, + pytest-cov-stub, + pytest-forked, + pytest-random-order, + pytestCheckHook, }: buildPythonPackage rec { pname = "oelint-parser"; version = "5.0.0"; - format = "setuptools"; + pyproject = true; - src = fetchPypi { - inherit version; - pname = "oelint_parser"; - hash = "sha256-TrH3aqG1jZGK5oBlLnIZDu7B8KYZIkt68FXVAQPUEck="; + src = fetchFromGitHub { + owner = "priv-kweihmann"; + repo = "oelint-parser"; + rev = "refs/tags/${version}"; + hash = "sha256-7LEjo/Z9mk2gx2vzDKz5cFR5bDTDgjIVVOquj0o/+0I="; }; - buildInputs = [ pip ]; - propagatedBuildInputs = [ - deprecated - regex - ]; - pythonImportsCheck = [ "oelint_parser" ]; + pythonRelaxDeps = [ "regex" ]; - # Fail to run inside the code the build. - doCheck = false; + build-system = [ setuptools ]; + + dependencies = [ + regex + deprecated + ]; + + nativeCheckInputs = [ + pytest-cov-stub + pytest-forked + pytest-random-order + pytestCheckHook + ]; + + pythonImportsCheck = [ "oelint_parser" ]; passthru.updateScript = nix-update-script { }; - meta = with lib; { + meta = { description = "Alternative parser for bitbake recipes"; homepage = "https://github.com/priv-kweihmann/oelint-parser"; changelog = "https://github.com/priv-kweihmann/oelint-parser/releases/tag/${version}"; - license = licenses.bsd2; - maintainers = with maintainers; [ otavio ]; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ otavio ]; }; }