mò &U²Ic@s¸dZdZdkZdkZdkZdkTdklZdklZdk l Z l Z l Z l Z dklZdkTdklZd k lZd „Zd efd „ƒYZdS( sadistutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).s1$Id: sdist.py 37828 2004-11-10 22:23:15Z loewis $N(t*(sglob(sCommand(sdir_utilsdep_utils file_utils archive_util(sTextFile(sFileList(slogcCs€dkl}dkl}g}x6|iƒD](}|id|d||dfƒq-W|i ƒ||ƒ}|i dƒdS(soPrint all possible values for the 'formats' option (used by the "--help-formats" command-line option). (s FancyGetopt(sARCHIVE_FORMATSsformats=is.List of available source distribution formats:N( tdistutils.fancy_getoptt FancyGetopttdistutils.archive_utiltARCHIVE_FORMATStformatstkeystformattappendtNonetsorttpretty_printert print_help(RR RRR((t4/data/zmath/lib/python2.4/distutils/command/sdist.pyt show_formatss   &  tsdistc BstZdZd2d3d4d5d6d7d8d9d:ddddfd;g Zdd dddgZddd efgZhd d<dd R)RR€R RyR@RztfileRGRHRBtdestt copy_fileR:R;twrite_pkg_info(RR‡RkR–R•R€R((R tmake_release_tree†s$    cCs­|iiƒ}tii|i|ƒ}|i ||i i ƒg}x6|i D]+}|i||d|ƒ}|i|ƒqMW||_ |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()'. R‡RN(RR:R†R‡R)RGRBR"t base_nameR™R3RkR#Rtfmtt make_archiveR•RR!R“t remove_treeR(RRšR#R•R›R‡((R R6²s   cCs|iS(szReturn the list of archive files created when the command was run, or None if the command hasn't run yet. N(RR#(R((R tget_archive_filesÊs(s template=Rs5name of manifest template file [default: MANIFEST.in](s manifest=Rs)name of manifest file [default: MANIFEST](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 descriptionR t user_optionstboolean_optionsRt help_optionst negative_optR(R$R1R7R4R5RURVRWRYRZR™R6Rž(((R R#s&4    ! F 9    , (t__doc__t __revision__tsysR)RAttypesRjtdistutils.coretCommandt distutilsR“RJR‹R-tdistutils.text_fileR{tdistutils.errorstdistutils.filelistR2RyRR(RJR§RAR‹RjR2R¨R-R«R“R{R)RRRy((R t?s