ok

Mini Shell

Direktori : /proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/setuptools/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyc

�
��Rec@s�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
mZddlZejjd�r�ddljjjjZnejejZy
eZWnek
r
dZnXeZddl m!Z!ddlm"Z"ddd	d
gZ#dd�Z$ej%dd��Z&ej%d
��Z'ej%d��Z(ej%d��Z)de*fd��YZ+dd!d��YZ,ej%d��Z-d�Z.ej%d��Z/ej%d��Z0d�Z1d�Z2d�Z3dd"d��YZ4e5ed�rNej6gZ7ngZ7de4fd��YZ8ej9ej:gdj;�D]Z<e=ee<d�^q��Z>d	e!fd ��YZ?dS(#i����N(tsix(tbuiltinstmaptjava(tDistutilsError(tworking_settAbstractSandboxtDirectorySandboxtSandboxViolationt	run_setupcBs�d}e||��}|j�}WdQXejd dkscejd dkr�ejd d
kr�|jdd�}|jd	d�}n|dkr�|}ne||d
�}|||UdS(s.
    Python 3 implementation of execfile.
    trbNiiiis
s
s
texec(ii(ii(ii(topentreadtsystversion_infotreplacetNonetcompile(tfilenametglobalstlocalstmodetstreamtscripttcode((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt	_execfile#s9	ccs>tj}|dk	r#|tj(nz	|VWd|tj(XdS(N(RtargvR(trepltsaved((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt	save_argv4s

	ccs%tj}z	|VWd|tj(XdS(N(Rtpath(R((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt	save_path?s
	ccsBtjj|dt�tj}|t_z	dVWd|t_XdS(sL
    Monkey-patch tempfile.tempdir with replacement, ensuring it exists
    texist_okN(t
pkg_resourcest
py31compattmakedirstTruettempfilettempdir(treplacementR((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt
override_tempHs			ccs7tj�}tj|�z	|VWdtj|�XdS(N(tostgetcwdtchdir(ttargetR((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pytpushdYs

	tUnpickleableExceptioncBseZdZed��ZRS(sP
    An exception representing another Exception that could not be pickled.
    cCsay tj|�tj|�fSWn:tk
r\ddlm}|j||t|���SXdS(s�
        Always return a dumped (pickled) type and exc. If exc can't be pickled,
        wrap it in UnpickleableException first.
        i����(R/N(tpickletdumpst	Exceptiontsetuptools.sandboxR/tdumptrepr(ttypetexctcls((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR4hs
 
(t__name__t
__module__t__doc__tstaticmethodR4(((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR/cstExceptionSavercBs)eZdZd�Zd�Zd�ZRS(s^
    A Context Manager that will save an exception, serialized, and restore it
    later.
    cCs|S(N((tself((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt	__enter__|scCs,|s
dStj||�|_||_tS(N(R/R4t_savedt_tbR%(R>R6R7ttb((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt__exit__s
	cCsKdt|�krdSttj|j�\}}tj|||j�dS(s"restore and re-raise any exceptionR@N(tvarsRR0tloadsR@RtreraiseRA(R>R6R7((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pytresume�s(R9R:R;R?RCRG(((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR=vs		c#sgtjj��t��}�VWdQXtjj���fd�tjD�}t|�|j�dS(s�
    Context in which imported modules are saved.

    Translates exceptions internal to the context into the equivalent exception
    outside the context.
    Nc3s1|]'}|�kr|jd�r|VqdS(s
encodings.N(t
startswith(t.0tmod_name(R(s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pys	<genexpr>�s(RtmodulestcopyR=tupdatet_clear_modulesRG(t	saved_exctdel_modules((Rs�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pytsave_modules�s
cCs%xt|�D]}tj|=q
WdS(N(tlistRRK(tmodule_namesRJ((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyRN�sccs*tj�}z	|VWdtj|�XdS(N(R"t__getstate__t__setstate__(R((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pytsave_pkg_resources_state�s	ccs�tjj|d�}t��qt��at�t��Jt��:t|��'t	|��t
d�dVWdQXWdQXWdQXWdQXWdQXWdQXdS(Nttempt
setuptools(R*RtjoinRVRQthide_setuptoolsR RR)R.t
__import__(t	setup_dirttemp_dir((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt
setup_context�s






cCs"tjd�}t|j|��S(sH
    >>> _needs_hiding('setuptools')
    True
    >>> _needs_hiding('pkg_resources')
    True
    >>> _needs_hiding('setuptools_plugin')
    False
    >>> _needs_hiding('setuptools.__init__')
    True
    >>> _needs_hiding('distutils')
    True
    >>> _needs_hiding('os')
    False
    >>> _needs_hiding('Cython')
    True
    s1(setuptools|pkg_resources|distutils|Cython)(\.|$)(treRtbooltmatch(RJtpattern((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt
_needs_hiding�scCs tttj�}t|�dS(s%
    Remove references to setuptools' modules from sys.modules to allow the
    invocation to import the most appropriate setuptools. This technique is
    necessary to avoid issues such as #315 where setuptools upgrading itself
    would fail to find a function declared in the metadata.
    N(tfilterRcRRKRN(RK((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyRZ�sc
Cstjjtjj|��}t|���y�|gt|�tj(tjjd|�t	j
�t	jjd��t
|t�r�|n|jtj��}t|��'td|dd�}t||�WdQXWn/tk
r}|jr|jdr�qnXWdQXdS(s8Run a distutils setup script, sandboxed in its directoryicSs
|j�S(N(tactivate(tdist((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt<lambda>�tt__file__R9t__main__N(R*RtabspathtdirnameR^RRRRtinsertRt__init__t	callbackstappendt
isinstancetstrtencodetgetfilesystemencodingRtdictRt
SystemExittargs(tsetup_scriptRwR\tdunder_filetnstv((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR	�s


cBs�eZdZeZd�Zd�Zd�Zd�Zd�Z	d�Z
x<ddd	gD]+Zee
e�rXe
e�e�e<qXqXWd)d
�Zer�ede�Znede�Zxld
ddddddddddddddddddgD]+Zee
e�r�ee�e�e<q�q�Wd�Zx9d d!gD]+Zee
e�r?ee�e�e<q?q?Wd"�Zx9d#d$gD]+Zee
e�r�ee�e�e<q�q�Wd%�Zd&�Zd'�Zd(�ZRS(*sDWrap 'os' module and 'open()' builtin for virtualizing setup scriptscCsEgtt�D]+}|jd�r
t||�r
|^q
|_dS(Nt_(tdirt_osRHthasattrt_attrs(R>tname((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyRn
scCs1x*|jD]}tt|t||��q
WdS(N(R�tsetattrR*tgetattr(R>tsourceR�((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt_copyscCs;|j|�tr"|jt_n|jt_t|_dS(N(R�t_fileRtfilet_openRR%t_active(R>((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR?s

cCs5t|_trtt_ntt_|jt�dS(N(	tFalseR�R�RR�R�RR�R~(R>texc_typet	exc_valuet	traceback((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyRCs
		cCs|�|�SWdQXdS(sRun 'func' under os sandboxingN((R>tfunc((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pytrun"scs%tt�����fd�}|S(Ncs@|jr-|j�||||�\}}n�||||�S(N(R�t_remap_pair(R>tsrctdstRwtkw(R�toriginal(s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pytwrap*s	$(R�R~(R�R�((R�R�s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt_mk_dual_path_wrapper'strenametlinktsymlinkcs+�ptt�����fd�}|S(Ncs4|jr$|j�|||�}n�|||�S(N(R�t_remap_input(R>RRwR�(R�R�(s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR�8s	(R�R~(R�R�R�((R�R�s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt_mk_single_path_wrapper5sR�RtstattlistdirR,tchmodtchowntmkdirtremovetunlinktrmdirtutimetlchowntchroottlstatt	startfiletmkfifotmknodtpathconftaccesscs%tt�����fd�}|S(NcsM|jr=|j�|||�}|j��|||��S�|||�S(N(R�R�t
_remap_output(R>RRwR�(R�R�(s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR�Ms	(R�R~(R�R�((R�R�s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt_mk_single_with_returnJstreadlinkttempnamcs%tt�����fd�}|S(Ncs,�||�}|jr(|j�|�S|S(N(R�R�(R>RwR�tretval(R�R�(s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR�\s	(R�R~(R�R�((R�R�s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt	_mk_queryYsR+ttmpnamcCs|S(s=Called to remap or validate any path, whether input or output((R>R((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt_validate_pathhscOs
|j|�S(sCalled for path inputs(R�(R>t	operationRRwR�((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR�lscCs
|j|�S(sCalled for path outputs(R�(R>R�R((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR�pscOs6|j|d|||�|j|d|||�fS(s?Called for path pairs like rename, link, and symlink operationss-froms-to(R�(R>R�R�R�RwR�((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR�tsN(R9R:R;R�R�RnR�R?RCR�R�R�RR~RRR�R�R�R�R�R�R�R�R�(((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyRsB						

					tdevnullcBs�eZdZejddddddddd	d
ddd
g
�ZdgZed�Zd�Z	e
rudd�Z
ndd�Zd�Zd�Z
d�Zd�Zd�Zdd�ZRS(s<Restrict operations to a single subdirectory - pseudo-chrootRR�R�R�R�R�R�R�R�R�R�R�R�s.*lib2to3.*\.pickle$cCs�tjjtjj|��|_tjj|jd�|_g|D]$}tjjtjj|��^qC|_tj	|�dS(NRh(
R*Rtnormcasetrealpatht_sandboxRYt_prefixt_exceptionsRRn(R>tsandboxt
exceptionsR((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyRn�s
!1cOs&ddlm}||||��dS(Ni����(R(R3R(R>R�RwR�R((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt
_violation�strcOsK|dkr8|j|�r8|jd||||�nt||||�S(NR�trtR
trUtUR�(R�R�R
R�R�(t_okR�R�(R>RRRwR�((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR��scOsK|dkr8|j|�r8|jd||||�nt||||�S(NR�R�R
R�R�R(R�R�R
R�R�(R�R�R�(R>RRRwR�((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR��scCs|jd�dS(NR�(R�(R>((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR��scCss|j}zYt|_tjjtjj|��}|j|�p`||jkp`|j|j	�SWd||_XdS(N(
R�R�R*RR�R�t	_exemptedR�RHR�(R>RtactiveR�((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR��s		csN�fd�|jD�}�fd�|jD�}tj||�}t|�S(Nc3s|]}�j|�VqdS(N(RH(RIt	exception(tfilepath(s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pys	<genexpr>�sc3s!|]}tj|��VqdS(N(R_Ra(RIRb(R�(s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pys	<genexpr>�s(R�t_exception_patternst	itertoolstchaintany(R>R�t
start_matchestpattern_matchest
candidates((R�s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR��s

cOsH||jkrD|j|�rD|j|tjj|�||�n|S(sCalled for path inputs(t	write_opsR�R�R*RR�(R>R�RRwR�((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR��s%cOsF|j|�s |j|�r<|j|||||�n||fS(s?Called for path pairs like rename, link, and symlink operations(R�R�(R>R�R�R�RwR�((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR��s i�cOsR|t@r9|j|�r9|jd|||||�ntj|||||�S(sCalled for low-level os.open()sos.open(tWRITE_FLAGSR�R�R~R(R>R�tflagsRRwR�((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR�s(R9R:R;RutfromkeysR�R�t_EXCEPTIONSRnR�R�R�R�R�R�R�R�R(((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR�s 					
			s4O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARYicBs,eZdZejd�j�Zd�ZRS(sEA setup script attempted to modify the filesystem outside the sandboxs
        SandboxViolation: {cmd}{args!r} {kwargs}

        The package setup script has attempted to modify files on your system
        that are not within the EasyInstall build area, and has been aborted.

        This package cannot be safely installed by EasyInstall, and may not
        support alternate installation locations even if you run its setup
        script by hand.  Please inform the package's author and the EasyInstall
        maintainers to find out if a fix or workaround is available.
        cCs%|j\}}}|jjt��S(N(RwttmpltformatR(R>tcmdRwtkwargs((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt__str__�s(R9R:R;ttextwraptdedenttlstripR�R�(((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyR�s
(((@R*RR&toperatort	functoolsR�R_t
contextlibR0R�tsetuptools.externRtsetuptools.extern.six.movesRRtpkg_resources.py31compatR"tplatformRHt$org.python.modules.posix.PosixModuletpythonRKtposixtPosixModuleR~R�R�R�t	NameErrorRRR�tdistutils.errorsRRt__all__RtcontextmanagerRR R)R.R2R/R=RQRNRVR^RcRZR	RRR�R�Rtreducetor_tsplittaR�R�R(((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/sandbox.pyt<module>s^



	
					wV	+

Zerion Mini Shell 1.0