diff options
| author | Andreas Schneider <asn@samba.org> | 2015-11-23 15:08:54 +0100 |
|---|---|---|
| committer | Andreas Schneider <asn@cryptomilk.org> | 2017-04-29 23:31:11 +0200 |
| commit | 57edd3e7810ffaa555004943bea31c89e043d8a2 (patch) | |
| tree | abd7746a50af963184507eeabec4ba0f675550b2 /python/wscript | |
| parent | 9b932d6a1974379f6db11159b03e2b3814bd4189 (diff) | |
| download | samba-57edd3e7810ffaa555004943bea31c89e043d8a2.tar.gz samba-57edd3e7810ffaa555004943bea31c89e043d8a2.tar.bz2 samba-57edd3e7810ffaa555004943bea31c89e043d8a2.zip | |
waf: Move python build instructions to wscript
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'python/wscript')
| -rw-r--r-- | python/wscript | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/python/wscript b/python/wscript index 714d649219d..687a268412f 100644 --- a/python/wscript +++ b/python/wscript @@ -43,3 +43,47 @@ kdc_default_config_dir = "{1}" f.write(data.format(modulesdir, kdc_path)) finally: f.close() + +def build(bld): + bld.SAMBA_LIBRARY('samba_python', + source=[], + deps=''' + LIBPYTHON + pytalloc-util + pyrpc_util + ''', + grouping_library=True, + private_library=True, + pyembed=True, + enabled=bld.PYTHON_BUILD_IS_ENABLED()) + + bld.SAMBA_SUBSYSTEM('LIBPYTHON', + source='modules.c', + public_deps='', + init_function_sentinel='{NULL,NULL}', + deps='talloc', + pyext=True, + enabled=bld.PYTHON_BUILD_IS_ENABLED()) + + for env in bld.gen_python_environments(): + pytalloc_util = bld.pyembed_libname('pytalloc-util') + pyparam_util = bld.pyembed_libname('pyparam_util') + + bld.SAMBA_PYTHON('python_glue', + source='pyglue.c', + deps=''' + %s + samba-util + netif + %s + ''' % (pyparam_util, pytalloc_util), + realname='samba/_glue.so') + + if bld.PYTHON_BUILD_IS_ENABLED(): + for env in bld.gen_python_environments(): + # install out various python scripts for use by make test + bld.SAMBA_SCRIPT('samba_python_files', + pattern='samba/**/*.py', + installdir='python') + + bld.INSTALL_WILDCARD('${PYTHONARCHDIR}', 'samba/**/*.py', flat=False) |
