当前位置: 首页>>代码示例>>Python>>正文


Python SCons.Warnings类代码示例

本文整理汇总了Python中SCons.Warnings的典型用法代码示例。如果您正苦于以下问题:Python Warnings类的具体用法?Python Warnings怎么用?Python Warnings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Warnings类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: RCSFactory

    def RCSFactory(env=env):
        """ """
        import SCons.Warnings as W

        W.warn(W.DeprecatedSourceCodeWarning, """The RCS() factory is deprecated and there is no replacement.""")
        act = SCons.Action.Action("$RCS_COCOM", "$RCS_COCOMSTR")
        return SCons.Builder.Builder(action=act, env=env)
开发者ID:ckrisgarrett,项目名称:closures-2d,代码行数:7,代码来源:RCS.py

示例2: SubversionFactory

    def SubversionFactory(repos, module="", env=env):
        """ """
        # fail if repos is not an absolute path name?
        import SCons.Warnings as W

        W.warn(W.DeprecatedSourceCodeWarning, """The Subversion() factory is deprecated and there is no replacement.""")
        if module != "":
            module = os.path.join(module, "")
        act = SCons.Action.Action("$SVNCOM", "$SVNCOMSTR")
        return SCons.Builder.Builder(action=act, env=env, SVNREPOSITORY=repos, SVNMODULE=module)
开发者ID:IljaGrebel,项目名称:OpenWrt-SDK-imx6_HummingBoard,代码行数:10,代码来源:Subversion.py

示例3: CVSFactory

    def CVSFactory(repos, module="", env=env):
        """ """
        import SCons.Warnings as W

        W.warn(W.DeprecatedSourceCodeWarning, """The CVS() factory is deprecated and there is no replacement.""")
        # fail if repos is not an absolute path name?
        if module != "":
            # Don't use os.path.join() because the name we fetch might
            # be across a network and must use POSIX slashes as separators.
            module = module + "/"
            env["CVSCOM"] = "$CVS $CVSFLAGS co $CVSCOFLAGS -d ${TARGET.dir} $CVSMODULE${TARGET.posix}"
        act = SCons.Action.Action("$CVSCOM", "$CVSCOMSTR")
        return SCons.Builder.Builder(action=act, env=env, CVSREPOSITORY=repos, CVSMODULE=module)
开发者ID:lijenpan,项目名称:mapnik,代码行数:13,代码来源:CVS.py

示例4: PerforceFactory

 def PerforceFactory(env=env):
     """ """
     import SCons.Warnings as W
     W.warn(W.DeprecatedSourceCodeWarning, """The Perforce() factory is deprecated and there is no replacement.""")
     return SCons.Builder.Builder(action = PerforceAction, env = env)
开发者ID:IljaGrebel,项目名称:OpenWrt-SDK-imx6_HummingBoard,代码行数:5,代码来源:Perforce.py

示例5: SCCSFactory

 def SCCSFactory(env=env):
     """ """
     import SCons.Warnings as W
     W.warn(W.DeprecatedSourceCodeWarning, """The SCCS() factory is deprecated and there is no replacement.""")
     act = SCons.Action.Action('$SCCSCOM', '$SCCSCOMSTR')
     return SCons.Builder.Builder(action = act, env = env)
开发者ID:601040605,项目名称:Nuitka,代码行数:6,代码来源:SCCS.py

示例6: download

def download(url, filename):
   if os.path.exists(filename):
      C.progress_display('Package already downloaded')
      return True

   try:
      urllib.urlretrieve(url, filename)
      return True
   except IOError as e:
      # In Python 2.x, 'urlretrieve' raises IOError upon HTTP errors,
      # except for some errors such as 404.  Oh well.
      W.warn(AltaDependencyWarning,
             "{0}: download failed: {1}".format(url, e.strerror))
      return False
开发者ID:belcour,项目名称:alta,代码行数:14,代码来源:obtain.py

示例7: cmake_build

def cmake_build(rep, options = ''):

   os.chdir(rep)

   # Construct the CMake command
   build_dir = os.pardir + os.sep + 'build' + os.sep
   cmake_cmd = ['cmake', '-DBUILD_SHARED_LIBS=OFF',
                '-DCMAKE_INSTALL_PREFIX=' + build_dir,
                '-DCMAKE_BUILD_TYPE=Release']
   if os.name == 'nt' :
      cmake_cmd = cmake_cmd + ['-G', 'NMake Makefiles']

   try:
      ret = Popen(cmake_cmd + options.split() + ['.']).wait()
      if ret != 0:
         C.progress_display('Warning: unable to configure package' + rep)
         os.chdir(os.pardir)
         return False
   except OSError as e:
      W.warn(AltaDependencyWarning, "execution of '{0}' failed: {1}".format(cmake_cmd, e.strerror))
      os.chdir(os.pardir)
      return False

   # Construct the build command and run it
   build_cmd = []
   if os.name == 'nt':
      build_cmd = build_cmd + ['nmake']
   else:
      build_cmd = build_cmd + ['make']

   ret = Popen(build_cmd + ['install']).wait()
   if ret != 0:
      C.progress_display('Warning: unable to build & install package ' + rep)
      os.chdir(os.pardir)
      return False

   os.chdir(os.pardir)
   return True
开发者ID:belcour,项目名称:alta,代码行数:38,代码来源:obtain.py


注:本文中的SCons.Warnings类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。