def __setup(self):
        """Construct the series of shell commands, i.e., fill in
           self.__commands"""

        # The download URL has the version format with underscores so
        # pull apart the full version to get the individual
        # components.
        match = re.match(r'(?P<major>\d+)\.(?P<minor>\d+)\.(?P<revision>\d+)',
                         self.__version)
        v_underscore = '{0}_{1}_{2}'.format(match.groupdict()['major'],
                                            match.groupdict()['minor'],
                                            match.groupdict()['revision'])

        tarball = 'boost_{}.tar.bz2'.format(v_underscore)
        url = '{0}/{1}'.format(self.__baseurl, tarball)
        url = url.replace('__version__', self.__version)

        # Python support requires pyconfig.h which is not part of the
        # standard Python install.  It requires the development
        # package, python-dev or python-devel.  So skip Python unless
        # it's specifically enabled.
        if not self.__bootstrap_opts and not self.__python:
            self.__bootstrap_opts.append('--without-libraries=python')

        # Download source from web
        self.__commands.append(self.download_step(url=url, directory=self.__wd))
        self.__commands.append(self.untar_step(
            tarball=posixpath.join(self.__wd, tarball), directory=self.__wd))

        # Configure
        self.__commands.append(
            'cd {} && ./bootstrap.sh --prefix={} {}'.format(
                posixpath.join(self.__wd, 'boost_{}'.format(v_underscore)),
                self.__prefix,
                ' '.join(self.__bootstrap_opts)))

        # Build and install
        self.__b2_opts.append('-j{}'.format(self.__parallel))
        self.__b2_opts.append('-q install')
        self.__commands.append('./b2 {0}'.format(' '.join(self.__b2_opts)))

        # Set library path
        libpath = posixpath.join(self.__prefix, 'lib')
        if self.ldconfig:
            self.__commands.append(self.ldcache_step(directory=libpath))
        else:
            self.environment_variables['LD_LIBRARY_PATH'] = '{}:$LD_LIBRARY_PATH'.format(libpath)

        # Cleanup tarball and directory
        self.__commands.append(self.cleanup_step(
            items=[posixpath.join(self.__wd, tarball),
                   posixpath.join(self.__wd,
                                  'boost_{}'.format(v_underscore))]))
Construct the series of shell commands, i.e., fill in
           self.__commands
hpccm/building_blocks/boost.py