#     Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
#
#     Part of "Nuitka", an optimizing Python compiler that is compatible and
#     integrates with CPython, but also works on its own.
#
#     Licensed under the Apache License, Version 2.0 (the "License");
#     you may not use this file except in compliance with the License.
#     You may obtain a copy of the License at
#
#        http://www.apache.org/licenses/LICENSE-2.0
#
#     Unless required by applicable law or agreed to in writing, software
#     distributed under the License is distributed on an "AS IS" BASIS,
#     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#     See the License for the specific language governing permissions and
#     limitations under the License.
#
""" Ignore listing of modules that are not found, but probably that's acceptable.

"""

import sys

from nuitka.Errors import NuitkaOptimizationError


def getModuleIgnoreList():
    return (
        "mac",
        "nt",
        "os2",
        "posix",
        "_emx_link",
        "riscos",
        "ce",
        "riscospath",
        "riscosenviron",
        "Carbon.File",
        "org.python.core",
        "_sha",
        "_sha256",
        "array",
        "_sha512",
        "_md5",
        "_subprocess",
        "msvcrt",
        "cPickle",
        "marshal",
        "imp",
        "sys",
        "itertools",
        "cStringIO",
        "time",
        "zlib",
        "thread",
        "math",
        "errno",
        "operator",
        "signal",
        "gc",
        "exceptions",
        "win32process",
        "unicodedata",
        "__builtin__",
        "fcntl",
        "_socket",
        "_ssl",
        "pwd",
        "spwd",
        "_random",
        "grp",
        "_io",
        "_string",
        "select",
        "__main__",
        "_winreg",
        "_warnings",
        "_sre",
        "_functools",
        "_hashlib",
        "_collections",
        "_locale",
        "_codecs",
        "_weakref",
        "_struct",
        "_dummy_threading",
        "binascii",
        "datetime",
        "_ast",
        "xxsubtype",
        "_bytesio",
        "cmath",
        "_fileio",
        "aetypes",
        "aepack",
        "MacOS",
        "cd",
        "cl",
        "gdbm",
        "gl",
        "GL",
        "aetools",
        "_bisect",
        "_heapq",
        "_symtable",
        "syslog",
        "_datetime",
        "_elementtree",
        "_pickle",
        "_posixsubprocess",
        "_thread",
        "atexit",
        "pyexpat",
        "_imp",
        "_sha1",
        "faulthandler",
        "_osx_support",
        "sysconfig",
        "copyreg",
        "ipaddress",
        "reprlib",
        "win32event",
        "win32file",
        # Python-Qt4 does these if missing python3 parts:
        "PyQt4.uic.port_v3.string_io",
        "PyQt4.uic.port_v3.load_plugin",
        "PyQt4.uic.port_v3.ascii_upper",
        "PyQt4.uic.port_v3.proxy_base",
        "PyQt4.uic.port_v3.as_string",
        # CPython3 does these:
        "builtins",
        "UserDict",
        "os.path",
        "StringIO",
        # "test_array",
        "_testcapi",
        # test_applesingle.py
        "applesingle",
        # test_buffer.py
        "_testbuffer",
        # test_bsddb.py
        "bsddb.test",
        # test_collections.py
        "collections.abc",
        # test_compile.py
        "__package__.module",
        "__mangled_mod",
        "__package__",
        # test_ctypes
        "ctypes.test",
        # test_dbm.py
        "dbm.dumb",
        # test_dbm_ndbm.py
        "dbm.ndbm",
        # test_distutils.py
        "distutils.tests",
        "distutils.mwerkscompiler",
        # test_docxmlrpc.py
        "xmlrpc",
        # test_emails.py
        "email.test.test_email",
        "email.test.test_email_renamed",
        "email.test.test_email_codecs",
        # test_email_codecs.py
        "email.test",
        # test_enum.py
        "enum",
        # test_file.py
        "_pyio",
        # test_frozen.py
        "__hello__",
        "__phello__",