From e94c6913be00e3f31136473540894163a3348146 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Sep 06 2021 14:32:58 +0000 Subject: Import python-retrying-1.3.3-2.el9 in CloudSIG xena --- diff --git a/.python-retrying.metadata b/.python-retrying.metadata new file mode 100644 index 0000000..e94a33f --- /dev/null +++ b/.python-retrying.metadata @@ -0,0 +1 @@ +5edeb4cdcd5f72ae0e6413a2d3514c4190c47fe0 SOURCES/retrying-1.3.3.tar.gz diff --git a/SOURCES/0001-Replaced-bundled-code-with-using-six.patch b/SOURCES/0001-Replaced-bundled-code-with-using-six.patch new file mode 100644 index 0000000..801a299 --- /dev/null +++ b/SOURCES/0001-Replaced-bundled-code-with-using-six.patch @@ -0,0 +1,92 @@ +From 2f5e186341cef8706c6f720f19142108898e8e93 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= +Date: Fri, 5 Sep 2014 14:36:25 +0200 +Subject: [PATCH] Replaced bundled code with using six + +Conflicts: + setup.py +(cherry picked from commit 062c5ba16b414770969871b3494f582402476985) +--- + requirements.txt | 1 + + retrying.py | 28 ++-------------------------- + setup.py | 4 ++++ + 3 files changed, 7 insertions(+), 26 deletions(-) + +diff --git a/requirements.txt b/requirements.txt +index e69de29..ffe2fce 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -0,0 +1 @@ ++six +diff --git a/retrying.py b/retrying.py +index 50fc439..9f0a2a0 100644 +--- a/retrying.py ++++ b/retrying.py +@@ -36,35 +36,11 @@ + ## ---------------------------------------------------------------------------- + + import random ++import six + import sys + import time + import traceback + +-# Python 3 compatibility hacks, pilfered from https://pypi.python.org/pypi/six/1.6.1 +-PY3 = sys.version_info[0] == 3 +-if PY3: +- def reraise(tp, value, tb=None): +- if value.__traceback__ is not tb: +- raise value.with_traceback(tb) +- raise value +- +-else: +- def exec_(_code_, _globs_=None, _locs_=None): +- """Execute code in a namespace.""" +- if _globs_ is None: +- frame = sys._getframe(1) +- _globs_ = frame.f_globals +- if _locs_ is None: +- _locs_ = frame.f_locals +- del frame +- elif _locs_ is None: +- _locs_ = _globs_ +- exec("""exec _code_ in _globs_, _locs_""") +- +- +- exec_("""def reraise(tp, value, tb=None): +- raise tp, value, tb +-""") + + # sys.maxint / 2, since Python 3.2 doesn't have a sys.maxint... + MAX_WAIT = 1073741823 +@@ -282,7 +258,7 @@ class Attempt(object): + if wrap_exception: + raise RetryError(self) + else: +- reraise(self.value[0], self.value[1], self.value[2]) ++ six.reraise(self.value[0], self.value[1], self.value[2]) + else: + return self.value + +diff --git a/setup.py b/setup.py +index 7793b8f..1772179 100644 +--- a/setup.py ++++ b/setup.py +@@ -29,6 +29,9 @@ CLASSIFIERS = [ + 'Topic :: Utilities', + ] + ++with open('requirements.txt') as file_requirements: ++ requirements = file_requirements.read().splitlines() ++ + settings.update( + name='retrying', + version='1.2.3', +@@ -42,6 +45,7 @@ settings.update( + keywords="decorator decorators retry retrying exception exponential backoff", + py_modules= ['retrying'], + test_suite="test_retrying", ++ install_requires=requirements, + ) + + diff --git a/SPECS/python-retrying.spec b/SPECS/python-retrying.spec new file mode 100644 index 0000000..3fa46c7 --- /dev/null +++ b/SPECS/python-retrying.spec @@ -0,0 +1,133 @@ +# Created by pyp2rpm-1.1.0b +%global pypi_name retrying + + +Name: python-%{pypi_name} +Version: 1.3.3 +Release: 2%{?dist} +Summary: General-purpose retrying library in Python + +License: ASL 2.0 +URL: https://github.com/rholder/retrying +Source0: https://pypi.python.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + + +%global _description\ +Retrying is an Apache 2.0 licensed general-purpose retrying library,\ +written in Python, to simplify the task of adding retry behavior to\ +just about anything.\ + + +%description %_description + +%package -n python3-%{pypi_name} +Summary: General-purpose retrying library in Python +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-six + +%description -n python3-%{pypi_name} +Retrying is an Apache 2.0 licensed general-purpose retrying library, +written in Python, to simplify the task of adding retry behavior to +just about anything. + +%prep +%setup -q -n %{pypi_name}-%{version} + +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + + +%build + +%{__python3} setup.py build + +%install + +%{__python3} setup.py install --skip-build --root %{buildroot} + +%files -n python3-%{pypi_name} +%doc README.rst LICENSE +%{python3_sitelib}/%{pypi_name}.py* +%{python3_sitelib}/__pycache__/%{pypi_name}.* +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info + +%changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Sep 15 2020 Joel Capitao - 1.3.3-1 +- Update to 1.3.3 + +* Wed Jul 29 2020 Fedora Release Engineering - 1.2.3-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 1.2.3-23 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.2.3-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 03 2019 Miro Hrončok - 1.2.3-21 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 1.2.3-20 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 1.2.3-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Feb 11 2019 Miro Hrončok - 1.2.3-18 +- Subpackage python2-retrying has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Sat Feb 02 2019 Fedora Release Engineering - 1.2.3-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 1.2.3-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.2.3-15 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Iryna Shcherbina - 1.2.3-14 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Fri Feb 09 2018 Fedora Release Engineering - 1.2.3-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 1.2.3-12 +- Python 2 binary package renamed to python2-retrying + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Thu Jul 27 2017 Fedora Release Engineering - 1.2.3-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.2.3-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 1.2.3-9 +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 1.2.3-8 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 1.2.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Nov 10 2015 Fedora Release Engineering - 1.2.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Jun 18 2015 Fedora Release Engineering - 1.2.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Sep 16 2014 Haïkel Guémar - 1.2.3-4 +- Add python3 subpackage (required for python3-tooz) + +* Sat Sep 06 2014 Alan Pevec - 1.2.3-3 +- unbundle python-six (from hguemar) + +* Mon Aug 25 2014 Alan Pevec - 1.2.3-1 +- Initial package.