AlkantarClanX12

Your IP : 18.219.253.199


Current Path : /opt/alt/python33/lib64/python3.3/distutils/command/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/distutils/command/__pycache__/sdist.cpython-33.pyc

�
��f�Ec@s�dZddlZddlZddlZddlTddlmZddlmZddlm	Z	ddl
mZmZm
Z
mZddlmZddlTdd	lmZdd
l
mZddlmZdd
�ZGdd�de	�ZdS(uadistutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution).iN(u*(uglob(uwarn(uCommand(udir_utiludep_utilu	file_utiluarchive_util(uTextFile(uFileList(ulog(uconvert_pathcCs�ddlm}ddlm}g}x6|j�D](}|jd|d||df�q3W|j�||�jd�dS(uoPrint all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    i(uFancyGetopt(uARCHIVE_FORMATSuformats=iu.List of available source distribution formats:N(	udistutils.fancy_getoptuFancyGetoptudistutils.archive_utiluARCHIVE_FORMATSukeysuappenduNoneusortu
print_help(uFancyGetoptuARCHIVE_FORMATSuformatsuformat((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyushow_formatss
ushow_formatscBsi|EeZdZdZdd�ZdGdHdIdJdKdLdMdNdOddddfdPdQgZd
ddddd!gZd#dFd$efgZ	id
d6dd6Z
id%d&6d'd(6Zd)efgZd*d+�Z
d,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFS(Rusdistu6create a source distribution (tarball, zip file, etc.)cCs|jS(uYCallable used for the check sub-command.

        Placed here so user_options can view it(umetadata_check(uself((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyuchecking_metadata&susdist.checking_metadatau	template=utu5name of manifest template file [default: MANIFEST.in]u	manifest=umu)name of manifest file [default: MANIFEST]uuse-defaultsuRinclude the default file set in the manifest [default; disable with --no-defaults]uno-defaultsu"don't include the default file setupruneu�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune]uno-pruneu$don't automatically exclude anythingu
manifest-onlyuouEjust regenerate the manifest and then stop (implies --force-manifest)uforce-manifestufukforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.uformats=u6formats for source distribution (comma-separated list)u	keep-tempuku1keep the distribution tree around after creating uarchive file(s)u	dist-dir=uduFdirectory to put the source distribution archive(s) in [default: dist]umetadata-checku[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default]uhelp-formatsu#list available distribution formatsugztaruposixuzipuntucheckcCsgd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_dS(Nii(uNoneutemplateumanifestuuse_defaultsupruneu
manifest_onlyuforce_manifestuformatsu	keep_tempudist_diru
archive_filesumetadata_check(uself((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyuinitialize_options`s										usdist.initialize_optionscCs�|jdkrd|_n|jdkr6d|_n|jd�|jdkr�y|jtjg|_Wq�tk
r�t	dtj��Yq�Xnt
j|j�}|r�td|��n|j
dkr�d|_
ndS(NuMANIFESTuMANIFEST.inuformatsu<don't know how to create source distributions on platform %suunknown archive format '%s'udist(umanifestuNoneutemplateuensure_string_listuformatsudefault_formatuosunameuKeyErroruDistutilsPlatformErroruarchive_utilucheck_archive_formatsuDistutilsOptionErrorudist_dir(uselfu
bad_format((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyufinalize_optionsus$

usdist.finalize_optionscCsUt�|_x!|j�D]}|j|�qW|j�|jrGdS|j�dS(N(uFileListufilelistuget_sub_commandsurun_commandu
get_file_listu
manifest_onlyumake_distribution(uselfucmd_name((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyurun�s
	u	sdist.runcCs7tdt�|jjd�}|j�|j�dS(uDeprecated API.uadistutils.command.sdist.check_metadata is deprecated,               use the check command insteaducheckN(uwarnuPendingDeprecationWarningudistributionuget_command_objuensure_finalizedurun(uselfucheck((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyucheck_metadata�s


usdist.check_metadatacCs�tjj|j�}|rP|j�rP|j�|jj�|jj�dS|sq|j	dd|j�n|jj
�|jr�|j�n|r�|j
�n|jr�|j�n|jj�|jj�|j�dS(uCFigure 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.
        Nu&manifest template '%s' does not exist u(using default file list)(uosupathuisfileutemplateu_manifest_is_not_generatedu
read_manifestufilelistusorturemove_duplicatesuwarnufindalluuse_defaultsuadd_defaultsu
read_templateupruneuprune_file_listuwrite_manifest(uselfutemplate_exists((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyu
get_file_list�s(


	
	

	


usdist.get_file_listcCs	d
|jjg}x�|D]�}t|t�r�|}d}x:|D]2}tjj|�rAd}|j	j
|�PqAqAW|s�|jddj|��q�qtjj|�r�|j	j
|�q|jd|�qWddg}x9|D]1}t
tjjt|��}|j	j|�q�W|jd�}|jj�rV|j	j|j��nxM|jD]B\}	}
}}x-|D]%}
|j	j
tjj|
|
��qyWq`W|jj�r`x�|jjD]�}t|t�rt|�}tjj|�rY|j	j
|�qYq�|\}}x?|D]7}t|�}tjj|�r|j	j
|�qqWq�Wn|jj�r�|jd	�}|j	j|j��n|jj�r�|jd
�}|j	j|j��n|jj�r|jd�}|j	j|j��ndS(u9Add 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.
        uREADMEu
README.txtu,standard file not found: should have one of u, ustandard file '%s' not foundu
test/test*.pyu	setup.cfgubuild_pyu	build_extu
build_clibu
build_scriptsN(uREADMEu
README.txtFT(udistributionuscript_nameu
isinstanceutupleuFalseuosupathuexistsuTrueufilelistuappenduwarnujoinufilteruisfileuglobuextenduget_finalized_commanduhas_pure_modulesuget_source_filesu
data_filesuhas_data_filesustruconvert_pathuhas_ext_modulesuhas_c_librariesuhas_scripts(uselfu	standardsufnualtsugot_ituoptionalupatternufilesubuild_pyupkgusrc_diru	build_diru	filenamesufilenameuitemudirnameufu	build_extu
build_clibu
build_scripts((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyuadd_defaults�s\

	

'
usdist.add_defaultscCs�tjd|j�t|jdddddddddddd�}z�x�|j�}|d
krhPny|jj|�WqLtt	fk
r�}z%|j
d	|j|j|f�WYd
d
}~XqLXqLWd
|j
�Xd
S(u�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.
        ureading manifest template '%s'ustrip_commentsiuskip_blanksu
join_linesu	lstrip_wsu	rstrip_wsu
collapse_joinu%s, line %d: %sN(uloguinfoutemplateuTextFileureadlineuNoneufilelistuprocess_template_lineuDistutilsTemplateErroru
ValueErroruwarnufilenameucurrent_lineuclose(uselfutemplateulineumsg((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyu
read_template"s 	%usdist.read_templatecCs�|jd�}|jj�}|jjdd|j�|jjdd|�tjdkred}nd}dddd	d
ddg}d
|dj	|�|f}|jj|dd�dS(uvPrune 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
        ubuilduprefixuwin32u/|\\u/uRCSuCVSu\.svnu\.hgu\.gitu\.bzru_darcsu(^|%s)(%s)(%s).*u|uis_regexiN(
uget_finalized_commandudistributionuget_fullnameufilelistuexclude_patternuNoneu
build_baseusysuplatformujoin(uselfubuildubase_dirusepsuvcs_dirsuvcs_ptrn((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyuprune_file_list?s		usdist.prune_file_listcCst|j�r$tjd|j�dS|jjdd�}|jdd�|jtj	|j|fd|j�dS(u�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'.
        u5not writing to manually maintained manifest file '%s'Niu*# file GENERATED by distutils, do NOT edituwriting manifest file '%s'(
u_manifest_is_not_generateduloguinfoumanifestufilelistufilesuinsertuexecuteu	file_utilu
write_file(uselfucontent((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyuwrite_manifestWs	usdist.write_manifestc
CsPtjj|j�sdSt|j�}z|j�}Wd|j�X|dkS(Nu+# file GENERATED by distutils, do NOT edit
F(uosupathuisfileumanifestuFalseuopenureadlineuclose(uselfufpu
first_line((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyu_manifest_is_not_generatedfsu sdist._manifest_is_not_generatedcCsytjd|j�t|j�}xF|D]>}|j�}|jd�s)|rWq)n|jj|�q)W|j�dS(u�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.
        ureading manifest file '%s'u#N(	uloguinfoumanifestuopenustripu
startswithufilelistuappenduclose(uselfumanifestuline((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyu
read_manifestrs
usdist.read_manifestcCs�|j|�tj||d|j�ttd�rHd}d|}nd}d|}|sntjd�n
tj	|�x_|D]W}tj
j|�s�tjd|�q�tj
j||�}|j
||d|�q�W|jjj|�dS(	u�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.
        udry_runulinkuhardumaking hard links in %s...ucopying files to %s...u)no files to distribute -- empty manifest?u#'%s' not a regular file -- skippingN(umkpathudir_utilucreate_treeudry_runuhasattruosuNoneuloguwarnuinfoupathuisfileujoinu	copy_fileudistributionumetadatauwrite_pkg_info(uselfubase_dirufilesulinkumsgufileudest((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyumake_release_tree�s 
	



usdist.make_release_treecCs|jj�}tjj|j|�}|j||jj�g}d|j	kr}|j	j
|j	j|j	jd���nxR|j	D]G}|j
||d|�}|j
|�|jjj
dd|f�q�W||_|js�tj|d|j�ndS(u�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()'.
        utarubase_dirusdistuudry_runN(udistributionuget_fullnameuosupathujoinudist_dirumake_release_treeufilelistufilesuformatsuappendupopuindexumake_archiveu
dist_filesu
archive_filesu	keep_tempudir_utiluremove_treeudry_run(uselfubase_diru	base_nameu
archive_filesufmtufile((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyumake_distribution�s
+
 		usdist.make_distributioncCs|jS(uzReturn the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        (u
archive_files(uself((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyuget_archive_files�susdist.get_archive_filesN(u	template=utu5name of manifest template file [default: MANIFEST.in](u	manifest=umu)name of manifest file [default: MANIFEST](uuse-defaultsNuRinclude the default file set in the manifest [default; disable with --no-defaults](uno-defaultsNu"don't include the default file set(upruneNu�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune](uno-pruneNu$don't automatically exclude anything(u
manifest-onlyuouEjust regenerate the manifest and then stop (implies --force-manifest)(uforce-manifestufukforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.(uformats=Nu6formats for source distribution (comma-separated list)(u	dist-dir=uduFdirectory to put the source distribution archive(s) in [default: dist](umetadata-checkNu[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default](u__name__u
__module__u__qualname__udescriptionuchecking_metadatauNoneuuser_optionsuboolean_optionsushow_formatsuhelp_optionsunegative_optudefault_formatusub_commandsuinitialize_optionsufinalize_optionsurunucheck_metadatau
get_file_listuadd_defaultsu
read_templateuprune_file_listuwrite_manifestu_manifest_is_not_generatedu
read_manifestumake_release_treeumake_distributionuget_archive_files(u
__locals__((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyusdist"sf	



(P*usdist(u__doc__uosustringusysutypesuglobuwarningsuwarnudistutils.coreuCommandu	distutilsudir_utiludep_utilu	file_utiluarchive_utiludistutils.text_fileuTextFileudistutils.errorsudistutils.filelistuFileListulogudistutils.utiluconvert_pathushow_formatsusdist(((u</opt/alt/python33/lib64/python3.3/distutils/command/sdist.pyu<module>s
"