本文整理汇总了Python中waflib.Utils.unversioned_sys_platform方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.unversioned_sys_platform方法的具体用法?Python Utils.unversioned_sys_platform怎么用?Python Utils.unversioned_sys_platform使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类waflib.Utils
的用法示例。
在下文中一共展示了Utils.unversioned_sys_platform方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_test_env
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def get_test_env(self):
try:
fu=getattr(self.generator.bld,'all_test_paths')
except AttributeError:
fu=os.environ.copy()
lst=[]
for g in self.generator.bld.groups:
for tg in g:
if getattr(tg,'link_task',None):
s=tg.link_task.outputs[0].parent.abspath()
if s not in lst:
lst.append(s)
if Utils.is_win32:
self.add_path(fu,lst,'PATH')
elif Utils.unversioned_sys_platform()=='darwin':
self.add_path(fu,lst,'DYLD_LIBRARY_PATH')
self.add_path(fu,lst,'LD_LIBRARY_PATH')
else:
self.add_path(fu,lst,'LD_LIBRARY_PATH')
self.generator.bld.all_test_paths=fu
return fu
示例2: d_platform_flags
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def d_platform_flags(self):
v=self.env
if not v.DEST_OS:
v.DEST_OS=Utils.unversioned_sys_platform()
binfmt=Utils.destos_to_binfmt(self.env.DEST_OS)
if binfmt=='pe':
v['dprogram_PATTERN']='%s.exe'
v['dshlib_PATTERN']='lib%s.dll'
v['dstlib_PATTERN']='lib%s.a'
elif binfmt=='mac-o':
v['dprogram_PATTERN']='%s'
v['dshlib_PATTERN']='lib%s.dylib'
v['dstlib_PATTERN']='lib%s.a'
else:
v['dprogram_PATTERN']='%s'
v['dshlib_PATTERN']='lib%s.so'
v['dstlib_PATTERN']='lib%s.a'
示例3: boost_get_toolset
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def boost_get_toolset(self, cc):
toolset = cc
if not cc:
build_platform = Utils.unversioned_sys_platform()
if build_platform in BOOST_TOOLSETS:
cc = build_platform
else:
cc = self.env.CXX_NAME
if cc in BOOST_TOOLSETS:
toolset = BOOST_TOOLSETS[cc]
return isinstance(toolset, str) and toolset or toolset(self.env)
示例4: default_compilers
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def default_compilers():
build_platform=Utils.unversioned_sys_platform()
possible_compiler_list=d_compiler.get(build_platform,d_compiler['default'])
return' '.join(possible_compiler_list)
示例5: gfortran_modifier_platform
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def gfortran_modifier_platform(conf):
dest_os=conf.env['DEST_OS']or Utils.unversioned_sys_platform()
gfortran_modifier_func=getattr(conf,'gfortran_modifier_'+dest_os,None)
if gfortran_modifier_func:
gfortran_modifier_func()
示例6: default_compilers
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def default_compilers():
build_platform=Utils.unversioned_sys_platform()
possible_compiler_list=fc_compiler.get(build_platform,fc_compiler['default'])
return' '.join(possible_compiler_list)
示例7: set_bundle
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def set_bundle(self):
if Utils.unversioned_sys_platform()=='darwin':
self.mac_bundle=True
示例8: cc_load_tools
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def cc_load_tools(conf):
if not conf.env.DEST_OS:
conf.env.DEST_OS=Utils.unversioned_sys_platform()
conf.load('c')
示例9: cxx_load_tools
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def cxx_load_tools(conf):
if not conf.env.DEST_OS:
conf.env.DEST_OS=Utils.unversioned_sys_platform()
conf.load('cxx')
示例10: g95_modifier_platform
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def g95_modifier_platform(conf):
dest_os=conf.env['DEST_OS']or Utils.unversioned_sys_platform()
g95_modifier_func=getattr(conf,'g95_modifier_'+dest_os,None)
if g95_modifier_func:
g95_modifier_func()
示例11: default_compilers
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def default_compilers():
build_platform=Utils.unversioned_sys_platform()
possible_compiler_list=cxx_compiler.get(build_platform,cxx_compiler['default'])
return' '.join(possible_compiler_list)
示例12: ifort_modifier_platform
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def ifort_modifier_platform(conf):
dest_os=conf.env['DEST_OS']or Utils.unversioned_sys_platform()
ifort_modifier_func=getattr(conf,'ifort_modifier_'+dest_os,None)
if ifort_modifier_func:
ifort_modifier_func()
示例13: set_macosx_deployment_target
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def set_macosx_deployment_target(self):
if self.env['MACOSX_DEPLOYMENT_TARGET']:
os.environ['MACOSX_DEPLOYMENT_TARGET']=self.env['MACOSX_DEPLOYMENT_TARGET']
elif'MACOSX_DEPLOYMENT_TARGET'not in os.environ:
if Utils.unversioned_sys_platform()=='darwin':
os.environ['MACOSX_DEPLOYMENT_TARGET']='.'.join(platform.mac_ver()[0].split('.')[:2])
示例14: set_bundle
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def set_bundle(self):
if Utils.unversioned_sys_platform() == 'darwin':
self.mac_bundle = True
示例15: default_compilers
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import unversioned_sys_platform [as 别名]
def default_compilers():
build_platform=Utils.unversioned_sys_platform()
possible_compiler_list=c_compiler.get(build_platform,c_compiler['default'])
return' '.join(possible_compiler_list)