mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-03 02:33:15 +00:00
python311Packages.whenever: init at 0.3.4
project page: https://github.com/ariebovenberg/whenever blogpost: https://dev.arie.bovenberg.net/blog/python-datetime-pitfalls/
This commit is contained in:
parent
c0fccae299
commit
58db08b531
64
pkgs/development/python-modules/whenever/default.nix
Normal file
64
pkgs/development/python-modules/whenever/default.nix
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pythonOlder
|
||||||
|
, buildPythonPackage
|
||||||
|
, poetry-core
|
||||||
|
, backports-zoneinfo
|
||||||
|
, tzdata
|
||||||
|
, pytestCheckHook
|
||||||
|
, pytest-mypy-plugins
|
||||||
|
, hypothesis
|
||||||
|
, freezegun
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "whenever";
|
||||||
|
version = "0.3.4";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "ariebovenberg";
|
||||||
|
repo = "whenever";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-pVbR9KYothEPJUhvFA3hDnLcKp7hvU8ntxvkYrKxQfQ=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# unrecognized arguments since we don't use pytest-benchmark in nixpkgs
|
||||||
|
substituteInPlace pytest.ini \
|
||||||
|
--replace-fail '--benchmark-disable' '#--benchmark-disable'
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
poetry-core
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
tzdata
|
||||||
|
] ++ lib.optionals (pythonOlder "3.9") [
|
||||||
|
backports-zoneinfo
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "whenever" ];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
pytest-mypy-plugins
|
||||||
|
hypothesis
|
||||||
|
freezegun
|
||||||
|
];
|
||||||
|
|
||||||
|
# early TDD, many tests are failing
|
||||||
|
# TODO: try enabling on bump
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Strict, predictable, and typed datetimes";
|
||||||
|
homepage = "https://github.com/ariebovenberg/whenever";
|
||||||
|
changelog = "https://github.com/ariebovenberg/whenever/blob/${src.rev}/CHANGELOG.rst";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ pbsds ];
|
||||||
|
};
|
||||||
|
}
|
@ -16262,6 +16262,8 @@ self: super: with self; {
|
|||||||
|
|
||||||
wheezy-template = callPackage ../development/python-modules/wheezy-template { };
|
wheezy-template = callPackage ../development/python-modules/wheezy-template { };
|
||||||
|
|
||||||
|
whenever = callPackage ../development/python-modules/whenever { };
|
||||||
|
|
||||||
whichcraft = callPackage ../development/python-modules/whichcraft { };
|
whichcraft = callPackage ../development/python-modules/whichcraft { };
|
||||||
|
|
||||||
whirlpool-sixth-sense = callPackage ../development/python-modules/whirlpool-sixth-sense { };
|
whirlpool-sixth-sense = callPackage ../development/python-modules/whirlpool-sixth-sense { };
|
||||||
|
Loading…
Reference in New Issue
Block a user