!20 remove %{py3dir}
From: @tong_1001 Reviewed-by: @overweight Signed-off-by: @overweight
This commit is contained in:
commit
f10e574a07
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: python-cryptography
|
Name: python-cryptography
|
||||||
Version: 2.9.2
|
Version: 2.9.2
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: PyCA's cryptography library
|
Summary: PyCA's cryptography library
|
||||||
License: ASL 2.0 or BSD
|
License: ASL 2.0 or BSD
|
||||||
URL: https://cryptography.io/en/latest/
|
URL: https://cryptography.io/en/latest/
|
||||||
@ -76,18 +76,12 @@ recipes to Python developers.
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -n cryptography-%{version} -p1
|
%autosetup -n cryptography-%{version} -p1
|
||||||
|
|
||||||
rm -rf %{py3dir}
|
|
||||||
cp -a . %{py3dir}
|
|
||||||
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
%py2_build
|
%py2_build
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
pushd %{py3dir}
|
|
||||||
%py3_build
|
%py3_build
|
||||||
popd
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Actually other *.c and *.h are appropriate
|
# Actually other *.c and *.h are appropriate
|
||||||
@ -98,9 +92,7 @@ find . -name .keep -print -delete
|
|||||||
%py2_install
|
%py2_install
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
pushd %{py3dir}
|
|
||||||
%py3_install
|
%py3_install
|
||||||
popd
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# skip hypothesis tests
|
# 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)"
|
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
|
%endif
|
||||||
|
|
||||||
pushd %{py3dir}
|
|
||||||
# skip hypothesis tests
|
# skip hypothesis tests
|
||||||
rm -rf tests/hypothesis
|
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)"
|
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}
|
%if %{with python2}
|
||||||
%files -n python2-cryptography
|
%files -n python2-cryptography
|
||||||
@ -130,13 +120,15 @@ popd
|
|||||||
%doc AUTHORS.rst
|
%doc AUTHORS.rst
|
||||||
%license LICENSE LICENSE.APACHE LICENSE.BSD
|
%license LICENSE LICENSE.APACHE LICENSE.BSD
|
||||||
%{python3_sitearch}/*
|
%{python3_sitearch}/*
|
||||||
%{python3_sitearch}/cryptography-%{version}-py*.egg-info
|
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README.rst docs
|
%doc README.rst docs
|
||||||
|
|
||||||
%changelog
|
%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
|
* Wed Feb 24 2021 shixuantong <shixuantong@huawei.com> - 2.9.2-2
|
||||||
- fix CVE-2020-36242 and skip hypothesis tests
|
- fix CVE-2020-36242 and skip hypothesis tests
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user