Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/setuptools/__pycache__/sandbox.cpython-37.pyc

146 lines
15 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
<00>T<EFBFBD>]<5D>7<00>@s
ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
m Z ddl m Z mZddlZej<11>d<04>r<>ddlmmmmZn ejejZyeZWnek
r<EFBFBD>dZYnXeZddlm Z ddlm!Z!ddd d
gZ"d-d d <0C>Z#ej$d.d d<0E><01>Z%ej$dd<10><00>Z&ej$dd<12><00>Z'ej$dd<14><00>Z(Gdd<16>de)<29>Z*Gdd<18>d<18>Z+ej$dd<1A><00>Z,dd<1C>Z-ej$dd<1E><00>Z.ej$dd <20><00>Z/d!d"<22>Z0d#d$<24>Z1d%d
<EFBFBD>Z2Gd&d<07>d<07>Z3e4ed'<27><02>r<>ej5gZ6ngZ6Gd(d<08>de3<65>Z7e<04>8ej9d)d*<2A>d+<2B>:<3A>D<00><01>Z;Gd,d <09>d e <20>Z<dS)/<2F>N)<01>six)<02>builtins<6E>map<61>java)<01>DistutilsError)<01> working_set<65>AbstractSandbox<6F>DirectorySandbox<6F>SandboxViolation<6F> run_setupc CsJd}t||<03><02>}|<04><01>}WdQRX|dkr.|}t||d<03>}t|||<02>dS)z.
Python 3 implementation of execfile.
<20>rbN<62>exec)<04>open<65>read<61>compiler )<07>filename<6D>globals<6C>locals<6C>mode<64>stream<61>script<70>code<64>r<00>:/tmp/pip-install-a92mrpso/setuptools/setuptools/sandbox.py<70> _execfile#s  rc
csDtjdd<00>}|dk r$|tjdd<00><z
|VWd|tjdd<00><XdS)N)<02>sys<79>argv)<02>repl<70>savedrrr<00> save_argv0s 
rc
cs.tjdd<00>}z
|VWd|tjdd<00><XdS)N)r<00>path)rrrr<00> save_path;s
r!ccs4tjj|dd<02>tj}|t_z
dVWd|t_XdS)zL
Monkey-patch tempfile.tempdir with replacement, ensuring it exists
T)<01>exist_okN)<05> pkg_resources<65>
py31compat<EFBFBD>makedirs<72>tempfile<6C>tempdir)<02> replacementrrrr<00> override_tempDs 
r)c cs.t<00><01>}t<00>|<00>z
|VWdt<00>|<01>XdS)N)<03>os<6F>getcwd<77>chdir)<02>targetrrrr<00>pushdUs


r.c@seZdZdZedd<03><00>ZdS)<05>UnpickleableExceptionzP
An exception representing another Exception that could not be pickled.
c CsJyt<00>|<00>t<00>|<01>fStk
rDddlm}|<02>||t|<01><01><01>SXdS)z<>
Always return a dumped (pickled) type and exc. If exc can't be pickled,
wrap it in UnpickleableException first.
r)r/N)<07>pickle<6C>dumps<70> Exception<6F>setuptools.sandboxr/<00>dump<6D>repr)<03>type<70>exc<78>clsrrrr4ds
 zUnpickleableException.dumpN)<06>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__<5F> staticmethodr4rrrrr/_sr/c@s(eZdZdZdd<03>Zdd<05>Zdd<07>ZdS) <09>ExceptionSaverz^
A Context Manager that will save an exception, serialized, and restore it
later.
cCs|S)Nr)<01>selfrrr<00> __enter__xszExceptionSaver.__enter__cCs |sdSt<00>||<02>|_||_dS)NT)r/r4<00>_saved<65>_tb)r?r6r7<00>tbrrr<00>__exit__{s
zExceptionSaver.__exit__cCs6dt|<00>krdSttj|j<04>\}}t<05>|||j<07>dS)z"restore and re-raise any exceptionrAN)<08>varsrr0<00>loadsrAr<00>reraiserB)r?r6r7rrr<00>resume<6D>s zExceptionSaver.resumeN)r9r:r;r<r@rDrHrrrrr>rs r>c #sVtj<01><02><00>t<03><00> }<00>VWdQRXtj<01><04><00><00>fdd<03>tjD<00>}t|<01>|<00><06>dS)z<>
Context in which imported modules are saved.
Translates exceptions internal to the context into the equivalent exception
outside the context.
Nc3s$|]}|<01>kr|<01>d<00>s|VqdS)z
encodings.N)<01>
startswith)<02>.0<EFBFBD>mod_name)rrr<00> <genexpr><3E>szsave_modules.<locals>.<genexpr>)r<00>modules<65>copyr><00>update<74>_clear_modulesrH)<02> saved_excZ del_modulesr)rr<00> save_modules<65>s
 rRcCsxt|<00>D] }tj|=q
WdS)N)<03>listrrM)Z module_namesrKrrrrP<00>srPc cs$t<00><01>}z
|VWdt<00>|<00>XdS)N)r#<00> __getstate__<5F> __setstate__)rrrr<00>save_pkg_resources_state<74>s
rVccs<>tj<01>|d<01>}t<03><00>xt<04><00>ft<05>t<06><00>Nt<07><00><t|<01><01>(t |<00><01>t
d<02>dVWdQRXWdQRXWdQRXWdQRXWdQRXWdQRXdS)N<>temp<6D>
setuptools) r*r <00>joinrVrR<00>hide_setuptoolsr!rr)r.<00>
__import__)<02> setup_dir<69>temp_dirrrr<00> setup_context<78>s

r^cCst<00>d<01>}t|<01>|<00><01>S)aH
>>> _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
z1(setuptools|pkg_resources|distutils|Cython)(\.|$))<04>rer<00>bool<6F>match)rK<00>patternrrr<00> _needs_hiding<6E>s
rccCstttj<03>}t|<00>dS)a%
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)<05>filterrcrrMrP)rMrrrrZ<00>s rZc Cs<>tj<01>tj<01>|<00><01>}t|<02><01><>y<>|gt|<01>tjdd<01><tj<01>d|<02>t <09>
<EFBFBD>t j <0B> dd<04><00>t |t<0E>rl|n |<00>t<06><10><00>}t|<02><01>t|dd<06>}t||<04>WdQRXWn4tk
r<EFBFBD>}z|jr<>|jdWdd}~XYnXWdQRXdS)z8Run a distutils setup script, sandboxed in its directoryNrcSs|<00><00>S)N)<01>activate)<01>distrrr<00><lambda><3E><00>zrun_setup.<locals>.<lambda><3E>__main__)<02>__file__r9)r*r <00>abspath<74>dirnamer^rSrr<00>insertr<00>__init__<5F> callbacks<6B>append<6E>
isinstance<EFBFBD>str<74>encode<64>getfilesystemencodingr <00>dictr<00>
SystemExit<EFBFBD>args)Z setup_scriptrwr\Z dunder_file<6C>ns<6E>vrrrr <00>s

 c@s.eZdZdZdZdd<04>Zdd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>Z d d<0E>Z
x$dD]Z e e e <0B>rFe
e <0B>e<0E>e <qFWd$dd<12>Zer~ede<10>Zede<11>Zx$dD]Z e e e <0B>r<>ee <0B>e<0E>e <q<>Wdd<17>Zx$dD]Z e e e <0B>r<>ee <0B>e<0E>e <q<>Wdd<1A>Zx$dD]Z e e e <0B>r<>ee <0B>e<0E>e <q<>Wdd<1D>Zdd<1F>Zd d!<21>Zd"d#<23>ZdS)%rzDWrap 'os' module and 'open()' builtin for virtualizing setup scriptsFcs<00>fdd<02>tt<01>D<00><01>_dS)Ncs$g|]}|<01>d<00>st<01>|<01>r|<01>qS)<01>_)rI<00>hasattr)rJ<00>name)r?rr<00>
<listcomp>sz,AbstractSandbox.__init__.<locals>.<listcomp>)<03>dir<69>_os<6F>_attrs)r?r)r?rrnszAbstractSandbox.__init__cCs&x |jD]}tt|t||<02><02>qWdS)N)r<><00>setattrr*<00>getattr)r?<00>sourcer|rrr<00>_copy s zAbstractSandbox._copycCs(|<00>|<00>tr|jt_|jt_d|_dS)NT)r<><00>_filer<00>file<6C>_openr<00>_active)r?rrrr@s

zAbstractSandbox.__enter__cCs$d|_trtt_tt_|<00>t<07>dS)NF)r<>r<>rr<>r<>rr<>r)r?<00>exc_type<70> exc_value<75> tracebackrrrrDs
zAbstractSandbox.__exit__c Cs|<00>|<01>SQRXdS)zRun 'func' under os sandboxingNr)r?<00>funcrrr<00>runszAbstractSandbox.runcstt<01><00><02><01><00>fdd<02>}|S)Ncs2|jr |j<01>||f|<03>|<04>\}}<02>||f|<03>|<04>S)N)r<><00> _remap_pair)r?<00>src<72>dstrw<00>kw)r|<00>originalrr<00>wrap&sz3AbstractSandbox._mk_dual_path_wrapper.<locals>.wrap)r<>r)r|r<>r)r|r<>r<00>_mk_dual_path_wrapper#s
z%AbstractSandbox._mk_dual_path_wrapper)<03>rename<6D>link<6E>symlinkNcs <00>p tt<01><00><02><01><00>fdd<02>}|S)Ncs*|jr|j<01>|f|<02>|<03>}<01>|f|<02>|<03>S)N)r<><00> _remap_input)r?r rwr<>)r|r<>rrr<>4sz5AbstractSandbox._mk_single_path_wrapper.<locals>.wrap)r<>r)r|r<>r<>r)r|r<>r<00>_mk_single_path_wrapper1sz'AbstractSandbox._mk_single_path_wrapperr<72>r)<13>stat<61>listdirr,r<00>chmod<6F>chown<77>mkdir<69>remove<76>unlink<6E>rmdir<69>utime<6D>lchown<77>chroot<6F>lstatZ startfile<6C>mkfifo<66>mknod<6F>pathconf<6E>accesscstt<01><00><02><01><00>fdd<02>}|S)NcsB|jr2|j<01>|f|<02>|<03>}|<00><02><00>|f|<02>|<03><01>S<00>|f|<02>|<03>S)N)r<>r<><00> _remap_output)r?r rwr<>)r|r<>rrr<>Isz4AbstractSandbox._mk_single_with_return.<locals>.wrap)r<>r)r|r<>r)r|r<>r<00>_mk_single_with_returnFs
z&AbstractSandbox._mk_single_with_return)<02>readlink<6E>tempnamcstt<01><00><02><01><00>fdd<02>}|S)Ncs <00>||<02>}|jr|<00><01>|<03>S|S)N)r<>r<>)r?rwr<><00>retval)r|r<>rrr<>Xs
 z'AbstractSandbox._mk_query.<locals>.wrap)r<>r)r|r<>r)r|r<>r<00> _mk_queryUs
zAbstractSandbox._mk_query)r+<00>tmpnamcCs|S)z=Called to remap or validate any path, whether input or outputr)r?r rrr<00>_validate_pathdszAbstractSandbox._validate_pathcOs
|<00>|<02>S)zCalled for path inputs)r<>)r?<00> operationr rwr<>rrrr<>hszAbstractSandbox._remap_inputcCs
|<00>|<02>S)zCalled for path outputs)r<>)r?r<>r rrrr<>lszAbstractSandbox._remap_outputcOs0|j|d|f|<04>|<05>|j|d|f|<04>|<05>fS)z?Called for path pairs like rename, link, and symlink operationsz-fromz-to)r<>)r?r<>r<>r<>rwr<>rrrr<>pszAbstractSandbox._remap_pair)N)r9r:r;r<r<>rnr<>r@rDr<>r<>r|r{rrr<>r<>r<>r<>r<>r<>r<>r<>r<>rrrrrs<










<04>devnullc@s<>eZdZdZe<04>dddddddd d
d d d dg <0A>ZdgZefdd<11>Z dd<13>Z
e rXd'dd<16>Z d(dd<18>Z dd<1A>Z dd<1C>Zdd<1E>Zdd <20>Zd!d"<22>Zd)d$d%<25>Zd&S)*r z<Restrict operations to a single subdirectory - pseudo-chrootrr<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>z.*lib2to3.*\.pickle$cCsFtj<01>tj<01>|<01><01>|_tj<01>|jd<01>|_dd<03>|D<00>|_t<08> |<00>dS)N<>cSs g|]}tj<01>tj<01>|<01><01><01>qSr)r*r <00>normcase<73>realpath)rJr rrrr}<00>sz-DirectorySandbox.__init__.<locals>.<listcomp>)
r*r r<>r<><00>_sandboxrY<00>_prefix<69> _exceptionsrrn)r?Zsandbox<6F>
exceptionsrrrrn<00>s

zDirectorySandbox.__init__cOsddlm}||||<03><03>dS)Nr)r
)r3r
)r?r<>rwr<>r
rrr<00>
_violation<EFBFBD>s zDirectorySandbox._violation<6F>rcOs:|dkr(|<00>|<01>s(|jd||f|<03>|<04>t||f|<03>|<04>S)N)r<><00>rtr <00>rU<72>Ur<55>)<03>_okr<6B>r<>)r?r rrwr<>rrrr<><00>szDirectorySandbox._filecOs:|dkr(|<00>|<01>s(|jd||f|<03>|<04>t||f|<03>|<04>S)N)r<>r<>r r<>r<>r)r<>r<>r<>)r?r rrwr<>rrrr<><00>szDirectorySandbox._opencCs|<00>d<01>dS)Nr<4E>)r<>)r?rrrr<><00>szDirectorySandbox.tmpnamcCsN|j}z:d|_tj<02>tj<02>|<01><01>}|<00>|<03>p@||jkp@|<03>|j<08>S||_XdS)NF) r<>r*r r<>r<><00> _exemptedr<64>rIr<>)r?r <00>activer<65>rrrr<><00>s

 zDirectorySandbox._okcs<<00>fdd<02>|jD<00>}<02>fdd<02>|jD<00>}t<02>||<03>}t|<04>S)Nc3s|]}<01><00>|<01>VqdS)N)rI)rJ<00> exception)<01>filepathrrrL<00>sz-DirectorySandbox._exempted.<locals>.<genexpr>c3s|]}t<00>|<01><00>VqdS)N)r_ra)rJrb)r<>rrrL<00>s)r<><00>_exception_patterns<6E> itertools<6C>chain<69>any)r?r<>Z start_matchesZpattern_matches<65>
candidatesr)r<>rr<><00>s 



 zDirectorySandbox._exemptedcOs4||jkr0|<00>|<02>s0|j|tj<04>|<02>f|<03>|<04>|S)zCalled for path inputs)<06> write_opsr<73>r<>r*r r<>)r?r<>r rwr<>rrrr<><00>szDirectorySandbox._remap_inputcOs2|<00>|<02>r|<00>|<03>s*|j|||f|<04>|<05>||fS)z?Called for path pairs like rename, link, and symlink operations)r<>r<>)r?r<>r<>r<>rwr<>rrrr<><00>szDirectorySandbox._remap_pair<69><72>cOs@|t@r*|<00>|<01>s*|jd|||f|<04>|<05>tj|||f|<04>|<05>S)zCalled for low-level os.open()zos.open)<05> WRITE_FLAGSr<53>r<>rr)r?r<><00>flagsrrwr<>rrrr<00>szDirectorySandbox.openN)r<>)r<>)r<>)r9r:r;r<ru<00>fromkeysr<73>r<><00> _EXCEPTIONSrnr<>r<>r<>r<>r<>r<>r<>r<>rrrrrr ~s  

  cCsg|]}tt|d<00><03>qS)r)r<>r)rJ<00>arrrr}<00>sr}z4O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARYc@s&eZdZdZe<04>d<02><01><06>Zdd<04>ZdS)r
zEA setup script attempted to modify the filesystem outside the sandboxa
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\}}}|jjft<03><00>S)N)rw<00>tmpl<70>formatr)r?<00>cmdrw<00>kwargsrrr<00>__str__<5F>s zSandboxViolation.__str__N) r9r:r;r<<00>textwrap<61>dedent<6E>lstripr<70>r<>rrrrr
<00>s
)N)N)=r*rr&<00>operator<6F> functoolsr<73>r_<00>
contextlibr0r<>Zsetuptools.externrZsetuptools.extern.six.movesrrZpkg_resources.py31compatr#<00>platformrIZ$org.python.modules.posix.PosixModule<6C>pythonrM<00>posixZ PosixModulerr|r<>r<><00> NameErrorrr<><00>distutils.errorsrr<00>__all__r<00>contextmanagerrr!r)r.r2r/r>rRrPrVr^rcrZr rr{r<>r<>r <00>reduce<63>or_<72>splitr<74>r
rrrr<00><module>s^    
   

 
  w 
V