_iddlZddlZdejvZdZdZdZdZdZGdd Z Gd d Z e jD]Z e e d e e je Zd ZGddZdZdZej(dkreZyy)N__pypy__cdtjvrytrtjdkryddl}|j dy)N distutils)raDistutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.)sysmodulesis_pypy version_infowarningswarn)r s /builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/_distutils_hack/__init__.pywarn_distutils_presentr s:#++%3##f,  MM ?cdtjvryddl}|jdtjDcgc]}|dk(s|j dr|}}|D]}tj|=ycc}w)Nrrz"Setuptools is replacing distutils.z distutils.)rr r r startswith)r namemodss rclear_distutilsrsw#++% MM67KK D ; $//,"?     KK   sA5cLtjjdd}|dk(S)z? Allow selection of distutils by environment variable. SETUPTOOLS_USE_DISTUTILSlocal)osenvironget)whichs renabledr+s$ JJNN5w ?E G rcddl}tt5|jdddd|jd}d|jvsJ|jdt j vsJy#1swYNxYw)Nrrzdistutils.core _distutilszsetuptools._distutils.log) importlibrshim import_module__file__rr )r cores rensure_local_distutilsr%3sm  ,   " "#3 4D 4== (7$--7 ( &ckk 99 9 s A88BcBtrttyy)z Ensure that the local copy of distutils is preferred over stdlib. See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. N)rrr%rr do_overrider(Dsy  rceZdZdZdZy) _TrivialRec||_yN) _patterns)selfpatternss r__init__z_TrivialRe.__init__Qs !rc@tfd|jDS)Nc3&K|]}|v ywr,r').0patstrings r z#_TrivialRe.match..Us;NS3&=Ns)allr-)r.r5s `rmatchz_TrivialRe.matchTs;DNN;;;rN)__name__ __module__ __qualname__r0r8r'rrr*r*Ps "z/DistutilsMetaFinder.find_spec..`sDrr')rformatlocalsgetattr)r.fullnamepathtarget method_namemethods r find_speczDistutilsMetaFinder.find_specYsG  H$7$7$@ 2+22>VX> {L9xrc|jryddl}ddl}ddl} |j dGfdd|j j}|jjd|jS#t $rYywxYw)Nrzsetuptools._distutilsceZdZfdZdZy)?DistutilsMetaFinder.spec_for_distutils..DistutilsLoadercd_S)Nr)r9)r.specmods r create_modulezMDistutilsMetaFinder.spec_for_distutils..DistutilsLoader.create_moduleys*  rcyr,r')r.modules r exec_modulezKDistutilsMetaFinder.spec_for_distutils..DistutilsLoader.exec_module}srN)r9r:r;rPrS)rOsrDistutilsLoaderrLxs   rrTr)origin) is_cpythonr importlib.abcimportlib.utilr" ExceptionabcLoaderutilspec_from_loaderr#)r.r rTrOs @rspec_for_distutilsz&DistutilsMetaFinder.spec_for_distutilscs ??   ))*ABC imm22 ~~.. *3<</  '   sA?? B  B c@tjjdS)zj Suppress supplying distutils for CPython (build and tests). Ref #2965 and #3007. zpybuilddir.txt)rrEisfiler'rrrVzDistutilsMetaFinder.is_cpythons ww~~.//rcptjdk\s|jrytd|_y)zj Ensure stdlib distutils when running under pip. See pypa/pip#8761 for rationale. r Ncyr,r'r'rrr@z2DistutilsMetaFinder.spec_for_pip..$r)rr pip_imported_during_buildrr^r.s r spec_for_pipz DistutilsMetaFinder.spec_for_pips.   w &$*H*H*J ".rcRddl}tfd|jdDS)zO Detect if pip is being imported in a build script. Ref #2355. rNc3FK|]\}}j|ywr,)frame_file_is_setup)r3framelineclss rr6z@DistutilsMetaFinder.pip_imported_during_build..s% >X{udC # #E *>Xs!) tracebackany walk_stack)rnros` rrfz-DistutilsMetaFinder.pip_imported_during_builds.  >G>R>RSW>X   rcX|jjddjdS)zN Return True if the indicated frame suggests a setup.py file. r#zsetup.py) f_globalsrendswith)rls rrkz'DistutilsMetaFinder.frame_file_is_setups& "":r2;;JGGrc(td|_y)zp Ensure stdlib distutils when running select tests under CPython. python/cpython#91169 cyr,r'r'rrr@z>DistutilsMetaFinder.spec_for_sensitive_tests..rerN)rr^rgs rspec_for_sensitive_testsz,DistutilsMetaFinder.spec_for_sensitive_testss ".r)r )test.test_distutilsztest.test_peg_generatorztest.test_importlibrzr,)r9r:r;rIr^ staticmethodrVrh classmethodrfrkrxrr sensitive_testsr'rrr=r=Xs~ B00/  HH/   g %   " rr= spec_for_cLttjvxs tyyr,)DISTUTILS_FINDERr meta_path insert_shimr'rradd_shimrs %66rceZdZdZdZy)r!ctyr,)rrgs r __enter__zshim.__enter__s rctyr,) _remove_shim)r.excvaluetbs r__exit__z shim.__exit__srN)r9r:r;rrr'rrr!r!s rr!cLtjjdty)Nr)rrinsertrr'rrrrsMM,-rcj tjjty#t$rYywxYwr,)rrremover ValueErrorr'rrrrs,  -.    s #& 22rb)rrbuiltin_module_namesr rrrr%r(r*r=r}rsetattrrxrrr!rrr remove_shimr'rrrs  00 0& :" !<<ddN / /D  D644 0'(7. gKr