prhdZddlZddlZddlZddlZddlZddlmZddl Z ddl Z gZ dZ dZ dZdZdZd Zd Zd ZdS) z Monkey patching of distutils. N) import_modulecntjdkr |f|jzStj|S)am Returns the bases classes for cls sorted by the MRO. Works around an issue on Jython where inspect.getmro will not return all base classes if multiple classes share the same name. Instead, this function will return a tuple containing the class itself, and the contents of cls.__bases__. See https://github.com/pypa/setuptools/issues/1024. Jython)platformpython_implementation __bases__inspectgetmro)clss ]/var/lib/jenkins/jobs/Dev/workspace/my-venv/lib/python3.11/site-packages/setuptools/monkey.py_get_mror s7%''833v %% >#  ct|trtn#t|tjrt nd}||S)NcdS)N)items r zget_unpatched..(sTr) isinstancetypeget_unpatched_classtypes FunctionTypeget_unpatched_function)rlookups r get_unpatchedr$sP)$55 ",T53E"F"F  6$<<rcdt|D}t|}|jdsd|z}t ||S)zProtect against re-patching the distutils if reloaded Also ensures that no other distutils extension monkeypatched the distutils first. c3NK|] }|jd|V!dS) setuptoolsN) __module__ startswith).0r s r z&get_unpatched_class..3sL ~((66 r distutilsz(distutils has already been patched by %r)r nextrr AssertionError)r external_basesbasemsgs r rr-sj C==N   D ? % %k 2 2"83>S!!! Krctjtj_tjdk}|rtjtj_dtjcxkodkncpdtjcxkodknc}|rd}|tjj _ ttj tjtj fD]}tj j|_tjjtj_tjjtj_dtjvr&tjjtjd_t%dS)N)r*)r*)r*r,)r*r+zhttps://upload.pypi.org/legacy/zdistutils.command.build_ext)rCommandr#coresys version_infofindallfilelistconfig PyPIRCCommandDEFAULT_REPOSITORY_patch_distribution_metadatadistcmd Distribution extension Extensionmodules#patch_for_msvc_specialized_compiler)has_issue_12885needs_warehouse warehousemodules r patch_allrC?s7'/IN&)3O8%/%7 " !----I---- /!....Y.... F5 .patch_paramssk )"2"23"7"77 tY''H%%sI&& )i(( (S)##rzdistutils._msvccompiler _get_vc_envgen_lib_options)rrsystem functoolspartialrUr_)rfmsvc14res @r r>r>s * + +DI%% $ $ $ $ $ |-F G GF FF=))***       FF,--....      s$A A%$A%)A== B  B )__doc__r0distutils.filelistr#rrrj importlibrr r__all__r rrrCr7rUrr>rrr rqs  ######    $"*"*"*JDDD000"+++% % % % % r