AlkantarClanX12

Your IP : 18.117.105.230


Current Path : /usr/lib/python2.7/site-packages/setuptools/command/
Upload File :
Current File : //usr/lib/python2.7/site-packages/setuptools/command/build_py.pyc

�
�fc@sddlmZddlmZddljjZddlZddlZddl	Z	ddl
Z
ddlZddl
Z
ddlmZddlmZmZmZyddlmZWn$ek
r�dd
d��YZnXd	ejefd
��YZdd�Zd�ZdS(i����(tglob(tconvert_pathN(tsix(tmaptfiltertfilterfalse(t	Mixin2to3RcBseZed�ZRS(cCsdS(s
do nothingN((tselftfilestdoctests((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pytrun_2to3t(t__name__t
__module__tTrueR
(((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyRstbuild_pycBs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zed��ZRS(sXEnhanced 'build_py' command that includes data files with packages

    The data files are specified via a 'package_data' argument to 'setup()'.
    See 'setuptools.dist.Distribution' for more details.

    Also, this version of the 'build_py' command allows you to specify both
    'py_modules' and 'packages' in the same setup operation.
    cCsftjj|�|jj|_|jjp.i|_d|jkrP|jd=ng|_g|_dS(Nt
data_files(	torigRtfinalize_optionstdistributiontpackage_datatexclude_package_datat__dict__t_build_py__updated_filest_build_py__doctests_2to3(R((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyR!s	
	cCs�|jr|jrdS|jr.|j�n|jrN|j�|j�n|j|jt�|j|jt�|j|j	t�|j
tjj
|dd��dS(s?Build modules, packages, and copy data files to build directoryNtinclude_bytecodei(t
py_modulestpackagest
build_modulestbuild_packagestbuild_package_dataR
RtFalseRRtbyte_compileRRtget_outputs(R((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pytrun+s	
	

cCs5|dkr"|j�|_|jStjj||�S(slazily compute data filesR(t_get_data_filesRRRt__getattr__(Rtattr((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyR$?scCsqtjr-t|tj�r-|jd�}ntjj||||�\}}|rg|jj	|�n||fS(Nt.(
RtPY2t
isinstancetstring_typestsplitRRtbuild_moduleRtappend(Rtmoduletmodule_filetpackagetoutfiletcopied((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyR+FscCs)|j�tt|j|jp"d��S(s?Generate list of '(package,src_dir,build_dir,filenames)' tuples((tanalyze_manifesttlistRt_get_pkg_data_filesR(R((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyR#Ps
cCsx|j|�}tjj|jg|jd��}g|j||�D]}tjj||�^qG}||||fS(NR&(tget_package_dirtostpathtjoint	build_libR*tfind_data_filestrelpath(RR/tsrc_dirt	build_dirtfilet	filenames((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyR4Us
%1cCs�|j|j||�}tt|�}tjj|�}ttj	j
|�}tj|jj|g�|�}|j
|||�S(s6Return filenames for package's data files in 'src_dir'(t_get_platform_patternsRRRt	itertoolstchaint
from_iterableRR6R7tisfiletmanifest_filestgettexclude_data_files(RR/R<tpatternstglobs_expandedt
globs_matchest
glob_filesR((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyR:cs		c
Cs�x�|jD]�\}}}}x�|D]�}tjj||�}|jtjj|��tjj||�}|j||�\}}	tjj|�}|	r#||jj	kr#|j
j|�q#q#Wq
WdS(s$Copy data files into build directoryN(RR6R7R8tmkpathtdirnamet	copy_filetabspathRtconvert_2to3_doctestsRR,(
RR/R<R=R?tfilenamettargettsrcfiletoutfR1((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyRts
cCs\i|_}|jjsdSi}x0|jp2dD]}||t|j|��<q3W|jd�|jd�}x�|jj	D]�}t
jjt|��\}}d}|}	xU|r||kr||kr|}t
jj|�\}}
t
jj|
|�}q�W||kr|jd�r4||	kr4qn|j||g�j|�qqWdS(Ntegg_infos.py((RERtinclude_package_dataRtassert_relativeR5trun_commandtget_finalized_commandtfilelistRR6R7R*tNoneR8tendswitht
setdefaultR,(Rtmftsrc_dirsR/tei_cmdR7tdtftprevtoldftdf((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyR2�s(

!cCsdS(N((R((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pytget_data_files�scCs�y|j|SWntk
r"nXtjj|||�}||j|<|s\|jjr`|Sx;|jjD])}||ks�|j|d�rmPqmqmW|Stj	|d��}|j
�}WdQXd|kr�tjj
d|f��n|S(s8Check namespace packages' __init__ for declare_namespaceR&trbNtdeclare_namespaces�Namespace package problem: %s is a namespace package, but its
__init__.py does not call declare_namespace()! Please fix it.
(See the setuptools manual under "Namespace Packages" for details.)
"(tpackages_checkedtKeyErrorRRt
check_packageRtnamespace_packagest
startswithtiotopentreadt	distutilsterrorstDistutilsError(RR/tpackage_dirtinit_pytpkgRbtcontents((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyRk�s&

	cCsi|_tjj|�dS(N(RiRRtinitialize_options(R((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyRx�s	cCsDtjj||�}|jjdk	r@tjj|jj|�S|S(N(	RRR5Rtsrc_rootR[R6R7R8(RR/tres((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyR5�scs~t���|j|j||�}�fd�|D�}tjj|�}t|���fd��D�}tt|��S(s6Filter filenames for package's data files in 'src_dir'c3s!|]}tj�|�VqdS(N(tfnmatchR(t.0tpattern(R(s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pys	<genexpr>�sc3s!|]}|�kr|VqdS(N((R|tfn(tbad(s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pys	<genexpr>�s(R3R@RRARBRCtsett_unique_everseen(RR/R<RRHtmatch_groupstmatchestkeepers((RRs?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyRG�s	

cs>tj|jdg�|j|g��}�fd�|D�S(s�
        yield platform-specific path patterns (suitable for glob
        or fn_match) from a glob-based spec (such as
        self.package_data or self.exclude_package_data)
        matching package in src_dir.
        Rc3s*|] }tjj�t|��VqdS(N(R6R7R8R(R|R}(R<(s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pys	<genexpr>�s(RARBRF(tspecR/R<traw_patterns((R<s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyR@�s
(RR
t__doc__RR"R$R+R#R4R:RR2RfRkRxR5RGtstaticmethodR@(((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyRs 	
			
				
						ccs�t�}|j}|dkrMxgt|j|�D]}||�|Vq1Wn;x8|D]0}||�}||krT||�|VqTqTWdS(sHList unique elements, preserving order. Remember all elements ever seen.N(R�taddR[Rt__contains__(titerabletkeytseentseen_addtelementtk((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyR��s		


cCsOtjj|�s|Sddlm}tjd�j�|}||��dS(Ni����(tDistutilsSetupErrors�
        Error: setup script specifies an absolute path:

            %s

        setup() arguments must *always* be /-separated paths relative to the
        setup.py directory, *never* absolute paths.
        (R6R7tisabstdistutils.errorsR�ttextwraptdedenttlstrip(R7R�tmsg((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyRWs((Rtdistutils.utilRtdistutils.command.build_pytcommandRRR6R{R�RnR�RqRAtsetuptools.externRtsetuptools.extern.six.movesRRRtsetuptools.lib2to3_exRtImportErrorR[R�RW(((s?/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyt<module>s"
�