Hacked By AnonymousFox

Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyc

�
�Rec@skdZdZed�ejd�D��ZddlZddlZejddkZeree	Z
nejjd�r�ddlZej
�ddZejd	�r�d
Zqejd�r�dZqd
Zn0ejdkr�ejdkr�d
Zn	ejZddded�Zddded�Zddded�Zddded�Zddded�Zddded�Zddded�Zdefd��YZd�Zd�Zd�Zd�Z ed
kr:yddl!m"Z"eZ#Wq:e$k
r6yddl%Z&e Z#Wq7e$k
r2eZ#q7Xq:Xnd�Z'e(dkrgd Z)d!Z*d2Z+d)eGHd*GHee)e*d+d,�Z,x&e+D]Z-d-e-e.e,e-�fGHq�Wd.GHee)e*�Z,x&e+D]Z-d-e-e.e,e-�fGHq�Wd/GHee)�Z,x&e+D]Z-d-e-e.e,e-�fGHqWd0GHee)d1e�Z,x)e+D]Z-d-e-e.e,e-�fGHqBWndS(3syUtilities for determining application-specific dirs.

See <http://github.com/ActiveState/appdirs> for details and usage.
s1.4.4ccs|]}t|�VqdS(N(tint(t.0tsegment((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pys	<genexpr>st.i����NiitjavatWindowstwin32tMactdarwintlinux2tclitntcCs6tdkr�|dkr!|}n|r-dp0d}tjjt|��}|r|tk	rxtjj|||�}q�tjj||�}qn{tdkr�tjjd�}|rtjj||�}qn<tj	dtjjd��}|rtjj||�}n|r2|r2tjj||�}n|S(	s�Return full path to the user-specific data dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be "<major>.<minor>".
            Only applied when appname is present.
        "roaming" (boolean, default False) can be set True to use the Windows
            roaming appdata directory. That means that for users on a Windows
            network setup for roaming profiles, this user data will be
            sync'd on login. See
            <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>
            for a discussion of issues.

    Typical user data directories are:
        Mac OS X:               ~/Library/Application Support/<AppName>  # or ~/.config/<AppName>, if the other does not exist
        Unix:                   ~/.local/share/<AppName>    # or in $XDG_DATA_HOME, if defined
        Win XP (not roaming):   C:\Documents and Settings\<username>\Application Data\<AppAuthor>\<AppName>
        Win XP (roaming):       C:\Documents and Settings\<username>\Local Settings\Application Data\<AppAuthor>\<AppName>
        Win 7  (not roaming):   C:\Users\<username>\AppData\Local\<AppAuthor>\<AppName>
        Win 7  (roaming):       C:\Users\<username>\AppData\Roaming\<AppAuthor>\<AppName>

    For Unix, we follow the XDG spec and support $XDG_DATA_HOME.
    That means, by default "~/.local/share/<AppName>".
    Rt
CSIDL_APPDATAtCSIDL_LOCAL_APPDATARs~/Library/Application Support/t
XDG_DATA_HOMEs~/.local/shareN(
tsystemtNonetostpathtnormpatht_get_win_foldertFalsetjoint
expandusertgetenv(tappnamet	appauthortversiontroamingtconstR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyt
user_data_dir1s& 	cCs�tdkr�|d	kr!|}ntjjtd��}|r�|tk	rftjj|||�}q~tjj||�}q�ntdkr�tjjd�}|r�tjj||�}q�n�tj	dtj
jddg��}g|jtj
�D]$}tjj|jtj
��^q�}|rp|rEtjj||�}ng|D]}tjj||�^qL}n|r�tj
j|�}n
|d}|S|r�|r�tjj||�}n|S(
siReturn full path to the user-shared data dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be "<major>.<minor>".
            Only applied when appname is present.
        "multipath" is an optional parameter only applicable to *nix
            which indicates that the entire list of data dirs should be
            returned. By default, the first item from XDG_DATA_DIRS is
            returned, or '/usr/local/share/<AppName>',
            if XDG_DATA_DIRS is not set

    Typical site data directories are:
        Mac OS X:   /Library/Application Support/<AppName>
        Unix:       /usr/local/share/<AppName> or /usr/share/<AppName>
        Win XP:     C:\Documents and Settings\All Users\Application Data\<AppAuthor>\<AppName>
        Vista:      (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.)
        Win 7:      C:\ProgramData\<AppAuthor>\<AppName>   # Hidden, but writeable on Win 7.

    For Unix, this is using the $XDG_DATA_DIRS[0] default.

    WARNING: Do not use this on Windows. See the Vista-Fail note above for why.
    RtCSIDL_COMMON_APPDATARs/Library/Application Supportt
XDG_DATA_DIRSs/usr/local/shares
/usr/shareiN(RRRRRRRRRRtpathseptsplittrstriptsep(RRRt	multipathRtxtpathlist((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyt
site_data_dirhs4		=+
cCs�tdkr$t||d|�}n<tjdtjjd��}|r`tjj||�}n|r�|r�tjj||�}n|S(s�Return full path to the user-specific config dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be "<major>.<minor>".
            Only applied when appname is present.
        "roaming" (boolean, default False) can be set True to use the Windows
            roaming appdata directory. That means that for users on a Windows
            network setup for roaming profiles, this user data will be
            sync'd on login. See
            <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>
            for a discussion of issues.

    Typical user config directories are:
        Mac OS X:               same as user_data_dir
        Unix:                   ~/.config/<AppName>     # or in $XDG_CONFIG_HOME, if defined
        Win *:                  same as user_data_dir

    For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME.
    That means, by default "~/.config/<AppName>".
    RRtXDG_CONFIG_HOMEs	~/.config(RRN(RRRRRRRR(RRRRR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pytuser_config_dir�scCstdkrBt||�}|r|rtjj||�}qn�tjd�pTd}g|jtj�D]*}|rjtjj|j	tj
��^qj}|r�|r�tjj||�}ng|D]}tjj||�^q�}n|rtjj|�}n
|d}|S(sReturn full path to the user-shared data dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be "<major>.<minor>".
            Only applied when appname is present.
        "multipath" is an optional parameter only applicable to *nix
            which indicates that the entire list of config dirs should be
            returned. By default, the first item from XDG_CONFIG_DIRS is
            returned, or '/etc/xdg/<AppName>', if XDG_CONFIG_DIRS is not set

    Typical site config directories are:
        Mac OS X:   same as site_data_dir
        Unix:       /etc/xdg/<AppName> or $XDG_CONFIG_DIRS[i]/<AppName> for each value in
                    $XDG_CONFIG_DIRS
        Win *:      same as site_data_dir
        Vista:      (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.)

    For Unix, this is using the $XDG_CONFIG_DIRS[0] default, if multipath=False

    WARNING: Do not use this on Windows. See the Vista-Fail note above for why.
    RRtXDG_CONFIG_DIRSs/etc/xdgi(RR(RR(RRRRR"R!RR#R$(RRRR%RR&R'((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pytsite_config_dir�sC+
cCsgtdkr�|dkr!|}ntjjtd��}tr^t|t�r^t	|�}n|r?|t
k	r�tjj|||�}ntjj||�}|r�tjj|d�}q�q?n{tdkrtjjd�}|r?tjj||�}q?n<tj
dtjjd��}|r?tjj||�}n|rc|rctjj||�}n|S(	sReturn full path to the user-specific cache dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be "<major>.<minor>".
            Only applied when appname is present.
        "opinion" (boolean) can be False to disable the appending of
            "Cache" to the base app data dir for Windows. See
            discussion below.

    Typical user cache directories are:
        Mac OS X:   ~/Library/Caches/<AppName>
        Unix:       ~/.cache/<AppName> (XDG default)
        Win XP:     C:\Documents and Settings\<username>\Local Settings\Application Data\<AppAuthor>\<AppName>\Cache
        Vista:      C:\Users\<username>\AppData\Local\<AppAuthor>\<AppName>\Cache

    On Windows the only suggestion in the MSDN docs is that local settings go in
    the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming
    app data dir (the default returned by `user_data_dir` above). Apps typically
    put cache data somewhere *under* the given dir here. Some examples:
        ...\Mozilla\Firefox\Profiles\<ProfileName>\Cache
        ...\Acme\SuperApp\Cache\1.0
    OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value.
    This can be disabled with the `opinion=False` option.
    RR
tCacheRs~/Library/CachestXDG_CACHE_HOMEs~/.cacheN(RRRRRRtPY3t
isinstancetunicodet_win_path_to_bytesRRRR(RRRtopinionR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pytuser_cache_dirs,!	cCs�tdkr$t||d|�}n<tjdtjjd��}|r`tjj||�}n|r�|r�tjj||�}n|S(sReturn full path to the user-specific state dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be "<major>.<minor>".
            Only applied when appname is present.
        "roaming" (boolean, default False) can be set True to use the Windows
            roaming appdata directory. That means that for users on a Windows
            network setup for roaming profiles, this user data will be
            sync'd on login. See
            <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>
            for a discussion of issues.

    Typical user state directories are:
        Mac OS X:  same as user_data_dir
        Unix:      ~/.local/state/<AppName>   # or in $XDG_STATE_HOME, if defined
        Win *:     same as user_data_dir

    For Unix, we follow this Debian proposal <https://wiki.debian.org/XDGBaseDirectorySpecification#state>
    to extend the XDG spec and support $XDG_STATE_HOME.

    That means, by default "~/.local/state/<AppName>".
    RRtXDG_STATE_HOMEs~/.local/state(RRN(RRRRRRRR(RRRRR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pytuser_state_dirEscCs�tdkr0tjjtjjd�|�}n{tdkrut|||�}t}|r�tjj|d�}q�n6t|||�}t}|r�tjj|d�}n|r�|r�tjj||�}n|S(s�Return full path to the user-specific log dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be "<major>.<minor>".
            Only applied when appname is present.
        "opinion" (boolean) can be False to disable the appending of
            "Logs" to the base app data dir for Windows, and "log" to the
            base cache dir for Unix. See discussion below.

    Typical user log directories are:
        Mac OS X:   ~/Library/Logs/<AppName>
        Unix:       ~/.cache/<AppName>/log  # or under $XDG_CACHE_HOME if defined
        Win XP:     C:\Documents and Settings\<username>\Local Settings\Application Data\<AppAuthor>\<AppName>\Logs
        Vista:      C:\Users\<username>\AppData\Local\<AppAuthor>\<AppName>\Logs

    On Windows the only suggestion in the MSDN docs is that local settings
    go in the `CSIDL_LOCAL_APPDATA` directory. (Note: I'm interested in
    examples of what some windows apps use for a logs dir.)

    OPINION: This function appends "Logs" to the `CSIDL_LOCAL_APPDATA`
    value for Windows and appends "log" to the user cache dir for Unix.
    This can be disabled with the `opinion=False` option.
    Rs~/Library/LogsRtLogstlog(RRRRRRRR4(RRRR3R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pytuser_log_diros  	tAppDirscBs�eZdZd	d	d	eed�Zed��Zed��Zed��Z	ed��Z
ed��Zed��Zed��Z
RS(
s1Convenience wrapper for getting application dirs.cCs1||_||_||_||_||_dS(N(RRRRR%(tselfRRRRR%((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyt__init__�s
				cCs%t|j|jd|jd|j�S(NRR(RRRRR(R;((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyR�scCs%t|j|jd|jd|j�S(NRR%(R(RRRR%(R;((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyR(�scCs%t|j|jd|jd|j�S(NRR(R*RRRR(R;((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyR*�scCs%t|j|jd|jd|j�S(NRR%(R,RRRR%(R;((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyR,�scCst|j|jd|j�S(NR(R4RRR(R;((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyR4�scCst|j|jd|j�S(NR(R6RRR(R;((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyR6�scCst|j|jd|j�S(NR(R9RRR(R;((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyR9�sN(t__name__t
__module__t__doc__RRR<tpropertyRR(R*R,R4R6R9(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyR:�s	cCsqtrddl}nddl}idd6dd6dd6|}|j|jd	�}|j||�\}}|S(
s�This is a fallback technique at best. I'm not sure if using the
    registry for this guarantees us the correct answer for all CSIDL_*
    names.
    i����NtAppDataRsCommon AppDataRs
Local AppDataR
s@Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders(R/twinregt_winregtOpenKeytHKEY_CURRENT_USERtQueryValueEx(t
csidl_nameRCtshell_folder_nametkeytdirttype((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyt_get_win_folder_from_registry�s	cCs�ddlm}m}|jdt||�dd�}yt|�}t}x*|D]"}t|�dkrSt}PqSqSW|r�yddl	}|j
|�}Wq�tk
r�q�XnWntk
r�nX|S(Ni����(tshellcontshellii�(
twin32com.shellRMRNtSHGetFolderPathtgetattrR1RtordtTruetwin32apitGetShortPathNametImportErrortUnicodeError(RGRMRNRJt
has_high_chartcRT((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyt_get_win_folder_with_pywin32�s$!


cCs�ddl}idd6dd6dd6|}|jd�}|jjjd|dd	|�t}x*|D]"}t|�d
krft}PqfqfW|r�|jd�}|jj	j
|j|d�r�|}q�n|jS(Ni����iRi#RiR
iii�(tctypestcreate_unicode_buffertwindlltshell32tSHGetFolderPathWRRRRRStkernel32tGetShortPathNameWtvalue(RGR[tcsidl_consttbufRXRYtbuf2((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyt_get_win_folder_with_ctypess$
cCs=ddl}ddlm}ddlm}|jjd}|jd|�}|jj	}|j
dt|j
|�d|j
j|�|jj|j��jd�}t}x*|D]"}	t|	�dkr�t}Pq�q�W|r9|jd|�}|jj	}
|
j|||�r9|jj|j��jd�}q9n|S(Ni����(tjna(RiRYsi�(tarraytcom.sunRgtcom.sun.jna.platformRtWinDeftMAX_PATHtzerostShell32tINSTANCERPRRQtShlObjtSHGFP_TYPE_CURRENTtNativettoStringttostringR#RRRRStKernel32RU(RGRhRgRtbuf_sizeRdRNRJRXRYtkernel((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyt_get_win_folder_with_jnas&+!
'(R]cCs@x9dD]1}y|j|�SWqttfk
r7qXqW|S(s�Encode Windows paths to bytes. Only used on Python 2.

    Motivation is to be consistent with other operating systems where paths
    are also returned as bytes. This avoids problems mixing bytes and Unicode
    elsewhere in the codebase. For more details and discussion see
    <https://github.com/pypa/pip/issues/3463>.

    If encoding using ASCII and MBCS fails, return the original Unicode path.
    tASCIItMBCS(RyRz(tencodetUnicodeEncodeErrortLookupError(Rtencoding((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyR2Es

t__main__tMyAppt	MyCompanyRR*R4R6R9R(R,s-- app dirs %s --s%-- app dirs (with optional 'version')Rs1.0s%s: %ss)
-- app dirs (without optional 'version')s+
-- app dirs (without optional 'appauthor')s(
-- app dirs (with disabled 'appauthor')R(RR*R4R6R9R(R,(/R?t__version__ttupleR"t__version_info__tsysRtversion_infoR/tstrR1tplatformt
startswithtjava_vertos_nameRtnameRRRR(R*R,RSR4R6R9tobjectR:RLRZRfRxR[R]RRVtcom.sun.jnatcomR2R=RRtpropstdirstpropRQ(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/appdirs.pyt<module>	s�						7B*4=*30				



		





Hacked By AnonymousFox1.0, Coded By AnonymousFox