0
  .   ˆ{‹„„-i[D<†ªoZƒ›Ù«Â‚p_‘I|¥‰ÓMdœv ©ƒ†ü+=ÂÁ Y    ‹      Õ–ßOÛ0Çßù+<?ì­½¦6 õÄšJ«(¥‚NÓ4MÈ�ÝÆ"±#ÛmVþú9u€0Q­Ó •§ó%ßÜÝÇ9ÿßE½É÷q}™œÑøëçá ‡pà[§M"ÿb¿Ù
 ú#Œpbm~PE³è4•žÃä›¥û`¬±m2Ë0ÙËgd…	§ÌYZaSN’ñ_HÍ¨…5‚q÷ÝÊ ãKsSŽ-Ï ã™Ò«Ê�TŒ·*ï°ýÈ:!øÐ.TÙÂ©b«²ˆàeº¸k$:]ç-‡š„6AKšŠ¹ìb«rLB‘Í‘Ñqƒˆ•40M©¼iÎÅ#šÚ.þ1è]üt:°Iù5	)J4Ÿuñ§^wtrÑ�0ÑŒ‡@ŸÖœ;Í)&Cj,Ê3ÁÙFñ•_‰ÛÍ#¯‰¸‰µÈ­PòA
±Ž«ÔäÔ±8‚D×U^Âþ64~4ãÓËþh.ý”°2ÄCuÿýû0SÍ¥E‘Ð<¶îUÅæ½—S“ŸÜ¹¨ª\‹yb1A¨�žTþîL¥Œë:ð&Ô»z½­WùGYíVû°�àŽ[‡½`ýy#U!ë ®žP2’câí í ûÇ�öF ·�½"@ž¬Ìµï1LjÎÖ(í£�Bå&X‘¬Ç»òO¶_¹*¸v‹ÂÛç¨ÿ•…vÛÑ²<00¹nßOw¥ŸŒ¥Ö!¬ÍÛë"³˜VG†C¸¿Á-vÁ—î,ÃÄÛç xå>*±ë[%¹Á¤æ¼|Omy‡�êvÂú2‚¿ÑþÉJ«4       ˆÀ¿Ã527¾ÂÁ     ‹      µ”]oÓ0…ï÷+Œ/¸KÞ¦¬tNÐh*Q­k«.BÈ�ÝÄ[jG¶KW~=NSX@-0®üur|Ç~É³x6L>ÌGèMr=Aó·¯'ã!ÂÀ»Î Nâz¡ë·€Ñ#œ[[ ¶Û­¿íøJg�, ·ë¢Æj‘ZŸY†£3RÍEgˆäœ2×"b…-x4–Œß#µB 6ÖÆ»Pj•‚áÅ
´R6FƒÉ©æ ãŸ×Šm
n`ô%�ÚÄÙÂÁ—,ÛUÛOµvû˜t¹ß¡êêˆØ}¡…Èdˆ­*qDÄ:CF§!‘*i`YPyçgb…-lˆ?Ž‡³ON6¯¾ŽE¹æ«¿†Ó‹YãhJ×œ =®¹všKM¨±È+ÁÙIñM-¾_OÆµ&æ&Õ¢´BÉ)8Ä&jª
SRÇÚs¹nªj	ûÓiÐô§Ã˜_.FÓ$/ê#a•ÅCºÇþ(ÍÝœ´(š§VéÝ¥ö}.—¦¼ø>D‡ Zd¹ÅB:ª|ÝJŒë&ß)²åFÌå­ÛfÊ_bµ[íŽ×zéµû(èZ=„þc~Ëïm3}ò>9š^T/É_ßýèþž¡í-¯}Ž‚ƒnç$CÐï<™a#ï¤ÚÊ&†»ÀG1JwiÆý[£$Žš£ãŸ_�†ùËG‡rC`_ÇÔeógJ'™    A   ˆl–Ðz¾”Šj"Tâ‚À½q¶”Å£�þJ)Vq²‘¸Ý�Jð?ŸÅƒeÆCÄ_ŠI|¥�+Wé3ž¯ÄÃ /    """
Create a dist_info directory
As defined in the wheel specification
"""

import os
import shutil
from contextlib import contextmanager
from pathlib import Path
from typing import ClassVar, cast

from .. import _normalization
from .._shutil import rmdir as _rm
from .egg_info import egg_info as egg_info_cls

from distutils import log
from distutils.core import Command


class dist_info(Command):
    """
    This command is private and reserved for internal use of setuptools,
    users should rely on ``setuptools.build_meta`` APIs.
    """

    description = "DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory"

    user_options: ClassVar[
        list[tuple[str, str, str]] | list[tuple[str, str | None, str]]
    ] = [
        (
            'output-dir=',
            'o',
            (
                "directory inside of which the .dist-info will be"
                "created [default: top of the source tree]"
            ),
        ),
        ('tag-date', 'd', "Add date stamp (e.g. 20050528) to version number"),
        ('tag-build=', 'b', "Specify explicit tag to add to version number"),
        ('no-date', 'D', "Don't include date stamp [default]"),
        ('keep-egg-info', None, "*TRANSITIONAL* will be removed in the future"),
    ]

    boolean_options: ClassVar[list[str]] = ['tag-date', 'keep-egg-info']
    negative_opt: ClassVar[dict[str, str]] = {'no-date': 'tag-date'}

    def initialize_options(self):
        self.output_dir = None
        self.name = None
        self.dist_info_dir = None
        self.tag_date = None
        self.tag_build = None
        self.keep_egg_info = False

    def finalize_options(self) -> None:
        dist = self.distribution
        project_dir = dist.src_root or os.curdir
        self.output_dir = Path(self.output_dir or project_dir)

        egg_info = cast(egg_info_cls, self.reinitialize_command("egg_info"))
        egg_info.egg_base = str(self.output_dir)

        if self.tag_date:
            egg_info.tag_date = self.tag_date
        else:
            self.tag_date = egg_info.tag_date

        if self.tag_build:
            egg_info.tag_build = self.tag_build
        else:
            self.tag_build = egg_info.tag_build

        egg_info.finalize_options()
        self.egg_info = egg_info

        name = _normalization.safer_name(dist.get_name())
        version = _normalization.safer_best_effort_version(dist.get_version())
        self.name = f"{name}-{version}"
        self.dist_info_dir = os.path.join(self.output_dir, f"{self.name}.dist-info")

    @contextmanager
    def _maybe_bkp_dir(self, dir_path: str, requires_bkp: bool):
        if requires_bkp:
            bkp_name = f"{dir_path}.__bkp__"
            _rm(bkp_name, ignore_errors=True)
            shutil.copytree(dir_path