python-cryptography/python-cryptography.spec

306 lines
9.7 KiB
RPMSpec
Raw Normal View History

2017-09-27 15:30:54 +00:00
%if 0%{?fedora} || 0%{?rhel} >= 8
2014-11-21 05:21:59 +00:00
%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
2017-08-03 14:31:52 +00:00
%{!?python3_pkgversion:%global python3_pkgversion 3}
2017-08-03 11:33:04 +00:00
%global srcname cryptography
Name: python-%{srcname}
2018-03-21 11:22:02 +00:00
Version: 2.2.1
2018-02-18 22:04:18 +00:00
Release: 1%{?dist}
2014-11-21 05:21:59 +00:00
Summary: PyCA's cryptography library
Group: Development/Libraries
2015-03-04 15:51:07 +00:00
License: ASL 2.0 or BSD
2014-11-21 05:21:59 +00:00
URL: https://cryptography.io/en/latest/
2017-08-03 11:33:04 +00:00
Source0: https://pypi.io/packages/source/c/%{srcname}/%{srcname}-%{version}.tar.gz
2014-11-21 05:21:59 +00:00
BuildRequires: openssl-devel
2018-02-18 21:39:10 +00:00
BuildRequires: gcc
2015-03-04 18:03:20 +00:00
2017-08-03 11:33:04 +00:00
BuildRequires: python2-devel
2017-10-12 10:03:57 +00:00
BuildRequires: python2-pytest >= 3.2.1
2017-08-03 11:33:04 +00:00
BuildRequires: python2-setuptools
BuildRequires: python2-pretend
2017-08-03 11:33:04 +00:00
BuildRequires: python2-iso8601
BuildRequires: python2-cryptography-vectors = %{version}
2017-06-27 19:13:32 +00:00
BuildRequires: python2-asn1crypto >= 0.21
2017-08-03 11:33:04 +00:00
BuildRequires: python2-hypothesis >= 1.11.4
BuildRequires: python2-pytz
2017-08-03 11:33:04 +00:00
BuildRequires: python2-idna >= 2.1
BuildRequires: python2-six >= 1.4.1
BuildRequires: python2-cffi >= 1.7
BuildRequires: python2-enum34
BuildRequires: python2-ipaddress
2015-03-04 18:03:20 +00:00
2014-11-21 05:21:59 +00:00
%if 0%{?with_python3}
2017-08-03 11:33:04 +00:00
BuildRequires: python%{python3_pkgversion}-devel
2017-10-12 10:03:57 +00:00
BuildRequires: python%{python3_pkgversion}-pytest >= 3.2.1
2017-08-03 11:33:04 +00:00
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
2014-11-21 05:21:59 +00:00
%endif
%description
cryptography is a package designed to expose cryptographic primitives and
recipes to Python developers.
2017-08-03 11:33:04 +00:00
%package -n python2-%{srcname}
Group: Development/Libraries
Summary: PyCA's cryptography library
2016-05-10 17:26:48 +00:00
2017-09-27 15:30:54 +00:00
%if 0%{?with_python3}
2017-08-03 11:33:04 +00:00
%{?python_provide:%python_provide python2-%{srcname}}
2016-05-10 17:26:48 +00:00
%else
2017-08-03 11:33:04 +00:00
Provides: python-%{srcname}
2016-05-10 17:26:48 +00:00
%endif
Requires: openssl-libs
2017-08-03 11:33:04 +00:00
Requires: python2-idna >= 2.1
2017-06-27 19:13:32 +00:00
Requires: python2-asn1crypto >= 0.21
2017-08-03 11:33:04 +00:00
Requires: python2-six >= 1.4.1
Requires: python2-cffi >= 1.7
Requires: python2-enum34
Requires: python2-ipaddress
2017-08-03 11:33:04 +00:00
%description -n python2-%{srcname}
cryptography is a package designed to expose cryptographic primitives and
recipes to Python developers.
2014-11-21 05:21:59 +00:00
%if 0%{?with_python3}
2017-08-03 11:33:04 +00:00
%package -n python%{python3_pkgversion}-%{srcname}
2014-11-21 05:21:59 +00:00
Group: Development/Libraries
Summary: PyCA's cryptography library
2017-08-03 11:33:04 +00:00
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
2014-11-21 05:21:59 +00:00
Requires: openssl-libs
2017-08-03 11:33:04 +00:00
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
2014-11-21 05:21:59 +00:00
2017-08-03 11:33:04 +00:00
%description -n python%{python3_pkgversion}-%{srcname}
2014-11-21 05:21:59 +00:00
cryptography is a package designed to expose cryptographic primitives and
recipes to Python developers.
%endif
%prep
2017-08-03 11:33:04 +00:00
%autosetup -p1 -n %{srcname}-%{version}
2014-11-21 05:21:59 +00:00
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
%endif
%build
%if 0%{?with_python3}
2017-09-27 15:30:54 +00:00
%py2_build
2014-11-21 05:21:59 +00:00
pushd %{py3dir}
2017-08-03 11:33:04 +00:00
%py3_build
2014-11-21 05:21:59 +00:00
popd
2017-08-03 11:33:04 +00:00
%else
%{__python2} setup.py build
2017-09-27 15:30:54 +00:00
%endif # with_python3
2014-11-21 05:21:59 +00:00
%install
# Actually other *.c and *.h are appropriate
# see https://github.com/pyca/cryptography/issues/1463
find . -name .keep -print -delete
%if 0%{?with_python3}
2017-09-27 15:30:54 +00:00
%py2_install
2014-11-21 05:21:59 +00:00
pushd %{py3dir}
2017-08-03 11:33:04 +00:00
%py3_install
2014-11-21 05:21:59 +00:00
popd
2017-08-03 11:33:04 +00:00
%else
%{__python2} setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot}
2017-09-27 15:30:54 +00:00
%endif # with_python3
2014-11-21 05:21:59 +00:00
%check
2017-08-03 14:31:52 +00:00
# workaround for pytest 3.2.0 bug https://github.com/pytest-dev/pytest/issues/2644
rm -f tests/hazmat/primitives/test_padding.py
2018-04-29 17:00:13 +00:00
%{__python2} setup.py test
2014-11-21 05:21:59 +00:00
%if 0%{?with_python3}
pushd %{py3dir}
2017-08-03 14:31:52 +00:00
# workaround for pytest 3.2.0 bug https://github.com/pytest-dev/pytest/issues/2644
rm -f tests/hazmat/primitives/test_padding.py
2016-12-13 20:25:13 +00:00
%{__python3} setup.py test
2014-11-21 05:21:59 +00:00
popd
%endif
2017-08-03 11:33:04 +00:00
%files -n python2-%{srcname}
2015-03-04 15:51:07 +00:00
%doc LICENSE LICENSE.APACHE LICENSE.BSD README.rst docs
2017-08-03 14:31:52 +00:00
%{python2_sitearch}/%{srcname}
%{python2_sitearch}/%{srcname}-%{version}-py*.egg-info
2014-11-21 05:21:59 +00:00
%if 0%{?with_python3}
2017-08-03 11:33:04 +00:00
%files -n python%{python3_pkgversion}-%{srcname}
%doc README.rst docs
%license LICENSE LICENSE.APACHE LICENSE.BSD
2014-11-21 05:21:59 +00:00
%{python3_sitearch}/*
2017-08-03 11:33:04 +00:00
%{python3_sitearch}/%{srcname}-%{version}-py*.egg-info
2014-11-21 05:21:59 +00:00
%endif
%changelog
2018-03-21 11:22:02 +00:00
* Wed Mar 21 2018 Christian Heimes <cheimes@redhat.com> - 2.2.1-1
- New upstream release 2.2.1
2018-02-18 22:04:18 +00:00
* Sun Feb 18 2018 Christian Heimes <cheimes@redhat.com> - 2.1.4-1
- New upstream release 2.1.4
2018-02-18 21:39:10 +00:00
* Sun Feb 18 2018 Christian Heimes <cheimes@redhat.com> - 2.1.3-4
- Build requires gcc
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 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 <releng@fedoraproject.org> - 2.1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2017-11-23 14:55:51 +00:00
* Thu Nov 23 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 2.1.3-1
- Upstream 2.1.3
2017-10-24 09:53:58 +00:00
* Tue Oct 24 2017 Christian Heimes <cheimes@redhat.com> - 2.1-2
- Change Requires to openssl-libs
2017-10-12 10:03:57 +00:00
* Thu Oct 12 2017 Christian Heimes <cheimes@redhat.com> - 2.1-1
- New upstream release 2.1
2017-09-27 15:30:54 +00:00
* Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 2.0.2-3
- Cleanup spec file conditionals
2017-08-03 14:31:52 +00:00
* Thu Aug 03 2017 Christian Heimes <cheimes@redhat.com> - 2.0.2-2
- Add workaround for pytest bug
2017-08-03 11:33:04 +00:00
* Thu Aug 03 2017 Christian Heimes <cheimes@redhat.com> - 2.0.2-1
- New upstream release 2.0.2
- Modernize spec
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2017-06-27 19:13:32 +00:00
* Tue Jun 27 2017 Christian Heimes <cheimes@redhat.com> - 1.9-1
- Upstream release 1.9
2017-02-15 08:15:03 +00:00
* Wed Feb 15 2017 Christian Heimes <cheimes@redhat.com> - 1.7.2-1
- Update to latest upstream
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2017-01-05 13:32:49 +00:00
* Thu Jan 05 2017 Matěj Cepl <mcepl@redhat.com> - 1.7.1-1
- Update to the latest upstream.
- Add a patch from https://github.com/pyca/cryptography/pull/3328
2017-01-05 13:32:49 +00:00
2016-12-13 20:25:13 +00:00
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.5.3-5
- Enable tests
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.5.3-4
- Rebuild for Python 3.6
- Disable python3 tests for now
2016-11-10 18:32:17 +00:00
* Thu Nov 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.3-3
- Revert previous change
* Thu Nov 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.3-2
- Disable tests on releases earlier than 24
2016-11-07 16:03:32 +00:00
* Mon Nov 07 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.3-1
- Update to v1.5.3
- Update source URL
2016-11-07 16:19:35 +00:00
- Add BR for pytz
2016-11-07 16:03:32 +00:00
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
2016-05-10 18:25:17 +00:00
* Tue May 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.1-3
- Remove versioned setuptools dependency
2016-05-10 17:26:48 +00:00
* Tue May 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.1-2
- Make it easier to build on EL7
2016-05-03 17:03:25 +00:00
* Tue May 03 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.1-1
- Update to v1.3.1
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Jan 11 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.2.1-2
- Move python-cryptograph => python2-cryptography
2016-01-09 05:47:35 +00:00
* Sat Jan 09 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.2.1-1
- Update to v1.2.1
2015-11-11 14:39:30 +00:00
* Wed Nov 11 2015 Robert Kuska <rkuska@redhat.com> - 1.1-1
- Update to v1.1
2015-11-04 11:42:04 +00:00
* Wed Nov 04 2015 Robert Kuska <rkuska@redhat.com> - 1.0.2-2
- Rebuilt for Python3.5 rebuild
2015-09-30 15:45:39 +00:00
* Wed Sep 30 2015 Matěj Cepl <mcepl@redhat.com> - 1.0.2-1
- New upstream release (fix #1267548)
2015-08-13 17:23:27 +00:00
* Wed Aug 12 2015 Nathaniel McCallum <npmccallum@redhat.com> - 1.0-1
- New upstream release
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2015-05-14 14:46:26 +00:00
* Thu May 14 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.9-1
- New upstream release
2015-05-14 15:40:40 +00:00
- Run tests on RHEL
- New deps: python-idna, python-ipaddress
2015-05-14 14:46:26 +00:00
2015-04-17 19:58:39 +00:00
* Fri Apr 17 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.8.2-1
- New upstream release
- Add python3-pyasn1 Requires (#1211073)
2015-04-14 14:47:42 +00:00
* Tue Apr 14 2015 Matej Cepl <mcepl@redhat.com> - 0.8-2
- Add python-pyasn1 Requires (#1211073)
2015-04-17 19:58:39 +00:00
* Fri Mar 13 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.8-1
2015-03-13 14:43:13 +00:00
- New upstream release
- Remove upstreamed patch
2015-03-04 18:03:20 +00:00
* Wed Mar 04 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.7.2-2
- Add python3-cryptography-vectors build requires
- Add python-enum34 requires
2015-03-04 15:51:07 +00:00
* Tue Feb 03 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.7.2-1
- New upstream release. BSD is now an optional license.
2015-03-04 17:16:31 +00:00
- Fix test running on python3
- Add upstream patch to fix test paths
2015-03-04 15:51:07 +00:00
2014-11-21 05:21:59 +00:00
* Fri Nov 07 2014 Matej Cepl <mcepl@redhat.com> - 0.6.1-2
- Fix requires, for reasons why other development files were not
eliminated see https://github.com/pyca/cryptography/issues/1463.
* Wed Nov 05 2014 Matej Cepl <mcepl@redhat.com> - 0.6.1-1
- New upstream release.
* Sun Jun 29 2014 Terry Chia <terrycwk1994@gmail.com> 0.4-1
- initial version