a (šReã@sxddlmZddlmmZddlZddlZddlZddl Z ddl m Z ddl Z e Zd dd„ZGdd „d e ejƒZdS) é)ÚlogNé)Úsdist_add_defaultsÚccs,t d¡D]}| ¡|ƒD] }|Vqq dS)z%Find all files under revision controlzsetuptools.file_findersN)Ú pkg_resourcesÚiter_entry_pointsÚload)ÚdirnameÚepÚitem©r úŽ/builddir/build/BUILDROOT/alt-python39-setuptools-58.3.0-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/setuptools/command/sdist.pyÚ walk_revctrlsrcs¼eZdZdZgd¢ZiZgd¢Zedd„eDƒƒZdd„Z dd „Z d d „Z d d „Z e ejdd„ƒƒZ‡fdd„Zdd„Zdd„Zdd„Z‡fdd„Zdd„Zdd„Zdd„Zd d!„Z‡ZS)"Úsdistz=Smart sdist that finds anything supported by revision control))zformats=Nz6formats for source distribution (comma-separated list))z keep-tempÚkz@keep the distribution tree around after creating archive file(s))z dist-dir=ÚdzFdirectory to put the source distribution archive(s) in [default: dist])zowner=Úuz@Owner name used when creating a tar file [default: current user])zgroup=ÚgzAGroup name used when creating a tar file [default: current group])rz.rstz.txtz.mdccs|]}d |¡VqdS)z README{0}N)Úformat)Ú.0Úextr r r Ú +ózsdist.cCs–| d¡| d¡}|j|_|j tj |jd¡¡| ¡|  ¡D]}| |¡qD|  ¡t |j dgƒ}|j D] }dd|f}||vrp| |¡qpdS)NÚegg_infoz SOURCES.txtÚ dist_filesrr)Ú run_commandÚget_finalized_commandÚfilelistÚappendÚosÚpathÚjoinrÚ check_readmeÚget_sub_commandsÚmake_distributionÚgetattrÚ distributionZ archive_files)ÚselfZei_cmdÚcmd_namerÚfileÚdatar r r Úrun-s      z sdist.runcCstj |¡| ¡dS©N)ÚorigrÚinitialize_optionsÚ_default_to_gztar©r'r r r r.@s zsdist.initialize_optionscCstjdkrdSdg|_dS)N)éérÚbetarÚgztar)ÚsysÚ version_infoÚformatsr0r r r r/Es zsdist._default_to_gztarcCs8| ¡tj |¡Wdƒn1s*0YdS)z% Workaround for #516 N)Ú_remove_os_linkr-rr$r0r r r r$Ks zsdist.make_distributionc cspGdd„dƒ}ttd|ƒ}zt`Wnty4Yn0zdVW||urlttd|ƒn||urjttd|ƒ0dS)zG In a context, remove and restore os.link if it exists c@s eZdZdS)z&sdist._remove_os_link..NoValueN)Ú__name__Ú __module__Ú __qualname__r r r r ÚNoValueYsr<ÚlinkN)r%rr=Ú ExceptionÚsetattr)r<Zorig_valr r r r8Rs  ÿzsdist._remove_os_linkcs&tƒ ¡tj d¡r"|j d¡dS)Nzpyproject.toml)ÚsuperÚ_add_defaults_optionalrr Úisfilerrr0©Ú __class__r r rAgs  zsdist._add_defaults_optionalcCs8|j ¡r4| d¡}|j | ¡¡| | |¡¡dS)zgetting python filesÚbuild_pyN)r&Úhas_pure_modulesrrÚextendZget_source_filesÚ_add_data_filesÚ_safe_data_files©r'rEr r r Ú_add_defaults_pythonls  zsdist._add_defaults_pythoncCs|jjr dS|jS)z¶ Extracting data_files from build_py is known to cause infinite recursion errors when `include_package_data` is enabled, so suppress it in that case. r )r&Zinclude_package_dataÚ data_filesrJr r r rIsszsdist._safe_data_filescCs|j dd„|Dƒ¡dS)zA Add data files as found in build_py.data_files. css.|]&\}}}}|D]}tj ||¡VqqdSr,)rr r!)rÚ_Úsrc_dirÚ filenamesÚnamer r r rs þz(sdist._add_data_files..N)rrG)r'rLr r r rH}s þzsdist._add_data_filescs0ztƒ ¡Wnty*t d¡Yn0dS)Nz&data_files contains unexpected objects)r@Ú_add_defaults_data_filesÚ TypeErrorrÚwarnr0rCr r rQ‡s zsdist._add_defaults_data_filescCs8|jD]}tj |¡rdSq| dd |j¡¡dS)Nz,standard file not found: should have one of z, )ÚREADMESrr ÚexistsrSr!)r'Úfr r r r"s   ÿÿzsdist.check_readmecCs^tj |||¡tj |d¡}ttdƒrJtj |¡rJt |¡|  d|¡|  d¡  |¡dS)Nz setup.cfgr=r) r-rÚmake_release_treerr r!ÚhasattrrUÚunlinkÚ copy_filerZsave_version_info)r'Úbase_dirÚfilesÚdestr r r rW—s   zsdist.make_release_treecCsTtj |j¡sdSt |jd¡}| ¡}Wdƒn1s>0Y|d ¡kS)NFÚrbz+# file GENERATED by distutils, do NOT edit )rr rBÚmanifestÚioÚopenÚreadlineÚencode)r'ÚfpÚ first_liner r r Ú_manifest_is_not_generated¤s&ÿz sdist._manifest_is_not_generatedc Csˆt d|j¡t|jdƒ}|D]\}z| d¡}Wn$tyTt d|¡YqYn0| ¡}| d¡s|snq|j   |¡q|  ¡dS)zªRead the manifest file (named by 'self.manifest') and use it to fill in 'self.filelist', the list of files to include in the source distribution. zreading manifest file '%s'r^zUTF-8z"%r not UTF-8 decodable -- skippingú#N) rÚinfor_raÚdecodeÚUnicodeDecodeErrorrSÚstripÚ startswithrrÚclose)r'r_Úliner r r Ú read_manifest®s   zsdist.read_manifest)r9r:r;Ú__doc__Ú user_optionsÚ negative_optZREADME_EXTENSIONSÚtuplerTr+r.r/r$Ú staticmethodÚ contextlibÚcontextmanagerr8rArKrIrHrQr"rWrfroÚ __classcell__r r rCr rs*       r)r)Ú distutilsrZdistutils.command.sdistÚcommandrr-rr5r`ruZ py36compatrrÚlistZ_default_revctrlrr r r r Ús