HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: //usr/lib/python2.7/dist-packages/setuptools/monkey.pyc
�
�C�^c@s�dZddlZddlZddlZddlZddlZddlmZddl	Z	ddl
mZddlZgZ
d�Zd�Zd�Zd�Zd	�Zd
�Zd�Zd�ZdS(
s
Monkey patching of distutils.
i����N(t
import_module(tsixcCs-tj�dkr |f|jStj|�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.
    tJython(tplatformtpython_implementationt	__bases__tinspecttgetmro(tcls((s5/usr/lib/python2.7/dist-packages/setuptools/monkey.pyt_get_mros	cCsCt|tj�rtnt|tj�r0tnd�}||�S(NcSsdS(N(tNone(titem((s5/usr/lib/python2.7/dist-packages/setuptools/monkey.pyt<lambda>*t(t
isinstanceRtclass_typestget_unpatched_classttypestFunctionTypetget_unpatched_function(Rtlookup((s5/usr/lib/python2.7/dist-packages/setuptools/monkey.pyt
get_unpatched&s	cCsQd�t|�D�}t|�}|jjd�sMd|}t|��n|S(s�Protect against re-patching the distutils if reloaded

    Also ensures that no other distutils extension monkeypatched the distutils
    first.
    css'|]}|jjd�s|VqdS(t
setuptoolsN(t
__module__t
startswith(t.0R((s5/usr/lib/python2.7/dist-packages/setuptools/monkey.pys	<genexpr>6st	distutilss(distutils has already been patched by %r(R	tnextRRtAssertionError(Rtexternal_basestbasetmsg((s5/usr/lib/python2.7/dist-packages/setuptools/monkey.pyR/s
cCs1tjtj_tjd
k}|r6tjtj_ntjdkp�dtjko_d
knp�dtjko~dkn}|r�d}|tjj	_
nt�x/tjtjtj
fD]}tjj|_q�Wtjjtj_tjjtj_d	tjkr&tjjtjd	_nt�dS(Niiiii
iishttps://upload.pypi.org/legacy/sdistutils.command.build_ext(iii(iii
(ii(iii(ii(iii(RtCommandRtcoretsystversion_infotfindalltfilelisttconfigt
PyPIRCCommandtDEFAULT_REPOSITORYt_patch_distribution_metadatatdisttcmdtDistributiont	extensiont	Extensiontmodulest#patch_for_msvc_specialized_compiler(thas_issue_12885tneeds_warehouset	warehousetmodule((s5/usr/lib/python2.7/dist-packages/setuptools/monkey.pyt	patch_allAs$cCs=x6dD].}ttj|�}ttjj||�qWdS(sDPatch write_pkg_file and read_pkg_file for higher metadata standardstwrite_pkg_filet
read_pkg_filetget_metadata_versionN(R6R7R8(tgetattrRR*tsetattrRtDistributionMetadata(tattrtnew_val((s5/usr/lib/python2.7/dist-packages/setuptools/monkey.pyR)hs
cCs9t||�}t|�jd|�t|||�dS(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(R9tvarst
setdefaultR:(treplacementt
target_modt	func_nametoriginal((s5/usr/lib/python2.7/dist-packages/setuptools/monkey.pyt
patch_funcoscCs
t|d�S(NR>(R9(t	candidate((s5/usr/lib/python2.7/dist-packages/setuptools/monkey.pyR�scs�td��tj�dkr"dS�fd�}tj|d�}tj|d�}y$t|d��t|d��Wntk
r�nXyt|d	��Wntk
r�nXyt|d
��Wntk
r�nXdS(s\
    Patch functions in distutils to use standalone Microsoft Visual C++
    compilers.
    ssetuptools.msvctWindowsNcsqd|krdnd}||jd�}t�|�}t|�}t||�sdt|��n|||fS(sT
        Prepare the parameters for patch_func to patch indicated function.
        tmsvc9tmsvc9_tmsvc14_t_(tlstripR9RthasattrtImportError(tmod_nameRCtrepl_prefixt	repl_nametrepltmod(tmsvc(s5/usr/lib/python2.7/dist-packages/setuptools/monkey.pytpatch_params�ssdistutils.msvc9compilersdistutils._msvccompilertfind_vcvarsalltquery_vcvarsallt_get_vc_envtgen_lib_options(RRtsystemt	functoolstpartialRERN(RURHtmsvc14((RTs5/usr/lib/python2.7/dist-packages/setuptools/monkey.pyR0�s&



(t__doc__R"tdistutils.filelistRRRR[t	importlibRRtsetuptools.externRRt__all__R	RRR5R)RERR0(((s5/usr/lib/python2.7/dist-packages/setuptools/monkey.pyt<module>s$					'