def _check_python_headers(conf, mandatory): conf.check_python_headers(mandatory=mandatory) if conf.env['PYTHON_VERSION'] > '3': abi_pattern = os.path.splitext(conf.env['pyext_PATTERN'])[0] conf.env['PYTHON_SO_ABI_FLAG'] = abi_pattern % '' else: conf.env['PYTHON_SO_ABI_FLAG'] = ''
def _check_python_headers(conf, mandatory): try: Configure.ConfigurationError conf.check_python_headers(mandatory=mandatory) except Configure.ConfigurationError: if mandatory: raise if conf.env['PYTHON_VERSION'] > '3': abi_pattern = os.path.splitext(conf.env['pyext_PATTERN'])[0] conf.env['PYTHON_SO_ABI_FLAG'] = abi_pattern % '' else: conf.env['PYTHON_SO_ABI_FLAG'] = ''
def _check_python_headers(conf, mandatory): try: Configure.ConfigurationError conf.check_python_headers(mandatory=mandatory) except Configure.ConfigurationError: if mandatory: raise if conf.env['PYTHON_VERSION'] > '3': abi_pattern = os.path.splitext(conf.env['pyext_PATTERN'])[0] conf.env['PYTHON_SO_ABI_FLAG'] = abi_pattern % '' else: conf.env['PYTHON_SO_ABI_FLAG'] = '' for lib in conf.env['LINKFLAGS_PYEMBED']: if lib.startswith('-L'): conf.env.append_unique('LIBPATH_PYEMBED', lib[2:]) # strip '-L' conf.env['LINKFLAGS_PYEMBED'].remove(lib) return
def _check_python_headers(conf, mandatory): try: Configure.ConfigurationError conf.check_python_headers(mandatory=mandatory) except Configure.ConfigurationError: if mandatory: raise if conf.env['PYTHON_VERSION'] > '3': abi_pattern = os.path.splitext(conf.env['pyext_PATTERN'])[0] conf.env['PYTHON_SO_ABI_FLAG'] = abi_pattern % '' else: conf.env['PYTHON_SO_ABI_FLAG'] = '' conf.env['PYTHON_LIBNAME_SO_ABI_FLAG'] = ( conf.env['PYTHON_SO_ABI_FLAG'].replace('_', '-')) for lib in conf.env['LINKFLAGS_PYEMBED']: if lib.startswith('-L'): conf.env.append_unique('LIBPATH_PYEMBED', lib[2:]) # strip '-L' conf.env['LINKFLAGS_PYEMBED'].remove(lib) return
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")