def __init__(self, platform, arch_name, dir_path, prefix_path): platform_or_none = system_info.get_supported_platform_by_name(platform) if not platform_or_none: raise utils.BuildError('invalid platform') build_arch = platform_or_none.architecture_by_arch_name(arch_name) if not build_arch: raise utils.BuildError('invalid arch') if not prefix_path: prefix_path = build_arch.default_install_prefix_path() packages_types = platform_or_none.package_types() build_platform = platform_or_none.make_platform_by_arch( build_arch, packages_types) self.platform_ = build_platform build_dir_path = os.path.abspath(dir_path) if os.path.exists(build_dir_path): shutil.rmtree(build_dir_path) os.mkdir(build_dir_path) os.chdir(build_dir_path) self.build_dir_path_ = build_dir_path self.prefix_path_ = prefix_path print("Build request platform: {0}({1}) created".format( build_platform.name(), build_arch.name()))
def __init__(self, platform: str, arch_name: str, dir_path: str, prefix_path: str): platform_or_none = system_info.get_supported_platform_by_name(platform) if not platform_or_none: raise BuildError('invalid platform') arch_or_none = platform_or_none.get_architecture_by_arch_name(arch_name) if not arch_or_none: raise BuildError('invalid arch') if not prefix_path: prefix_path = arch_or_none.default_install_prefix_path() abs_prefix_path = os.path.expanduser(prefix_path) packages_types = platform_or_none.package_types() build_platform = platform_or_none.make_platform_by_arch(arch_or_none, packages_types) os.environ['PKG_CONFIG_PATH'] = '$PKG_CONFIG_PATH:%s/lib/pkgconfig/' % abs_prefix_path env = build_platform.env_variables() for key, value in env.items(): os.environ[key] = value self.platform_ = build_platform build_dir_path = os.path.abspath(dir_path) if os.path.exists(build_dir_path): shutil.rmtree(build_dir_path) os.mkdir(build_dir_path) os.chdir(build_dir_path) self.build_dir_path_ = build_dir_path self.prefix_path_ = abs_prefix_path print("Build request for platform: {0}({1}) created".format(build_platform.name(), arch_or_none.name()))
def __init__(self, platform, arch_name): platform_or_none = system_info.get_supported_platform_by_name(platform) if not platform_or_none: raise utils.BuildError('invalid platform') arch = platform_or_none.architecture_by_arch_name(arch_name) if not arch: raise utils.BuildError('invalid arch') self.platform_ = platform_or_none.make_platform_by_arch(arch, platform_or_none.package_types()) print("Build request for platform: {0}, arch: {1} created".format(platform, arch.name()))
def __init__(self, platform, arch_name): platform_or_none = system_info.get_supported_platform_by_name(platform) if not platform_or_none: raise build_utils.BuildError('invalid platform') arch = platform_or_none.get_architecture_by_arch_name(arch_name) if not arch: raise build_utils.BuildError('invalid arch') self.platform_ = platform_or_none.make_platform_by_arch(arch, platform_or_none.package_types()) print("Build request for platform: {0}, arch: {1} created".format(platform, arch.name()))
def __init__(self, platform, arch_bit, dir_path): platform_or_none = system_info.get_supported_platform_by_name(platform) if not platform_or_none: raise utils.BuildError('invalid platform') arch = platform_or_none.architecture_by_arch_name(arch_bit) if not arch: raise utils.BuildError('invalid arch') build_dir_path = os.path.abspath(dir_path) if os.path.exists(build_dir_path): shutil.rmtree(build_dir_path) os.mkdir(build_dir_path) os.chdir(build_dir_path) self.build_dir_path_ = build_dir_path self.platform_ = platform_or_none.make_platform_by_arch(arch, platform_or_none.package_types()) print("Build request for platform: {0}, arch: {1} created".format(platform, arch.name()))
def __init__(self, platform, arch_bit, dir_path): platform_or_none = system_info.get_supported_platform_by_name(platform) if not platform_or_none: raise utils.BuildError('invalid platform') arch = platform_or_none.architecture_by_arch_name(arch_bit) if not arch: raise utils.BuildError('invalid arch') build_dir_path = os.path.abspath(dir_path) if os.path.exists(build_dir_path): shutil.rmtree(build_dir_path) os.mkdir(build_dir_path) os.chdir(build_dir_path) self.build_dir_path_ = build_dir_path self.platform_ = platform_or_none.make_platform_by_arch( arch, platform_or_none.package_types()) print("Build request for platform: {0}, arch: {1} created".format( platform, arch.name()))