<commit_before>from __future__ import with_statement

import ast
import distutils.cmd
import glob
import os
import os.path
import re
import shutil
import sys
import tempfile
import warnings

try:
    from setuptools import Extension, setup
except ImportError:
    from ez_setup import use_setuptools
    use_setuptools()
    from setuptools import Extension, setup


MAKEFILE_SOURCES_LIST_RE = re.compile(r'''
    (?: ^ | \n ) libsass_la_SOURCES [ \t]* = [ \t]*
    (?P<sources> (?: (?: $ | [ \t] | \\ [\n] )+
                     [^ \n\t\\]+ )+ )
''', re.VERBOSE)


with open('Makefile.am') as makefile:
    sources_match = MAKEFILE_SOURCES_LIST_RE.search(makefile.read())
    sources_list = sources_match.group('sources').replace('\\\n', ' ')
    libsass_sources = sources_list.split()

libsass_headers = [
    'sass_interface.h', 'sass.h', 'win32/unistd.h'
]
libsass_headers.extend(glob.glob('*.hpp'))

if sys.platform == 'win32':
    from distutils.msvc9compiler import get_build_version
    vccmntools_env = 'VS{0}{1}COMNTOOLS'.format(
        int(get_build_version()),
        int(get_build_version() * 10) % 10
    )
    try:
        os.environ[vccmntools_env] = os.environ['VS110COMNTOOLS']
    except KeyError:
        warnings.warn('You probably need Visual Studio 2012 (11.0) or higher')
    # Workaround http://bugs.python.org/issue4431 under Python <= 2.6
    if sys.version_info < (2, 7):
        def spawn(self, cmd):
            from distutils.spawn import spawn
            if cmd[0] == self.linker:
                for i, val in enumerate(cmd):
                    if val.startswith('/MANIFESTFILE:'):<commit_msg>Try VS 2010 as well if present<commit_after>from __future__ import with_statement

import ast
import distutils.cmd
import glob
import os
import os.path
import re
import shutil
import sys
import tempfile
import warnings

try:
    from setuptools import Extension, setup
except ImportError:
    from ez_setup import use_setuptools
    use_setuptools()
    from setuptools import Extension, setup


MAKEFILE_SOURCES_LIST_RE = re.compile(r'''
    (?: ^ | \n ) libsass_la_SOURCES [ \t]* = [ \t]*
    (?P<sources> (?: (?: $ | [ \t] | \\ [\n] )+
                     [^ \n\t\\]+ )+ )
''', re.VERBOSE)


with open('Makefile.am') as makefile:
    sources_match = MAKEFILE_SOURCES_LIST_RE.search(makefile.read())
    sources_list = sources_match.group('sources').replace('\\\n', ' ')
    libsass_sources = sources_list.split()

libsass_headers = [
    'sass_interface.h', 'sass.h', 'win32/unistd.h'
]
libsass_headers.extend(glob.glob('*.hpp'))

if sys.platform == 'win32':
    from distutils.msvc9compiler import get_build_version
    vccmntools_env = 'VS{0}{1}COMNTOOLS'.format(
        int(get_build_version()),
        int(get_build_version() * 10) % 10
    )
    try:
        os.environ[vccmntools_env] = os.environ['VS100COMNTOOLS']
    except KeyError:
        try:
            os.environ[vccmntools_env] = os.environ['VS110COMNTOOLS']
        except KeyError:
            warnings.warn('You probably need Visual Studio 2010 (10.0) '
                          'or higher')
    # Workaround http://bugs.python.org/issue4431 under Python <= 2.6
    if sys.version_info < (2, 7):
        def spawn(self, cmd):
            from distutils.spawn import spawn
            if cmd[0] == self.linker:
                for i, val in enumerate(cmd):
                    if val.startswith('/MANIFESTFILE:'):
{'fraction_non_alphanumeric': 0.13128654970760234, 'fraction_numerical': 0.0195906432748538, 'mean_word_length': 2.878684807256236, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '544658', 'n_tokens_mistral': 1224, 'n_tokens_neox': 1141, 'n_words': 252}