# Path: starterpyth/log.py
# YELLOW = '33'
# 
# GREEN = '32'
# 
# def display(text, color=None, bold=False, newline=True):
#     if not isinstance(text, text_type):
#         text = text.decode('utf-8')
#     if bold and color:
#         text = u("\033[1;{0}m{1}\033[0m").format(color, text)
#     text = u("\033[{0}m{1}\033[0m").format(color, text)
#     if newline:
#         text += u('\n')
#     end = u('')
#     if __encode_stdout:
#         text = text.encode('utf-8')
#         end = b('')
#     print_(text, end=end)


from starterpyth.log import YELLOW, GREEN, display
from six import u
from distutils.core import Command
import abc
import imp
import json
import os.path
import re
import subprocess
            found_dependencies_.add(name)

    for line in u(stdout).splitlines():
        (src, dst) = json.loads(line.replace("(", "[").replace(")", "]").replace("'", '"').replace('None', 'null'))
        add_dependence(python_root, module_root, found_dependencies, *src)
        add_dependence(python_root, module_root, found_dependencies, *dst)
    return found_dependencies, missing_dependencies


class Dependencies(Command):
    description = 'Display a list of found dependencies'
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        install_requires = set(self.distribution.install_requires)
        module_name = self.distribution.get_name()
        msg = 'Looking for dependencies of %(module_name)s...' % {'module_name': module_name}
        display(msg, color=GREEN)
        found_dependencies, missing_dependencies = find_dependencies(module_name)
        if found_dependencies:
            display('Found dependencies: ' + ', '.join(found_dependencies), color=GREEN)
            marked_dependencies = filter(lambda x: x not in install_requires, found_dependencies)
            if marked_dependencies:
                display('You should add the following dependencies to your stdeb.cfg and setup.py.:', color=YELLOW)

# Path: starterpyth/log.py
# YELLOW = '33'
# 
# GREEN = '32'
# 
# def display(text, color=None, bold=False, newline=True):
#     if not isinstance(text, text_type):
#         text = text.decode('utf-8')
#     if bold and color:
#         text = u("\033[1;{0}m{1}\033[0m").format(color, text)
#     text = u("\033[{0}m{1}\033[0m").format(color, text)
#     if newline:
#         text += u('\n')
#     end = u('')
#     if __encode_stdout:
#         text = text.encode('utf-8')
#         end = b('')
#     print_(text, end=end)


# Path: starterpyth/commands/dependencies.py
from starterpyth.log import YELLOW, GREEN, display
from six import u
from distutils.core import Command
import abc
import imp
import json
import os.path
import re
import subprocess

            found_dependencies_.add(name)

    for line in u(stdout).splitlines():
        (src, dst) = json.loads(line.replace("(", "[").replace(")", "]").replace("'", '"').replace('None', 'null'))
        add_dependence(python_root, module_root, found_dependencies, *src)
        add_dependence(python_root, module_root, found_dependencies, *dst)
    return found_dependencies, missing_dependencies


class Dependencies(Command):
    description = 'Display a list of found dependencies'
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        install_requires = set(self.distribution.install_requires)
        module_name = self.distribution.get_name()
        msg = 'Looking for dependencies of %(module_name)s...' % {'module_name': module_name}
        display(msg, color=GREEN)
        found_dependencies, missing_dependencies = find_dependencies(module_name)
        if found_dependencies:
            display('Found dependencies: ' + ', '.join(found_dependencies), color=GREEN)
            marked_dependencies = filter(lambda x: x not in install_requires, found_dependencies)
            if marked_dependencies:
                display('You should add the following dependencies to your stdeb.cfg and setup.py.:', color=YELLOW)

                display(', '.join(marked_dependencies), color=YELLOW)