build_tools/install_cexts.py
def download_package(
    path, platform, version, implementation, abi, name, pk_version, index_url, filename
):
    """
    Download the package according to platform, python version, implementation and abi.
    """
    if abi == "abi3":
        return_code = download_package_abi3(
            path,
            platform,
            version,
            implementation,
            abi,
            name,
            pk_version,
            index_url,
            filename,
        )

    else:
        return_code = subprocess.call(
            [
                "python",
                "kolibripip.pex",
                "download",
                "-q",
                "-d",
                path,
                "--platform",
                platform,
                "--python-version",
                version,
                "--implementation",
                implementation,
                "--abi",
                abi,
                "-i",
                index_url,
                "{}=={}".format(name, pk_version),
            ]
        )

    # When downloaded as a tar.gz, convert to a wheel file first.
    # This is specifically for pycparser package.
    files = os.listdir(path)
    for file in files:
        if file.endswith("tar.gz"):
            subprocess.call(
                [
                    "python",
                    "kolibripip.pex",
                    "wheel",
                    "-q",
                    "-w",
                    path,
                    os.path.join(path, file),
                    "--no-deps",
                ]
            )
            os.remove(os.path.join(path, file))

    return return_code

    Download the package according to platform, python version, implementation and abi.
    
Download the package according to platform, python version, implementation and abi.
Download the package according to platform python version implementation and abi .
def download_package(
    path, platform, version, implementation, abi, name, pk_version, index_url, filename
):
    if abi == "abi3":
        return_code = download_package_abi3(
            path,
            platform,
            version,
            implementation,
            abi,
            name,
            pk_version,
            index_url,
            filename,
        )
    else:
        return_code = subprocess.call(
            [
                "python",
                "kolibripip.pex",
                "download",
                "-q",
                "-d",
                path,
                "--platform",
                platform,
                "--python-version",
                version,
                "--implementation",
                implementation,
                "--abi",
                abi,
                "-i",
                index_url,
                "{}=={}".format(name, pk_version),
            ]
        )
    files = os.listdir(path)
    for file in files:
        if file.endswith("tar.gz"):
            subprocess.call(
                [
                    "python",
                    "kolibripip.pex",
                    "wheel",
                    "-q",
                    "-w",
                    path,
                    os.path.join(path, file),
                    "--no-deps",
                ]
            )
            os.remove(os.path.join(path, file))
    return return_code
def download_package ( path , platform , version , implementation , abi , name , pk_version , index_url , filename ) : if abi == "abi3" : return_code = download_package_abi3 ( path , platform , version , implementation , abi , name , pk_version , index_url , filename , ) else : return_code = subprocess . call ( [ "python" , "kolibripip.pex" , "download" , "-q" , "-d" , path , "--platform" , platform , "--python-version" , version , "--implementation" , implementation , "--abi" , abi , "-i" , index_url , "{}=={}" . format ( name , pk_version ) , ] ) files = os . listdir ( path ) for file in files : if file . endswith ( "tar.gz" ) : subprocess . call ( [ "python" , "kolibripip.pex" , "wheel" , "-q" , "-w" , path , os . path . join ( path , file ) , "--no-deps" , ] ) os . remove ( os . path . join ( path , file ) ) return return_code
Download the package according to platform, python version, implementation and abi.
Download the package according to platform python version implementation and abi .
"""
    Download the package according to platform, python version, implementation and abi.
    """ # When downloaded as a tar.gz, convert to a wheel file first. # This is specifically for pycparser package.
path
platform
version
implementation
abi
name
pk_version
index_url
filename