File "sdist.cpython-34.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python34/lib64/python3.4/distutils/command/__pycache__/sdist.cpython-34.pyc
File size: 13.86 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit


h f-G@sdZddlZddlZddlZddlTddlmZddlmZddlm	Z	ddl
mZmZm
Z
mZddlmZddlTdd	lmZdd
l
mZddlmZdd
ZGddde	ZdS)zadistutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution).N)*)glob)warn)Command)dir_utildep_util	file_utilarchive_util)TextFile)FileList)log)convert_pathcCsddlm}ddlm}g}x6|jD](}|jd|d||dfq3W|j||jddS)zoPrint all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    r)FancyGetopt)ARCHIVE_FORMATSzformats=Nz.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilrkeysappendsortZ
print_help)rrformatsformatr</opt/alt/python34/lib64/python3.4/distutils/command/sdist.pyshow_formatss
rc@skeZdZdZddZdMdNdOdPdQdRdSdTdUddddfdVdWdXdYgZd
ddddd"gZd*dd+efgZid
d
6dd6Z	id,d-6d.d/6Z
d0efgZd1d2Zd3d4Z
d5d6Zd7d8Zd9d:Zd;d<Zd=d>Zd?d@ZdAdBZdCdDZdEdFZdGdHZdIdJZdKdLZdS)Zsdistz6create a source distribution (tarball, zip file, etc.)cCs|jS)zYCallable used for the check sub-command.

        Placed here so user_options can view it)metadata_check)selfrrrchecking_metadata&szsdist.checking_metadata	template=t5name of manifest template file [default: MANIFEST.in]	manifest=m)name of manifest file [default: MANIFEST]use-defaultsNRinclude the default file set in the manifest [default; disable with --no-defaults]no-defaults"don't include the default file setprunespecifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune]no-prune$don't automatically exclude anything
manifest-onlyoEjust regenerate the manifest and then stop (implies --force-manifest)force-manifestfkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.formats=6formats for source distribution (comma-separated list)z	keep-tempkz1keep the distribution tree around after creating zarchive file(s)	dist-dir=dFdirectory to put the source distribution archive(s) in [default: dist]metadata-check[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default]owner=u@Owner name used when creating a tar file [default: current user]group=gAGroup name used when creating a tar file [default: current group]zhelp-formatsz#list available distribution formatsZgztarposixzipntcheckcCsyd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_dS)Nr)
templatemanifestuse_defaultsr'
manifest_onlyZforce_manifestr	keep_tempdist_dir
archive_filesrownergroup)rrrrinitialize_optionsds												zsdist.initialize_optionscCs|jdkrd|_n|jdkr6d|_n|jd|jdkry|jtjg|_Wqtk
rtdtjYqXnt	j
|j}|rtd|n|jdkrd|_ndS)NZMANIFESTzMANIFEST.inrz<don't know how to create source distributions on platform %szunknown archive format '%s'Zdist)
rErDZensure_string_listrdefault_formatosnameKeyErrorZDistutilsPlatformErrorr	Zcheck_archive_formatsZDistutilsOptionErrorrI)rZ
bad_formatrrrfinalize_options{s$

zsdist.finalize_optionscCsUt|_x!|jD]}|j|qW|j|jrGdS|jdS)N)rfilelistZget_sub_commandsZrun_command
get_file_listrGmake_distribution)rZcmd_namerrrruns
	z	sdist.runcCs7tdt|jjd}|j|jdS)zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated,               use the check command insteadrBN)rPendingDeprecationWarningdistributionZget_command_objZensure_finalizedrV)rrBrrrcheck_metadatas


zsdist.check_metadatacCstjj|j}|rP|jrP|j|jj|jjdS|sq|j	dd|jn|jj
|jr|jn|r|j
n|jr|jn|jj|jj|jdS)aCFigure 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.
        Nz&manifest template '%s' does not exist z(using default file list))rOpathisfilerD_manifest_is_not_generated
read_manifestrSrZremove_duplicatesrfindallrFadd_defaults
read_templater'prune_file_listwrite_manifest)rZtemplate_existsrrrrTs(


	
	

	


zsdist.get_file_listcCs	d|jjg}x|D]}t|tr|}d}x:|D]2}tjj|rAd}|jj|PqAqAW|s|j	ddj
|qqtjj|r|jj|q|j	d|qWdd	g}x9|D]1}ttjjt
|}|jj|qW|jd
}|jjrV|jj|jnxM|jD]B\}	}
}}x-|D]%}
|jjtjj
|
|
qyWq`W|jjr`x|jjD]}t|trt|}tjj|rY|jj|qYq|\}}x?|D]7}t|}tjj|r|jj|qqWqWn|jjr|jd}|jj|jn|jjr|jd}|jj|jn|jjr|jd
}|jj|jndS)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.
        README
README.txtFTz,standard file not found: should have one of z, zstandard file '%s' not foundz
test/test*.pyz	setup.cfgbuild_py	build_ext
build_clib
build_scriptsN)rcrd)rXZscript_name
isinstancetuplerOrZexistsrSrrjoinfilterr[rextendget_finalized_commandZhas_pure_modulesZget_source_filesZ
data_filesZhas_data_filesstrr
Zhas_ext_modulesZhas_c_librariesZhas_scripts)rZ	standardsfnZaltsZgot_itZoptionalpatternfilesreZpkgZsrc_dirZ	build_dir	filenamesfilenameitemdirnamer/rfrgrhrrrr_s\

	

'
zsdist.add_defaultscCstjd|jt|jdddddddddddd}zx|j}|d	krhPny|jj|WqLttfk
r}z%|j	d
|j
|j|fWYd	d	}~XqLXqLWWd	|jXd	S)zRead 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.
        zreading manifest template '%s'Zstrip_commentsrCZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_wsZ
collapse_joinNz%s, line %d: %s)
rinforDr
readlinerSZprocess_template_lineZDistutilsTemplateError
ValueErrorrruZcurrent_lineclose)rrDlinemsgrrrr`(s 	&zsdist.read_templatecCs|jd}|jj}|jjdd|j|jjdd|tjdkred}nd}ddd	d
ddd
g}d|dj||f}|jj|dddS)avPrune 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
        buildNprefixwin32z/|\\/ZRCSZCVSz\.svnz\.hgz\.gitz\.bzrZ_darcsz(^|%s)(%s)(%s).*|Zis_regexrC)	rorXget_fullnamerSZexclude_patternZ
build_basesysplatformrl)rr~base_dirZsepsZvcs_dirsZvcs_ptrnrrrraEs		zsdist.prune_file_listcCst|jr$tjd|jdS|jjdd}|jdd|jtj	|j|fd|jdS)zWrite the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        z5not writing to manually maintained manifest file '%s'Nrz*# file GENERATED by distutils, do NOT editzwriting manifest file '%s')
r\rrxrErSrsinsertZexecuterZ
write_file)rZcontentrrrrb]s	zsdist.write_manifestc
CsPtjj|jsdSt|j}z|j}Wd|jX|dkS)NFz+# file GENERATED by distutils, do NOT edit
)rOrZr[rEopenryr{)rfpZ
first_linerrrr\lsz sdist._manifest_is_not_generatedcCsytjd|jt|j}xF|D]>}|j}|jds)|rWq)n|jj|q)W|jdS)zRead 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'#N)	rrxrErstrip
startswithrSrr{)rrEr|rrrr]xs
zsdist.read_manifestcCs|j|tj||d|jttdrHd}d|}nd}d|}|sntjdn
tj|x_|D]W}tj	j
|stjd|qtj	j||}|j||d|qW|j
jj|dS)	aCreate 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.
        dry_runlinkZhardzmaking hard links in %s...Nzcopying files to %s...z)no files to distribute -- empty manifest?z#'%s' not a regular file -- skipping)ZmkpathrZcreate_treerhasattrrOrrrxrZr[rlZ	copy_filerXZmetadataZwrite_pkg_info)rrrsrr}filedestrrrmake_release_trees 
	



zsdist.make_release_treec
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)	aCreate 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()'.
        ZtarrrKrLrrN)rXrrOrZrlrIrrSrsrrpopindexZmake_archiverKrLZ
dist_filesrJrHrZremove_treer)rrZ	base_namerJZfmtrrrrrUs
+
 		zsdist.make_distributioncCs|jS)zzReturn the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        )rJ)rrrrget_archive_filesszsdist.get_archive_files)rrr)r r!r")r#Nr$)r%Nr&)zpruneNr()r)Nr*)r+r,r-)r.r/r0)r1Nr2)r4r5r6)r7Nr8)r9r:r;)r<r=r>)__name__
__module____qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsZnegative_optrNZsub_commandsrMrRrVrYrTr_r`rarbr\r]rrUrrrrrr"sn	



(P*r)__doc__rOstringrtypesrwarningsrZdistutils.corerZ	distutilsrrrr	Zdistutils.text_filer
Zdistutils.errorsZdistutils.filelistrrZdistutils.utilr
rrrrrr<module>s
"