mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-09-15 13:50:11 +03:00
pyzfs: Adapt python lib directory evaluation from ax_python_devel.m4
71216b91d2
introduced a regression
on debian/ubuntu systems during build.
The reason being, that building the RPM for pyzfs was using
a different library path than building the library itself.
This is now harmonized.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Martin Rüegg <martin.rueegg@metaworx.ch>
Closes #16155
Closes #17480
This commit is contained in:
parent
74b539d3dc
commit
6c1130a730
@ -87,7 +87,19 @@
|
||||
%define __python %{__use_python}
|
||||
%define __python_pkg_version %{__use_python_pkg_version}
|
||||
%endif
|
||||
%define __python_sitelib %(%{__python} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())" 2>/dev/null || %{__python} -Esc "import sysconfig; print(sysconfig.get_path('purelib'))")
|
||||
%define __python_sitelib %(%{__python} -Esc "
|
||||
import sysconfig;
|
||||
if hasattr(sysconfig, 'get_default_scheme'):
|
||||
scheme = sysconfig.get_default_scheme()
|
||||
else:
|
||||
scheme = sysconfig._get_default_scheme()
|
||||
if scheme == 'posix_local':
|
||||
scheme = 'posix_prefix'
|
||||
prefix = '%{_prefix}'
|
||||
if prefix == 'NONE':
|
||||
prefix = '%{ac_default_prefix}'
|
||||
sitedir = sysconfig.get_path('purelib', scheme, vars={'base': prefix})
|
||||
print(sitedir);" 2>/dev/null || %{__python} -Esc "from distutils import sysconfig; print(sysconfig.get_python_lib(0,0))")
|
||||
|
||||
Name: @PACKAGE@
|
||||
Version: @VERSION@
|
||||
|
Loading…
Reference in New Issue
Block a user