depot/third_party/nixpkgs/pkgs/development/python-modules/trove-classifiers/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

52 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, calver
, pytestCheckHook
, pythonOlder
, setuptools
}:
let
self = buildPythonPackage rec {
pname = "trove-classifiers";
version = "2024.1.8";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-bjbK9DD/ZIXEtXpMazZKE/aomNFrlBfGw3Rn5ZwUsFo=";
};
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