def _install_yarnpkg(self): """Install the Yarnpkg distribution from pants support binaries. :returns: The Yarnpkg distribution bin path. :rtype: string """ yarnpkg_package_path = YarnpkgDistribution.scoped_instance(self).select() yarnpkg_bin_path = os.path.join(yarnpkg_package_path, 'dist', 'bin') return yarnpkg_bin_path
def _install_yarnpkg(self): """Install the Yarnpkg distribution from pants support binaries. :returns: The Yarnpkg distribution bin path. :rtype: string """ yarnpkg_package_path = YarnpkgDistribution.scoped_instance( self).select() yarnpkg_bin_path = os.path.join(yarnpkg_package_path, 'dist', 'bin') return yarnpkg_bin_path
def install_yarnpkg(self, context=None): """Install the Yarnpkg distribution from pants support binaries. :param context: The context for this call. Remove this param in 1.7.0.dev0. :returns: The Yarnpkg distribution bin path. :rtype: string """ yarnpkg_package_path = YarnpkgDistribution.scoped_instance( self).select(context=context) yarnpkg_bin_path = os.path.join(yarnpkg_package_path, 'dist', 'bin') return yarnpkg_bin_path
def _install_yarnpkg(self): """Install the Yarnpkg distribution from pants support binaries. :returns: The Yarnpkg distribution bin path. :rtype: string """ yarnpkg_package_path = YarnpkgDistribution.scoped_instance(self).select() yarnpkg_bin_path = os.path.join(yarnpkg_package_path, "dist", "bin") if not is_readable_dir(yarnpkg_bin_path): # The binary was pulled from yarn's Github release page and not our S3, # in which case it's installed under a different directory. return os.path.join(yarnpkg_package_path, os.listdir(yarnpkg_package_path)[0], "bin") return yarnpkg_bin_path
def subsystem_dependencies(cls): # Note that we use a YarnpkgDistribution scoped to the NodeDistribution, which may itself # be scoped to a task. return (super().subsystem_dependencies() + (YarnpkgDistribution.scoped(cls), ))
def subsystem_dependencies(cls): # Note that we use a YarnpkgDistribution scoped to the NodeDistribution, which may itself # be scoped to a task. return (super(NodeDistribution, cls).subsystem_dependencies() + (YarnpkgDistribution.scoped(cls), ))