1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00
Tim Potter 8f00427136 r2994: More cleanups. Move the generation of NTSTATUS and WERROR exceptions
from inside a swig %exception block and into the argout typemap.  This
will allow us to wrap functions that don't require exception handling, and
also get rid of some ugly code in dcerpc.i
(This used to be commit 558076cc8ddbdb563869f7d35150310217f30c31)
2007-10-10 12:59:55 -05:00
..

README for Samba SWIG Python extensions
---------------------------------------

Instructions for building:

1. Run configure with the --with-python option to enable python
   extensions. 

2. Edit the script/build_idl.sh script to pass the --swig option to
   pidl.  Here's a patch:

Index: script/build_idl.sh
===================================================================
--- script/build_idl.sh	(revision 2413)
+++ script/build_idl.sh	(working copy)
@@ -4,7 +4,7 @@
 
 [ -d librpc/gen_ndr ] || mkdir -p librpc/gen_ndr || exit 1
 
-PIDL="$PERL ./build/pidl/pidl.pl --output librpc/gen_ndr/ndr_ --parse --header --parser --server"
+PIDL="$PERL ./build/pidl/pidl.pl --output librpc/gen_ndr/ndr_ --parse --header --parser --server --swig"
 TABLES="$PERL ./build/pidl/tables.pl --output librpc/gen_ndr/tables"
 
 if [ x$FULLBUILD = xFULL ]; then

3. Run 'make idl_full swig' to build extensions.

4. At some stage there will be a proper system for installing the
   extensions, but right now it's easier to run them in place.  Set
   your PYTHONPATH to include the modules.  From the Samba source
   directory, run:

   export PYTHONPATH=`pwd`/scripting/swig

Now you can go nuts and use the extensions.  Check the
scripting/swig/torture directory for a testsuite.  There will
hopefully be a bunch of usage examples somewhere.