mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 09:43:14 +00:00
python310Packages.babel: Fix tests, disable tests
Some tests required pytz, some tests are just broken two times a year on days when EST is moving from and to daylight saving time. Now with that out of the way, some general goodness towards the package.
This commit is contained in:
parent
b60a1fef4a
commit
cebf6aa8fd
@ -1,8 +1,20 @@
|
||||
{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder, pytz, pytestCheckHook, freezegun }:
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
|
||||
# tests
|
||||
, backports-zoneinfo
|
||||
, freezegun
|
||||
, pytestCheckHook
|
||||
, pytz
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "babel";
|
||||
version = "2.12.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
@ -11,12 +23,29 @@ buildPythonPackage rec {
|
||||
hash = "sha256-zC2ZmZzQHURCCuclohyeNxGzqtx5dtYUf2IthYGWNFU=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = lib.optional (pythonOlder "3.9") pytz;
|
||||
propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [
|
||||
pytz
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook freezegun ];
|
||||
nativeCheckInputs = [
|
||||
# via setup.py
|
||||
freezegun
|
||||
pytestCheckHook
|
||||
# via tox.ini
|
||||
pytz
|
||||
] ++ lib.optionals (pythonOlder "3.9") [
|
||||
backports-zoneinfo
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# fails on days switching from and to daylight saving time in EST
|
||||
# https://github.com/python-babel/babel/issues/988
|
||||
"test_format_time"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://babel.pocoo.org/";
|
||||
changelog = "https://github.com/python-babel/babel/releases/tag/v${version}";
|
||||
description = "Collection of internationalizing tools";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ SuperSandro2000 ];
|
||||
|
Loading…
Reference in New Issue
Block a user