Re dZddlZddlZddlZddlZddlZ ddlmZn#e $rddl ZYnwxYw ddl m Z n#e $r ddl m Z YnwxYwddlmZddlmZmZddlmZmZmZddlmZmZmZejeZd Zdd Zefd Zd Z ej!Z"e"#dde"#ddddZ$edkr e$dSdS)z2Build metadata for a project using PEP 517 hooks. N)Path)BuildEnvironment)Pep517HookCallerquiet_subprocess_runner)tempdirmkdir_pdir_to_zipfile)validate_system load_system compat_systemc T|i}td|||tdt 5}td|||i}t j||}tj |t j|t j |ddddS#1swxYwYdS)NzGot build requires: %sz$Installed dynamic build dependencieszTrying to build metadata in %s) get_requires_for_build_wheelloginfo pip_installr prepare_metadata_for_build_wheelospathjoinshutilmovebasename)hooksenvdestreqstdfilenamesources /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/pep517/meta.py _prep_metar"s>  - -b 1 1DHH %t,,,OODHH 3444 Lb 1266699"bAAb(++ FBGLLrw/?/?/I/IJJKKK LLLLLLLLLLLLLLLLLLs.B"DD!$D!.c|pt|}tj||pd}t |t |t ||d|d}|t5t5}| |dt|||dddn #1swxYwYddddS#1swxYwYdS)Ndistz build-backendz backend-pathrequires) r rrrr r rgetsubprocess_runnerrrrr") source_dirrsystemrrs r!buildr+)so  .{:..F 7<< DNF 3 3D DMMMF F?+VZZ-G-G  E  !8 9 9))    )3 OOF:. / / / uc4 ( ( ( ) ) ) ) ) ) ) ) ) ) ) ) ) ) )))))))))))))))))))s6C6%-C C6C" "C6%C" &C66C:=C:ct5}||t|cdddS#1swxYwYdS)N)r)rr )builderout_dirs r! build_as_zipr/8s 'gWg&&''''''''''''''''''s 7;;ctj|}t|}t jt ||}tt|}tj |S)z Given a source directory (root) of a package, return an importlib.metadata.Distribution object with metadata build from that package. )r)r*) rr expanduserr functoolspartialr+rr/imp_metaPathDistribution)rootr*r-rs r!loadr7>sc 7  d # #D 4 F$vFFFG  W%% & &D  $T * **r)z%A directory containing pyproject.toml)helpz --out-dirz-oz>Destination in which to save the builds relative to source dirclt}t|j|jdS)N)parser parse_argsr+r)r.)argss r!mainr>Vs-     D $/4<(((((r8__main__)r#NN)%__doc__argparseloggingrrr2importlib.metadatametadatar4 ImportErrorimportlib_metadatazipfilerzippenvbuildrwrappersrrdirtoolsrr r r+r r r getLogger__name__rr"r/r7ArgumentParserr; add_argumentr>r8r!rQs* *)))))))***))))))*'&&&&&????????6666666666>>>>>>>>>>g!! L L L ) ) ) )'''' + + + ! " " 0 I )))  zDFFFFFs ++6 AA