1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source4/scripting/swig
Stefan Metzmacher 1e84e4026e r22575: move script/tests/ -> selftest/
as discussed with jelmer and abartlet

metze
(This used to be commit e9fe3c40e1)
2007-10-10 14:51:46 -05:00
..
torture r15389: Add some better torture tests for LdbMessage. 2007-10-10 14:05:31 -05:00
config.m4 r15300: Only enable SWIG shared libs if python is available 2007-10-10 14:05:04 -05:00
config.mk r22575: move script/tests/ -> selftest/ 2007-10-10 14:51:46 -05:00
dcerpc.i r13985: Slowly start swig_ldb 2007-10-10 13:52:34 -05:00
README r2423: Add some instructions for building extensions. 2007-10-10 12:58:51 -05:00
rpcclient r6539: A patch from jbm: 2007-10-10 13:16:24 -05:00
samba.i r6212: Treat uint8 and int8's as integers instead of chars. Swig maps a char 2007-10-10 13:11:26 -05:00
samr.py r6540: Implement a bunch more SAMR functions. 2007-10-10 13:16:24 -05:00
status_codes.i r3589: Add some extra status codes. 2007-10-10 13:05:36 -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.