From 64208378a8c3964fb709b3c776124197592de906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 29 Mar 2022 21:46:26 +0200 Subject: [PATCH] python39Packages.packaging: add tests, remove unused six --- .../python-modules/packaging/default.nix | 64 ++++++++++--------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/pkgs/development/python-modules/packaging/default.nix b/pkgs/development/python-modules/packaging/default.nix index 648a548e521b..69457e2a5569 100644 --- a/pkgs/development/python-modules/packaging/default.nix +++ b/pkgs/development/python-modules/packaging/default.nix @@ -2,40 +2,44 @@ , buildPythonPackage , fetchPypi , pyparsing -, six , pytestCheckHook , pretend , setuptools }: -buildPythonPackage rec { - pname = "packaging"; - version = "21.3"; - format = "pyproject"; +let + packaging = buildPythonPackage rec { + pname = "packaging"; + version = "21.3"; + format = "pyproject"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-3UfEKSfYmrkR5gZRiQfMLTofOLvQJjhZcGQ/nFuOz+s="; + src = fetchPypi { + inherit pname version; + sha256 = "sha256-3UfEKSfYmrkR5gZRiQfMLTofOLvQJjhZcGQ/nFuOz+s="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ pyparsing ]; + + checkInputs = [ + pytestCheckHook + pretend + ]; + + # Prevent circular dependency + doCheck = false; + + passthru.tests = packaging.overridePythonAttrs (_: { doCheck = true; }); + + meta = with lib; { + description = "Core utilities for Python packages"; + homepage = "https://github.com/pypa/packaging"; + license = with licenses; [ bsd2 asl20 ]; + maintainers = with maintainers; [ bennofs ]; + }; }; - - nativeBuildInputs = [ - setuptools - ]; - - propagatedBuildInputs = [ pyparsing six ]; - - checkInputs = [ - pytestCheckHook - pretend - ]; - - # Prevent circular dependency - doCheck = false; - - meta = with lib; { - description = "Core utilities for Python packages"; - homepage = "https://github.com/pypa/packaging"; - license = [ licenses.bsd2 licenses.asl20 ]; - maintainers = with maintainers; [ bennofs ]; - }; -} +in +packaging