Author: jelmer
Date: 2007-11-19 18:20:50 +0000 (Mon, 19 Nov 2007)
New Revision: 26039

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26039

Log:
Put all python modules in bin/python, to limit the lib paths.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/build/smb_build/input.pm
   branches/4.0-python/source/build/smb_build/main.pl
   branches/4.0-python/source/build/smb_build/makefile.pm
   branches/4.0-python/source/build/smb_build/output.pm
   branches/4.0-python/source/lib/ldb/config.mk
   branches/4.0-python/source/scripting/bin/rpcclient
   branches/4.0-python/source/setup/provision


Changeset:

Property changes on: branches/4.0-python
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/build/smb_build/input.pm
===================================================================
--- branches/4.0-python/source/build/smb_build/input.pm 2007-11-19 18:20:46 UTC 
(rev 26038)
+++ branches/4.0-python/source/build/smb_build/input.pm 2007-11-19 18:20:50 UTC 
(rev 26039)
@@ -151,7 +151,8 @@
                my $basename = basename($python->{SWIG_FILE}, ".i");
 
                $python->{OBJ_FILES} = ["$dirname/$basename\_wrap.o"];
-               $python->{LIBRARY_REALNAME} = 
"$dirname/_$basename.\$(SHLIBEXT)";
+               $python->{LIBRARY_REALNAME} = "_$basename.\$(SHLIBEXT)";
+               $python->{PYTHON_FILES} = ["$dirname/$basename.py"];
        } else {
                my $basename = $python->{NAME};
                $basename =~ s/^python_//g;

Modified: branches/4.0-python/source/build/smb_build/main.pl
===================================================================
--- branches/4.0-python/source/build/smb_build/main.pl  2007-11-19 18:20:46 UTC 
(rev 26038)
+++ branches/4.0-python/source/build/smb_build/main.pl  2007-11-19 18:20:50 UTC 
(rev 26039)
@@ -72,6 +72,7 @@
        $mkenv->SharedModule($key) if $key->{TYPE} eq "MODULE" and
                                        grep(/SHARED_LIBRARY/, 
@{$key->{OUTPUT_TYPE}});
        $mkenv->Binary($key) if grep(/BINARY/, @{$key->{OUTPUT_TYPE}});
+       $mkenv->PythonFiles($key) if defined($key->{PYTHON_FILES});
        $mkenv->Manpage($key) if defined($key->{MANPAGE});
        $mkenv->Header($key) if defined($key->{PUBLIC_HEADERS});
        $mkenv->ProtoHeader($key) if defined($key->{PRIVATE_PROTO_HEADER}) or 

Modified: branches/4.0-python/source/build/smb_build/makefile.pm
===================================================================
--- branches/4.0-python/source/build/smb_build/makefile.pm      2007-11-19 
18:20:46 UTC (rev 26038)
+++ branches/4.0-python/source/build/smb_build/makefile.pm      2007-11-19 
18:20:50 UTC (rev 26039)
@@ -7,6 +7,7 @@
 
 package smb_build::makefile;
 use smb_build::env;
+use File::Basename;
 use strict;
 
 use base 'smb_build::env';
@@ -525,6 +526,18 @@
        }
 }
 
+sub PythonFiles($$)
+{
+       my ($self,$ctx) = @_;
+
+       foreach (@{$ctx->{PYTHON_FILES}}) {
+               my $target = "bin/python/".basename($_);
+               $self->output("$target: $ctx->{BASEDIR}/$_\n" .
+                             "\tcp $ctx->{BASEDIR}/$_ [EMAIL PROTECTED]");
+               push (@{$self->{python_dsos}}, $target);
+  }
+}
+
 sub Manpage($$)
 {
        my ($self,$ctx) = @_;

Modified: branches/4.0-python/source/build/smb_build/output.pm
===================================================================
--- branches/4.0-python/source/build/smb_build/output.pm        2007-11-19 
18:20:46 UTC (rev 26038)
+++ branches/4.0-python/source/build/smb_build/output.pm        2007-11-19 
18:20:50 UTC (rev 26039)
@@ -49,7 +49,9 @@
                $lib_name = "lib$link_name";
        }
 
-       if (defined($lib->{LIBRARY_REALNAME})) {
+       if ($lib->{TYPE} eq "PYTHON") {
+               $lib->{SHAREDDIR} = "bin/python";
+       } elsif (defined($lib->{LIBRARY_REALNAME})) {
                $lib->{BASEDIR} =~ s/^\.\///g;
                $lib->{SHAREDDIR} = $lib->{BASEDIR};
        } else {

Modified: branches/4.0-python/source/lib/ldb/config.mk
===================================================================
--- branches/4.0-python/source/lib/ldb/config.mk        2007-11-19 18:20:46 UTC 
(rev 26038)
+++ branches/4.0-python/source/lib/ldb/config.mk        2007-11-19 18:20:50 UTC 
(rev 26039)
@@ -197,7 +197,7 @@
 # Start LIBRARY swig_ldb
 [PYTHON::swig_ldb]
 PUBLIC_DEPENDENCIES = LIBLDB LIBPYTHON
-SWIG_FILE = swig/ldb.i
+SWIG_FILE = ldb.i
 # End LIBRARY swig_ldb
 #######################
 

Modified: branches/4.0-python/source/scripting/bin/rpcclient
===================================================================
--- branches/4.0-python/source/scripting/bin/rpcclient  2007-11-19 18:20:46 UTC 
(rev 26038)
+++ branches/4.0-python/source/scripting/bin/rpcclient  2007-11-19 18:20:50 UTC 
(rev 26039)
@@ -1,6 +1,23 @@
 #!/usr/bin/python
 
-import sys, os, string
+# Unix SMB/CIFS implementation.
+# Copyright (C) Tim Potter <[EMAIL PROTECTED]> 2005
+#   
+# 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/>.
+#
+
+import os, string, sys
 from cmd import Cmd
 from optparse import OptionParser
 from pprint import pprint

Modified: branches/4.0-python/source/setup/provision
===================================================================
--- branches/4.0-python/source/setup/provision  2007-11-19 18:20:46 UTC (rev 
26038)
+++ branches/4.0-python/source/setup/provision  2007-11-19 18:20:50 UTC (rev 
26039)
@@ -24,10 +24,8 @@
 import sys
 
 # Add path to the library for in-tree use
+sys.path.append("bin/python")
 sys.path.append("scripting/python")
-sys.path.append("lib/ldb/swig")
-sys.path.append("auth/credentials")
-sys.path.append("lib/registry")
 
 from samba import system_session
 import samba.getopt as options

Reply via email to