예제 #1
0
def install_raw_package(cache_folder, url_or_path, ignore_cache, destination, sub_folder, take_folder):
    package_path = url_or_path
    download_dir = get_package_cache_folder_path(cache_folder, url_or_path)
    if not exists(url_or_path):
        package_path = download_package(download_dir, url_or_path, ignore_cache)
    print("Package file: %s" % package_path)

    unpack_dir = unpack_raw(package_path, download_dir, sub_folder, take_folder)
    print("Unpacked to: %s" % unpack_dir)

    copy_dir(unpack_dir, destination)
    print("Copied to: %s" % destination)
예제 #2
0
파일: debian.py 프로젝트: syncloud/coin
def install_deb_package(cache_folder, url_or_path, ignore_cache, destination, sub_folder):
    package_path = url_or_path
    download_dir = get_package_cache_folder_path(cache_folder, url_or_path)
    if not exists(url_or_path):
        package_path = download_package(download_dir, url_or_path, ignore_cache)
    print("Package file: %s" % package_path)

    unpack_dir = unpack_deb(package_path, download_dir, sub_folder)
    print("Unpacked to: %s" % unpack_dir)

    install_to = destination
    copy_dir(unpack_dir, install_to)
    print("Copied to: %s" % install_to)

    shutil.rmtree(unpack_dir, ignore_errors=True)
    print("Cleaned unpack dir: %s" % unpack_dir)
예제 #3
0
def install_deb_package(cache_folder, url_or_path, ignore_cache, destination, sub_folder):
    package_path = url_or_path
    download_dir = get_package_cache_folder_path(cache_folder, url_or_path)
    if not exists(url_or_path):
        package_path = download_package(download_dir, url_or_path, ignore_cache)
    print("Package file: %s" % package_path)

    unpack_dir = unpack_deb(package_path, download_dir, sub_folder)
    print("Unpacked to: %s" % unpack_dir)

    install_to = destination
    copy_dir(unpack_dir, install_to)
    print("Copied to: %s" % install_to)

    shutil.rmtree(unpack_dir, ignore_errors=True)
    print("Cleaned unpack dir: %s" % unpack_dir)
예제 #4
0
파일: python.py 프로젝트: syncloud/coin
def install_python_package(cache_folder, url_or_path, ignore_cache, destination):
    package_path = url_or_path
    download_dir = get_package_cache_folder_path(cache_folder, url_or_path)
    if not exists(url_or_path):
        package_path = download_package(download_dir, url_or_path, ignore_cache)
    path, filename = split(package_path)
    unpack = get_python_unpack_function(filename)
    print("Package file: %s" % package_path)

    unpack_dir = unpack(package_path, download_dir)
    print("Unpacked to: %s" % unpack_dir)

    install_to = destination
    copy_dir(unpack_dir, install_to)
    print("Copied to: %s" % install_to)

    shutil.rmtree(unpack_dir, ignore_errors=True)
    print("Cleaned unpack dir: %s" % unpack_dir)
예제 #5
0
def install_python_package(cache_folder, url_or_path, ignore_cache,
                           destination):
    package_path = url_or_path
    download_dir = get_package_cache_folder_path(cache_folder, url_or_path)
    if not exists(url_or_path):
        package_path = download_package(download_dir, url_or_path,
                                        ignore_cache)
    path, filename = split(package_path)
    unpack = get_python_unpack_function(filename)
    print("Package file: %s" % package_path)

    unpack_dir = unpack(package_path, download_dir)
    print("Unpacked to: %s" % unpack_dir)

    install_to = destination
    copy_dir(unpack_dir, install_to)
    print("Copied to: %s" % install_to)

    shutil.rmtree(unpack_dir, ignore_errors=True)
    print("Cleaned unpack dir: %s" % unpack_dir)