From 21d6e5c776852852fda897b0b33a4b137fed2f20 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 3 Nov 2024 00:03:26 +0900 Subject: [PATCH] python312Packages.vobject: refactor --- .../python-modules/vobject/default.nix | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/vobject/default.nix b/pkgs/development/python-modules/vobject/default.nix index ad3bc832a428..44a769b306b3 100644 --- a/pkgs/development/python-modules/vobject/default.nix +++ b/pkgs/development/python-modules/vobject/default.nix @@ -3,14 +3,17 @@ buildPythonPackage, fetchPypi, isPyPy, - python, + setuptools, python-dateutil, + pytz, + six, + pytestCheckHook, }: buildPythonPackage rec { version = "0.9.8"; - format = "setuptools"; pname = "vobject"; + pyproject = true; src = fetchPypi { inherit pname version; @@ -19,13 +22,23 @@ buildPythonPackage rec { disabled = isPyPy; - propagatedBuildInputs = [ python-dateutil ]; + build-system = [ setuptools ]; - checkPhase = "${python.interpreter} tests.py"; + dependencies = [ + python-dateutil + pytz + six + ]; + + pythonImportsCheck = [ "vobject" ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pytestFlagsArray = [ "tests.py" ]; meta = with lib; { description = "Module for reading vCard and vCalendar files"; - homepage = "http://eventable.github.io/vobject/"; + homepage = "https://github.com/py-vobject/vobject"; license = licenses.asl20; maintainers = [ ]; };