From fe34aca2732d0c9b545c0c5b33ef761d8c49ef7c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 06 2019 11:06:45 +0000 Subject: import python-msrest-0.5.4-1.el7 --- diff --git a/.gitignore b/.gitignore index dca16b3..8aa7023 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -SOURCES/msrest-0.4.18.tar.gz +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 index 1ad0f74..0316a0e 100644 --- a/.python-msrest.metadata +++ b/.python-msrest.metadata @@ -1 +1,2 @@ -e99ab57943eded8c3d43cd8ceba4ea8c022c7f7b SOURCES/msrest-0.4.18.tar.gz +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.4.11-build.patch b/SOURCES/python-msrest-0.4.11-build.patch deleted file mode 100644 index 924c43b..0000000 --- a/SOURCES/python-msrest-0.4.11-build.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -up ./setup.py.orig ./setup.py ---- ./setup.py.orig 2017-06-21 21:09:56.000000000 +0200 -+++ ./setup.py 2017-06-30 14:09:35.185100223 +0200 -@@ -25,6 +25,17 @@ - # -------------------------------------------------------------------------- - - from setuptools import setup -+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') -+ - - setup( - name='msrest', -@@ -47,13 +58,5 @@ setup( - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - 'Topic :: Software Development'], -- install_requires=[ -- "requests~=2.14", -- "requests_oauthlib>=0.5.0", -- "isodate>=0.5.4", -- "certifi>=2017.4.17", -- ], -- extras_require={ -- ":python_version<'3.4'": ['enum34>=1.0.4'], -- } -+ install_requires=requirements - ) 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 index 1a61cf2..04580e9 100644 --- a/SPECS/python-msrest.spec +++ b/SPECS/python-msrest.spec @@ -9,13 +9,18 @@ %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.4.18 +Version: 0.5.4 Release: 1%{?dist} Summary: %{common_summary} @@ -23,9 +28,11 @@ 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.4.11-build.patch +Patch0: %{name}-0.5.4-build.patch +Patch1: bundled-libs.patch BuildRequires: %{py2_prefix}-setuptools BuildRequires: python-devel @@ -35,6 +42,8 @@ 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 @@ -74,22 +83,44 @@ Requires: python3-requests-oauthlib %prep -%autosetup -n %{srcname}-for-python-%{version} +%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} @@ -99,20 +130,28 @@ rm tests/test_serialization.py %files -n python-%{srcname} -%doc README.rst -%license LICENSE.md +%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 -%license LICENSE.md +%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