选择文件�文件大�最�修改时间�作
[📄] 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 Ävh'ã@s¸dZddlZddlZddlZddlZddlZddlZddlZGdd„deƒZ Gdd„dej j ƒZ ddd „Z d d „Z d d „Zdd„Zddd„Zddd„Zddd„Zddd„Zddd„ZdS) a-A PEP 517 interface to setuptools Previously, when a user or a command line tool (let's call it a "frontend") needed to make a request of setuptools to take a certain action, for example, generating a list of installation requirements, the frontend would would call "setup.py egg_info" or "setup.py bdist_wheel" on the command line. PEP 517 defines a different method of interfacing with setuptools. Rather than calling "setup.py" directly, the frontend should: 1. Set the current directory to the directory with a setup.py file 2. Import this module into a safe python interpreter (one in which setuptools can potentially set global variables or crash hard). 3. Call one of the functions defined in PEP 517. What each function does is defined in PEP 517. However, here is a "casual" definition of the functions (this definition should not be relied on for bug reports or API stability): - `build_wheel`: build a wheel in the folder and return the basename - `get_requires_for_build_wheel`: get the `setup_requires` to build - `prepare_metadata_for_build_wheel`: get the `install_requires` - `build_sdist`: build an sdist in the folder and return the basename - `get_requires_for_build_sdist`: get the `setup_requires` to build Again, this is not a formal definition! Just a "taste" of the module. éNc@seZdZdd„ZdS)ÚSetupRequirementsErrorcCs ||_dS)N)Ú specifiers)Úselfr©rú /usr/lib/python3.6/build_meta.pyÚ__init__(szSetupRequirementsError.__init__N)Ú__name__Ú __module__Ú __qualname__rrrrrr'src@s&eZdZdd„Zeejdd„ƒƒZdS)Ú DistributioncCs t|ƒ‚dS)N)r)rrrrrÚfetch_build_eggs-szDistribution.fetch_build_eggsc cs*tjj}|tj_z dVWd|tj_XdS)zw Replace distutils.dist.Distribution with this class for the duration of this context. N)Ú distutilsZcorer )ÚclsZorigrrrÚpatch0s  zDistribution.patchN)rr r r Ú classmethodÚ contextlibÚcontextmanagerrrrrrr ,sr úsetup.pycCsH|}d}ttdtƒ|ƒ}|jƒjddƒ}|jƒtt||dƒtƒƒdS)NÚ__main__Úopenz\r\nz\nÚexec) ÚgetattrÚtokenizerÚreadÚreplaceÚcloserÚcompileÚlocals)Z setup_scriptÚ__file__rÚfÚcoderrrÚ _run_setup@s r!cCs|pi}|jdgƒ|S)Nz--global-option)Ú setdefault)Úconfig_settingsrrrÚ _fix_configKs r$cCs~t|ƒ}ddg}tjdd…dg|dt_ytjƒ� tƒWdQRXWn,tk rx}z||j7}WYdd}~XnX|S)NÚ setuptoolsZwheeléZegg_infoz--global-option)r$ÚsysÚargvr rr!rr)r#Z requirementsÚerrrÚ_get_build_requiresQs  r*cs‡fdd„tjˆƒDƒS)Ncs&g|]}tjjtjjˆ|ƒƒr|‘qSr)ÚosÚpathÚisdirÚjoin)Ú.0Úname)Úa_dirrrú asz1_get_immediate_subdirectories..)r+Úlistdir)r1r)r1rÚ_get_immediate_subdirectories`sr4cCst|ƒ}t|ƒS)N)r$r*)r#rrrÚget_requires_for_build_wheelesr5cCst|ƒ}t|ƒS)N)r$r*)r#rrrÚget_requires_for_build_sdistjsr6cCs¾tjdd…dd|gt_tƒ|}x`dd„tj|ƒDƒ}t|ƒdkrptt|ƒƒdkrptjj|tj|ƒdƒ}q&t|ƒdks€t ‚Pq&W||kr¶t j tjj||dƒ|ƒt j |dd�|dS) Nr&Z dist_infoz --egg-basecSsg|]}|jdƒr|‘qS)z .dist-info)Úendswith)r/rrrrr2usz4prepare_metadata_for_build_wheel..rT)Ú ignore_errors) r'r(r!r+r3Úlenr4r,r.ÚAssertionErrorÚshutilZmoveÚrmtree)Úmetadata_directoryr#Zdist_info_directoryZ dist_infosrrrÚ prepare_metadata_for_build_wheelos$ r>cCs‚t|ƒ}tjj|ƒ}tjdd…dg|dt_tƒ|dkrVtj|ƒtj d|ƒdd„tj |ƒDƒ}t |ƒdkszt ‚|dS)Nr&Z bdist_wheelz--global-optionÚdistcSsg|]}|jdƒr|‘qS)z.whl)r7)r/rrrrr2—szbuild_wheel..r) r$r+r,Úabspathr'r(r!r;r<Úcopytreer3r9r:)Zwheel_directoryr#r=ZwheelsrrrÚ build_wheelŒs    rBcCs‚t|ƒ}tjj|ƒ}tjdd…dg|dt_tƒ|dkrVtj|ƒtj d|ƒdd„tj |ƒDƒ}t |ƒdkszt ‚|dS)Nr&Zsdistz--global-optionr?cSsg|]}|jdƒr|‘qS)z.tar.gz)r7)r/rrrrr2¨szbuild_sdist..r) r$r+r,r@r'r(r!r;r<rAr3r9r:)Zsdist_directoryr#ZsdistsrrrÚ build_sdistžs    rC)r)N)N)N)NN)N)Ú__doc__r+r'rr;rr%r Ú BaseExceptionrr?r r!r$r*r4r5r6r>rBrCrrrrÚs&