depot/third_party/nixpkgs/pkgs/development/python-modules/trove-classifiers/default.nix
Default email d5f4a57cbf Project import generated by Copybara.
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
2023-08-10 09:59:29 +02:00

50 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