From: Ken Dreyer Date: Tue, 19 Feb 2019 16:42:09 +0000 (-0700) Subject: rpm: build __pycache__ directories on RHEL 8 X-Git-Tag: v14.1.0~10^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f74c76c2da3fb4ded9d86486cdc85a56bc51901f;p=ceph-ci.git rpm: build __pycache__ directories on RHEL 8 In RHEL 8, rpmbuild does not automatically generate __pycache__ directories. Generate them explicitly with the %py_byte_compile macro. Signed-off-by: Ken Dreyer --- diff --git a/ceph.spec.in b/ceph.spec.in index 230d80942f9..1da29c52c27 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -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}