Merge pull request #236704 from fabaff/py-multicodec-pytest-runner

python311Packages.py-multicodec: remove pytest-runner
This commit is contained in:
Fabian Affolter 2023-06-09 09:48:17 +02:00 committed by GitHub
commit 0fd7e6d4e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,10 +1,9 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest-runner
, morphys
, pytestCheckHook
, pythonOlder
, morphys
, six
, varint
}:
@ -12,36 +11,39 @@
buildPythonPackage rec {
pname = "py-multicodec";
version = "0.2.1";
disabled = pythonOlder "3.5";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "multiformats";
repo = pname;
rev = "v${version}";
rev = "refs/tags/v${version}";
hash = "sha256-2aK+bfhqCMqSO+mtrHIfNQmQpQHpwd7yHseI/3O7Sp4=";
};
# Error when not substituting:
# Failed: [pytest] section in setup.cfg files is no longer supported, change to [tool:pytest] instead.
postPatch = ''
substituteInPlace setup.cfg --replace "[pytest]" "[tool:pytest]"
substituteInPlace setup.cfg \
--replace "[pytest]" "[tool:pytest]"
substituteInPlace setup.py \
--replace "'pytest-runner'," ""
'';
nativeBuildInputs = [
pytest-runner
];
propagatedBuildInputs = [
varint
six
morphys
six
varint
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "multicodec" ];
pythonImportsCheck = [
"multicodec"
];
meta = with lib; {
description = "Compact self-describing codecs";