'Lower-level routine for building a package. Handles execution of actual build command.
@param package: package name
@type  package: str'

def _build_package(self, package, argument=None):

    local_env = os.environ.copy()
    if (self.ros_parallel_jobs > 0):
        local_env['ROS_PARALLEL_JOBS'] = ('-j%d    -l%d' % (self.ros_parallel_jobs, self.ros_parallel_jobs))
    elif ('ROS_PARALLEL_JOBS' not in os.environ):
        with _popen_lock:
            num_cpus = parallel_build.num_cpus()
            local_env['ROS_PARALLEL_JOBS'] = ('-j%d    -l%d' % (num_cpus, num_cpus))
    local_env['SVN_CMDLINE'] = 'svn    --non-interactive'
    cmd = ['bash', '-c', ('cd    %s    &&    %s    ' % (self.rospack.get_path(package), make_command()))]
    if argument:
        cmd[(-1)] += argument
    self.printer.print_full_verbose(cmd)
    with _popen_lock:
        command_line = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=local_env, preexec_fn=self._subprocess_setup)
    (pstd_out, pstd_err) = command_line.communicate()
    if (not isinstance(pstd_out, str)):
        pstd_out = pstd_out.decode()
    return (command_line.returncode, pstd_out)
