Merge pull request #155312 from fabaff/fix-demjson
python3Packages.demjson: only run tests on Python 2
This commit is contained in:
commit
73e71ed4cd
1 changed files with 14 additions and 5 deletions
|
@ -1,25 +1,34 @@
|
||||||
{ lib, python, buildPythonPackage, fetchPypi, isPy3k }:
|
{ lib
|
||||||
|
, python
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, isPy3k
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "demjson";
|
pname = "demjson";
|
||||||
version = "2.2.4";
|
version = "2.2.4";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "0ygbddpnvp5lby6mr5kz60la3hkvwwzv3wwb3z0w9ngxl0w21pii";
|
sha256 = "0ygbddpnvp5lby6mr5kz60la3hkvwwzv3wwb3z0w9ngxl0w21pii";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkPhase = lib.optionalString isPy3k ''
|
doCheck = !(isPy3k);
|
||||||
${python.interpreter} -m lib2to3 -w test/test_demjson.py
|
|
||||||
'' + ''
|
checkPhase = ''
|
||||||
${python.interpreter} test/test_demjson.py
|
${python.interpreter} test/test_demjson.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"demjson"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Encoder/decoder and lint/validator for JSON (JavaScript Object Notation)";
|
description = "Encoder/decoder and lint/validator for JSON (JavaScript Object Notation)";
|
||||||
homepage = "https://github.com/dmeranda/demjson";
|
homepage = "https://github.com/dmeranda/demjson";
|
||||||
license = licenses.lgpl3Plus;
|
license = licenses.lgpl3Plus;
|
||||||
maintainers = with maintainers; [ bjornfor ];
|
maintainers = with maintainers; [ bjornfor ];
|
||||||
platforms = platforms.all;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue