2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, setuptools_scm
|
|
|
|
, zipp
|
|
|
|
, pathlib2
|
|
|
|
, contextlib2
|
|
|
|
, configparser
|
|
|
|
, isPy3k
|
|
|
|
, importlib-resources
|
|
|
|
, packaging
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "importlib-metadata";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "1.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "importlib_metadata";
|
|
|
|
inherit version;
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "10vz0ydrzspdhdbxrzwr9vhs693hzh4ff71lnqsifvdzvf66bfwh";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ setuptools_scm ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ zipp ]
|
|
|
|
++ lib.optionals (!isPy3k) [ pathlib2 contextlib2 configparser ];
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
doCheck = false; # Cyclic dependencies.
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# removing test_main.py - it requires 'pyflakefs'
|
|
|
|
# and adding `pyflakefs` to `checkInputs` causes infinite recursion.
|
|
|
|
preCheck = ''
|
|
|
|
rm importlib_metadata/tests/test_main.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Read metadata from Python packages";
|
|
|
|
homepage = "https://importlib-metadata.readthedocs.io/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|