Skip to content

Commit

Permalink
clippy: handle unversioned python dirs correctly
Browse files Browse the repository at this point in the history
remove the workaround for the byte-compilation of python scripts
in unversioned directories and replace it with the recommended
approach from Fedora's Pyhon Packaging Guidelines.
  • Loading branch information
pmatouse committed May 19, 2024
1 parent 3c6ef4c commit 0b6b5dc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions make-srpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ BuildRequires: help2man
%if 0%{?rhel} == 7
%global python3_pkgversion 36
# needed for /usr/share/csmock/scripts/convert-clippy.py
%global _python_bytecompile_errors_terminate_build 0
%global __python %{python3}
%endif
BuildRequires: python%{python3_pkgversion}-GitPython
Expand Down Expand Up @@ -325,7 +323,10 @@ This package contains the unicontrol plug-in for csmock.
%{python3_sitelib}/csmock/plugins/__pycache__/clang.*
%files -n csmock-plugin-clippy
%{_datadir}/csmock/scripts/convert-clippy.py
%{_datadir}/csmock/scripts/convert-clippy.py*
%if 0%{?rhel} == 7
%{_datadir}/csmock/scripts/__pycache__/convert-clippy.*
%endif
%{_datadir}/csmock/scripts/inject-clippy.sh
%{python3_sitelib}/csmock/plugins/clippy.py*
%{python3_sitelib}/csmock/plugins/__pycache__/clippy.*
Expand All @@ -344,6 +345,9 @@ This package contains the unicontrol plug-in for csmock.
%files -n csmock-plugin-infer
%{_datadir}/csmock/scripts/filter-infer.py*
%if 0%{?rhel} == 7
%{_datadir}/csmock/scripts/__pycache__/filter-infer.*
%endif
%{_datadir}/csmock/scripts/install-infer.sh
%{python3_sitelib}/csmock/plugins/infer.py*
%{python3_sitelib}/csmock/plugins/__pycache__/infer.*
Expand Down Expand Up @@ -384,6 +388,9 @@ This package contains the unicontrol plug-in for csmock.
%files -n csmock-plugin-unicontrol
%{_datadir}/csmock/scripts/find-unicode-control.py*
%if 0%{?rhel} == 7
%{_datadir}/csmock/scripts/__pycache__/find-unicode-control.*
%endif
%{python3_sitelib}/csmock/plugins/unicontrol.py*
%{python3_sitelib}/csmock/plugins/__pycache__/unicontrol.*
EOF
Expand Down

0 comments on commit 0b6b5dc

Please sign in to comment.