From 46eef09d3ca6ca0cba4a4888c0a67c951b7aaa83 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 15 Jan 2022 09:01:13 +0100 Subject: python3Packages.josepy: cleanup --- pkgs/development/python-modules/josepy/default.nix | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'pkgs') diff --git a/pkgs/development/python-modules/josepy/default.nix b/pkgs/development/python-modules/josepy/default.nix index 2cd81d4cba019..140b65c737724 100644 --- a/pkgs/development/python-modules/josepy/default.nix +++ b/pkgs/development/python-modules/josepy/default.nix @@ -1,28 +1,25 @@ { lib -, fetchPypi , buildPythonPackage , cryptography +, fetchPypi , pyopenssl -, setuptools -, mock , pytestCheckHook +, pythonOlder +, setuptools }: buildPythonPackage rec { pname = "josepy"; version = "1.12.0"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; sha256 = "267004a64f08c016cd54b7aaf7c323fa3ef3679fb62f4b086cd56448d0fecb25"; }; - postPatch = '' - # remove coverage flags - sed -i '/addopts/d' pytest.ini - sed -i '/flake8-ignore/d' pytest.ini - ''; - propagatedBuildInputs = [ pyopenssl cryptography @@ -30,15 +27,22 @@ buildPythonPackage rec { ]; checkInputs = [ - mock pytestCheckHook ]; + postPatch = '' + substituteInPlace pytest.ini \ + --replace " --flake8 --cov-report xml --cov-report=term-missing --cov=josepy --cov-config .coveragerc" "" + ''; + + pythonImportsCheck = [ + "josepy" + ]; + meta = with lib; { description = "JOSE protocol implementation in Python"; homepage = "https://github.com/jezdez/josepy"; license = licenses.asl20; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ ]; }; } - -- cgit 1.4.1