python312Packages.isoweek: refactor

- switch to unittestCheckHook
- add pythonImportsCheck
This commit is contained in:
Fabian Affolter
2024-05-18 11:31:40 +02:00
parent 3340b563cf
commit 550f53b3e6
@@ -1,18 +1,39 @@
{ lib, fetchPypi, buildPythonPackage }:
{ lib
, fetchPypi
, buildPythonPackage
, setuptools
, unittestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "isoweek";
version = "1.3.3";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk";
hash = "sha256-c/P3usRD4Fo6tFwypyBIsMTybVPYFGLsSxQsdYHT/+g=";
};
build-system = [
setuptools
];
nativeCheckInputs = [
unittestCheckHook
];
pythonImportsCheck = [
"isoweek"
];
meta = with lib; {
description = "The module provide the class Week. Instances represent specific weeks spanning Monday to Sunday.";
description = "Module work with ISO weeks";
homepage = "https://github.com/gisle/isoweek";
changelog = "https://github.com/gisle/isoweek/releases/tag/v${version}";
license = licenses.bsd2;
maintainers = with maintainers; [ mrmebelman ];
};