zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
U
H=®d2%ã@s„dZddlZddlZddlZddlZddlmZddlm    Z    ddl
m Z ddl m Z ddlmZmZmZddlmZdd    lmZdd
lmZdd lmZdd lmZdd lmZerddlmZm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(e e(ge)fZ*e$e"e(e"e(fZ+e ,e-¡Z.e /dej0¡Z1dd„Z2dd„Z3dd„Z4dd„Z5dd„Z6dd„Z7dd„Z8d d!„Z9d"d#„Z:d$d%„Z;d&d'„Z<dS)(z;Orchestrator for building wheels from InstallRequirements.
éN)ÚLink)Úbuild_wheel_pep517)Úbuild_wheel_legacy)Ú
indent_log)Ú
ensure_dirÚ    hash_fileÚis_wheel_installed)Úmake_setuptools_clean_args)Úcall_subprocess)Ú TempDirectory)ÚMYPY_CHECK_RUNNING)Ú path_to_url)Úvcs)ÚAnyÚCallableÚIterableÚListÚOptionalÚTuple)Ú
WheelCache)ÚInstallRequirementz([a-z0-9_.]+)-([a-z0-9_.!+-]+)cCstt |¡ƒS)zjDetermine whether the string looks like an egg_info.
 
    :param s: The string to parse. E.g. foo-2.1
    )ÚboolÚ _egg_info_reÚsearch)Ús©rúRD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/wheel_builder.pyÚ_contains_egg_info%srcCsz|jr
dS|jr&|r"t d|j¡dS|r.dS|js:|js>dS||ƒsXt d|j¡dS|jsvtƒsvt d|j¡dSdS)zBReturn whether an InstallRequirement should be built into a wheel.Fz(Skipping %s, due to already being wheel.TzCSkipping wheel build for %s, due to binaries being disabled for it.zOUsing legacy 'setup.py install' for %s, since package 'wheel' is not installed.)    Ú
constraintÚis_wheelÚloggerÚinfoÚnameÚeditableÚ
source_dirÚ
use_pep517r)ÚreqÚ
need_wheelÚcheck_binary_allowedrrrÚ _should_build.s4ÿ þ þr)cCst|dtdS)NT©r'r()r)Ú _always_true)r&rrrÚshould_build_for_wheel_command[s
ÿr,cCst|d|dS)NFr*)r))r&r(rrrÚ should_build_for_install_commandds
ÿr-cCsŠ|js |jsdS|jrb|jjrb|jr(t‚|js2t‚t |jj¡}|sHt‚| |jj    |j¡r^dSdS|jslt‚|j 
¡\}}t |ƒr†dSdS)zÍ
    Return whether a built InstallRequirement can be stored in the persistent
    wheel cache, assuming the wheel cache is available, and _should_build()
    has determined a wheel needs to be built.
    FT) r#r$ÚlinkÚis_vcsÚAssertionErrorrÚget_backend_for_schemeÚschemeÚis_immutable_rev_checkoutÚurlÚsplitextr)r&Ú vcs_backendÚbaseÚextrrrÚ _should_cachens     
 
 
r9cCs>t|jƒ}|jst‚|r.t|ƒr.| |j¡}n | |j¡}|S)zdReturn the persistent or temporary cache directory where the built
    wheel need to be stored.
    )rÚ    cache_dirr.r0r9Úget_path_for_linkÚget_ephem_path_for_link)r&Ú wheel_cacheÚcache_availabler:rrrÚ_get_cache_dirs 
 
  r?cCsdS)NTr)Ú_rrrr+ sr+c
Csrz t|ƒWn8tk
rD}zt d|j|¡WY¢dSd}~XYnX|jt||||ƒW5QR£SQRXdS)zaBuild one wheel.
 
    :return: The filename of the built wheel, or None if the build failed.
    ú Building wheel for %s failed: %sN)rÚOSErrorr Úwarningr"Ú    build_envÚ_build_one_inside_env)r&Ú
output_dirÚ build_optionsÚglobal_optionsÚerrrÚ
_build_one¥s   þÿrJc Cs2tdd}|jst‚|jrD|js(t‚t|j|j|j||jd}nt|j|j    |j
|||jd}|dk    rt j  |¡}t j  ||¡}zNt|ƒ\}}    t ||¡t d|j||    | ¡¡t d|¡|WW5QR£Stk
r}
zt d|j|
¡W5d}
~
XYnX|jst||ƒW5QR£dSQRXdS)NÚwheel)Úkind)r"ÚbackendÚmetadata_directoryrGÚtempd)r"Ú setup_py_pathr$rHrGrOz3Created wheel for %s: filename=%s size=%d sha256=%szStored in directory: %srA)r r"r0r%rNrÚpep517_backendÚpathrrPÚunpacked_source_directoryÚosÚbasenameÚjoinrÚshutilÚmover r!Ú    hexdigestÚ    ExceptionrCÚ_clean_one_legacy) r&rFrGrHÚtemp_dirÚ
wheel_pathÚ
wheel_nameÚ    dest_pathÚ
wheel_hashÚlengthrIrrrrEÀsT
 
ûú    
   ý þ
rEcCsZt|j|d}t d|j¡zt||jdWdStk
rTt d|j¡YdSXdS)N)rHzRunning setup.py clean for %s)ÚcwdTz Failed cleaning build dir for %sF)    r    rPr r!r"r
r$rZÚerror)r&rHÚ
clean_argsrrrr[ósþr[c        Csì|s ggfSt dd dd„|Dƒ¡¡tƒpgg}}|D]Z}t||ƒ}t||||ƒ}|rŽtt|ƒƒ|_|jj    |_
|jj s‚t ‚|  |¡q>|  |¡q>W5QRX|rÄt dd dd„|Dƒ¡¡|rät d    d d
d„|Dƒ¡¡||fS) z˜Build wheels.
 
    :return: The list of InstallRequirement that succeeded to build and
        the list of InstallRequirement that failed to build.
    z*Building wheels for collected packages: %sz, css|] }|jVqdS)N©r"©Ú.0r&rrrÚ    <genexpr>szbuild.<locals>.<genexpr>zSuccessfully built %sú cSsg|]
}|j‘qSrrerfrrrÚ
<listcomp>,szbuild.<locals>.<listcomp>zFailed to build %scSsg|]
}|j‘qSrrerfrrrrj1s)r r!rVrr?rJrr r.Ú    file_pathÚlocal_file_pathrr0Úappend)    Ú requirementsr=rGrHÚbuild_successesÚbuild_failuresr&r:Ú
wheel_filerrrÚbuildsB þ
 
ÿ
  þþrr)=Ú__doc__ÚloggingÚos.pathrTÚrerWÚpip._internal.models.linkrÚ$pip._internal.operations.build.wheelrÚ+pip._internal.operations.build.wheel_legacyrÚpip._internal.utils.loggingrÚpip._internal.utils.miscrrrÚ$pip._internal.utils.setuptools_buildr    Úpip._internal.utils.subprocessr
Úpip._internal.utils.temp_dirr Úpip._internal.utils.typingr Úpip._internal.utils.urlsr Úpip._internal.vcsrÚtypingrrrrrrÚpip._internal.cacherZpip._internal.req.req_installrrZBinaryAllowedPredicateZ BuildResultÚ    getLoggerÚ__name__r ÚcompileÚ
IGNORECASErrr)r,r-r9r?r+rJrEr[rrrrrrÚ<module>sD             
    -    
!3