Skip to content

Commit

Permalink
rpm: build __pycache__ directories on RHEL 8
Browse files Browse the repository at this point in the history
In RHEL 8, rpmbuild does not automatically generate __pycache__
directories. Generate them explicitly with the %py_byte_compile macro.

Signed-off-by: Ken Dreyer <[email protected]>
  • Loading branch information
ktdreyer committed Feb 21, 2019
1 parent 217c3f4 commit f74c76c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,9 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
# create __pycache__ directories and their contents
%py3_compile %{buildroot}%{python3_sitelib}
%endif
%if 0%{?rhel} == 8
%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}
%endif

%clean
rm -rf %{buildroot}
Expand Down

0 comments on commit f74c76c

Please sign in to comment.