Skip to content

Commit 02fad92

Browse files
stancheffbehlendorf
authored andcommitted
pkg-utils python sitelib for SLES15
Use python -Esc to set __python_sitelib. Reviewed-by: Neal Gompa <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Shaun Tancheff <[email protected]> Closes #8969
1 parent ab5036d commit 02fad92

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rpm/generic/zfs.spec.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
%define __python_cffi_pkg python%{__python_pkg_version}-cffi
100100
%define __python_setuptools_pkg python%{__python_pkg_version}-setuptools
101101
%endif
102+
%define __python_sitelib %(%{__python} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
102103

103104
# By default python-pyzfs is enabled, with the exception of
104105
# RHEL 6 which by default uses Python 2.6 which is too old.
@@ -474,8 +475,8 @@ systemctl --system daemon-reload >/dev/null || true
474475
%doc contrib/pyzfs/README
475476
%doc contrib/pyzfs/LICENSE
476477
%defattr(-,root,root,-)
477-
%{python_sitelib}/libzfs_core/*
478-
%{python_sitelib}/pyzfs*
478+
%{__python_sitelib}/libzfs_core/*
479+
%{__python_sitelib}/pyzfs*
479480
%endif
480481

481482
%if 0%{?_initramfs}

0 commit comments

Comments
 (0)