From 26b2fa2426c96f88c9139104101f7c6da778d16c Mon Sep 17 00:00:00 2001 From: TheBarzani Date: Sat, 2 Aug 2025 16:06:34 -0400 Subject: [PATCH] python310Packages.pip: fix build failure caused by sphinx-8.2.3 This is related to the issue #394105 --- pkgs/development/python-modules/pip/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pip/default.nix b/pkgs/development/python-modules/pip/default.nix index dca65d503b20..44760b668b17 100644 --- a/pkgs/development/python-modules/pip/default.nix +++ b/pkgs/development/python-modules/pip/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + pythonAtLeast, # build-system installShellFiles, @@ -51,20 +52,24 @@ let installShellFiles setuptools wheel - + ] + ++ lib.optionals (pythonAtLeast "3.11") [ # docs + # (sphinx requires Python 3.11) sphinx sphinx-issues ]; outputs = [ "out" + ] + ++ lib.optionals (pythonAtLeast "3.11") [ "man" ]; # pip uses a custom sphinx extension and unusual conf.py location, mimic the internal build rather than attempting # to fit sphinxHook see https://github.com/pypa/pip/blob/0778c1c153da7da457b56df55fb77cbba08dfb0c/noxfile.py#L129-L148 - postBuild = '' + postBuild = lib.optionalString (pythonAtLeast "3.11") '' cd docs # remove references to sphinx extentions only required for html doc generation