def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True): if conf.env.disable_python: if mandatory: raise Utils.WafError("Cannot check for python headers when " "--disable-python specified") conf.msg("python headers", "Check disabled due to --disable-python") # we don't want PYTHONDIR in config.h, as otherwise changing # --prefix causes a complete rebuild del(conf.env.defines['PYTHONDIR']) del(conf.env.defines['PYTHONARCHDIR']) return if conf.env["python_headers_checked"] == []: if conf.env['EXTRA_PYTHON']: conf.setenv('extrapython') _check_python_headers(conf, mandatory=True) conf.setenv('default') _check_python_headers(conf, mandatory) conf.env["python_headers_checked"] = "yes" if conf.env['EXTRA_PYTHON']: extraversion = conf.all_envs['extrapython']['PYTHON_VERSION'] if extraversion == conf.env['PYTHON_VERSION']: raise Utils.WafError("extrapython %s is same as main python %s" % ( extraversion, conf.env['PYTHON_VERSION'])) else: conf.msg("python headers", "using cache") # we don't want PYTHONDIR in config.h, as otherwise changing # --prefix causes a complete rebuild del(conf.env.defines['PYTHONDIR']) del(conf.env.defines['PYTHONARCHDIR'])
def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True): if conf.env.disable_python: if mandatory: raise Utils.WafError("Cannot check for python headers when " "--disable-python specified") conf.msg("python headers", "Check disabled due to --disable-python") # we don't want PYTHONDIR in config.h, as otherwise changing # --prefix causes a complete rebuild del (conf.env.defines['PYTHONDIR']) del (conf.env.defines['PYTHONARCHDIR']) return if conf.env["python_headers_checked"] == []: if conf.env['EXTRA_PYTHON']: conf.setenv('extrapython') _check_python_headers(conf, mandatory=True) conf.setenv('default') _check_python_headers(conf, mandatory) conf.env["python_headers_checked"] = "yes" if conf.env['EXTRA_PYTHON']: extraversion = conf.all_envs['extrapython']['PYTHON_VERSION'] if extraversion == conf.env['PYTHON_VERSION']: raise Utils.WafError( "extrapython %s is same as main python %s" % (extraversion, conf.env['PYTHON_VERSION'])) else: conf.msg("python headers", "using cache") # we don't want PYTHONDIR in config.h, as otherwise changing # --prefix causes a complete rebuild del (conf.env.defines['PYTHONDIR']) del (conf.env.defines['PYTHONARCHDIR'])
def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True): if conf.env["python_headers_checked"] == []: if conf.env['EXTRA_PYTHON']: conf.setenv('extrapython') _check_python_headers(conf, mandatory=True) conf.setenv('default') _check_python_headers(conf, mandatory) conf.env["python_headers_checked"] = "yes" if conf.env['EXTRA_PYTHON']: extraversion = conf.all_envs['extrapython']['PYTHON_VERSION'] if extraversion == conf.env['PYTHON_VERSION']: raise Utils.WafError("extrapython %s is same as main python %s" % ( extraversion, conf.env['PYTHON_VERSION'])) else: conf.msg("python headers", "using cache")
def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True): if conf.env["python_headers_checked"] == []: conf.check_python_headers(mandatory) conf.env["python_headers_checked"] = "yes" else: conf.msg("python headers", "using cache")