summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2002-09-09 08:34:35 +0000
committerMartin Pool <mbp@samba.org>2002-09-09 08:34:35 +0000
commit0ad8d0c768b2c961a1b93662d7050216edc2d3c0 (patch)
treeb1ec1891bf9405688ec6ddec1189545b143507da
parent462818caba9e68f092fdedb3cbcf7155161dffeb (diff)
downloadsamba-0ad8d0c768b2c961a1b93662d7050216edc2d3c0.tar.gz
samba-0ad8d0c768b2c961a1b93662d7050216edc2d3c0.tar.bz2
samba-0ad8d0c768b2c961a1b93662d7050216edc2d3c0.zip
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)
-rw-r--r--source3/python/samba/__init__.py7
-rwxr-xr-xsource3/python/setup.py10
2 files changed, 16 insertions, 1 deletions
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