]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rpm: build __pycache__ directories on RHEL 8
authorKen Dreyer <kdreyer@redhat.com>
Tue, 19 Feb 2019 16:42:09 +0000 (09:42 -0700)
committerKen Dreyer <kdreyer@redhat.com>
Thu, 21 Feb 2019 22:03:51 +0000 (15:03 -0700)
In RHEL 8, rpmbuild does not automatically generate __pycache__
directories. Generate them explicitly with the %py_byte_compile macro.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
ceph.spec.in

index 230d80942f9e98ed96d0d60fcf275466f03954b3..1da29c52c27890661c1786f4acc1f1fc8a977f77 100644 (file)
@@ -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}