"""Setup script for aegra meta-package.

This file exists solely to display a post-install warning.
All package metadata lives in pyproject.toml.
"""

import sys

from setuptools import setup
from setuptools.command.install import install

WARNING = """
╔══════════════════════════════════════════════════════════════════╗
║                                                                  ║
║   WARNING: You installed the 'aegra' meta-package.              ║
║                                                                  ║
║   This package does NOT support version pinning.                ║
║   It always pulls the latest 'aegra-cli' release.              ║
║                                                                  ║
║   For production, install aegra-cli directly:                   ║
║                                                                  ║
║       pip install aegra-cli                                     ║
║                                                                  ║
║   See: https://github.com/ibbybuilds/aegra                     ║
║                                                                  ║
╚══════════════════════════════════════════════════════════════════╝
"""


class PostInstallWarning(install):
    """Custom install command that prints a warning after installation."""

    def run(self) -> None:
        install.run(self)
        print(WARNING, file=sys.stderr)


setup(cmdclass={"install": PostInstallWarning})
