Remove 'external' python module support code - use the third_party directory instead.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 14 Dec 2014 20:31:45 +0000 (20:31 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 6 Mar 2015 03:41:48 +0000 (04:41 +0100)
Change-Id: I2f5053bc5a42d3dfe71f5bd027eb6ead7d1b9752
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/wscript_build
python/samba/__init__.py

index 2432df5e2f0277c7cada8c47d89a40e8cc9e49c1..94bc7642a99c5a4bde2dc6a49547854cea43f045 100644 (file)
@@ -1,29 +1,5 @@
 #!/usr/bin/env python
 
-import os, Options
-
-# work out what python external libraries we need to install
-external_libs = {
-    }
-
-list = []
-
-for module, package in external_libs.items():
-    try:
-        __import__(module)
-    except ImportError:
-        list.append(package)
-
-for e in list:
-    bld.INSTALL_WILDCARD('${PYTHONARCHDIR}/samba/external', e + '/**/*', flat=False,
-                         exclude='*.pyc', trim_path=os.path.dirname(e))
-
-bld.SAMBA_GENERATOR('external_init_py',
-                    rule='touch ${TGT}',
-                    target='empty_file')
-
-bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/external', 'empty_file', destname='__init__.py')
-
 # a grouping library for event and socket related subsystems
 bld.SAMBA_LIBRARY('samba-sockets',
                   source=[],
index 0cbdec7800c316db273f5c994a18694a0e751c2c..1d1f27db55a06f9d96b11f95c80485e1509b825e 100644 (file)
@@ -354,22 +354,6 @@ def ensure_third_party_module(modulename, location):
             namespace="samba.third_party")
 
 
-def ensure_external_module(modulename, location):
-    """Add a location to sys.path if an external dependency can't be found.
-
-    :param modulename: Module name to import
-    :param location: Location to add to sys.path (can be relative to
-        ${srcdir}/lib)
-    """
-    # This is deprecated - please use ensure_third_party_module for
-    # new modules instead, and put them in third_party/.
-    try:
-        __import__(modulename)
-    except ImportError:
-        import_bundled_package(modulename, location,
-            source_tree_container="lib", namespace="samba.external")
-
-
 def dn_from_dns_name(dnsdomain):
     """return a DN from a DNS name domain/forest root"""
     return "DC=" + ",DC=".join(dnsdomain.split("."))