
    .Ph              	       $   d Z ddlZddlZddlZddlZddlmZmZm	Z	 ddl
Z
ddlmZ ddlmZ ddlmZ dej        fdZ	 dd	ed
ee         deeef         fdZdde	e         dee         ddfdZedk    r eej        dd         d           dS dS )zInstaller CLI.    N)DictOptionalSequence)SchemeDictionaryDestination)	WheelFile)get_launcher_kindreturnc                  V   t          j                    } |                     dt          d           |                     dddt          d           |                     d	d
dt          d           |                     dddt          g dd           |                     ddd           | S )zConstruct the main parser.wheelzwheel file to install)typehelpz	--destdirz-dpathz6destination directory (prefix to prepend to each file))metavarr   r   z--prefixz-pz&override prefix to install packages toz--compile-bytecodeappendlevel)r         zHgenerate bytecode for the specified optimization level(s) (default=0, 1))actionr   r   choicesr   z--no-compile-bytecode
store_truez-don't generate bytecode for installed modules)r   r   )argparseArgumentParseradd_argumentstrint)parsers    R/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/installer/__main__.py_get_main_parserr      s    $&&F
c0GHHH
E     5     		W     <    
 M    distribution_nameprefixc                     i }|t          j        d          }|sJ n|x|d<   x|d<   }t          j        |          }t          j                            t          j        dd|i          |           |d<   |S )zCCalculate the scheme dictionary for the current Python environment.Nbaseplatbase)varsincludeinstalled_baseheaders)	sysconfigget_config_var	get_pathsosr   joinget_path)r    r!   r%   r'   scheme_dicts        r   _get_scheme_dictr0   1   s     D~"1&99;AAVAtJ'.%4000K
  W\\9,<n+MNNN K	
 r   cli_argsprogramc                    t                      }|r||_        |                    |           }|j        }|j        rg }n|sddg}t          j        |j                  5 }t          t          |j
        |j                  t          j        t                      ||j                  }t!          j        ||i            ddd           dS # 1 swxY w Y   dS )z*Process arguments and perform the install.r   r   )r!   )r/   interpreterscript_kindbytecode_optimization_levelsdestdirN)r   prog
parse_argscompile_bytecodeno_compile_bytecoder   openr   r   r0   distributionr!   sys
executabler   r7   	installerinstall)r1   r2   r   argsbytecode_levelssourcedestinations          r   _mainrF   I   s#   F X&&D+O ! !a&	
	#	# 3v1()<T[QQQ)++)8L
 
 
 	&+r2223 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3s   AC		CC__main__r   zpython -m installer)N)__doc__r   os.pathr,   r>   r)   typingr   r   r   r@   installer.destinationsr   installer.sourcesr   installer.utilsr   r   r   r   r0   rF   __name__argv r   r   <module>rQ      sa       



     + + + + + + + + + +     > > > > > > ' ' ' ' ' ' - - - - - -(1    F 59 $,SM	#s(^   03 3HSM 3HSM 3T 3 3 3 30 z	E#(122,-..... r   