zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
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
U
G=®dXã@s˜dZddlZddlZddlmZddlmZddlmZddl    m
Z
ddl m Z m Z ddlmZddlZe d    ¡ZGd
d „d eƒZGd d „d ee ƒZdS)zRdistutils.command.build_scripts
 
Implements the Distutils 'build_scripts' command.éN)ÚST_MODE)Ú    sysconfig)ÚCommand)Únewer)Ú convert_pathÚ    Mixin2to3)Úlogs^#!.*python[0-9.]*([     ].*)?$c@sHeZdZdZdddgZdgZdd„Zdd    „Zd
d „Zd d „Z    dd„Z
dS)Ú build_scriptsz("build" scripts (copy and fixup #! line))z
build-dir=Údzdirectory to "build" (copy) to)ÚforceÚfz1forcibly build everything (ignore file timestamps)z executable=Úez*specify final destination interpreter pathr cCs"d|_d|_d|_d|_d|_dS©N)Ú    build_dirÚscriptsr Ú
executableÚoutfiles©Úself©rúbD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\setuptools/_distutils/command/build_scripts.pyÚinitialize_optionss
z build_scripts.initialize_optionscCs| dddd¡|jj|_dS)NÚbuild)r    r)r r )rr)Úset_undefined_optionsÚ distributionrrrrrÚfinalize_options%s ýzbuild_scripts.finalize_optionscCs|jSr)rrrrrÚget_source_files,szbuild_scripts.get_source_filescCs|js
dS| ¡dSr)rÚ copy_scriptsrrrrÚrun/szbuild_scripts.runc
Cs´| |j¡g}g}|jD]}d}t|ƒ}tj |jtj |¡¡}| |¡|j    slt
||ƒslt   d|¡qzt |dƒ}Wn tk
rš|js’‚d}YnXXt |j¡\}}| d¡| ¡}    |    sÒ| d|¡qt |    ¡}
|
ròd}|
 d¡pðd    } |rt  d
||j¡| |¡|jstjs*|j} n(tj t d ¡d t d ¡t d¡f¡} t | ¡} d| | d} z|  d¡Wn$tk
ržt d !| ¡ƒ‚YnXz|  |¡Wn&tk
rÔt d !| |¡ƒ‚YnXt |dƒ}| "| ¡| #| $¡¡W5QRX|r8| %¡q|r"| %¡| |¡| &||¡qtj'dkr¬|D]`}|jrdt  d|¡nDt (|¡t)d@}|dBd@}||krJt  d|||¡t *||¡qJ||fS)a"Copy each script listed in 'self.scripts'; if it's marked as a
        Python script in the Unix way (first line matches 'first_line_re',
        ie. starts with "\#!" and contains "python"), then adjust the first
        line to refer to the current Python interpreter as we copy.
        Fznot copying %s (up-to-date)ÚrbNrz%s is an empty file (skipping)Téózcopying and adjusting %s -> %sÚBINDIRz
python%s%sÚVERSIONÚEXEs#!ó
zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})ÚwbÚposixzchanging mode of %siÿimz!changing mode of %s from %o to %o)+ÚmkpathrrrÚosÚpathÚjoinÚbasenameÚappendr rrÚdebugÚopenÚOSErrorÚdry_runÚtokenizeÚdetect_encodingÚreadlineÚseekÚwarnÚ first_line_reÚmatchÚgroupÚinforÚ python_buildrÚget_config_varÚfsencodeÚdecodeÚUnicodeDecodeErrorÚ
ValueErrorÚformatÚwriteÚ
writelinesÚ    readlinesÚcloseÚ    copy_fileÚnameÚstatrÚchmod)rrÚ updated_filesÚscriptÚadjustÚoutfiler ÚencodingÚlinesÚ
first_liner8Ú post_interprÚshebangÚoutfÚfileZoldmodeZnewmoderrrr5s¦  
 
 
 
ÿ
 
ÿþ
ÿÿ
þÿ
 
 
 
 
ÿzbuild_scripts.copy_scriptsN) Ú__name__Ú
__module__Ú __qualname__Ú descriptionÚ user_optionsÚboolean_optionsrrrrrrrrrr    sýr    c@seZdZdd„ZdS)Úbuild_scripts_2to3cCs&t |¡\}}|js| |¡||fSr)r    rr1Úrun_2to3)rrrJrrrrœs
zbuild_scripts_2to3.copy_scriptsN)rUrVrWrrrrrr[šsr[)Ú__doc__r)ÚrerHrÚ    distutilsrÚdistutils.corerÚdistutils.dep_utilrÚdistutils.utilrrrr2Úcompiler7r    r[rrrrÚ<module>s