import pathlib, re
from ast import literal_eval
from setuptools import setup

HERE = pathlib.Path(__file__).parent

# Lookup version
version_search_pattern = re.compile('^__version__[ ]*=[ ]*((?:\'[^\']+\')|(?:\"[^\"]+\"))[ ]*$', re.M)
parsed = version_search_pattern.search((HERE / 'hata' / '__init__.py').read_text())
if parsed is None:
    raise RuntimeError('No version found in `__init__.py`.')

version = literal_eval(parsed.group(1))

# Lookup readme
README = (HERE / 'README.md').read_text('utf-8')

setup(
    name = 'hata',
    version = version,
    packages = [
        'hata',
        'hata.discord',
        'hata.discord.activity',
        'hata.discord.activity.activity',
        'hata.discord.activity.activity_assets',
        'hata.discord.activity.activity_field_base',
        'hata.discord.activity.activity_metadata',
        'hata.discord.activity.activity_party',
        'hata.discord.activity.activity_secrets',
        'hata.discord.activity.activity_timestamps',
        'hata.discord.allowed_mentions',
        'hata.discord.ansi_format',
        'hata.discord.application',
        'hata.discord.application.application',
        'hata.discord.application.application_entity',
        'hata.discord.application.application_executable',
        'hata.discord.application.application_install_parameters',
        'hata.discord.application.application_integration_type_configuration',
        'hata.discord.application.application_role_connection',
        'hata.discord.application.application_role_connection_metadata',
        'hata.discord.application.client_platform_configuration',
        'hata.discord.application.embedded_activity_configuration',
        'hata.discord.application.entitlement',
        'hata.discord.application.eula',
        'hata.discord.application.sku',
        'hata.discord.application.sku_enhancement',
        'hata.discord.application.sku_enhancement_guild',
        'hata.discord.application.subscription',
        'hata.discord.application.team',
        'hata.discord.application.team_member',
        'hata.discord.application.third_party_sku',
        'hata.discord.application_command',
        'hata.discord.application_command.application_command',
        'hata.discord.application_command.application_command_option',
        'hata.discord.application_command.application_command_option_choice',
        'hata.discord.application_command.application_command_option_metadata',
        'hata.discord.application_command.application_command_permission',
        'hata.discord.application_command.application_command_permission_overwrite',
        'hata.discord.audit_logs',
        'hata.discord.audit_logs.audit_log',
        'hata.discord.audit_logs.audit_log_change',
        'hata.discord.audit_logs.audit_log_entry',
        'hata.discord.audit_logs.audit_log_entry_change_conversion',
        'hata.discord.audit_logs.audit_log_entry_change_conversions',
        'hata.discord.audit_logs.audit_log_entry_detail_conversion',
        'hata.discord.audit_logs.audit_log_entry_detail_conversions',
        'hata.discord.audit_logs.audit_log_iterator',
        'hata.discord.audit_logs.audit_log_role',
        'hata.discord.audit_logs.conversion_helpers',
        'hata.discord.auto_moderation',
        'hata.discord.auto_moderation.action',
        'hata.discord.auto_moderation.action_metadata',
        'hata.discord.auto_moderation.execution_event',
        'hata.discord.auto_moderation.rule',
        'hata.discord.auto_moderation.trigger_metadata',
        'hata.discord.bases',
        'hata.discord.bases.entity',
        'hata.discord.bases.event',
        'hata.discord.bases.flags',
        'hata.discord.bases.place_holder',
        'hata.discord.bases.preinstanced',
        'hata.discord.bin',
        'hata.discord.builder',
        'hata.discord.builder.conversions',
        'hata.discord.channel',
        'hata.discord.channel.channel',
        'hata.discord.channel.channel_metadata',
        'hata.discord.channel.forum_tag',
        'hata.discord.channel.forum_tag_change',
        'hata.discord.channel.forum_tag_update',
        'hata.discord.channel.permission_overwrite',
        'hata.discord.channel.voice_channel_effect',
        'hata.discord.client',
        'hata.discord.client.compounds',
        'hata.discord.component',
        'hata.discord.component.component',
        'hata.discord.component.component_metadata',
        'hata.discord.component.entity_select_default_value',
        'hata.discord.component.interaction_component',
        'hata.discord.component.interaction_component_metadata',
        'hata.discord.component.interaction_form',
        'hata.discord.component.media_info',
        'hata.discord.component.media_item',
        'hata.discord.component.string_select_option',
        'hata.discord.embed',
        'hata.discord.embed.embed',
        'hata.discord.embed.embed_author',
        'hata.discord.embed.embed_field',
        'hata.discord.embed.embed_field_base',
        'hata.discord.embed.embed_footer',
        'hata.discord.embed.embed_image',
        'hata.discord.embed.embed_provider',
        'hata.discord.embed.embed_thumbnail',
        'hata.discord.embed.embed_video',
        'hata.discord.embedded_activity',
        'hata.discord.embedded_activity.embedded_activity',
        'hata.discord.embedded_activity.embedded_activity_location',
        'hata.discord.embedded_activity.embedded_activity_user_state',
        'hata.discord.emoji',
        'hata.discord.emoji.emoji',
        'hata.discord.emoji.parsing',
        'hata.discord.emoji.reaction',
        'hata.discord.emoji.reaction_events',
        'hata.discord.emoji.reaction_mapping',
        'hata.discord.emoji.reaction_mapping_line',
        'hata.discord.emoji.unicode',
        'hata.discord.events',
        'hata.discord.events.event_handler_plugin',
        'hata.discord.events.soundboard_sounds_event_handler',
        'hata.discord.exceptions',
        'hata.discord.gateway',
        'hata.discord.guild',
        'hata.discord.guild.ban_add_multiple_result',
        'hata.discord.guild.ban_entry',
        'hata.discord.guild.discovery',
        'hata.discord.guild.discovery_category',
        'hata.discord.guild.guild',
        'hata.discord.guild.guild_activity_overview',
        'hata.discord.guild.guild_activity_overview_activity',
        'hata.discord.guild.guild_activity_overview_tag',
        'hata.discord.guild.guild_badge',
        'hata.discord.guild.guild_boost',
        'hata.discord.guild.guild_enhancement_entitlements_create_event',
        'hata.discord.guild.guild_enhancement_entitlements_delete_event',
        'hata.discord.guild.guild_incidents',
        'hata.discord.guild.guild_inventory_settings',
        'hata.discord.guild.guild_join_request',
        'hata.discord.guild.guild_join_request_delete_event',
        'hata.discord.guild.guild_join_request_form_response',
        'hata.discord.guild.guild_preview',
        'hata.discord.guild.guild_user_chunk_event',
        'hata.discord.guild.guild_widget',
        'hata.discord.guild.guild_widget_channel',
        'hata.discord.guild.guild_widget_user',
        'hata.discord.guild.verification_screen',
        'hata.discord.guild.verification_screen_step',
        'hata.discord.guild.welcome_screen',
        'hata.discord.guild.welcome_screen_channel',
        'hata.discord.http',
        'hata.discord.integration',
        'hata.discord.integration.integration',
        'hata.discord.integration.integration_account',
        'hata.discord.integration.integration_application',
        'hata.discord.integration.integration_metadata',
        'hata.discord.interaction',
        'hata.discord.interaction.interaction_event',
        'hata.discord.interaction.interaction_metadata',
        'hata.discord.interaction.interaction_option',
        'hata.discord.interaction.responding',
        'hata.discord.invite',
        'hata.discord.invite.invite',
        'hata.discord.localization',
        'hata.discord.message',
        'hata.discord.message.attachment',
        'hata.discord.message.message',
        'hata.discord.message.message_activity',
        'hata.discord.message.message_application',
        'hata.discord.message.message_builder',
        'hata.discord.message.message_builder.conversions',
        'hata.discord.message.message_call',
        'hata.discord.message.message_interaction',
        'hata.discord.message.message_role_subscription',
        'hata.discord.message.message_snapshot',
        'hata.discord.message.poll_change',
        'hata.discord.message.poll_update',
        'hata.discord.message.voice_attachment',
        'hata.discord.oauth2',
        'hata.discord.oauth2.connection',
        'hata.discord.oauth2.oauth2_access',
        'hata.discord.oauth2.oauth2_user',
        'hata.discord.onboarding',
        'hata.discord.onboarding.onboarding_prompt',
        'hata.discord.onboarding.onboarding_prompt_option',
        'hata.discord.onboarding.onboarding_screen',
        'hata.discord.permission',
        'hata.discord.poll',
        'hata.discord.poll.poll',
        'hata.discord.poll.poll_answer',
        'hata.discord.poll.poll_events',
        'hata.discord.poll.poll_question',
        'hata.discord.poll.poll_result',
        'hata.discord.resolved',
        'hata.discord.resolved.resolved',
        'hata.discord.resolved.resolver',
        'hata.discord.role',
        'hata.discord.role.role',
        'hata.discord.role.role_color_configuration',
        'hata.discord.role.role_manager_metadata',
        'hata.discord.scheduled_event',
        'hata.discord.scheduled_event.schedule',
        'hata.discord.scheduled_event.schedule_nth_weeks_day',
        'hata.discord.scheduled_event.scheduled_event',
        'hata.discord.scheduled_event.scheduled_event_occasion_overwrite',
        'hata.discord.scheduled_event.scheduled_event_occasion_overwrite_create_event',
        'hata.discord.scheduled_event.scheduled_event_occasion_overwrite_delete_event',
        'hata.discord.scheduled_event.scheduled_event_occasion_overwrite_update_event',
        'hata.discord.scheduled_event.scheduled_event_entity_metadata',
        'hata.discord.scheduled_event.scheduled_event_subscribe_event',
        'hata.discord.scheduled_event.scheduled_event_unsubscribe_event',
        'hata.discord.soundboard',
        'hata.discord.soundboard.soundboard_sound',
        'hata.discord.soundboard.soundboard_sounds_event',
        'hata.discord.stage',
        'hata.discord.stage.stage',
        'hata.discord.sticker',
        'hata.discord.sticker.sticker',
        'hata.discord.sticker.sticker_pack',
        'hata.discord.user',
        'hata.discord.user.activity_change',
        'hata.discord.user.activity_update',
        'hata.discord.user.avatar_decoration',
        'hata.discord.user.guild_profile',
        'hata.discord.user.name_plate',
        'hata.discord.user.status_by_platform',
        'hata.discord.user.thread_profile',
        'hata.discord.user.user',
        'hata.discord.user.voice_state',
        'hata.discord.voice',
        'hata.discord.voice.audio_settings',
        'hata.discord.voice.encryption_adapters',
        'hata.discord.voice.packets',
        'hata.discord.webhook',
        'hata.discord.webhook.webhook',
        'hata.discord.webhook.webhook_source_channel',
        'hata.discord.webhook.webhook_source_guild',
        'hata.env',
        'hata.ext',
        'hata.ext.asyncio',
        'hata.ext.command_utils',
        'hata.ext.commands_v2',
        'hata.ext.commands_v2.helps',
        'hata.ext.patchouli',
        'hata.ext.plugin_auto_reloader',
        'hata.ext.plugin_auto_reloader.utils',
        'hata.ext.plugin_loader',
        'hata.ext.plugin_loader.import_overwrite',
        'hata.ext.plugin_loader.plugin_tree',
        'hata.ext.plugin_loader.snapshot',
        'hata.ext.plugin_loader.utils',
        'hata.ext.kokoro_sqlalchemy',
        'hata.ext.slash',
        'hata.ext.slash.command',
        'hata.ext.slash.command.command_base',
        'hata.ext.slash.command.command_base_application_command',
        'hata.ext.slash.command.command_base_custom_id',
        'hata.ext.slash.command.component_command',
        'hata.ext.slash.command.context_command',
        'hata.ext.slash.command.embedded_activity_launch_command',
        'hata.ext.slash.command.form_submit_command',
        'hata.ext.slash.command.slash_command',
        'hata.ext.slash.conversions',
        'hata.ext.slash.interfaces',
        'hata.ext.slash.parameter_converters',
        'hata.ext.slash.menus',
        'hata.ext.solarlink',
        'hata.ext.top_gg',
        'hata.main',
        'hata.main.commands',
        'hata.main.commands.default',
        'hata.main.commands.default.scaffold',
        'hata.main.commands.default.scaffold.layouts',
        'hata.main.commands.default.scaffold.layouts.package',
        'hata.main.core',
        'hata.main.core.command',
        'hata.utils',
    ],
    url = 'https://github.com/HuyaneMatsu/hata',
    license = 'DBAD',
    author = 'HuyaneMatsu',
    author_email = 're.ism.tm@gmail.com',
    description = 'A powerful asynchronous library for creating Discord bots in Python.',
    long_description = README,
    long_description_content_type = 'text/markdown',
    classifiers = [
        'Development Status :: 5 - Production/Stable',
        
        'Intended Audience :: Developers',
        
        'Operating System :: POSIX :: Linux',
        
        'Programming Language :: Python',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3.9',
        'Programming Language :: Python :: 3.10',
        'Programming Language :: Python :: 3.11',
        
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy',
        
        'Topic :: Communications :: Chat',
        'Topic :: Software Development :: Libraries',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    include_package_data = False,
    package_data = {
        'hata.discord.bin': [
            'libopus-0.x64.dll',
            'libopus-0.x86.dll',
        ],
    },
    python_requires = '>=3.6,<3.12',
    install_requires = [
        'scarletio>=1.0.91',
        'chardet>=2.0',
    ],
    extras_require = {
        'all': [
            'PyNaCl>=1.3.0',
            'cchardet>=2.0',
            'inotify_simple>=1.3.5',
            'python-dateutil>=2.0',
            'snakeviz',
            'yappi',
        ],
        'autoreload': [
            'inotify_simple>=1.3.5',
        ],
        'cpythonspeedups': [
            'cchardet>=2.0',
        ],
        'profiling': [
            'snakeviz',
            'yappi',
        ],
        'relativedelta': [
            'python-dateutil>=2.0',
        ],
        'voice': [
            'PyNaCl>=1.3.0',
            'libnacl',
        ],
    },
    entry_points = {
        'console_scripts': [
            'hata = hata.__main__:__main__'
        ],
    },
)
