b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 / distutils / command /
Filename/usr/lib64/python2.6/distutils/command/sdist.pyc
Size15.1 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 13:07
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@sÙdZdZddkZddkZddkZddkTddklZddklZddk l
Z
l Z l Z l
Z
ddklZddkTdd klZdd
k lZd �Zd efd
��YZdS(sadistutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution).s6$Id: sdist.py 83992 2010-08-14 02:07:26Z eric.araujo $iÿÿÿÿN(t*(tglob(tCommand(tdir_utiltdep_utilt file_utilt archive_util(tTextFile(tFileList(tlogcCs�ddkl}ddkl}g}x6|i�D](}|id|d||df�q3W|i�||�}|id�dS(soPrint all possible values for the 'formats' option (used by
the "--help-formats" command-line option).
iÿÿÿÿ(t FancyGetopt(tARCHIVE_FORMATSsformats=is.List of available source distribution formats:N( tdistutils.fancy_getoptR
tdistutils.archive_utilR tkeystappendtNonetsortt
print_help(R
R tformatstformattpretty_printer((s//usr/lib64/python2.6/distutils/command/sdist.pyt show_formatss

 tsdistc
Bs eZdZd1d2d4d5d6d7d8d9d:ddddfd;g Zdd dddgZdd3defgZhdd 6d d
6Zhd d!6d"d#6Z d$�Z
d%�Z d&�Z d'�Z
d(�Zd)�Zd*�Zd+�Zd,�Zd-�Zd.�Zd/�Zd0�ZRS(<s6create a source distribution (tarball, zip file, etc.)s template=tts5name of manifest template file [default: MANIFEST.in]s manifest=tms)name of manifest file [default: MANIFEST]s use-defaultssRinclude the default file set in the manifest [default; disable with --no-defaults]s no-defaultss"don't include the default file settprunes�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune]sno-prunes$don't automatically exclude anythings
manifest-onlytosEjust regenerate the manifest and then stop (implies --force-manifest)sforce-manifesttfs6forcibly regenerate the manifest and carry on as usualsformats=s6formats for source distribution (comma-separated list)s keep-temptks1keep the distribution tree around after creating sarchive file(s)s dist-dir=tdsFdirectory to put the source distribution archive(s) in [default: dist]s help-formatss#list available distribution formatstgztartposixtziptntcCs^d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_
dS(Nii( Rttemplatetmanifestt use_defaultsRt
manifest_onlytforce_manifestRt keep_temptdist_dirt
archive_files(tself((s//usr/lib64/python2.6/distutils/command/sdist.pytinitialize_optionsVs         cCsê|idjo
d|_n|idjo
d|_n|id�|idjoHy|itig|_Wq�tj
ot ddti�q�Xnt
i |i�}|ot d|�n|i
djo
d|_
ndS(NtMANIFESTs MANIFEST.inRs.don't know how to create source distributions son platform %ssunknown archive format '%s'tdist(R$RR#tensure_string_listRtdefault_formattostnametKeyErrortDistutilsPlatformErrorRtcheck_archive_formatstDistutilsOptionErrorR)(R+t
bad_format((s//usr/lib64/python2.6/distutils/command/sdist.pytfinalize_optionsks$


cCs=t�|_|i�|i�|iodS|i�dS(N(Rtfilelisttcheck_metadatat
get_file_listR&tmake_distribution(R+((s//usr/lib64/python2.6/distutils/command/sdist.pytrun�s  


cCsï|ii}g}x?dD]7}t||�o
t||�p|i|�qqW|o!|idti|d��n|io#|i p|idd�qënC|i
o#|i p|idd �qën|id
d d �d
S(sæEnsure that all required elements of meta-data (name, version,
URL, (author and author_email) or (maintainer and
maintainer_email)) are supplied by the Distribution object; warn if
any are missing.
R2tversionturlsmissing required meta-data: s, s)missing meta-data: if 'author' supplied, s#'author_email' must be supplied toos-missing meta-data: if 'maintainer' supplied, s''maintainer_email' must be supplied toos4missing meta-data: either (author and author_email) s%or (maintainer and maintainer_email) smust be suppliedN(snamesversionR?( t distributiontmetadatathasattrtgetattrRtwarntstringtjointauthort author_emailt
maintainertmaintainer_email(R+RAtmissingtattr((s//usr/lib64/python2.6/distutils/command/sdist.pyR:�s(   

 

 cCs~tii|i�}|oti|i|i�}n|id|ii |if�ti|ii |i�}|o |p|}|i
p|i }tii|i�}| o| }|p|p|o�|p|i dd|i�n|i
i�|io|i�n|o|i�n|io|i�n|i
i�|i
i�|i�n |i�dS(scFigure out the list of files to include in the source
distribution, and put it in 'self.filelist'. This might involve
reading the manifest template (and writing the manifest), or just
reading the manifest, or just using the default file set -- it all
depends on the user's options and the state of the filesystem.
schecking if %s newer than %ss&manifest template '%s' does not exist s(using default file list)N(R1tpathtisfileR#RtnewerR$t debug_printR@t script_nameR'R&RDR9tfindallR%t add_defaultst
read_templateRtprune_file_listRtremove_duplicatestwrite_manifestt
read_manifest(R+ttemplate_existsttemplate_newert setup_newertmanifest_outofdatet force_regentmanifest_existstneither_exists((s//usr/lib64/python2.6/distutils/command/sdist.pyR;¼s8
  
 




c Cs d|iig}xÐ|D]È}t|�tjow|}d}x<|D]4}tii|�od}|ii|�PqEqEW|p!|i dt
i |d��qáqtii|�o|ii|�q|i d|�qWdd g}xD|D]<}t tii
t|��}|o|ii|�qøqøW|ii�o)|id
�}|ii|i��n|ii�o)|id �} |ii| i��n|ii�o)|id �}
|ii|
i��n|ii�o)|id
�} |ii| i��ndS(s©Add 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 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.
tREADMEs
README.txtiis,standard file not found: should have one of s, sstandard file '%s' not founds
test/test*.pys setup.cfgtbuild_pyt build_extt
build_clibt
build_scriptsN(R`s
README.txt(R@RQttypet TupleTypeR1RMtexistsR9RRDRERFtfilterRNRtextendthas_pure_modulestget_finalized_commandtget_source_filesthas_ext_modulesthas_c_librariest has_scripts( R+t standardstfntaltstgot_ittoptionaltpatterntfilesRaRbRcRd((s//usr/lib64/python2.6/distutils/command/sdist.pyRSsH    cCsºtid|i�t|idddddddddddd�}xm|i�}|d
joPny|ii|�WqItj
o)}|i d |i
|i |f�qIXqId
S( sÈRead and parse manifest template file named by self.template.

(usually "MANIFEST.in") The parsing and processing is done by
'self.filelist', which updates itself accordingly.
sreading manifest template '%s'tstrip_commentsit skip_blankst
join_linest lstrip_wst rstrip_wst
collapse_joins%s, line %d: %sN( R tinfoR#RtreadlineRR9tprocess_template_linetDistutilsTemplateErrorRDtfilenamet current_line(R+R#tlinetmsg((s//usr/lib64/python2.6/distutils/command/sdist.pyRT;s$   
cCs¾|id�}|ii�}|iidd|i�|iidd|�tidjo
d}nd}dddd d
d d g}d
|di |�|f}|ii|dd�dS(svPrune off branches that might slip into the file list as created
by 'read_template()', but really don't belong there:
* the build tree (typically "build")
* the release tree itself (only an issue if we ran "sdist"
previously with --keep-temp, or it aborted)
* any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
tbuildtprefixtwin32s/|\\t/tRCStCVSs\.svns\.hgs\.gits\.bzrt_darcss(^|%s)(%s)(%s).*t|tis_regexiN(
RkR@t get_fullnameR9texclude_patternRt
build_basetsystplatformRF(R+R�tbase_dirtsepstvcs_dirstvcs_ptrn((s//usr/lib64/python2.6/distutils/command/sdist.pyRUYs
 cCs0|iti|i|iifd|i�dS(s²Write the file list in 'self.filelist' (presumably as filled in
by 'add_defaults()' and 'read_template()') to the manifest file
named by 'self.manifest'.
swriting manifest file '%s'N(texecuteRt
write_fileR$R9Rv(R+((s//usr/lib64/python2.6/distutils/command/sdist.pyRWss cCs�tid|i�t|i�}xS|i�}|djoPn|ddjo|dd!}n|ii|�q%|i�dS(sª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.
sreading manifest file '%s'tiÿÿÿÿs
iN(R R}R$topenR~R9Rtclose(R+R$R�((s//usr/lib64/python2.6/distutils/command/sdist.pyRXs 
cCsú|i|�ti||d|i�ttd�od}d|}nd}d|}|ptid�nti |�xa|D]Y}ti
i |�ptid|�q�ti
i ||�}|i
||d|�q�W|iii|�dS( sÆCreate the directory tree that will become the source
distribution archive. All directories implied by the filenames in
'files' are created under 'base_dir', and then we hard link or copy
(if hard linking is unavailable) those files into place.
Essentially, this duplicates the developer's source tree, but in a
directory named after the distribution, containing only the files
to be distributed.
tdry_runtlinkthardsmaking hard links in %s...scopying files to %s...s)no files to distribute -- empty manifest?s#'%s' not a regular file -- skippingN(tmkpathRt create_treeR�RBR1RR RDR}RMRNRFt copy_fileR@RAtwrite_pkg_info(R+R�RvR�R�tfiletdest((s//usr/lib64/python2.6/distutils/command/sdist.pytmake_release_tree�s"
 

cCs|ii�}tii|i|�}|i||ii�g}d|i jo,|i i
|i i |i i d���nxR|i D]G}|i
||d|�}|i
|�|iii
dd|f�q�W||_|ipti|d|i�ndS(s¯Create the source distribution(s). First, we create the release
tree with 'make_release_tree()'; then, we create all required
archive files (according to 'self.formats') from the release tree.
Finally, we clean up by blowing away the release tree (unless
'self.keep_temp' is true). The list of archive files created is
stored so it can be retrieved later by 'get_archive_files()'.
ttarR�RR�R�N(R@R�R1RMRFR)R¥R9RvRRtpoptindext make_archivet
dist_filesR*R(Rt remove_treeR�(R+R�t base_nameR*tfmtR£((s//usr/lib64/python2.6/distutils/command/sdist.pyR<¾s
,

  
cCs|iS(szReturn the list of archive files created when the command
was run, or None if the command hasn't run yet.
(R*(R+((s//usr/lib64/python2.6/distutils/command/sdist.pytget_archive_filesÛs(s template=Rs5name of manifest template file [default: MANIFEST.in](s manifest=Rs)name of manifest file [default: MANIFEST]N(s use-defaultsNsRinclude the default file set in the manifest [default; disable with --no-defaults](s no-defaultsNs"don't include the default file set(spruneNs�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune](sno-pruneNs$don't automatically exclude anything(s
manifest-onlyRsEjust regenerate the manifest and then stop (implies --force-manifest)(sforce-manifestRs6forcibly regenerate the manifest and carry on as usual(sformats=Ns6formats for source distribution (comma-separated list)(s dist-dir=RsFdirectory to put the source distribution archive(s) in [default: dist](t__name__t
__module__t descriptionRt user_optionstboolean_optionsRt help_optionst negative_optR0R,R8R=R:R;RSRTRURWRXR¥R<R®(((s//usr/lib64/python2.6/distutils/command/sdist.pyR$s\  



    ! F 9    , (t__doc__t __revision__R1RER�ttypesRtdistutils.coreRt distutilsRRRRtdistutils.text_fileRtdistutils.errorstdistutils.filelistRR RR(((s//usr/lib64/python2.6/distutils/command/sdist.pyt<module>s 
"