link_name=link_name,
pyembed=True,
target_type='PYTHON',
- install_path='${PYTHONDIR}',
+ install_path='${PYTHONARCHDIR}',
enabled=enabled)
Build.BuildContext.SAMBA_PYTHON = SAMBA_PYTHON
if python_fixup:
# fixup the python path it will use to find Samba modules
inst_file = file + '.inst'
- if bld.env["PYTHONDIR"] not in sys.path:
- regex = "s|\(sys.path.insert.*\)bin/python\(.*\)$|\\1${PYTHONDIR}\\2|g"
+ if bld.env["PYTHONARCHDIR"] not in sys.path:
+ regex = "s|\(sys.path.insert.*\)bin/python\(.*\)$|\\1${PYTHONARCHDIR}\\2|g"
else:
# Eliminate updating sys.path if the target python dir is already
# in python path.
DEFINE_DYN_CONFIG_PARAM(WINBINDD_PRIVILEGED_SOCKET_DIR)
DEFINE_DYN_CONFIG_PARAM(NTP_SIGND_SOCKET_DIR)
DEFINE_DYN_CONFIG_PARAM(PYTHONDIR)
+DEFINE_DYN_CONFIG_PARAM(PYTHONARCHDIR)
DEFINE_DYN_CONFIG_PARAM(SCRIPTSBINDIR)
DEFINE_DYN_CONFIG_PROTO(WINBINDD_PRIVILEGED_SOCKET_DIR)
DEFINE_DYN_CONFIG_PROTO(NTP_SIGND_SOCKET_DIR)
DEFINE_DYN_CONFIG_PROTO(PYTHONDIR)
+DEFINE_DYN_CONFIG_PROTO(PYTHONARCHDIR)
DEFINE_DYN_CONFIG_PROTO(SCRIPTSBINDIR)
'NTP_SIGND_SOCKET_DIR' : '${NTP_SIGND_SOCKET_DIR}',
'NCALRPCDIR' : '${LOCALSTATEDIR}/ncalrpc',
'PYTHONDIR' : '${PYTHONDIR}',
+ 'PYTHONARCHDIR' : '${PYTHONARCHDIR}',
'MODULESDIR' : '${PREFIX}/modules',
'INCLUDEDIR' : '${PREFIX}/include',
'PKGCONFIGDIR' : '${LIBDIR}/pkgconfig',
'WINBINDD_PRIVILEGED_SOCKET_DIR' : '${LOCALSTATEDIR}/run/samba/winbindd_privileged',
'NTP_SIGND_SOCKET_DIR' : '${LOCALSTATEDIR}/run/samba/ntp_signd',
'NCALRPCDIR' : '${LOCALSTATEDIR}/ncalrpc',
- 'PYTHONDIR' : '${PYTHONDIR}',
+ 'PYTHONARCHDIR' : '${PYTHONARCHDIR}',
'MODULESDIR' : '${LIBDIR}/samba',
'LIBEXECDIR' : '${MODULESDIR}',
'INCLUDEDIR' : '${INCLUDEDIR}/samba-4.0',
return false;
}
+ if (!PySys_PathPrepend(py_path, dyn_PYTHONARCHDIR)) {
+ return false;
+ }
+
if (!PySys_PathPrepend(py_path, dyn_PYTHONDIR)) {
return false;
}
# we don't want PYTHONDIR in config.h, as otherwise changing
# --prefix causes a complete rebuild
del(conf.env.defines['PYTHONDIR'])
+ del(conf.env.defines['PYTHONARCHDIR'])
+
conf.SAMBA_CONFIG_H('include/config.h')