<commit_before>import os
import distutils.dir_util
import collections

import lamnfyc.utils
import lamnfyc.context_managers
import lamnfyc.settings
import lamnfyc.decorators


@lamnfyc.decorators.check_installed('bin/node')
def six_two_installer(package, temp):
    with lamnfyc.context_managers.chdir(os.path.join(temp, 'node-v{}-darwin-x64'.format(package.version))):
        distutils.dir_util.copy_tree('bin', os.path.join(lamnfyc.settings.environment_path, 'bin'))
        distutils.dir_util.copy_tree('lib', os.path.join(lamnfyc.settings.environment_path, 'lib'))
        distutils.dir_util.copy_tree('include', os.path.join(lamnfyc.settings.environment_path, 'include'))
        distutils.dir_util.copy_tree('share', os.path.join(lamnfyc.settings.environment_path, 'share'))
        # fixes npm link
        os.symlink(os.path.join(lamnfyc.settings.environment_path, 'lib/node_modules/npm/bin/npm-cli.js'),
                   os.path.join(lamnfyc.settings.environment_path, 'bin/npm'))


VERSIONS = collections.OrderedDict()
VERSIONS['6.2.2'] = lamnfyc.utils.TarPacket('https://nodejs.org/dist/v6.2.2/node-v6.2.2-darwin-x64.tar.gz',
                                            installer=six_two_installer,<commit_msg>Fixes npm<commit_after>import os
import distutils.dir_util
import collections

import lamnfyc.utils
import lamnfyc.context_managers
import lamnfyc.settings
import lamnfyc.decorators


@lamnfyc.decorators.check_installed('bin/node')
def six_two_installer(package, temp):
    with lamnfyc.context_managers.chdir(os.path.join(temp, 'node-v{}-darwin-x64'.format(package.version))):
        distutils.dir_util.copy_tree('bin', os.path.join(lamnfyc.settings.environment_path, 'bin'))
        distutils.dir_util.copy_tree('lib', os.path.join(lamnfyc.settings.environment_path, 'lib'))
        distutils.dir_util.copy_tree('include', os.path.join(lamnfyc.settings.environment_path, 'include'))
        distutils.dir_util.copy_tree('share', os.path.join(lamnfyc.settings.environment_path, 'share'))
        # fixes npm link
        os.remove(os.path.join(lamnfyc.settings.environment_path, 'bin/npm'))
        os.symlink(os.path.join(lamnfyc.settings.environment_path, 'lib/node_modules/npm/bin/npm-cli.js'),
                   os.path.join(lamnfyc.settings.environment_path, 'bin/npm'))


VERSIONS = collections.OrderedDict()
VERSIONS['6.2.2'] = lamnfyc.utils.TarPacket('https://nodejs.org/dist/v6.2.2/node-v6.2.2-darwin-x64.tar.gz',
                                            installer=six_two_installer,
{'fraction_non_alphanumeric': 0.13996827914353688, 'fraction_numerical': 0.010309278350515464, 'mean_word_length': 3.986166007905138, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4648486', 'n_tokens_mistral': 886, 'n_tokens_neox': 874, 'n_words': 92}