Blame python-cryptography.spec

27ec704
%if 0%{?fedora} > 20
5eac1cd
%global with_python3 1
5eac1cd
%else
5eac1cd
%{!?__python2: %global __python2 /usr/bin/python2}
5eac1cd
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
5eac1cd
%endif
5eac1cd
5eac1cd
Name:           python-cryptography
9aa544e
Version:        1.5.3
176faf4
Release:        5%{?dist}
5eac1cd
Summary:        PyCA's cryptography library
5eac1cd
5eac1cd
Group:          Development/Libraries
2b9cc15
License:        ASL 2.0 or BSD
5eac1cd
URL:            https://cryptography.io/en/latest/
9aa544e
Source0:        https://pypi.io/packages/source/c/cryptography/cryptography-%{version}.tar.gz
5eac1cd
5eac1cd
BuildRequires:  openssl-devel
27ec704
b27a5f5
BuildRequires:  python-devel
c35b9a0
BuildRequires:  pytest
6d3169f
BuildRequires:  python-setuptools
777ef8f
BuildRequires:  python-pretend
b27a5f5
BuildRequires:  python-iso8601
b27a5f5
BuildRequires:  python-cryptography-vectors = %{version}
b27a5f5
BuildRequires:  python-pyasn1-modules >= 0.1.8
b27a5f5
BuildRequires:  python-hypothesis
6344bc6
BuildRequires:  pytz
777ef8f
777ef8f
BuildRequires:  python-idna >= 2.0
b27a5f5
BuildRequires:  python-pyasn1 >= 0.1.8
c35b9a0
BuildRequires:  python-six >= 1.4.1
b27a5f5
BuildRequires:  python-cffi >= 1.4.1
777ef8f
BuildRequires:  python-enum34
777ef8f
BuildRequires:  python-ipaddress
27ec704
5eac1cd
%if 0%{?with_python3}
27ec704
BuildRequires:  python3-devel
176faf4
BuildRequires:  python3-pytest
6d3169f
BuildRequires:  python3-setuptools
777ef8f
BuildRequires:  python3-pretend
777ef8f
BuildRequires:  python3-iso8601
777ef8f
BuildRequires:  python3-cryptography-vectors = %{version}
777ef8f
BuildRequires:  python3-pyasn1-modules >= 0.1.8
777ef8f
BuildRequires:  python3-hypothesis
6344bc6
BuildRequires:  python3-pytz
777ef8f
777ef8f
BuildRequires:  python3-idna >= 2.0
777ef8f
BuildRequires:  python3-pyasn1 >= 0.1.8
777ef8f
BuildRequires:  python3-six >= 1.4.1
777ef8f
BuildRequires:  python3-cffi >= 1.4.1
5eac1cd
%endif
5eac1cd
5eac1cd
%description
5eac1cd
cryptography is a package designed to expose cryptographic primitives and
5eac1cd
recipes to Python developers.
5eac1cd
777ef8f
%package -n  python2-cryptography
777ef8f
Group:          Development/Libraries
777ef8f
Summary:        PyCA's cryptography library
b27a5f5
Obsoletes:      python-cryptography <= %{version}-%{release}
b27a5f5
1912edd
%if 0%{?fedora}
777ef8f
%{?python_provide:%python_provide python2-cryptography}
b27a5f5
%else
b27a5f5
Provides:       python-cryptography
b27a5f5
%endif
777ef8f
777ef8f
Requires:       openssl
777ef8f
Requires:       python-idna >= 2.0
b27a5f5
Requires:       python-pyasn1 >= 0.1.8
c35b9a0
Requires:       python-six >= 1.4.1
b27a5f5
Requires:       python-cffi >= 1.4.1
777ef8f
Requires:       python-enum34
777ef8f
Requires:       python-ipaddress
777ef8f
777ef8f
%description -n python2-cryptography
777ef8f
cryptography is a package designed to expose cryptographic primitives and
777ef8f
recipes to Python developers.
777ef8f
5eac1cd
%if 0%{?with_python3}
5eac1cd
%package -n  python3-cryptography
5eac1cd
Group:          Development/Libraries
5eac1cd
Summary:        PyCA's cryptography library
777ef8f
%{?python_provide:%python_provide python3-cryptography}
5eac1cd
5eac1cd
Requires:       openssl
777ef8f
Requires:       python3-idna >= 2.0
777ef8f
Requires:       python3-pyasn1 >= 0.1.8
777ef8f
Requires:       python3-six >= 1.4.1
777ef8f
Requires:       python3-cffi >= 1.4.1
5eac1cd
5eac1cd
%description -n python3-cryptography
5eac1cd
cryptography is a package designed to expose cryptographic primitives and
5eac1cd
recipes to Python developers.
5eac1cd
%endif
5eac1cd
5eac1cd
%prep
6d3169f
%autosetup -p1 -n cryptography-%{version}
5eac1cd
5eac1cd
%if 0%{?with_python3}
5eac1cd
rm -rf %{py3dir}
5eac1cd
cp -a . %{py3dir}
5eac1cd
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
5eac1cd
%endif
5eac1cd
5eac1cd
%build
5eac1cd
%{__python2} setup.py build
5eac1cd
5eac1cd
%if 0%{?with_python3}
5eac1cd
pushd %{py3dir}
5eac1cd
%{__python3} setup.py build
5eac1cd
popd
5eac1cd
%endif
5eac1cd
5eac1cd
5eac1cd
%install
5eac1cd
# Actually other *.c and *.h are appropriate
5eac1cd
# see https://github.com/pyca/cryptography/issues/1463
5eac1cd
find . -name .keep -print -delete
5eac1cd
5eac1cd
%{__python2} setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot}
5eac1cd
5eac1cd
%if 0%{?with_python3}
5eac1cd
pushd %{py3dir}
5eac1cd
%{__python3} setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot}
5eac1cd
popd
5eac1cd
%endif
5eac1cd
5eac1cd
5eac1cd
%check
5eac1cd
%{__python} setup.py test
5eac1cd
5eac1cd
%if 0%{?with_python3}
5eac1cd
pushd %{py3dir}
176faf4
%{__python3} setup.py test
5eac1cd
popd
5eac1cd
%endif
5eac1cd
5eac1cd
777ef8f
%files -n python2-cryptography
2b9cc15
%doc LICENSE LICENSE.APACHE LICENSE.BSD README.rst docs
5eac1cd
%{python_sitearch}/*
5eac1cd
5eac1cd
5eac1cd
%if 0%{?with_python3}
5eac1cd
%files -n python3-cryptography
2b9cc15
%doc LICENSE LICENSE.APACHE LICENSE.BSD README.rst docs
5eac1cd
%{python3_sitearch}/*
5eac1cd
%endif
5eac1cd
5eac1cd
5eac1cd
%changelog
176faf4
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.5.3-5
176faf4
- Enable tests
176faf4
8e84bae
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.5.3-4
8e84bae
- Rebuild for Python 3.6
8e84bae
- Disable python3 tests for now
8e84bae
176e84e
* Thu Nov 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.3-3
176e84e
- Revert previous change
176e84e
1269475
* Thu Nov 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.3-2
1269475
- Disable tests on releases earlier than 24
1269475
9aa544e
* Mon Nov 07 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.3-1
9aa544e
- Update to v1.5.3
9aa544e
- Update source URL
6344bc6
- Add BR for pytz
9aa544e
2f793c4
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-4
2f793c4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
2f793c4
2115dff
* Tue May 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.1-3
2115dff
- Remove versioned setuptools dependency
2115dff
b27a5f5
* Tue May 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.1-2
b27a5f5
- Make it easier to build on EL7
b27a5f5
5effb8e
* Tue May 03 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.1-1
5effb8e
- Update to v1.3.1
5effb8e
2d6faa0
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3
2d6faa0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2d6faa0
777ef8f
* Mon Jan 11 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.2.1-2
777ef8f
- Move python-cryptograph => python2-cryptography
777ef8f
7d1e28f
* Sat Jan 09 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.2.1-1
7d1e28f
- Update to v1.2.1
7d1e28f
Robert Kuska 8f91816
* Wed Nov 11 2015 Robert Kuska <rkuska@redhat.com> - 1.1-1
Robert Kuska 8f91816
- Update to v1.1
Robert Kuska 8f91816
Robert Kuska 1326ad4
* Wed Nov 04 2015 Robert Kuska <rkuska@redhat.com> - 1.0.2-2
Robert Kuska 1326ad4
- Rebuilt for Python3.5 rebuild
Robert Kuska 1326ad4
4743d35
* Wed Sep 30 2015 Matěj Cepl <mcepl@redhat.com> - 1.0.2-1
4743d35
- New upstream release (fix #1267548)
4743d35
03a59bd
* Wed Aug 12 2015 Nathaniel McCallum <npmccallum@redhat.com> - 1.0-1
03a59bd
- New upstream release
03a59bd
a4d5017
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
a4d5017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a4d5017
3911660
* Thu May 14 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.9-1
3911660
- New upstream release
363ee21
- Run tests on RHEL
d8084b7
- New deps: python-idna, python-ipaddress
3911660
bc8535c
* Fri Apr 17 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.8.2-1
bc8535c
- New upstream release
bc8535c
- Add python3-pyasn1 Requires (#1211073)
bc8535c
86fc324
* Tue Apr 14 2015 Matej Cepl <mcepl@redhat.com> - 0.8-2
86fc324
- Add python-pyasn1 Requires (#1211073)
86fc324
bc8535c
* Fri Mar 13 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.8-1
0773ac1
- New upstream release
0773ac1
- Remove upstreamed patch
0773ac1
27ec704
* Wed Mar 04 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.7.2-2
27ec704
- Add python3-cryptography-vectors build requires
27ec704
- Add python-enum34 requires
27ec704
2b9cc15
* Tue Feb 03 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.7.2-1
2b9cc15
- New upstream release. BSD is now an optional license.
d3a0b1e
- Fix test running on python3
d3a0b1e
- Add upstream patch to fix test paths
2b9cc15
5eac1cd
* Fri Nov 07 2014 Matej Cepl <mcepl@redhat.com> - 0.6.1-2
5eac1cd
- Fix requires, for reasons why other development files were not
5eac1cd
  eliminated see https://github.com/pyca/cryptography/issues/1463.
5eac1cd
5eac1cd
* Wed Nov 05 2014 Matej Cepl <mcepl@redhat.com> - 0.6.1-1
5eac1cd
- New upstream release.
5eac1cd
5eac1cd
* Sun Jun 29 2014 Terry Chia <terrycwk1994@gmail.com> 0.4-1
5eac1cd
- initial version