"""
cPanel / Phusion Passenger entry point — WEB PROCESS ONLY.

Passenger's contract is simple: it imports whatever file "Application startup
file" names, then reads the "Application Entry point" attribute (here,
``application``) off of it. With cPanel's Setup Python App configured as:

    Application startup file : passenger_wsgi.py
    Application Entry point  : application

...Passenger imports exactly THIS file and reads ``application`` from it —
which this file provides by re-exporting from ``wsgi.py``. No further cPanel
setting change is needed; deploying this file (and ``wsgi.py`` beside it) is
enough.

This file is deliberately a THIN re-export rather than building the app
itself, because before a real deploy ever lands, cPanel's "Setup Python App"
scaffolds its own placeholder at this exact path — and that placeholder's
boilerplate does ``load_source('wsgi', 'passenger_wsgi.py')``, i.e. it
re-executes the very file it is running from under a different module name.
If that scaffold is ever what ends up running (an app re-created from
scratch, a startup-file path pointed back at itself, etc.), the app dies with
``RecursionError: maximum recursion depth exceeded`` — infinite self-import.
Keeping the actual application logic in a separate, never-self-referencing
``wsgi.py`` means that even if something regenerates a naive stub at this
path, only THIS thin file is at risk, not the app itself — and importing
``wsgi`` here can never recurse back into this file.
"""

import os
import sys

PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
if PROJECT_DIR not in sys.path:
    sys.path.insert(0, PROJECT_DIR)

from wsgi import application  # noqa: F401  (re-exported for Passenger)
