lol

python311Packages.packet-python: remove pytest-runner

- add format
- add chagnelog to meta
- add pythonImportsCheck
- switch to pytestCheckHook
- disable on unsupported Python releases

+26 -17
+26 -17
pkgs/development/python-modules/packet-python/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 3 , fetchPypi 4 + , pytestCheckHook 5 + , pythonOlder 4 6 , requests 5 - , python 6 - 7 - # For tests/setup.py 8 - , pytest 9 - , pytest-runner 10 7 , requests-mock 11 8 }: 12 9 13 10 buildPythonPackage rec { 14 11 pname = "packet-python"; 15 12 version = "1.44.3"; 13 + format = "setuptools"; 14 + 15 + disabled = pythonOlder "3.7"; 16 + 16 17 src = fetchPypi { 17 18 inherit pname version; 18 19 hash = "sha256-WVfMELOoml7Hx78jy6TAwlFRLuSQu9dtsb6Khs6/cgI="; 19 20 }; 20 - nativeBuildInputs = [ pytest-runner ]; 21 - propagatedBuildInputs = [ requests ]; 21 + 22 + postPatch = '' 23 + substituteInPlace setup.py \ 24 + --replace "pytest-runner" "" 25 + ''; 26 + 27 + propagatedBuildInputs = [ 28 + requests 29 + ]; 30 + 22 31 nativeCheckInputs = [ 23 - pytest 24 - pytest-runner 32 + pytestCheckHook 25 33 requests-mock 26 34 ]; 27 35 28 - checkPhase = '' 29 - ${python.interpreter} setup.py test 30 - ''; 36 + pythonImportsCheck = [ 37 + "packet" 38 + ]; 31 39 32 - meta = { 33 - description = "A Python client for the Packet API."; 34 - homepage = "https://github.com/packethost/packet-python"; 35 - license = lib.licenses.lgpl3; 36 - maintainers = with lib.maintainers; [ dipinhora ]; 40 + meta = with lib; { 41 + description = "Python client for the Packet API"; 42 + homepage = "https://github.com/packethost/packet-python"; 43 + changelog = "https://github.com/packethost/packet-python/blob/v${version}/CHANGELOG.md"; 44 + license = licenses.lgpl3Only; 45 + maintainers = with maintainers; [ dipinhora ]; 37 46 }; 38 47 }