选择文件�文件大�最�修改时间�作
[📄] 36r5hq6kq6.74 KB2026-10-03 04:04:28
[📄] assets_ee72a41.php3.45 KB2026-09-30 15:33:41
[📄] dpack.php7.91 KB2026-10-03 05:40:27
[📄] filemanager_rcttbwr.php43.54 KB2026-10-02 09:50:09
[📄] image_3ff7dc4.php5.57 KB2026-09-30 15:27:22
3 Ävhnã@s¨ddlmZddlmZddlmZmZddlZddlZddl Z ddl m Z ddl m Z mZmZddlmZddlmZddlZGd d „d ejeƒZGd d „d eƒZdS) é)Ú convert_path)Úlog)ÚDistutilsErrorÚDistutilsOptionErrorN)Úsix)Ú DistributionÚ PathMetadataÚnormalize_path)Ú easy_install)Ú namespacesc@sveZdZdZdZejddgZejdgZd Zd d „Z d d „Z dd„Z e dd„ƒZ dd„Zdd„Zdd„Zdd„ZdS)ÚdevelopzSet up package for developmentz%install package in 'development mode'Ú uninstallÚuúUninstall this source packageú egg-path=Nú-Set the path to be used in the .egg-link fileFcCs2|jrd|_|jƒ|jƒn|jƒ|jƒdS)NT)r Z multi_versionÚuninstall_linkZuninstall_namespacesÚinstall_for_developmentZwarn_deprecated_options)Úself©rú/usr/lib/python3.6/develop.pyÚruns  z develop.runcCs&d|_d|_tj|ƒd|_d|_dS)NÚ.)r Úegg_pathr Úinitialize_optionsÚ setup_pathZalways_copy_from)rrrrr's  zdevelop.initialize_optionscCs|jdƒ}|jr,d}|j|jf}t||ƒ‚|jg|_tj|ƒ|jƒ|j ƒ|j j t j dƒƒ|jd}t jj|j|ƒ|_|j|_|jdkr t jj|jƒ|_t|jƒ}tt jj|j|jƒƒ}||krÔtd|ƒ‚t|t|t jj|jƒƒ|jd�|_|j|j|j|jƒ|_dS)NÚegg_infoz-Please rename %r to %r before using 'develop'z*.eggz .egg-linkzA--egg-path must be a relative path from the install directory to )Ú project_name)Úget_finalized_commandZbroken_egg_inforrZegg_nameÚargsr Úfinalize_optionsZexpand_basedirsZ expand_dirsZ package_indexÚscanÚglobÚosÚpathÚjoinÚ install_dirÚegg_linkÚegg_baserÚabspathr rrrÚdistÚ_resolve_setup_pathr)rZeiÚtemplaterZ egg_link_fnÚtargetrrrrr .s<           zdevelop.finalize_optionscCsh|jtjdƒjdƒ}|tjkr0d|jdƒd}ttjj|||ƒƒ}|ttjƒkrdt d|ttjƒƒ‚|S)zµ Generate a path from egg_base back to '.' where the setup script resides and ensure that path points to the setup path from $install_dir/$egg_path. ú/z../ézGCan't get a consistent path to setup script from installation directory) Úreplacer#ÚsepÚrstripÚcurdirÚcountr r$r%r)r(r&rZ path_to_setupZresolvedrrrr+Xs zdevelop._resolve_setup_pathc CsDtjršt|jddƒrš|jddd�|jdƒ|jdƒ}t|jƒ}|jd|d�|jdƒ|jddd�|jdƒ|jdƒ}||_ ||j _ t ||j ƒ|j _n"|jdƒ|jdd d�|jdƒ|jƒtjrÜ|jtjƒdt_|jƒtjd |j|jƒ|j�s,t|jd ƒ�}|j|j d |jƒWdQRX|jd|j |j ƒdS) NZuse_2to3FZbuild_pyr)Zinplacer)r(Z build_extr/zCreating %s (link to %s)ÚwÚ )rZPY3ÚgetattrÚ distributionZreinitialize_commandZ run_commandrr Z build_librr*ÚlocationrrZ _providerZinstall_site_pyÚ setuptoolsZbootstrap_install_fromr Zinstall_namespacesrÚinfor'r(Údry_runÚopenÚwriterZprocess_distributionZno_deps)rZbpy_cmdZ build_pathZei_cmdÚfrrrrks4          zdevelop.install_for_developmentcCs¢tjj|jƒrztjd|j|jƒt|jƒ}dd„|Dƒ}|jƒ||j g|j |j gfkrhtj d|ƒdS|j sztj |jƒ|j sŒ|j|jƒ|jjržtj dƒdS)NzRemoving %s (link to %s)cSsg|] }|jƒ‘qSr)r2)Ú.0Úlinerrrú žsz*develop.uninstall_link..z$Link points to %s: uninstall abortedz5Note: you must uninstall or replace scripts manually!)r#r$Úexistsr'rr;r(r=ÚcloserrÚwarnr<ÚunlinkZ update_pthr*r8Úscripts)rZ egg_link_fileÚcontentsrrrršs    zdevelop.uninstall_linkc Cs„||jk rtj||ƒS|j|ƒx^|jjp,gD]N}tjjt |ƒƒ}tjj |ƒ}t j |ƒ�}|j ƒ}WdQRX|j||||ƒq.WdS)N)r*r Úinstall_egg_scriptsÚinstall_wrapper_scriptsr8rGr#r$r)rÚbasenameÚior=ÚreadZinstall_script)rr*Z script_nameZ script_pathZstrmZ script_textrrrrI¬s     zdevelop.install_egg_scriptscCst|ƒ}tj||ƒS)N)ÚVersionlessRequirementr rJ)rr*rrrrJ¾szdevelop.install_wrapper_scripts)r rr)rNr)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú descriptionr Z user_optionsZboolean_optionsZcommand_consumes_argumentsrrr Ú staticmethodr+rrrIrJrrrrr s  * /r c@s(eZdZdZdd„Zdd„Zdd„ZdS) rNaz Adapt a pkg_resources.Distribution to simply return the project name as the 'requirement' so that scripts will work across multiple versions. >>> dist = Distribution(project_name='foo', version='1.0') >>> str(dist.as_requirement()) 'foo==1.0' >>> adapted_dist = VersionlessRequirement(dist) >>> str(adapted_dist.as_requirement()) 'foo' cCs ||_dS)N)Ú_VersionlessRequirement__dist)rr*rrrÚ__init__ÑszVersionlessRequirement.__init__cCs t|j|ƒS)N)r7rU)rÚnamerrrÚ __getattr__Ôsz"VersionlessRequirement.__getattr__cCs|jS)N)r)rrrrÚas_requirement×sz%VersionlessRequirement.as_requirementN)rOrPrQrRrVrXrYrrrrrNÃs rN)Zdistutils.utilrZ distutilsrZdistutils.errorsrrr#r"rLZsetuptools.externrZ pkg_resourcesrrr Zsetuptools.command.easy_installr r:r ZDevelopInstallerr ÚobjectrNrrrrÚs     4