Remove setuptools versioned req

This commit is contained in:
Nathaniel McCallum 2016-05-10 14:18:49 -04:00
parent b27a5f581c
commit 6d3169f0fa
2 changed files with 35 additions and 3 deletions

View File

@ -0,0 +1,31 @@
diff --git a/setup.py b/setup.py
index 7267529..098a6bb 100644
--- a/setup.py
+++ b/setup.py
@@ -37,7 +37,7 @@ requirements = [
"idna>=2.0",
"pyasn1>=0.1.8",
"six>=1.4.1",
- "setuptools>=11.3",
+ "setuptools",
]
setup_requirements = []
diff --git a/src/cryptography/hazmat/backends/__init__.py b/src/cryptography/hazmat/backends/__init__.py
index 96a431d..256fee3 100644
--- a/src/cryptography/hazmat/backends/__init__.py
+++ b/src/cryptography/hazmat/backends/__init__.py
@@ -17,7 +17,12 @@ def _available_backends():
if _available_backends_list is None:
_available_backends_list = [
- ep.resolve()
+ # setuptools 11.3 deprecated support for the require parameter to
+ # load(), and introduced the new resolve() method instead.
+ # This can be removed if/when we can assume setuptools>=11.3. At
+ # some point we may wish to add a warning, to push people along,
+ # but at present this would result in too many warnings.
+ ep.resolve() if hasattr(ep, "resolve") else ep.load(require=False)
for ep in pkg_resources.iter_entry_points(
"cryptography.backends"
)

View File

@ -14,12 +14,13 @@ Group: Development/Libraries
License: ASL 2.0 or BSD
URL: https://cryptography.io/en/latest/
Source0: https://pypi.python.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
Patch0: %{name}-1.3.1-setuptools.patch
BuildRequires: openssl-devel
BuildRequires: python-devel
BuildRequires: pytest
BuildRequires: python-setuptools >= 1.0
BuildRequires: python-setuptools
BuildRequires: python-pretend
BuildRequires: python-iso8601
BuildRequires: python-cryptography-vectors = %{version}
@ -36,7 +37,7 @@ BuildRequires: python-ipaddress
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: python3-setuptools >= 1.0
BuildRequires: python3-setuptools
BuildRequires: python3-pretend
BuildRequires: python3-iso8601
BuildRequires: python3-cryptography-vectors = %{version}
@ -94,7 +95,7 @@ recipes to Python developers.
%endif
%prep
%setup -q -n cryptography-%{version}
%autosetup -p1 -n cryptography-%{version}
%if 0%{?with_python3}
rm -rf %{py3dir}