def install_script_packages(event, options, project=None, **kwargs): # ensure we're in the project's root directory with in_directory(project.path()): install_script = project.path('./scripts/install.sh') if not os.path.exists(install_script): return # Installs the bundle requirements and the bins for each # requirement in the project's bin path call_subprocess(['bash', install_script, project.env_path()])
def install_npm_packages(event, options, project=None, **kwargs): # ensure we're in the project's root directory with in_directory(project.path()): npm_path = which('npm') if not npm_path: logger.warning('Skipping node requirements. ' 'npm must be installed on your system') return # Installs the bundle requirements and the bins for each # requirement in the project's bin path call_subprocess(['npm', 'install'])
def install_ruby_bundler_requirements(event, options, project=None, **kwargs): # ensure we're in the project's root directory with in_directory(project.path()): # Check that bundler is installed on the system bundler_path = which('bundle') if not bundler_path: logger.warning('Skipping Ruby Requirements. ' 'Bundler must be installed in your system') return # Installs the bundle requirements and the bins for each # requirement in the project's bin path call_subprocess([bundler_path, 'install', '--binstubs=%s' % project.bin_path()])
def call_bin(self, command_name, args, **options): command = [self.bin_path(command_name)] command.extend(args) return call_subprocess(command, **options)