
    +h                     L    d dl Z d dlZd dlmZ d dlmZ d dlmZ ddZd Z	d Z
y)	    N)loadapp)WSGIApplication)get_default_config_filec                 V    d| vrd| z  } t        | |t        j                         |      S )N:z	config:%s)namerelative_toglobal_conf)r   osgetcwd)
config_urir   defaultss      I/var/www/html/venv/lib/python3.12/site-packages/gunicorn/app/pasterapp.pyget_wsgi_appr      s3    
* :-
IIK	     c                 p    t        j                         }|j                  | g       |j                  d      S )Nloggers)configparserConfigParserreadhas_section)config_fileparsers     r   has_logging_configr      s/    &&(F
KKi((r   c                     |d   j                  dd      j                  dd      }j                  dd      }|r|r|d|d<   n|r|j                  d	      d<    G  fd
dt              } |       j                          y)z    A Paste Deployment server runner.

    Example configuration:

        [server:main]
        use = egg:gunicorn#main
        host = 127.0.0.1
        port = 5000
    __file__configNhost portr   bind,c                   &    e Zd ZfdZ fdZy)&serve.<locals>.PasterServerApplicationc                 x   | j                   j                  d       t              r| j                   j                  d       r| j                         nt	               }|| j                  |       j                         D ]2  \  }}|	| j                   j                  |j                         |       4 y )Ndefault_proc_name	logconfig)cfgsetr   load_config_from_filer   itemslower)selfdefault_gunicorn_config_filekvr   gunicorn_config_file
local_confs       r   load_configz2serve.<locals>.PasterServerApplication.load_config7   s    HHLL,k:!+.[+6#**+?@/F/H,/;../KL"((* /1=HHLLA./r   c                     S )N )r-   apps    r   loadz+serve.<locals>.PasterServerApplication.loadH   s    Jr   N)__name__
__module____qualname__r3   r7   )r6   r   r1   r2   s   r   PasterServerApplicationr$   6   s    	/"	r   r;   )popsplitr   run)r6   r
   r2   r   r    r;   r   r1   s   ` `   @@r   server?   !   s     j)K%>>(D9>>&"%D>>&"%D(,d3
6	!ZZ_
6 / * !!#r   )NN)r   r   paste.deployr   gunicorn.app.wsgiappr   gunicorn.configr   r   r   r?   r5   r   r   <module>rC      s%     	   0 3	)*$r   