Compare commits
	
		
			No commits in common. "c8-stream-3.8" and "stream-python27-2.7-rhel-8.9.0" have entirely different histories.
		
	
	
		
			c8-stream-
			...
			stream-pyt
		
	
		
| @ -1 +0,0 @@ | |||||||
| 5605f75353368d32500afb30e60fc8f0edbca506 SOURCES/Babel-2.7.0.tar.gz |  | ||||||
							
								
								
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1 +1,5 @@ | |||||||
| SOURCES/Babel-2.7.0.tar.gz | Babel-0.9.5.tar.gz | ||||||
|  | /Babel-0.9.6.tar.gz | ||||||
|  | /Babel-1.3.tar.gz | ||||||
|  | /Babel-2.3.4.tar.gz | ||||||
|  | /Babel-2.5.1.tar.gz | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| diff --git a/babel/localedata.py b/babel/localedata.py
 | diff --git a/babel/localedata.py b/babel/localedata.py
 | ||||||
| index e012abb..dea0a0f 100644
 | index 4b6d3b6..080b723 100644
 | ||||||
| --- a/babel/localedata.py
 | --- a/babel/localedata.py
 | ||||||
| +++ b/babel/localedata.py
 | +++ b/babel/localedata.py
 | ||||||
| @@ -13,6 +13,8 @@
 | @@ -13,6 +13,8 @@
 | ||||||
| @ -9,17 +9,17 @@ index e012abb..dea0a0f 100644 | |||||||
| +import re
 | +import re
 | ||||||
| +import sys
 | +import sys
 | ||||||
|  import threading |  import threading | ||||||
|  |  from collections import MutableMapping | ||||||
|  from itertools import chain |  from itertools import chain | ||||||
|   | @@ -33,6 +35,7 @@ def get_base_dir():
 | ||||||
| @@ -22,6 +24,7 @@ from babel._compat import pickle, string_types, abc
 |  | ||||||
|  _cache = {} |  _cache = {} | ||||||
|  _cache_lock = threading.RLock() |  _cache_lock = threading.RLock() | ||||||
|  _dirname = os.path.join(os.path.dirname(__file__), 'locale-data') |  _dirname = os.path.join(get_base_dir(), 'locale-data') | ||||||
| +_windows_reserved_name_re = re.compile("^(con|prn|aux|nul|com[0-9]|lpt[0-9])$", re.I)
 | +_windows_reserved_name_re = re.compile("^(con|prn|aux|nul|com[0-9]|lpt[0-9])$", re.I)
 | ||||||
|   |   | ||||||
|   |   | ||||||
|  def normalize_locale(name): |  def normalize_locale(name): | ||||||
| @@ -38,6 +41,22 @@ def normalize_locale(name):
 | @@ -49,6 +52,22 @@ def normalize_locale(name):
 | ||||||
|              return locale_id |              return locale_id | ||||||
|   |   | ||||||
|   |   | ||||||
| @ -42,7 +42,7 @@ index e012abb..dea0a0f 100644 | |||||||
|  def exists(name): |  def exists(name): | ||||||
|      """Check whether locale data is available for the given locale. |      """Check whether locale data is available for the given locale. | ||||||
|   |   | ||||||
| @@ -49,7 +68,7 @@ def exists(name):
 | @@ -60,7 +79,7 @@ def exists(name):
 | ||||||
|          return False |          return False | ||||||
|      if name in _cache: |      if name in _cache: | ||||||
|          return True |          return True | ||||||
| @ -69,10 +69,10 @@ index e012abb..dea0a0f 100644 | |||||||
|                  if name != 'root' and merge_inherited: |                  if name != 'root' and merge_inherited: | ||||||
|                      merge(data, pickle.load(fileobj)) |                      merge(data, pickle.load(fileobj)) | ||||||
| diff --git a/tests/test_localedata.py b/tests/test_localedata.py
 | diff --git a/tests/test_localedata.py b/tests/test_localedata.py
 | ||||||
| index dbacba0..4730096 100644
 | index 3599b21..173e7a3 100644
 | ||||||
| --- a/tests/test_localedata.py
 | --- a/tests/test_localedata.py
 | ||||||
| +++ b/tests/test_localedata.py
 | +++ b/tests/test_localedata.py
 | ||||||
| @@ -11,11 +11,17 @@
 | @@ -11,12 +11,18 @@
 | ||||||
|  # individuals. For the exact contribution history, see the revision |  # individuals. For the exact contribution history, see the revision | ||||||
|  # history and logs, available at http://babel.edgewall.org/log/. |  # history and logs, available at http://babel.edgewall.org/log/. | ||||||
|   |   | ||||||
| @ -83,19 +83,19 @@ index dbacba0..4730096 100644 | |||||||
|  import unittest |  import unittest | ||||||
|  import random |  import random | ||||||
|  from operator import methodcaller |  from operator import methodcaller | ||||||
|  |  import sys | ||||||
|   |   | ||||||
| -from babel import localedata
 | -from babel import localedata, numbers
 | ||||||
| +import pytest
 | +import pytest
 | ||||||
| +
 | +
 | ||||||
| +from babel import localedata, Locale, UnknownLocaleError
 | +from babel import localedata, Locale, UnknownLocaleError, numbers
 | ||||||
|   |  | ||||||
|   |   | ||||||
|  class MergeResolveTestCase(unittest.TestCase): |  class MergeResolveTestCase(unittest.TestCase): | ||||||
| @@ -131,3 +137,34 @@ def test_locale_identifiers_cache(monkeypatch):
 |   | ||||||
|      localedata.locale_identifiers.cache = None | @@ -117,3 +123,33 @@ def test_locale_argument_acceptance():
 | ||||||
|      assert localedata.locale_identifiers() |      assert normalized_locale == None | ||||||
|      assert len(listdir_calls) == 2 |      locale_exist = localedata.exists(['en_us', None]) | ||||||
| +
 |      assert locale_exist == False | ||||||
| +
 | +
 | ||||||
| +def test_locale_name_cleanup():
 | +def test_locale_name_cleanup():
 | ||||||
| +    """
 | +    """
 | ||||||
							
								
								
									
										160
									
								
								Skip-tests-involving-freezegun-module-which-we-re-no.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										160
									
								
								Skip-tests-involving-freezegun-module-which-we-re-no.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,160 @@ | |||||||
|  | From 5dfa1057b809f9bf848916a1001c742cf5229f46 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Tomas Orsava <torsava@redhat.com> | ||||||
|  | Date: Mon, 18 Jun 2018 15:14:52 +0200 | ||||||
|  | Subject: [PATCH] Skip tests involving freezegun module which we're not | ||||||
|  |  shipping | ||||||
|  | 
 | ||||||
|  | ---
 | ||||||
|  |  tests/messages/test_frontend.py | 31 +++++++++++++++---------------- | ||||||
|  |  1 file changed, 15 insertions(+), 16 deletions(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/tests/messages/test_frontend.py b/tests/messages/test_frontend.py
 | ||||||
|  | index 20904a3..236dd5c 100644
 | ||||||
|  | --- a/tests/messages/test_frontend.py
 | ||||||
|  | +++ b/tests/messages/test_frontend.py
 | ||||||
|  | @@ -11,7 +11,6 @@
 | ||||||
|  |  # individuals. For the exact contribution history, see the revision | ||||||
|  |  # history and logs, available at http://babel.edgewall.org/log/. | ||||||
|  |  import shlex | ||||||
|  | -from freezegun import freeze_time
 | ||||||
|  |  from datetime import datetime | ||||||
|  |  from distutils.dist import Distribution | ||||||
|  |  from distutils.errors import DistutilsOptionError | ||||||
|  | @@ -150,7 +149,7 @@ class ExtractMessagesTestCase(unittest.TestCase):
 | ||||||
|  |          self.cmd.output_file = self._pot_file() | ||||||
|  |          self.assertRaises(DistutilsOptionError, self.cmd.finalize_options) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_extraction_with_default_mapping(self): | ||||||
|  |          self.cmd.copyright_holder = 'FooBar, Inc.' | ||||||
|  |          self.cmd.msgid_bugs_address = 'bugs.address@email.tld' | ||||||
|  | @@ -208,7 +207,7 @@ msgstr[1] ""
 | ||||||
|  |              actual_content = f.read() | ||||||
|  |          self.assertEqual(expected_content, actual_content) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_extraction_with_mapping_file(self): | ||||||
|  |          self.cmd.copyright_holder = 'FooBar, Inc.' | ||||||
|  |          self.cmd.msgid_bugs_address = 'bugs.address@email.tld' | ||||||
|  | @@ -261,7 +260,7 @@ msgstr[1] ""
 | ||||||
|  |              actual_content = f.read() | ||||||
|  |          self.assertEqual(expected_content, actual_content) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_extraction_with_mapping_dict(self): | ||||||
|  |          self.dist.message_extractors = { | ||||||
|  |              'project': [ | ||||||
|  | @@ -392,7 +391,7 @@ class InitCatalogTestCase(unittest.TestCase):
 | ||||||
|  |          self.cmd.output_file = 'dummy' | ||||||
|  |          self.assertRaises(DistutilsOptionError, self.cmd.finalize_options) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_with_output_dir(self): | ||||||
|  |          self.cmd.input_file = 'project/i18n/messages.pot' | ||||||
|  |          self.cmd.locale = 'en_US' | ||||||
|  | @@ -444,7 +443,7 @@ msgstr[1] ""
 | ||||||
|  |              actual_content = f.read() | ||||||
|  |          self.assertEqual(expected_content, actual_content) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_keeps_catalog_non_fuzzy(self): | ||||||
|  |          self.cmd.input_file = 'project/i18n/messages_non_fuzzy.pot' | ||||||
|  |          self.cmd.locale = 'en_US' | ||||||
|  | @@ -496,7 +495,7 @@ msgstr[1] ""
 | ||||||
|  |              actual_content = f.read() | ||||||
|  |          self.assertEqual(expected_content, actual_content) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_correct_init_more_than_2_plurals(self): | ||||||
|  |          self.cmd.input_file = 'project/i18n/messages.pot' | ||||||
|  |          self.cmd.locale = 'lv_LV' | ||||||
|  | @@ -550,7 +549,7 @@ msgstr[2] ""
 | ||||||
|  |              actual_content = f.read() | ||||||
|  |          self.assertEqual(expected_content, actual_content) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_correct_init_singular_plural_forms(self): | ||||||
|  |          self.cmd.input_file = 'project/i18n/messages.pot' | ||||||
|  |          self.cmd.locale = 'ja_JP' | ||||||
|  | @@ -601,7 +600,7 @@ msgstr[0] ""
 | ||||||
|  |              actual_content = f.read() | ||||||
|  |          self.assertEqual(expected_content, actual_content) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_supports_no_wrap(self): | ||||||
|  |          self.cmd.input_file = 'project/i18n/long_messages.pot' | ||||||
|  |          self.cmd.locale = 'en_US' | ||||||
|  | @@ -662,7 +661,7 @@ msgstr[1] ""
 | ||||||
|  |              actual_content = f.read() | ||||||
|  |          self.assertEqual(expected_content, actual_content) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_supports_width(self): | ||||||
|  |          self.cmd.input_file = 'project/i18n/long_messages.pot' | ||||||
|  |          self.cmd.locale = 'en_US' | ||||||
|  | @@ -827,7 +826,7 @@ commands:
 | ||||||
|  |      def assert_pot_file_exists(self): | ||||||
|  |          assert os.path.isfile(self._pot_file()) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_extract_with_default_mapping(self): | ||||||
|  |          pot_file = self._pot_file() | ||||||
|  |          self.cli.run(sys.argv + ['extract', | ||||||
|  | @@ -883,7 +882,7 @@ msgstr[1] ""
 | ||||||
|  |              actual_content = f.read() | ||||||
|  |          self.assertEqual(expected_content, actual_content) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_extract_with_mapping_file(self): | ||||||
|  |          pot_file = self._pot_file() | ||||||
|  |          self.cli.run(sys.argv + ['extract', | ||||||
|  | @@ -934,7 +933,7 @@ msgstr[1] ""
 | ||||||
|  |              actual_content = f.read() | ||||||
|  |          self.assertEqual(expected_content, actual_content) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_extract_with_exact_file(self): | ||||||
|  |          """Tests that we can call extract with a particular file and only | ||||||
|  |          strings from that file get extracted. (Note the absence of strings from file1.py) | ||||||
|  | @@ -983,7 +982,7 @@ msgstr[1] ""
 | ||||||
|  |              actual_content = f.read() | ||||||
|  |          self.assertEqual(expected_content, actual_content) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_init_with_output_dir(self): | ||||||
|  |          po_file = self._po_file('en_US') | ||||||
|  |          self.cli.run(sys.argv + ['init', | ||||||
|  | @@ -1034,7 +1033,7 @@ msgstr[1] ""
 | ||||||
|  |      def _i18n_dir(self): | ||||||
|  |          return os.path.join(self.datadir, 'project', 'i18n') | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_init_singular_plural_forms(self): | ||||||
|  |          po_file = self._po_file('ja_JP') | ||||||
|  |          self.cli.run(sys.argv + ['init', | ||||||
|  | @@ -1081,7 +1080,7 @@ msgstr[0] ""
 | ||||||
|  |              actual_content = f.read() | ||||||
|  |          self.assertEqual(expected_content, actual_content) | ||||||
|  |   | ||||||
|  | -    @freeze_time("1994-11-11")
 | ||||||
|  | +    @pytest.mark.skip(reason="Not shipping the freezegun module")
 | ||||||
|  |      def test_init_more_than_2_plural_forms(self): | ||||||
|  |          po_file = self._po_file('lv_LV') | ||||||
|  |          self.cli.run(sys.argv + ['init', | ||||||
|  | -- 
 | ||||||
|  | 2.14.4 | ||||||
|  | 
 | ||||||
							
								
								
									
										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>=0a',
 | ||||||
|  | +        ### But the version confuses setuptools 8 and higher so remove it in the
 | ||||||
|  | +        ### system package
 | ||||||
|  | +        #'pytz>=0a',
 | ||||||
|  | +        'pytz',
 | ||||||
|  |      ], | ||||||
|  |   | ||||||
|  |      cmdclass={'import_cldr': import_cldr}, | ||||||
| @ -1,58 +1,63 @@ | |||||||
| %global srcname Babel | %global srcname Babel | ||||||
| %global sum Library for internationalizing Python applications | %global sum Library for internationalizing Python applications | ||||||
| 
 | 
 | ||||||
|  | %bcond_without python3 | ||||||
|  | %bcond_with python36_module | ||||||
|  | 
 | ||||||
| # There is some bootstrapping involved when upgrading Python 3 | # There is some bootstrapping involved when upgrading Python 3 | ||||||
| # First of all we need babel (this package) to use sphinx | # First of all we need babel (this package) to use sphinx | ||||||
| # And pytest is at this point not yet ready | # And pytest is at this point not yet ready | ||||||
| %bcond_without bootstrap | %global bootstrap 0 | ||||||
| 
 |  | ||||||
| %bcond_with python2 |  | ||||||
| 
 | 
 | ||||||
| Name:           babel | Name:           babel | ||||||
| Version:        2.7.0 | Version:        2.5.1 | ||||||
| Release:        11%{?dist} | Release:        10%{?dist} | ||||||
| Summary:        Tools for internationalizing Python applications | Summary:        Tools for internationalizing Python applications | ||||||
| 
 | 
 | ||||||
| License:        BSD | License:        BSD | ||||||
| URL:            http://babel.pocoo.org/ | URL:            http://babel.pocoo.org/ | ||||||
| Source0:        https://files.pythonhosted.org/packages/source/B/%{srcname}/%{srcname}-%{version}.tar.gz | Source0:        https://files.pythonhosted.org/packages/source/B/%{srcname}/%{srcname}-%{version}.tar.gz | ||||||
|  | Patch0:         babel-2.3.4-remove-pytz-version.patch | ||||||
|  | 
 | ||||||
|  | # Remove dependency on an exotic testing package python-freezegun which we | ||||||
|  | # don't have capacity to ship in RHEL8 | ||||||
|  | Patch1:         Skip-tests-involving-freezegun-module-which-we-re-no.patch | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| # Fix CVE-2021-20095: relative path traversal allows an attacker to load | # Fix CVE-2021-20095: relative path traversal allows an attacker to load | ||||||
| # arbitrary locale files on disk and execute arbitrary code | # arbitrary locale files on disk and execute arbitrary code | ||||||
| # Resolved upstream: https://github.com/python-babel/babel/pull/782/ | # Resolved upstream: https://github.com/python-babel/babel/pull/782/ | ||||||
| # CVE bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1955615 | # CVE bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1955615 | ||||||
| Patch1:         CVE-2021-20095.patch | Patch2:         CVE-2021-20095.patch | ||||||
| 
 | 
 | ||||||
| BuildArch:      noarch | BuildArch:      noarch | ||||||
| # Exclude i686 arch. Due to a modularity issue it's being added to the |  | ||||||
| # x86_64 compose of CRB, but we don't want to ship it at all. |  | ||||||
| # See: https://projects.engineering.redhat.com/browse/RCM-72605 |  | ||||||
| ExcludeArch:    i686 |  | ||||||
| 
 | 
 | ||||||
| %if %{with python2} |  | ||||||
| BuildRequires:  python2-devel | BuildRequires:  python2-devel | ||||||
| BuildRequires:  python2-setuptools | BuildRequires:  python2-setuptools | ||||||
| %if %{with python2_pytest} |  | ||||||
| BuildRequires:  python2-pytz | BuildRequires:  python2-pytz | ||||||
| BuildRequires:  python2-pytest | BuildRequires:  python2-pytest | ||||||
| BuildRequires:  python2-freezegun | 
 | ||||||
|  | %if %{with python3} | ||||||
|  | %if %{with python36_module} | ||||||
|  | BuildRequires:  python36-devel | ||||||
|  | %else | ||||||
|  | BuildRequires:  python3-devel | ||||||
| %endif | %endif | ||||||
| %endif | BuildRequires:  python3-setuptools | ||||||
| BuildRequires:  python%{python3_pkgversion}-devel | %if !%{bootstrap} | ||||||
| BuildRequires:  python%{python3_pkgversion}-setuptools | BuildRequires:  python3-pytz | ||||||
| BuildRequires:  python%{python3_pkgversion}-rpm-macros | BuildRequires:  python3-pytest | ||||||
| %if !%{with bootstrap} |  | ||||||
| BuildRequires:  python%{python3_pkgversion}-pytz |  | ||||||
| BuildRequires:  python%{python3_pkgversion}-pytest |  | ||||||
| BuildRequires:  python%{python3_pkgversion}-freezegun |  | ||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| # build the documentation | # build the documentation | ||||||
| BuildRequires:  make | BuildRequires:  make | ||||||
|  | %if !%{bootstrap} | ||||||
|  | BuildRequires:  python3-sphinx | ||||||
|  | %endif  # bootstrap | ||||||
|  | %endif  # python3 | ||||||
| 
 | 
 | ||||||
| %if !%{with bootstrap} | Requires:       python2-babel | ||||||
| BuildRequires:  python%{python3_pkgversion}-sphinx | Requires:       python2-setuptools | ||||||
| %endif |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %description | %description | ||||||
| @ -64,8 +69,6 @@ Babel is composed of two major parts: | |||||||
|   providing access to various locale display names, localized number |   providing access to various locale display names, localized number | ||||||
|   and date formatting, etc. |   and date formatting, etc. | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| %if %{with python2} |  | ||||||
| %package -n python2-babel | %package -n python2-babel | ||||||
| Summary:        %sum | Summary:        %sum | ||||||
| 
 | 
 | ||||||
| @ -82,18 +85,17 @@ Babel is composed of two major parts: | |||||||
| * a Python interface to the CLDR (Common Locale Data Repository), | * a Python interface to the CLDR (Common Locale Data Repository), | ||||||
|   providing access to various locale display names, localized number |   providing access to various locale display names, localized number | ||||||
|   and date formatting, etc. |   and date formatting, etc. | ||||||
| %endif |  | ||||||
| 
 | 
 | ||||||
| 
 | %if %{with python3} | ||||||
| %package -n python%{python3_pkgversion}-babel | %package -n python3-babel | ||||||
| Summary:        %sum | Summary:        %sum | ||||||
| 
 | 
 | ||||||
| Requires:       python%{python3_pkgversion}-setuptools | Requires:       python3-setuptools | ||||||
| Requires:       python%{python3_pkgversion}-pytz | Requires:       python3-pytz | ||||||
| 
 | 
 | ||||||
| %{?python_provide:%python_provide python%{python3_pkgversion}-babel} | %{?python_provide:%python_provide python3-babel} | ||||||
| 
 | 
 | ||||||
| %description -n python%{python3_pkgversion}-babel | %description -n python3-babel | ||||||
| Babel is composed of two major parts: | Babel is composed of two major parts: | ||||||
| 
 | 
 | ||||||
| * tools to build and work with gettext message catalogs | * tools to build and work with gettext message catalogs | ||||||
| @ -102,7 +104,6 @@ Babel is composed of two major parts: | |||||||
|   providing access to various locale display names, localized number |   providing access to various locale display names, localized number | ||||||
|   and date formatting, etc. |   and date formatting, etc. | ||||||
| 
 | 
 | ||||||
| %if !%{with bootstrap} |  | ||||||
| %package doc | %package doc | ||||||
| Summary:        Documentation for Babel | Summary:        Documentation for Babel | ||||||
| Provides:       python-babel-doc = %{version}-%{release} | Provides:       python-babel-doc = %{version}-%{release} | ||||||
| @ -111,21 +112,22 @@ Provides:       python3-babel-doc = %{version}-%{release} | |||||||
| 
 | 
 | ||||||
| %description doc | %description doc | ||||||
| Documentation for Babel | Documentation for Babel | ||||||
|  | 
 | ||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| %prep | %prep | ||||||
| %autosetup -n %{srcname}-%{version} -p1 | %autosetup -n %{srcname}-%{version} -p1 | ||||||
| 
 | 
 | ||||||
| %build | %build | ||||||
| %if %{with python2} |  | ||||||
| %py2_build | %py2_build | ||||||
| %endif | %if %{with python3} | ||||||
| %py3_build | %py3_build | ||||||
|  | %endif | ||||||
| 
 | 
 | ||||||
|  | %if %{with python3} | ||||||
|  | %if !%{bootstrap} | ||||||
| BUILDDIR="$PWD/built-docs" | BUILDDIR="$PWD/built-docs" | ||||||
| rm -rf "$BUILDDIR" | rm -rf "$BUILDDIR" | ||||||
| 
 |  | ||||||
| %if !%{with bootstrap} |  | ||||||
| pushd docs | pushd docs | ||||||
| make \ | make \ | ||||||
|     SPHINXBUILD=sphinx-build-3 \ |     SPHINXBUILD=sphinx-build-3 \ | ||||||
| @ -134,107 +136,77 @@ make \ | |||||||
| popd | popd | ||||||
| rm -f "$BUILDDIR/html/.buildinfo" | rm -f "$BUILDDIR/html/.buildinfo" | ||||||
| %endif | %endif | ||||||
|  | %endif | ||||||
| 
 | 
 | ||||||
| %install | %install | ||||||
| %if %{with python2} | %if %{with python3} | ||||||
| %py2_install |  | ||||||
| %endif |  | ||||||
| %py3_install | %py3_install | ||||||
|  | %endif | ||||||
|  | %py2_install | ||||||
| 
 | 
 | ||||||
| mv %{buildroot}%{_bindir}/pybabel %{buildroot}%{_bindir}/pybabel-%{python3_version} | mv %{buildroot}%{_bindir}/pybabel{,-%{python2_version}} | ||||||
|  | ln -s pybabel-%{python2_version} %{buildroot}%{_bindir}/pybabel-2 | ||||||
| 
 | 
 | ||||||
| %check | %check | ||||||
| export TZ=America/New_York | export TZ=America/New_York | ||||||
| %if %{with python2} && %{with python2_pytest} |  | ||||||
| %{__python2} -m pytest | %{__python2} -m pytest | ||||||
| %endif | %if %{with python3} | ||||||
| %if !%{with bootstrap} | %if !%{bootstrap} | ||||||
| %{__python3} -m pytest | %{__python3} -m pytest | ||||||
| %endif | %endif | ||||||
|  | %endif | ||||||
| 
 | 
 | ||||||
| %if %{with python2} | %files | ||||||
| %files -n python2-babel |  | ||||||
| %doc CHANGES AUTHORS | %doc CHANGES AUTHORS | ||||||
| %license LICENSE | %license LICENSE | ||||||
|  | %{_bindir}/pybabel-2 | ||||||
|  | %{_bindir}/pybabel-%{python2_version} | ||||||
|  | 
 | ||||||
|  | %files -n python2-babel | ||||||
| %{python2_sitelib}/Babel-%{version}-py*.egg-info | %{python2_sitelib}/Babel-%{version}-py*.egg-info | ||||||
| %{python2_sitelib}/babel | %{python2_sitelib}/babel | ||||||
| %endif |  | ||||||
| 
 | 
 | ||||||
| %files -n python%{python3_pkgversion}-babel | %if %{with python3} | ||||||
| %doc CHANGES AUTHORS | %files -n python3-babel | ||||||
| %license LICENSE |  | ||||||
| %{python3_sitelib}/Babel-%{version}-py*.egg-info | %{python3_sitelib}/Babel-%{version}-py*.egg-info | ||||||
| %{python3_sitelib}/babel | %{python3_sitelib}/babel | ||||||
| %{_bindir}/pybabel-%{python3_version} |  | ||||||
| 
 | 
 | ||||||
| %if !%{with bootstrap} | %if !%{bootstrap} | ||||||
| %files doc | %files doc | ||||||
| %doc built-docs/html/* | %doc built-docs/html/* | ||||||
| %endif | %endif  # bootstrap | ||||||
|  | %endif  # python3 | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
| * Wed May 12 2021 Charalampos Stratakis <cstratak@redhat.com> - 2.7.0-11 | * Wed May 12 2021 Charalampos Stratakis <cstratak@redhat.com> - 2.5.1-10 | ||||||
| - Fix CVE-2021-20095 | - Fix CVE-2021-20095 | ||||||
| Resolves: rhbz#1955615 | Resolves: rhbz#1955615 | ||||||
| 
 | 
 | ||||||
| * Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 2.7.0-10 | * Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 2.5.1-9 | ||||||
| - Exclude unsupported i686 arch | - Bumping due to problems with modular RPM upgrade path | ||||||
|  | - Resolves: rhbz#1695587 | ||||||
| 
 | 
 | ||||||
| * Tue Dec 03 2019 Tomas Orsava <torsava@redhat.com> - 2.7.0-9 | * Tue Oct 02 2018 Lumír Balhar <lbalhar@redhat.com> - 2.5.1-8 | ||||||
| - Rename the pybabel executable to pybabel-3.8 and move it to the | - Fix unversioned requires/buildrequires | ||||||
|   python38-babel package | - Resolves: rhbz#1628242 | ||||||
| 
 | 
 | ||||||
| * Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 2.7.0-8 | * Wed Aug 08 2018 Lumír Balhar <lbalhar@redhat.com> - 2.5.1-7 | ||||||
| - Adjusted for Python 3.8 module in RHEL 8 | - Remove unversioned binaries | ||||||
|  | - Resolves: rhbz#1613343 | ||||||
| 
 | 
 | ||||||
| * Thu Oct 31 2019 Nils Philippsen <nils@tiptoe.de> - 2.7.0-7 | * Tue Jul 31 2018 Lumír Balhar <lbalhar@redhat.com> - 2.5.1-6 | ||||||
| - drop python2-babel only from F33 on as it is needed for trac (for the time | - Make possible to disable python3 subpackage | ||||||
|   being, #1737930) |  | ||||||
| 
 |  | ||||||
| * Thu Oct 31 2019 Nils Philippsen <nils@tiptoe.de> - 2.7.0-6 |  | ||||||
| - drop python2-babel from F32 on |  | ||||||
| 
 |  | ||||||
| * Fri Sep 13 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-5 |  | ||||||
| - Reduce Python 2 build dependencies on Fedora 32 |  | ||||||
| 
 |  | ||||||
| * Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-4 |  | ||||||
| - Rebuilt for Python 3.8 |  | ||||||
| 
 |  | ||||||
| * Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-3 |  | ||||||
| - Bootstrap for Python 3.8 |  | ||||||
| 
 |  | ||||||
| * Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.0-2 |  | ||||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |  | ||||||
| 
 |  | ||||||
| * Mon May 27 2019 Felix Schwarz <fschwarz@fedoraproject.org> - 2.7.0-1 |  | ||||||
| - update to upstream version 2.7.0 |  | ||||||
| 
 |  | ||||||
| * Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-6 |  | ||||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |  | ||||||
| 
 |  | ||||||
| * Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-5 |  | ||||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |  | ||||||
| 
 |  | ||||||
| * Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-4 |  | ||||||
| - Rebuilt for Python 3.7 |  | ||||||
| 
 |  | ||||||
| * Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-3 |  | ||||||
| - Rebuilt for Python 3.7 |  | ||||||
| 
 |  | ||||||
| * Fri Jun 29 2018 Felix Schwarz <fschwarz@fedoraproject.org> - 2.6.0-2 |  | ||||||
| - add setting to build without Python 2 support |  | ||||||
| 
 |  | ||||||
| * Fri Jun 29 2018 Felix Schwarz <fschwarz@fedoraproject.org> - 2.6.0-1 |  | ||||||
| - update to upstream version 2.6.0 |  | ||||||
| 
 | 
 | ||||||
| * Mon Jun 18 2018 Tomas Orsava <torsava@redhat.com> - 2.5.1-5 | * Mon Jun 18 2018 Tomas Orsava <torsava@redhat.com> - 2.5.1-5 | ||||||
| - Run tests in pytest (as declared in BuildRequires) | - Remove dependency on an exotic testing package python-freezegun which we | ||||||
|  |   don't have capacity to ship in RHEL8 | ||||||
|  | - Run tests in pytest (as declared in BuildRequires) instead of unittest | ||||||
| 
 | 
 | ||||||
| * Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 2.5.1-4 | * Mon Jun 18 2018 Tomas Orsava <torsava@redhat.com> - 2.5.1-4 | ||||||
| - Rebuilt for Python 3.7 | - Build the documentation always using the Python 3 version Sphinx | ||||||
| 
 | 
 | ||||||
| * Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.5.1-3 | * Tue May 01 2018 Tomas Orsava <torsava@redhat.com> - 2.5.1-3 | ||||||
| - Bootstrap for Python 3.7 | - Require the python36-devel package when building for the python36 module | ||||||
| 
 | 
 | ||||||
| * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-2 | * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-2 | ||||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild | - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user