2bi.SSKrSSKrSSKrSSKrSSKJr SSKJr SSKJr SSK J r J r J r SSKJr SrS r"S S \5r"S S \5r"SS\5r"SS\5rSSjrSSjrSr"SS5rg)N)contextmanager)abspath)join)STDOUT check_call check_output)_in_proc_script_pathc |[USSS9n[R"X40UD6 SSS5 g!,(df  g=f)Nwutf-8encoding)openjsondump)objpathkwargsfs ړ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_impl.py write_jsonr s- dC' *a ##F# + * *s- ;cx[USS9n[R"U5sSSS5 $!,(df  g=f)Nr r)rrload)rrs r read_jsonrs% dW %yy| & % %s+ 9c\rSrSrSrSrSrg)BackendUnavailablezEWill be raised if the backend cannot be imported in the hook process.cXlgN tracebackselfr"s r__init__BackendUnavailable.__init__"r!N__name__ __module__ __qualname____firstlineno____doc__r%__static_attributes__r(rrrs O#r(rc,^\rSrSrSrU4SjrSrU=r$)BackendInvalidz)Will be raised if the backend is invalid.c<>[TU]U5 XlX lgr )superr% backend_name backend_path)r$r6r7message __class__s rr%BackendInvalid.__init__s !((r()r6r7r*r+r,r-r.r%r/ __classcell__r9s@rr2r2s3))r(r2c,^\rSrSrSrU4SjrSrU=r$) HookMissing%z>Will be raised on missing hooks (if a fallback can't be used).c0>[TU]U5 Xlgr )r5r% hook_name)r$rBr9s rr%HookMissing.__init__'s #"r()rBr;r=s@rr?r?%sH##r(r?c\rSrSrSrSrSrg)UnsupportedOperation,zDMay be raised by build_sdist if the backend indicates that it can't.cXlgr r!r#s rr%UnsupportedOperation.__init__.r'r(r!Nr)r0r(rrErE,s N#r(rEc[RR5nU(aURU5 [ XUS9 g)zoThe default method of calling the wrapper subprocess. This uses :func:`subprocess.check_call` under the hood. )cwdenvN)osenvironcopyupdatercmdrJ extra_environrKs rdefault_subprocess_runnerrS2s- **// C =!s%r(c[RR5nU(aURU5 [ XU[ S9 g)ziCall the subprocess while suppressing output. This uses :func:`subprocess.check_output` under the hood. )rJrKstderrN)rLrMrNrOrrrPs rquiet_subprocess_runnerrV>s/ **// C =!3v6r(c[RRU5(a [S5e[RR U5n[RR [RR X!55n[RRU5n[RRU5n[RRXE/5U:wa [S5eU$)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) rLrisabs ValueErrorrnormpathrnormcase commonprefix) source_tree requested abs_source abs_requested norm_sourcenorm_requesteds rnorm_and_checkrcJs ww}}Y122-JGG$$RWW\\*%HIM''"":.KWW%%m4N ww[9:kI;<< r(c\rSrSrSrSSjr\S5rSrSSjr SSjr SS jr SS jr SS jr SS jrSS jrSSjrSrSrg)BuildBackendHookCallerbzFA wrapper to call the build backend hooks for a source directory. NcUc[n[U5UlX lU(a&UVs/sHn[ URU5PM nnX0lX@lU(d[RnXPl gs snf)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) rSr source_dir build_backendrcr7_subprocess_runnersys executablepython_executable)r$rhrir7runnerrmps rr%BuildBackendHookCaller.__init__fsp >.F!*-* `. .. code-block:: python hook_caller = BuildBackendHookCaller(...) with hook_caller.subprocess_runner(quiet_subprocess_runner): ... N)rj)r$rnprevs rsubprocess_runner(BuildBackendHookCaller.subprocess_runners,&&"( + &* #d #s,!,),c&URS05$)z>Return the list of optional features supported by the backend._supported_features _call_hook)r$s rrv*BuildBackendHookCaller._supported_featuress4b99r(c*URSSU05$)aGet additional dependencies required for building a wheel. :returns: A list of :pep:`dependency specifiers <508>`. :rtype: list[str] .. admonition:: Fallback If the build backend does not defined a hook with this name, an empty list will be returned. get_requires_for_build_wheelconfig_settingsrwr$r|s rr{3BuildBackendHookCaller.get_requires_for_build_wheels#= @   r(c@URS[U5UUS.5$)aPrepare a ``*.dist-info`` folder with metadata for this project. :returns: Name of the newly created subfolder within ``metadata_directory``, containing the metadata. :rtype: str .. 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_wheelmetadata_directoryr|_allow_fallbackrxrr$rr|rs rr7BuildBackendHookCaller.prepare_metadata_for_build_wheels- A")*<"=..D   r(c\Ub [U5nURS[U5UUS.5$)aBuild a wheel from this project. :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_wheelwheel_directoryr|rrrxr$rr|rs rr"BuildBackendHookCaller.build_wheels<  )!();!< }&7."4/   r(c*URSSU05$)aGet additional dependencies required for building an editable wheel. :returns: A list of :pep:`dependency specifiers <508>`. :rtype: list[str] .. admonition:: Fallback If the build backend does not defined a hook with this name, an empty list will be returned. get_requires_for_build_editabler|rwr}s rr6BuildBackendHookCaller.get_requires_for_build_editables#@ C   r(c@URS[U5UUS.5$)aPrepare a ``*.dist-info`` folder with metadata for this project. :returns: Name of the newly created subfolder within ``metadata_directory``, containing the metadata. :rtype: str .. 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_editablerrrs rr:BuildBackendHookCaller.prepare_metadata_for_build_editables- D")*<"=..G   r(c\Ub [U5nURS[U5UUS.5$)aBuild an editable wheel from this project. :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 rr%BuildBackendHookCaller.build_editables=  )!();!< /&7."42   r(c*URSSU05$)zGet additional dependencies required for building an sdist. :returns: A list of :pep:`dependency specifiers <508>`. :rtype: list[str] get_requires_for_build_sdistr|rwr}s rr3BuildBackendHookCaller.get_requires_for_build_sdists# = @   r(c>URS[U5US.5$)zqBuild an sdist from this project. :returns: The name of the newly created sdist within ``wheel_directory``. build_sdist)sdist_directoryr|r)r$rr|s rr"BuildBackendHookCaller.build_sdists' }&7./   r(c SUR0nUR(a-[RR UR5nXCS'[ R "5nSU0n[U[US5SS9 [5nURnURU[[U55X/URUS9 SSS5 [[US55n U R!S 5(a[#U R!S S 55eU R!S 5(a[%U R!S S 55eU R!S 5(a/['URURU R!SS 5S9eU R!S5(a#[)U R!S5=(d U5eU SsSSS5 $!,(df  GN=f!,(df  g=f)NPEP517_BUILD_BACKENDPEP517_BACKEND_PATHrz input.json)indent)rJrRz output.json unsupportedr" no_backendbackend_invalid backend_error)r6r7r8 hook_missingmissing_hook_name return_val)rir7rLpathseprtempfileTemporaryDirectoryrpjoinr rmrjrstrrhrgetrErr2r?) r$rBrrRr7td hook_inputscriptpythondatas rrx!BuildBackendHookCaller._call_hook)s/1C1CD   ::??4+<+<=L3?/ 0  ( ( *b"F+J z5\#:1 E&'6//''WS[19A"/((U2}56Dxx &&*488K+DEExx %%(+r)BCCxx)**$!%!3!3!%!2!2 HH_b9 xx''!$((+>"?"L9MM %5+ * (' + *s%"$G =GDG  G G  G.)rjr7rirmrh)NNNr )NTNN)r*r+r,r-r.r%rrsrvr{rrrrrrrrxr/r0r(rrerebs}" 3>++":  7;  .48# .  7;  .48# 0   !&r(rer)rrLrkr contextlibros.pathrrr subprocessrrr _in_processr rr Exceptionrr2r?rErSrVrcrer0r(rrsx %!77-$  ## )Y)#)##9# & 70h&h&r(