From ad363bfc1efa39e080a524d9f6e0fa920925d401 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 21 Feb 2024 15:56:00 +0100 Subject: [PATCH] python311Packages.reqif: refactor --- .../python-modules/reqif/default.nix | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/reqif/default.nix b/pkgs/development/python-modules/reqif/default.nix index e0ba5610ebd5..63f9984c5fa3 100644 --- a/pkgs/development/python-modules/reqif/default.nix +++ b/pkgs/development/python-modules/reqif/default.nix @@ -1,38 +1,39 @@ { lib +, beautifulsoup4 , buildPythonPackage -, python , fetchFromGitHub , hatchling -, beautifulsoup4 -, lxml , jinja2 +, lxml , pytestCheckHook +, python , pythonOlder +, pythonRelaxDepsHook }: buildPythonPackage rec { pname = "reqif"; version = "0.0.35"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "strictdoc-project"; - repo = pname; + repo = "reqif"; rev = "refs/tags/${version}"; hash = "sha256-3yOLOflPqzJRv3qCQXFK3rIFftBq8FkYy7XhOfWH82Y="; }; postPatch = '' - substituteInPlace ./tests/unit/conftest.py --replace \ - "os.path.abspath(os.path.join(__file__, \"../../../../reqif\"))" \ + substituteInPlace ./tests/unit/conftest.py \ + --replace-fail "os.path.abspath(os.path.join(__file__, \"../../../../reqif\"))" \ "\"${placeholder "out"}/${python.sitePackages}/reqif\"" - substituteInPlace requirements.txt --replace "==" ">=" ''; nativeBuildInputs = [ hatchling + pythonRelaxDepsHook ]; propagatedBuildInputs = [ @@ -41,14 +42,14 @@ buildPythonPackage rec { jinja2 ]; - pythonImportsCheck = [ - "reqif" - ]; - nativeCheckInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ + "reqif" + ]; + meta = with lib; { description = "Python library for ReqIF format"; homepage = "https://github.com/strictdoc-project/reqif";