Ejemplo n.º 1
0
    def _patch_buildout(self):
        options = self.buildout['buildout']
        working_set = easy_install.working_set(['Cython'], sys.executable,
                                               [options['eggs-directory']])
        cython_req = pkg_resources.Requirement.parse('Cython')
        cython = working_set.find(cython_req).location

        easy_install.develop = cython_patch(cython, easy_install.develop)
Ejemplo n.º 2
0
    def _patch_buildout(self):
        options = self.buildout['buildout']
        working_set = easy_install.working_set(['Cython'],
                                               [options['eggs-directory']])
        cython_req = pkg_resources.Requirement.parse('Cython')
        cython = working_set.find(cython_req).location

        easy_install.develop = cython_patch(cython, easy_install.develop)
Ejemplo n.º 3
0
    def make_wrapper(self):
        path = self.buildout["buildout"]["bin-directory"]
        egg_paths = [
            self.buildout["buildout"]["develop-eggs-directory"],
            self.buildout["buildout"]["eggs-directory"],
            ]
        arguments = "'%s'" % self.ininame

        ws = easy_install.working_set(["isotoma.recipe.pound"], sys.executable, egg_paths)
        easy_install.scripts([(self.name, "isotoma.recipe.pound.cyclescript", "execute")], ws, sys.executable, path, arguments=arguments)
        self.options.created(os.path.join(path, self.name))
Ejemplo n.º 4
0
    def install(self):
        path = self.buildout["buildout"]["bin-directory"]
        egg_paths = [
            self.buildout["buildout"]["develop-eggs-directory"],
            self.buildout["buildout"]["eggs-directory"],
            ]

        ws = easy_install.working_set(["isotoma.recipe.apache"], sys.executable, egg_paths)
        easy_install.scripts([(self.name, "isotoma.recipe.apache.logfilter", "main")], ws, sys.executable, path)

        self.installed.append(os.path.join(path, self.name))

        return self.installed
Ejemplo n.º 5
0
    def install(self):
        pybin = self.buildout["buildout"]["executable"]
        bindir = self.buildout['buildout']['bin-directory']
        partsdir = os.path.join(self.buildout['buildout']['parts-directory'], self.name)
        cfg = os.path.join(partsdir, "cluster.cfg")

        if not os.path.exists(partsdir):
            os.makedirs(partsdir)

        services = []
        for s in self.options["services"].strip().split():
            s = s.strip()
            if s:
                services.append(s)

        config = ConfigParser.RawConfigParser()

        config.add_section('cluster')
        config.set('cluster', 'services', ' '.join(services))
        config.set('cluster', 'name', self.name)
        config.set('cluster', 'bindir', bindir)
        config.set('cluster', 'varrundir', self.options["varrun-directory"])
        config.set('cluster', 'user', self.options.get("force-user", "root"))
        config.set('cluster', 'owner', self.options.get("owner", "root"))

        for s in services:
            config.add_section(s)
            config.set(s, "name", s)

            part = self.buildout[s]
            for key, value in part.items():
                config.set(s, key, value)

        config.write(open(cfg, 'wb'))

        ws = easy_install.working_set(
            ["isotoma.recipe.cluster"], pybin,
            [self.buildout["buildout"]['develop-eggs-directory'], self.buildout['buildout']['eggs-directory']])

        scripts = easy_install.scripts(
            [(self.name, "isotoma.recipe.cluster.ctl", "main")],
            ws, pybin, bindir, arguments='"%s"' % cfg,
            initialization=self.options.get("preamble", ""))

        return [os.path.join(bindir, self.name), cfg]
Ejemplo n.º 6
0
    def wrapper(self, postfix, module, call):
        scriptname = self.name + postfix
        bin_directory = self.buildout['buildout']['bin-directory']

        egg_paths = [
            self.buildout["buildout"]["develop-eggs-directory"],
            self.buildout["buildout"]["eggs-directory"],
            ]

        module = "badgerproxy.scripts." + module

        working_set = easy_install.working_set(["badgerproxy"], sys.executable, egg_paths)

        arguments = "'%s'" % self.options['systemconf']

        easy_install.scripts(
            [(scriptname, module, call)],
            working_set,
            sys.executable,
            bin_directory,
            arguments=arguments)

        self.options.created(os.path.join(bin_directory, scriptname))