2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-04-26 19:14:03 +00:00
|
|
|
, pythonOlder
|
2022-04-15 01:41:22 +00:00
|
|
|
, setuptools
|
2021-04-26 19:14:03 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, typing-extensions
|
|
|
|
, toml
|
2020-04-24 23:36:52 +00:00
|
|
|
, zipp
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "importlib-metadata";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "4.11.3";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "importlib_metadata";
|
|
|
|
inherit version;
|
2022-04-27 09:35:20 +00:00
|
|
|
hash = "sha256-6kxZfr83FC+Ce485KZV54xaFwx06Q4tZ9GlAav0PJTk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [
|
2022-04-15 01:41:22 +00:00
|
|
|
setuptools # otherwise cross build fails
|
2021-12-06 16:07:01 +00:00
|
|
|
setuptools-scm
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
toml
|
|
|
|
zipp
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
typing-extensions
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
# Cyclic dependencies due to pyflakefs
|
|
|
|
doCheck = false;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"importlib_metadata"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Read metadata from Python packages";
|
|
|
|
homepage = "https://importlib-metadata.readthedocs.io/";
|
|
|
|
license = licenses.asl20;
|
2021-04-26 19:14:03 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|