<commit_before>import os

def generate(env):
    """Add Builders and construction variables to the Environment."""
    
    if not 'cpp' in env['TOOLS'][:-1]:
        env.Tool('system')
        env.Tool('prefix')

        def BuildCpp(env, target, sources):
            # Code to build "target" from "source"
            SYSTEM = env['SYSTEM']
            targets = env.Install(os.path.join(env['PREFIX'], "include", target),
                                  [source for source in sources if source.suffix in ['.h', '.hpp', '.hxx', '.h++']])
            if SYSTEM == 'osx':
                kwargs = dict(SHLINKFLAGS='$LINKFLAGS -dynamic',
                              SHLIBSUFFIX='.dylib')
            else:
                kwargs = dict()
            targets += env.SharedLibrary(os.path.join(env['PREFIX'], "lib", target),
                                         [source for source in sources if source.suffix in ['.c', '.cpp', '.cxx', '.c++']],
                                         **kwargs)
            return targets

        env.AddMethod(BuildCpp)

def exists(env):
    return 1<commit_msg>Update cpp.py<commit_after>import os

def generate(env):
    """Add Builders and construction variables to the Environment."""
    
    if not 'cpp' in env['TOOLS'][:-1]:
        env.Tool('system')
        env.Tool('prefix')

        def BuildCpp(env, target, sources):
            # Code to build "target" from "source"
            SYSTEM = env['SYSTEM']
            targets = env.Install(os.path.join(env['PREFIX'], "include", target),
                                  [source for source in sources if source.suffix in ['.h', '.hpp', '.hxx', '.h++']])
            if SYSTEM == 'osx':
                kwargs = dict(FRAMEWORKSFLAGS = '-flat_namespace -undefined suppress')
            else:
                kwargs = dict()
            targets += env.SharedLibrary(os.path.join(env['PREFIX'], "lib", target),
                                         [source for source in sources if source.suffix in ['.c', '.cpp', '.cxx', '.c++']],
                                         **kwargs)
            return targets

        env.AddMethod(BuildCpp)

def exists(env):
    return 1

{'fraction_non_alphanumeric': 0.14410279944928867, 'fraction_numerical': 0.0018357044515832951, 'mean_word_length': 1.639225181598063, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2927771', 'n_tokens_mistral': 579, 'n_tokens_neox': 561, 'n_words': 163}