From 539926f8af7b90ff33df79542a7f766ed33865e4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 23 2019 01:31:47 +0000 Subject: import python-msrest-0.5.4-1.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8aa7023 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/msrest-0.5.4.tar.gz +SOURCES/typing-3.5.2.2.tar.gz diff --git a/.python-msrest.metadata b/.python-msrest.metadata new file mode 100644 index 0000000..0316a0e --- /dev/null +++ b/.python-msrest.metadata @@ -0,0 +1,2 @@ +6946619ea43aa94221b540ac1a406a8b50adf6e5 SOURCES/msrest-0.5.4.tar.gz +6efc50968e594bd75aee0c1c956d157c67865c33 SOURCES/typing-3.5.2.2.tar.gz diff --git a/SOURCES/bundled-libs.patch b/SOURCES/bundled-libs.patch new file mode 100644 index 0000000..ad3dd4e --- /dev/null +++ b/SOURCES/bundled-libs.patch @@ -0,0 +1,113 @@ +diff -uNr a/msrest/authentication.py b/msrest/authentication.py +--- a/msrest/authentication.py 2018-07-13 00:15:27.000000000 +0200 ++++ b/msrest/authentication.py 2019-05-03 15:24:56.197378655 +0200 +@@ -23,6 +23,8 @@ + # IN THE SOFTWARE. + # + # -------------------------------------------------------------------------- ++import sys ++sys.path.insert(0, '/usr/lib/python-msrest/bundled') + from typing import Optional, Dict + + import requests +@@ -250,4 +252,4 @@ + self._topic_key_header: topic_key, + } + ) +- +\ No newline at end of file ++ +diff -uNr a/msrest/configuration.py b/msrest/configuration.py +--- a/msrest/configuration.py 2018-07-13 00:15:27.000000000 +0200 ++++ b/msrest/configuration.py 2019-05-03 15:21:21.714180695 +0200 +@@ -33,6 +33,8 @@ + from ConfigParser import NoOptionError # type: ignore + import platform + ++import sys ++sys.path.insert(0, '/usr/lib/python-msrest/bundled') + from typing import Dict, List, Any, Callable + + import requests +diff -uNr a/msrest/exceptions.py b/msrest/exceptions.py +--- a/msrest/exceptions.py 2018-07-13 00:15:27.000000000 +0200 ++++ b/msrest/exceptions.py 2019-05-03 15:24:04.788289959 +0200 +@@ -27,6 +27,7 @@ + import logging + import sys + ++sys.path.insert(0, '/usr/lib/python-msrest/bundled') + from typing import Callable, Any, Optional, TYPE_CHECKING + + if TYPE_CHECKING: +diff -uNr a/msrest/http_logger.py b/msrest/http_logger.py +--- a/msrest/http_logger.py 2018-07-13 00:15:27.000000000 +0200 ++++ b/msrest/http_logger.py 2019-05-03 15:25:23.071902273 +0200 +@@ -28,6 +28,8 @@ + import re + import types + ++import sys ++sys.path.insert(0, '/usr/lib/python-msrest/bundled') + from typing import Any, Union, Optional, TYPE_CHECKING + + if TYPE_CHECKING: +diff -uNr a/msrest/paging.py b/msrest/paging.py +--- a/msrest/paging.py 2018-07-13 00:15:27.000000000 +0200 ++++ b/msrest/paging.py 2019-05-03 15:21:59.087518189 +0200 +@@ -29,6 +29,8 @@ + except ImportError: + from collections import Iterator + ++import sys ++sys.path.insert(0, '/usr/lib/python-msrest/bundled') + from typing import Dict, Any, List, Callable, Optional, TYPE_CHECKING + + if TYPE_CHECKING: +diff -uNr a/msrest/pipeline.py b/msrest/pipeline.py +--- a/msrest/pipeline.py 2018-07-13 00:15:27.000000000 +0200 ++++ b/msrest/pipeline.py 2019-05-03 15:23:44.789644462 +0200 +@@ -33,6 +33,8 @@ + from urllib.parse import urlparse + import xml.etree.ElementTree as ET + ++import sys ++sys.path.insert(0, '/usr/lib/python-msrest/bundled') + from typing import Dict, Any, Optional, Union, List, TYPE_CHECKING + + if TYPE_CHECKING: +diff -uNr a/msrest/polling/poller.py b/msrest/polling/poller.py +--- a/msrest/polling/poller.py 2018-07-13 00:15:27.000000000 +0200 ++++ b/msrest/polling/poller.py 2019-05-03 15:22:48.745637924 +0200 +@@ -31,6 +31,8 @@ + except ImportError: + from urllib.parse import urlparse + ++import sys ++sys.path.insert(0, '/usr/lib/python-msrest/bundled') + from typing import Any, Callable, Union, List, Optional, TYPE_CHECKING + + if TYPE_CHECKING: +diff -uNr a/msrest/serialization.py b/msrest/serialization.py +--- a/msrest/serialization.py 2018-07-13 00:15:27.000000000 +0200 ++++ b/msrest/serialization.py 2019-05-03 15:24:30.140840555 +0200 +@@ -41,6 +41,7 @@ + + import isodate + ++sys.path.insert(0, '/usr/lib/python-msrest/bundled') + from typing import Dict, Any + + from .exceptions import ( +diff -uNr a/msrest/service_client.py b/msrest/service_client.py +--- a/msrest/service_client.py 2018-07-13 00:15:27.000000000 +0200 ++++ b/msrest/service_client.py 2019-05-03 15:23:16.304149413 +0200 +@@ -33,6 +33,8 @@ + from urllib.parse import urljoin, urlparse + import warnings + ++import sys ++sys.path.insert(0, '/usr/lib/python-msrest/bundled') + from typing import Any, Dict, Union, IO, Tuple, Optional, cast, TYPE_CHECKING + + if TYPE_CHECKING: diff --git a/SOURCES/python-msrest-0.5.4-build.patch b/SOURCES/python-msrest-0.5.4-build.patch new file mode 100644 index 0000000..67e2337 --- /dev/null +++ b/SOURCES/python-msrest-0.5.4-build.patch @@ -0,0 +1,38 @@ +diff -uNr a/setup.py b/setup.py +--- a/setup.py 2018-07-13 00:15:27.000000000 +0200 ++++ b/setup.py 2019-05-03 11:50:56.913761291 +0200 +@@ -25,6 +25,18 @@ + # -------------------------------------------------------------------------- + + from setuptools import setup, find_packages ++import sys ++ ++requirements = [ ++ "requests", ++ "requests_oauthlib>=0.5.0", ++ "isodate>=0.5.4", ++ "certifi" ++] ++if sys.version_info[0] == 2: ++ requirements.append('enum34>=1.0.4') ++ requirements.append('typing') ++ + + setup( + name='msrest', +@@ -46,14 +58,5 @@ + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + 'Topic :: Software Development'], +- install_requires=[ +- "requests~=2.16", +- "requests_oauthlib>=0.5.0", +- "isodate>=0.6.0", +- "certifi>=2017.4.17", +- ], +- extras_require={ +- ":python_version<'3.4'": ['enum34>=1.0.4'], +- ":python_version<'3.5'": ['typing'], +- } ++ install_requires=requirements + ) diff --git a/SPECS/python-msrest.spec b/SPECS/python-msrest.spec new file mode 100644 index 0000000..04580e9 --- /dev/null +++ b/SPECS/python-msrest.spec @@ -0,0 +1,229 @@ +%if 0%{?fedora} +%global _with_python3 1 +%global _with_tests 1 +%endif + +%if 0%{?rhel} +%global py2_prefix python +%else +%global py2_prefix python2 +%endif + +%global bundled_lib_dir bundled +# python-typing +%global typing_version 3.5.2.2 +%global typing_dir %{bundled_lib_dir}/typing + +%global srcname msrest + +%global common_summary AutoRest swagger generator Python client runtime +%global common_description %{common_summary}. + +Name: python-%{srcname} +Version: 0.5.4 +Release: 1%{?dist} +Summary: %{common_summary} + +Group: System Environment/Libraries +License: MIT +URL: https://github.com/Azure/msrest-for-python/ +Source0: %{srcname}-%{version}.tar.gz +Source1: typing-%{typing_version}.tar.gz +# - Disable versioned dependencies not yet available in Fedora/EPEL +# - Fix setup.py for older versions of setuptools (EPEL) +Patch0: %{name}-0.5.4-build.patch +Patch1: bundled-libs.patch + +BuildRequires: %{py2_prefix}-setuptools +BuildRequires: python-devel + +Requires: python-enum34 +Requires: python-isodate +Requires: %{py2_prefix}-requests +Requires: %{py2_prefix}-requests-oauthlib + +Provides: bundled(python-typing) = %{typing_version} + +%if 0%{?_with_python3} +BuildRequires: python3-devel +%endif +# Needed for tests +%if 0%{?_with_tests} +BuildRequires: %{py2_prefix}-certifi +BuildRequires: python-enum34 +BuildRequires: python-httpretty +BuildRequires: python-isodate +BuildRequires: %{py2_prefix}-requests +BuildRequires: %{py2_prefix}-requests-oauthlib +%if 0%{?_with_python3} +BuildRequires: python3-certifi +BuildRequires: python3-httpretty +BuildRequires: python3-isodate +BuildRequires: python3-requests +BuildRequires: python3-requests-oauthlib +%endif +%endif +BuildArch: noarch + +%description +%{common_description} + + +%if 0%{?_with_python3} +%package -n python3-%{srcname} +Summary: %{common_summary} +Requires: python3-isodate +Requires: python3-requests +Requires: python3-requests-oauthlib +%{?python_provide:%python_provide python3-%{srcname}} + +%description -n python3-%{srcname} +%{common_description} +%endif + + +%prep +%setup -q -n %{srcname}-for-python-%{version} +%patch0 -p1 + +# add bundled libraries path +%patch1 -p1 + +# Remove failing test +# TODO: report bug upstream +rm tests/test_serialization.py + +# bundled libraries +mkdir %{bundled_lib_dir} + +# python-typing bundle +tar -xzf %SOURCE1 -C %{bundled_lib_dir} +mv %{bundled_lib_dir}/typing-%{typing_version} %{typing_dir} +cp %{typing_dir}/LICENSE typing_LICENSE +cp %{typing_dir}/README.rst typing_README.rst + +%build +%py2_build +%{?_with_python3:%py3_build} + +# python-typing bundle +pushd %{typing_dir} +%{__python2} setup.py build +popd + + +%install +%py2_install +%{?_with_python3:%py3_install} + +# python-typing bundle +pushd %{typing_dir} +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} --install-lib /usr/lib/%{name}/%{bundled_lib_dir} +popd + + +%check +%if 0%{?_with_tests} +%{__python2} setup.py test +%{?_with_python3:%{__python3} setup.py test} +%endif + + +%files -n python-%{srcname} +%doc README.rst typing_README.rst +%license LICENSE.md typing_LICENSE +%{python2_sitelib}/* + +# bundled libraries +%dir /usr/lib/%{name} +/usr/lib/%{name}/%{bundled_lib_dir} + + +%if 0%{?_with_python3} +%files -n python3-%{srcname} +%doc README.rst typing_README.rst +%license LICENSE.md typing_LICENSE +%{python3_sitelib}/* +%endif + + +%changelog +* Mon May 13 2019 Oyvind Albrigtsen - 0.5.4-1 +- Update to 0.5.4 + Resolves: rhbz#1707859 + +* Fri Nov 10 2017 Mohamed El Morabity - 0.4.18-1 +- Update to 0.4.18 + +* Tue Oct 17 2017 Mohamed El Morabity - 0.4.17-1 +- Update to 0.4.17 + +* Fri Oct 06 2017 Mohamed El Morabity - 0.4.16-1 +- Update to 0.4.16 + +* Wed Aug 30 2017 Mohamed El Morabity - 0.4.14-1 +- Update to 0.4.14 +- Use python2- prefix for Fedora dependencies if possible + +* Thu Jul 27 2017 Fedora Release Engineering - 0.4.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Jun 30 2017 Mohamed El Morabity - 0.4.11-1 +- Update to 0.4.11 + +* Fri Jun 09 2017 Mohamed El Morabity - 0.4.9-1 +- Update to 0.4.9 + +* Tue May 30 2017 Mohamed El Morabity - 0.4.8-2 +- Disable version check on certifi in setup.py + +* Tue May 30 2017 Mohamed El Morabity - 0.4.8-1 +- Update to 0.4.8 + +* Wed Apr 05 2017 Mohamed El Morabity - 0.4.7-1 +- Update to 0.4.7 + +* Tue Mar 07 2017 Mohamed El Morabity - 0.4.6-1 +- Update to 0.4.6 + +* Tue Feb 14 2017 Mohamed El Morabity - 0.4.5-1 +- Update to 0.4.5 + +* Thu Jan 26 2017 Mohamed El Morabity - 0.4.4-2 +- Add license file + +* Tue Sep 27 2016 Mohamed El Morabity - 0.4.4-1 +- Update to 0.4.4 + +* Mon Sep 05 2016 Mohamed El Morabity - 0.4.3-1 +- Update to 0.4.3 + +* Fri Jun 24 2016 Mohamed El Morabity - 0.4.0-2 +- Fix tests for Fedora >= 24 + +* Thu May 26 2016 Mohamed El Morabity - 0.4.0-1 +- Update to 0.4.0 + +* Sun May 01 2016 Mohamed El Morabity - 0.3.0-1 +- Update to 0.3.0 + +* Fri Apr 01 2016 Mohamed El Morabity - 0.2.0-1 +- Update to 0.2.0 + +* Fri Mar 25 2016 Mohamed El Morabity - 0.1.3-2 +- Add missing depedency to enum34 Python module + +* Wed Mar 23 2016 Mohamed El Morabity - 0.1.3-1 +- Update to 0.1.3 + +* Wed Mar 16 2016 Mohamed El Morabity - 0.1.2-1 +- Update to 0.1.2 + +* Sat Mar 05 2016 Mohamed El Morabity - 0.1.1-1 +- Update to 0.1.1 + +* Wed Mar 02 2016 Mohamed El Morabity - 0.0.3-1 +- Update to 0.0.3 + +* Sun Feb 28 2016 Mohamed El Morabity - 0.0.2-1 +- Initial RPM release