From 0ff83e6020c7a31b101a1acadb48f4a06b5077a8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 13 Mar 2021 22:41:48 +0100 Subject: [PATCH] python3Packages.importlib-metadata: 1.7.0 -> 3.7.2 --- .../python-modules/importlib-metadata/2.nix | 39 +++++++++++++++++++ .../importlib-metadata/default.nix | 31 ++++++--------- pkgs/top-level/python2-packages.nix | 2 + 3 files changed, 53 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/importlib-metadata/2.nix diff --git a/pkgs/development/python-modules/importlib-metadata/2.nix b/pkgs/development/python-modules/importlib-metadata/2.nix new file mode 100644 index 000000000000..71dcd950db2c --- /dev/null +++ b/pkgs/development/python-modules/importlib-metadata/2.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools-scm +, zipp +, pathlib2 +, contextlib2 +, configparser +, isPy3k +, importlib-resources +, packaging +}: + +buildPythonPackage rec { + pname = "importlib-metadata"; + version = "2.1.1"; + + src = fetchPypi { + pname = "importlib_metadata"; + inherit version; + sha256 = "1pdmsmwagimn0lsl4x7sg3skcr2fvzqpv2pjd1rh7yrm5gzrxpmq"; + }; + + nativeBuildInputs = [ setuptools-scm ]; + + propagatedBuildInputs = [ zipp ] + ++ lib.optionals (!isPy3k) [ pathlib2 contextlib2 configparser ]; + + # Cyclic dependencies + doCheck = false; + + pythonImportsCheck = [ "importlib_metadata" ]; + + meta = with lib; { + description = "Read metadata from Python packages"; + homepage = "https://importlib-metadata.readthedocs.io/"; + license = licenses.asl20; + }; +} diff --git a/pkgs/development/python-modules/importlib-metadata/default.nix b/pkgs/development/python-modules/importlib-metadata/default.nix index edab68aa18a3..bdc1c2ec10d2 100644 --- a/pkgs/development/python-modules/importlib-metadata/default.nix +++ b/pkgs/development/python-modules/importlib-metadata/default.nix @@ -1,42 +1,35 @@ { lib , buildPythonPackage , fetchPypi -, setuptools_scm +, pythonOlder +, setuptools-scm +, toml , zipp -, pathlib2 -, contextlib2 -, configparser -, isPy3k -, importlib-resources -, packaging }: buildPythonPackage rec { pname = "importlib-metadata"; - version = "1.7.0"; + version = "3.7.2"; + disabled = pythonOlder "3.6"; src = fetchPypi { pname = "importlib_metadata"; inherit version; - sha256 = "10vz0ydrzspdhdbxrzwr9vhs693hzh4ff71lnqsifvdzvf66bfwh"; + sha256 = "1pmci5r6hgl3vj558mawclfq2d4aq584nsjvc1fqvyb921hgzm8q"; }; - nativeBuildInputs = [ setuptools_scm ]; + nativeBuildInputs = [ setuptools-scm ]; - propagatedBuildInputs = [ zipp ] - ++ lib.optionals (!isPy3k) [ pathlib2 contextlib2 configparser ]; + propagatedBuildInputs = [ toml zipp ]; - 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 - ''; + # Cyclic dependencies due to pyflakefs + doCheck = false; + pythonImportsCheck = [ "importlib_metadata" ]; meta = with lib; { description = "Read metadata from Python packages"; homepage = "https://importlib-metadata.readthedocs.io/"; license = licenses.asl20; + maintainers = with maintainers; [ fab ]; }; } diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix index b3c662895203..df19f516552f 100644 --- a/pkgs/top-level/python2-packages.nix +++ b/pkgs/top-level/python2-packages.nix @@ -67,6 +67,8 @@ with self; with super; { imagecodecs-lite = disabled super.imagecodecs-lite; + importlib-metadata = callPackage ../development/python-modules/importlib-metadata/2.nix { }; + isort = callPackage ../development/python-modules/isort/4.nix { }; jupyter_client = callPackage ../development/python-modules/jupyter_client/5.nix { };