ROOTPLOIT
Server: LiteSpeed
System: Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: niphet (1079)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //lib/python3.8/site-packages/setuptools/__pycache__/wheel.cpython-38.opt-1.pyc
U

Qab@sdZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddl	mZddlm
Z
ddlmZddl
mZddlmZeZed	ejjZd
ZddZGd
ddZdS)zWheels support.)get_platformN)
parse_version)canonicalize_name)PY3)
pep425tags)write_requirementsz^(?P<project_name>.+?)-(?P<version>\d.*?)
    ((-(?P<build>\d.*?))?-(?P<py_version>.+?)-(?P<abi>.+?)-(?P<platform>.+?)
    )\.whl$ztry:
    __import__('pkg_resources').declare_namespace(__name__)
except ImportError:
    __path__ = __import__('pkgutil').extend_path(__path__, __name__)
cCst|D]\}}}tj||}|D].}tj||}tj|||}t||q&ttt|D]D\}	}
tj||
}tj|||
}tj	|sft||||	=qfq
tj|ddD]\}}}t
|qdS)zDMove everything under `src_dir` to `dst_dir`, and delete the former.T)topdownN)oswalkpathrelpathjoinrenamesreversedlist	enumerateexistsrmdir)Zsrc_dirZdst_dirdirpathZdirnames	filenamessubdirfsrcZdstndr4/usr/lib/python3.8/site-packages/setuptools/wheel.pyunpack%s
rc@sheZdZddZddZddZddZd	d
ZddZd
dZ	e
ddZe
ddZe
ddZ
dS)WheelcCsPttj|}|dkr$td|||_|D]\}}t|||q6dS)Nzinvalid wheel name: %r)	
WHEEL_NAMEr	rbasename
ValueErrorfilename	groupdictitemssetattr)selfr"matchkvrrr__init__=szWheel.__init__cCs&t|jd|jd|jdS)z>List tags (py_version, abi, platform) supported by this wheel..)	itertoolsproductZ
py_versionsplitZabiplatformr&rrrtagsEs



z
Wheel.tagscs$ttfdd|DdS)z5Is the wheel is compatible with the current platform?c3s|]}|krdVqdS)TNr).0tZsupported_tagsrr	<genexpr>Psz&Wheel.is_compatible.<locals>.<genexpr>F)rZ
get_supportednextr1r0rr4r
is_compatibleMszWheel.is_compatiblecCs,tj|j|j|jdkrdntddS)Nany)project_nameversionr/z.egg)
pkg_resourcesDistributionr9r:r/regg_namer0rrrr=RszWheel.egg_namecCsJ|D]4}t|}|drt|t|jr|SqtddS)Nz
.dist-infoz.unsupported wheel format. .dist-info not found)Znamelist	posixpathdirnameendswithr
startswithr9r!)r&zfmemberr?rrr
get_dist_infoXs


zWheel.get_dist_infoc	Cs(t|j}|||W5QRXdS)z"Install wheel as an egg directory.N)zipfileZZipFiler"_install_as_egg)r&destination_eggdirrBrrrinstall_as_eggbszWheel.install_as_eggcCs\d|j|jf}||}d|}tj|d}|||||||||||dS)Nz%s-%sz%s.dataEGG-INFO)	r9r:rDr	rr
_convert_metadata_move_data_entries_fix_namespace_packages)r&rGrBZ
dist_basename	dist_info	dist_dataegg_inforrrrFgs
zWheel._install_as_eggc
s&fdd}|d}t|d}td|ko>tdkn}|sTtd|t||tj|tj	j
|t|dd	d
tt
tfddjD}t|ttj|d
tj|dtj	t|dd}	t|	ddtj|ddS)Nc
sTt|8}tr&|dn|}tj	|W5QRSQRXdS)Nzutf-8)
openr>r
rreaddecodeemailparserZParserZparsestr)namefpvalue)rMrBrrget_metadatassz-Wheel._convert_metadata.<locals>.get_metadataZWHEELz
Wheel-Versionz1.0z2.0dev0z$unsupported wheel format version: %s)ZmetadatacSsd|_t|SN)Zmarkerstr)reqrrrraw_reqsz(Wheel._convert_metadata.<locals>.raw_reqc
s2i|]*}|tfddt|fDqS)c3s|]}|kr|VqdSrYr)r2r[)install_requiresrrr5sz5Wheel._convert_metadata.<locals>.<dictcomp>.<genexpr>)sortedmaprequires)r2Zextra)distr]r\rr
<dictcomp>s
z+Wheel._convert_metadata.<locals>.<dictcomp>ZMETADATAzPKG-INFO)r]extras_require)ZattrsrOzrequires.txt)rgetr!r	mkdirZ
extractallrr
r;r<Z
from_locationZPathMetadatarr^r_r`Zextrasrename
setuptoolsdictrZget_command_obj)
rBrGrMrOrXZwheel_metadataZ
wheel_versionZwheel_v1rcZ
setup_distr)rarMr]r\rBrrJqsL


zWheel._convert_metadatacstj|tjd}tj|rtj|dd}t|t|D]D}|drpttj||qLttj||tj||qLt	|t
tjjfdddDD]}t||qtjrt	dS)z,Move data entries to their correct location.ZscriptsrIz.pycc3s|]}tj|VqdSrY)r	rr
)r2rrNrrr5sz+Wheel._move_data_entries.<locals>.<genexpr>)dataZheadersZpurelibZplatlibN)r	rr
rrelistdirr@unlinkrfrfilterr)rGrNZdist_data_scriptsZegg_info_scriptsentryrrrirrKs.


zWheel._move_data_entriesc
Cstj|d}tj|rt|}|}W5QRX|D]b}tjj|f|d}tj|d}tj|r>tj|s>t|d}|tW5QRXq>dS)Nznamespace_packages.txtr+z__init__.pyw)	r	rr
rrPrQr.writeNAMESPACE_PACKAGE_INIT)rOrGZnamespace_packagesrVmodZmod_dirZmod_initrrrrLs
zWheel._fix_namespace_packagesN)__name__
__module____qualname__r*r1r7r=rDrHrFstaticmethodrJrKrLrrrrr;s


9
r)__doc__Zdistutils.utilrrSr,r	r>rerEr;rgrZ!setuptools.extern.packaging.utilsrZsetuptools.extern.sixrrZsetuptools.command.egg_infortypeZ
__metaclass__compileVERBOSEr'rrqrrrrrr<module>s,