From 0ad8d0c768b2c961a1b93662d7050216edc2d3c0 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 9 Sep 2002 08:34:35 +0000 Subject: Put all Python modules into the 'samba' subpackage. Now you need to write import samba.tdbutil samba.tdbutil.pack('f', ['hello']) You need 'cvs update -d' to get the new subdirectory for this to build properly. (This used to be commit 0d3276355e0511d6aff110a3943199629b3c00fd) --- source3/python/samba/__init__.py | 7 +++++++ source3/python/setup.py | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 source3/python/samba/__init__.py (limited to 'source3/python') diff --git a/source3/python/samba/__init__.py b/source3/python/samba/__init__.py new file mode 100644 index 0000000000..c818ca3e04 --- /dev/null +++ b/source3/python/samba/__init__.py @@ -0,0 +1,7 @@ +"""samba + +Various Python modules for interfacing to Samba. + +Try using help() to examine their documentation. +""" + diff --git a/source3/python/setup.py b/source3/python/setup.py index 38bc841d98..a5d7879371 100755 --- a/source3/python/setup.py +++ b/source3/python/setup.py @@ -4,6 +4,7 @@ # Module packaging setup for Samba python extensions # # Copyright (C) Tim Potter, 2002 +# Copyright (C) Martin Pool, 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 @@ -70,9 +71,16 @@ setup( samba_srcdir + "ubiqx", samba_srcdir + "smbwrapper", samba_srcdir + "popt", "/usr/kerberos/include", "/usr/local/include"], + + # Get the "samba" directory of Python source. At the moment this + # just contains the __init__ file that makes it work as a + # subpackage. This is needed even though everything else is an + # extension module. + package_dir = {"samba": os.path.join(samba_srcdir, "python", "samba")}, + packages = ["samba"], # Module list - + ext_package = "samba", ext_modules = [ # SPOOLSS pipe module -- cgit