]> granicus.if.org Git - zfs/commitdiff
pkg-utils python sitelib for SLES15
authorShaun Tancheff <shaun@aeonazure.com>
Tue, 9 Jul 2019 20:02:40 +0000 (15:02 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 9 Jul 2019 20:02:40 +0000 (13:02 -0700)
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

rpm/generic/zfs.spec.in

index 0b16cd0e886bcfe693645d1f84a5f702f4101099..0864a72a11552081f2c30fc51fe1204ea17b52ab 100644 (file)
@@ -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}