OwlCyberSecurity - MANAGER
Edit File: monkey.pyo
� �fc�����������@���s����d��Z��d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�m�Z�d�d�l �Z �d�d�l �m�Z�d�d�l�Z�g��Z �d����Z�d����Z�d����Z�d����Z�d ����Z�d ����Z�d����Z�d����Z�d ����Z�d�S(���s��� Monkey patching of distutils. i����N(���t ���import_module(���t���sixc���������C���s-���t��j����d�k�r �|��f�|��j�St�j�|����S(���sm�� 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. t���Jython(���t���platformt���python_implementationt ���__bases__t���inspectt���getmro(���t���cls(����(����s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pyt���_get_mro���s���� c���������C���sC���t��|��t�j���r�t�n�t��|��t�j���r0�t�n�d����}�|�|����S(���Nc���������S���s���d��S(���N(���t���None(���t���item(����(����s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pyt���<lambda>*���t����(���t ���isinstanceR���t���class_typest���get_unpatched_classt���typest���FunctionTypet���get_unpatched_function(���R���t���lookup(����(����s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pyt ���get_unpatched&���s���� c���������C���sQ���d����t��|����D��}�t�|���}�|�j�j�d���sM�d�|��}�t�|�����n��|�S(���s����Protect against re-patching the distutils if reloaded Also ensures that no other distutils extension monkeypatched the distutils first. c���������s���s'���|��]�}�|�j��j�d����s�|�Vq�d�S(���t ���setuptoolsN(���t ���__module__t ���startswith(���t���.0R���(����(����s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pys ���<genexpr>6���s���t ���distutilss(���distutils has already been patched by %r(���R ���t���nextR���R���t���AssertionError(���R���t���external_basest���baset���msg(����(����s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pyR���/���s���� c����������C���sW��t��j�t�j�_�t�j�d�k�}��|��r6�t��j�t�j�_�n��t�j�d�k��p��d �t�j�k��o_�d�k��n�p��d�t�j�k��o~�d�k��n�p��d�t�j�k��o��d�k�n�}�|�r��d �}�|�t�j�j �_ �n��t����t����x/�t�j �t�j�t�j�f�D]�}�t��j �j�|�_�q��Wt��j�j�t�j�_�t��j�j�t�j�_�d �t�j�k�rLt��j�j�t�j�d �_�n��t����d��S(���Ni���i���i���i���i ���i����i���i���s���https://upload.pypi.org/legacy/s���distutils.command.build_ext(���i���i���i���(���i���i���i ���(���i���i����(���i���i���i���(���i���i���(���i���i���i���(���i���i���(���i���i���i���(���R���t���CommandR���t���coret���syst���version_infot���findallt���filelistt���configt ���PyPIRCCommandt���DEFAULT_REPOSITORYt+���_patch_distribution_metadata_write_pkg_filet+���_patch_distribution_metadata_write_pkg_infot���distt���cmdt���Distributiont ���extensiont ���Extensiont���modulest#���patch_for_msvc_specialized_compiler(���t���has_issue_12885t���needs_warehouset ���warehouset���module(����(����s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pyt ���patch_allA���s(����c�����������C���s���t��j�j�t�j�j�_�d�S(���sD���Patch write_pkg_file to also write Requires-Python/Requires-ExternalN(���R���R+���t���write_pkg_fileR���t���DistributionMetadata(����(����(����s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pyR)���k���s����c����������C���sF���d�t��j�d� k�o�d�k��n�}��|��s-�d�St�j�j�t�j�j�_�d�S(���s���� Workaround issue #197 - Python 3 prior to 3.2.2 uses an environment-local encoding to save the pkg_info. Monkey-patch its write_pkg_info method to correct this undesirable behavior. i���i���N(���i���(���i���i���i���(���R"���R#���R���R+���t���write_pkg_infoR���R8���(���t���environment_local(����(����s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pyR*���r���s����#c���������C���s9���t��|�|���}�t�|����j�d�|���t�|�|�|����d�S(���s���� Patch func_name in target_mod with replacement Important - original must be resolved by name to avoid patching an already patched function. t ���unpatchedN(���t���getattrt���varst ���setdefaultt���setattr(���t���replacementt ���target_modt ���func_namet���original(����(����s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pyt ���patch_func����s����c���������C���s ���t��|��d���S(���NR;���(���R<���(���t ���candidate(����(����s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pyR�������s����c�������������s����t��d������t�j����d�k�r"�d�S���f�d����}��t�j�|��d���}�t�j�|��d���}�y$�t�|�d������t�|�d������Wn�t�k �r��n�Xy�t�|�d ������Wn�t�k �r��n�Xy�t�|�d ������Wn�t�k �r��n�Xd�S(���s\��� Patch functions in distutils to use standalone Microsoft Visual C++ compilers. s���setuptools.msvct���WindowsNc������������sq���d�|��k�r�d�n�d�}�|�|�j��d���}�t����|���}�t�|����}�t�|�|���sd�t�|�����n��|�|�|�f�S(���sT��� Prepare the parameters for patch_func to patch indicated function. t���msvc9t���msvc9_t���msvc14_t���_(���t���lstripR<���R����t���hasattrt���ImportError(���t���mod_nameRB���t���repl_prefixt ���repl_namet���replt���mod(���t���msvc(����s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pyt���patch_params����s����s���distutils.msvc9compilers���distutils._msvccompilert���find_vcvarsallt���query_vcvarsallt���_get_vc_envt���gen_lib_options(���R����R���t���systemt ���functoolst���partialRD���RM���(���RT���RG���t���msvc14(����(���RS���s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pyR1�������s&���� (���t���__doc__R"���t���distutils.filelistR���R���R���RZ���t ���importlibR����R���t���setuptools.externR���R���t���__all__R ���R���R���R6���R)���R*���RD���R���R1���(����(����(����s5���/usr/lib/python2.7/site-packages/setuptools/monkey.pyt���<module>���s&��� *