mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
a3e99356ab
This causes the parts of Samba installed into PYTHONARCHDIR to then be missed in mixed python/C module namespaces. Andrew Bartlett
35 lines
1.0 KiB
Python
35 lines
1.0 KiB
Python
#!/usr/bin/env python
|
|
|
|
import os, Options
|
|
|
|
# work out what python external libraries we need to install
|
|
external_libs = {
|
|
"dns.resolver": "dnspython/dns",
|
|
"subunit": "subunit/python/subunit",
|
|
"testtools": "testtools/testtools"}
|
|
|
|
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=[],
|
|
private_library=True,
|
|
grouping_library=True,
|
|
deps='LIBTSOCKET samba_socket UTIL_TEVENT')
|