Avoid excluding non-existent .py[co] files in %doc

Starting with rpm-build-4.13.0 (in F-22), brp-python-bytecompile
excludes files under /usr/share/doc by default.  Restrict the %files
%exclude to EL <= 7 to avoid spurious 'File not found' warnings from
rpm-build.
This commit is contained in:
Todd Zullinger 2018-01-08 17:00:13 -05:00
parent 6611083041
commit 6af316afb7

View File

@ -690,7 +690,10 @@ rm -rf %{buildroot}
%files core-doc -f man-doc-files-core
%defattr(-,root,root)
%if 0%{?rhel} && 0%{?rhel} <= 7
# .py files are only bytecompiled on EL <= 7
%exclude %{_pkgdocdir}/contrib/*/*.py[co]
%endif
%{_pkgdocdir}/contrib/hooks
%files p4
@ -801,6 +804,9 @@ rm -rf %{buildroot}
# No files for you!
%changelog
* Mon Jan 08 2018 Todd Zullinger <tmz@pobox.com>
- Avoid excluding non-existent .py[co] files in %%doc
* Sun Jan 07 2018 Todd Zullinger <tmz@pobox.com>
- Explicitly enable tests which may be skipped opportunistically