python312Packages.python-datemath: refactor

This commit is contained in:
Fabian Affolter 2024-08-26 11:10:54 +02:00 committed by GitHub
parent debdc91d5c
commit 01eaff8de4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,32 +4,34 @@
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
pythonOlder,
pytestCheckHook,
freezegun,
pytestCheckHook,
pythonOlder,
pytz,
setuptools,
}:
buildPythonPackage rec {
pname = "python-datemath";
version = "3.0.1";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "nickmaccarthy";
repo = pname;
repo = "python-datemath";
rev = "refs/tags/v${version}";
hash = "sha256-BL+F2oHM49QiwV1/rjXz3wLp+EaTfmc5tAdlsGKq8ag=";
};
build-system = [ setuptools ];
dependencies = [ arrow ];
nativeCheckInputs = [ pytestCheckHook ];
checkInputs = [
nativeCheckInputs = [
freezegun
pytestCheckHook
pytz
];
@ -40,7 +42,7 @@ buildPythonPackage rec {
meta = {
description = "Python module to emulate the date math used in SOLR and Elasticsearch";
homepage = "https://github.com/nickmaccarthy/python-datemath";
changelog = "https://github.com/nickmaccarthy/python-datemath/blob/v${version}/CHANGELOG.md";
changelog = "https://github.com/nickmaccarthy/python-datemath/blob/v${version}/CHANGELOG.md";
license = with lib.licenses; [ asl20 ];
maintainers = with lib.maintainers; [ fab ];
};