2018-11-21 12:20:14 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2019-04-01 16:50:33 +02:00
|
|
|
, setuptools_scm
|
|
|
|
, zipp
|
2018-11-21 12:20:14 +01:00
|
|
|
, pathlib2
|
|
|
|
, contextlib2
|
2019-04-01 16:50:33 +02:00
|
|
|
, configparser
|
2018-11-21 12:20:14 +01:00
|
|
|
, isPy3k
|
|
|
|
, importlib-resources
|
2019-04-01 16:50:33 +02:00
|
|
|
, packaging
|
2018-11-21 12:20:14 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "importlib-metadata";
|
2020-08-17 05:55:43 +02:00
|
|
|
version = "1.7.0";
|
2018-11-21 12:20:14 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "importlib_metadata";
|
|
|
|
inherit version;
|
2020-08-17 05:55:43 +02:00
|
|
|
sha256 = "10vz0ydrzspdhdbxrzwr9vhs693hzh4ff71lnqsifvdzvf66bfwh";
|
2018-11-21 12:20:14 +01:00
|
|
|
};
|
|
|
|
|
2019-04-01 16:50:33 +02:00
|
|
|
nativeBuildInputs = [ setuptools_scm ];
|
2018-11-21 12:20:14 +01:00
|
|
|
|
2019-04-01 16:50:33 +02:00
|
|
|
propagatedBuildInputs = [ zipp ]
|
|
|
|
++ lib.optionals (!isPy3k) [ pathlib2 contextlib2 configparser ];
|
|
|
|
|
2020-06-04 05:40:15 +02:00
|
|
|
doCheck = false; # Cyclic dependencies.
|
2018-11-21 12:20:14 +01:00
|
|
|
|
2020-02-23 14:05:13 +01:00
|
|
|
# removing test_main.py - it requires 'pyflakefs'
|
|
|
|
# and adding `pyflakefs` to `checkInputs` causes infinite recursion.
|
|
|
|
preCheck = ''
|
|
|
|
rm importlib_metadata/tests/test_main.py
|
|
|
|
'';
|
|
|
|
|
2018-11-21 12:20:14 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Read metadata from Python packages";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://importlib-metadata.readthedocs.io/";
|
2018-11-21 12:20:14 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
2019-04-01 16:50:33 +02:00
|
|
|
}
|