_dNdZddlZddlZddlZddlZddlZddlmZddl Z ddl Z gZ dZ dZ dZdZdZd Zd Zd Zy) z Monkey patching of distutils. N) import_modulecztjdk(r|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 3/usr/lib/python3/dist-packages/setuptools/monkey.py_get_mror s5%%'83v %% >># ct|trtn"t|tjrt nd}||S)Ncy)N)items r zget_unpatched..*sr) isinstancetypeget_unpatched_classtypes FunctionTypeget_unpatched_function)rlookups r get_unpatchedr$s> dD !  dE.. /$    $<rcdt|D}t|}|jjdsd|z}t ||S)zProtect against re-patching the distutils if reloaded Also ensures that no other distutils extension monkeypatched the distutils first. c3XK|]"}|jjdr|$yw) setuptoolsN) __module__ startswith).0r s r z&get_unpatched_class..5s&CNN,E,El,Ss ** distutilsz(distutils has already been patched by %r)r nextrr AssertionError)r external_basesbasemsgs r rr/sM }N  D ?? % %k 283>S!! Krctjtj_tj dk}|r#tj tj_dtj cxkxrdkncxsdtj cxkxrdknc}|r!d}|tjj_ ttjtjtjfD]!}tjj|_#tjj tj_tjj tj_dtj"vr0tjj tj"d_t%y)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?s<'//INN&&)3O%/%7%7 "s//;);&@ @&&@&O 5 .patch_paramssW )"2"23"77 tY'H%sI&i( (S)##rzdistutils._msvccompiler _get_vc_env)rrsystem functoolspartialrUr_)rfmsvc14res @r r>r>s` * +DI% $  |-F GF F=)*    sA AA)__doc__r0distutils.filelistr#rrri importlibrr r__all__r rrrCr7rUrr>rrr rpsX  #    !*HD0"+ r