<commit_before>﻿from base import BaseBuilder, task
import os
import shutil


class MsdevBuilder(BaseBuilder):
    msbuild_exe = r'\Lib\MSBuild.exe'
    solution_file = None
    target = None
    out_dir = 'bin'
    
    @task('compile')
    def compile_it(self):
        '''Compiles MSDev solution.'''
        if self.solution_file and self.target:
            self.run([self.msbuild_exe, '/t:build', '/p:Configuration=Release;TargetName=%s' % self.target, '/property:OutDir=%s' % self.out_dir, self.solution_file])
            
            # now move it to the right location and rename it
            base = os.path.join(self.out_dir, self.target)
            exts_to_move = ['.dll', '.exe', '.lib']
            for f in exts_to_move:
                if os.path.exists(base + f):
                    shutil.move(base + f, base + '-' + self.version + f)
    
    @task('clean')
    def clean(self):
        files = os.listdir(self.out_dir)
        for f in files:
            if f[-4:] not in ['.dll', '.exe', '.lib']:
                os.remove(os.path.join(self.out_dir, f))<commit_msg>Pfade fuer msdev angepasst, so dass out_dir nun ausgehend von dem current working dir gesehen wird.<commit_after>﻿from base import BaseBuilder, task
import os
import shutil


class MsdevBuilder(BaseBuilder):
    msbuild_exe = r'\Lib\MSBuild.exe'
    solution_file = None
    target = None
    out_dir = 'bin'

    @task('compile')
    def compile_it(self):
        '''Compiles MSDev solution.'''
        if self.solution_file and self.target:
            me = os.getcwd()
            print me + '/' + self.out_dir
            self.run([self.msbuild_exe, '/t:build', '/p:Configuration=Release;TargetName=%s' % self.target, '/property:OutDir=%s' % me + '/' + self.out_dir, self.solution_file])

            # now move it to the right location and rename it
            base = os.path.join(self.out_dir, self.target)
            exts_to_move = ['.dll', '.exe', '.lib']
            for f in exts_to_move:
                if os.path.exists(base + f):
                    shutil.move(base + f, base + '-' + self.version + f)

    @task('clean')
    def clean(self):
        files = os.listdir(self.out_dir)
        for f in files:
            if f[-4:] not in ['.dll', '.exe', '.lib']:
                os.remove(os.path.join(self.out_dir, f))
{'fraction_non_alphanumeric': 0.13898450946643717, 'fraction_numerical': 0.0008605851979345956, 'mean_word_length': 2.1762295081967213, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6007612', 'n_tokens_mistral': 776, 'n_tokens_neox': 741, 'n_words': 186}