From 7a41423022053696be6c393c67ce1e7c510741dd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 17 Jan 2022 10:49:45 +0100 Subject: [PATCH] python3Packages.demjson: only run tests on Python 2 --- .../python-modules/demjson/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/demjson/default.nix b/pkgs/development/python-modules/demjson/default.nix index 25e2692af3ba..a25ecd74b5d0 100644 --- a/pkgs/development/python-modules/demjson/default.nix +++ b/pkgs/development/python-modules/demjson/default.nix @@ -1,25 +1,34 @@ -{ lib, python, buildPythonPackage, fetchPypi, isPy3k }: +{ lib +, python +, buildPythonPackage +, fetchPypi +, isPy3k +}: buildPythonPackage rec { pname = "demjson"; version = "2.2.4"; + format = "setuptools"; src = fetchPypi { inherit pname version; sha256 = "0ygbddpnvp5lby6mr5kz60la3hkvwwzv3wwb3z0w9ngxl0w21pii"; }; - checkPhase = lib.optionalString isPy3k '' - ${python.interpreter} -m lib2to3 -w test/test_demjson.py - '' + '' + doCheck = !(isPy3k); + + checkPhase = '' ${python.interpreter} test/test_demjson.py ''; + pythonImportsCheck = [ + "demjson" + ]; + meta = with lib; { description = "Encoder/decoder and lint/validator for JSON (JavaScript Object Notation)"; homepage = "https://github.com/dmeranda/demjson"; license = licenses.lgpl3Plus; maintainers = with maintainers; [ bjornfor ]; - platforms = platforms.all; }; }