def setUp(self): c = Chain(verbose=0) for fn in ['index-add.txt', 'index-5.1.txt', 'index-5.0.txt']: repo = "{0}/".format(path_to_uri(HERE_DIR)) c.add_repo(repo, fn) self.c = c
def setUp(self): c = Chain(verbose=0) for fn in ['index-add.txt', 'index-5.1.txt', 'index-5.0.txt']: repo = "{0}/".format(path_to_uri(HERE_DIR)) c.add_repo(repo, fn) self.c = c
def setUp(self): repos = {} c = Chain(verbose=0) for name in 'open', 'runner', 'epd': repo = "{0}/".format(path_to_uri(posixpath.join(HERE_DIR, name))) c.add_repo(repo, 'index-7.1.txt') repos[name] = repo self.c = c self.repos = repos
def setUp(self): repos = {} c = Chain(verbose=0) for name in 'open', 'runner', 'epd': repo = "{0}/".format(path_to_uri(posixpath.join(HERE_DIR, name))) c.add_repo(repo, 'index-7.1.txt') repos[name] = repo self.c = c self.repos = repos
def setUp(self): repos = {None: None} c = Chain(verbose=0) for name in 'epd', 'gpl': # XXX: relying on having a '/' is horrible, but that assumption is made # in enough places through the code that we don't want to change it. repo = "{0}/".format(path_to_uri(posixpath.join(HERE_DIR, name))) c.add_repo(repo, 'index-7.1.txt') repos[name] = repo self.c = c self.repos = repos
def setUp(self): repos = {None: None} c = Chain(verbose=0) for name in 'epd', 'gpl': # XXX: relying on having a '/' is horrible, but that assumption is made # in enough places through the code that we don't want to change it. repo = "{0}/".format(path_to_uri(posixpath.join(HERE_DIR, name))) c.add_repo(repo, 'index-7.1.txt') repos[name] = repo self.c = c self.repos = repos
import sys from os.path import abspath, dirname from enstaller.indexed_repo import Chain from enstaller.indexed_repo.requirement import Req def show(dists): if dists is None: print 'none' return for d in dists: print d print c = Chain(verbose=1) for name in ('runner', 'epd'): repo = 'file://%s/%s/' % (abspath(dirname(__file__)), name) c.add_repo(repo, 'index-7.1.txt') req = Req(' '.join(sys.argv[1:])) show(c.install_sequence(req, 'flat'))
import os import hashlib from enstaller.indexed_repo import Chain, Req, filename_dist, dist_as_req import enstaller.indexed_repo.requirement as requirement c = Chain(verbose=0) for fn in ['index-5.1.txt', 'index-5.0.txt']: c.add_repo('file://%s/' % os.getcwd(), fn) requirement.PY_VER = '2.5' h = hashlib.new('md5') # This is quite expensive and takes about 2.3 seconds on my 2GHz MacBock for dist in c.install_order(Req('epd 5.1.0')): for d in c.install_order(dist_as_req(dist)): h.update(filename_dist(d)) assert h.hexdigest() == '1d0c258f0e5d73d1a386278f90db2d34'
import os from enstaller.indexed_repo import Chain, Req, filename_dist import enstaller.indexed_repo.requirement as requirement cwd = os.getcwd() c = Chain(verbose=0) for fn in ['index-add.txt', 'index-5.1.txt', 'index-5.0.txt']: c.add_repo('file://%s/' % cwd, fn) def test_req(req, expected): got = [filename_dist(d) for d in c.install_order(req, True)] if expected != got: print repr(req) print "Expected:", expected print "Got:", got def test_list_version(name, expected): got = c.list_versions(name) if expected != got: print "Expected:", expected print "Got:", got # ----- requirement.PY_VER = '2.5' test_req(Req('SciPy 0.8.0.dev5698'), [ 'freetype-2.3.7-1.egg', 'libjpeg-7.0-1.egg', 'numpy-1.3.0-1.egg',