From 45e30be21ad53fddbe1f0f0dc466fa7e94972712 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 2 Apr 2022 03:42:46 +0200 Subject: [PATCH] python3Packages.clize: relax docutils constraint, set up extras-require --- .../python-modules/clize/default.nix | 35 ++++++++++++++----- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/clize/default.nix b/pkgs/development/python-modules/clize/default.nix index 75c4513d1e3a..10b4c8f68c69 100644 --- a/pkgs/development/python-modules/clize/default.nix +++ b/pkgs/development/python-modules/clize/default.nix @@ -1,12 +1,18 @@ { lib , buildPythonPackage , fetchPypi -, python-dateutil + +# propagtes , sigtools , six , attrs , od , docutils + +# extras: datetime +, python-dateutil + +# tests , pygments , unittest2 , pytestCheckHook @@ -21,6 +27,25 @@ buildPythonPackage rec { sha256 = "3177a028e4169d8865c79af82bdd441b24311d4bd9c0ae8803641882d340a51d"; }; + postPatch = '' + substituteInPlace setup.py \ + --replace "docutils ~= 0.17.0" "docutils" + ''; + + propagatedBuildInputs = [ + attrs + docutils + od + sigtools + six + ]; + + passthru.extras-require = { + datetime = [ + python-dateutil + ]; + }; + # repeated_test no longer exists in nixpkgs # also see: https://github.com/epsy/clize/issues/74 doCheck = false; @@ -31,14 +56,6 @@ buildPythonPackage rec { unittest2 ]; - propagatedBuildInputs = [ - attrs - docutils - od - sigtools - six - ]; - pythonImportsCheck = [ "clize" ]; meta = with lib; {