From 60d698f8bfcf16a67a3ddf2ae2ccbf542c559c72 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 14 Apr 2022 16:28:52 +0200 Subject: [PATCH] python3Packages.datasette: relax click & jinja2 constraints Move substituion into postPatch, the canonical place for this kind of operation. --- .../python-modules/datasette/default.nix | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/datasette/default.nix b/pkgs/development/python-modules/datasette/default.nix index f2a0d531a0a7..18c6943d1e67 100644 --- a/pkgs/development/python-modules/datasette/default.nix +++ b/pkgs/development/python-modules/datasette/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { pname = "datasette"; version = "0.61.1"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "simonw"; @@ -41,6 +41,17 @@ buildPythonPackage rec { sha256 = "sha256-HVzMyF4ujYK12UQ25il/XROPo+iBldsMxOTx+duoc5o="; }; + postPatch = '' + substituteInPlace setup.py \ + --replace '"pytest-runner"' "" \ + --replace "click>=7.1.1,<8.1.0" "click>=7.1.1,<8.2.0" \ + --replace "click-default-group~=1.2.2" "click-default-group" \ + --replace "hupper~=1.9" "hupper" \ + --replace "Jinja2>=2.10.3,<3.1.0" "Jinja2" \ + --replace "pint~=0.9" "pint" \ + --replace "uvicorn~=0.11" "uvicorn" + ''; + propagatedBuildInputs = [ aiofiles asgi-csrf @@ -70,17 +81,6 @@ buildPythonPackage rec { trustme ]; - postConfigure = '' - substituteInPlace setup.py \ - --replace '"pytest-runner"' "" - substituteInPlace setup.py \ - --replace "click-default-group~=1.2.2" "click-default-group" \ - --replace "hupper~=1.9" "hupper" \ - --replace "pint~=0.9" "pint" \ - --replace "pluggy~=0.13.0" "pluggy" \ - --replace "uvicorn~=0.11" "uvicorn" \ - ''; - # takes 30-180 mins to run entire test suite, not worth the CPU resources, slows down reviews # with pytest-xdist, it still takes around 10 mins with 32 cores # just run the csv tests, as this should give some indictation of correctness