The branch, v4-0-test has been updated via 5b2ea43ed8613ac10ebe7feda0cf070c8079137a (commit) via 6a9827454aaf4279ee85dc5d99d10f14e4c09eae (commit) via 0e036948307c8ca5013e20a17a10d109830e4df1 (commit) via 502424955237ace5a276d4c91c62e95233ecd978 (commit) from 30fc3752c7573fcf8b1a41f7b3bc8dad860077f8 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log ----------------------------------------------------------------- commit 5b2ea43ed8613ac10ebe7feda0cf070c8079137a Author: Jelmer Vernooij <[EMAIL PROTECTED]> Date: Wed Jan 16 15:07:00 2008 +0100 pidl: Add simple test for ServerNDR. commit 6a9827454aaf4279ee85dc5d99d10f14e4c09eae Author: Jelmer Vernooij <[EMAIL PROTECTED]> Date: Wed Jan 16 15:06:46 2008 +0100 pidl: Fix missing import for fatal(). commit 0e036948307c8ca5013e20a17a10d109830e4df1 Author: Jelmer Vernooij <[EMAIL PROTECTED]> Date: Wed Jan 16 14:54:29 2008 +0100 pidl: Fix imported function for ServerNDR and add test to make sure it doesn't regress again. commit 502424955237ace5a276d4c91c62e95233ecd978 Author: Jelmer Vernooij <[EMAIL PROTECTED]> Date: Mon Jan 14 23:04:57 2008 +0100 python: Build shared python modules for generic use. ----------------------------------------------------------------------- Summary of changes: source/build/smb_build/input.pm | 2 +- source/build/smb_build/makefile.pm | 6 ++++-- source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 6 +++++- source/pidl/lib/Parse/Pidl/Samba4.pm | 1 + source/pidl/tests/samba3-srv.pl | 18 ++++++++++++++++++ source/scripting/python/config.mk | 10 ++++++++-- 6 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 source/pidl/tests/samba3-srv.pl Changeset truncated at 500 lines: diff --git a/source/build/smb_build/input.pm b/source/build/smb_build/input.pm index 6d5c4f4..0b26aee 100644 --- a/source/build/smb_build/input.pm +++ b/source/build/smb_build/input.pm @@ -182,7 +182,7 @@ sub check_python($$$) $python->{SUBSYSTEM} = "LIBPYTHON"; - check_module($INPUT, $python, $default_ot); + check_module($INPUT, $python, ["SHARED_LIBRARY", "STATIC_LIBRARY"]); } sub check_binary($$) diff --git a/source/build/smb_build/makefile.pm b/source/build/smb_build/makefile.pm index 0e7771c..ce1e757 100644 --- a/source/build/smb_build/makefile.pm +++ b/source/build/smb_build/makefile.pm @@ -27,6 +27,7 @@ sub new($$$) $self->{torture_progs} = []; $self->{static_libs} = []; $self->{python_dsos} = []; + $self->{python_pys} = []; $self->{shared_libs} = []; $self->{installable_shared_libs} = []; $self->{headers} = []; @@ -345,7 +346,7 @@ sub SharedModule($$) push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)"); - if (defined($ctx->{INIT_FUNCTION})) { + if (defined($ctx->{INIT_FUNCTION}) and $ctx->{TYPE} ne "PYTHON") { my $init_fn = $ctx->{INIT_FUNCTION_TYPE}; $init_fn =~ s/\(\*\)/init_module/; my $proto_fn = $ctx->{INIT_FUNCTION_TYPE}; @@ -539,7 +540,7 @@ sub PythonFiles($$) $self->output("$target: $source\n" . "\tmkdir -p \$(builddir)/bin/python\n" . "\tcp $source [EMAIL PROTECTED]"); - push (@{$self->{python_dsos}}, $target); + push (@{$self->{python_pys}}, $target); } } @@ -714,6 +715,7 @@ sub write($$) $self->output("STATIC_LIBS = " . array2oneperline($self->{static_libs}) . "\n"); $self->output("SHARED_LIBS = " . array2oneperline($self->{shared_libs}) . "\n"); $self->output("PYTHON_DSOS = " . array2oneperline($self->{python_dsos}) . "\n"); + $self->output("PYTHON_PYS = " . array2oneperline($self->{python_pys}) . "\n"); $self->output("INSTALLABLE_SHARED_LIBS = " . array2oneperline($self->{installable_shared_libs}) . "\n"); $self->output("PUBLIC_HEADERS = " . array2oneperline($self->{headers}) . "\n"); $self->output("PC_FILES = " . array2oneperline($self->{pc_files}) . "\n"); diff --git a/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index 47312bc..ca9e7d1 100644 --- a/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -6,13 +6,17 @@ package Parse::Pidl::Samba3::ServerNDR; +use Exporter; [EMAIL PROTECTED] = qw(Exporter); [EMAIL PROTECTED] = qw(DeclLevel); + use strict; use Parse::Pidl qw(warning fatal); use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference); use Parse::Pidl::Util qw(ParseExpr has_property is_constant); use Parse::Pidl::NDR qw(GetNextLevel); use Parse::Pidl::Samba4 qw(ElementStars DeclLong); -use Parse::Pidl::Samba4::NDR::Parser qw(GenerateFunctionOutEnv); +use Parse::Pidl::Samba4::Header qw(GenerateFunctionOutEnv); use vars qw($VERSION); $VERSION = '0.01'; diff --git a/source/pidl/lib/Parse/Pidl/Samba4.pm b/source/pidl/lib/Parse/Pidl/Samba4.pm index 5848543..d42e01c 100644 --- a/source/pidl/lib/Parse/Pidl/Samba4.pm +++ b/source/pidl/lib/Parse/Pidl/Samba4.pm @@ -12,6 +12,7 @@ require Exporter; use Parse::Pidl::Util qw(has_property is_constant); use Parse::Pidl::NDR qw(GetNextLevel); use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference); +use Parse::Pidl qw(fatal); use strict; use vars qw($VERSION); diff --git a/source/pidl/tests/samba3-srv.pl b/source/pidl/tests/samba3-srv.pl new file mode 100644 index 0000000..d1e2bc9 --- /dev/null +++ b/source/pidl/tests/samba3-srv.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl +# (C) 2008 Jelmer Vernooij <[EMAIL PROTECTED]> +# Published under the GNU General Public License +use strict; +use warnings; + +use Test::More tests => 1; +use FindBin qw($RealBin); +use lib "$RealBin"; +use Util; +use Parse::Pidl::Util qw(MyDumper has_property); +use Parse::Pidl::Samba3::ServerNDR qw(DeclLevel); + +my $l = { TYPE => "DATA", DATA_TYPE => "uint32" }; +my $e = { FILE => "foo", LINE => 0, PROPERTIES => { }, TYPE => "uint32", + LEVELS => [ $l ] }; + +is("uint32_t", DeclLevel($e, 0)); diff --git a/source/scripting/python/config.mk b/source/scripting/python/config.mk index f00b477..450da0e 100644 --- a/source/scripting/python/config.mk +++ b/source/scripting/python/config.mk @@ -16,7 +16,7 @@ PRIVATE_DEPENDENCIES = LIBNDR LIBLDB SAMDB CREDENTIALS SWIG_FILE = misc.i # Swig extensions -swig: pythonmods +swig:: pythonmods .SUFFIXES: _wrap.c .i @@ -28,13 +28,19 @@ realdistclean:: @-rm -f bin/python/* # FIXME: Remove _wrap.c files -pythonmods: $(PYTHON_DSOS) +pythonmods:: $(PYTHON_DSOS) $(PYTHON_PYS) PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py bin/python/registry.py bin/python/tdb.py bin/python/security.py bin/python/events.py bin/python/net.py pydoctor:: pythonmods LD_LIBRARY_PATH=bin/shared PYTHONPATH=bin/python pydoctor --make-html --docformat=restructuredtext --add-package scripting/python/samba/ $(addprefix --add-module , $(PYDOCTOR_MODULES)) +installpython:: pythonmods + @$(SHELL) $(srcdir)/script/installpython.sh \ + $(INSTALLPERMS) \ + $(DESTDIR)$(PYTHONDIR) \ + scripting/python bin/python + clean:: @echo "Removing python modules" @rm -f bin/python/* -- Samba Shared Repository