2022-01-19 23:45:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, flit-core
|
2023-10-09 19:29:22 +00:00
|
|
|
, installer
|
2022-01-19 23:45:15 +00:00
|
|
|
, mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "installer";
|
2023-03-24 00:07:29 +00:00
|
|
|
version = "0.7.0";
|
2022-01-19 23:45:15 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-08-22 20:05:09 +00:00
|
|
|
owner = "pypa";
|
2022-01-19 23:45:15 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-03-24 00:07:29 +00:00
|
|
|
hash = "sha256-thHghU+1Alpay5r9Dc3v7ATRFfYKV8l9qR0nbGOOX/A=";
|
2022-01-19 23:45:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ flit-core ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# We need to disable tests because this package is part of the bootstrap chain
|
|
|
|
# and its test dependencies cannot be built yet when this is being built.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
pytest = buildPythonPackage {
|
|
|
|
pname = "${pname}-pytest";
|
|
|
|
inherit version;
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontInstall = true;
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
installer
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-03-24 00:07:29 +00:00
|
|
|
description = "A low-level library for installing a Python package from a wheel distribution";
|
2023-08-22 20:05:09 +00:00
|
|
|
homepage = "https://github.com/pypa/installer";
|
|
|
|
changelog = "https://github.com/pypa/installer/blob/${src.rev}/docs/changelog.md";
|
2022-01-19 23:45:15 +00:00
|
|
|
license = licenses.mit;
|
2023-08-22 20:05:09 +00:00
|
|
|
maintainers = teams.python.members ++ [ maintainers.cpcloud ];
|
2022-01-19 23:45:15 +00:00
|
|
|
};
|
|
|
|
}
|