PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  qfc@sdZdZddlZddlZddlZddlmZddlmZddlm Z ddl m Z m Z m Z mZddlmZdd lmZmZmZdd lmZdd l mZdd lmZd Zde fdYZdS(sadistutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).s$Id$iN(tglob(twarn(tCommand(tdir_utiltdep_utilt file_utilt archive_util(tTextFile(tDistutilsPlatformErrortDistutilsOptionErrortDistutilsTemplateError(tFileList(tlog(t convert_pathcCsddlm}ddlm}g}x6|jD](}|jd|d||dfq3W|j||jddS(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_getoptRtdistutils.archive_utilRtkeystappendtNonetsortt print_help(RRtformatstformat((s//usr/lib64/python2.7/distutils/command/sdist.pyt show_formatss  tsdistcBs6eZdZdZd<d=d?d@dAdBdCdDdEddddfdFdGdHdIgZdd ddddgZd'd>d(efgZidd 6d d6Z id)d*6d+d,6Z d-efgZ d.Z d/Z d0Zd1Zd2Zd3Zd4Zd5Zd6Zd7Zd8Zd9Zd:Zd;ZRS(Js6create a source distribution (tarball, zip file, etc.)cCs|jS(sYCallable used for the check sub-command. Placed here so user_options can view it(tmetadata_check(tself((s//usr/lib64/python2.7/distutils/command/sdist.pytchecking_metadata(ss 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 settprunesspecifically 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-manifesttfskforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.sformats=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]smetadata-checks[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default]sowner=tus@Owner name used when creating a tar file [default: current user]sgroup=tgsAGroup name used when creating a tar file [default: current group]s help-formatss#list available distribution formatstgztartposixtziptnttcheckcCsyd|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ d|_ d|_ dS(Nii(Rttemplatetmanifestt use_defaultsR t manifest_onlytforce_manifestRt keep_temptdist_dirt archive_filesRtownertgroup(R((s//usr/lib64/python2.7/distutils/command/sdist.pytinitialize_optionsfs            cCs|jdkrd|_n|jdkr6d|_n|jd|jdkry|jtjg|_Wqtk rt ddtjqXnt j |j}|rt d|n|j dkrd|_ ndS(NtMANIFESTs MANIFEST.inRs.don't know how to create source distributions son platform %ssunknown archive format '%s'tdist(R-RR,tensure_string_listRtdefault_formattostnametKeyErrorRRtcheck_archive_formatsR R2(Rt bad_format((s//usr/lib64/python2.7/distutils/command/sdist.pytfinalize_options}s$     cCsUt|_x!|jD]}|j|qW|j|jrGdS|jdS(N(R tfilelisttget_sub_commandst run_commandt get_file_listR/tmake_distribution(Rtcmd_name((s//usr/lib64/python2.7/distutils/command/sdist.pytruns   cCs7tdt|jjd}|j|jdS(sDeprecated API.sadistutils.command.sdist.check_metadata is deprecated, use the check command insteadR+N(RtPendingDeprecationWarningt distributiontget_command_objtensure_finalizedRG(RR+((s//usr/lib64/python2.7/distutils/command/sdist.pytcheck_metadatas   cCstjj|j}| rP|jrP|j|jj|jjdS|sq|j dd|jn|jj |j r|j n|r|j n|jr|jn|jj|jj|jdS(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. Ns&manifest template '%s' does not exist s(using default file list)(R;tpathtisfileR,t_manifest_is_not_generatedt read_manifestRARtremove_duplicatesRtfindallR.t add_defaultst read_templateR tprune_file_listtwrite_manifest(Rttemplate_exists((s//usr/lib64/python2.7/distutils/command/sdist.pyRDs(            cCsd|jjg}x|D]}t|tr|}d}x:|D]2}tjj|rAd}|jj|PqAqAW|s|j dt j |dqqtjj|r|jj|q|j d|qWdd g}xB|D]:}t tjj t|}|r|jj|qqW|jd }|jjrb|jj|jnxM|jD]B\} } } } x-| D]%} |jjtjj | | qWqlW|jjrlx|jjD]}t|trt|}tjj |re|jj|qeq|\}} x?| D]7}t|}tjj |r*|jj|q*q*WqWn|jjr|jd }|jj|jn|jjr|jd }|jj|jn|jjr|jd }|jj|jndS(s9Add 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. 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(RXs README.txt(RIt script_namet isinstancettupleR;RMtexistsRARRtstringtjointfilterRNRtextendtget_finalized_commandthas_pure_modulestget_source_filest data_filesthas_data_fileststrR thas_ext_modulesthas_c_librariest has_scripts(Rt standardstfntaltstgot_ittoptionaltpatterntfilesRYtpkgtsrc_dirt build_dirt filenamestfilenametitemtdirnameR"RZR[R\((s//usr/lib64/python2.7/distutils/command/sdist.pyRSs^      '    cCstjd|jt|jdddddddddddd}zvxo|j}|d krhPny|jj|WqLtt fk r}|j d |j |j |fqLXqLWd |j Xd S( sRead 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,RtreadlineRRAtprocess_template_lineR t ValueErrorRRyt current_linetclose(RR,tlinetmsg((s//usr/lib64/python2.7/distutils/command/sdist.pyRT,s(    cCs|jd}|jj}|jjdd|j|jjdd|tjdkred}nd}dddd d d d g}d |dj ||f}|jj|dddS(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( ReRIt get_fullnameRAtexclude_patternRt build_basetsystplatformRb(RRtbase_dirtsepstvcs_dirstvcs_ptrn((s//usr/lib64/python2.7/distutils/command/sdist.pyRUMs  cCsk|jr$tjd|jdS|jj}|jdd|jtj |j|fd|jdS(sWrite the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. s5not writing to manually maintained manifest file '%s'Nis*# file GENERATED by distutils, do NOT editswriting manifest file '%s'( ROR RR-RARttinserttexecuteRt write_file(Rtcontent((s//usr/lib64/python2.7/distutils/command/sdist.pyRVgs    cCsStjj|jstSt|jd}z|j}Wd|jX|dkS(NtrUs+# file GENERATED by distutils, do NOT edit (R;RMRNR-tFalsetopenRR(Rtfpt first_line((s//usr/lib64/python2.7/distutils/command/sdist.pyROvs cCsytjd|jt|j}xF|D]>}|j}|jds)| rWq)n|jj|q)W|jdS(sRead 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't#N( R RR-Rtstript startswithRARR(RR-R((s//usr/lib64/python2.7/distutils/command/sdist.pyRPs  cCs|j|tj||d|jttdrHd}d|}nd}d|}|sntjdn tj |x_|D]W}tj j |stjd|qtj j ||}|j ||d|qW|jjj|dS( sCreate 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_treeRthasattrR;RR RRRMRNRbt copy_fileRItmetadatatwrite_pkg_info(RRRtRRtfiletdest((s//usr/lib64/python2.7/distutils/command/sdist.pytmake_release_trees      c Cs|jj}tjj|j|}|j||jjg}d|j kr}|j j |j j |j j dnxd|j D]Y}|j ||d|d|jd|j}|j ||jjj dd|fqW||_|jstj|d|jndS( sCreate 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()'. ttarRR4R5RtRN(RIRR;RMRbR2RRARtRRtpoptindext make_archiveR4R5t dist_filesR3R1Rt remove_treeR(RRt base_nameR3tfmtR((s//usr/lib64/python2.7/distutils/command/sdist.pyREs +    cCs|jS(szReturn the list of archive files created when the command was run, or None if the command hasn't run yet. (R3(R((s//usr/lib64/python2.7/distutils/command/sdist.pytget_archive_filess(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(spruneNsspecifically 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-onlyR!sEjust regenerate the manifest and then stop (implies --force-manifest)(sforce-manifestR"skforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.(sformats=Ns6formats for source distribution (comma-separated list)(s dist-dir=R$sFdirectory to put the source distribution archive(s) in [default: dist](smetadata-checkNs[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default](sowner=R%s@Owner name used when creating a tar file [default: current user](sgroup=R&sAGroup name used when creating a tar file [default: current group](t__name__t __module__t descriptionRRt user_optionstboolean_optionsRt help_optionst negative_optR:t sub_commandsR6R@RGRLRDRSRTRURVRORPRRER(((s//usr/lib64/python2.7/distutils/command/sdist.pyR$sn            ( R !    * (t__doc__t __revision__R;RaRRtwarningsRtdistutils.coreRt distutilsRRRRtdistutils.text_fileRtdistutils.errorsRR R tdistutils.filelistR R tdistutils.utilR RR(((s//usr/lib64/python2.7/distutils/command/sdist.pyts   "