Forgot to check in some of the libsmb stuff.
authorTim Potter <tpot@samba.org>
Fri, 30 Aug 2002 02:43:51 +0000 (02:43 +0000)
committerTim Potter <tpot@samba.org>
Fri, 30 Aug 2002 02:43:51 +0000 (02:43 +0000)
source/python/py_samba.c [new file with mode: 0644]
source/python/samba-head.patch
source/python/setup.py.in

diff --git a/source/python/py_samba.c b/source/python/py_samba.c
new file mode 100644 (file)
index 0000000..7c94569
--- /dev/null
@@ -0,0 +1,64 @@
+/* 
+   Python wrappers for DCERPC/SMB client routines.
+
+   Copyright (C) Tim Potter, 2002
+   
+   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 2 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, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "Python.h"
+#include "python/py_common.h"
+
+/*
+ * Module initialisation 
+ */
+
+static PyObject *lsa_open_policy(PyObject *self, PyObject *args, 
+                               PyObject *kw) 
+{
+       return NULL;
+}
+
+static PyMethodDef samba_methods[] = {
+       { NULL }
+};
+
+static PyMethodDef cheepy_methods[] = {
+       { "open_policy", (PyCFunction)lsa_open_policy, METH_VARARGS|METH_KEYWORDS,
+         "Foo"},
+       { NULL }
+};
+
+void initsamba(void)
+{
+       PyObject *module, *new_module, *dict;
+
+       /* Initialise module */
+
+       module = Py_InitModule("samba", samba_methods);
+       dict = PyModule_GetDict(module);
+
+       new_module = PyModule_N("cheepy");
+
+       
+
+       PyDict_SetItemString(dict, "cheepy", new_module);
+
+       
+
+       /* Do samba initialisation */
+
+       py_samba_init();
+}
index a739346a5bb78a17f89f4cc3441acbc9d4a5526b..ced7da551e36cb91a276019c0383391e10946f17 100644 (file)
@@ -1,11 +1,11 @@
 Index: Makefile.in
 ===================================================================
 RCS file: /data/cvs/samba/source/Makefile.in,v
-retrieving revision 1.500
-diff -u -r1.500 Makefile.in
---- Makefile.in        2002/07/28 06:04:32     1.500
-+++ Makefile.in        2002/07/29 03:48:03
-@@ -838,6 +838,45 @@
+retrieving revision 1.502
+diff -u -r1.502 Makefile.in
+--- Makefile.in        2002/08/02 07:20:56     1.502
++++ Makefile.in        2002/08/06 00:51:48
+@@ -839,6 +839,45 @@
        -$(INSTALLCMD) -d ${prefix}/include
        -$(INSTALLCMD) include/libsmbclient.h ${prefix}/include
  
@@ -54,16 +54,16 @@ diff -u -r1.500 Makefile.in
 Index: configure.in
 ===================================================================
 RCS file: /data/cvs/samba/source/configure.in,v
-retrieving revision 1.324
-diff -u -r1.324 configure.in
---- configure.in       2002/07/27 01:37:32     1.324
-+++ configure.in       2002/07/29 03:48:04
+retrieving revision 1.326
+diff -u -r1.326 configure.in
+--- configure.in       2002/07/30 09:59:52     1.326
++++ configure.in       2002/08/06 00:51:51
 @@ -2797,7 +2797,7 @@
  builddir=`pwd`
  AC_SUBST(builddir)
  
--AC_OUTPUT(include/stamp-h Makefile script/findsmb)
-+AC_OUTPUT(include/stamp-h Makefile script/findsmb python/setup.py)
+-AC_OUTPUT(include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/VFS/block/Makefile)
++AC_OUTPUT(include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/VFS/block/Makefile python/setup.py)
  
  #################################################
  # Print very concise instructions on building/use
index 9b6dc1a650c13d2551ee2bea97629155c6729b1b..5896301245844ade48d99d17413fd417b76dbc40 100755 (executable)
@@ -160,5 +160,15 @@ setup(
               library_dirs = ["/usr/kerberos/lib"],
               extra_objects = obj_list),
 
+    # Moving to merge all individual extensions in to one big
+    # extension.  This is to avoid the fact that each extension is 3MB
+    # in size due to the lack of proper depedency management in Samba.
+
+    Extension(name = "samba",
+              sources = [samba_srcdir + "python/py_samba.c",
+                         samba_srcdir + "python/py_common.c"],
+              libraries = lib_list,
+              library_dirs = ["/usr/kerberos/lib"],
+              extra_objects = obj_list),
     ],
 )