From ceef0ebad3b7683ebc7dd4ea70a0512a1a9fe1dc Mon Sep 17 00:00:00 2001 From: Shaun Tancheff Date: Tue, 9 Jul 2019 15:02:40 -0500 Subject: [PATCH] pkg-utils python sitelib for SLES15 Use python -Esc to set __python_sitelib. Reviewed-by: Neal Gompa Reviewed-by: Brian Behlendorf Signed-off-by: Shaun Tancheff Closes #8969 --- rpm/generic/zfs.spec.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index 0b16cd0e886b..0864a72a1155 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -99,6 +99,7 @@ %define __python_cffi_pkg python%{__python_pkg_version}-cffi %define __python_setuptools_pkg python%{__python_pkg_version}-setuptools %endif +%define __python_sitelib %(%{__python} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())") # By default python-pyzfs is enabled, with the exception of # RHEL 6 which by default uses Python 2.6 which is too old. @@ -474,8 +475,8 @@ systemctl --system daemon-reload >/dev/null || true %doc contrib/pyzfs/README %doc contrib/pyzfs/LICENSE %defattr(-,root,root,-) -%{python_sitelib}/libzfs_core/* -%{python_sitelib}/pyzfs* +%{__python_sitelib}/libzfs_core/* +%{__python_sitelib}/pyzfs* %endif %if 0%{?_initramfs}