evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / installer / default.nix
blob64e9a3191a6745c181d8e17e1167c04c0b5fb5c7
2   lib,
3   buildPythonPackage,
4   pythonAtLeast,
5   fetchFromGitHub,
6   pytestCheckHook,
7   flit-core,
8   installer,
9   mock,
12 buildPythonPackage rec {
13   pname = "installer";
14   version = "0.7.0";
15   format = "pyproject";
17   src = fetchFromGitHub {
18     owner = "pypa";
19     repo = pname;
20     rev = version;
21     hash = "sha256-thHghU+1Alpay5r9Dc3v7ATRFfYKV8l9qR0nbGOOX/A=";
22   };
24   patches = lib.optionals (pythonAtLeast "3.13") [
25     # Fix compatibility with Python 3.13
26     # https://github.com/pypa/installer/pull/201
27     ./python313-compat.patch
28   ];
30   nativeBuildInputs = [ flit-core ];
32   # We need to disable tests because this package is part of the bootstrap chain
33   # and its test dependencies cannot be built yet when this is being built.
34   doCheck = false;
36   passthru.tests = {
37     pytest = buildPythonPackage {
38       pname = "${pname}-pytest";
39       inherit version;
40       format = "other";
42       dontBuild = true;
43       dontInstall = true;
45       nativeCheckInputs = [
46         installer
47         mock
48         pytestCheckHook
49       ];
50     };
51   };
53   meta = with lib; {
54     description = "Low-level library for installing a Python package from a wheel distribution";
55     homepage = "https://github.com/pypa/installer";
56     changelog = "https://github.com/pypa/installer/blob/${src.rev}/docs/changelog.md";
57     license = licenses.mit;
58     maintainers = teams.python.members ++ [ maintainers.cpcloud ];
59   };