From 4a20480db359e8f530896ca91df06a2e84e149ea Mon Sep 17 00:00:00 2001 From: Fabio Alessandro Locati Date: Sun, 3 Jan 2016 00:08:27 +0100 Subject: [PATCH] Update to new version --- 0001-Do-not-use-bundled-requests.patch | 97 --------- ...tocore-Add-some-version-requirements.patch | 25 --- python-botocore.spec | 193 ++++++++++-------- 3 files changed, 111 insertions(+), 204 deletions(-) delete mode 100644 0001-Do-not-use-bundled-requests.patch delete mode 100644 0001-botocore-Add-some-version-requirements.patch diff --git a/0001-Do-not-use-bundled-requests.patch b/0001-Do-not-use-bundled-requests.patch deleted file mode 100644 index afe179a..0000000 --- a/0001-Do-not-use-bundled-requests.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 0d6a559495203194128911071f7c2d0a21bd1500 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Fri, 25 Jul 2014 15:21:22 +0200 -Subject: [PATCH] Do not use bundled requests - ---- - botocore/awsrequest.py | 12 ++++++------ - botocore/compat.py | 2 +- - botocore/endpoint.py | 4 ++-- - botocore/retryhandler.py | 4 ++-- - botocore/utils.py | 2 +- - 5 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/botocore/awsrequest.py b/botocore/awsrequest.py -index bf4a4da..ccc01a6 100644 ---- a/botocore/awsrequest.py -+++ b/botocore/awsrequest.py -@@ -19,14 +19,14 @@ import socket - import inspect - - from botocore.compat import six --from botocore.vendored.requests import models --from botocore.vendored.requests.sessions import REDIRECT_STATI -+from requests import models -+from requests.sessions import REDIRECT_STATI - from botocore.compat import HTTPHeaders, HTTPResponse - from botocore.exceptions import UnseekableStreamError --from botocore.vendored.requests.packages.urllib3.connection import VerifiedHTTPSConnection --from botocore.vendored.requests.packages.urllib3.connection import HTTPConnection --from botocore.vendored.requests.packages.urllib3.connectionpool import HTTPConnectionPool --from botocore.vendored.requests.packages.urllib3.connectionpool import HTTPSConnectionPool -+from urllib3.connection import VerifiedHTTPSConnection -+from urllib3.connection import HTTPConnection -+from urllib3.connectionpool import HTTPConnectionPool -+from urllib3.connectionpool import HTTPSConnectionPool - - - logger = logging.getLogger(__name__) -diff --git a/botocore/compat.py b/botocore/compat.py -index f759ccb..97adeb4 100644 ---- a/botocore/compat.py -+++ b/botocore/compat.py -@@ -16,7 +16,7 @@ import datetime - import sys - import inspect - --from botocore.vendored import six -+import six - - - if six.PY3: -diff --git a/botocore/endpoint.py b/botocore/endpoint.py -index 963068d..9409499 100644 ---- a/botocore/endpoint.py -+++ b/botocore/endpoint.py -@@ -17,8 +17,8 @@ import logging - import time - import threading - --from botocore.vendored.requests.sessions import Session --from botocore.vendored.requests.utils import get_environ_proxies -+from requests.sessions import Session -+from requests.utils import get_environ_proxies - - import botocore.response - import botocore.exceptions -diff --git a/botocore/retryhandler.py b/botocore/retryhandler.py -index 2505db2..c12d2e0 100644 ---- a/botocore/retryhandler.py -+++ b/botocore/retryhandler.py -@@ -17,8 +17,8 @@ import functools - import logging - from binascii import crc32 - --from botocore.vendored.requests import ConnectionError, Timeout --from botocore.vendored.requests.packages.urllib3.exceptions import ClosedPoolError -+from requests import ConnectionError, Timeout -+from urllib3.exceptions import ClosedPoolError - - from botocore.exceptions import ChecksumError - -diff --git a/botocore/utils.py b/botocore/utils.py -index 91d5fd0..4c0db61 100644 ---- a/botocore/utils.py -+++ b/botocore/utils.py -@@ -20,7 +20,7 @@ from dateutil.tz import tzlocal, tzutc - - from botocore.exceptions import InvalidExpressionError, ConfigNotFound - from botocore.compat import json, quote --from botocore.vendored import requests -+import requests - from botocore.compat import OrderedDict - - --- -2.1.0 - diff --git a/0001-botocore-Add-some-version-requirements.patch b/0001-botocore-Add-some-version-requirements.patch deleted file mode 100644 index c25e8a4..0000000 --- a/0001-botocore-Add-some-version-requirements.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 61098ed6590a80ef27ea95def98e7691cea811e8 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Fri, 25 Jul 2014 15:11:57 +0200 -Subject: [PATCH] botocore: Add some version requirements - ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index b7a220f..d3758f1 100644 ---- a/setup.py -+++ b/setup.py -@@ -11,7 +11,7 @@ from setuptools import setup, find_packages - - - requires = ['jmespath==0.5.0', -- 'python-dateutil>=2.1,<3.0.0'] -+ 'python-dateutil>=1.5,<3.0.0'] - - - if sys.version_info[:2] == (2, 6): --- -2.1.0 - diff --git a/python-botocore.spec b/python-botocore.spec index 5a6dcd4..8b691a0 100644 --- a/python-botocore.spec +++ b/python-botocore.spec @@ -1,124 +1,153 @@ -%if 0%{?fedora} > 12 -%bcond_without python3 +%if 0%{?rhel} +%global with_python3 0 +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}} +%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}} %else -%bcond_with python3 +%global with_python3 1 %endif -Name: python-botocore -Version: 0.79.0 -Release: 3%{?dist} -Summary: The low-level, core functionality of boto 3 -Group: System Environment/Libraries +%global with_docs 0 +%global with_tests 1 + +%global pypi_name botocore + +Name: python-%{pypi_name} +Version: 1.3.15 +Release: 1%{?dist} +Summary: Low-level, data-driven core of boto 3 License: ASL 2.0 URL: https://github.com/boto/botocore -Source0: https://pypi.python.org/packages/source/b/botocore/botocore-%{version}.tar.gz -Patch0: 0001-botocore-Add-some-version-requirements.patch -Patch1: 0001-Do-not-use-bundled-requests.patch - +Source0: https://pypi.python.org/packages/source/b/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools -BuildRequires: python-six >= 1.1.0 -BuildRequires: python-jmespath = 0.5.0 -BuildRequires: python-dateutil >= 1.5 -%if %with python3 +%if 0%{?with_docs} +BuildRequires: python-sphinx +BuildRequires: python-guzzle_sphinx_theme +%endif # with_docs +%if 0%{?with_tests} +BuildRequires: python-tox +BuildRequires: python-docutils +BuildRequires: python-dateutil +BuildRequires: python2-jmespath +%endif # with_tests +%if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools -BuildRequires: python3-six >= 1.1.0 -BuildRequires: python3-jmespath = 0.5.0 -BuildRequires: python3-dateutil >= 1.5 -%endif - -Requires: python-six >= 1.1.0 -Requires: python-jmespath = 0.5.0 -Requires: python-dateutil >= 1.5 -Requires: python-requests -Requires: python-urllib3 +%if 0%{?with_docs} +BuildRequires: python3-sphinx +BuildRequires: python3-guzzle_sphinx_theme +%endif # with_docs +%if 0%{?with_tests} +BuildRequires: python3-tox +BuildRequires: python3-docutils +BuildRequires: python3-dateutil +BuildRequires: python3-jmespath +%endif # with_tests +%endif # with_python3 %description A low-level interface to a growing number of Amazon Web Services. The -botocore package is the foundation for AWS-CLI. +botocore package is the foundation for the AWS CLI as well as boto3. -This package contains the library for Python 2. +%package -n python2-%{pypi_name} +Summary: Low-level, data-driven core of boto 3 +Requires: python-jmespath +Requires: python-dateutil +Requires: python-docutils +Requires: python-requests +Requires: python-urllib3 +%{?python_provide:%python_provide python2-%{pypi_name}} -%package -n python3-botocore -Summary: The low-level, core functionality of boto 3 -Group: System Environment/Libraries +%description -n python2-%{pypi_name} +A low-level interface to a growing number of Amazon Web Services. The +botocore package is the foundation for the AWS CLI as well as boto3. -Requires: python3-six >= 1.1.0 -Requires: python3-jmespath = 0.5.0 -Requires: python3-dateutil >= 1.5 +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: Low-level, data-driven core of boto 3 +Requires: python3-jmespath +Requires: python3-dateutil +Requires: python3-docutils Requires: python3-requests Requires: python3-urllib3 +%{?python_provide:%python_provide python3-%{pypi_name}} -%description -n python3-botocore +%description -n python3-%{pypi_name} A low-level interface to a growing number of Amazon Web Services. The -botocore package is the foundation for AWS-CLI. - -This package contains the library for Python 3. +botocore package is the foundation for the AWS CLI as well as boto3. +%endif # with_python3 +%if 0%{?with_docs} +%package -n python-%{pypi_name}-doc +Summary: botocore documentation +%description -n python-%{pypi_name}-doc +Documentation for botocore +%endif # with_docs %prep -%setup -q -n botocore-%{version} -%patch0 -p1 -%patch1 -p1 - -%if %with python3 -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - +%setup -n %{pypi_name}-%{version} +rm -rf %{pypi_name}.egg-info %build -%if %with python3 -pushd %{py3dir} -%{__python3} setup.py build -popd -%endif - -%{__python2} setup.py build - - +%py2_build +%if 0%{?with_python3} +%py3_build +%endif # with_python3 %install -%if %with python3 -pushd %{py3dir} -%{__python3} setup.py install --skip-build --root %{buildroot} -rm -rf %{buildroot}%{python3_sitelib}/botocore/vendored -popd -%endif +%if 0%{?with_python3} +%py3_install +%endif # with_python3 +%py2_install +%if 0%{?with_docs} +%if 0%{?with_python3} +sphinx-build-3 docs/source html +rm -rf html/.{doctrees,buildinfo} +%else # with_python3 +sphinx-build docs/source html +rm -rf html/.{doctrees,buildinfo} +%endif # with_python3 +%endif # with_docs -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} -rm -rf %{buildroot}%{python2_sitelib}/botocore/vendored - - +%if 0%{?with_tests} %check -%if %with python3 -pushd %{py3dir} -%{__python3} setup.py test -popd -%endif - %{__python2} setup.py test +%if 0%{?with_python3} +%{__python3} setup.py test +%endif # with_python3 +%endif # with_tests - -%files -%{python2_sitelib}/* +%files -n python2-%{pypi_name} +%{!?_licensedir:%global license %doc} %doc README.rst -%doc LICENSE.txt +%license LICENSE.txt +%{python2_sitelib}/%{pypi_name} +%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info - -%if %with python3 -%files -n python3-botocore -%{python3_sitelib}/* +%if 0%{?with_python3} +%files -n python3-%{pypi_name} %doc README.rst -%doc LICENSE.txt -%endif +%license LICENSE.txt +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info +%endif # with_python3 +%if 0%{?with_docs} +%files -n python-%{pypi_name}-doc +%doc html +%endif # with_docs %changelog +* Tue Dec 29 2015 Fabio Alessandro Locati - 1.3.15-1 +- Update to current version +- Improve the spec + * Tue Nov 10 2015 Fedora Release Engineering - 0.79.0-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5