!20 remove %{py3dir}

From: @tong_1001
Reviewed-by: @overweight
Signed-off-by: @overweight
This commit is contained in:
openeuler-ci-bot 2021-03-25 10:27:07 +08:00 committed by Gitee
commit f10e574a07

View File

@ -3,7 +3,7 @@
Name: python-cryptography
Version: 2.9.2
Release: 2
Release: 3
Summary: PyCA's cryptography library
License: ASL 2.0 or BSD
URL: https://cryptography.io/en/latest/
@ -76,18 +76,12 @@ recipes to Python developers.
%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
@ -98,9 +92,7 @@ find . -name .keep -print -delete
%py2_install
%endif
pushd %{py3dir}
%py3_install
popd
%check
# skip hypothesis tests
@ -110,11 +102,9 @@ rm -rf tests/hypothesis
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
pushd %{py3dir}
# skip hypothesis tests
rm -rf tests/hypothesis
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
%if %{with python2}
%files -n python2-cryptography
@ -130,13 +120,15 @@ popd
%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
* Wed Mar 24 2021 shixuantong <shixuantong@huawei.com> - 2.9.2-3
- remove %{py3dir}
* Wed Feb 24 2021 shixuantong <shixuantong@huawei.com> - 2.9.2-2
- fix CVE-2020-36242 and skip hypothesis tests