a Re$@sdZddlZddlZddlZddlZddlmZmZmZm Z m Z ddl m Z m Z mZddlmZddlmZddlmZddlmZdd lmZdd lmZmZdd lmZeeZ ee!e!fe!d d dZ"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_url)dreturncCs&tj|dddd}t|dS)z'Return a stable sha224 of a dictionary.T),:) sort_keys separators ensure_asciiascii)jsondumpshashlibsha224encode hexdigest)rsr!/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/cache.py _hash_dictsr#cseZdZdZeeeeddfdd Zee edddZ eee e d d d Z eedd d Z eeee eedddZZS)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) N) cache_dirformat_controlallowed_formatsrcsTt|rtj|sJ|p$d|_||_||_ddh}|j||ksPJdS)Nsourcebinary) super__init__ospathisabsr%r&r'union)selfr%r&r'_valid_formats __class__r!r"r+(s  zCache.__init__linkrcCsd|ji}|jdur*|jdur*|j||j<|jr:|j|d<t|d<t|d<t|}|dd|dd|dd|ddg}|S) zs(       XF