# Path: unicycler/misc.py
# def get_ascii_art():
#     ascii_art = (bold_red("       __\n") +
#                  bold_red("       \ \___\n") +
#                  bold_red("        \ ___\\\n") +
#                  bold_red("        //\n") +
#                  bold_red("   ____//      ") +
#                  bold_yellow("_    _         _                     _\n") +
#                  bold_red(" //_  //\\\\    ") +
#                  bold_yellow("| |  | |       |_|                   | |\n") +
#                  bold_red("//  \\//  \\\\   ") +
#                  bold_yellow("| |  | | _ __   _   ___  _   _   ___ | |  ___  _ __\n") +
#                  bold_red("||  (O)  ||   ") +
#                  bold_yellow("| |  | || '_ \ | | / __|| | | | / __|| | / _ \| '__|\n") +
#                  bold_red("\\\\    \_ //   ") +
#                  bold_yellow("| |__| || | | || || (__ | |_| || (__ | ||  __/| |\n") +
#                  bold_red(" \\\\_____//     ") +
#                  bold_yellow("\____/ |_| |_||_| \___| \__, | \___||_| \___||_|\n") +
#                  bold_yellow("                                        __/ |\n") +
#                  bold_yellow("                                       |___/"))
#     return ascii_art


import sys
import os
import shutil
import shlex
import subprocess
import multiprocessing
import fnmatch
import importlib.util
    import ez_setup
from distutils.core import Command
from unicycler.misc import get_ascii_art
from setuptools import setup
from setuptools.command.install import install

            # Build Unicycler's C++ code.
            make_cmd = ['make']
            try:
                make_cmd += ['-j', str(min(8, multiprocessing.cpu_count()))]
            except NotImplementedError:
                pass
            if self.makeargs:
                make_cmd += shlex.split(self.makeargs)
            self.execute(lambda: subprocess.call(make_cmd), [],
                         'Compiling Unicycler: ' + ' '.join(make_cmd))
            cpp_code = os.path.join('unicycler', 'cpp_functions.so')
            if not os.path.isfile(cpp_code):
                sys.exit("Error: compilation of Unicycler's C++ component failed")

            install.run(self)

            # Copy non-Python stuff to the installation directory.
            shutil.copyfile(cpp_code, os.path.join(self.install_lib, 'unicycler',
                                                   'cpp_functions.so'))
            gene_data_source_dir = os.path.join('unicycler', 'gene_data')
            gene_data_dest_dir = os.path.join(self.install_lib, 'unicycler', 'gene_data')
            if not os.path.exists(gene_data_dest_dir):
                os.makedirs(gene_data_dest_dir)
            shutil.copyfile(os.path.join(gene_data_source_dir, 'start_genes.fasta'),
                            os.path.join(gene_data_dest_dir, 'start_genes.fasta'))
            shutil.copyfile(os.path.join(gene_data_source_dir, 'lambda_phage.fasta'),
                            os.path.join(gene_data_dest_dir, 'lambda_phage.fasta'))

            # Display a success message!

# Path: unicycler/misc.py
# def get_ascii_art():
#     ascii_art = (bold_red("       __\n") +
#                  bold_red("       \ \___\n") +
#                  bold_red("        \ ___\\\n") +
#                  bold_red("        //\n") +
#                  bold_red("   ____//      ") +
#                  bold_yellow("_    _         _                     _\n") +
#                  bold_red(" //_  //\\\\    ") +
#                  bold_yellow("| |  | |       |_|                   | |\n") +
#                  bold_red("//  \\//  \\\\   ") +
#                  bold_yellow("| |  | | _ __   _   ___  _   _   ___ | |  ___  _ __\n") +
#                  bold_red("||  (O)  ||   ") +
#                  bold_yellow("| |  | || '_ \ | | / __|| | | | / __|| | / _ \| '__|\n") +
#                  bold_red("\\\\    \_ //   ") +
#                  bold_yellow("| |__| || | | || || (__ | |_| || (__ | ||  __/| |\n") +
#                  bold_red(" \\\\_____//     ") +
#                  bold_yellow("\____/ |_| |_||_| \___| \__, | \___||_| \___||_|\n") +
#                  bold_yellow("                                        __/ |\n") +
#                  bold_yellow("                                       |___/"))
#     return ascii_art


# Path: setup.py
import sys
import os
import shutil
import shlex
import subprocess
import multiprocessing
import fnmatch
import importlib.util
    import ez_setup
from distutils.core import Command
from unicycler.misc import get_ascii_art
from setuptools import setup
from setuptools.command.install import install


            # Build Unicycler's C++ code.
            make_cmd = ['make']
            try:
                make_cmd += ['-j', str(min(8, multiprocessing.cpu_count()))]
            except NotImplementedError:
                pass
            if self.makeargs:
                make_cmd += shlex.split(self.makeargs)
            self.execute(lambda: subprocess.call(make_cmd), [],
                         'Compiling Unicycler: ' + ' '.join(make_cmd))
            cpp_code = os.path.join('unicycler', 'cpp_functions.so')
            if not os.path.isfile(cpp_code):
                sys.exit("Error: compilation of Unicycler's C++ component failed")

            install.run(self)

            # Copy non-Python stuff to the installation directory.
            shutil.copyfile(cpp_code, os.path.join(self.install_lib, 'unicycler',
                                                   'cpp_functions.so'))
            gene_data_source_dir = os.path.join('unicycler', 'gene_data')
            gene_data_dest_dir = os.path.join(self.install_lib, 'unicycler', 'gene_data')
            if not os.path.exists(gene_data_dest_dir):
                os.makedirs(gene_data_dest_dir)
            shutil.copyfile(os.path.join(gene_data_source_dir, 'start_genes.fasta'),
                            os.path.join(gene_data_dest_dir, 'start_genes.fasta'))
            shutil.copyfile(os.path.join(gene_data_source_dir, 'lambda_phage.fasta'),
                            os.path.join(gene_data_dest_dir, 'lambda_phage.fasta'))

            # Display a success message!

            print(get_ascii_art())