parameters: (name, path, sdk_based=False)
return_statement: return versions[str(name)]
docstring: Sets up MSVS project generation.
  
    Setup is based off the GYP_MSVS_VERSION environment variable or whatever is
    autodetected if GYP_MSVS_VERSION is not explicitly specified. If a version is
    passed in that doesn't match a value in versions python will throw a error.
docstring_summary: Sets up MSVS project generation.
docstring_tokens: Sets up MSVS project generation .
function: def _CreateVersion(name, path, sdk_based=False):
    """Sets up MSVS project generation.
  
    Setup is based off the GYP_MSVS_VERSION environment variable or whatever is
    autodetected if GYP_MSVS_VERSION is not explicitly specified. If a version is
    passed in that doesn't match a value in versions python will throw a error.
    """
    if path:
      path = os.path.normpath(path)
    versions = {
        '2019': VisualStudioVersion('2019',
                                    'Visual Studio 2019',
                                    solution_version='12.00',
                                    project_version='16.0',
                                    flat_sln=False,
                                    uses_vcxproj=True,
                                    path=path,
                                    sdk_based=sdk_based,
                                    default_toolset='v142',
                                    compatible_sdks=['v8.1', 'v10.0']),
        '2017': VisualStudioVersion('2017',
                                    'Visual Studio 2017',
                                    solution_version='12.00',
                                    project_version='15.0',
                                    flat_sln=False,
                                    uses_vcxproj=True,
                                    path=path,
                                    sdk_based=sdk_based,
                                    default_toolset='v141',
                                    compatible_sdks=['v8.1', 'v10.0']),
        '2015': VisualStudioVersion('2015',
                                    'Visual Studio 2015',
                                    solution_version='12.00',
                                    project_version='14.0',
                                    flat_sln=False,
                                    uses_vcxproj=True,
                                    path=path,
                                    sdk_based=sdk_based,
                                    default_toolset='v140'),
        '2013': VisualStudioVersion('2013',
                                    'Visual Studio 2013',
                                    solution_version='13.00',
                                    project_version='12.0',
                                    flat_sln=False,
                                    uses_vcxproj=True,
                                    path=path,
                                    sdk_based=sdk_based,
                                    default_toolset='v120'),
        '2013e': VisualStudioVersion('2013e',
                                     'Visual Studio 2013',
                                     solution_version='13.00',
                                     project_version='12.0',
                                     flat_sln=True,
                                     uses_vcxproj=True,
                                     path=path,
                                     sdk_based=sdk_based,
                                     default_toolset='v120'),
        '2012': VisualStudioVersion('2012',
                                    'Visual Studio 2012',
                                    solution_version='12.00',
                                    project_version='4.0',
                                    flat_sln=False,
                                    uses_vcxproj=True,
                                    path=path,
                                    sdk_based=sdk_based,
                                    default_toolset='v110'),
        '2012e': VisualStudioVersion('2012e',
                                     'Visual Studio 2012',
                                     solution_version='12.00',
                                     project_version='4.0',
                                     flat_sln=True,
                                     uses_vcxproj=True,
                                     path=path,
                                     sdk_based=sdk_based,
                                     default_toolset='v110'),
        '2010': VisualStudioVersion('2010',
                                    'Visual Studio 2010',
                                    solution_version='11.00',
                                    project_version='4.0',
                                    flat_sln=False,
                                    uses_vcxproj=True,
                                    path=path,
                                    sdk_based=sdk_based),
        '2010e': VisualStudioVersion('2010e',
                                     'Visual C++ Express 2010',
                                     solution_version='11.00',
                                     project_version='4.0',
                                     flat_sln=True,
                                     uses_vcxproj=True,
                                     path=path,
                                     sdk_based=sdk_based),
        '2008': VisualStudioVersion('2008',
                                    'Visual Studio 2008',
                                    solution_version='10.00',
                                    project_version='9.00',
                                    flat_sln=False,
                                    uses_vcxproj=False,
                                    path=path,
                                    sdk_based=sdk_based),
        '2008e': VisualStudioVersion('2008e',
                                     'Visual Studio 2008',
                                     solution_version='10.00',
                                     project_version='9.00',
                                     flat_sln=True,
                                     uses_vcxproj=False,
                                     path=path,
                                     sdk_based=sdk_based),
        '2005': VisualStudioVersion('2005',
                                    'Visual Studio 2005',
                                    solution_version='9.00',
                                    project_version='8.00',
                                    flat_sln=False,
                                    uses_vcxproj=False,
                                    path=path,
                                    sdk_based=sdk_based),
        '2005e': VisualStudioVersion('2005e',
                                     'Visual Studio 2005',
                                     solution_version='9.00',
                                     project_version='8.00',
                                     flat_sln=True,
                                     uses_vcxproj=False,
                                     path=path,
                                     sdk_based=sdk_based),
    }
    return versions[str(name)]
function_tokens: def _CreateVersion ( name , path , sdk_based = False ) : if path : path = os . path . normpath ( path ) versions = { '2019' : VisualStudioVersion ( '2019' , 'Visual Studio 2019' , solution_version = '12.00' , project_version = '16.0' , flat_sln = False , uses_vcxproj = True , path = path , sdk_based = sdk_based , default_toolset = 'v142' , compatible_sdks = [ 'v8.1' , 'v10.0' ] ) , '2017' : VisualStudioVersion ( '2017' , 'Visual Studio 2017' , solution_version = '12.00' , project_version = '15.0' , flat_sln = False , uses_vcxproj = True , path = path , sdk_based = sdk_based , default_toolset = 'v141' , compatible_sdks = [ 'v8.1' , 'v10.0' ] ) , '2015' : VisualStudioVersion ( '2015' , 'Visual Studio 2015' , solution_version = '12.00' , project_version = '14.0' , flat_sln = False , uses_vcxproj = True , path = path , sdk_based = sdk_based , default_toolset = 'v140' ) , '2013' : VisualStudioVersion ( '2013' , 'Visual Studio 2013' , solution_version = '13.00' , project_version = '12.0' , flat_sln = False , uses_vcxproj = True , path = path , sdk_based = sdk_based , default_toolset = 'v120' ) , '2013e' : VisualStudioVersion ( '2013e' , 'Visual Studio 2013' , solution_version = '13.00' , project_version = '12.0' , flat_sln = True , uses_vcxproj = True , path = path , sdk_based = sdk_based , default_toolset = 'v120' ) , '2012' : VisualStudioVersion ( '2012' , 'Visual Studio 2012' , solution_version = '12.00' , project_version = '4.0' , flat_sln = False , uses_vcxproj = True , path = path , sdk_based = sdk_based , default_toolset = 'v110' ) , '2012e' : VisualStudioVersion ( '2012e' , 'Visual Studio 2012' , solution_version = '12.00' , project_version = '4.0' , flat_sln = True , uses_vcxproj = True , path = path , sdk_based = sdk_based , default_toolset = 'v110' ) , '2010' : VisualStudioVersion ( '2010' , 'Visual Studio 2010' , solution_version = '11.00' , project_version = '4.0' , flat_sln = False , uses_vcxproj = True , path = path , sdk_based = sdk_based ) , '2010e' : VisualStudioVersion ( '2010e' , 'Visual C++ Express 2010' , solution_version = '11.00' , project_version = '4.0' , flat_sln = True , uses_vcxproj = True , path = path , sdk_based = sdk_based ) , '2008' : VisualStudioVersion ( '2008' , 'Visual Studio 2008' , solution_version = '10.00' , project_version = '9.00' , flat_sln = False , uses_vcxproj = False , path = path , sdk_based = sdk_based ) , '2008e' : VisualStudioVersion ( '2008e' , 'Visual Studio 2008' , solution_version = '10.00' , project_version = '9.00' , flat_sln = True , uses_vcxproj = False , path = path , sdk_based = sdk_based ) , '2005' : VisualStudioVersion ( '2005' , 'Visual Studio 2005' , solution_version = '9.00' , project_version = '8.00' , flat_sln = False , uses_vcxproj = False , path = path , sdk_based = sdk_based ) , '2005e' : VisualStudioVersion ( '2005e' , 'Visual Studio 2005' , solution_version = '9.00' , project_version = '8.00' , flat_sln = True , uses_vcxproj = False , path = path , sdk_based = sdk_based ) , } return versions [ str ( name ) ]