From e7b1d752496c4f6fa0644bfd1750d7ecaa46ef2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 6 Dec 2024 15:48:34 -0800 Subject: [PATCH] [Backport release-24.11] python312Packages.pkginfo: 1.11.1 -> 1.12.0 Changelog: https://pypi.org/project/pkginfo/#pkginfo-changelog (cherry picked from commit 6b32ff9916668e3c8f5f5afba3bd6594cddb002f) pkginfo 1.12.0 supports a new metadata format - verison 2.4. If you run "poetry lock" and it tries to process a package that has updated to use this format, poetry fails with an error. A number of packages on pypi are now using this format - for example Pydantic. The error that occurs without this change looks something like (edited a bit for clarity): NewMetadataVersion: New metadata version (2.4) higher than latest supported version: parsing as 2.3 Unable to determine package info for path: /var/folders/ff/m96xlgrd72vf894h3wtw6wtw0000gq/T/tmpourev7sh/pydantic-2.10.4-py3-none-any.whl Unknown metadata version: 2.4 --- .../python-modules/pkginfo/default.nix | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pkginfo/default.nix b/pkgs/development/python-modules/pkginfo/default.nix index 069ffd31a4ab0..9b7f52670ae46 100644 --- a/pkgs/development/python-modules/pkginfo/default.nix +++ b/pkgs/development/python-modules/pkginfo/default.nix @@ -3,26 +3,34 @@ buildPythonPackage, fetchPypi, pytestCheckHook, + setuptools, }: buildPythonPackage rec { pname = "pkginfo"; - version = "1.11.1"; - format = "setuptools"; + version = "1.12.0"; + pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-Lg3KHPTI45ZE7tMkCOqZZu4V4NMkxiuomaOTs8a0Z6o="; + hash = "sha256-itkaBEWgNngrk2bvi4wsUCkfg6VTR4uoWAxz0yFXAM8="; }; + build-system = [ setuptools ]; + nativeCheckInputs = [ pytestCheckHook ]; + disabledTests = [ + "test_installed_ctor_w_dist_info" + ]; + pythonImportsCheck = [ "pkginfo" ]; - meta = with lib; { + meta = { + changelog = "https://pypi.org/project/pkginfo/#pkginfo-changelog"; description = "Query metadatdata from sdists, bdists or installed packages"; mainProgram = "pkginfo"; - homepage = "https://pythonhosted.org/pkginfo/"; + homepage = "https://code.launchpad.net/~tseaver/pkginfo"; longDescription = '' This package provides an API for querying the distutils metadata written in the PKG-INFO file inside a source distriubtion (an sdist) @@ -31,7 +39,7 @@ buildPythonPackage rec { *.egg-info stored in a “development checkout” (e.g, created by running setup.py develop). ''; - license = licenses.mit; - maintainers = [ ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; }; }