
    2Bh                     N    S SK r S SKrS SKJr  S SKJr  S SKJr  SS jrS r	S r
g)	    N)loadapp)WSGIApplication)get_default_config_filec                 V    SU ;  a  SU -  n [        U U[        R                  " 5       US9$ )N:z	config:%s)namerelative_toglobal_conf)r   osgetcwd)
config_urir   defaultss      H/var/www/html/env/lib/python3.13/site-packages/gunicorn/app/pasterapp.pyget_wsgi_appr      s3    
* :-
IIK	     c                 r    [         R                  " 5       nUR                  U /5        UR                  S5      $ )Nloggers)configparserConfigParserreadhas_section)config_fileparsers     r   has_logging_configr      s/    &&(F
KKi((r   c                 B  ^ ^^^ US   mTR                  SS5      mTR                  SS5      nTR                  SS5      nU(       a  U(       a  U< SU< 3TS'   OU(       a  UR                  S	5      TS'    " U UUU4S
 jS[        5      nU" 5       R                  5         g)zA 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                   2   > \ rS rSrUUU4S jrU 4S jrSrg)&serve.<locals>.PasterServerApplication5   c                   > U R                   R                  ST5        [        T5      (       a  U R                   R                  ST5        T(       a  U R                  T5        O[	        5       nUb  U R                  U5        TR                  5        H4  u  p#Uc  M
  U R                   R                  UR                  5       U5        M6     g )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_config2serve.<locals>.PasterServerApplication.load_config6   s    HHLL,k:!+..[+6#**+?@/F/H,/;../KL"((*=HHLLA. +r   c                    > T$ )N )r.   apps    r   load+serve.<locals>.PasterServerApplication.loadG   s    Jr   r7   N)__name__
__module____qualname____firstlineno__r4   r9   __static_attributes__)r8   r   r2   r3   s   r   PasterServerApplicationr$   5   s    	/"	 	r   r@   )popsplitr   run)r8   r
   r3   r   r    r@   r   r2   s   ` `   @@r   serverD       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   rD   r7   r   r   <module>rH      s%   
  	   0 3	)*$r   