devtools spec is including non-existent .pyc and .pyo files, e.g. RangeHTTPServer.pyc
On Fedora 32 and Centos 8 (8.1 and 8.2) running ./cerbero-uninstalled package gstreamer-1.0
gives these errors:
Processing files: gstreamer-1.0-devtools-1.17.2.1-1.x86_64
error: File not found: /home/graham/src/cerbero/build/tmpifp_w1z9/buildroot/opt/gstreamer/lib/gst-validate-launcher/python/launcher/RangeHTTPServer.pyc
error: File not found: /home/graham/src/cerbero/build/tmpifp_w1z9/buildroot/opt/gstreamer/lib/gst-validate-launcher/python/launcher/RangeHTTPServer.pyo
error: File not found: /home/graham/src/cerbero/build/tmpifp_w1z9/buildroot/opt/gstreamer/lib/gst-validate-launcher/python/launcher/__init__.pyc
error: File not found: /home/graham/src/cerbero/build/tmpifp_w1z9/buildroot/opt/gstreamer/lib/gst-validate-launcher/python/launcher/__init__.pyo
error: File not found: /home/graham/src/cerbero/build/tmpifp_w1z9/buildroot/opt/gstreamer/lib/gst-validate-launcher/python/launcher/apps/__init__.pyc
error: File not found: /home/graham/src/cerbero/build/tmpifp_w1z9/buildroot/opt/gstreamer/lib/gst-validate-launcher/python/launcher/apps/__init__.pyo
[..lots more..]
buildroot/opt/gstreamer/lib/gst-validate-launcher/python/launcher/RangeHttpServer.py
exists, but not .pyc
or .pyo
.
gstreamer-1.0-devtools.spec
includes the above at the bottom of it's %files
section like this:
%{prefix}/lib/gst-validate-launcher/python/launcher/RangeHTTPServer.pyc
%{prefix}/lib/gst-validate-launcher/python/launcher/RangeHTTPServer.pyo
[etc]
If I remove the pyc / pyo lines from the .spec file and re-run the rpmbuild
command, it works.
My initial guess was that those files are present during compilation, and maybe include by a wildcard. But that isn't right because it's python3, which puts the .pyc in a __pycache__
directory.
For anyone else hitting this, the work-around is to edit packages/gstreamer-1.0/gstreamer-1.0.package
and delete the last two lines in the packages
array, these lines:
('gstreamer-1.0-editing', False, False),
('gstreamer-1.0-devtools', False, False),
Then it works.