python-cryptography/python-cryptography.spec
2019-11-06 19:48:59 +08:00

115 lines
3.8 KiB
RPMSpec

Name: python-cryptography
Version: 2.3
Release: 5
Summary: a package designed to expose cryptographic primitives and recipes to Python developers.
License: ASL 2.0 or BSD
URL: https://cryptography.io
Source0: https://pypi.io/packages/source/c/cryptography/cryptography-2.3.tar.gz
Patch6000: Fixed-4380-do-not-assume-TLSv1-is-available-in-OpenS.patch
Patch6001: sigh-missed-one-TLSv1-4392.patch
BuildRequires: openssl-devel gcc python2-devel python2-pytest >= 3.2.1
BuildRequires: python2-setuptools python2-pretend python2-iso8601
BuildRequires: python2-cryptography-vectors = %{version} python2-pytz
BuildRequires: python2-asn1crypto >= 0.21 python2-hypothesis >= 1.11.4
BuildRequires: python2-idna >= 2.1 python2-six >= 1.4.1 python2-cffi >= 1.7
BuildRequires: python2-enum34 python2-ipaddress python3-iso8601
BuildRequires: python3-devel python3-setuptools python3-pretend
BuildRequires: python3-pytest >= 3.2.1 python3-pytz python3-idna >= 2.1
BuildRequires: python3-cryptography-vectors = %{version} python3-six >= 1.4.1
BuildRequires: python3-asn1crypto >= 0.21 python3-hypothesis >= 1.11.4
BuildRequires: python3-cffi >= 1.7
BuildRequires: procps-ng net-tools openssl python2-pycparser python3-pycparser
%description
cryptography is a package which provides cryptographic recipes and primitives
to Python developers. Our goal is for it to be your "cryptographic standard
library". It supports Python 2.7, Python 3.4+, and PyPy 5.4+.
%package -n python2-cryptography
Summary: a package designed to expose cryptographic primitives and recipes to Python2 developers.
%{?python_provide:%python_provide python2-cryptography}
Requires: openssl python2-idna >= 2.1 python2-asn1crypto >= 0.21
Requires: python2-six >= 1.4.1 python2-cffi >= 1.7 python2-enum34 python2-ipaddress
%description -n python2-cryptography
cryptography is a package which provides cryptographic recipes and primitives
to Python developers. Our goal is for it to be your "cryptographic standard
library". It supports Python 2.7, Python 3.4+, and PyPy 5.4+.
%package -n python3-cryptography
Summary: a package designed to expose cryptographic primitives and recipes to Python3 developers.
%{?python_provide:%python_provide python3-cryptography}
Requires: openssl python3-idna >= 2.1 python3-asn1crypto >= 0.21
Requires: python3-six >= 1.4.1 python3-cffi >= 1.7
%description -n python3-cryptography
cryptography is a package which provides cryptographic recipes and primitives
to Python developers. Our goal is for it to be your "cryptographic standard
library". It supports Python 2.7, Python 3.4+, and PyPy 5.4+.
%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
%py2_build
pushd %{py3dir}
%py3_build
popd
%install
find . -name .keep -print -delete
%py2_install
pushd %{py3dir}
%py3_install
popd
%check
rm -f tests/hazmat/primitives/test_padding.py
%{__python2} setup.py test
pushd %{py3dir}
rm -f tests/hazmat/primitives/test_padding.py
%{__python3} setup.py test
popd
%pre
%preun
%post
%postun
%files -n python2-cryptography
%doc README.rst
%license LICENSE LICENSE.APACHE LICENSE.BSD AUTHORS.rst
%{python2_sitearch}/cryptography
%{python2_sitearch}/cryptography-%{version}-py*.egg-info
%files -n python3-cryptography
%doc README.rst
%license LICENSE LICENSE.APACHE LICENSE.BSD AUTHORS.rst
%{python3_sitearch}/*
%{python3_sitearch}/cryptography-%{version}-py*.egg-info
%files help
%doc docs
%changelog
* 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.