Don't exclude files that don't exist

When built without debug_build, RPM warns:

    File not found: /builddir/build/BUILDROOT/python3.11-3.11.0~b2-1.fc37.x86_64/usr/lib64/python3.11/_sysconfigdata_d_linux_x86_64-linux-gnu.py
    File not found: /builddir/build/BUILDROOT/python3.11-3.11.0~b2-1.fc37.x86_64/usr/lib64/python3.11/__pycache__/_sysconfigdata_d_linux_x86_64-linux-gnu.cpython-311*.pyc

This might become an error in some distant future.
This commit is contained in:
Miro Hrončok 2022-05-31 21:30:38 +02:00
parent ac73e8a04f
commit f43b8c104e

View File

@ -1238,8 +1238,10 @@ CheckPython optimized
%dir %{pylibdir}/site-packages/__pycache__/ %dir %{pylibdir}/site-packages/__pycache__/
%{pylibdir}/site-packages/README.txt %{pylibdir}/site-packages/README.txt
%if %{with debug_build}
%exclude %{pylibdir}/_sysconfigdata_d_linux_%{platform_triplet}.py %exclude %{pylibdir}/_sysconfigdata_d_linux_%{platform_triplet}.py
%exclude %{pylibdir}/__pycache__/_sysconfigdata_d_linux_%{platform_triplet}%{bytecode_suffixes} %exclude %{pylibdir}/__pycache__/_sysconfigdata_d_linux_%{platform_triplet}%{bytecode_suffixes}
%endif
%{pylibdir}/*.py %{pylibdir}/*.py
%dir %{pylibdir}/__pycache__/ %dir %{pylibdir}/__pycache__/