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

        # The download URL has the format contains vMAJOR.MINOR in the
        # path and the tarball contains MAJOR.MINOR.REVISION, so pull
        # apart the full version to get the MAJOR and MINOR components.
        match = re.match(r'(?P<major>\d+)\.(?P<minor>\d+)', self.__version)
        major_minor = 'v{0}.{1}'.format(match.groupdict()['major'],
                                        match.groupdict()['minor'])

        tarball = self.__basename + '.tar.gz'
        url = self.__url.format(major_minor, tarball)

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

        # Configure
        # Catalyst has a cmake.sh shell script that sets configuration
        # options.  Use that in place of cmake.
        configure = self.configure_step(
            directory=posixpath.join(self.__wd, self.__basename),
            opts=self.cmake_opts, toolchain=self.__toolchain)
        configure = configure.replace('cmake', '{}/cmake.sh'.format(posixpath.join(self.__wd, self.__basename)))
        self.__commands.append(configure)

        # Build
        self.__commands.append(self.build_step())

        # Install
        self.__commands.append(self.build_step(target='install'))

        # 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
        self.__commands.append(self.cleanup_step(
            items=[posixpath.join(self.__wd, tarball),
                   posixpath.join(self.__wd, self.__basename)]))

        # Set the environment
        self.environment_variables['PATH'] = '{}:$PATH'.format(
            posixpath.join(self.prefix, 'bin'))
Construct the series of shell commands, i.e., fill in
           self.__commands
hpccm/building_blocks/catalyst.py