Remove python-imaging build requirements
Resolves: rhbz#1935839
This commit is contained in:
parent
2b141b83b0
commit
0e57e898a7
@ -12,8 +12,11 @@ BuildArch: noarch
|
|||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-imaging
|
|
||||||
BuildRequires: python3-six
|
BuildRequires: python3-six
|
||||||
|
%if ! 0%{?rhel}
|
||||||
|
# RHEL only ships qrcode-core and does not have pillow
|
||||||
|
BuildRequires: python3-imaging
|
||||||
|
%endif
|
||||||
|
|
||||||
%global _description\
|
%global _description\
|
||||||
This module uses the Python Imaging Library (PIL) to allow for the\
|
This module uses the Python Imaging Library (PIL) to allow for the\
|
||||||
@ -66,18 +69,12 @@ rm -r %{buildroot}%{python3_sitelib}/%{pkgname}/tests
|
|||||||
ln -s qr %{buildroot}%{_bindir}/qrcode
|
ln -s qr %{buildroot}%{_bindir}/qrcode
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# in lieue of a real test suite
|
%if 0%{?rhel}
|
||||||
modules=$(find qrcode -name '*.py' \
|
# test method requires PIL
|
||||||
| grep -v __init__ \
|
sed -i s/test_render_pil/disabled_render_pil/g qrcode/tests/test_qrcode.py
|
||||||
| sort \
|
%endif
|
||||||
| sed -e 's|/|.|g' \
|
PYTHONPATH=%{buildroot}%{python3_sitelib} \
|
||||||
| sed -e 's|.py$||g');
|
%{__python3} -m unittest -v qrcode.tests.test_qrcode.QRCodeTests
|
||||||
|
|
||||||
|
|
||||||
for m in $modules;
|
|
||||||
do
|
|
||||||
%{__python3} -c "import $m"
|
|
||||||
done
|
|
||||||
|
|
||||||
%files -n python3-%{pkgname}
|
%files -n python3-%{pkgname}
|
||||||
%{_bindir}/qr
|
%{_bindir}/qr
|
||||||
@ -103,6 +100,10 @@ done
|
|||||||
%{python3_sitelib}/%{pkgname}/image/__pycache__/base.*
|
%{python3_sitelib}/%{pkgname}/image/__pycache__/base.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 08 2021 Christian Heimes <cheimes@redhat.com> - 6.1-9
|
||||||
|
- Resolves: #1935839 Remove python-imaging build requirements for RHEL
|
||||||
|
- Run unit tests during build
|
||||||
|
|
||||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 6.1-9
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 6.1-9
|
||||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user