ã“Rezã@sˆddlZddlmZddlmZddlmZddlmZGdd„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. cCsJ|jƒ|jƒ|jƒ|jƒ|jƒ|jƒ|jƒ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ú“/builddir/build/BUILDROOT/alt-python35-setuptools-36.3.0-4.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/setuptools/command/py36compat.pyÚ add_defaultss      zsdist_add_defaults.add_defaultscCsStjj|ƒsdStjj|ƒ}tjj|ƒ\}}|tj|ƒkS)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}x¶|D]®}t|tƒr—|}d}x4|D],}|j|ƒrDd}|jj|ƒPqDW|sÊ|jddj |ƒƒq|j|ƒr¹|jj|ƒq|jd|ƒqWdS)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_standardscCsLddg}x9|D]1}ttjjt|ƒƒ}|jj|ƒqWdS)Nz test/test*.pyz setup.cfg)rrrÚisfilerr Úextend)rÚoptionalÚpatternÚfilesrrrrNs  z)sdist_add_defaults._add_defaults_optionalcCsˆ|jdƒ}|jjƒr4|jj|jƒƒxM|jD]B\}}}}x-|D]%}|jjtj j ||ƒƒqWWq>WdS)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_pythoncCsµ|jjƒr±xŸ|jjD]‘}t|tƒrbt|ƒ}tjj|ƒr­|j j |ƒq|\}}x<|D]4}t|ƒ}tjj|ƒru|j j |ƒquWqWdS)N) rÚhas_data_filesr.rÚstrrrrr%r r!)rÚitemÚdirnamer2Úfrrrr ds    z+sdist_add_defaults._add_defaults_data_filescCs8|jjƒr4|jdƒ}|jj|jƒƒdS)NÚ build_ext)rÚhas_ext_modulesr+r r&r-)rr8rrrr usz$sdist_add_defaults._add_defaults_extcCs8|jjƒr4|jdƒ}|jj|jƒƒdS)NÚ build_clib)rÚhas_c_librariesr+r r&r-)rr:rrrr zsz'sdist_add_defaults._add_defaults_c_libscCs8|jjƒr4|jdƒ}|jj|jƒƒdS)NÚ build_scripts)rÚ has_scriptsr+r r&r-)rr<rrrr sz(sdist_add_defaults._add_defaults_scriptsN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚ staticmethodrrrr r r r r rrrrr s        rrc@seZdZdS)rN)r>r?r@rrrrr‡s ) rrÚdistutils.utilrÚdistutils.commandrZsetuptools.extern.six.movesrrÚhasattrrrrrÚs |