From a91bcf877bb08704e305f2572c3d2650a3b734a9 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 28 Nov 2023 17:39:53 +0100 Subject: python311Packages.packaging: refactor and adopt Since this package is now used in a widely used hook, I'm adopting this package on behalf of the Python team. --- .../python-modules/packaging/default.nix | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/packaging/default.nix b/pkgs/development/python-modules/packaging/default.nix index f5526e85ea497..123c1230fc87a 100644 --- a/pkgs/development/python-modules/packaging/default.nix +++ b/pkgs/development/python-modules/packaging/default.nix @@ -1,17 +1,21 @@ { lib , buildPythonPackage , fetchPypi +, pythonOlder + +# build-system , flit-core + +# tests , pretend , pytestCheckHook -, pythonOlder }: let packaging = buildPythonPackage rec { pname = "packaging"; version = "23.2"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -29,18 +33,27 @@ let pretend ]; + pythonImportsCheck = [ + "packaging" + "packaging.metadata" + "packaging.requirements" + "packaging.specifiers" + "packaging.tags" + "packaging.version" + ]; + # Prevent circular dependency with pytest doCheck = false; - pythonImportsCheck = [ "packaging" ]; - passthru.tests = packaging.overridePythonAttrs (_: { doCheck = true; }); meta = with lib; { + changelog = "https://github.com/pypa/packaging/blob/${version}/CHANGELOG.rst"; description = "Core utilities for Python packages"; - homepage = "https://github.com/pypa/packaging"; + downloadPage = "https://github.com/pypa/packaging"; + homepage = "https://packaging.pypa.io/"; license = with licenses; [ bsd2 asl20 ]; - maintainers = with maintainers; [ bennofs ]; + maintainers = teams.python.members ++ (with maintainers; [ bennofs ]); }; }; in -- cgit 1.4.1