From 8e5843e7cfdc8edd0b403c733297cb4f70fae3fd Mon Sep 17 00:00:00 2001 From: Leona Maroni Date: Tue, 7 May 2024 22:57:03 +0200 Subject: [PATCH] python3Packages.cornice: fix build and enable tests --- .../python-modules/cornice/default.nix | 38 +++++++++++++------ 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/cornice/default.nix b/pkgs/development/python-modules/cornice/default.nix index ff6ede5dcf20..6484e549daf7 100644 --- a/pkgs/development/python-modules/cornice/default.nix +++ b/pkgs/development/python-modules/cornice/default.nix @@ -1,26 +1,42 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, setuptools +, setuptools-scm , pyramid -, simplejson -, six -, venusian +, pytestCheckHook +, pytest-cache +, webtest +, marshmallow +, colander }: buildPythonPackage rec { pname = "cornice"; version = "6.1.0"; - format = "setuptools"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-v9G2wqmRp8yxsggrbenjuPGYtqK0oHqwgA4F3wWkU2E="; + src = fetchFromGitHub { + owner = "Cornices"; + repo = "cornice"; + rev = version; + hash = "sha256-jAf8unDPpr/ZAWkb9LhOW4URjwcRnaYVUKmfnYBStTg="; }; - propagatedBuildInputs = [ pyramid simplejson six venusian ]; + build-system = [ + setuptools + setuptools-scm + ]; - # tests not packaged with pypi release - doCheck = false; + dependencies = [ pyramid ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-cache + webtest + marshmallow + colander + ]; pythonImportsCheck = [ "cornice" ]; meta = with lib; {