File "sdist.cpython-36.pyc"

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

3

 fE@sdZddlZddlZddlTddlmZddlmZddlmZddl	m
Z
mZmZm
Z
ddlmZddlTdd	lmZdd
l	mZddlmZdd
ZGdddeZdS)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_pathcCsdddlm}ddlm}g}x,|jD] }|jd|d||dfq&W|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/python36/lib64/python3.6/distutils/command/sdist.pyshow_formatssrc@seZdZdZddZdJdKdLdMdNdOdPdQdRdTdUdVdWdXgZd
ddddd"gZd*dd+efgZd
dd,Z	d-efgZ
d.d/Zd0d1Zd2d3Z
d4d5Zd6d7Zd8d9Zd:d;Zd<d=Zd>d?Zd@dAZdBdCZdDdEZdFdGZdHdIZdS)Ysdistz6create 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)	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 formats)zno-defaultszno-prunecheckcCsTd|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_	d|_
d|_d|_dS)NrZgztar)
templatemanifestuse_defaultsr'
manifest_onlyZforce_manifestr	keep_tempdist_dir
archive_filesrownergroup)rrrrinitialize_options`szsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|jdtj|j}|rFtd||jdkrVd|_dS)NZMANIFESTzMANIFEST.inrzunknown archive format '%s'Zdist)rCrBZensure_string_listr	Zcheck_archive_formatsrZDistutilsOptionErrorrG)rZ
bad_formatrrrfinalize_optionsws




zsdist.finalize_optionscCsBt|_x|jD]}|j|qW|j|jr6dS|jdS)N)rfilelistZget_sub_commandsZrun_command
get_file_listrEmake_distribution)rZcmd_namerrrrunsz	sdist.runcCs*tdt|jjd}|j|jdS)zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated,               use the check command insteadr@N)rPendingDeprecationWarningdistributionZget_command_objZensure_finalizedrP)rr@rrrcheck_metadatas
zsdist.check_metadatacCstjj|j}|r<|jr<|j|jj|jjdS|sP|j	d|j|jj
|jrh|j|rt|j
|jr|j|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)z?manifest template '%s' does not exist (using default file list))ospathisfilerB_manifest_is_not_generated
read_manifestrMrZremove_duplicatesrfindallrDadd_defaults
read_templater'prune_file_listwrite_manifest)rZtemplate_existsrrrrNs(





zsdist.get_file_listcCs2d|jjg}x|D]}t|trn|}d}x*|D]"}tjj|r.d}|jj|Pq.W|s|j	ddj
|qtjj|r|jj|q|j	d|qWdd	g}x*|D]"}ttjjt
|}|jj|qW|jd
}|jjr|jj|jx>|jD]4\}	}
}}x$|D]}
|jjtjj
|
|
qWqW|jjrx||jjD]p}t|tr|t|}tjj|r|jj|n:|\}}x0|D](}t|}tjj|r|jj|qWqHW|jjr|jd}|jj|j|jjr|jd}|jj|j|jjr.|jd
}|jj|jdS)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)r^r_)rRZscript_name
isinstancetuplerTrUexistsrMrrjoinfilterrVrextendget_finalized_commandZhas_pure_modulesZget_source_filesZ
data_filesZhas_data_filesstrr
Zhas_ext_modulesZhas_c_librariesZhas_scripts)rZ	standardsfnZaltsZgot_itZoptionalpatternfilesr`ZpkgZsrc_dirZ	build_dir	filenamesfilenameitemdirnamer/rarbrcrrrrZs\






"



zsdist.add_defaultscCstjd|jt|jddddddd}zlxf|j}|dkr<Py|jj|Wq*ttfk
r}z|j	d|j
|j|fWYdd}~Xq*Xq*WWd|jXdS)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'rA)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_wsZ
collapse_joinNz%s, line %d: %s)
rinforBr
readlinerMZprocess_template_lineZDistutilsTemplateError
ValueErrorrrpZcurrent_lineclose)rrBlinemsgrrrr[s 

$zsdist.read_templatecCs|jd}|jj}|jjd|jd|jjd|dtjdkrFd}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
        buildN)prefixZwin32z/|\\/ZRCSZCVSz\.svnz\.hgz\.gitz\.bzrZ_darcsz(^|%s)(%s)(%s).*|rA)Zis_regex)	rjrRget_fullnamerMZexclude_patternZ
build_basesysplatformrg)rrybase_dirZsepsZvcs_dirsZvcs_ptrnrrrr\:s


zsdist.prune_file_listcCsX|jrtjd|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')
rWrrsrCrMrninsertZexecuterZ
write_file)rZcontentrrrr]Rs
zsdist.write_manifestc
Cs<tjj|jsdSt|j}z|j}Wd|jX|dkS)NFz+# file GENERATED by distutils, do NOT edit
)rTrUrVrCopenrtrv)rfpZ
first_linerrrrWas

z sdist._manifest_is_not_generatedcCsXtjd|jt|j}x2|D]*}|j}|jds|r<q|jj|qW|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rsrCrstrip
startswithrMrrv)rrCrwrrrrXms

zsdist.read_manifestcCs|j|tj|||jdttdr4d}d|}nd}d|}|sPtjdn
tj|xD|D]<}tj	j
|s~tjd|q`tj	j||}|j|||d	q`W|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)r)ZmkpathrZcreate_treerhasattrrTrrrsrUrVrgZ	copy_filerRZmetadataZwrite_pkg_info)rrrnrrxfiledestrrrmake_release_tree|s 
	



zsdist.make_release_treecCs|jj}tjj|j|}|j||jjg}d|j	krT|j	j
|j	j|j	jdxD|j	D]:}|j
||||j|jd}|j
||jjj
dd|fq\W||_|jstj||jddS)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()'.
        Ztar)rrIrJr)rN)rRr}rTrUrgrGrrMrnrrpopindexZmake_archiverIrJZ
dist_filesrHrFrZremove_treer)rrZ	base_namerHZfmtrrrrrOs




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.
        )rH)rrrrget_archive_filesszsdist.get_archive_files)rrr)r r!r")r#Nr$)r%Nr&)r'Nr()r)Nr*)r+r,r-)r.r/r0)r1Nr2@keep the distribution tree around after creating archive file(s))r3r4r)r5r6r7)r8Nr9)r:r;r<)r=r>r?)__name__
__module____qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsZnegative_optZsub_commandsrKrLrPrSrNrZr[r\r]rWrXrrOrrrrrr!sj

(P*r)__doc__rTr~typesrwarningsrZdistutils.corerZ	distutilsrrrr	Zdistutils.text_filer
Zdistutils.errorsZdistutils.filelistrrZdistutils.utilr
rrrrrr<module>s