python-cryptography/python-cryptography.spec

220 lines
6.3 KiB
RPMSpec
Raw Normal View History

2015-03-04 18:03:20 +00:00
%if 0%{?fedora} > 20
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
Name: python-cryptography
2016-05-03 17:03:25 +00:00
Version: 1.3.1
2016-05-10 18:25:17 +00:00
Release: 3%{?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/
Source0: https://pypi.python.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
2016-05-10 18:18:49 +00:00
Patch0: %{name}-1.3.1-setuptools.patch
2014-11-21 05:21:59 +00:00
BuildRequires: openssl-devel
2015-03-04 18:03:20 +00:00
2016-05-10 17:26:48 +00:00
BuildRequires: python-devel
2016-01-11 22:17:58 +00:00
BuildRequires: pytest
2016-05-10 18:18:49 +00:00
BuildRequires: python-setuptools
BuildRequires: python-pretend
2016-05-10 17:26:48 +00:00
BuildRequires: python-iso8601
BuildRequires: python-cryptography-vectors = %{version}
BuildRequires: python-pyasn1-modules >= 0.1.8
BuildRequires: python-hypothesis
BuildRequires: python-idna >= 2.0
2016-05-10 17:26:48 +00:00
BuildRequires: python-pyasn1 >= 0.1.8
2016-01-11 22:17:58 +00:00
BuildRequires: python-six >= 1.4.1
2016-05-10 17:26:48 +00:00
BuildRequires: python-cffi >= 1.4.1
BuildRequires: python-enum34
BuildRequires: python-ipaddress
2015-03-04 18:03:20 +00:00
2014-11-21 05:21:59 +00:00
%if 0%{?with_python3}
2015-03-04 18:03:20 +00:00
BuildRequires: python3-devel
BuildRequires: python3-pytest
2016-05-10 18:18:49 +00:00
BuildRequires: python3-setuptools
BuildRequires: python3-pretend
BuildRequires: python3-iso8601
BuildRequires: python3-cryptography-vectors = %{version}
BuildRequires: python3-pyasn1-modules >= 0.1.8
BuildRequires: python3-hypothesis
BuildRequires: python3-idna >= 2.0
BuildRequires: python3-pyasn1 >= 0.1.8
BuildRequires: python3-six >= 1.4.1
BuildRequires: python3-cffi >= 1.4.1
2014-11-21 05:21:59 +00:00
%endif
%description
cryptography is a package designed to expose cryptographic primitives and
recipes to Python developers.
%package -n python2-cryptography
Group: Development/Libraries
Summary: PyCA's cryptography library
2016-05-10 17:26:48 +00:00
Obsoletes: python-cryptography <= %{version}-%{release}
%if 0%{fedora}
%{?python_provide:%python_provide python2-cryptography}
2016-05-10 17:26:48 +00:00
%else
Provides: python-cryptography
%endif
Requires: openssl
Requires: python-idna >= 2.0
2016-05-10 17:26:48 +00:00
Requires: python-pyasn1 >= 0.1.8
2016-01-11 22:17:58 +00:00
Requires: python-six >= 1.4.1
2016-05-10 17:26:48 +00:00
Requires: python-cffi >= 1.4.1
Requires: python-enum34
Requires: python-ipaddress
%description -n python2-cryptography
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}
%package -n python3-cryptography
Group: Development/Libraries
Summary: PyCA's cryptography library
%{?python_provide:%python_provide python3-cryptography}
2014-11-21 05:21:59 +00:00
Requires: openssl
Requires: python3-idna >= 2.0
Requires: python3-pyasn1 >= 0.1.8
Requires: python3-six >= 1.4.1
Requires: python3-cffi >= 1.4.1
2014-11-21 05:21:59 +00:00
%description -n python3-cryptography
cryptography is a package designed to expose cryptographic primitives and
recipes to Python developers.
%endif
%prep
2016-05-10 18:18:49 +00:00
%autosetup -p1 -n cryptography-%{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
%{__python2} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif
%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
%check
%{__python} setup.py test
%if 0%{?with_python3}
pushd %{py3dir}
2015-03-04 17:16:31 +00:00
%{__python3} setup.py test
2014-11-21 05:21:59 +00:00
popd
%endif
%files -n python2-cryptography
2015-03-04 15:51:07 +00:00
%doc LICENSE LICENSE.APACHE LICENSE.BSD README.rst docs
2014-11-21 05:21:59 +00:00
%{python_sitearch}/*
%if 0%{?with_python3}
%files -n python3-cryptography
2015-03-04 15:51:07 +00:00
%doc LICENSE LICENSE.APACHE LICENSE.BSD README.rst docs
2014-11-21 05:21:59 +00:00
%{python3_sitearch}/*
%endif
%changelog
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