pkg-utils python sitelib for SLES15

Use python -Esc to set __python_sitelib.

Reviewed-by: Neal Gompa <ngompa@datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Closes #8969
This commit is contained in:
Shaun Tancheff 2019-07-09 15:02:40 -05:00 committed by Brian Behlendorf
parent ab5036df1c
commit 02fad9260a
1 changed files with 3 additions and 2 deletions

View File

@ -99,6 +99,7 @@
%define __python_cffi_pkg python%{__python_pkg_version}-cffi %define __python_cffi_pkg python%{__python_pkg_version}-cffi
%define __python_setuptools_pkg python%{__python_pkg_version}-setuptools %define __python_setuptools_pkg python%{__python_pkg_version}-setuptools
%endif %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 # By default python-pyzfs is enabled, with the exception of
# RHEL 6 which by default uses Python 2.6 which is too old. # 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/README
%doc contrib/pyzfs/LICENSE %doc contrib/pyzfs/LICENSE
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{python_sitelib}/libzfs_core/* %{__python_sitelib}/libzfs_core/*
%{python_sitelib}/pyzfs* %{__python_sitelib}/pyzfs*
%endif %endif
%if 0%{?_initramfs} %if 0%{?_initramfs}