def testOffline(self): """ Tests if install from the dowload-cache works. """ testing.write(self.tempdir, 'buildout.cfg', """ [buildout] parts = gittest download-cache = %(cache)s [gittest] recipe = zerokspot.recipe.git repository = %(repo)s """ % {'repo' : self.temprepo, 'cache': self.tempcache}) # First install as usual build = self._buildout() self.assertFalse(build['gittest'].recipe.installed_from_cache) # clear buildout os.unlink(os.path.join(build['buildout']['directory'], '.installed.cfg')) testing.rmdir(build['buildout']['directory'], 'parts') # now install from cache build = self._buildout([('buildout', 'install-from-cache', 'true')]) self.assertTrue(build['gittest'].recipe.installed_from_cache) build = self._buildout([('buildout', 'install-from-cache', 'true')])
def testOffline(self): """ Tests if install from the dowload-cache works. """ testing.write(self.tempdir, 'buildout.cfg', """ [buildout] parts = gittest download-cache = %(cache)s [gittest] recipe = zerokspot.recipe.git repository = %(repo)s """ % {'repo': self.temprepo, 'cache': self.tempcache}) # First install as usual build = self._buildout() self.assertFalse(build['gittest'].recipe.installed_from_cache) # clear buildout os.unlink(os.path.join(build['buildout']['directory'], '.installed.cfg')) testing.rmdir(build['buildout']['directory'], 'parts') # now install from cache build = self._buildout([('buildout', 'install-from-cache', 'true')]) self.assertTrue(build['gittest'].recipe.installed_from_cache) build = self._buildout([('buildout', 'install-from-cache', 'true')])
def testOffline(self): """ Tests if install from the dowload-cache works. """ testing.write( self.tempdir, "buildout.cfg", """ [buildout] parts = gittest download-cache = %(cache)s [gittest] recipe = zerokspot.recipe.git repository = %(repo)s """ % {"repo": self.temprepo, "cache": self.tempcache}, ) # First install as usual build = self._buildout() self.assertFalse(build["gittest"].recipe.installed_from_cache) # clear buildout os.unlink(os.path.join(build["buildout"]["directory"], ".installed.cfg")) testing.rmdir(build["buildout"]["directory"], "parts") # now install from cache build = self._buildout([("buildout", "install-from-cache", "true")]) self.assertTrue(build["gittest"].recipe.installed_from_cache)
def install_projects(projects, target_dir): links = [] for project in projects: project_dir = os.path.join(projects_dir, project) dist_dir = os.path.join(project_dir, 'dist') if os.path.isdir(dist_dir): testing.rmdir(dist_dir) dummy = testing.system("%s setup %s bdist_egg" % ( os.path.join('bin', 'buildout'), project_dir)) links.append(dist_dir) new_working_set = install(projects, target_dir, links=links, working_set=working_set) # we must perform a magical incantation on each distribution for dist in new_working_set: dist.activate() return new_working_set
def install_projects(projects, target_dir): links = [] for project in projects: project_dir = os.path.join(projects_dir, project) dist_dir = os.path.join(project_dir, 'dist') if os.path.isdir(dist_dir): testing.rmdir(dist_dir) dummy = testing.system("%s setup %s bdist_egg" % (os.path.join('bin', 'buildout'), project_dir)) links.append(dist_dir) new_working_set = install(projects, target_dir, links=links, working_set=working_set) # we must perform a magical incantation on each distribution for dist in new_working_set: dist.activate() return new_working_set
def tearDown(self): testing.rmdir(self.tempdir) testing.rmdir(self.tempcache) testing.rmdir(self.temprepos)
def tearDown(self): testing.rmdir(self.temprepo) testing.rmdir(self.projectdir)