def __download(self):
        """Set download source based on user parameters"""

        if not self.__ospackages:
            self.__ospackages = ['make', 'wget']

            if hpccm.config.g_linux_distro == linux_distro.CENTOS:
                self.__ospackages.append('which')

            if self.repository:
                self.__ospackages.append('git')

        # Use the default repository if set to True
        if self.repository is True:
            self.repository = self.__default_repository

        if not self.repository and not self.url:
            self.url = '{0}/v{1}.tar.gz'.format(self.__baseurl, self.__version)
Set download source based on user parameters
hpccm/building_blocks/nccl.py