From f74c76c2da3fb4ded9d86486cdc85a56bc51901f Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Tue, 19 Feb 2019 09:42:09 -0700 Subject: [PATCH] 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 --- ceph.spec.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ceph.spec.in b/ceph.spec.in index 230d80942f9e..1da29c52c278 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} -- 2.47.3