From 4189ddeddf6ca57919e07a19d9b2a3f29ed8d655 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 7 Mar 2025 22:50:54 +0100 Subject: [PATCH] python313Packages.pywebcopy: add legacy-cgi for Python >= 3.13 --- .../python-modules/pywebcopy/default.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pywebcopy/default.nix b/pkgs/development/python-modules/pywebcopy/default.nix index e8d8cb61a334..b8065204a811 100644 --- a/pkgs/development/python-modules/pywebcopy/default.nix +++ b/pkgs/development/python-modules/pywebcopy/default.nix @@ -1,12 +1,14 @@ { lib, - fetchFromGitHub, buildPythonPackage, - pytestCheckHook, - setuptools, cachecontrol, + fetchFromGitHub, + legacy-cgi, lxml-html-clean, + pytestCheckHook, + pythonAtLeast, requests, + setuptools, six, }: @@ -22,10 +24,6 @@ buildPythonPackage rec { hash = "sha256-XTPk3doF9dqImsLtTB03YKMWLzQrJpJtjNXe+691rZo="; }; - nativeCheckInputs = [ pytestCheckHook ]; - - pythonImportsCheck = [ "pywebcopy" ]; - build-system = [ setuptools ]; dependencies = [ @@ -33,7 +31,11 @@ buildPythonPackage rec { lxml-html-clean requests six - ]; + ] ++ lib.optionals (pythonAtLeast "3.13") [ legacy-cgi ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "pywebcopy" ]; meta = { changelog = "https://github.com/rajatomar788/pywebcopy/blob/master/docs/changelog.md";