forked from pool/python-Babel
Compare commits
8 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 3472c1bc2b | |||
| 7c00f68782 | |||
| 445957922a | |||
| de68bc15ca | |||
| ec422d58e8 | |||
| 3f6cb80c2d | |||
| 95c672fab8 | |||
| d4a69248c5 |
@@ -1,8 +1,3 @@
|
|||||||
-------------------------------------------------------------------
|
|
||||||
Wed Jul 23 06:34:38 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.de>
|
|
||||||
|
|
||||||
- Add reproducible.patch to normalize date in .po (boo#1047218)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 3 13:38:56 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
Mon Feb 3 13:38:56 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ Summary: Internationalization utilities
|
|||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
URL: https://babel.pocoo.org/
|
URL: https://babel.pocoo.org/
|
||||||
Source: https://files.pythonhosted.org/packages/source/b/babel/babel-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/b/babel/babel-%{version}.tar.gz
|
||||||
Patch0: reproducible.patch
|
|
||||||
BuildRequires: %{python_module freezegun >= 1.0}
|
BuildRequires: %{python_module freezegun >= 1.0}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module pytest >= 6.0}
|
BuildRequires: %{python_module pytest >= 6.0}
|
||||||
@@ -74,7 +73,6 @@ A collection of tools for internationalizing Python applications.
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
unset SOURCE_DATE_EPOCH
|
|
||||||
%pytest
|
%pytest
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
diff --git a/babel/messages/catalog.py b/babel/messages/catalog.py
|
|
||||||
index f84a5bd..786d1a4 100644
|
|
||||||
--- a/babel/messages/catalog.py
|
|
||||||
+++ b/babel/messages/catalog.py
|
|
||||||
@@ -11,6 +11,8 @@ from __future__ import annotations
|
|
||||||
|
|
||||||
import datetime
|
|
||||||
import re
|
|
||||||
+import time
|
|
||||||
+import os
|
|
||||||
from collections.abc import Iterable, Iterator
|
|
||||||
from copy import copy
|
|
||||||
from difflib import SequenceMatcher
|
|
||||||
@@ -385,7 +387,9 @@ class Catalog:
|
|
||||||
self.charset = charset or 'utf-8'
|
|
||||||
|
|
||||||
if creation_date is None:
|
|
||||||
- creation_date = datetime.datetime.now(LOCALTZ)
|
|
||||||
+ creation_date = datetime.datetime.utcfromtimestamp(
|
|
||||||
+ int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
|
|
||||||
+ )
|
|
||||||
elif isinstance(creation_date, datetime.datetime) and not creation_date.tzinfo:
|
|
||||||
creation_date = creation_date.replace(tzinfo=LOCALTZ)
|
|
||||||
self.creation_date = creation_date
|
|
||||||
Reference in New Issue
Block a user