58 lines
1 KiB
Nix
58 lines
1 KiB
Nix
|
{
|
||
|
lib,
|
||
|
buildPythonPackage,
|
||
|
fetchPypi,
|
||
|
pythonOlder,
|
||
|
setuptools,
|
||
|
setuptools-scm,
|
||
|
typing-extensions,
|
||
|
toml,
|
||
|
zipp,
|
||
|
|
||
|
# Reverse dependency
|
||
|
sage,
|
||
|
}:
|
||
|
|
||
|
buildPythonPackage rec {
|
||
|
pname = "importlib-metadata";
|
||
|
version = "8.5.0";
|
||
|
pyproject = true;
|
||
|
|
||
|
disabled = pythonOlder "3.7";
|
||
|
|
||
|
src = fetchPypi {
|
||
|
pname = "importlib_metadata";
|
||
|
inherit version;
|
||
|
hash = "sha256-cVImVvCrrOHQcrnlSBpI8HwTjgDwecOMj4g4I/nCa9c=";
|
||
|
};
|
||
|
|
||
|
build-system = [
|
||
|
setuptools # otherwise cross build fails
|
||
|
setuptools-scm
|
||
|
];
|
||
|
|
||
|
dependencies = [
|
||
|
toml
|
||
|
zipp
|
||
|
] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
|
||
|
|
||
|
# Cyclic dependencies due to pyflakefs
|
||
|
doCheck = false;
|
||
|
|
||
|
pythonImportsCheck = [ "importlib_metadata" ];
|
||
|
|
||
|
passthru.tests = {
|
||
|
inherit sage;
|
||
|
};
|
||
|
|
||
|
meta = with lib; {
|
||
|
description = "Read metadata from Python packages";
|
||
|
homepage = "https://importlib-metadata.readthedocs.io/";
|
||
|
license = licenses.asl20;
|
||
|
maintainers = with maintainers; [
|
||
|
fab
|
||
|
AndersonTorres
|
||
|
];
|
||
|
};
|
||
|
}
|