# Path: gsdview/info.py
# def all_versions_str():
# 
# Path: gsdview/appsite.py
#     LIBDIR = os.path.abspath(os.path.dirname(__file__))
#     GSDVIEWROOT = os.path.normpath(os.path.join(LIBDIR, os.pardir))
#     SYSPLUGINSDIR = os.path.join(LIBDIR, 'plugins')
#         GSDVIEWROOT = os.path.abspath(sys._MEIPASS)
#         GSDVIEWROOT = os.path.dirname(os.path.abspath(sys.executable))
#     SYSPLUGINSDIR = os.path.join(GSDVIEWROOT, 'plugins')
# DATADIR = GSDVIEWROOT
# DOCSDIR = os.path.join(GSDVIEWROOT, 'doc')
# LICENSEFILE = os.path.join(GSDVIEWROOT, 'LICENSE.txt')
# USERCONFIGDIR = os.path.expanduser(os.path.join('~', '.gsdview'))
# 
# Path: gsdview/compat.py
# def linux_distribution(full_distribution_name=True):
#     try:
#         # Python < 3.8
#         from platform import linux_distribution
#         return linux_distribution(
#             full_distribution_name=full_distribution_name)
#     except ImportError:
#         pass
# 
#     try:
#         from distro import linux_distribution
#         return linux_distribution(
#             full_distribution_name=full_distribution_name)
#     except ImportError:
#         pass
# 
#     # TODO: use platform.freedesktop_os_release for Python >= 3.10
# 
#     return '', '', ''


import os
import sys
import stat
import uuid
import locale
import platform
import traceback
import email.utils  # @TODO: check
    import pkg_resources
    import logging
from gsdview import info
from gsdview import appsite
from gsdview.compat import linux_distribution
    """

    if package:
        if not hasattr(sys, 'frozen'):  # not packed
            return _getresource(resource, package)
        else:
            m = __import__(package)
            # if '.pyz' not in m.__file__:
            if os.path.exists(m.__file__):
                return _getresource(resource, package)
            else:
                datadir = appsite.DATADIR
    else:
        datadir = appsite.DATADIR

    return os.path.join(datadir, resource)


def format_platform_info():
    platform_info = [
        'architecture: %s %s\n' % platform.architecture(),
        'machine: %s\n' % platform.machine(),
        'platform: %s\n' % platform.platform(),
    ]
    libc_ver = '%s: %s\n' % platform.libc_ver()
    if libc_ver.strip():
        platform_info.append(libc_ver)

    if linux_distribution() != ('', '', ''):
        platform_info.append('GNU/Linux: %s\n' %

# Path: gsdview/info.py
# def all_versions_str():
# 
# Path: gsdview/appsite.py
#     LIBDIR = os.path.abspath(os.path.dirname(__file__))
#     GSDVIEWROOT = os.path.normpath(os.path.join(LIBDIR, os.pardir))
#     SYSPLUGINSDIR = os.path.join(LIBDIR, 'plugins')
#         GSDVIEWROOT = os.path.abspath(sys._MEIPASS)
#         GSDVIEWROOT = os.path.dirname(os.path.abspath(sys.executable))
#     SYSPLUGINSDIR = os.path.join(GSDVIEWROOT, 'plugins')
# DATADIR = GSDVIEWROOT
# DOCSDIR = os.path.join(GSDVIEWROOT, 'doc')
# LICENSEFILE = os.path.join(GSDVIEWROOT, 'LICENSE.txt')
# USERCONFIGDIR = os.path.expanduser(os.path.join('~', '.gsdview'))
# 
# Path: gsdview/compat.py
# def linux_distribution(full_distribution_name=True):
#     try:
#         # Python < 3.8
#         from platform import linux_distribution
#         return linux_distribution(
#             full_distribution_name=full_distribution_name)
#     except ImportError:
#         pass
# 
#     try:
#         from distro import linux_distribution
#         return linux_distribution(
#             full_distribution_name=full_distribution_name)
#     except ImportError:
#         pass
# 
#     # TODO: use platform.freedesktop_os_release for Python >= 3.10
# 
#     return '', '', ''


# Path: gsdview/utils.py
import os
import sys
import stat
import uuid
import locale
import platform
import traceback
import email.utils  # @TODO: check
    import pkg_resources
    import logging
from gsdview import info
from gsdview import appsite
from gsdview.compat import linux_distribution

    """

    if package:
        if not hasattr(sys, 'frozen'):  # not packed
            return _getresource(resource, package)
        else:
            m = __import__(package)
            # if '.pyz' not in m.__file__:
            if os.path.exists(m.__file__):
                return _getresource(resource, package)
            else:
                datadir = appsite.DATADIR
    else:
        datadir = appsite.DATADIR

    return os.path.join(datadir, resource)


def format_platform_info():
    platform_info = [
        'architecture: %s %s\n' % platform.architecture(),
        'machine: %s\n' % platform.machine(),
        'platform: %s\n' % platform.platform(),
    ]
    libc_ver = '%s: %s\n' % platform.libc_ver()
    if libc_ver.strip():
        platform_info.append(libc_ver)

    if linux_distribution() != ('', '', ''):
        platform_info.append('GNU/Linux: %s\n' %

                             ' '.join(linux_distribution()))