hf ddlZddlmZmZmZmZmZddlmZm Z ddl m Z m Z eedee effZedeZGdd eZGd d eZejd Zejd ZdedefdZdddee efdedefdZdedeee eeeffdZdedeee ffdZdS)N) FrozenSetNewTypeTupleUnioncast)Tag parse_tag)InvalidVersionVersionNormalizedNameceZdZdZdS)InvalidWheelFilenamezM An invalid wheel filename was found, users should refer to PEP 427. N__name__ __module__ __qualname____doc__r o/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/packaging/utils.pyrrrrceZdZdZdS)InvalidSdistFilenamez^ An invalid sdist filename was found, users should refer to the packaging user guide. Nrr rrrrrrrz[-_.]+z (\d+)(.*)namereturnctd|}tt|S)N-)_canonicalize_regexsublowerrr)rvalues rcanonicalize_namer# s3  # #C . . 4 4 6 6E  & &&rT)strip_trailing_zeroversionr$ct|tr# t|}n#t$r|cYSwxYw|}g}|jdkr||jddd|jD}|rtj dd|}|||j 7|dd|j D|j |d |j |j |d |j |j |d |j d|S) z This is very similar to Version.__str__, but has one subtle difference with the way it handles the release segment. r!.c34K|]}t|VdSNstr.0xs r z'canonicalize_version..=s(>>!s1vv>>>>>>rz(\.0)+$Nc34K|]}t|VdSr*r+r-s rr0z'canonicalize_version..Es(88SVV888888rz.postz.dev+) isinstancer,r r epochappendjoinreleaserer prepostdevlocal)r%r$parsedpartsrelease_segments rcanonicalize_versionrA&s'3 W%%FF   NNN  E|q  '''(((hh>>v~>>>>>OB&RAA LL!!!z RWW88VZ88888999{ *V[**+++z (FJ(()))| '''((( 775>>s ' 66filenamec|dstd||dd}|d}|dvrtd||d|dz }|d}d |vs t jd |tjtd |t|}t|d }|d kr|d}t|}|td|d|dttt| d | df}nd}t|d} |||| fS)Nz.whlz3Invalid wheel filename (extension must be '.whl'): r)z0Invalid wheel filename (wrong number of parts): r__z ^[\w\d._]*$zInvalid project name: rrFzInvalid build number: z in ''r )endswithrcountsplitr9matchUNICODEr#r _build_tag_regexrBuildTagintgroupr ) rBdashesr? name_partrr% build_part build_matchbuildtagss rparse_wheel_filenamerZVs   V $ $ " L( L L   }H ^^C F V" Ix I I    NN3 + +EaI yBH^Y KKS"#FH#F#FGGG Y ' 'DeAhG {{1X &,,Z88  &EEE(EEE XK$5$5a$8$8 9 9;;L;LQ;O;OPQQ U2Y  D '5$ ''rc||dr|dtd }n@|dr|dtd }ntd||d\}}}|std|t |}t |}||fS)Nz.tar.gzz.zipz@Invalid sdist filename (extension must be '.tar.gz' or '.zip'): rzInvalid sdist filename: )rKlenr rpartitionr#r )rB file_stemrUsep version_partrr%s rparse_sdist_filenamerazs## .I./   6 " " ^F |^, "      $-#7#7#<#< IsL J"#Hh#H#HIII Y ' 'Dl##G '?r)r9typingrrrrrrYr r r%r r rRr,rQr ValueErrorrrcompilerrPr#boolrArZrar rrrfs  99999999999999 ,,,,,,,, rE#s(O+ ,)3//: : !bj++2:l++'C'N''''BF--- 7C< -:>-----`!(!( >7Hin <=!(!(!(!(H351H+Ir