HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/share/dh-python/dhpython/__pycache__/tools.cpython-35.pyc


vX(-@sddlZddlZddlZddlmZddlmZddlmZddlmZddl	m
Z
mZmZm
Z
mZmZddlmZmZejdZejd	Zejd
ZddZd
dZddZddZdddZddZddZdddZddZ ddddddZ!Gd d!d!Z"d"d#Z#d$d%Z$dd&l%m&Z&dd'l'm(Z(m)Z)m*Z*ejd(e*ej+Z,ejd)e*ej+Z-dS)*N)datetime)glob)dumps)rmtree)existsgetsizeisdirislinkjoinsplit)PopenPIPEZdhpythonz/(.*?)(-py\d\.\d(?:-[^.]*)?)?(\.egg-info|\.pth)$zNEEDED.*libpython(\d\.\d)cCso|jd}|jd}x,|rL|d|dkrL|d=|d=q!Wdjdgt|d|S)z~Return relative path.

    >>> relpath('/usr/share/python-foo/foo.py', '/usr/bin/foo', )
    '../share/python-foo/foo.py'
    /rz..)rr
len)targetlinktlr&/usr/share/dh-python/dhpython/tools.pyrelpath%s
rcCstjt|||S)zCreate relative symlink.)ossymlinkr)rrrrrrelative_symlink2srcCst|rUt|d}x6tj|D]%}tt||t||q,Wt|rt|t|d}ttj||tj	|ntj
||dS)zCMove file to dstdir. Works with symlinks (including relative ones).rNr)rrrlistdir	move_filer
r	rreadlinkremoverename)fpathdstdirZdnamefnZdstpathrrrr7s#rc
Cstj|j}xttj|D]c\}}}xQ|D]I}t||}||r8t|t||}	tj||	q8Wq"WdS)zMove files (preserving path) that match given pattern.

    move_matching_files('foo/bar/', 'foo/baz/', 'spam/.*\.so$')
    will move foo/bar/a/b/c/spam/file.so to foo/baz/a/b/c/spam/file.so
    N)recompilesearchrwalkr
rrenames)
srcZdstpatternmatchrootdirs	filenamesr#Zspathdpathrrrmove_matching_filesFs
r0c&Cs3ytj|}Wn<tk
rQ}ztjd||dSWYdd}~XnX|r}|jdkr}d|_t|}|r/tjd|y)t|d}|j	}WdQRXWn&t
k
rtjd|dSYnXt|d	8}|jd
|j
d|j|ddWdQRXd
S)zmNormalize file's shebang.

    :param replacement: new shebang command (path to interpreter and options)
    zfix_shebang (%s): %sNz	/usr/bin/z/usr/binzreplacing shebang in %srbzcannot open %sFwbz#! %s
zutf-8rT)InterpreterZ	from_file	Exceptionlogdebugpathreprinfoopen	readlinesIOErrorerrorwriteencode
writelines)r!ZreplacementinterpretererrfpZfcontentrrrfix_shebangUs(	
	rDcCsdd|}t|dtdd}tjt|jjdd}|r`t|jdSdS)	zhReturn libpython version file is linked to or None.

    :rtype: tuple
    :returns: Python version
    zreadelf -Wd '%s'stdoutshellTencodingzutf-8rN)	rr
SHAREDLIB_REr&strrEreadVersiongroups)r!cmdprocessr+rrrso2pyverss

$rOcCsGtj|}|rC|jddk	rCdj|jddS|S)aRemove Python version and platform name from Egg files/dirs.

    >>> clean_egg_name('python_pipeline-0.1.3_py3k-py3.1.egg-info')
    'python_pipeline-0.1.3_py3k.egg-info'
    >>> clean_egg_name('Foo-1.2-py2.7-linux-x86_64.egg-info')
    'Foo-1.2.egg-info'
    Nr)
EGGnPTH_REr+groupr
)namer+rrrclean_egg_namesrVcCspt|pg}xW|D]O}t|ddd1}x'|D]}|r>|j|jq>WWdQRXqW|S)z#Parse namespace_packages.txt files.rrGzutf-8N)setr:addstrip)Zfpathsotherresultr!rClinerrrparse_nss

"r^c
Cst|tst|}t}x|D]}x|D]x}t|j|||jd}t|d}t|sq8t|dkr8tjd||j	|Pq8Wq+W||}x|D]}xv|D]n}t|j|||jd}	t|	d}t|rt
j|t
j|	st
j
|	qWtd|d|jd}	t|	d}t|rt
j|t
j|	st
j
|	qW|S)z8Remove empty __init__.py files for requested namespaces..z__init__.pyrz)file not empty, cannot share %s namespaceZdebianzusr/share/pyshared)
isinstancerXr
sitedirrrrr5ZwarningrYrrrrmdir)
rApackageZ
namespacesversionsZkeepnsversionr!r\r/rrr	remove_nss:	

$
	


$

rgTc
Cscd|d|d|i}d}|dkr-n|dkrR|jdtdtn|rt|trd}t|d	d
d}|jdjtjj	|jd
j||j
|jd|d|tjd|t
||c}|j\}}	|o|jtd|jd|o?t|dd|	oTt|	dSWdQRXdS)a<Execute external shell commad.

    :param cdw: currennt working directory
    :param env: environment
    :param log_output:
        * opened log file or path to this file, or
        * None if output should be included in the returned dict, or
        * False if output should be redirectored to stdout/stderr
    rFcwdenvFNrEstderrTarGzutf-8z
# command executed on {}z
$ {}
zinvoking: %s
returncode)updater
r`rIr:r>formatrZnowZ	isoformatflushr5r6rZcommunicateclosedictrl)
ZcommandrhriZ
log_outputrFargsrprNrErjrrrexecutes*
"
rsc@s(eZdZddZddZdS)memoizecCs||_i|_dS)N)funccache)selfrurrr__init__s	zmemoize.__init__cOsEt||f}||jkr:|j|||j|<|j|S)N)rrvru)rwrrkwargskeyrrr__call__szmemoize.__call__N)__name__
__module____qualname__rxr{rrrrrtsrtcCsd|}t|sdS|j}t||}xt|ddD]}|sE|jdrdqEtj|}|std||j}|dr|dj	dd	|d<|t||d
@}|st
jd||qEt|d}	|	std
|dx|	D]}
|
j
d}
|dr\t|dt|
d}n(|
jdr~|
dd}n|
}x{|D]s}t|j|||}
t|
d}t|stj|t|
rtj|
tj|
|
qWqWqEWdS)zDInstall local files listed in pkg.pyinstall files as public modules.z./debian/%s.pyinstallNrGzutf-8#zunrecognized line: %smoduler_rvrangez.%s.pyinstall: no matching versions for line %sr*zmissing file(s): %sz/.rzdebian/r)rimplget_requested_versionsr:
startswith
INSTALL_REr+
ValueError	groupdictreplacer5r6rlstripr
rrarmakedirsrr)rArcrsrcfpathrrdr]detailsmyversfilesr!ZdstnamerfZdstfpathr"rrr	pyinstallsJ
	
	


 


rcCsod|}t|sdS|j}t||}x6t|ddD]"}|sE|jdrdqEtj|}|std||f|j}|t||d@}|st	j
d||x|D]}	|j||	}
|
j|j
||	x]|
D]U}t|d	|d
}x4|D],}
t|
rNt|
q/tj|
q/Wq
WqWqEWdS)z2Remove public modules listed in pkg.pyremove file.z./debian/%s.pyremoveNrGzutf-8rzunrecognized line: %s: %srz-%s.pyremove: no matching versions for line %srr*)rrrr:r	REMOVE_REr+rrr5r6Zold_sitedirsappendrarrrrr)rArcrrrrdr]rrrfZ	site_dirsZsdirrr!rrrpyremoves2
		




r)r3)rKr
RANGE_PATTERNz
    (?P<pattern>.+?)  # file pattern
    (?:\s+  # optional Python module name:
    (?P<module>[A-Za-z][A-Za-z0-9_.]*)?
    )?
    \s*  # optional version range:
    (?P<vrange>%s)?$
z^
    (?P<pattern>.+?)  # file pattern
    \s*  # optional version range:
    (?P<vrange>%s)?$
).Zloggingrr$rrpicklerZshutilros.pathrrrr	r
r
subprocessrr
Z	getLoggerr5r%rSrHrrrr0rDrOrVr^rgrsrtrrZdhpython.interpreterr3Zdhpython.versionrKrrVERBOSErrrrrr<module>s<.
&"+