o g$@s dZddlZddlZddlZddlZddlmZmZmZm Z m Z ddl m Z m Z mZddlmZddlmZddlmZddlmZdd lmZdd lmZmZdd lmZeeZ d ee!e!fd e!fddZ"GdddZ#Gddde#Z$Gddde$Z%GdddZ&Gddde#Z'dS)zCache Management N)AnyDictListOptionalSet)Taginterpreter_nameinterpreter_version)canonicalize_name)InvalidWheelFilename) FormatControl)Link)Wheel) TempDirectory tempdir_kinds) path_to_urldreturncCs&tj|dddd}t|dS)z'Return a stable sha224 of a dictionary.T),:) sort_keys separators ensure_asciiascii)jsondumpshashlibsha224encode hexdigest)rsr!5/usr/lib/python3/dist-packages/pip/_internal/cache.py _hash_dictsr#cseZdZdZdededeeddffdd Zd ede efd d Z d ed ede e fd dZ d edefddZ d edeede edefddZZS)CacheanAn abstract class - provides cache directories for data from links :param cache_dir: The root of the cache. :param format_control: An object of FormatControl class to limit binaries being read from the cache. :param allowed_formats: which formats of files the cache should store. ('binary' and 'source' are the only allowed values) cache_dirformat_controlallowed_formatsrNcsTt|rtj|sJ|pd|_||_||_ddh}|j||ks(JdS)Nsourcebinary) super__init__ospathisabsr%r&r'union)selfr%r&r'_valid_formats __class__r!r"r+(s  zCache.__init__linkcCsd|ji}|jdur|jdur|j||j<|jr|j|d<t|d<t|d<t|}|dd|dd|dd|ddg}|S) zs*       XF