*/
#include <Python.h>
+#include "py3compat.h"
#include "includes.h"
#include "python/modules.h"
#include "dynconfig/dynconfig.h"
static bool PySys_PathPrepend(PyObject *list, const char *path)
{
- PyObject *py_path = PyString_FromString(path);
+ PyObject *py_path = PyStr_FromString(path);
if (py_path == NULL)
return false;
pyembed=True,
enabled=bld.PYTHON_BUILD_IS_ENABLED())
- bld.SAMBA_SUBSYSTEM('LIBPYTHON',
- source='modules.c',
- public_deps='',
- init_function_sentinel='{NULL,NULL}',
- deps='talloc',
- pyext=True,
- enabled=bld.PYTHON_BUILD_IS_ENABLED())
-
for env in bld.gen_python_environments():
pytalloc_util = bld.pyembed_libname('pytalloc-util')
pyparam_util = bld.pyembed_libname('pyparam_util')
+ libpython = bld.pyembed_libname('LIBPYTHON')
bld.SAMBA_PYTHON('python_glue',
source='pyglue.c',
''' % (pyparam_util, pytalloc_util),
realname='samba/_glue.so')
+ bld.SAMBA_SUBSYSTEM(libpython,
+ source='modules.c',
+ public_deps='',
+ init_function_sentinel='{NULL,NULL}',
+ deps='talloc',
+ pyext=True,
+ enabled=bld.PYTHON_BUILD_IS_ENABLED())
+
if bld.PYTHON_BUILD_IS_ENABLED():
for env in bld.gen_python_environments():
# install out various python scripts for use by make test