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


Python EmergeDebug.die方法代码示例

本文整理汇总了Python中EmergeDebug.die方法的典型用法代码示例。如果您正苦于以下问题:Python EmergeDebug.die方法的具体用法?Python EmergeDebug.die怎么用?Python EmergeDebug.die使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EmergeDebug的用法示例。



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

示例1: make

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
    def make( self ):
        """implements the make step for cmake projects"""

        self.enterBuildDir()
        utils.prependPath(self.rootdir, self.envPath)

        if self.subinfo.options.cmake.openIDE:
            if compiler.isMSVC2008():
                command = "start %s" % self.__slnFileName()
            elif compiler.isMSVC2010():
                command = "start vcexpress %s" % self.__slnFileName()
        elif self.subinfo.options.cmake.useIDE:
            if compiler.isMSVC2008():
                command = "vcbuild /M1 %s \"%s|WIN32\"" % (self.__slnFileName(), self.buildType())
            elif compiler.isMSVC2015():
                command = "msbuild /maxcpucount %s /t:ALL_BUILD /p:Configuration=\"%s\"" % (self.__slnFileName(), self.buildType())
            elif compiler.isMSVC2010():
                EmergeDebug.die("has to be implemented");
        elif self.subinfo.options.cmake.useCTest:
            # first make clean
            self.system( self.makeProgramm + " clean", "make clean" )
            command = "ctest -M " + "Nightly" + " -T Start -T Update -T Configure -T Build -T Submit"
        else:
            command = ' '.join([self.makeProgramm, self.makeOptions()])


        return self.system( command, "make" )
开发者ID:pgquiles,项目名称:kdewindows-emerge,代码行数:29,代码来源:CMakeBuildSystem.py


示例2: PackagerFactory

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
def PackagerFactory(parent, packagerType):
    """provides multi packager type api
    return PackagerBase derived instance for recent settings"""
    EmergeDebug.debug("PackagerFactory called", 2)
    packagers = []

    if packagerType:
        for packagerClass in packagerType:
            if not issubclass(packagerClass, PackagerBase):
                EmergeDebug.die("PackagerFactory: unsupported packager %s" % packagerClass)
            else:
                packager = packagerClass()
                init(packager, parent)
                packagers.append(packager)
    else:
        # automatic detection
        packager = InnoSetupPackager()
        init(packager, parent)

        if packager.configFile() != None:
            packagers.append(packager)

        # default packager
        if len(packagers) == 0:
            packager = KDEWinPackager()
            init(packager, parent)
            packagers.append(packager)
    return packagers
开发者ID:TheOneRing,项目名称:emerge,代码行数:30,代码来源:PackagerFactory.py


示例3: __makeFileGenerator

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
 def __makeFileGenerator(self):
     """return cmake related make file generator"""
     if self.supportsNinja and emergeSettings.getboolean("Compile","UseNinja", False):
         return "Ninja"
     if compiler.isMSVC2015():
         if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE:
             return "Visual Studio 14 2015" + " Win64" if compiler.isX64() else ""
         else:
             return "NMake Makefiles"
     if compiler.isMSVC2010():
         if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE:
             return "Visual Studio 10"
         else:
             return "NMake Makefiles"
     elif compiler.isMSVC2008():
         if self.subinfo.options.cmake.useIDE or self.subinfo.options.cmake.openIDE:
             return "Visual Studio 9 2008"
         else:
             return "NMake Makefiles"
     elif compiler.isMSVC() or compiler.isIntel():
         return "NMake Makefiles"
     elif compiler.isMinGW():
         return "MinGW Makefiles"
     else:
         EmergeDebug.die("unknown %s compiler" % self.compiler())
开发者ID:pgquiles,项目名称:kdewindows-emerge,代码行数:27,代码来源:CMakeBuildSystem.py


示例4: SourceFactory

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
def SourceFactory(settings):
    """ return sourceBase derived instance for recent settings"""
    EmergeDebug.trace("SourceFactory called", 1)
    source = None

    if settings.hasTarget():
        if settings.hasMultipleTargets():
            url = settings.targetAt(0)
        else:
            url = settings.target()
        source = ArchiveSource(settings)

    ## \todo move settings access into info class
    if settings.hasSvnTarget():
        url = settings.svnTarget()
        sourceType = utils.getVCSType( url )
        if sourceType == "svn":
            source = SvnSource(settings)
        elif sourceType == "hg":
            source = HgSource(settings)
        elif sourceType == "git":
            source = GitSource(settings)

    if source == None:
        EmergeDebug.die("none or unsupported source system set")
    if not source.subinfo:
        source.subinfo = settings
    source.url = url
    return source
开发者ID:TheOneRing,项目名称:emerge,代码行数:31,代码来源:SourceFactory.py


示例5: inner

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
    def inner(*args, **argv):
        logdir = emergeSettings.get( "General", "EMERGE_LOG_DIR", "" )

        if logdir == "":
            return fn(*args, **argv)

        if os.path.isfile(logdir):
            EmergeDebug.die("EMERGE_LOG_DIR %s is a file" % logdir)

        if not os.path.exists(logdir):
            try:
                os.mkdir(logdir)
            except OSError:
                EmergeDebug.die("EMERGE_LOG_DIR %s can not be created" % logdir)

        logfile = ""
        for a in args:
            logfile += "%s-" % a
        logfile = logfile[:-1]#drop last -
        logfile = "%s.log" % logfile.replace("/","_").replace("\\","_")

        logfile = os.path.join(logdir, logfile)
        f = open(logfile, "at")
        try:
            old_out = sys.stdout
            old_err = sys.stderr
            sys.stdout = f
            sys.stderr = f
            return fn(*args, **argv)
        finally:
            sys.stdout = old_out
            sys.stderr = old_err
            f.close()
开发者ID:pgquiles,项目名称:kdewindows-emerge,代码行数:35,代码来源:utils.py


示例6: embedManifest

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
def embedManifest(executable, manifest):
    '''
       Embed a manifest to an executable using either the free
       kdewin manifest if it exists in dev-utils/bin
       or the one provided by the Microsoft Platform SDK if it
       is installed'
    '''
    if not os.path.isfile(executable) or not os.path.isfile(manifest):
        # We die here because this is a problem with the portage files
        EmergeDebug.die("embedManifest %s or %s do not exist" % (executable, manifest))
    EmergeDebug.debug("embedding ressource manifest %s into %s" % \
          (manifest, executable), 2)
    mtExe = None
    mtExe = os.path.join(EmergeStandardDirs.emergeRoot(), "dev-utils", "bin", "mt.exe")

    if(not os.path.isfile(mtExe)):
        # If there is no free manifest tool installed on the system
        # try to fallback on the manifest tool provided by visual studio
        sdkdir = regQuery("HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows",
            "CurrentInstallFolder")
        if not sdkdir:
            EmergeDebug.debug("embedManifest could not find the Registry Key"
                  " for the Windows SDK", 2)
        else:
            mtExe = r'%s' % os.path.join(sdkdir, "Bin", "mt.exe")
            if not os.path.isfile(os.path.normpath(mtExe)):
                EmergeDebug.debug("embedManifest could not find a mt.exe in\n\t %s" % \
                      os.path.dirname(mtExe), 2)
    if os.path.isfile(mtExe):
        return system([mtExe, "-nologo", "-manifest", manifest,
            "-outputresource:%s;1" % executable])
    else:
        return system(["mt", "-nologo", "-manifest", manifest,
            "-outputresource:%s;1" % executable])
开发者ID:pgquiles,项目名称:kdewindows-emerge,代码行数:36,代码来源:utils.py


示例7: isInstalled

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
 def isInstalled(self):
     if not self._isInstalled:
         self._isInstalled = self.__isInstalled()
         if not self._isInstalled:
             EmergeDebug.die("could not find installed nsis package, "
                        "you can install it using emerge nsis or"
                        "download and install it from "
                        "http://sourceforge.net/projects/nsis/")
开发者ID:pgquiles,项目名称:kdewindows-emerge,代码行数:10,代码来源:NullsoftInstallerPackager.py


示例8: unpack

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
    def unpack(self):
        if not CMakePackageBase.unpack(self):
            return False
        # Check whether compiler is mingw or not...
        if self.compiler() != "mingw" and self.compiler() != "mingw4":
            EmergeDebug.die("This package is currently only compiled with mingw.")

        return True
开发者ID:TheOneRing,项目名称:emerge,代码行数:10,代码来源:dbus-c++.py


示例9: getSimpleCompilerName

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
def getSimpleCompilerName():
    if isMinGW():
        return "mingw64"
    elif isMSVC():
        return "msvc"
    elif isIntel():
        return "intel"
    else:
        EmergeDebug.die("Unknown Compiler %s" % _compiler())
开发者ID:pgquiles,项目名称:kdewindows-emerge,代码行数:11,代码来源:compiler.py


示例10: getCompilerName

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
def getCompilerName():
    if isMinGW():
        return "mingw-w64"
    elif isMSVC():
        return _compiler()
    elif isIntel():
        return "intel-%s-%s" % (os.getenv("TARGET_ARCH"), os.getenv("TARGET_VS"))
    else:
        EmergeDebug.die("Unknown Compiler %s" % _compiler())
开发者ID:pgquiles,项目名称:kdewindows-emerge,代码行数:11,代码来源:compiler.py


示例11: getDirname

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
def getDirname( category, package ):
    """ return absolute pathname for a given category and package """
    subpackage, package = getSubPackage( category, package )
    if category and package:
        if subpackage:
            return os.path.join( rootDirForPackage( category, subpackage ), category, subpackage, package )
        else:
            return os.path.join( rootDirForPackage( category, package ), category, package )
    else:
        EmergeDebug.die("broken category or package %s/%s" % (category, package))
开发者ID:pgquiles,项目名称:kdewindows-emerge,代码行数:12,代码来源:portage.py


示例12: rootDirForCategory

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
def rootDirForCategory( category ):
    """this function should return the portage directory where it finds the first occurance of the category

throws exception if not found
"""
    # this function should return the portage directory where it finds the
    # first occurance of a category or the default value
    for i in rootDirectories():
        if category and os.path.exists( os.path.join( i, category ) ):
            return i
    EmergeDebug.die("can't find category %s" % category)
开发者ID:pgquiles,项目名称:kdewindows-emerge,代码行数:13,代码来源:portage.py


示例13: checkoutDir

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
    def checkoutDir( self, dummyIndex=0 ):
        EmergeDebug.trace("VersionSystemSourceBase checkoutDir", 2)
        if self.subinfo.hasSvnTarget():
            sourcedir = os.path.join(  EmergeStandardDirs.gitDir(), self.package )
        else:
            EmergeDebug.die("svnTarget property not set for this target")

        if self.subinfo.targetSourceSuffix() != None:
            sourcedir = "%s-%s" % (sourcedir, self.subinfo.targetSourceSuffix())

        return os.path.abspath(sourcedir)
开发者ID:pgquiles,项目名称:kdewindows-emerge,代码行数:13,代码来源:VersionSystemSourceBase.py


示例14: __init__

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
 def __init__( self ):
     BuildSystemBase.__init__(self, "qmake")
     self.platform = ""
     if compiler.isMSVC():
         self.platform = "win32-%s" % self.compiler()
     elif compiler.isMinGW():
         self.platform = "win32-g++"
     elif compiler.isIntel():
         self.platform = "win32-icc"
     else:
         EmergeDebug.die("QMakeBuildSystem: unsupported compiler platform %s" % self.compiler())
开发者ID:TheOneRing,项目名称:emerge,代码行数:13,代码来源:QMakeBuildSystem.py


示例15: __init__

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
 def __init__( self, parent=None ):
     self.parent = self
     if parent:
         self.parent = parent
     self.output = False
     self.outFile = None
     self.graphVizInstallPath = None
     if not self.isInstalled():
         utils.system("emerge.bat graphviz")
         if not self.isInstalled():
             EmergeDebug.die("could not find installed graphviz package, you may download and install it from http://www.graphviz.org/Download.php")
开发者ID:TheOneRing,项目名称:emerge,代码行数:13,代码来源:graphviz.py


示例16: cleanDirectory

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
def cleanDirectory( directory ):
    EmergeDebug.debug("clean directory %s" % directory, 1)
    if ( os.path.exists( directory ) ):
        for root, dirs, files in os.walk( directory, topdown=False):
            for name in files:
                if not OsUtils.rm(os.path.join(root, name), True):
                    EmergeDebug.die("couldn't delete file %s\n ( %s )" % (name, os.path.join(root, name)))
            for name in dirs:
                if not OsUtils.rmDir(os.path.join(root, name), True):
                    EmergeDebug.die("couldn't delete directory %s\n( %s )" % (name, os.path.join(root, name)))
    else:
        os.makedirs( directory )
开发者ID:pgquiles,项目名称:kdewindows-emerge,代码行数:14,代码来源:utils.py


示例17: make

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
 def make(self):
     if self.buildTarget == "1_55_0":
         cmd = "build.bat "
         if compiler.isClang():
             cmd += "clang"
         elif compiler.isMinGW():
             cmd += "gcc"
         else:
             if compiler.isMSVC2005():
                 cmd += "vc8"
             elif compiler.isMSVC2008():
                 cmd += "vc9"
             elif compiler.isMSVC2010():
                 cmd += "vc10"
         if EmergeDebug.verbose() >= 1:
             print(cmd)
         utils.system(
             cmd,
             cwd=os.path.join(
                 portage.getPackageInstance("win32libs", "boost-headers").sourceDir(),
                 "tools",
                 "build",
                 "v2",
                 "engine",
             ),
         ) or EmergeDebug.die("command: %s failed" % (cmd))
     else:
         cmd = "bootstrap.bat "
         if compiler.isMinGW():
             cmd += "mingw"
         else:
             if compiler.isMSVC2005():
                 cmd += "vc8"
             elif compiler.isMSVC2008():
                 cmd += "vc9"
             elif compiler.isMSVC2010():
                 cmd += "vc10"
             elif compiler.isMSVC2012():
                 cmd += "vc11"
             elif compiler.isMSVC2013():
                 cmd += "vc12"
             elif compiler.isMSVC2015():
                 cmd += "vc14"
         if EmergeDebug.verbose() >= 1:
             print(cmd)
         utils.system(
             cmd,
             cwd=os.path.join(
                 portage.getPackageInstance("win32libs", "boost-headers").sourceDir(), "tools", "build"
             ),
         ) or EmergeDebug.die("command: %s failed" % (cmd))
     return True
开发者ID:TheOneRing,项目名称:emerge,代码行数:54,代码来源:boost-bjam.py


示例18: createPortablePackage

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
    def createPortablePackage( self ):
        """create portable 7z package with digest files located in the manifest subdir"""

        if not self.packagerExe:
            EmergeDebug.die("could not find 7za in your path!")


        if not "setupname" in self.defines or not self.defines[ "setupname" ]:
            self.defines[ "setupname" ] = self._archiveName("")
        if not "srcdir" in self.defines or not self.defines[ "srcdir" ]:
            self.defines[ "srcdir" ] = self.imageDir()
            

        self._compress(self.defines[ "setupname" ], self.defines[ "srcdir" ], self.packageDestinationDir())
开发者ID:TheOneRing,项目名称:emerge,代码行数:16,代码来源:PortablePackager.py


示例19: __fetchMultipleBranch

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
    def __fetchMultipleBranch(self, repopath=None):
        EmergeDebug.trace("GitSource __fetchMultipleBranch", 2)
        # get the path where the repositories should be stored to
        if repopath == None:
            repopath = self.repositoryUrl()
        EmergeDebug.debug("fetching %s" % repopath)

        # in case you need to move from a read only Url to a writeable one, here it gets replaced
        repopath = repopath.replace("[git]", "")
        repoString = utils.replaceVCSUrl(repopath)
        [repoUrl, repoBranch, repoTag] = utils.splitVCSUrl(repoString)

        ret = True
        # only run if wanted (e.g. no --offline is given on the commandline)
        if not self.noFetch:
            self.setProxy()
            safePath = os.environ["PATH"]
            # add the git path to the PATH variable so that git can be called without path
            os.environ["PATH"] = os.path.join(self.rootdir, "git", "bin") + ";" + safePath
            rootCheckoutDir = os.path.join(self.checkoutDir(), ".git")
            if not os.path.exists(rootCheckoutDir):
                # it doesn't exist so clone the repo
                os.makedirs(rootCheckoutDir)
                ret = self.__git("clone", "--mirror", repoUrl, ".", cwd=rootCheckoutDir)
            else:
                ret = self.__git("fetch", cwd=rootCheckoutDir)
                if not ret:
                    EmergeDebug.die("could not fetch remote data")

            if repoBranch == "":
                repoBranch = "master"
            if ret:
                branchDir = os.path.join(self.checkoutDir(), repoBranch)
                if not os.path.exists(branchDir):
                    os.makedirs(branchDir)
                    ret = self.__git(
                        "clone", "--local --shared -b", repoBranch, rootCheckoutDir, branchDir, cwd=branchDir
                    )
                else:
                    ret = self.__git("pull")
                    if not ret:
                        EmergeDebug.die("could not pull into branch %s" % repoBranch)

            if ret:
                # ret = self.__git('checkout', '-f')
                ret = self.__git("checkout", "-f", repoTag or repoBranch, cwd=branchDir)
        else:
            EmergeDebug.debug("skipping git fetch (--offline)")
        return ret
开发者ID:TheOneRing,项目名称:emerge,代码行数:51,代码来源:GitSource.py


示例20: getShortName

# 需要导入模块: import EmergeDebug [as 别名]
# 或者: from EmergeDebug import die [as 别名]
def getShortName():
    if isMinGW():
        return getCompilerName()
    elif isMSVC2008():
        return "vc90"
    elif isMSVC2010():
        return "vc100"
    elif isMSVC2012():
        return "vc110"
    elif isMSVC2013():
        return "vc120"
    elif isMSVC2015():
        return "vc140"
    else:
        EmergeDebug.die("Unknown Compiler %s" % _compiler())
开发者ID:pgquiles,项目名称:kdewindows-emerge,代码行数:17,代码来源:compiler.py



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