rpmlint: python-bytecode-inconsistent-mtime

Es gibt drei Möglichkeiten. In dieser Reihenfolge nutzen.
Diese sind nach %python_install einzufügen.
Für %{python_sitelib} kann auch %{python_sitearch} eingesetzt werden.

 

# Fix python-bytecode-inconsistent-mtime
pushd %{buildroot}%{python_sitelib}
%py_compile .
popd

 

# Fix python-bytecode-inconsistent-mtime
pushd %{buildroot}%{python_sitelib}
find . -name '*.pyc' -exec rm -f '{}' ';'
python%python_bin_suffix -m compileall *.py ';'
popd