Ejemplo n.º 1
0
def all_mods(top_dir, use_shared_prefix):
    nodes = []
    env_vars = []
    path_dirs = []

    source_base = os.path.join(top_dir, "source")
    if use_shared_prefix:
        base_dir = os.path.join(top_dir, "shared")
        prefix = os.path.join(base_dir, "prefix")
        path_dirs.append(os.path.join(prefix, "bin"))
    else:
        base_dir = os.path.join(top_dir, "split")
        prefix_base = os.path.join(base_dir, "prefixes")

    for mod in mods:
        if not use_shared_prefix:
            # TODO: In split-prefix case, we don't really need "prefix" dirs.
            # Just use the "install" dirs.
            prefix = os.path.join(prefix_base, mod.name)
            path_dirs.append(os.path.join(prefix, "bin"))
        source_dir = os.path.join(source_base, mod.name)
        build_dir = os.path.join(base_dir, "build", mod.name)
        install_dir = os.path.join(base_dir, "install", mod.name)
        builder = mod(source_dir, build_dir, prefix, install_dir, env_vars)
        nodes.append(builder.all())

    env_vars.append(("PATH",
                     reduce(add_to_path, path_dirs, os.environ["PATH"])))
    return action_tree.make_node(nodes, name="all")
Ejemplo n.º 2
0
 def _build(self, target):
     deb_source_dir = self.combined.get_variant_dir(target.dist)
     build_dir = os.path.join(target.get_dest(), target._workdir, "plash")
     def do_set_version(log):
         target.set_changelog(self.combined.make_changelog(target.dist))
     def do_unpack(log):
         dsc_file = get_one(glob.glob(os.path.join(deb_source_dir,
                                                   "plash_*.dsc")))
         target.run_cmd_as_normal_user(
             log, ["mkdir", "-p", os.path.dirname(build_dir)])
         # dpkg-source uses the cwd as a temp directory which is not good.
         # dpkg-source appears to need absolute pathnames.
         target.run_cmd_as_normal_user(
             log, ["dpkg-source", "-x", os.path.abspath(dsc_file),
                   os.path.abspath(build_dir)])
     return action_tree.make_node([
             target.tear_down,
             ("make_dirs", lambda log: target.make_dirs()),
             target.set_up,
             target.add_local_debian_repo,
             ("unpack", do_unpack),
             ("set_version", do_set_version),
             target.install_deps,
             target.build_from_debian_source,
             target.test,
             target.run_lintian,
             ], name=None)
Ejemplo n.º 3
0
    def install_deps(self):
        dependency_actions = []
        standard_dependency_actions = []

        def add_dependency(package_name, ppa=None):
            if ppa is None:
                actions = standard_dependency_actions
            else:
                actions = dependency_actions
            actions.append(
                (package_name.replace(".", ""),
                 lambda log: self._ensure_installed(package_name, ppa)))

        add_dependency("python2.6")
        # required, but ubuntu doesn't have them any more :-( I installed these
        # (and zope.interface and twisted SVN trunk) by hand
        # add_dependency("python2.4"),
        # add_dependency("python2.5")
        # add_dependency("python2.7")
        add_dependency("python-setuptools")
        add_dependency("git-core")
        # for running zope_testbrowser tests
        add_dependency("python-virtualenv")
        add_dependency("python2.6-dev")
        # for deployment to SF and local collation of files for release
        add_dependency("rsync")
        # for running functional tests against local web server
        add_dependency("python-twisted-web2")
        # for generating .html docs from .txt markdown files
        add_dependency("pandoc")
        # for generating docs from .in templates
        add_dependency("python-empy")
        # for post-processing generated HTML
        add_dependency("python-lxml")
        # for the validate command
        add_dependency("wdg-html-validator")
        # for collecting code coverage data and generating coverage reports
        # no 64 bit .deb ATM
        # add_dependency("python-figleaf", ppa="jjl/figleaf")

        # for css validator
        add_dependency("default-jre")
        add_dependency("libcommons-collections3-java")
        add_dependency("libcommons-lang-java")
        add_dependency("libxerces2-java")
        add_dependency("libtagsoup-java")
        # OMG, it depends on piles of java web server stuff, even for local
        # command-line validation.  You're doing it wrong!
        add_dependency("velocity")
        dependency_actions.append(self.install_css_validator_in_release_area)

        dependency_actions.insert(
            0,
            action_tree.make_node(standard_dependency_actions,
                                  "standard_dependencies"))
        return dependency_actions
Ejemplo n.º 4
0
    def install_deps(self):
        dependency_actions = []
        standard_dependency_actions = []
        def add_dependency(package_name, ppa=None):
            if ppa is None:
                actions = standard_dependency_actions
            else:
                actions = dependency_actions
            actions.append(
                (package_name.replace(".", ""),
                 lambda log: self._ensure_installed(package_name, ppa)))
        add_dependency("python2.6")
        # required, but ubuntu doesn't have them any more :-( I installed these
        # (and zope.interface and twisted SVN trunk) by hand
        # add_dependency("python2.4"),
        # add_dependency("python2.5")
        # add_dependency("python2.7")
        add_dependency("python-setuptools")
        add_dependency("git-core")
        # for running zope_testbrowser tests
        add_dependency("python-virtualenv")
        add_dependency("python2.6-dev")
        # for deployment to SF and local collation of files for release
        add_dependency("rsync")
        # for running functional tests against local web server
        add_dependency("python-twisted-web")
        # for generating .html docs from .txt markdown files
        add_dependency("pandoc")
        # for generating docs from .in templates
        add_dependency("python-empy")
        # for post-processing generated HTML
        add_dependency("python-lxml")
        # for the validate command
        add_dependency("wdg-html-validator")
        # for collecting code coverage data and generating coverage reports
        # no 64 bit .deb ATM
        # add_dependency("python-figleaf", ppa="jjl/figleaf")

        # for css validator
        add_dependency("default-jre")
        add_dependency("libcommons-collections3-java")
        add_dependency("libcommons-lang-java")
        add_dependency("libxerces2-java")
        add_dependency("libtagsoup-java")
        # OMG, it depends on piles of java web server stuff, even for local
        # command-line validation.  You're doing it wrong!
        add_dependency("velocity")
        dependency_actions.append(self.install_css_validator_in_release_area)

        dependency_actions.insert(0, action_tree.make_node(
                standard_dependency_actions, "standard_dependencies"))
        return dependency_actions
Ejemplo n.º 5
0
 def all(self):
     return action_tree.make_node(
         [self.unpack, self.configure, self.make, self.install], self.name)