mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
dc15a2b686
move tests to passthru.tests to avoid infinite recursion with hatchling
51 lines
1.1 KiB
Nix
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
|