1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
U
G=®dÛã@s<dZddlZddlmZddlmZdZGdd„deƒZdS)zdistutils.pypirc
 
Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
éN)ÚRawConfigParser)ÚCommandzE[distutils]
index-servers =
    pypi
 
[pypi]
username:%s
password:%s
c@sheZdZdZdZdZdZdZdddefdgZd    gZ    d
d „Z
d d „Z dd„Z dd„Z dd„Zdd„ZdS)Ú PyPIRCCommandz;Base command that knows how to handle the .pypirc file
    zhttps://upload.pypi.org/legacy/ÚpypiNz repository=Úrzurl of repository [default: %s])ú show-responseNz&display full response text from serverrcCstj tj d¡d¡S)zReturns rc file path.ú~z.pypirc)ÚosÚpathÚjoinÚ
expanduser©Úself©rúSD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\setuptools/_distutils/config.pyÚ _get_rc_file&szPyPIRCCommand._get_rc_filec    CsH| ¡}t t |tjtjBd¡d¡}| t||f¡W5QRXdS)zCreates a default .pypirc file.i€ÚwN)rr    ÚfdopenÚopenÚO_CREATÚO_WRONLYÚwriteÚDEFAULT_PYPIRC)rÚusernameÚpasswordÚrcÚfrrrÚ _store_pypirc*s zPyPIRCCommand._store_pypircc Csœ| ¡}tj |¡r˜| d|¡|jp.|j}tƒ}| |¡|     ¡}d|krF| 
dd¡}dd„|  d¡Dƒ}|gkrŽd|krŠdg}niS|D]°}d|i}| 
|d    ¡|d    <d
|jfd |j fd fD].\}    }
|  ||    ¡rê| 
||    ¡||    <qÄ|
||    <qÄ|dkr ||jdfkr |j|d
<|S|d|ks:|d
|kr’|Sq’nRd |kr˜d }|  |d
¡rp| 
|d
¡}n|j}| 
|d    ¡| 
|d¡|||j dœSiS)zReads the .pypirc file.zUsing PyPI login from %sÚ    distutilsz index-serverscSs g|]}| ¡dkr| ¡‘qS)Ú)Ústrip)Ú.0ÚserverrrrÚ
<listcomp>=s þz.PyPIRCCommand._read_pypirc.<locals>.<listcomp>Ú
rr"rÚ
repositoryÚrealm)rNz server-loginr)rrr%r"r&)rr    r
ÚexistsÚannouncer%ÚDEFAULT_REPOSITORYrÚreadÚsectionsÚgetÚsplitÚ DEFAULT_REALMÚ
has_option) rrr%Úconfigr+Ú index_serversÚ_serversr"ÚcurrentÚkeyÚdefaultrrrÚ _read_pypirc0sb 
 
 ÿÿý  
 
 ÿ
 
ÿ 
 
 
üzPyPIRCCommand._read_pypirccCs8ddl}| dd¡}| |¡d dd¡}| ¡ |¡S)z%Read and decode a PyPI HTTP response.rNz content-typez
text/plainéÚcharsetÚascii)ÚcgiÚ    getheaderÚ parse_headerr,r*Údecode)rÚresponser:Ú content_typeÚencodingrrrÚ_read_pypi_responseps z!PyPIRCCommand._read_pypi_responsecCsd|_d|_d|_dS)zInitialize options.Nr)r%r&Ú show_responser rrrÚinitialize_optionswsz PyPIRCCommand.initialize_optionscCs(|jdkr|j|_|jdkr$|j|_dS)zFinalizes options.N)r%r)r&r.r rrrÚfinalize_options}s
 
zPyPIRCCommand.finalize_options)Ú__name__Ú
__module__Ú __qualname__Ú__doc__r)r.r%r&Ú user_optionsÚboolean_optionsrrr6rArCrDrrrrrs&ÿÿü@r)rHr    Ú configparserrÚ distutils.cmdrrrrrrrÚ<module>s