1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/python/wscript
Andrew Bartlett fdb6305c86 build: Remove bld.gen_python_environments()
This was part of --extra-python support.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2019-03-21 04:06:14 +00:00

84 lines
2.8 KiB
Python

#!/usr/bin/env python
import os
def configure(conf):
if conf.env.disable_python:
return
kerberos_py = conf.srcnode.abspath() + "/python/samba/provision/kerberos_implementation.py"
f = open(kerberos_py, 'w')
try:
header = """#
# Copyright (c) 2016 Andreas Schneider <asn@samba.org>
#
# 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
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
f.write(header)
data = """kdb_modules_dir = "{0}"
"""
if conf.env.HEIMDAL_KRB5_CONFIG:
f.write(data.format("", ""))
else:
modulesdir = "%s/krb5/plugins/kdb" % conf.env.LIBDIR
f.write(data.format(modulesdir))
finally:
f.close()
def build(bld):
pytalloc_util = bld.pyembed_libname('pytalloc-util')
pyparam_util = bld.pyembed_libname('pyparam_util')
libpython = bld.pyembed_libname('LIBPYTHON')
pyrpc_util = bld.pyembed_libname('pyrpc_util')
samba_python = bld.pyembed_libname('samba_python')
bld.SAMBA_LIBRARY(samba_python,
source=[],
deps='%s %s %s' % (libpython, pytalloc_util, pyrpc_util),
grouping_library=True,
private_library=True,
pyembed=True,
enabled=bld.PYTHON_BUILD_IS_ENABLED())
bld.SAMBA_PYTHON('python_glue',
source='pyglue.c',
deps='''
%s
samba-util
netif
%s
''' % (pyparam_util, pytalloc_util),
realname='samba/_glue.so')
bld.SAMBA_SUBSYSTEM(libpython,
source='modules.c',
public_deps='',
init_function_sentinel='{NULL,NULL}',
deps='talloc',
pyext=True,
enabled=bld.PYTHON_BUILD_IS_ENABLED())
if bld.PYTHON_BUILD_IS_ENABLED():
# 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)