Merge pull request #237076 from fabaff/packet-python-pytest-runner

python311Packages.packet-python: remove pytest-runner
This commit is contained in:
Fabian Affolter 2023-06-10 23:43:29 +02:00 committed by GitHub
commit bdfbd90c63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,38 +1,47 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, requests
, python
# For tests/setup.py
, pytest
, pytest-runner
, requests-mock
}:
buildPythonPackage rec {
pname = "packet-python";
version = "1.44.3";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-WVfMELOoml7Hx78jy6TAwlFRLuSQu9dtsb6Khs6/cgI=";
};
nativeBuildInputs = [ pytest-runner ];
propagatedBuildInputs = [ requests ];
postPatch = ''
substituteInPlace setup.py \
--replace "pytest-runner" ""
'';
propagatedBuildInputs = [
requests
];
nativeCheckInputs = [
pytest
pytest-runner
pytestCheckHook
requests-mock
];
checkPhase = ''
${python.interpreter} setup.py test
'';
pythonImportsCheck = [
"packet"
];
meta = {
description = "A Python client for the Packet API.";
homepage = "https://github.com/packethost/packet-python";
license = lib.licenses.lgpl3;
maintainers = with lib.maintainers; [ dipinhora ];
meta = with lib; {
description = "Python client for the Packet API";
homepage = "https://github.com/packethost/packet-python";
changelog = "https://github.com/packethost/packet-python/blob/v${version}/CHANGELOG.md";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ dipinhora ];
};
}