zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
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
50
51
52
53
54
55
U
G=®dÍ ã@sLdZddlZddlZddlZddlmZddlmZdZ    Gdd„deƒZ
dS)zkdistutils.command.install_lib
 
Implements the Distutils 'install_lib' command
(install all Python modules).éN)ÚCommand)ÚDistutilsOptionErrorz.pyc@s„eZdZdZdddddddgZd    d
d gZd d
iZd d„Zdd„Zdd„Z    dd„Z
dd„Z dd„Z dd„Z dd„Zdd„Zdd „Zd!S)"Ú install_libz7install all Python modules (extensions and pure Python))z install-dir=Údzdirectory to install to)z
build-dir=Úbz'build directory (where to install from))ÚforceÚfz-force installation (overwrite existing files))ÚcompileÚczcompile .py to .pyc [default])ú
no-compileNzdon't compile .py files)z    optimize=ÚOzlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])ú
skip-buildNzskip the build stepsrr    r r cCs(d|_d|_d|_d|_d|_d|_dS)Nr)Ú install_dirÚ    build_dirrr    ÚoptimizeÚ
skip_build©Úself©rú`D:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\setuptools/_distutils/command/install_lib.pyÚinitialize_options3s zinstall_lib.initialize_optionsc    Cs†| ddddddd¡|jdkr&d|_|jdkr6d    |_t|jtƒs‚zt|jƒ|_|jd
kr^t‚Wn ttfk
r€td ƒ‚YnXdS) NÚinstall)Ú    build_libr)rr)rr)r    r    )rr)rrTF)réézoptimize must be 0, 1, or 2)Úset_undefined_optionsr    rÚ
isinstanceÚintÚAssertionErrorÚ
ValueErrorrrrrrÚfinalize_options<s&ú    
 
 
zinstall_lib.finalize_optionscCs0| ¡| ¡}|dk    r,|j ¡r,| |¡dS©N)ÚbuildrÚ distributionÚhas_pure_modulesÚ byte_compile©rZoutfilesrrrÚrunVszinstall_lib.runcCs2|js.|j ¡r| d¡|j ¡r.| d¡dS)NÚbuild_pyÚ    build_ext)rr#r$Ú run_commandÚhas_ext_modulesrrrrr"fs
 
 
 
zinstall_lib.buildcCs8tj |j¡r | |j|j¡}n| d|j¡dS|S)Nz3'%s' does not exist -- no Python modules to install)ÚosÚpathÚisdirrÚ    copy_treerÚwarnr&rrrrmsÿzinstall_lib.installcCsrtjr| d¡dSddlm}| d¡j}|jrH||d|j||j    d|j
dkrn|||j
|j||j |j    ddS)Nz%byte-compiling is disabled, skipping.r)r%r)rrÚprefixÚdry_run)rrr1Úverboser2) ÚsysÚdont_write_bytecoder0Údistutils.utilr%Úget_finalized_commandÚrootr    rr2rr3)rÚfilesr%Z install_rootrrrr%vs$
  þ
þzinstall_lib.byte_compilec
    Csd|sgS| |¡}| ¡}t||ƒ}t|ƒttjƒ}g}|D] }    | tj ||    |d…¡¡q>|Sr!)    r7Ú get_outputsÚgetattrÚlenr,ÚsepÚappendr-Újoin)
rZhas_anyZ    build_cmdZ
cmd_optionÚ
output_dirZ build_filesrÚ
prefix_lenÚoutputsÚfilerrrÚ_mutate_outputss
 
zinstall_lib._mutate_outputscCsrg}|D]d}tj tj |¡¡d}|tkr.q|jrJ| tjj    |dd¡|j
dkr| tjj    ||j
d¡q|S)NrÚ)Ú optimizationr) r,r-ÚsplitextÚnormcaseÚPYTHON_SOURCE_EXTENSIONr    r>Ú    importlibÚutilÚcache_from_sourcer)rZ py_filenamesZbytecode_filesZpy_fileÚextrrrÚ_bytecode_filenamesžs 
ÿ
 
ÿ
zinstall_lib._bytecode_filenamescCsR| |j ¡dd|j¡}|jr*| |¡}ng}| |j ¡dd|j¡}|||S)zÁReturn the list of files that would be installed if this command
        were actually run.  Not affected by the "dry-run" flag or whether
        modules have actually been built yet.
        r(rr))rDr#r$rr    rNr+)rZ pure_outputsZbytecode_outputsZ ext_outputsrrrr:´s  þÿ  þÿzinstall_lib.get_outputscCsLg}|j ¡r&| d¡}| | ¡¡|j ¡rH| d¡}| | ¡¡|S)zþGet the list of files that are input to this command, ie. the
        files that get installed as they are named in the build tree.
        The files in this list correspond one-to-one to the output
        filenames returned by 'get_outputs()'.
        r(r))r#r$r7Úextendr:r+)rÚinputsr(r)rrrÚ
get_inputsÉs
 
 
 
zinstall_lib.get_inputsN)Ú__name__Ú
__module__Ú __qualname__Ú descriptionÚ user_optionsÚboolean_optionsÚ negative_optrr r'r"rr%rDrNr:rQrrrrrs*÷
        r) Ú__doc__r,Úimportlib.utilrJr4Údistutils.corerÚdistutils.errorsrrIrrrrrÚ<module>s