a
    0f	                     @   s   U d dl 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eed< edd	d
ZeeedddZedddZze Zeje ed< W n ey   ejZY n0 e jddedddZdS )    N)InstallationError)appdirs)running_under_virtualenvpippurelib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   U/var/www/ai-form-bot/venv/lib/python3.9/site-packages/pip/_internal/locations/base.pyget_major_minor_version   s    r   )new_rootpathnamer   c                 C   s   t jdkr<t j|s$t j| |S t j| |dd S nRt jdkr|t j|\}}|d dkrn|dd }t j| |S tdt j ddS )	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} n4ztjt d} W n tyJ   td Y n0 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_prefix7   s    r$   	user_site)maxsizec                   C   s   t tdS )NPYTHONFRAMEWORK)bool	sysconfigget_config_varr   r   r   r   is_osx_frameworkO   s    r+   )	functoolsr   siter
   r)   typingpip._internal.exceptionsr   Zpip._internal.utilsr   pip._internal.utils.virtualenvr   user_cache_dirUSER_CACHE_DIRget_pathr   str__annotations__r   r   r$   getusersitepackagesr%   OptionalAttributeError	USER_SITE	lru_cacher(   r+   r   r   r   r   <module>   s&   


