Exemplo n.º 1
0
    def _fetch_ros2(self):
        os.makedirs(self._source_dir, exist_ok=True)
        sources.Script(_ROS2_URL_TEMPLATE.format(version=self._version),
                       self._underlay_dir).download()

        logger.info('Fetching ros2 sources....')
        ros2_repos = os.path.join(self._underlay_dir, 'ros2.repos')
        self._run(['vcs', 'import', '--input', ros2_repos, self._source_dir])
Exemplo n.º 2
0
    def _fetch_ros2(self):
        os.makedirs(self._source_dir, exist_ok=True)
        sources.Script(_ROS2_URL_TEMPLATE.format(version=self._version),
                       self._underlay_dir).download()

        logger.info("Fetching ros2 sources....")
        ros2_repos = os.path.join(self._underlay_dir, "ros2.repos")
        self._run(["vcs", "import", "--input", ros2_repos, self._source_dir])
Exemplo n.º 3
0
 def __init__(self, name, options, project):
     super().__init__(name, options, project)
     self._rustpath = os.path.join(self.partdir, "rust")
     self._rustc = os.path.join(self._rustpath, "bin", "rustc")
     self._rustdoc = os.path.join(self._rustpath, "bin", "rustdoc")
     self._cargo = os.path.join(self._rustpath, "bin", "cargo")
     self._rustlib = os.path.join(self._rustpath, "lib")
     self._rustup_get = sources.Script(_RUSTUP, self._rustpath)
     self._rustup = os.path.join(self._rustpath, "rustup.sh")
Exemplo n.º 4
0
 def __init__(self, name, options, project):
     super().__init__(name, options, project)
     self.build_packages.extend(["gcc", "git", "curl", "file"])
     self._rustpath = os.path.join(self.partdir, "rust")
     self._rustc = os.path.join(self._rustpath, "bin", "rustc")
     self._rustdoc = os.path.join(self._rustpath, "bin", "rustdoc")
     self._cargo = os.path.join(self._rustpath, "bin", "cargo")
     self._cargo_dir = os.path.join(self.builddir, ".cargo")
     self._rustlib = os.path.join(self._rustpath, "lib")
     self._rustup_get = sources.Script(_RUSTUP, self._rustpath)
     self._rustup = os.path.join(self._rustpath, "rustup.sh")
     self._manifest = collections.OrderedDict()
Exemplo n.º 5
0
 def __init__(self, name, options, project):
     super().__init__(name, options, project)
     self.build_packages.extend([
         'gcc',
         'git',
         'curl',
         'file',
     ])
     self._rustpath = os.path.join(self.partdir, "rust")
     self._rustc = os.path.join(self._rustpath, "bin", "rustc")
     self._rustdoc = os.path.join(self._rustpath, "bin", "rustdoc")
     self._cargo = os.path.join(self._rustpath, "bin", "cargo")
     self._cargo_dir = os.path.join(self.builddir, '.cargo')
     self._rustlib = os.path.join(self._rustpath, "lib")
     self._rustup_get = sources.Script(_RUSTUP, self._rustpath)
     self._rustup = os.path.join(self._rustpath, "rustup.sh")
Exemplo n.º 6
0
    def _fetch_rustup(self):
        # if rustup-init has already been done, we can skip this.
        if os.path.exists(os.path.join(self._rust_dir, "bin", "rustup")):
            return

        # Download rustup-init.
        os.makedirs(self._rust_dir, exist_ok=True)
        rustup_init_cmd = os.path.join(self._rust_dir, "rustup.sh")
        sources.Script(_RUSTUP, self._rust_dir).download(filepath=rustup_init_cmd)

        # Basic options:
        # -y: assume yes
        # --no-modify-path: do not modify bashrc
        options = ["-y", "--default-toolchain", "none", "--no-modify-path"]

        # Fetch rust
        self.run([rustup_init_cmd] + options, env=self._build_env())
Exemplo n.º 7
0
    def _fetch_rustup(self):
        # if rustup-init has already been done, we can skip this.
        if os.path.exists(os.path.join(self._rust_dir, "bin", "rustup")):
            return

        # Download rustup-init.
        os.makedirs(self._rust_dir, exist_ok=True)
        rustup_init_cmd = os.path.join(self._rust_dir, "rustup.sh")
        sources.Script(_RUSTUP,
                       self._rust_dir).download(filepath=rustup_init_cmd)

        # Basic options:
        # -y: assume yes
        # --no-modify-path: do not modify bashrc
        options = ["-y", "--no-modify-path"]

        # Check if we want to initialize using a specific channel.
        if self.options.rust_channel:
            options.extend(["--channel", self.options.rust_channel])

        # Fetch rust
        self.run([rustup_init_cmd] + options, env=self._build_env())