Viewing File: /usr/lib64/python3.6/ensurepip/rewheel/__pycache__/__init__.cpython-36.opt-1.pyc
3
sjM @ s d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
Z
d dlZdd Zdd Z
dd Zdd Zd
d ZdS ) Nc C s t jdd} | jddd | jdddd tjjd
| j }d}yttf t | W n4 t
k
r } ztdj| d
}W Y d d }~X nX tj
d
d S )Nz,Recreate wheel of package with given RECORD.)descriptionrecord_pathzPath to RECORD file)helpz-oz--output-dirz>Dir where to place the wheel, defaults to current working dir.outdir)r destdefaultr z
Failed: {} )argparseArgumentParseradd_argumentospathcurdir
parse_argsprintrewheel_from_recordvars
BaseExceptionformatsysexit)parsernsZretcodee r /usr/lib64/python3.6/__init__.pyrun
s r c s g }t jtjtjg}dd |D }x| D ]}d}xd|D ]\tjj|djtj fddtj
D } fdd|D }t|dkr8|d }q8W |dk r|jtjj|d q*|jd q*W |S )
zReturn 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
c S s g | ]}t jj|r|qS r )r r
exists).0spr r r
<listcomp>( s z'find_system_records.<locals>.<listcomp>Nz-[^\{0}]+\.dist-infoc s g | ]}t jj |qS r )r r
join)r p)r r r r . s c s g | ]}t j |r|qS r )rematch)r c)dist_info_rer r r 0 s r r ZRECORD)
sitegetsitepackagesr base_prefixbase_exec_prefixr r
r! r seplistdirlenappend)ZprojectsZrecordsZsys_sitepackZprojectr
Z
candidatesZfilteredr )r&