Compare commits
No commits in common. "a90a6e7f92c5838a972968d59c91d88fbf7ab8d0" and "1bdd15de78d14dd3ef165428c4f97cd78fd6b8bc" have entirely different histories.
a90a6e7f92
...
1bdd15de78
Binary file not shown.
15
babel-2.3.4-remove-pytz-version.patch
Normal file
15
babel-2.3.4-remove-pytz-version.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff -up Babel-2.3.4/setup.py.orig Babel-2.3.4/setup.py
|
||||||
|
--- Babel-2.3.4/setup.py.orig 2016-04-11 11:58:25.000000000 +0200
|
||||||
|
+++ Babel-2.3.4/setup.py 2016-04-25 13:35:54.458765892 +0200
|
||||||
|
@@ -59,7 +59,10 @@ setup(
|
||||||
|
# This version identifier is currently necessary as
|
||||||
|
# pytz otherwise does not install on pip 1.4 or
|
||||||
|
# higher.
|
||||||
|
- 'pytz>=2015.7',
|
||||||
|
+ ### But the version confuses setuptools 8 and higher so remove it in the
|
||||||
|
+ ### system package
|
||||||
|
+ #'pytz>=2015.7',
|
||||||
|
+ 'pytz',
|
||||||
|
],
|
||||||
|
|
||||||
|
cmdclass={'import_cldr': import_cldr},
|
||||||
57
babel.spec
57
babel.spec
@ -1,14 +1,18 @@
|
|||||||
Name: babel
|
Name: babel
|
||||||
Version: 2.9.1
|
Version: 2.8.0
|
||||||
Release: 2
|
Release: 1
|
||||||
Summary: Tools for internationalizing and localizing Python applications
|
Summary: Tools for internationalizing and localizing Python applications
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://babel.pocoo.org/
|
URL: http://babel.pocoo.org/
|
||||||
Source0: https://files.pythonhosted.org/packages/source/B/Babel/Babel-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/B/Babel/Babel-%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch0000: babel-2.3.4-remove-pytz-version.patch
|
||||||
|
Patch0001: fix-tests-when-using-Python-3.9a6.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: gcc git make
|
BuildRequires: gcc git make
|
||||||
|
BuildRequires: python2-devel python2-setuptools python2-pytz python2-pytest python2-freezegun
|
||||||
BuildRequires: python3-devel python3-setuptools python3-pytz python3-pytest python3-freezegun python3-sphinx
|
BuildRequires: python3-devel python3-setuptools python3-pytz python3-pytest python3-freezegun python3-sphinx
|
||||||
|
|
||||||
Requires: python3-babel python3-setuptools
|
Requires: python3-babel python3-setuptools
|
||||||
@ -17,6 +21,15 @@ Requires: python3-babel python3-setuptools
|
|||||||
Babel is an integrated collection of utilities that assist in internationalizing and
|
Babel is an integrated collection of utilities that assist in internationalizing and
|
||||||
localizing Python applications, with an emphasis on web-based applications.
|
localizing Python applications, with an emphasis on web-based applications.
|
||||||
|
|
||||||
|
%package -n python2-babel
|
||||||
|
Summary: Library for internationalizing Python applications
|
||||||
|
Requires: python2-setuptools
|
||||||
|
Requires: python2-pytz
|
||||||
|
|
||||||
|
%description -n python2-babel
|
||||||
|
Babel is an integrated collection of utilities that assist in internationalizing and
|
||||||
|
localizing Python applications, with an emphasis on web-based applications.
|
||||||
|
|
||||||
%package -n python3-babel
|
%package -n python3-babel
|
||||||
Summary: Library for internationalizing Python applications
|
Summary: Library for internationalizing Python applications
|
||||||
Requires: python3-setuptools
|
Requires: python3-setuptools
|
||||||
@ -29,6 +42,7 @@ localizing Python applications, with an emphasis on web-based applications.
|
|||||||
%package help
|
%package help
|
||||||
Summary: Documentation for Babel
|
Summary: Documentation for Babel
|
||||||
Provides: python-babel-doc = %{version}-%{release}
|
Provides: python-babel-doc = %{version}-%{release}
|
||||||
|
Provides: python2-babel-doc = %{version}-%{release}
|
||||||
Provides: python3-babel-doc = %{version}-%{release}
|
Provides: python3-babel-doc = %{version}-%{release}
|
||||||
Provides: babel-doc
|
Provides: babel-doc
|
||||||
Obsoletes: babel-doc
|
Obsoletes: babel-doc
|
||||||
@ -40,6 +54,7 @@ Documentation for Babel
|
|||||||
%autosetup -n Babel-%{version} -p1 -Sgit
|
%autosetup -n Babel-%{version} -p1 -Sgit
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%py2_build
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
BUILDDIR="$PWD/built-docs"
|
BUILDDIR="$PWD/built-docs"
|
||||||
@ -53,10 +68,12 @@ popd
|
|||||||
rm -f "$BUILDDIR/html/.buildinfo"
|
rm -f "$BUILDDIR/html/.buildinfo"
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%py2_install
|
||||||
%py3_install
|
%py3_install
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export TZ=UTC
|
export TZ=Asia/Shanghai
|
||||||
|
%{__python2} -m pytest
|
||||||
%{__python3} -m pytest
|
%{__python3} -m pytest
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
@ -72,6 +89,10 @@ export TZ=UTC
|
|||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_bindir}/pybabel
|
%{_bindir}/pybabel
|
||||||
|
|
||||||
|
%files -n python2-babel
|
||||||
|
%{python2_sitelib}/Babel-%{version}-py*.egg-info
|
||||||
|
%{python2_sitelib}/babel
|
||||||
|
|
||||||
%files -n python3-babel
|
%files -n python3-babel
|
||||||
%{python3_sitelib}/Babel-%{version}-py*.egg-info
|
%{python3_sitelib}/Babel-%{version}-py*.egg-info
|
||||||
%{python3_sitelib}/babel
|
%{python3_sitelib}/babel
|
||||||
@ -80,36 +101,6 @@ export TZ=UTC
|
|||||||
%doc built-docs/html/*
|
%doc built-docs/html/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Oct 28 2022 yanglongkang <yanglongkang@h-partners.com> - 2.9.1-2
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:rebuild for next release
|
|
||||||
|
|
||||||
* Fri Jul 30 2021 panxiaohe <panxiaohe@huawei.com> - 2.9.1-1
|
|
||||||
- Type:enhancement
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:update to 2.9.1
|
|
||||||
|
|
||||||
* Tue May 11 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 2.9.0-2
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:Fix CVE-2021-20095
|
|
||||||
|
|
||||||
* Sat Jan 23 2021 zoulin <zoulin13@huawei.com> - 2.9.0-1
|
|
||||||
- Type:enhancement
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:update to 2.9.0
|
|
||||||
|
|
||||||
* Thu Oct 29 2020 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 2.8.0-2
|
|
||||||
- Type:enhancement
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:remove python2
|
|
||||||
|
|
||||||
* Mon Jun 29 2020 Liquor <lirui130@huawei.com> - 2.8.0-1
|
* Mon Jun 29 2020 Liquor <lirui130@huawei.com> - 2.8.0-1
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
71
fix-tests-when-using-Python-3.9a6.patch
Normal file
71
fix-tests-when-using-Python-3.9a6.patch
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
From 7bdaa28a55e8d8228d5434effa4b1473ab7b3669 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Felix Schwarz <felix.schwarz@oss.schwarz.eu>
|
||||||
|
Date: Tue, 5 May 2020 08:05:56 +0000
|
||||||
|
Subject: [PATCH] fix tests when using Python 3.9a6
|
||||||
|
|
||||||
|
In Python 3.9a6 integer values for future flags were changed to prevent
|
||||||
|
collision with compiler flags. We need to retrieve these at runtime so
|
||||||
|
the test suite works with Python <= 3.8 as well as Python 3.9.
|
||||||
|
---
|
||||||
|
tests/test_util.py | 17 ++++++++++++-----
|
||||||
|
1 file changed, 12 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_util.py b/tests/test_util.py
|
||||||
|
index a6a4450..b9343aa 100644
|
||||||
|
--- a/tests/test_util.py
|
||||||
|
+++ b/tests/test_util.py
|
||||||
|
@@ -11,6 +11,7 @@
|
||||||
|
# individuals. For the exact contribution history, see the revision
|
||||||
|
# history and logs, available at http://babel.edgewall.org/log/.
|
||||||
|
|
||||||
|
+import __future__
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
@@ -20,6 +21,12 @@ from babel._compat import BytesIO
|
||||||
|
from babel.util import parse_future_flags
|
||||||
|
|
||||||
|
|
||||||
|
+class _FF:
|
||||||
|
+ division = __future__.division.compiler_flag
|
||||||
|
+ print_function = __future__.print_function.compiler_flag
|
||||||
|
+ with_statement = __future__.with_statement.compiler_flag
|
||||||
|
+ unicode_literals = __future__.unicode_literals.compiler_flag
|
||||||
|
+
|
||||||
|
def test_distinct():
|
||||||
|
assert list(util.distinct([1, 2, 1, 3, 4, 4])) == [1, 2, 3, 4]
|
||||||
|
assert list(util.distinct('foobar')) == ['f', 'o', 'b', 'a', 'r']
|
||||||
|
@@ -70,25 +77,25 @@ def test_parse_encoding_non_ascii():
|
||||||
|
from __future__ import print_function,
|
||||||
|
division, with_statement,
|
||||||
|
unicode_literals
|
||||||
|
-''', 0x10000 | 0x2000 | 0x8000 | 0x20000),
|
||||||
|
+''', _FF.print_function | _FF.division | _FF.with_statement | _FF.unicode_literals),
|
||||||
|
('''
|
||||||
|
from __future__ import print_function, division
|
||||||
|
print('hello')
|
||||||
|
-''', 0x10000 | 0x2000),
|
||||||
|
+''', _FF.print_function | _FF.division),
|
||||||
|
('''
|
||||||
|
from __future__ import print_function, division, unknown,,,,,
|
||||||
|
print 'hello'
|
||||||
|
-''', 0x10000 | 0x2000),
|
||||||
|
+''', _FF.print_function | _FF.division),
|
||||||
|
('''
|
||||||
|
from __future__ import (
|
||||||
|
print_function,
|
||||||
|
division)
|
||||||
|
-''', 0x10000 | 0x2000),
|
||||||
|
+''', _FF.print_function | _FF.division),
|
||||||
|
('''
|
||||||
|
from __future__ import \\
|
||||||
|
print_function, \\
|
||||||
|
division
|
||||||
|
-''', 0x10000 | 0x2000),
|
||||||
|
+''', _FF.print_function | _FF.division),
|
||||||
|
])
|
||||||
|
def test_parse_future(source, result):
|
||||||
|
fp = BytesIO(source.encode('latin-1'))
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user