python310Packages.plum-py: Fix build and refactor

- Follow the one argument per line approach to formatting.
- Drop broken version specifier in python_requires
- Use pytestCheckHook
This commit is contained in:
Martin Weinelt 2023-03-09 17:51:26 +01:00
parent b9420fd0d2
commit c98a8d85e2
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -1,4 +1,10 @@
{ lib, buildPythonPackage, fetchFromGitLab, isPy3k, pytest, baseline }:
{ lib
, buildPythonPackage
, fetchFromGitLab
, isPy3k
, pytestCheckHook
, baseline
}:
buildPythonPackage rec {
pname = "plum-py";
@ -12,10 +18,21 @@ buildPythonPackage rec {
hash = "sha256-jCZUNT1HpSr0khHsjnxEzN2LCzcDV6W27PjVkwFJHUg=";
};
postPatch = ''
# Drop broken version specifier
sed -i "/python_requires =/d" setup.cfg
'';
pythonImportsCheck = [ "plum" ];
nativeCheckInputs = [ pytest baseline ];
checkPhase = "pytest tests";
nativeCheckInputs = [
baseline
pytestCheckHook
];
pytestFlagsArray = [
"tests"
];
meta = with lib; {
description = "Classes and utilities for packing/unpacking bytes";