JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr 0iX: ddlZddlZddlZddlZddlmZddlmZddlmZ ddl m Z m Z m Z ddlmZmZmZmZmZmZddlmZerdd lmZGd d eZd eeefd eddfdZd edeeeffdZGddeZGddeZGddeZ d!deedeedeeeefddfdZ d!deedeedeeeefddfdZ!dededefdZ"Gdd Z#y)"N)contextmanager)abspath)join)STDOUT check_call check_output) TYPE_CHECKINGAnyIteratorMappingOptionalSequence)_in_proc_script_path)Protocolc JeZdZdZ ddeedeedeeeefddfdZy) SubprocessRunnerz%A protocol for the subprocess runner.Ncmdcwd extra_environreturncyN)selfrrrs D/opt/hc_python/lib/python3.12/site-packages/pyproject_hooks/_impl.py__call__zSubprocessRunner.__call__s NN) __name__ __module__ __qualname____doc__rstrr r rrrrrrsN3 "&9=  # # $GCH$56     rrobjpathrc xt|dd5}tj||fi|dddy#1swYyxYw)Nwutf-8encoding)openjsondump)r%r&kwargsfs r write_jsonr1s/ dC' *a #q#F# + * *s09crt|d5}tj|cdddS#1swYyxYw)Nr)r*)r,r-load)r&r0s r read_jsonr4!s% dW %yy| & % %s-6c XeZdZdZ d dedeedeedeeeddf fd ZxZS) BackendUnavailablezEWill be raised if the backend cannot be imported in the hook process.N tracebackmessage backend_name backend_pathrcV||_||_||_t||xsdy)NzError while importing backend)r9r:r7super__init__)rr7r8r9r: __class__s rr=zBackendUnavailable.__init__)s/)(" C$CDrNNN) r r!r"r#r$r rr= __classcell__r>s@rr6r6&scO "&&*04 E E# Esm E x}- E  E Err6c,eZdZdZdeddffd ZxZS) HookMissingz>Will be raised on missing hooks (if a fallback can't be used). hook_namerNc2t||||_yr)r<r=rD)rrDr>s rr=zHookMissing.__init__:s #"r)r r!r"r#r$r=r@rAs@rrCrC7sH###$##rrCc eZdZdZdeddfdZy)UnsupportedOperationzDMay be raised by build_sdist if the backend indicates that it can't.r7rNc||_yr)r7)rr7s rr=zUnsupportedOperation.__init__Bs "r)r r!r"r#r$r=rrrrGrG?sN###$#rrGrrrctjj}|r|j|t |||y)zwThe default method of calling the wrapper subprocess. This uses :func:`subprocess.check_call` under the hood. )renvN)osenvironcopyupdaterrrrrJs rdefault_subprocess_runnerrPFs/ **// C =!s%rctjj}|r|j|t |||t y)zqCall the subprocess while suppressing output. This uses :func:`subprocess.check_output` under the hood. )rrJstderrN)rKrLrMrNrrrOs rquiet_subprocess_runnerrSVs1 **// C =!#3v6r source_tree requestedctjj|r tdtjj |}tjj tjj ||}tjj|}tjj|}tjj||g|k7r td|S)zNormalise and check a backend path. Ensure that the requested backend path is specified as a relative path, and resolves to a location under the given source tree. Return an absolute version of the requested path. zpaths must be relativez paths must be inside source tree) rKr&isabs ValueErrorrnormpathrnormcase commonprefix)rTrU abs_source abs_requested norm_sourcenorm_requesteds rnorm_and_checkr`fs ww}}Y122-JGG$$RWW\\*i%HIM''"":.KWW%%m4N ww[.9:kI;<< rc eZdZdZ ddededeeededdeed df d Zeddd e dfd Z d eefd Z dd ee ee fd eefdZ dded ee ee fded efdZ d ded ee ee fdeed efdZ dd ee ee fd eefdZ dded ee ee fded eefdZ d ded ee ee fdeed efdZ dd ee ee fd eefdZ dded ee ee fd efdZdede ee fd e fdZy)!BuildBackendHookCallerzAA wrapper to call the build backend hooks for a source directory.N source_dir build_backendr:runnerrpython_executablerc|t}t||_||_|r#|Dcgc]}t |j|}}||_||_|stj}||_ ycc}w)a :param source_dir: The source directory to invoke the build backend for :param build_backend: The build backend spec :param backend_path: Additional path entries for the build backend spec :param runner: The :ref:`subprocess runner ` to use :param python_executable: The Python executable used to invoke the build backend N) rPrrcrdr`r:_subprocess_runnersys executablerf)rrcrdr:rerfps rr=zBuildBackendHookCaller.__init__so >.F!*-* HTU 1N4??A> LU("( # !2 VsA-c#bK|j}||_ d||_y#||_wxYww)ayA context manager for temporarily overriding the default :ref:`subprocess runner `. :param runner: The new subprocess runner to use within the context. .. code-block:: python hook_caller = BuildBackendHookCaller(...) with hook_caller.subprocess_runner(quiet_subprocess_runner): ... N)rh)rreprevs rsubprocess_runnerz(BuildBackendHookCaller.subprocess_runners3&&"( + &*D #dD #s/#/ ,/c&|jdiS)z>Return the list of optional features supported by the backend._supported_features _call_hook)rs rrpz*BuildBackendHookCaller._supported_featuress4b99rconfig_settingsc*|jdd|iS)amGet additional dependencies required for building a wheel. :param config_settings: The configuration settings for the build backend :returns: A list of :pep:`dependency specifiers <508>`. .. admonition:: Fallback If the build backend does not defined a hook with this name, an empty list will be returned. get_requires_for_build_wheelrsrqrrss rruz3BuildBackendHookCaller.get_requires_for_build_wheels  *->,P  rmetadata_directory_allow_fallbackc@|jdt|||dS)aSPrepare a ``*.dist-info`` folder with metadata for this project. :param metadata_directory: The directory to write the metadata to :param config_settings: The configuration settings for the build backend :param _allow_fallback: Whether to allow the fallback to building a wheel and extracting the metadata from it. Should be passed as a keyword argument only. :returns: Name of the newly created subfolder within ``metadata_directory``, containing the metadata. .. admonition:: Fallback If the build backend does not define a hook with this name and ``_allow_fallback`` is truthy, the backend will be asked to build a wheel via the ``build_wheel`` hook and the dist-info extracted from that will be returned. prepare_metadata_for_build_wheelrwrsrxrrrrrwrsrxs rrzz7BuildBackendHookCaller.prepare_metadata_for_build_wheels,0 .&-.@&A#2#2   rwheel_directorycZ| t|}|jdt|||dS)aBuild a wheel from this project. :param wheel_directory: The directory to write the wheel to :param config_settings: The configuration settings for the build backend :param metadata_directory: The directory to reuse existing metadata from :returns: The name of the newly created wheel within ``wheel_directory``. .. admonition:: Interaction with fallback If the ``build_wheel`` hook was called in the fallback for :meth:`prepare_metadata_for_build_wheel`, the build backend would not be invoked. Instead, the previously built wheel will be copied to ``wheel_directory`` and the name of that file will be returned. build_wheelr~rsrwrrrrr~rsrws rrz"BuildBackendHookCaller.build_wheels=*  )!();!<  #*?#;#2&8   rc*|jdd|iS)awGet additional dependencies required for building an editable wheel. :param config_settings: The configuration settings for the build backend :returns: A list of :pep:`dependency specifiers <508>`. .. admonition:: Fallback If the build backend does not defined a hook with this name, an empty list will be returned. get_requires_for_build_editablersrqrvs rrz6BuildBackendHookCaller.get_requires_for_build_editable s  -0A?/S  rc@|jdt|||dS)aUPrepare a ``*.dist-info`` folder with metadata for this project. :param metadata_directory: The directory to write the metadata to :param config_settings: The configuration settings for the build backend :param _allow_fallback: Whether to allow the fallback to building a wheel and extracting the metadata from it. Should be passed as a keyword argument only. :returns: Name of the newly created subfolder within ``metadata_directory``, containing the metadata. .. admonition:: Fallback If the build backend does not define a hook with this name and ``_allow_fallback`` is truthy, the backend will be asked to build a wheel via the ``build_editable`` hook and the dist-info extracted from that will be returned. #prepare_metadata_for_build_editabler{r|r}s rrz:BuildBackendHookCaller.prepare_metadata_for_build_editables,. 1&-.@&A#2#2   rcZ| t|}|jdt|||dS)aBuild an editable wheel from this project. :param wheel_directory: The directory to write the wheel to :param config_settings: The configuration settings for the build backend :param metadata_directory: The directory to reuse existing metadata from :returns: The name of the newly created wheel within ``wheel_directory``. .. admonition:: Interaction with fallback If the ``build_editable`` hook was called in the fallback for :meth:`prepare_metadata_for_build_editable`, the build backend would not be invoked. Instead, the previously built wheel will be copied to ``wheel_directory`` and the name of that file will be returned. build_editablerrrs rrz%BuildBackendHookCaller.build_editable;s=,  )!();!<  #*?#;#2&8   rc*|jdd|iS)zGet additional dependencies required for building an sdist. :returns: A list of :pep:`dependency specifiers <508>`. get_requires_for_build_sdistrsrqrvs rrz3BuildBackendHookCaller.get_requires_for_build_sdist\s  *->,P  rsdist_directoryc>|jdt||dS)zBuild an sdist from this project. :returns: The name of the newly created sdist within ``wheel_directory``. build_sdist)rrsr|)rrrss rrz"BuildBackendHookCaller.build_sdisths( #*?#;#2   rrDr/c nd|ji}|jr.tjj |j}||d<t j 5}d|i}t|t|ddt5}|j}|j|tt|||g|j|dddtt|d} | j!d rt#| j!d d | j!d rCt%| j!d d | j!d d |j|j| j!drt'| j!dxs|| dcdddS#1swYxYw#1swYyxYw)N_PYPROJECT_HOOKS_BUILD_BACKEND_PYPROJECT_HOOKS_BACKEND_PATHr/z input.json)indent)rrz output.json unsupportedr7 no_backend backend_error)r8r9r: hook_missingmissing_hook_name return_val)rdr:rKpathseprtempfileTemporaryDirectoryr1pjoinrrfrhrr$rcr4getrGr6rC) rrDr/rr:td hook_inputscriptpythondatas rrrz!BuildBackendHookCaller._call_hookzs{94;M;MN   ::??4+<+<=L=IM9 :  ( ( *b"F+J z5\#:1 E&'6//''WS[19bA"/((U2}56Dxx &*488K+DEExx %(HH["- HH_b9!%!3!3!%!2!2  xx'!$((+>"?"L9MM %3+ * (' + *s&'F+AFCF+F( $F++F4r?r)NTr)r r!r"r#r$r rr=rr rnrpr r ruboolrzrrrrrrrrrrrrbrb~sK 15/3+/ 333x}- 3 +, 3 $C= 3 3:+(:+x~++&:Xc]: 8< !'#s("34  # *8< $   "'#s("34    H8<,0   "'#s("34 %SM   D8< !'#s("34  # *8< $   "'#s("34   #  F8<,0   "'#s("34 %SM   F8<  !'#s("34   #  8<  "'#s("34   $ &C &c1B &s &rrbr)$r-rKrir contextlibros.pathrrr subprocessrrrtypingr r r r r r _in_processrrrr$r1r4 Exceptionr6rCrGrPrSr`rbrrrrsT %!77LL- 8 $GCH%$S$t$ CGCH- EE"#)##9#15 & # & # &GCH-. & &$15 7 # 7 # 7GCH-. 7 7 0\&\&r