depot/third_party/nixpkgs/pkgs/development/python-modules/trove-classifiers/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

52 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
calver,
pytestCheckHook,
pythonOlder,
setuptools,
}:
let
self = buildPythonPackage rec {
pname = "trove-classifiers";
version = "2024.5.22";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "trove_classifiers";
inherit version;
hash = "sha256-imJCu7XJrojTTPZl6Bayh9IhKXPId336717BjXKsHQM=";
};
postPatch = ''
substituteInPlace setup.py \
--replace '"calver"' ""
'';
nativeBuildInputs = [
calver
setuptools
];
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