python3Packages.avro: switch to pytestCheckHook
This commit is contained in:
parent
7fd5aa824c
commit
9e3234aa9f
|
@ -1,30 +1,44 @@
|
|||
{ lib, buildPythonPackage, isPy3k, fetchPypi, pycodestyle, isort }:
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchPypi
|
||||
, typing-extensions
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "avro";
|
||||
version = "1.11.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1206365cc30ad561493f735329857dd078533459cee4e928aec2505f341ce445";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
# this test requires network access
|
||||
sed -i 's/test_server_with_path/noop/' avro/test/test_ipc.py
|
||||
'' + (lib.optionalString isPy3k ''
|
||||
# these files require twisted, which is not python3 compatible
|
||||
rm avro/txipc.py
|
||||
rm avro/test/txsample*
|
||||
'');
|
||||
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pycodestyle ];
|
||||
propagatedBuildInputs = [ isort ];
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Requires network access
|
||||
"test_server_with_path"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"avro"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A serialization and RPC framework";
|
||||
homepage = "https://pypi.python.org/pypi/avro/";
|
||||
description = "Python serialization and RPC framework";
|
||||
homepage = "https://github.com/apache/avro";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.zimbatm ];
|
||||
maintainers = with maintainers; [ zimbatm ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue