diff --git a/.gitignore b/.gitignore index 3153588..0add08e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/cryptography-1.3.1.tar.gz +SOURCES/cryptography-1.7.2.tar.gz diff --git a/.python-cryptography.metadata b/.python-cryptography.metadata index 4e24e25..c0a6e12 100644 --- a/.python-cryptography.metadata +++ b/.python-cryptography.metadata @@ -1 +1 @@ -ebcfdc46c9a169a49ab034c819eca8d8b07167c6 SOURCES/cryptography-1.3.1.tar.gz +2b5bc62fda71992633f83164b1a74c16a784acdf SOURCES/cryptography-1.7.2.tar.gz diff --git a/SOURCES/python-cryptography-1.3.1-setuptools.patch b/SOURCES/python-cryptography-1.3.1-setuptools.patch deleted file mode 100644 index aee9d97..0000000 --- a/SOURCES/python-cryptography-1.3.1-setuptools.patch +++ /dev/null @@ -1,31 +0,0 @@ -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" - ) diff --git a/SOURCES/python-cryptography-1.7.2-setup.patch b/SOURCES/python-cryptography-1.7.2-setup.patch new file mode 100644 index 0000000..a98902e --- /dev/null +++ b/SOURCES/python-cryptography-1.7.2-setup.patch @@ -0,0 +1,21 @@ +diff --git a/setup.py b/setup.py +--- 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 = [] + +@@ -58,7 +58,7 @@ + setup_requirements.append("cffi>=1.4.1") + + test_requirements = [ +- "pytest>=2.9.0", ++ "pytest", + "pretend", + "iso8601", + "pyasn1_modules", diff --git a/SOURCES/python-cryptography-1.7.2-test.patch b/SOURCES/python-cryptography-1.7.2-test.patch new file mode 100644 index 0000000..0838882 --- /dev/null +++ b/SOURCES/python-cryptography-1.7.2-test.patch @@ -0,0 +1,26 @@ +diff -ur a/tests/test_x509_ext.py b/tests/test_x509_ext.py +--- a/tests/test_x509_ext.py ++++ b/tests/test_x509_ext.py +@@ -3003,7 +3003,8 @@ + with pytest.raises(ValueError): + x509.DistributionPoint("data", "notname", None, None) + +- def test_relative_name_name_value_deprecated(self): ++ def DISABLED_test_relative_name_name_value_deprecated(self): ++ # pytest 2.7 does not support context manager for deprecated_call() + with pytest.deprecated_call(): + x509.DistributionPoint( + None, +diff -ur a/tests/test_x509.py b/tests/test_x509.py +--- a/tests/test_x509.py ++++ b/tests/test_x509.py +@@ -527,7 +527,8 @@ + assert cert.serial == 2 + assert cert.serial_number == 2 + +- def test_cert_serial_warning(self, backend): ++ def DISABLED_test_cert_serial_warning(self, backend): ++ # pytest 2.7 does not support context manager for deprecated_call() + cert = _load_cert( + os.path.join("x509", "PKITS_data", "certs", "GoodCACert.crt"), + x509.load_der_x509_certificate, diff --git a/SPECS/python-cryptography.spec b/SPECS/python-cryptography.spec index 6bbeba3..b9c3bd6 100644 --- a/SPECS/python-cryptography.spec +++ b/SPECS/python-cryptography.spec @@ -6,15 +6,23 @@ %endif Name: python-cryptography -Version: 1.3.1 -Release: 3%{?dist} +Version: 1.7.2 +Release: 1%{?dist} Summary: PyCA's cryptography library 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 +Source0: https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz +Patch0: %{name}-1.7.2-setup.patch +Patch1: %{name}-1.7.2-test.patch + +# This package needs four brew build overrides for RHEL in prder to provide +# build and test dependencies: +# python-pretend +# python-hypothesis +# python-iso8601 +# python-cryptography-vectors BuildRequires: openssl-devel @@ -26,6 +34,7 @@ BuildRequires: python-iso8601 BuildRequires: python-cryptography-vectors = %{version} BuildRequires: python-pyasn1-modules >= 0.1.8 BuildRequires: python-hypothesis +BuildRequires: pytz BuildRequires: python-idna >= 2.0 BuildRequires: python-pyasn1 >= 0.1.8 @@ -43,6 +52,7 @@ BuildRequires: python3-iso8601 BuildRequires: python3-cryptography-vectors = %{version} BuildRequires: python3-pyasn1-modules >= 0.1.8 BuildRequires: python3-hypothesis +BuildRequires: python3-pytz BuildRequires: python3-idna >= 2.0 BuildRequires: python3-pyasn1 >= 0.1.8 @@ -62,7 +72,7 @@ Obsoletes: python-cryptography <= %{version}-%{release} %if 0%{?fedora} %{?python_provide:%python_provide python2-cryptography} %else -Provides: python-cryptography +Provides: python-cryptography = %{version}-%{release} %endif Requires: openssl @@ -150,6 +160,12 @@ popd %changelog +* Tue Feb 14 2017 Christian Heimes - 1.7.2-1 +- Update to 1.7.2 +- Disable pytest.deprecated_call() tests +- Remove versioned pytest +- Add build requirements pytz + * Tue May 10 2016 Nathaniel McCallum - 1.3.1-3 - Remove versioned setuptools dependency