예제 #1
0
    def complete(self):
        self.clean()
        for dat in self._staged:
            if dat[0] in ['doc', 'sample']:
                ddir = os.path.join(self.stagedir, dat[0], self.name)
            else:
                ddir = os.path.join(self.stagedir, dat[0])
            mkdir(ddir)
            for f in dat[1]:
                if not os.path.isabs(f):
                    f = os.path.join(self.basedir, f)
                if f.endswith('/'):
                    copyinto(f[:-1], ddir, ignore=dat[2])
                else:
                    copy(f, ddir, ignore=dat[2])

        self.completed = True

        # Save the details for the next run to avoid redoing it all
        vals = {}
        for key, val in self.__dict__.items():
            if val is not None and not key.startswith('_'):
                vals[key] = val

        savefile(self.stagefile, json.dumps(vals))
예제 #2
0
    def get(self):
        mkdir(os.path.dirname(self.path))
        rmfile(self.path)

        data = _getremotedata(self.url)
        with open(self.path, "wb") as local:
            local.write(data)
예제 #3
0
 def unpack(self):
     rmdir(self.pkgroot)
     mkdir(self.pkgroot)
     unpack_file(self._pkg.path, self.pkgroot)
     udir = os.path.join(self.pkgroot, self._dirname)
     for stg in self.staged:
         stg.basedir = udir
예제 #4
0
    def unpack(self):
        pypi = PyPIMetadata(self.__PKGNAME)
        self.setversion(pypi.version)

        rmdir(self.pkgroot)
        mkdir(self.pkgroot)
        pipinstall('%s==%s' % (self.__PKGNAME, pypi.version), self.pkgroot)
예제 #5
0
 def unpack(self):
     rmdir(self.pkgroot)
     mkdir(self.pkgroot)
     copy(self._hib3.path,
          os.path.join(self.pkgroot, 'nuodb-hibernate-hib3.jar'))
     copy(self._hib5.path,
          os.path.join(self.pkgroot, 'nuodb-hibernate-hib5.jar'))
     savefile(os.path.join(self.pkgroot, 'LICENSE.txt'),
              self.getlicense('3BSD'))
예제 #6
0
 def _clone(self):
     # Don't keep around any half-completed repos
     rmdir(self.path)
     mkdir(os.path.dirname(self.path))
     run([self._git, 'clone', '--recursive', self.url, self.path])
예제 #7
0
파일: jdbc.py 프로젝트: nuodb/nuodb-client
 def unpack(self):
     rmdir(self.pkgroot)
     mkdir(self.pkgroot)
     copy(self._jar.path, self.pkgroot)
     savefile(os.path.join(self.pkgroot, 'LICENSE.txt'),
              self.getlicense('3BSD'))
예제 #8
0
 def unpack(self):
     rmdir(self.pkgroot)
     mkdir(self.pkgroot)
     unpack_file(self._zip.path, self.pkgroot)