def __init__(self, source, destination): super(Copy, self).__init__() if isinstance(source, str): source = [source] self.__source = Lazy(source) self.__destination = Lazy(destination) self.__filename = ""
def __init__(self, command, fail_behaviour=Task.FailBehaviour.FAIL, environment=None, working_directory=None, name=None): super(Run_With_Output, self).__init__() self.__command = Lazy(command) self.__name = name self.__fail_behaviour = fail_behaviour self.__environment = Lazy(environment) self.__working_directory = Lazy(working_directory)
def __init__(self, make_tool=None, environment=None, working_directory=None): super(Make, self).__init__() self.__install = False self.__make_tool = Lazy(make_tool or config['tools']['make']) self.__environment = Lazy(environment) self.__working_directory = Lazy(working_directory)
def init_config(args): # some tools gets confused onto what constitutes . (OpenSSL and maybe CMake) args.destination = os.path.realpath(args.destination) for d in list(config['paths'].keys()): if isinstance(config['paths'][d], str): config['paths'][d] = config['paths'][d].format( base_dir=os.path.abspath(args.destination), build_dir=args.builddir, progress_dir=args.progressdir, install_dir=args.installdir) python = get_from_hklm( "HKEY_LOCAL_MACHINE", r"SOFTWARE\Python\PythonCore\{}\InstallPath".format( config['python_version']), "") if python is not None: config['paths']['python'] = Lazy( lambda: os.path.join(python, "python.exe")) else: config['paths']['python'] = Lazy(lambda: os.path.join( get_from_hklm( "HKEY_CURRENT_USER", r"SOFTWARE\Python\PythonCore\{}\InstallPath".format(config[ 'python_version']), ""), "python.exe")) # parse -s argument. Example -s paths.build=bin would set config[paths][build] to bin if args.set: for setting in args.set: key, value = setting.split('=', 2) path = key.split('.') cur = config for ele in path[:-1]: cur = cur.setdefault(ele, {}) cur[path[-1]] = value if config['architecture'] not in ['x86_64', 'x86']: raise ValueError("only architectures supported are x86 and x86_64") visual_studio(config["vc_version"]) # forced set after args are evaluated if config['prefer_binary_dependencies']: if os.environ.get('APPVEYOR') is not None: qt_install(config["qt_version_appveyor"], config["qt_version_minor_appveyor"], config["qt_vc_version"]) else: qt_install(config["qt_version"], config["qt_version_minor"], config["qt_vc_version"]) config['__Default_environment'] = os.environ config['__environment'] = visual_studio_environment() config['__build_base_path'] = os.path.abspath(args.destination) config['__Umbrella_path'] = os.getcwd() config['__Arguments'] = args if 'PYTHON' not in config['__environment']: config['__environment']['PYTHON'] = sys.executable
def __init__(self, solution, project=None, working_directory=None, project_platform=None, reltarget=None, project_PlatformToolset=None, verbosity=None, environment=None): super(MSBuild, self).__init__() self.__solution = solution self.__project = project self.__working_directory = working_directory self.__project_platform = project_platform self.__reltarget = reltarget self.__project_platformtoolset = project_PlatformToolset self.__verbosity = verbosity self.__environment = Lazy(environment)
'install': "{base_dir}\\{install_dir}", # 'graphviz': path_or_default("dot.exe", "Graphviz2.38", "bin"), 'cmake': path_or_default("cmake.exe", "CMake", "bin"), 'git': path_or_default("git.exe", "Git", "bin"), #'perl': path_or_default("perl.exe", "StrawberryPerl", "bin"), #'ruby': path_or_default("ruby.exe", "Ruby22-x64", "bin"), #'svn': path_or_default("svn.exe", "SlikSvn", "bin"), '7z': path_or_default("7z.exe", "7-Zip"), # we need a python that matches the build architecture 'python': Lazy(lambda: os.path.join( get_from_hklm( r"SOFTWARE\Python\PythonCore\{}\InstallPath".format(config[ 'python_version']), "", config['architecture'] == "x86"), "python.exe")), 'visual_studio_base': "", 'qt_binary_install': "", 'visual_studio': "" # will be set in unimake.py after args are evaluated } if missing_prerequisites: print '\nMissing prerequisites listed above - cannot continue' exit(1)
def __init__(self, make_tool=None): super(Install, self).__init__() self.__make_tool = Lazy(make_tool or config['tools']['make'])
def __init__(self, filename, content): super(CreateFile, self).__init__() self.__filename = filename self.__content = Lazy(content)
path_or_default("dot.exe", "Graphviz2.38", "bin"), 'cmake': path_or_default("cmake.exe", "CMake", "bin"), 'git': path_or_default("git.exe", "Git", "bin"), 'perl': path_or_default("perl.exe", "StrawberryPerl", "bin"), 'ruby': path_or_default("ruby.exe", "Ruby22-x64", "bin"), 'svn': path_or_default("svn.exe", "SlikSvn", "bin"), '7z': path_or_default("7z.exe", "7-Zip"), # we need a python that matches the build architecture 'python': Lazy(lambda: os.path.join( get_from_hklm(r"SOFTWARE\Python\PythonCore\2.7\InstallPath", "", config['architecture'] == "x86"), "python.exe")), 'visual_studio': os.path.realpath( os.path.join( get_from_hklm( r"SOFTWARE\Microsoft\VisualStudio\{}".format( config['vc_version']), "InstallDir", True), "..", "..", "VC")) } if missing_prerequisites: print '\nMissing prerequisites listed above - cannot continue' exit(1)