evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / pythonfinder / default.nix
blob3af465ba2de139ccceeef94a1cc0e1fa61cd3cae
2   lib,
3   buildPythonPackage,
4   cached-property,
5   click,
6   fetchFromGitHub,
7   packaging,
8   pytest-timeout,
9   pytestCheckHook,
10   pythonOlder,
11   setuptools,
14 buildPythonPackage rec {
15   pname = "pythonfinder";
16   version = "2.1.0";
17   pyproject = true;
19   disabled = pythonOlder "3.7";
21   src = fetchFromGitHub {
22     owner = "sarugaku";
23     repo = "pythonfinder";
24     rev = "refs/tags/${version}";
25     hash = "sha256-CbaKXD7Sde8euRqvc/IHoXoSMF+dNd7vT9LkLWq4/IU=";
26   };
28   postPatch = ''
29     substituteInPlace pyproject.toml \
30       --replace " --cov" ""
31   '';
33   nativeBuildInputs = [ setuptools ];
35   propagatedBuildInputs = [ packaging ] ++ lib.optionals (pythonOlder "3.8") [ cached-property ];
37   optional-dependencies = {
38     cli = [ click ];
39   };
41   nativeCheckInputs = [
42     pytest-timeout
43     pytestCheckHook
44   ] ++ lib.flatten (builtins.attrValues optional-dependencies);
46   pythonImportsCheck = [ "pythonfinder" ];
48   meta = with lib; {
49     description = "Cross platform search tool for finding Python";
50     mainProgram = "pyfinder";
51     homepage = "https://github.com/sarugaku/pythonfinder";
52     changelog = "https://github.com/sarugaku/pythonfinder/blob/v${version}/CHANGELOG.rst";
53     license = licenses.mit;
54     maintainers = with maintainers; [ cpcloud ];
55   };