def create_install_cmd(self, packages):
        s = self.version_separator

        def join_package_version(pv_item):
            p, v = pv_item if len(pv_item) > 1 else (pv_item[0], None)
            return p + s + v + '*' if v else p

        packages = ' '.join(map(join_package_version, packages))
        command = '%(install_cmd)s %(packages)s'
        args = {'install_cmd': self.install_command, 'packages': packages}
        return command % args
dataset/ETHPy150Open openstack/sahara/sahara/plugins/mapr/domain/distro.py/Distro.create_install_cmd/original