nixpkgs/pkgs/development/python-modules/trove-classifiers/default.nix
Sandro Jäckel dc15a2b686 python310Packages.trove-classifiers: 2023.5.24 -> 2023.7.6
move tests to passthru.tests to avoid infinite recursion with hatchling
2023-07-28 12:13:27 +02:00

51 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, calver
, pytestCheckHook
, pythonOlder
}:
let
self = buildPythonPackage rec {
pname = "trove-classifiers";
version = "2023.7.6";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-io4Wi1HSD+1gcEODHTdjK7UJGdHICmTg8Tk3RGkaiyI=";
};
postPatch = ''
substituteInPlace setup.py \
--replace '"calver"' ""
'';
nativeBuildInputs = [
calver
];
doCheck = false; # avoid infinite recursion with hatchling
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "trove_classifiers" ];
passthru.tests.trove-classifiers = self.overridePythonAttrs { doCheck = true; };
meta = {
description = "Canonical source for classifiers on PyPI";
homepage = "https://github.com/pypa/trove-classifiers";
changelog = "https://github.com/pypa/trove-classifiers/releases/tag/${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ dotlambda ];
};
};
in
self