Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
vWS`c @ s d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l
Z
d d l Z d Z d Z
d Z d Z d Z d S( iNc C s t j d d } | j d d d | j d d d d d d
d t j j | j } d } y t t | GHWn' t k
r } d
j
| GHd } n Xt j d d S( Nt descriptions, Recreate wheel of package with given RECORD.t record_patht helps Path to RECORD files -os --output-dirs> Dir where to place the wheel, defaults to current working dir.t destt outdirt defaulti s
Failed: {}i (
t argparset ArgumentParsert add_argumentt ost patht curdirt
parse_argst rewheel_from_recordt varst
BaseExceptiont formatt syst exit( t parsert nst retcodet e( ( s? /opt/alt/python27/lib64/python2.7/ensurepip/rewheel/__init__.pyt run
s
c C sP g } t j t j t j g } g | D] } t j j | r( | ^ q( } x | D] } d } x | D] } t j j | | d j
t j } g t j | D] } t j j | | ^ q } g | D] } t
j | | r | ^ q }
t |
d k rf |
d } qf qf W| d k r;| j t j j | d qS | j d qS W| S( s Return list of paths to RECORD files for system-installed projects.
If a project is not installed, the resulting list contains None instead
of a path to its RECORD
s -[^\{0}]+\.dist-infoi i t RECORDN( t sitet getsitepackagesR t base_prefixt base_exec_prefixR R
t existst Nonet joinR t sept listdirt ret matcht lent append( t projectst recordst sys_sitepackt spt projectR
t dist_info_ret pt
candidatest ct filtered( ( s? /opt/alt/python27/lib64/python2.7/ensurepip/rewheel/__init__.pyt find_system_records s +
%1+c C s? t j j t j j | } | t | j t j j } t | | \ } } t | } t j j | | d } t j
| d d d t j } t j
} t j | }
xO | D]G \ } } }
| j t j j | | d | |
j | | |
g q W|
j | d d g | j | | j | j | j S( sc Recreates a whee of package with given record_path and returns path
to the newly created wheel.s .whlt modet wt compressiont arcnamet ( R R
t dirnameR$ t stripR t get_records_to_packt get_wheel_nameR t zipfilet ZipFilet ZIP_DEFLATEDt iot StringIOt csvt writert writet writerowt writestrt getvaluet closet filename( R R t site_dirt record_relpatht to_writet to_omitt new_wheel_namet new_wheel_patht new_wheelt
new_recordR@ t ft sha_hasht size( ( s? /opt/alt/python27/lib64/python2.7/ensurepip/rewheel/__init__.pyR
: s "
c
C s t j j t j j | d } t j | d d % } t j j j | j
} Wd QXt j j t j j | d } t j | d d % } t j j j | j
} Wd QX| j d } | j d } d } g }
x1 | j d D] } |
j
| j d
d q Wd j |
}
| j d j d
d
d !\ } }
t d | | | |
| |
g } d
j t | S( s. Return proper name of the wheel, without .whl.t WHEELt encodings utf-8Nt METADATAt Namet VersionR5 t Tagt -i t .i i ( R R
R R6 t codecst opent emailR t Parsert parsestrt readt gett get_allR% t splitt filterR t list( R t wheel_info_patht wheel_info_filet
wheel_infot
metadata_patht
metadata_filet metadatat distributiont versiont build_tagt lang_tagt tt abi_tagt plat_tagt to_join( ( s? /opt/alt/python27/lib64/python2.7/ensurepip/rewheel/__init__.pyR9 V s !$!$%!c
C sU t j j | | } t j | d d } | j } Wd QXt j j | j t j j } | t d d } g } g } x | j
D] } | j d } t | d k r t j j | d s'| d j
d s'| d j d
s'| d j d s'| d | k s'| d j
| r7| j | qG| j | q q W| | f S( s Accepts path of sitedir and path of RECORD file relative to it.
Returns two lists:
- list of files that can be written to new RECORD straight away
- list of files that shouldn't be written or need some processing
(pyc and pyo files, scripts)
RS s utf-8Ns dist-infot datat ,i i s ..s .pycs .pyo( R R
R RZ R[ R_ R6 R7 R R$ t
splitlinesRb t isabst
startswitht endswithR% (
RG RH t record_file_patht record_filet record_contentst data_dirRI RJ t lt spl( ( s? /opt/alt/python27/lib64/python2.7/ensurepip/rewheel/__init__.pyR8 n s" !)&#( R RZ R? t email.parserR\ R R= R" R t
subprocessR R: R R0 R
R9 R8 ( ( ( s? /opt/alt/python27/lib64/python2.7/ensurepip/rewheel/__init__.pyt s