161 lines
4.8 KiB
RPMSpec
161 lines
4.8 KiB
RPMSpec
%bcond_with python2
|
|
%bcond_without python3
|
|
%bcond_with python3.8
|
|
|
|
Name: python-cryptography
|
|
Version: 3.0
|
|
Release: 1
|
|
Summary: PyCA's cryptography library
|
|
License: ASL 2.0 or BSD
|
|
URL: https://cryptography.io/en/latest/
|
|
Source0: https://pypi.io/packages/source/c/cryptography/cryptography-%{version}.tar.gz
|
|
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: gcc
|
|
|
|
%if %{with python2}
|
|
BuildRequires: python2-devel python2-pytest >= 3.2.1 python2-setuptools
|
|
BuildRequires: python2-pretend python2-iso8601 python2-cryptography-vectors = %{version}
|
|
BuildRequires: python2-asn1crypto >= 0.21 python2-hypothesis >= 1.11.4 python2-pytz
|
|
BuildRequires: python2-idna >= 2.1 python2-six >= 1.4.1 python2-cffi >= 1.7
|
|
BuildRequires: python2-enum34 python2-ipaddress
|
|
%endif
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
BuildRequires: python%{python3_pkgversion}-pytest >= 3.2.1
|
|
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 %{with python2}
|
|
%package -n python2-cryptography
|
|
Summary: PyCA's cryptography library
|
|
|
|
Requires: openssl-libs python2-idna >= 2.1 python2-asn1crypto >= 0.21
|
|
Requires: python2-six >= 1.4.1 python2-cffi >= 1.7 python2-enum34
|
|
Requires: python2-ipaddress
|
|
|
|
%{?python_provide:%python_provide python2-cryptography}
|
|
|
|
%description -n python2-cryptography
|
|
cryptography is a package designed to expose cryptographic primitives and
|
|
recipes to Python developers.
|
|
%endif
|
|
|
|
%package -n python%{python3_pkgversion}-cryptography
|
|
Summary: PyCA's cryptography library
|
|
|
|
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
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-cryptography}
|
|
|
|
%description -n python%{python3_pkgversion}-cryptography
|
|
cryptography is a package designed to expose cryptographic primitives and
|
|
recipes to Python developers.
|
|
|
|
%package_help
|
|
|
|
%prep
|
|
%autosetup -n cryptography-%{version} -p1
|
|
|
|
rm -rf %{py3dir}
|
|
cp -a . %{py3dir}
|
|
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
|
|
|
|
%build
|
|
%if %{with python2}
|
|
%py2_build
|
|
%endif
|
|
|
|
pushd %{py3dir}
|
|
%py3_build
|
|
popd
|
|
|
|
%install
|
|
# Actually other *.c and *.h are appropriate
|
|
# see https://github.com/pyca/cryptography/issues/1463
|
|
find . -name .keep -print -delete
|
|
|
|
%if %{with python2}
|
|
%py2_install
|
|
%endif
|
|
|
|
pushd %{py3dir}
|
|
%py3_install
|
|
popd
|
|
|
|
%check
|
|
# see https://github.com/pyca/cryptography/issues/4885 for the deselected test
|
|
%if %{with python2}
|
|
PYTHONPATH=%{buildroot}%{python2_sitearch} %{__python2} -m pytest -k "not (test_buffer_protocol_alternate_modes or test_dh_parameters_supported or test_load_ecdsa_no_named_curve)"
|
|
%endif
|
|
|
|
%if %{with python3.8}
|
|
pushd %{py3dir}
|
|
PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest -k "not (test_buffer_protocol_alternate_modes or test_dh_parameters_supported or test_load_ecdsa_no_named_curve)"
|
|
popd
|
|
%endif
|
|
|
|
%if %{with python2}
|
|
%files -n python2-cryptography
|
|
%defattr(-,root,root)
|
|
%doc AUTHORS.rst
|
|
%license LICENSE LICENSE.APACHE LICENSE.BSD
|
|
%{python2_sitearch}/cryptography
|
|
%{python2_sitearch}/cryptography-%{version}-py*.egg-info
|
|
%endif
|
|
|
|
%files -n python%{python3_pkgversion}-cryptography
|
|
%defattr(-,root,root)
|
|
%doc AUTHORS.rst
|
|
%license LICENSE LICENSE.APACHE LICENSE.BSD
|
|
%{python3_sitearch}/*
|
|
%{python3_sitearch}/cryptography-%{version}-py*.egg-info
|
|
|
|
%files help
|
|
%defattr(-,root,root)
|
|
%doc README.rst docs
|
|
|
|
%changelog
|
|
* Thu Jul 23 2020 dingyue<dingyue5@huawei.com> -3.0-1
|
|
- Type:enhancement
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC:NA
|
|
|
|
* Thu Apr 16 2020 chengquan<chengquan3@huawei.com> -2.9-1
|
|
- Type:enhancement
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC:upgrade software to v2.9
|
|
|
|
* Thu Feb 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.6.1-1
|
|
- Update to 2.6.1
|
|
|
|
* Tue Oct 22 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.3-5
|
|
- Package rebuild.
|
|
|
|
* Sat Oct 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.3-4
|
|
- Type: enhancement
|
|
- ID: NA
|
|
- SUG: NA
|
|
- DESC: fix build failed.
|
|
|
|
* Sat Sep 14 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.3-3
|
|
- Package init.
|