def install_celery_plugin(plugin_url): """ Installs celery tasks into the cloudify agent. 1. Installs the plugin into the current python installation directory. 2 Adds the python files into the agent includes directive. :param plugin_url: URL to an archive of the plugin. """ command = 'cmd /c "{0}\Scripts\pip.exe install {1}"' \ .format(sys.prefix, plugin_url) utils.LocalCommandRunner( logger=logger, host=utils.get_local_ip() ).run(command) plugin_name = plugin_utils.extract_plugin_name(plugin_url) module_paths = plugin_utils.extract_module_paths(plugin_name) _update_includes(module_paths)
def install_celery_plugin(plugin_url): ''' Installs celery tasks into the cloudify agent. 1. Installs the plugin into the current python installation directory. 2 Adds the python files into the agent includes directive. :param plugin_url: URL to an archive of the plugin. :return: ''' command = 'cmd /c "{0}\Scripts\pip.exe install --process-dependency-links {1}"'\ .format(sys.prefix, plugin_url) LocalCommandRunner().run(command) plugin_name = plugin_utils.extract_plugin_name(plugin_url) module_paths = plugin_utils.extract_module_paths(plugin_name) _update_includes(module_paths)
def install_celery_plugin(plugin_url): ''' Installs celery tasks into the cloudify agent. 1. Installs the plugin into the current python installation directory. 2 Adds the python files into the agent includes directive. :param plugin_url: URL to an archive of the plugin. :return: ''' command = 'cmd /c "{0}\Scripts\pip.exe install --process-dependency-links {1}"'\ .format(sys.prefix, plugin_url) LocalCommandRunner().run(command) plugin_name = plugin_utils.extract_plugin_name(plugin_url) module_paths = plugin_utils.extract_module_paths(plugin_name) _update_includes(module_paths)