Ejemplo n.º 1
0
Archivo: core.py Proyecto: Malex/pyg
    def install(self):
        '''
        Install a binary package. Simply run it and hope it works...
        (Still experimental.)
        '''

        with TempDir() as tempdir:
            filename = 'pyg-installer' + self.ext
            installer = os.path.join(tempdir, filename)
            with open(installer, 'w') as i:
                i.write(self.fobj.getvalue())
                call_subprocess(['./' + filename], cwd=tempdir)
Ejemplo n.º 2
0
Archivo: base.py Proyecto: Malex/pyg
 def call_cmd(self, args):
     ## Ensure that the destination directory exists
     self.check_dest()
     if self.ARGS is not None:
         args = self.ARGS + args
     logger.info('Copying data from {0} to {1}', self.url, self.dest)
     return call_subprocess([self.cmd, self.method] + args, cwd=self.dest)