summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/config.m43
-rw-r--r--source4/scripting/python/config.mk5
-rw-r--r--source4/scripting/python/smbpython.c25
3 files changed, 33 insertions, 0 deletions
diff --git a/source4/scripting/python/config.m4 b/source4/scripting/python/config.m4
index 8951b4da08..49ad7273a4 100644
--- a/source4/scripting/python/config.m4
+++ b/source4/scripting/python/config.m4
@@ -41,9 +41,11 @@ then
Py_InitModule(NULL, NULL);
],[
SMB_ENABLE(LIBPYTHON,YES)
+ SMB_ENABLE(smbpython,YES)
AC_MSG_RESULT([yes])
],[
SMB_ENABLE(LIBPYTHON,NO)
+ SMB_ENABLE(smbpython,NO)
AC_MSG_RESULT([no])
])
@@ -51,5 +53,6 @@ then
CFLAGS="$ac_save_CFLAGS"
else
SMB_ENABLE(LIBPYTHON,NO)
+ SMB_ENABLE(smbpython,NO)
AC_MSG_RESULT([no])
fi
diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk
index d0d3829eef..ac923cb8d1 100644
--- a/source4/scripting/python/config.mk
+++ b/source4/scripting/python/config.mk
@@ -1,3 +1,8 @@
+[BINARY::smbpython]
+PRIVATE_DEPENDENCIES = LIBPYTHON
+OBJ_FILES = \
+ smbpython.o
+
[PYTHON::python_uuid]
PRIVATE_DEPENDENCIES = LIBNDR
OBJ_FILES = uuidmodule.o
diff --git a/source4/scripting/python/smbpython.c b/source4/scripting/python/smbpython.c
new file mode 100644
index 0000000000..43785765c1
--- /dev/null
+++ b/source4/scripting/python/smbpython.c
@@ -0,0 +1,25 @@
+/*
+ Unix SMB/CIFS implementation.
+ Samba utility functions
+ Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+#include <Python.h>
+
+int main(int argc, char **argv) {
+ return Py_Main(argc,argv);
+}