From 0949dfcaa306e5f2dbd671ac0572b730171dd088 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Nov 2020 15:04:28 +0100 Subject: [PATCH] python3Packages.flit: 2.3.0 -> 3.0.0 --- .../python-modules/flit-core/default.nix | 16 ++++++------- .../python-modules/flit/default.nix | 24 +++++++++++++------ 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/flit-core/default.nix b/pkgs/development/python-modules/flit-core/default.nix index 441084da97fa..53a1e0651f36 100644 --- a/pkgs/development/python-modules/flit-core/default.nix +++ b/pkgs/development/python-modules/flit-core/default.nix @@ -1,26 +1,24 @@ { lib , buildPythonPackage -, fetchPypi , flit , isPy3k -, pytoml +, toml }: buildPythonPackage rec { pname = "flit-core"; version = "2.3.0"; disabled = !isPy3k; - format = "pyproject"; - src = fetchPypi { - inherit version; - pname = "flit_core"; - sha256 = "a50bcd8bf5785e3a7d95434244f30ba693e794c5204ac1ee908fc07c4acdbf80"; - }; + inherit (flit) src patches; + + preConfigure = '' + cd flit_core + ''; propagatedBuildInputs = [ - pytoml + toml ]; passthru.tests = { diff --git a/pkgs/development/python-modules/flit/default.nix b/pkgs/development/python-modules/flit/default.nix index c0944f4ff17b..ee062e539866 100644 --- a/pkgs/development/python-modules/flit/default.nix +++ b/pkgs/development/python-modules/flit/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, fetchpatch , isPy3k , docutils , requests @@ -10,7 +11,6 @@ , pytest , testpath , responses -, pytoml , flit-core }: @@ -21,19 +21,29 @@ buildPythonPackage rec { pname = "flit"; - version = "2.3.0"; + version = "3.0.0"; disabled = !isPy3k; - src = fetchPypi { - inherit pname version; - sha256 = "017012b809ec489918afd68af7a70bd7c8c770c87b60159d875c126866e97a4b"; + src = fetchFromGitHub { + owner = "takluyver"; + repo = "flit"; + rev = version; + sha256 = "zk6mozS3Q9U43PQe/DxgwwsBRJ6Qwb+rSUVGXHijD+g="; }; + # Use toml instead of pytoml + # Resolves infinite recursion since packaging started using flit. + patches = [ + (fetchpatch { + url = "https://github.com/takluyver/flit/commit/b81b1da55ef0f2768413669725d2874fcb0c29fb.patch"; + sha256 = "11oNaYsm00/j2046V9C0idpSeG7TpY3JtLuxX3ZL/OI="; + }) + ]; + propagatedBuildInputs = [ docutils requests requests_download - pytoml flit-core ] ++ lib.optionals (pythonOlder "3.6") [ zipfile36