diff --git a/.gitignore b/.gitignore index 450e371..448dc63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,13 @@ -/cryptography-0.6.1.tar.gz -/cryptography-0.7.2.tar.gz -/cryptography-0.8.tar.gz -/cryptography-0.8.2.tar.gz -/cryptography-0.9.tar.gz -/cryptography-1.0.tar.gz -/cryptography-1.0.2.tar.gz +/cryptography-1.3.1.tar.gz +/cryptography-1.5.3.tar.gz +/cryptography-1.7.1.tar.gz +/cryptography-1.7.2.tar.gz +/cryptography-1.9.tar.gz +/cryptography-2.0.2.tar.gz +/cryptography-2.1.tar.gz +/cryptography-2.1.3.tar.gz +/cryptography-2.1.4.tar.gz +/cryptography-2.2.1.tar.gz +/cryptography-2.3.tar.gz +/cryptography-2.5.tar.gz +/cryptography-2.9.tar.gz diff --git a/python-cryptography.spec b/python-cryptography.spec index 35655fc..12e7331 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -1,111 +1,204 @@ -%if 0%{?fedora} > 20 %global with_python3 1 -%else -%{!?__python2: %global __python2 /usr/bin/python2} -%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%endif +%{!?python3_pkgversion:%global python3_pkgversion 3} -%global reqs() %1-idna >= 2.0 %1-pyasn1 %1-six >= 1.4.1 %1-cffi >= 0.8 -%global breqs() %1-setuptools %1-pretend %1-iso8601 %1-cryptography-vectors = %{version} +%global srcname cryptography -Name: python-cryptography -Version: 1.0.2 +Name: python-%{srcname} +Version: 2.9 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 +Source0: https://pypi.io/packages/source/c/%{srcname}/%{srcname}-%{version}.tar.gz +Patch2: 0002-Remove-pytest-version-limit.patch BuildRequires: openssl-devel -Requires: openssl - -BuildRequires: python2-devel -BuildRequires: pytest %breqs python -BuildRequires: python-enum34 python-ipaddress %reqs python -Requires: python-enum34 python-ipaddress %reqs python - -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-pytest %breqs python3 -BuildRequires: %reqs python3 -%endif +BuildRequires: gcc +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-pretend +BuildRequires: python%{python3_pkgversion}-iso8601 +BuildRequires: python%{python3_pkgversion}-cryptography-vectors = %{version} +BuildRequires: python%{python3_pkgversion}-asn1crypto >= 0.21 +BuildRequires: python%{python3_pkgversion}-hypothesis >= 1.11.4 +BuildRequires: python%{python3_pkgversion}-pytz +BuildRequires: python%{python3_pkgversion}-idna >= 2.1 +BuildRequires: python%{python3_pkgversion}-six >= 1.4.1 +BuildRequires: python%{python3_pkgversion}-cffi >= 1.7 %description cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. -%if 0%{?with_python3} -%package -n python3-cryptography -Group: Development/Libraries +%{?python_provide:%python_provide python2-%{srcname}} + +%package -n python%{python3_pkgversion}-%{srcname} Summary: PyCA's cryptography library +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} -Requires: openssl -Requires: %reqs python3 +Requires: openssl-libs +Requires: python%{python3_pkgversion}-idna >= 2.1 +Requires: python%{python3_pkgversion}-asn1crypto >= 0.21 +Requires: python%{python3_pkgversion}-six >= 1.4.1 +Requires: python%{python3_pkgversion}-cffi >= 1.7 -%description -n python3-cryptography +%description -n python%{python3_pkgversion}-%{srcname} cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. -%endif %prep -%setup -q -n cryptography-%{version} - -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' -%endif +%autosetup -p1 -n %{srcname}-%{version} +find . -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' %build -%{__python2} setup.py build - -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd -%endif - +%py3_build %install # Actually other *.c and *.h are appropriate # see https://github.com/pyca/cryptography/issues/1463 find . -name .keep -print -delete -%{__python2} setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot} - -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot} -popd -%endif +%py3_install %check -%{__python} setup.py test +# workaround for pytest 3.2.0 bug https://github.com/pytest-dev/pytest/issues/2644 +rm tests/hazmat/primitives/test_padding.py + +# Skip hypothesis on RHEL +rm -r tests/hypothesis -%if 0%{?with_python3} -pushd %{py3dir} %{__python3} setup.py test -popd -%endif - -%files -%doc LICENSE LICENSE.APACHE LICENSE.BSD README.rst docs -%{python_sitearch}/* - - -%if 0%{?with_python3} -%files -n python3-cryptography -%doc LICENSE LICENSE.APACHE LICENSE.BSD README.rst docs +%files -n python%{python3_pkgversion}-%{srcname} +%doc README.rst docs +%license LICENSE LICENSE.APACHE LICENSE.BSD %{python3_sitearch}/* -%endif +%{python3_sitearch}/%{srcname}-%{version}-py*.egg-info %changelog +* Wed Feb 13 2019 Alfredo Moralejo - 2.5-1 +- Updated to 2.5. + +* Sat Feb 02 2019 Fedora Release Engineering - 2.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Aug 13 2018 Christian Heimes - 2.3-2 +- Use TLSv1.2 in test as workaround for RHBZ#1615143 + +* Wed Jul 18 2018 Christian Heimes - 2.3-1 +- New upstream release 2.3 +- Fix AEAD tag truncation bug, RHBZ#1602752 + +* Fri Jul 13 2018 Fedora Release Engineering - 2.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Jun 15 2018 Miro Hrončok - 2.2.1-2 +- Rebuilt for Python 3.7 + +* Wed Mar 21 2018 Christian Heimes - 2.2.1-1 +- New upstream release 2.2.1 + +* Sun Feb 18 2018 Christian Heimes - 2.1.4-1 +- New upstream release 2.1.4 + +* Sun Feb 18 2018 Christian Heimes - 2.1.3-4 +- Build requires gcc + +* Mon Feb 12 2018 Iryna Shcherbina - 2.1.3-3 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Fri Feb 09 2018 Fedora Release Engineering - 2.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Nov 23 2017 Haïkel Guémar - 2.1.3-1 +- Upstream 2.1.3 + +* Tue Oct 24 2017 Christian Heimes - 2.1-2 +- Change Requires to openssl-libs + +* Thu Oct 12 2017 Christian Heimes - 2.1-1 +- New upstream release 2.1 + +* Wed Sep 27 2017 Troy Dawson - 2.0.2-3 +- Cleanup spec file conditionals + +* Thu Aug 03 2017 Christian Heimes - 2.0.2-2 +- Add workaround for pytest bug + +* Thu Aug 03 2017 Christian Heimes - 2.0.2-1 +- New upstream release 2.0.2 +- Modernize spec + +* Thu Aug 03 2017 Fedora Release Engineering - 1.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Jun 27 2017 Christian Heimes - 1.9-1 +- Upstream release 1.9 + +* Wed Feb 15 2017 Christian Heimes - 1.7.2-1 +- Update to latest upstream + +* Sat Feb 11 2017 Fedora Release Engineering - 1.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jan 05 2017 Matěj Cepl - 1.7.1-1 +- Update to the latest upstream. +- Add a patch from https://github.com/pyca/cryptography/pull/3328 + +* Tue Dec 13 2016 Charalampos Stratakis - 1.5.3-5 +- Enable tests + +* Mon Dec 12 2016 Charalampos Stratakis - 1.5.3-4 +- Rebuild for Python 3.6 +- Disable python3 tests for now + +* Thu Nov 10 2016 Nathaniel McCallum - 1.5.3-3 +- Revert previous change + +* Thu Nov 10 2016 Nathaniel McCallum - 1.5.3-2 +- Disable tests on releases earlier than 24 + +* Mon Nov 07 2016 Nathaniel McCallum - 1.5.3-1 +- Update to v1.5.3 +- Update source URL +- Add BR for pytz + +* Tue Jul 19 2016 Fedora Release Engineering - 1.3.1-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Tue May 10 2016 Nathaniel McCallum - 1.3.1-3 +- Remove versioned setuptools dependency + +* Tue May 10 2016 Nathaniel McCallum - 1.3.1-2 +- Make it easier to build on EL7 + +* Tue May 03 2016 Nathaniel McCallum - 1.3.1-1 +- Update to v1.3.1 + +* Thu Feb 04 2016 Fedora Release Engineering - 1.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Jan 11 2016 Nathaniel McCallum - 1.2.1-2 +- Move python-cryptograph => python2-cryptography + +* Sat Jan 09 2016 Nathaniel McCallum - 1.2.1-1 +- Update to v1.2.1 + +* Wed Nov 11 2015 Robert Kuska - 1.1-1 +- Update to v1.1 + +* Wed Nov 04 2015 Robert Kuska - 1.0.2-2 +- Rebuilt for Python3.5 rebuild + * Wed Sep 30 2015 Matěj Cepl - 1.0.2-1 - New upstream release (fix #1267548) diff --git a/sources b/sources index aceb3ad..78d2a9a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6a8627da0c6199fca941dc8170f9b583 cryptography-1.0.2.tar.gz +SHA512 (cryptography-2.9.tar.gz) = 7db2846b901e42ddc4caa9851235e5a0894ef702d4c4692eb60fcae17bc4e7833782a8001679ea41b78f9273d7d68a4b85810248590e12ca33cfade3208e2849