コード例 #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)