Import
This commit is contained in:
parent
e7ff40c60d
commit
97ba3e5e36
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
||||
/botocore-0.58.0.tar.gz
|
95
0001-Do-not-use-bundled-requests.patch
Normal file
95
0001-Do-not-use-bundled-requests.patch
Normal file
@ -0,0 +1,95 @@
|
||||
From cb67f78430fcc49b14b8c74d60f1d99e75c59c26 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Fri, 25 Jul 2014 15:21:22 +0200
|
||||
Subject: [PATCH] Do not use bundled requests
|
||||
|
||||
---
|
||||
botocore.egg-info/requires.txt | 2 +-
|
||||
botocore/awsrequest.py | 12 ++++++------
|
||||
botocore/endpoint.py | 4 ++--
|
||||
botocore/retryhandler.py | 4 ++--
|
||||
botocore/utils.py | 2 +-
|
||||
5 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/botocore.egg-info/requires.txt b/botocore.egg-info/requires.txt
|
||||
index 4f44845..63b8ff4 100644
|
||||
--- a/botocore.egg-info/requires.txt
|
||||
+++ b/botocore.egg-info/requires.txt
|
||||
@@ -1,3 +1,3 @@
|
||||
six>=1.1.0
|
||||
jmespath==0.4.1
|
||||
-python-dateutil>=2.1
|
||||
\ No newline at end of file
|
||||
+python-dateutil>=1.5
|
||||
\ No newline at end of file
|
||||
diff --git a/botocore/awsrequest.py b/botocore/awsrequest.py
|
||||
index 1e848b3..527f578 100644
|
||||
--- a/botocore/awsrequest.py
|
||||
+++ b/botocore/awsrequest.py
|
||||
@@ -17,14 +17,14 @@ import functools
|
||||
import inspect
|
||||
|
||||
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, file_type, 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/endpoint.py b/botocore/endpoint.py
|
||||
index 28555a6..e718f54 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 six
|
||||
|
||||
import botocore.response
|
||||
diff --git a/botocore/retryhandler.py b/botocore/retryhandler.py
|
||||
index 857916e..5a42db3 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 95b8757..2139284 100644
|
||||
--- a/botocore/utils.py
|
||||
+++ b/botocore/utils.py
|
||||
@@ -16,7 +16,7 @@ from six import string_types, text_type
|
||||
|
||||
from botocore.exceptions import InvalidExpressionError, ConfigNotFound
|
||||
from botocore.compat import json, quote
|
||||
-from botocore.vendored import requests
|
||||
+import requests
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
--
|
||||
1.8.3.1
|
||||
|
25
0001-botocore-Add-some-version-requirements.patch
Normal file
25
0001-botocore-Add-some-version-requirements.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From ad4f33015b5031d21c254be7ede1a3c2ac958581 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
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 331f5ba..a50844a 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -12,7 +12,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
requires = ['six>=1.1.0',
|
||||
'jmespath==0.4.1',
|
||||
- 'python-dateutil>=2.1']
|
||||
+ 'python-dateutil>=1.5']
|
||||
|
||||
|
||||
if sys.version_info[:2] == (2, 6):
|
||||
--
|
||||
1.8.3.1
|
||||
|
126
python-botocore.spec
Normal file
126
python-botocore.spec
Normal file
@ -0,0 +1,126 @@
|
||||
%if 0%{?fedora} > 12
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
Name: python-botocore
|
||||
Version: 0.58.0
|
||||
Release: 2%{?dist}
|
||||
Summary: The low-level, core functionality of boto 3
|
||||
Group: System Environment/Libraries
|
||||
|
||||
License: ASL 2.0
|
||||
URL: http://aws.amazon.com/cli/
|
||||
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
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-six >= 1.1.0
|
||||
BuildRequires: python-jmespath >= 0.4.1
|
||||
BuildRequires: python-dateutil >= 1.5
|
||||
%if %with python3
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-six >= 1.1.0
|
||||
BuildRequires: python3-jmespath >= 0.4.1
|
||||
BuildRequires: python3-dateutil >= 1.5
|
||||
%endif
|
||||
|
||||
Requires: python-six >= 1.1.0
|
||||
Requires: python-jmespath >= 0.4.1
|
||||
Requires: python-dateutil >= 1.5
|
||||
Requires: python-requests
|
||||
Requires: python-urllib3
|
||||
|
||||
%description
|
||||
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 2.
|
||||
|
||||
%package -n python3-botocore
|
||||
Summary: The low-level, core functionality of boto 3
|
||||
Group: System Environment/Libraries
|
||||
|
||||
Requires: python3-six >= 1.1.0
|
||||
Requires: python3-jmespath >= 0.4.1
|
||||
Requires: python3-dateutil >= 1.5
|
||||
Requires: python3-requests
|
||||
Requires: python3-urllib3
|
||||
|
||||
%description -n python3-botocore
|
||||
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.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n botocore-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%if %with python3
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif
|
||||
|
||||
|
||||
%build
|
||||
%if %with python3
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%{__python2} setup.py build
|
||||
|
||||
|
||||
|
||||
%install
|
||||
%if %with python3
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
||||
rm -rf %{buildroot}%{python3_sitelib}/botocore/vendored
|
||||
popd
|
||||
%endif
|
||||
|
||||
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
||||
rm -rf %{buildroot}%{python2_sitelib}/botocore/vendored
|
||||
|
||||
|
||||
%check
|
||||
%if %with python3
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py test
|
||||
popd
|
||||
%endif
|
||||
|
||||
%{__python2} setup.py test
|
||||
|
||||
|
||||
%files
|
||||
%{python2_sitelib}/*
|
||||
%doc README.rst
|
||||
%doc LICENSE.txt
|
||||
|
||||
|
||||
%if %with python3
|
||||
%files -n python3-botocore
|
||||
%{python3_sitelib}/*
|
||||
%doc README.rst
|
||||
%doc LICENSE.txt
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 25 2014 Lubomir Rintel <lkundrak@v3.sk> - 0.58.0-2
|
||||
- Add Python 3 support
|
||||
|
||||
* Fri Jul 25 2014 Lubomir Rintel <lkundrak@v3.sk> - 0.58.0-1
|
||||
- Initial packaging
|
Loading…
Reference in New Issue
Block a user