Example #1
0
 def build(self):
     stream_logger.info('Building...')
     if not os.path.exists(os.path.join(self.src_dir, self.archive_name)):
         os.system('wget %s' % self.url)
     else:
         if get_md5(os.path.join(self.src_dir, self.archive_name)) != self.md5:
             os.system('wget %s' % self.url)
     rmtree(self.dir_name)
     os.system('tar xvf %s' % self.archive_name)
Example #2
0
 def build(self):
     stream_logger.info('Building...')
     if not os.path.exists(os.path.join(self.src_dir, self.archive_name)):
         os.system('wget %s' % self.url)
     else:
         if get_md5(os.path.join(self.src_dir,
                                 self.archive_name)) != self.md5:
             os.system('wget %s' % self.url)
     rmtree(self.dir_name)
     os.system('tar xvf %s' % self.archive_name)
Example #3
0
    def build(self):
        stream_logger.info('=> Building...')
        os.chdir(self.src_dir)
        if not os.path.exists(self.archive_name):
            stream_logger.info('=> Downloading %s' % self.archive_name)
            os.system('wget http://www.python.org/ftp/python/%s/%s' % (self.version, self.archive_name))
        elif get_md5(self.archive_name) != self.archive_md5:
            stream_logger.info('!! Invalid archive md5')
            os.remove(self.archive_name)
            stream_logger.info('=> Downloading %s' % self.archive_name)
            os.system('wget http://www.python.org/ftp/python/%s/%s' % (self.version, self.archive_name))

        if os.path.exists(self.dir_name):
            stream_logger.info('=> Clean old builds')
            shutil.rmtree(self.dir_name)
        stream_logger.info('=> Extract archive')
        os.system('tar xvf %s' % self.archive_name)
        os.chdir(self.dir_name)
        os.system('./configure --prefix=/usr/local/ubik')
        os.system('make')