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";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "7.0.2";
|
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;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-GY9WjzIwh4yxtE+9eXX4eQbCIzbbouSn8FJ4woH715I=";
|
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;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ fab AndersonTorres ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|