1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 calver,
6 pytestCheckHook,
7 pythonOlder,
8 setuptools,
9}:
10
11let
12 self = buildPythonPackage rec {
13 pname = "trove-classifiers";
14 version = "2024.4.10";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-SfQLtqdGtyocuk+NVe6CUhac2g9wgC4/0k8Et/slpJI=";
22 };
23
24 postPatch = ''
25 substituteInPlace setup.py \
26 --replace '"calver"' ""
27 '';
28
29 nativeBuildInputs = [
30 calver
31 setuptools
32 ];
33
34 doCheck = false; # avoid infinite recursion with hatchling
35
36 nativeCheckInputs = [ pytestCheckHook ];
37
38 pythonImportsCheck = [ "trove_classifiers" ];
39
40 passthru.tests.trove-classifiers = self.overridePythonAttrs { doCheck = true; };
41
42 meta = {
43 description = "Canonical source for classifiers on PyPI";
44 homepage = "https://github.com/pypa/trove-classifiers";
45 changelog = "https://github.com/pypa/trove-classifiers/releases/tag/${version}";
46 license = lib.licenses.asl20;
47 maintainers = with lib.maintainers; [ dotlambda ];
48 };
49 };
50in
51self