# Path: binstar_client/utils/yaml.py
# def yaml_load(stream):
#     """Loads a dictionary from a stream"""
#     return safe_load(stream)


import logging
from os import path
from ..utils.yaml import yaml_load
        # Copyright (c) 2012-2014 Continuum Analytics, Inc.

        # TODO: it would be great if the installers had a unique identifier in the header

        # Made by CAS installer
        if "CAS-INSTALLER" in cio_copyright:
            return True

        # miniconda installer
        elif "Copyright" not in cio_copyright:
            return False

        elif "Continuum Analytics, Inc." not in cio_copyright:
            return False

        return True

    return False


def inspect_package(filename, fileobj, *args, **kwarg):
    # skip #!/bin/bash
    line = fileobj.readline()
    lines = []
    while line.startswith('#'):
        if ':' in line:
            lines.append(line.strip(" #\n"))
        line = fileobj.readline()

    try:

# Path: binstar_client/utils/yaml.py
# def yaml_load(stream):
#     """Loads a dictionary from a stream"""
#     return safe_load(stream)


# Path: binstar_client/inspect_package/conda_installer.py
import logging
from os import path
from ..utils.yaml import yaml_load

        # Copyright (c) 2012-2014 Continuum Analytics, Inc.

        # TODO: it would be great if the installers had a unique identifier in the header

        # Made by CAS installer
        if "CAS-INSTALLER" in cio_copyright:
            return True

        # miniconda installer
        elif "Copyright" not in cio_copyright:
            return False

        elif "Continuum Analytics, Inc." not in cio_copyright:
            return False

        return True

    return False


def inspect_package(filename, fileobj, *args, **kwarg):
    # skip #!/bin/bash
    line = fileobj.readline()
    lines = []
    while line.startswith('#'):
        if ':' in line:
            lines.append(line.strip(" #\n"))
        line = fileobj.readline()

    try:

        installer_data = yaml_load("\n".join(lines))