From a6ce8b92fc736c165870a5aa8143841e28b315f2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 9 Jun 2023 19:04:49 +0200 Subject: [PATCH] python311Packages.libais: remove pytest-runner - adjust inputs - disable on unsupported Python releases - add pythonImportsCheck --- .../python-modules/libais/default.nix | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/libais/default.nix b/pkgs/development/python-modules/libais/default.nix index fbf0224204e8..ba42d47d346d 100644 --- a/pkgs/development/python-modules/libais/default.nix +++ b/pkgs/development/python-modules/libais/default.nix @@ -1,25 +1,49 @@ -{ lib, buildPythonPackage, fetchPypi, - six, pytest, pytest-runner, pytest-cov, coverage +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, pythonOlder +, six }: + buildPythonPackage rec { pname = "libais"; version = "0.17"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "0pyka09h8nb0vlzh14npq4nxmzg1046lr3klgn97dsf5k0iflapb"; + hash = "sha256-6yrqIpjF6XaSfXSOTA0B4f3aLcHXkgA/3WBZBBNQ018="; }; + postPatch = '' + substituteInPlace setup.py \ + --replace "'pytest-runner'," "" + ''; + + propagatedBuildInputs = [ + six + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + # data files missing doCheck = false; - nativeCheckInputs = [ pytest pytest-runner pytest-cov coverage ]; - propagatedBuildInputs = [ six ]; + pythonImportsCheck = [ + "ais" + ]; meta = with lib; { - homepage = "https://github.com/schwehr/libais"; description = "Library for decoding maritime Automatic Identification System messages"; + homepage = "https://github.com/schwehr/libais"; + changelog = "https://github.com/schwehr/libais/blob/master/Changelog.md"; license = licenses.asl20; + maintainers = with maintainers; [ ]; platforms = platforms.unix; }; }