o
    ©„jô	  ã                   @  sÖ   U d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZ d dl	m
Z
 d dlmZ e
 d¡Ze d¡Zded	< ddd„Zddd„Zddd„Zz
e ¡ Zded< W n ey`   ejZY nw ejddd„ƒZdS )é    )ÚannotationsN)ÚInstallationError)Úappdirs)Úrunning_under_virtualenvÚpipÚpurelibÚstrÚsite_packagesÚreturnc                   C  s   dj tjŽ S )ze
    Return the major-minor version of the current Python as a string, e.g.
    "3.7" or "3.10".
    z{}.{})ÚformatÚsysÚversion_info© r   r   úZ/var/www/html/django_cbt/venv/lib/python3.10/site-packages/pip/_internal/locations/base.pyÚget_major_minor_version   s   r   Únew_rootÚpathnamec                 C  sŒ   t jdkrt j |¡st j | |¡S t j | |dd… ¡S t jdkr=t j |¡\}}|d dkr6|dd… }t j | |¡S tdt j› d�ƒ‚)	aQ  Return 'pathname' with 'new_root' prepended.

    If 'pathname' is relative, this is equivalent to os.path.join(new_root, pathname).
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.

    This is borrowed from Python's standard library's distutils module.
    Úposixé   NÚntr   ú\zUnknown platform: z5
Can not change root path prefix on unknown platform.)ÚosÚnameÚpathÚisabsÚjoinÚ
splitdriver   )r   r   Údriver   r   r   r   Úchange_root   s   
	
ÿr   c                  C  sX   t ƒ rtj tjd¡} nztj t ¡ d¡} W n ty%   t d¡ Y nw tj 	| ¡S )NÚsrcz=The folder you are executing pip from can no longer be found.)
r   r   r   r   r   ÚprefixÚgetcwdÚOSErrorÚexitÚabspath)Ú
src_prefixr   r   r   Úget_src_prefix8   s   þr&   z
str | NoneÚ	user_siteÚboolc                   C  s   t t d¡ƒS )NÚPYTHONFRAMEWORK)r(   Ú	sysconfigÚget_config_varr   r   r   r   Úis_osx_frameworkP   s   r,   )r
   r   )r   r   r   r   r
   r   )r
   r(   )Ú
__future__r   Ú	functoolsr   Úsiter   r*   Úpip._internal.exceptionsr   Úpip._internal.utilsr   Úpip._internal.utils.virtualenvr   Úuser_cache_dirÚUSER_CACHE_DIRÚget_pathr	   Ú__annotations__r   r   r&   Úgetusersitepackagesr'   ÚAttributeErrorÚ	USER_SITEÚcacher,   r   r   r   r   Ú<module>   s*    




ÿ