hyb
2025-12-23 c980682a1fe205d8c21d349e9fc6b9e4951aea34
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
Ë
@ñúh
SãóÖ—dZddlmZddlZddlZddlmZmZmZddl    m
Z
ddl m Z ddl m Z ddlmZmZddlZd    d
lmZdd lmZdd lmZerdd lmZej6j8Zd%d„ZGd„d«ZGd„d«Z Gd„de «Z!Gd„de!«Z"Gd„de «Z#Gd„de"«Z$Gd„de#«Z%d&d„Z&Gd„d«Z'd'd „Z(d'd!„Z)                                d(d"„Z*                                d)d#„Z+d*d$„Z,y)+u_Automatic discovery of Python modules and packages (for inclusion in the
distribution) and other config values.
 
For the purposes of this module, the following nomenclature is used:
 
- "src-layout": a directory representing a Python project that contains a "src"
  folder. Everything under the "src" folder is meant to be included in the
  distribution when packaging the project. Example::
 
    .
    â”œâ”€â”€ tox.ini
    â”œâ”€â”€ pyproject.toml
    â””── src/
        â””── mypkg/
            â”œâ”€â”€ __init__.py
            â”œâ”€â”€ mymodule.py
            â””── my_data_file.txt
 
- "flat-layout": a Python project that does not use "src-layout" but instead
  have a directory under the project root for each package::
 
    .
    â”œâ”€â”€ tox.ini
    â”œâ”€â”€ pyproject.toml
    â””── mypkg/
        â”œâ”€â”€ __init__.py
        â”œâ”€â”€ mymodule.py
        â””── my_data_file.txt
 
- "single-module": a project that contains a single Python script direct under
  the project root (no directory used)::
 
    .
    â”œâ”€â”€ tox.ini
    â”œâ”€â”€ pyproject.toml
    â””── mymodule.py
 
é)Ú annotationsN)ÚIterableÚIteratorÚMapping©Ú fnmatchcase)Úglob)ÚPath)Ú TYPE_CHECKINGÚClassVaré)ÚStrPath)Úlog)Ú convert_path)Ú Distributioncó\—tjj|«j«S©N)ÚosÚpathÚbasenameÚ isidentifier)rs úGH:\Change_password\venv_build\Lib\site-packages\setuptools/discovery.pyÚ _valid_namer?s €ä 7‰7× Ñ ˜DÓ !× .Ñ .Ó 0Ð0ócó(—eZdZdZdd„Zdd„Zdd„Zy)Ú_Filterzƒ
    Given a list of patterns, create a callable that will be true only if
    the input matches at least one of the patterns.
    có8—tj|«|_yr)ÚdictÚfromkeysÚ    _patterns)ÚselfÚpatternss  rÚ__init__z_Filter.__init__Js€ÜŸ™ xÓ0ˆrcó@‡—tˆfd„|jD««S)Nc3ó6•K—|]}t‰|«–—Œy­wrr)Ú.0ÚpatÚitems  €rú    <genexpr>z#_Filter.__call__.<locals>.<genexpr>Nsøèø€ÒD¨c”;˜t S×)ÑDùsƒ)Úanyr ©r!r(s `rÚ__call__z_Filter.__call__Msø€ÜÓD°T·^±^ÔDÓDÐDrcó—||jvSr)r r+s  rÚ __contains__z_Filter.__contains__Ps€Øt—~‘~Ð%Ð%rN)r"ÚstrÚreturnÚNone)r(r/r0Úbool)Ú__name__Ú
__module__Ú __qualname__Ú__doc__r#r,r.©rrrrDs„ñó
1óEô&rrcóx—eZdZUdZdZded<dZded<e            d                                d
d„«Ze                                d d„«Z    y) Ú_Finderz@Base class that exposes functionality for module/package findersr7zClassVar[tuple[str, ...]]ÚALWAYS_EXCLUDEÚDEFAULT_EXCLUDEc    ó´—|xs |j}t|jtt    |««t g|j ¢|¢­Žt |Ž««S)aFReturn a list of all Python items (packages or modules, depending on
        the finder implementation) found within directory 'where'.
 
        'where' is the root directory which will be searched.
        It should be supplied as a "cross-platform" (i.e. URL-style) path;
        it will be converted to the appropriate local path syntax.
 
        'exclude' is a sequence of names to exclude; '*' can be used
        as a wildcard in the names.
        When finding packages, 'foo.*' will exclude all subpackages of 'foo'
        (but not 'foo' itself).
 
        'include' is a sequence of names to include.
        If it's specified, only the named items will be included.
        If it's not specified, all found items will be included.
        'include' can contain shell style wildcard patterns just like
        'exclude'.
        )r;ÚlistÚ
_find_iterrr/rr:©ÚclsÚwhereÚexcludeÚincludes    rÚfindz _Finder.findZsW€ð4Ò0˜S×0Ñ0ˆÜØ N‰NÜœS ›ZÓ(ÜÐ6˜×+Ñ+Ð6¨gÒ6ܘÐ!ó ó
ð    
rcó—t‚r)ÚNotImplementedErrorr?s    rr>z_Finder._find_iter}s
€ô"Ð!rN)ú.r7)Ú*)rArrBú Iterable[str]rCrIr0ú    list[str]©rArrBrrCrr0z Iterator[str])
r3r4r5r6r:Ú__annotations__r;Ú classmethodrDr>r7rrr9r9Ts“…ÙJà02€NÐ-Ó2Ø13€OÐ.Ó3àðØ!#Ø!'ð     
àð 
ðð 
ðð     
ð
 
ò  
óð 
ðDð"Øð"Ø&-ð"Ø8?ð"à    ò"óñ"rr9cóH—eZdZdZdZe                                dd„«Zedd„«Zy)Ú PackageFinderzI
    Generate a list of all Python packages found within a directory
    )Úez_setupz *__pycache__c#óêK—tjt|«d¬«D]Ì\}}}|dd}g|dd|D]·}tjj    ||«}    tjj |    |«}
|
j tjjd«} d|vs|j|    | «sŒ„|| «r || «s| –—| ›d|vs| ›d|vrŒ§|j|«Œ¹ŒÎy­w)zy
        All the packages found in 'where' that pass the 'include' filter, but
        not the 'exclude' filter.
        T)Ú followlinksNrGrHú.*)
rÚwalkr/rÚjoinÚrelpathÚreplaceÚsepÚ_looks_like_packageÚappend) r@rArBrCÚrootÚdirsÚfilesÚall_dirsÚdirÚ    full_pathÚrel_pathÚpackages             rr>zPackageFinder._find_iter‹sïèø€ô"$§¡¬¨U«ÀÔ!Fò    !Ñ ˆD$˜à™AwˆH؈D‘ˆGàò !ÜŸG™GŸL™L¨¨sÓ3    ÜŸ7™7Ÿ?™?¨9°eÓ<Ø"×*Ñ*¬2¯7©7¯;©;¸Ó<ð˜#‘: S×%<Ñ%<¸YÈÔ%PØñ˜7Ô#©G°GÔ,<Ø!’MðY˜a= GÑ+°'°¸"¨~ÀÑ/HØð— ‘ ˜CÕ ñ' !ñ     !ùs‚C1C3có|—tjjtjj|d««S)z%Does a directory look like a package?ú __init__.py)rrÚisfilerU)rÚ _package_names  rrYz!PackageFinder._looks_like_package­s&€ôw‰w~‰~œbŸg™gŸl™l¨4°Ó?Ó@Ð@rNrK)rrrfr/r0r2)    r3r4r5r6r:rMr>Ú staticmethodrYr7rrrOrO„sW„ñð2€Nàð!Øð!Ø&-ð!Ø8?ð!à    ò!óð!ðBòAóñArrOcó—eZdZedd„«Zy)ÚPEP420PackageFindercó—y)NTr7)Ú_pathrfs  rrYz'PEP420PackageFinder._looks_like_package´s€àrN)rkrrfr/r0r2)r3r4r5rgrYr7rrriri³s„ØòóñrricóB—eZdZdZe                                dd„«Zee«Zy)Ú ModuleFinderzYFind isolated Python modules.
    This function will **not** recurse subdirectories.
    c#ó6K—ttjj|d««D]i}tjj    tjj |««\}}|j |«sŒT||«sŒ]||«rŒf|–—Œky­w)Nz*.py)r    rrrUÚsplitextrÚ_looks_like_module)r@rArBrCÚfileÚmoduleÚ_exts       rr>zModuleFinder._find_iter¾suèø€ôœŸ™Ÿ™ e¨VÓ4Ó5ò    ˆDÜŸ7™7×+Ñ+¬B¯G©G×,<Ñ,<¸TÓ,BÓC‰LˆFDà×)Ñ)¨&Ô1Øáv¡w¨v¥Ø“ ñ    ùs‚BB    BÂBNrK)    r3r4r5r6rMr>rgrrpr7rrrmrm¹sH„ñðð
Øð
Ø&-ð
Ø8?ð
à    ò
óð
ñ& kÓ2ÑrrmcóN—eZdZdZeed„eD«««Z    edd„«Zy)ÚFlatLayoutPackageFinder)#ÚciÚbinÚdebianÚdocÚdocsÚ documentationÚmanpagesÚnewsÚ newsfragmentsÚ    changelogÚtestÚtestsÚ    unit_testÚ
unit_testsÚexampleÚexamplesÚscriptsÚtoolsÚutilÚutilsÚpythonÚbuildÚdistÚvenvÚenvÚ requirementsÚtasksÚfabfileÚ
site_sconsÚ    benchmarkÚ
benchmarksÚexerciseÚ    exercisesÚhtmlcovú[._]*c#ó*K—|] }||›df–—Œ y­w)rSNr7)r&Úps  rr)z!FlatLayoutPackageFinder.<genexpr>üsèø€Ò&G¸¨¨a¨S°¨8¤}Ñ&Gùs‚có¨—|jd«}|dj«xs|djd«}|xrtd„|ddD««S)NrGrú-stubsc3ó<K—|]}|j«–—Œy­wr)r)r&Únames  rr)z>FlatLayoutPackageFinder._looks_like_package.<locals>.<genexpr>sèø€Ò(SÀ¨×):Ñ):×)<Ñ(Sùs‚r )ÚsplitrÚendswithÚall)rkÚ package_nameÚnamesÚroot_pkg_is_valids    rrYz+FlatLayoutPackageFinder._looks_like_packageÿsU€à×"Ñ" 3Ó'ˆà! !™H×1Ñ1Ó3ÒR°u¸Q±x×7HÑ7HÈÓ7RÐØ ÒS¤SÑ(SÈÈqÈrÈÔ(SÓ%SÐSrN)rkrr¢r/r0r2)    r3r4r5Ú_EXCLUDEÚtupleÚ
chain_iterr;rgrYr7rrruruÒs8„ð'€HñR™JÑ&G¸hÔ&GÓGÓH€OØ àòTóñTrrucó—eZdZdZy)ÚFlatLayoutModuleFinder)ÚsetupÚconftestr€rr„r…r‹ÚtoxfileÚnoxfileÚpavementÚdodorr‘z[Ss][Cc]onstructÚ    conanfileÚmanager“r”r•r–r˜N)r3r4r5r;r7rrr©r©s„ð€Oð4*rr©có€—tj|«}|g|Dcgc]}dj||f«‘Œc}zScc}w)NrG)rirDrU)Úroot_pkgÚpkg_dirÚnestedÚns    rÚ_find_packages_withinr·%s:€Ü  × %Ñ % gÓ .€FØ ˆ:¸&ÖA°Q˜Ÿ™ 8¨Q -Õ0ÒAÑ AÐAùÒAsœ;có¶—eZdZdZdd„Zd„Zd„Zedd„«Zedd„«Z        d                    dd„Z
dd„Z dd    „Z dd
„Z dd „Zdd „Zdd „Zdd„Zdd„Zdd„Zdd„Zdd„Zy)ÚConfigDiscoveryz…Fill-in metadata and options that can be automatically derived
    (from other metadata/options, the file system or conventions)
    có<—||_d|_d|_d|_y)NF)rŒÚ_calledÚ    _disabledÚ_skip_ext_modules)r!Ú distributions  rr#zConfigDiscovery.__init__/s€Ø ˆŒ    ØˆŒ ؈ŒØ!&ˆÕrcó—d|_y)z+Internal API to disable automatic discoveryTN)r¼©r!s rÚ_disablezConfigDiscovery._disable5s    €àˆrcó—d|_y)aäInternal API to disregard ext_modules.
 
        Normally auto-discovery would not be triggered if ``ext_modules`` are set
        (this is done for backward compatibility with existing packages relying on
        ``setup.py`` or ``setup.cfg``). However, ``setuptools`` can call this function
        to ignore given ``ext_modules`` and proceed with the auto-discovery if
        ``packages`` and ``py_modules`` are not given (e.g. when using pyproject.toml
        metadata).
        TN)r½rÀs rÚ_ignore_ext_modulesz#ConfigDiscovery._ignore_ext_modules9s €ð"&ˆÕrcóR—|jjxstjSr)rŒÚsrc_rootrÚcurdirrÀs rÚ    _root_dirzConfigDiscovery._root_dirEs€ðy‰y×!Ñ!Ò.¤R§Y¡YÐ.rcó^—|jj€iS|jjSr)rŒÚ package_dirrÀs rÚ _package_dirzConfigDiscovery._package_dirJs'€à 9‰9×  Ñ  Ð (؈I؏y‰y×$Ñ$Ð$rcó’—|dur|js |jry|j|«|r|j«d|_y)a±Automatically discover missing configuration fields
        and modifies the given ``distribution`` object in-place.
 
        Note that by default this will only have an effect the first time the
        ``ConfigDiscovery`` object is called.
 
        To repeatedly invoke automatic discovery (e.g. when the project
        directory changes), please use ``force=True`` (or create a new
        ``ConfigDiscovery`` instance).
        FNT)r»r¼Ú_analyse_package_layoutÚ analyse_name)r!ÚforceržÚignore_ext_moduless    rr,zConfigDiscovery.__call__Ps?€ð E‰>˜tŸ|š|¨t¯~ª~à à ×$Ñ$Ð%7Ô8Ù Ø × Ñ Ô àˆ rcó(—|xs |j}|jjduxs| }|jjduxsL|jjduxs2|xs.t |jd«xr|jj S)zF``True`` if the user has specified some form of package/module listingNÚ configuration)r½rŒÚ ext_modulesÚpackagesÚ
py_modulesÚhasattrrÑ)r!rÏrÒs   rÚ_explicitly_specifiedz%ConfigDiscovery._explicitly_specifiedgs€à/ÒI°4×3IÑ3IÐØŸ9™9×0Ñ0°DÐ8ÒNÐ<NÐOˆ à I‰I× Ñ  dÐ *ò (؏y‰y×#Ñ#¨4Ð/ò (àò (ôt—y‘y /Ó2ò(Ø—    ‘    ×'Ñ'ð     
rcó¸—|j|«rytjd«|j«xs"|j    «xs|j «S)NTzLNo `packages` or `py_modules` configuration, performing automatic discovery.)rÖrÚdebugÚ_analyse_explicit_layoutÚ_analyse_src_layoutÚ_analyse_flat_layout)r!rÏs  rrÌz'ConfigDiscovery._analyse_package_layoutts^€Ø × %Ñ %Ð&8Ô 9ðä     ‰    ð #ô    
ð × )Ñ )Ó +ò +Ø×'Ñ'Ó)ò +ð×(Ñ(Ó*ð        
rcó|‡—|jj«}|jdd«|jŠ|syt    j
d|›«t ˆfd„|j«D««}t|«|j_
t    j
d|jj›«y)zAThe user can explicitly give a package layout via ``package_dir``ÚNFz(`explicit-layout` detected -- analysing c3óx•K—|]1\}}t|tjj‰|««–—Œ3y­wr)r·rrrU)r&ÚpkgÚ
parent_dirÚroot_dirs   €rr)z;ConfigDiscovery._analyse_explicit_layout.<locals>.<genexpr>s3øèø€ò
ᐐZô " #¤r§w¡w§|¡|°H¸jÓ'I× Jñ
ùsƒ7:údiscovered packages -- T) rÊÚcopyÚpoprÇrrØr§Úitemsr=rŒrÓ)r!rÉÚpkgsrás   @rrÙz(ConfigDiscovery._analyse_explicit_layout†sœø€à×'Ñ'×,Ñ,Ó.ˆ ؏‰˜˜DÔ!Ø—>‘>ˆáØä     ‰    Ð<¸[¸MÐJÔKÜó
à#.×#4Ñ#4Ó#6ô
ó
ˆô" $›Zˆ    ‰    ÔÜ     ‰    Ð+¨D¯I©I×,>Ñ,>Ð+?Ð@ÔAØrcóÀ—|j}tjj|j|j dd««}tjj |«sytjd|›«|jdtjj|««||j_ tj|«|j_t j|«|j_tjd|jj›«tjd|jj"›«y)a®Try to find all packages or modules under the ``src`` directory
        (or anything pointed by ``package_dir[""]``).
 
        The "src-layout" is relatively safe for automatic discovery.
        We assume that everything within is meant to be included in the
        distribution.
 
        If ``package_dir[""]`` is not given, but the ``src`` directory exists,
        this function will set ``package_dir[""] = "src"``.
        rÝÚsrcFz#`src-layout` detected -- analysing râúdiscovered py_modules -- T)rÊrrrUrÇÚgetÚisdirrrØÚ
setdefaultrrŒrÉrirDrÓrmrÔ)r!rÉÚsrc_dirs   rrÚz#ConfigDiscovery._analyse_src_layout˜só€ð×'Ñ'ˆ Ü—'‘'—,‘,˜tŸ~™~¨{¯©¸rÀ5Ó/IÓJˆÜw‰w}‰}˜WÔ%Øä     ‰    Ð7¸°yÐAÔBØ×јr¤2§7¡7×#3Ñ#3°GÓ#<Ô=Ø +ˆ    ‰    ÔÜ0×5Ñ5°gÓ>ˆ    ‰    ÔÜ+×0Ñ0°Ó9ˆ    ‰    ÔÜ     ‰    Ð+¨D¯I©I×,>Ñ,>Ð+?Ð@ÔAÜ     ‰    Ð-¨d¯i©i×.BÑ.BÐ-CÐDÔEØrcóŠ—tjd|j›«|j«xs|j    «S)aÆTry to find all packages and modules under the project root.
 
        Since the ``flat-layout`` is more dangerous in terms of accidentally including
        extra files/directories, this function is more conservative and will raise an
        error if multiple packages or modules are found.
 
        This assumes that multi-package dists are uncommon and refuse to support that
        use case in order to be able to prevent unintended errors.
        z$`flat-layout` detected -- analysing )rrØrÇÚ_analyse_flat_packagesÚ_analyse_flat_modulesrÀs rrÛz$ConfigDiscovery._analyse_flat_layout±s:€ô         ‰    Ð8¸¿¹Ð8HÐIÔJØ×*Ñ*Ó,ÒL°×0JÑ0JÓ0LÐLrcó@—tj|j«|j_t t |jj««}tjd|jj›«|j|d«t|«S)NrârÓ) rurDrÇrŒrÓÚremove_nested_packagesÚ remove_stubsrrØÚ_ensure_no_accidental_inclusionr2)r!Ú    top_levels  rrïz&ConfigDiscovery._analyse_flat_packages¾so€Ü4×9Ñ9¸$¿.¹.ÓIˆ    ‰    ÔÜ*¬<¸¿    ¹    ×8JÑ8JÓ+KÓLˆ    Ü     ‰    Ð+¨D¯I©I×,>Ñ,>Ð+?Ð@ÔAØ ×,Ñ,¨Y¸
ÔCܐI‹Ðrcó@—tj|j«|j_t j d|jj›«|j|jjd«t|jj«S)NréÚmodules)    r©rDrÇrŒrÔrrØrôr2rÀs rrðz%ConfigDiscovery._analyse_flat_modulesÅsk€Ü5×:Ñ:¸4¿>¹>ÓJˆ    ‰    ÔÜ     ‰    Ð-¨d¯i©i×.BÑ.BÐ-CÐDÔEØ ×,Ñ,¨T¯Y©Y×-AÑ-AÀ9ÔMܐD—I‘I×(Ñ(Ó)Ð)rcól—t|«dkDr&ddlm}ddlm}d|›d|›d|›d}|||««‚y)    Nr r)Úcleandoc)ÚPackageDiscoveryErrorzMultiple top-level z discovered in a flat-layout: zÕ.
 
            To avoid accidental inclusion of unwanted files or directories,
            setuptools will not proceed with this build.
 
            If you are trying to create a single distribution with multiple a¥
            on purpose, you should not rely on automatic discovery.
            Instead, consider the following options:
 
            1. set up custom discovery (`find` directive with `include` or `exclude`)
            2. use a `src-layout`
            3. explicitly set `py_modules` or `packages` with a list of names
 
            To find more information, look for "package discovery" on setuptools docs.
            )ÚlenÚinspectrùÚsetuptools.errorsrú)r!ÚdetectedÚkindrùrúÚmsgs      rrôz/ConfigDiscovery._ensure_no_accidental_inclusionËsU€Ü ˆx‹=˜1Ò Ý (å ?à)¨$¨Ð/MÈhÈZðXMð
NRÈFð    S ð ˆCñ(©°« Ó6Ð 6ð) rcó—|jjjs|jjrytjd«|j «xs|j «}|r||jj_yy)z”The packages/modules are the essential contribution of the author.
        Therefore the name of the distribution can be derived from them.
        Nz7No `name` configuration, performing automatic discovery)rŒÚmetadataržrrØÚ#_find_name_single_package_or_moduleÚ_find_name_from_packages)r!ržs  rrÍzConfigDiscovery.analyse_nameâsq€ð 9‰9× Ñ × "Ò " d§i¡i§n¢nà ä     ‰    ÐKÔLð × 4Ñ 4Ó 6ò /Ø×,Ñ,Ó.ð     ñ Ø&*ˆDI‰I× Ñ Õ #ð rcó®—dD]P}t|j|d«xsg}|sŒ!t|«dk(sŒ0tjd|d›«|dcSy)zExactly one module or package)rÓrÔNr z&Single module/package detected, name: r)ÚgetattrrŒrûrrØ)r!Úfieldrås   rrz3ConfigDiscovery._find_name_single_package_or_moduleós[€à/ò     ˆEܘDŸI™I u¨dÓ3Ò9°rˆEÚœ˜U› q›Ü—    ‘    ÐBÀ5ÈÁ8À*ÐMÔNؘQ‘x’ð         ð rcóR—|jjsytt|jjt¬««}|jj
xsi}t |||j«}|rtjd|›«|Stjd«y)z<Try to find the root package that is not a PEP 420 namespaceN©Úkeyz&Common parent package detected, name: z7No parent package detected, impossible to derive `name`) rŒrÓróÚsortedrûrÉÚfind_parent_packagerÇrrØÚwarn)r!rÓrÉÚ
parent_pkgs    rrz(ConfigDiscovery._find_name_from_packagesýs€€ày‰y×!Ò!Øä¤ t§y¡y×'9Ñ'9¼sÔ CÓDˆØ—i‘i×+Ñ+Ò1¨rˆ ä(¨°;ÀÇÁÓOˆ
Ù Ü I‰IÐ>¸z¸lÐKÔ LØÐ ä ‰ÐJÔKØrN)r¾rr0r1)r0r)r0údict[str, str])FTF)rÎr2ržr2rÏr2)rÏr2r0r2)r0r2)rþrJrÿr/)r0r1)r0ú
str | None)r3r4r5r6r#rÁrÃÚpropertyrÇrÊr,rÖrÌrÙrÚrÛrïrðrôrÍrrr7rrr¹r¹*sš„ñó'ò ò
&ðò/óð/ðò%óð%ð RWðØðØ)-ðØJNóó. 
ó
ó$ó$ó2 Móó*ó 7ó.+ó"ôrr¹cóڇ—t|t¬«}|dd}t|«}tt|««D]1\}Št    ˆfd„|D««sŒ|j ||z
dz
«Œ3|S)zéRemove nested packages from a list of packages.
 
    >>> remove_nested_packages(["a", "a.b1", "a.b2", "a.b1.c1"])
    ['a']
    >>> remove_nested_packages(["a", "b", "c.d", "c.d.e.f", "g.h", "a.a1"])
    ['a', 'b', 'c.d', 'g.h']
    r    Nc3óF•K—|]}‰j|›d«–—Œy­w©rGN©Ú
startswith)r&Úotherržs  €rr)z)remove_nested_packages.<locals>.<genexpr>s øèø€ÒC°ˆt‰ % ¨˜{×+ÑCùóƒ!r )r rûÚ    enumerateÚreversedr*rä)rÓrærõÚsizeÚiržs     @rròròsiø€ô (¤Ô $€DØ‘Q€IÜ ˆt‹9€DÜœX d›^Ó,ò(‰ˆˆ4Ü ÓC¸ÔCÕ CØ M‰M˜$ ™( Q™,Õ 'ð(ð Ðrcót—|Dcgc](}|jd«djd«rŒ'|‘Œ*c}Scc}w)z Remove type stubs (:pep:`561`) from a list of packages.
 
    >>> remove_stubs(["a", "a.b", "a-stubs", "a-stubs.b.c", "b", "c-stubs"])
    ['a', 'a.b', 'b']
    rGrrœ)rŸr )rÓrßs  rróró s2€ð $Ö PC¨3¯9©9°S«>¸!Ñ+<×+EÑ+EÀhÕ+OŠCÒ PÐPùÒ Ps…(5®5cóZ‡—t|t¬«}g}t|«D]2\}Štˆfd„||dzdD««sn|j    ‰«Œ4|D]RŠt ‰||«}t jj|d«}t jj|«sŒP‰cSy)z0Find the parent package that is not a namespace.r    c3óF•K—|]}|j‰›d«–—Œy­wrr)r&r¶ržs  €rr)z&find_parent_package.<locals>.<genexpr>0s øèø€ÒG°1—<‘< 4 &¨ 
×+ÑGùrr Nrd)
r rûrr¡rZÚfind_package_pathrrrUre)rÓrÉráÚcommon_ancestorsrÚpkg_pathÚinitržs       @rr r )s¨ø€ôh¤CÔ(€HØÐܘXÓ&ò&‰ˆˆ4ÜÓG°X¸aÀ!¹e¸gÐ5FÔGÔGñ
Ø×Ñ Õ%ð&ð!òˆÜ$ T¨;¸ÓAˆÜw‰w|‰|˜H mÓ4ˆÜ 7‰7>‰>˜$Õ ØŠKð    ð rcól—|jd«}tt|«dd«D]E}dj|d|«}||vsŒ||}t    j
j||g||d¢­ŽcS|j d«xsd}t    j
j|g|jd«¢|¢­ŽS)a—Given a package name, return the path where it should be found on
    disk, considering the ``package_dir`` option.
 
    >>> path = find_package_path("my.pkg", {"": "root/is/nested"}, ".")
    >>> path.replace(os.sep, "/")
    './root/is/nested/my/pkg'
 
    >>> path = find_package_path("my.pkg", {"my": "root/is/nested"}, ".")
    >>> path.replace(os.sep, "/")
    './root/is/nested/pkg'
 
    >>> path = find_package_path("my.pkg", {"my.pkg": "root/is/nested"}, ".")
    >>> path.replace(os.sep, "/")
    './root/is/nested'
 
    >>> path = find_package_path("other.pkg", {"my.pkg": "root/is/nested"}, ".")
    >>> path.replace(os.sep, "/")
    './other/pkg'
    rGréÿÿÿÿNrÝú/)rŸÚrangerûrUrrrê)ržrÉráÚpartsrÚ partial_nameÚparents       rr r As®€ð, J‰Js‹O€EÜ ”3u“:˜q "Ó %ò>ˆà—x‘x  b q     Ó*ˆ Ø ˜;Ò &Ø  Ñ.ˆFÜ—7‘7—<‘< ¨&Ð=°5¸¸°9Ò=Ò =ð >ð_‰_˜RÓ  Ò & B€FÜ 7‰7<‰<˜Ð = 6§<¡<°Ó#4Ð =°uÒ =Ð=rc
ó²—t|«}t|«j}|Dcic]'}|djg|¢|j    d«¢«“Œ)c}Scc}w)Nr&rG)ròr
r(rUrŸ)rÓÚ package_pathÚ parent_pkgsÚprefixrßs     rÚconstruct_package_dirr/csQ€Ü(¨Ó2€KÜ ,Ó × %Ñ %€FØALÖ M¸#ˆC—‘Ð4˜FÐ4 S§Y¡Y¨s£^Ð4Ó5Ñ 5Ò MÐMùÒ Ms¥,A)rrr0r2)r³r/r´rr0rJ)rÓrJr0rJ)rÓrJrÉúMapping[str, str]rárr0r)ržr/rÉr0rárr0r/)rÓrJr,rr0r)-r6Ú
__future__rÚ    itertoolsrÚcollections.abcrrrÚfnmatchrr    Úpathlibr
Útypingr r Ú_distutils_hack.overrideÚ_distutils_hackrkrÚ    distutilsrÚdistutils.utilrÚ
setuptoolsrÚchainÚ from_iterabler§rrr9rOrirmrur©r·r¹ròrór r r/r7rrú<module>r>sðñ%õN#ãÛ    ß7Ñ7ÝÝÝß*ãååÝ'áÝ'à _‰_× *Ñ *€
ó1÷
&ñ &÷ -"ñ-"ô`,AGô,Aô^˜-ôô 37ô3ô22TÐ1ô2Tôj*˜\ô*ó<B÷
añaóHó$QðØðØ&7ðØCJðàóð0>Ø
ð>Ø-ð>Ø9@ð>àó>ôDNr