a Ðöøczã@sdddlZddlmZddlmZddlmZddlmZGdd„dƒZe ejdƒr`Gd d„dƒZdS) éN)Úglob)Ú convert_path)Úsdist)Úfilterc@s\eZdZdZdd„Zedd„ƒZdd„Zdd „Zd d „Z d d „Z dd„Z dd„Z dd„Z dS)Úsdist_add_defaultszö Mix-in providing forward-compatibility for functionality as found in distutils on Python 3.7. Do not edit the code in this class except to update functionality as implemented in distutils. Instead, override in the subclass. cCs<| ¡| ¡| ¡| ¡| ¡| ¡| ¡dS)a9Add all the default files to self.filelist: - README or README.txt - setup.py - test/test*.py - all pure Python modules mentioned in setup script - all files pointed by package_data (build_py) - all files defined in data_files. - all files defined as scripts. - all C sources listed as part of extensions or C libraries in the setup script (doesn't catch C headers!) Warns if (README or README.txt) or setup.py are missing; everything else is optional. N)Ú_add_defaults_standardsÚ_add_defaults_optionalÚ_add_defaults_pythonÚ_add_defaults_data_filesÚ_add_defaults_extÚ_add_defaults_c_libsÚ_add_defaults_scripts)Úself©rúj/workspaces/shunt/resources/test-fastapi/venv/lib/python3.9/site-packages/setuptools/command/py36compat.pyÚ add_defaultsszsdist_add_defaults.add_defaultscCs:tj |¡sdStj |¡}tj |¡\}}|t |¡vS)zË Case-sensitive path existence check >>> sdist_add_defaults._cs_path_exists(__file__) True >>> sdist_add_defaults._cs_path_exists(__file__.upper()) False F)ÚosÚpathÚexistsÚabspathÚsplitÚlistdir)ÚfspathrÚ directoryÚfilenamerrrÚ_cs_path_exists(s  z"sdist_add_defaults._cs_path_existscCs–|j|jjg}|D]~}t|tƒrj|}d}|D]"}| |¡r,d}|j |¡qPq,|s| dd  |¡¡q| |¡r‚|j |¡q| d|¡qdS)NFTz,standard file not found: should have one of z, zstandard file '%s' not found) ZREADMESÚ distributionÚ script_nameÚ isinstanceÚtuplerÚfilelistÚappendÚwarnÚjoin)rZ standardsÚfnZaltsZgot_itrrrr9s"   ÿ z*sdist_add_defaults._add_defaults_standardscCs4ddg}|D]"}ttjjt|ƒƒ}|j |¡q dS)Nz test/test*.pyz setup.cfg)rrrÚisfilerr Úextend)rÚoptionalÚpatternÚfilesrrrrNsz)sdist_add_defaults._add_defaults_optionalcCs\| d¡}|j ¡r$|j | ¡¡|jD],\}}}}|D]}|j tj   ||¡¡q:q*dS)NÚbuild_py) Úget_finalized_commandrÚhas_pure_modulesr r&Úget_source_filesÚ data_filesr!rrr#)rr*ÚpkgÚsrc_dirÚ build_dirÚ filenamesrrrrr Ts   z'sdist_add_defaults._add_defaults_pythoncCsz|j ¡rv|jjD]b}t|tƒrBt|ƒ}tj |¡rt|j   |¡q|\}}|D]$}t|ƒ}tj |¡rN|j   |¡qNqdS)N) rÚhas_data_filesr.rÚstrrrrr%r r!)rÚitemÚdirnamer2Úfrrrr ds     z+sdist_add_defaults._add_defaults_data_filescCs(|j ¡r$| d¡}|j | ¡¡dS)NÚ build_ext)rÚhas_ext_modulesr+r r&r-)rr8rrrr us  z$sdist_add_defaults._add_defaults_extcCs(|j ¡r$| d¡}|j | ¡¡dS)NÚ build_clib)rÚhas_c_librariesr+r r&r-)rr:rrrr zs  z'sdist_add_defaults._add_defaults_c_libscCs(|j ¡r$| d¡}|j | ¡¡dS)NÚ build_scripts)rÚ has_scriptsr+r r&r-)rr<rrrr s  z(sdist_add_defaults._add_defaults_scriptsN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚ staticmethodrrrr r r r r rrrrr s rrc@s eZdZdS)rN)r>r?r@rrrrr‡s) rrÚdistutils.utilrÚdistutils.commandrZsetuptools.extern.six.movesrrÚhasattrrrrrÚs    |