From d61a2b1ee727d172c2237be12c210ec4b5c29bc8 Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 6 Dec 2023 18:54:04 +0900 Subject: [PATCH] python311Packages.cheroot: fix build with setuptools-scm>=8 --- pkgs/development/python-modules/cheroot/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cheroot/default.nix b/pkgs/development/python-modules/cheroot/default.nix index 839894e1505b..89d4d69b9161 100644 --- a/pkgs/development/python-modules/cheroot/default.nix +++ b/pkgs/development/python-modules/cheroot/default.nix @@ -14,7 +14,6 @@ , requests-toolbelt , requests-unixsocket , setuptools-scm -, setuptools-scm-git-archive , six }: @@ -30,9 +29,19 @@ buildPythonPackage rec { hash = "sha256-WcShh3/vmWmzw8CAyqrzd+J4CRlDeFP8DTKp30CzEfA="; }; + # remove setuptools-scm-git-archive dependency + # https://github.com/cherrypy/cheroot/commit/f0c51af263e20f332c6f675aa90ec6705ae4f5d1 + # there is a difference between the github source and the pypi tarball source, + # and it is not easy to apply patches. + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '"setuptools_scm_git_archive>=1.1",' "" + substituteInPlace setup.cfg \ + --replace "setuptools_scm_git_archive>=1.0" "" + ''; + nativeBuildInputs = [ setuptools-scm - setuptools-scm-git-archive ]; propagatedBuildInputs = [