depot/third_party/nixpkgs/pkgs/development/python-modules/importlib-metadata/default.nix
Default email 58f8944c92 Project import generated by Copybara.
GitOrigin-RevId: 5aba0fe9766a7201a336249fd6cb76e0d7ba2faf
2020-09-24 23:45:31 -05:00

42 lines
937 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, setuptools_scm
, zipp
, pathlib2
, contextlib2
, configparser
, isPy3k
, importlib-resources
, packaging
}:
buildPythonPackage rec {
pname = "importlib-metadata";
version = "1.7.0";
src = fetchPypi {
pname = "importlib_metadata";
inherit version;
sha256 = "10vz0ydrzspdhdbxrzwr9vhs693hzh4ff71lnqsifvdzvf66bfwh";
};
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ zipp ]
++ lib.optionals (!isPy3k) [ pathlib2 contextlib2 configparser ];
doCheck = false; # Cyclic dependencies.
# 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;
};
}