Ejemplo n.º 1
0
 def _clean(self):
     # Cleaning in Tools is done explicitly in rbuild script
     # and do not want it run a second time and complaining.
     if not 'Tools' in os.getcwd(): # i.e. in 3rdParty and Code
         if os.path.exists("setup.py"):
             utils.run("%s setup.py clean" % self._pycmd)
     Builder._clean(self)
Ejemplo n.º 2
0
 def _clean(self):
     # Cleaning in Tools is done explicitly in rbuild script
     # and do not want it run a second time and complaining.
     if not utils.in_tools_tree():
         if os.path.exists("setup.py"):
             utils.run("%s setup.py clean" % self._pycmd)
     Builder._clean(self)
Ejemplo n.º 3
0
 def _clean(self):
     # Cleaning in Tools is done explicitly in rbuild script
     # and do not want it run a second time and complaining.
     if not 'Tools' in os.getcwd():  # i.e. in 3rdParty and Code
         if os.path.exists("setup.py"):
             utils.run("%s setup.py clean" % self._pycmd)
     Builder._clean(self)
Ejemplo n.º 4
0
 def _clean(self):
     if os.path.exists(self._package):
         curdir = os.path.abspath(os.curdir)
         # Enter the untarred package directory
         os.chdir(self._package)
         if os.path.exists('Makefile'):
             utils.run("make clean")
         os.chdir(curdir)
     # Delete the reminder of the directories
     Builder._clean(self)
Ejemplo n.º 5
0
Archivo: qt.py Proyecto: ATNF/askapsdp
 def _clean(self):
     if os.path.exists(self._package):
         curdir = os.path.abspath(os.curdir)
         # Enter the untarred package directory
         os.chdir(self._package)
         if os.path.exists('Makefile'):
             utils.run("make clean")
         os.chdir(curdir)
     # Delete the reminder of the directories
     Builder._clean(self)
Ejemplo n.º 6
0
    def _clean(self):
        if utils.in_code_tree() and os.path.exists('setup.py'):
            utils.run("python setup.py clean")

        # Bug #2803
        # An ASKAP/EPICS application (pkgname == '.') usually has a configure
        # directory in the root directory
        # as opposed to EPICS base and some support modules where the tarball
        # gets expanded in the pkgname directory.
        # This feature affects the way the package gets cleaned in order to
        # support idempotent cleaning command.
        # In case of ASKAP/EPICS applications, we need to check whether EPICS
        # base configure directory exists, otherwise
        # we cannot execute 'make clean' command. If epics base configure
        # directory exists, a RELEASE.<architecture> file
        # must exist in the configure directory in order to locate epics base
        # configure directory for the make command
        # to work correctly.
        if self._package == '.':
            if self._epicsbase_configure_exists():
                # RELEASE.<arch> must exists in order to run make clean.
                # This prevents an error when running clean when the package
                # has already been cleaned.
                self._create_releasefile()
                if not os.path.exists(self._deps_file):
                    open(self._deps_file, 'w').write("")
                shutil.copy(self._releasefile,
                            os.path.join(self._package, "configure"))
                if self._oldreleasefile is not None:
                    shutil.copy(
                        self._releasefile,
                        os.path.join(self._package, "configure",
                                     self._oldreleasefile))
                curdir = os.path.abspath(os.curdir)
                # Enter the untarred package directory
                os.chdir(self._package)
                utils.run("make clean uninstall")
                os.chdir(curdir)
            else:
                utils.q_print(
                    "WARNING: EPICS base configure directory does "
                    "not exists (required by 'make clean'). "
                    "Some temporary files inside the package will not"
                    "be removed. Build EPICS base and re-run clean "
                    "target or delete temporary files manually.")
        # Execute base class method, which removes install directory and
        # additional clean targets
        Builder._clean(self)
Ejemplo n.º 7
0
    def _clean(self):
        if utils.in_code_tree() and os.path.exists('setup.py'):
            utils.run("python setup.py clean")

        # Bug #2803
        # An ASKAP/EPICS application (pkgname == '.') usually has a configure 
        # directory in the root directory
        # as opposed to EPICS base and some support modules where the tarball 
        # gets expanded in the pkgname directory.
        # This feature affects the way the package gets cleaned in order to 
        # support idempotent cleaning command.
        # In case of ASKAP/EPICS applications, we need to check whether EPICS 
        # base configure directory exists, otherwise
        # we cannot execute 'make clean' command. If epics base configure 
        # directory exists, a RELEASE.<architecture> file
        # must exist in the configure directory in order to locate epics base 
        # configure directory for the make command
        # to work correctly.
        if self._package == '.':
            if self._epicsbase_configure_exists():
                # RELEASE.<arch> must exists in order to run make clean. 
                # This prevents an error when running clean when the package 
                # has already been cleaned.
                self._create_releasefile()
                if not os.path.exists(self._deps_file):
                    open(self._deps_file, 'w').write("")
                shutil.copy(self._releasefile, 
                            os.path.join(self._package, "configure"))
                if self._oldreleasefile is not None:
                    shutil.copy(self._releasefile, 
                                os.path.join(self._package, 
                                             "configure", self._oldreleasefile))
                curdir = os.path.abspath(os.curdir)
                # Enter the untarred package directory
                os.chdir(self._package)
                utils.run("make clean uninstall")
                os.chdir(curdir)
            else:
                utils.q_print("WARNING: EPICS base configure directory does not ""exists (required by 'make clean'). Some temporary files inside the package will not be removed. Build EPICS base and re-run clean target or delete temporary files manually.")
        # Execute base class method, which removes install directory and 
        # additional clean targets
        Builder._clean(self)
Ejemplo n.º 8
0
class Scons(Builder):
    ## The constructor sets up a package build "environment"
    #  @param self           The current object
    #  @param pkgname the name of the package directory. By default the
    #  current directories (tag) name is used
    #  @param archivename an optional alternate tarball name
    #  if it minus suffix (e.g. .tar.gz) differs from the pkgname
    #  @param extractdir if the tarball extracts to the current directory
    #  rather than a subdirectory, set this so a subdirectory is created
    #  and the tarball extracts into this subdirectory.
    #  @param sconsversion (optional) version of scons to use. If not
    #  specified, to use the default 'scons' defined by the build system.
    def __init__(self,
                 pkgname=None,
                 archivename=None,
                 extractdir=None,
                 sconsversion=None):
        Builder.__init__(self,
                         pkgname=pkgname,
                         archivename=archivename,
                         extractdir=extractdir)
        self.sconsversion = sconsversion

    def _build(self):
        pass

    def _testtgt(self, tgt):
        utils.run_scons(extraargs=tgt, version=self.sconsversion)

    def _test(self):
        if os.path.exists("tests"):
            self._testtgt("tests")
        else:
            print "error: Cannot run tests as the tests subdirectory is "\
                  "missing: %s" % os.path.join(self._bdir, "tests")

    def _functest(self):
        if os.path.exists("functests"):
            self._testtgt("functest")
            Builder._functest(self)
        else:
            print "error: missing functests subdirectory in %s" % \
                    os.path.relpath(self._bdir, self._askaproot)

    def _doc(self):
        utils.run_scons(version=self.sconsversion)

    def _clean(self):
        try:
            utils.run_scons(extraargs="--clean . tidy",
                            version=self.sconsversion)
        except Exception, inst:
            utils.q_print("info: could not run %s. Will try our clean." % inst)
        return Builder._clean(self)
Ejemplo n.º 9
0
 def _clean(self):
     if utils.in_code_tree():
         utils.run("%s %s clean" % (self._icom, self._opts))
     Builder._clean(self)
Ejemplo n.º 10
0
Archivo: ant.py Proyecto: ATNF/askapsdp
 def _clean(self):
     if utils.in_code_tree():
         utils.run("%s %s clean" % (self._icom, self._opts))
     Builder._clean(self)
Ejemplo n.º 11
0
 def _clean(self):
     Builder._clean(self)