PK{5Z[Scripts/activatenuW+A# This file must be used with "source bin/activate" *from bash* # you cannot run it directly deactivate () { # reset old environment variables if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then PATH="${_OLD_VIRTUAL_PATH:-}" export PATH unset _OLD_VIRTUAL_PATH fi if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" export PYTHONHOME unset _OLD_VIRTUAL_PYTHONHOME fi # This should detect bash and zsh, which have a hash command that must # be called to get it to forget past commands. Without forgetting # past commands the $PATH changes we made may not be respected if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then hash -r 2> /dev/null fi if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then PS1="${_OLD_VIRTUAL_PS1:-}" export PS1 unset _OLD_VIRTUAL_PS1 fi unset VIRTUAL_ENV unset VIRTUAL_ENV_PROMPT if [ ! "${1:-}" = "nondestructive" ] ; then # Self destruct! unset -f deactivate fi } # unset irrelevant variables deactivate nondestructive VIRTUAL_ENV="E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv" export VIRTUAL_ENV _OLD_VIRTUAL_PATH="$PATH" PATH="$VIRTUAL_ENV/Scripts:$PATH" export PATH # unset PYTHONHOME if set # this will fail if PYTHONHOME is set to the empty string (which is bad anyway) # could use `if (set -u; : $PYTHONHOME) ;` in bash if [ -n "${PYTHONHOME:-}" ] ; then _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" unset PYTHONHOME fi if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then _OLD_VIRTUAL_PS1="${PS1:-}" PS1="(venv) ${PS1:-}" export PS1 VIRTUAL_ENV_PROMPT="(venv) " export VIRTUAL_ENV_PROMPT fi # This should detect bash and zsh, which have a hash command that must # be called to get it to forget past commands. Without forgetting # past commands the $PATH changes we made may not be respected if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then hash -r 2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H H? ËH [H(?H(LcA><<!==!=[]operator->*++---+&->*/%<<=>>=,()~^|&&||*=+=-=/=%=>>=<<=&=|=^=`vftable'`vbtable'`vcall'`typeof'`local static guard'`string'`vbase destructor'`vector deleting destructor'`default constructor closure'`scalar deleting destructor'`vector constructor iterator'`vector destructor iterator'`vector vbase constructor iterator'`virtual displacement map'`eh vector constructor iterator'`eh vector destructor iterator'`eh vector vbase constructor iterator'`copy constructor closure'`udt returning'`EH`RTTI`local vftable'`local vftable constructor closure' new[] delete[]`omni callsig'`placement delete closure'`placement delete[] closure'`managed vector constructor iterator'`managed vector destructor iterator'`eh vector copy constructor iterator'`eh vector vbase copy constructor iterator'`dynamic initializer for '`dynamic atexit destructor for '`vector copy constructor iterator'`vector vbase copy constructor iterator'`managed vector copy constructor iterator'`local static thread guard'operator "" operator co_awaitoperator<=> Type Descriptor' Base Class Descriptor at ( Base Class Array' Class Hierarchy Descriptor' Complete Object Locator'`anonymous namespace'@ @`@api-ms-win-core-fibers-l1-1-1api-ms-win-core-synch-l1-2-0kernel32api-ms-FlsAllocFlsFreeFlsGetValueFlsSetValueInitializeCriticalSectionEx) c@U@4\@Unknown exceptionc@U@4\@bad exception"s ",s8s0mscoree.dllCorExitProcess(null)(null)   "<{ "D|P|(@D@4@X@<@@@@T@a@,a@@ @H@d@@P@x@I@(@@@(@,@@$@        ! 5A CPR S WY l m pr  )   Y* @@@@@@@@@@@@@@@@INFinfNANnanNAN(SNAN)nan(snan)NAN(IND)nan(ind)e+000@@@@@@@@@@@(@4@@@L@P@T@X@\@`@d@h@l@p@t@x@@@@@\@@@@@@@@@@@@(@8@@@H@P@X@`@h@p@@@@@@@@@@@@ @(@0@8@@@H@P@X@h@@@@@@@@@@@$@,@8@P@x@@SunMonTueWedThuFriSatSundayMondayTuesdayWednesdayThursdayFridaySaturdayJanFebMarAprMayJunJulAugSepOctNovDecJanuaryFebruaryMarchAprilJuneJulyAugustSeptemberOctoberNovemberDecemberAMPMMM/dd/yydddd, MMMM dd, yyyyHH:mm:ssSunMonTueWedThuFriSatSundayMondayTuesdayWednesdayThursdayFridaySaturdayJanFebMarAprMayJunJulAugSepOctNovDecJanuaryFebruaryMarchAprilJuneJulyAugustSeptemberOctoberNovemberDecemberAMPMMM/dd/yydddd, MMMM dd, yyyyHH:mm:ssen-USP@@@@P@@@ @@@@@@P@@@P@`@h@@@@api-ms-win-core-datetime-l1-1-1api-ms-win-core-file-l1-2-4api-ms-win-core-file-l1-2-2api-ms-win-core-localization-l1-2-1api-ms-win-core-localization-obsolete-l1-2-0api-ms-win-core-processthreads-l1-1-2api-ms-win-core-string-l1-1-0api-ms-win-core-sysinfo-l1-2-1api-ms-win-core-winrt-l1-1-0api-ms-win-core-xstate-l2-1-0api-ms-win-rtcore-ntuser-window-l1-1-0api-ms-win-security-systemfunctions-l1-1-0ext-ms-win-ntuser-dialogbox-l1-1-0ext-ms-win-ntuser-windowstation-l1-1-0advapi32kernelbasentdllapi-ms-win-appmodel-runtime-l1-1-2user32ext-ms-CompareStringExLCMapStringExLocaleNameToLCIDAppPolicyGetProcessTerminationMethod ((((( H   !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~ ((((( H ( 0"@ccsUTF-8UTF-16LEUNICODE@@(@8@ja-JPzh-CNko-KRzh-TWuk Tc-^k@tFМ, a\)cd4҇f;lDِe,BbE"&'O@V$gmsmrd'c%{pk>_nj f29.EZ%qVJ.C|!@Ί Ą' |Ô%I@T̿aYܫ\ DgR)`*! VG6K]_܀ @َЀk#cd8L2WBJa"=UD~ $s%rс@b;zO]3AOmm!3VV%(w;I-G 8NhU]i<$qE}A'JnWb쪉"f37>,ެdNj5jVg@;*xh2kůid&_U JW {,Ji)Ǫv6 UړǚK%v t:H孎cY˗i&>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#@4#@ 4#@ 4#@8#@ 8#@<#@ <$@@$@ @($@ D8$@ HH$@ LX$@ Ph$@|x$@|$@arbgcazh-CHScsdadeelenesfifrhehuisitjakonlnoplptroruhrsksqsvthtruridbesletlvltfavihyazeumkafkafohimskkkyswuzttpagutateknmrsamnglkoksyrdivar-SAbg-BGca-EScs-CZda-DKde-DEel-GRfi-FIfr-FRhe-ILhu-HUis-ISit-ITnl-NLnb-NOpl-PLpt-BRro-ROru-RUhr-HRsk-SKsq-ALsv-SEth-THtr-TRur-PKid-IDuk-UAbe-BYsl-SIet-EElv-LVlt-LTfa-IRvi-VNhy-AMaz-AZ-Latneu-ESmk-MKtn-ZAxh-ZAzu-ZAaf-ZAka-GEfo-FOhi-INmt-MTse-NOms-MYkk-KZky-KGsw-KEuz-UZ-Latntt-RUbn-INpa-INgu-INta-INte-INkn-INml-INmr-INsa-INmn-MNcy-GBgl-ESkok-INsyr-SYdiv-MVquz-BOns-ZAmi-NZar-IQde-CHen-GBes-MXfr-BEit-CHnl-BEnn-NOpt-PTsr-SP-Latnsv-FIaz-AZ-Cyrlse-SEms-BNuz-UZ-Cyrlquz-ECar-EGzh-HKde-ATen-AUes-ESfr-CAsr-SP-Cyrlse-FIquz-PEar-LYzh-SGde-LUen-CAes-GTfr-CHhr-BAsmj-NOar-DZzh-MOde-LIen-NZes-CRfr-LUbs-BA-Latnsmj-SEar-MAen-IEes-PAfr-MCsr-BA-Latnsma-NOar-TNen-ZAes-DOsr-BA-Cyrlsma-SEar-OMen-JMes-VEsms-FIar-YEen-CBes-COsmn-FIar-SYen-BZes-PEar-JOen-TTes-ARar-LBen-ZWes-ECar-KWen-PHes-CLar-AEes-UYar-BHes-PYar-QAes-BOes-SVes-HNes-NIes-PRzh-CHTsrp\@B@,2@q@2@2@3@3@ 3@03@@3@P3@`3@p3@3@3@3@C3@3@3@@)3@3@k@!4@c@ 4@D04@}@4@@X4@E@h4@Gx4@@4@H@4@4@4@I4@4@@A4@@4@J@5@5@(5@85@H5@X5@h5@x5@5@5@5@K5@5@@ 5@5@5@6@6@(6@86@H6@X6@h6@x6@6@6@6@6@6@6@6@6@@#7@e@*7@l@&(7@h@ 87@L@.H7@s@ X7@h7@x7@7@M7@7@p@>7@8@77@@ 7@N@/7@tH@7@8@Z@ 8@O@((8@j@88@a@H8@P@X8@h8@Q@x8@R@-8@r@18@xP@:8@@x@?8@8@S@28@y@%8@g@$8@f9@@+9@m(9@h@=89@X@;H9@@0X9@h9@wx9@u9@U@9@9@T9@ @9@0@69@~(@9@V0@9@W:@:@(:@8:@8@H:@X@@X:@Y`@<h:@x:@:@v:@P@:@[@":@d:@:@:@:@;@;@X@(;@\$@8;@P;@h;@;@`@;@;@]@3;@z@@;@@@8;@H@9;@h@;@^<@np@<@_(@5(<@|D@ 8<@bx@H<@` @4X<@p<@{@'<@i<@o<@<@<@<@<@<@=@F=@paf-zaar-aear-bhar-dzar-egar-iqar-joar-kwar-lbar-lyar-maar-omar-qaar-saar-syar-tnar-yeaz-az-cyrlaz-az-latnbe-bybg-bgbn-inbs-ba-latnca-escs-czcy-gbda-dkde-atde-chde-dede-lide-ludiv-mvel-gren-auen-bzen-caen-cben-gben-ieen-jmen-nzen-phen-tten-usen-zaen-zwes-ares-boes-cles-coes-cres-does-eces-eses-gtes-hnes-mxes-nies-paes-pees-pres-pyes-sves-uyes-veet-eeeu-esfa-irfi-fifo-fofr-befr-cafr-chfr-frfr-lufr-mcgl-esgu-inhe-ilhi-inhr-bahr-hrhu-huhy-amid-idis-isit-chit-itja-jpka-gekk-kzkn-inkok-inko-krky-kglt-ltlv-lvmi-nzmk-mkml-inmn-mnmr-inms-bnms-mymt-mtnb-nonl-benl-nlnn-nons-zapa-inpl-plpt-brpt-ptquz-boquz-ecquz-pero-roru-rusa-inse-fise-nose-sesk-sksl-sisma-nosma-sesmj-nosmj-sesmn-fisms-fisq-alsr-ba-cyrlsr-ba-latnsr-sp-cyrlsr-sp-latnsv-fisv-sesw-kesyr-syta-inte-inth-thtn-z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 p `  4 Rp2 !d!4! p P(! !d !T !4!2p+  p`0P(dT42p t d T 4R t d T 4R t d T 4R t d T 4R t d T 4R t d T 4R42 p,aa2P42 p,"b,b2P t d T 4Rd T 4 Rpb+ dT4p(@d42 pd42 pd42 pd42 pT4 p `  4 Rp 4 p ` PdT42p4444 t d T 4R t d T 4R t d T 4R44 t dT4220d42 pt4 PdT42p  rP42 p, 2P4 p `,e;2P  4 2pt d 4 RX2Pt4 Pd 4R p4 R p,RP  4 2p2020 (!( ( tdT4y!y  t d 4R,oRP 4R p ` Pp0Pd42 p42 p,2P  4 2pd42 pdT42p4 R p`P20 td4BB b>x<0  4 2pBB42 p42 p d T 4 Rpd T 4Rp42 p  4 2pBB t4B20Bd 4Rp,2PBr P b><0p d T 42p d T 42p42 p,2P42 p,9C2PBBB2020BB20B202020bB. d4 p P(d T 4Rpd42 pd42 p  4 PBB2020  202020202020d 4  p t d T 4 R tdT 4  t d T 42 dT4p d T 42pdT 4 p tT 4 T4 rp` t d T 4RB4 p`P(@  4 2p20  20BBd42 p20d42 pd42 p  20  4 2p  P  rP42 p,2P42 p,1 G P2P42 p,y  j2P42 p,62P20,v2P  4 2p tdT4 t dT4220t20dT 4 pd42 pdT 4 p  4 2p20 d T 4 2p  4 Rp,52P20  b42 p,2Pt4 P  p`0P4R`,$V$RP3 %4" p`P- T4 p `(@- T4 p `(@1 T4 p `(`20''2Pd T42pdT 4 p t dT42t4 Pd42 p42 p,,,2P  d 4 2Ѐ,}442P 4 p ` P T4R p ` 4R p`Ptd42(td4P(p0 4bX p`P( dT 4 RpBB% T4r p `(8r0  4 2pd42 pHHK2P% %dS%4R%NpP+t4 P(p4 r p,5AB12P4pdT42p dT 4 Rp t d T 4RB t d 4 R,U{V}2Ptd42 t dT42dT42pd42pt d 4R,SFTd2P2 0  20T42`  4 2p- 5td43 P(XBdT42p  20  4 2p,__2P  4 2pdT42pBd42 p  4 2p  4 2p20,jbb2PB d4r p,Ydeee2P42 p,bb2Pd T 4RpdT42pd42 p+  p`0P( D p`P0!Cgi4!gi4Br0 T4 R pd42 pd42 p20d T42pd T42pB d T 42pdT 4 pt4 Pt4 P4R`JRPd T 4Rp  BB tdT 4 rb' 't!'d'4'P  4 p*rPT 4 R p `T42 p d T 4 Rp  4 2pd4 p- Utd4S P(XBBdT 4 pB  4 2p2020  4 2p20  htt d4r p`P0(0r0d T 4 rpBt4 P t d T 42 tdT 4 20 d 4 2 ,2P0d42 p& h  p`0P(0  hbBt d42P20 d 42 p,¸ɸɸ2PB20  4 2p,2P200B t dT42  4 2p4lU0HpxT8UЍޒĔt 8Rnґ2DZl|Ȓf.Jh|ȓޓ"6DTlДޔ(8J^lƕҕ2DVbr~ʖ֖ 0BRڐGetFileVersionInfoSizeWVerQueryValueWGetFileVersionInfoWVERSION.dllGetStartupInfoWSetConsoleCtrlHandler`SetInformationJobObjectlQueryInformationJobObjectCompareStringWGetCommandLineW2GetCurrentProcessGetStdHandle&AssignProcessToJobObjectGetModuleFileNameWFSetEnvironmentVariableWUGetEnvironmentVariableWaGetFileAttributesWADuplicateHandleMultiByteToWideCharFormatMessageW}GetLastErrorWaitForSingleObjectExCloseHandleCreateJobObjectACreateProcessWXGetExitCodeProcessKERNEL32.dllRtlCaptureContextRtlLookupFunctionEntryRtlVirtualUnwindUnhandledExceptionFilterSetUnhandledExceptionFilterTerminateProcessIsProcessorFeaturePresentpQueryPerformanceCounter3GetCurrentProcessId7GetCurrentThreadId GetSystemTimeAsFileTimeInitializeSListHeadIsDebuggerPresentGetModuleHandleWRtlUnwindExdSetLastErrorIEnterCriticalSectionLeaveCriticalSection#DeleteCriticalSectionInitializeCriticalSectionAndSpinCountTlsAllocTlsGetValueTlsSetValueTlsFreeFreeLibraryGetProcAddressLoadLibraryExWEEncodePointerRaiseExceptionRtlPcToFileHeaderxExitProcessGetModuleHandleExWKWriteFileGetCommandLineApHeapFreelHeapAllocjGetFileTypeFlsAllocFlsGetValueFlsSetValueFlsFreeLCMapStringWFlushFileBuffersGetConsoleOutputCPGetConsoleModeGetStringTypeWReadFileReadConsoleWFindCloseFindFirstFileExWFindNextFileWIsValidCodePageGetACPGetOEMCPGetCPInfo7WideCharToMultiByteSGetEnvironmentStringsWFreeEnvironmentStringsWSetStdHandleGetProcessHeaphGetFileSizeExUSetFilePointerExCreateFileWuHeapSizesHeapReAllocJWriteConsoleWBSetEndOfFile] f2-+    @Ȣ@Ȣ@Ȣ@Ȣ@Ȣ@`@@@ @`@ @C @ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`y!@~ڣ @ڣ AϢ[@~QQ^ _j21~@l@l@l@l@l@l@l@l@l@@p@p@p@p@p@p@p@..upythonX<@\X@`X@X@X@W@.?AVbad_exception@std@@W@.?AVexception@std@@W@.?AVtype_info@@Tk`k!k0VkVk ll$l'8l@DlU`l`ztlzlllll llll4mPm p<>N>oP>b>od>|>o|>>o>? p0?@?PpP?E\pEEhpEF|p(FcFpplFF`pFHqHIrIeJdrhJ=ODr@OYQ|r\QRqRT,rTUXq8UjUDqUU`qUVLqVWpWzXlq|XZpZZpZ[xq[\q`\\r\\r\]r]W]rX]]r] ^r^^r^^hs^_@s_y`s|``s``s`CarxaarabvbAbvDbcucdvdPewemwmo@voqv q)s0x,s5uXv8uAwvDwMyHxPyY{(v\{e}pvh}qxx}x=hx{w|?x@`xutsssuxH4yl(ylyxy(hy(yyqyypyp zTzzz|zlzzziz{ z zD{x{]`{`l{^{`zP{|X{${,{f{p{{,{,i{lP{Pu{{6{8{$||W|XX|(p|8{4|,|#|,<|D|}'}@u|x}0}Z8}p@}8D}TL} T} v}x}l}(}}\}d}@}}}}(}(}`} ~~5~8|~H~,~~~2~4J`~L1~4~\~\&@8S,T@ 8 Y \             X  h LpL  EHHjPlY\dddÙX0l(lXx14WԀX܀NLPx " H$ =!h@!""H#H#e$h$n'́p'''(Ԃ(++p,p,,<,-4-D.D./$/0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SSV .(,(( ( zda^^^^\XXVVVSS 00(,(( 4^^^\\XXXVVS 0./(((((( uʟ^^^^\\XXVZ 000.,((("(  !ʖa^^^\\XXd A0.,,(((("( tdaa^^^\X q~000.0.(((( hdaa^^^^ k900.,(0((((  hdaa^^^ <90000(((((  hhddd^i #############9000.0,((((   hhhddd ##############<000.,,((((( hhhhd s}GGGGGEEB@@@@8  q q ,(/(((( //,(,(((  /0@(((  00J(((  ######################90J,(((( ######################<0A,((((" {s o900//,((((( 7  I00/.0,((( ,l ͮk  pʢm   ############## ##############           :'&::&%%:':LL::LL:&::&%%?(0` >W>:m:AAACDCDDDSSSUUU]]]bbbeeeiiirrruuu~~~h/i0l2l2n4p5q6s8s8u9v=w;x>x;y<{>|>yzz@}@zH~H~@22jjςσЅІӎ&JBCDDEFHHHJLPRXWdmWۢMdƙaǜfȞhŸsǣuɣrãz˧yͨzϪ|:;=ADKFIMQRU[^Y\j^aemimsq|rtˮԳֵвַǮȯʱ̲ոտ©Ʈ̶ȪӬ˱ʹϸԽʰƔ\QQNNNNQfdWUSQQNNNRWQʗWWWUUSQNW\Vʍ\\WWUUSQ\]Nʍ_^\WWUUUQ]dNNʎ__^\WWWURRQNNʎc___^\ v.ecc__^^\\WWWUQQQQ\ rFhcc_c^^\W\WUURQQNNQ hdee_c__^\WWUUSQQNN  y&#hhehe_c__^\\WWUUSQQR jB&#Iheeehhcc__^^\WWUUSQQ p55###ehehchccc_^^\WWWUUS t55#&&:c^^^\WWUU r4505##?~~~~~{{~_^^\WWU p745##&&$i__^\WW D4444&&>c___^\ y74445#&#ccc___ 9944&4&&hcc_c '''''''''(x98445&&&#hhecc oÄC94445&#hhh  u¶< J5&5&p J4=H5#p L75#p ''''''''''''''''y7&5##%l 9@H45###  ʉD744000|>zzG{B}@|J~@33KKІшӌ$֕4BCDEFJHIJQYmWŚcɞgœl¡w;<AEKGIMQWRUY\ip^aeimrtpzyrʬɬټ׼׽ūƬȭμͱѹӻdG525Gd_55432?@_>=;543{|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qh^TJeeeBBBBBBBBBBBBJE~@e攖tЍslbXeeeBBBBBBBBBBBBNID}@w;q7ZsofpeeeBBB333333SRCLĻHD|?w;q6yݬreeeBBBBBBBBBBBBBBBBBBLĺHC|>v:eS=eeeeeeBBB3333333333tjFzLGBp?BBBeeeeeeBBBBBBBBBBBBBBBBBBBBBWODhYEfWCBBBBBBeeeeeeBBB333333BBBBBBBBBBBBBBBBBBBBBBBBeeeeeeBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBeeezzzzzzzzzzzzzzzzzzzzzzzzzzzz =@@(00 h 0@@ (B00 %     h Python Launcher for Windows Version %s usage: %s [launcher-args] [python-args] [script [script-args]] Launcher arguments: -2 : Launch the latest Python 2.x version -3 : Launch the latest Python 3.x version -X.Y : Launch the specified Python version The above default to an architecture native runtime, but will select any available. Add a "-32" to the argument to only launch 32-bit runtimes, or add "-64" to omit 32-bit runtimes (this latter option is deprecated). To select a specific runtime, use the -V: options. -V:TAG : Launch a Python runtime with the specified tag -V:COMPANY/TAG : Launch a Python runtime from the specified company and with the specified tag -0 --list : List the available pythons -0p --list-paths : List with paths If no options are given but a script is specified, the script is checked for a shebang line. Otherwise, an active virtual environment or global default will be selected. See https://docs.python.org/using/windows.html#python-launcher-for-windows for additional configuration. The following help text is from Python: 4VS_VERSION_INFO 6 6?StringFileInfo000004b0VCompanyNamePython Software Foundation6FileDescriptionPython.FileVersion3.11.4@InternalNamePython Launcher0LegalCopyrightCopyright 2001-2023 Python Software Foundation. Copyright 2000 BeOpen.com. Copyright 1995-2001 CNRI. Copyright 1991-1995 SMC.6OriginalFilenamepy.exe.ProductNamePython2ProductVersion3.11.4DVarFileInfo$Translation 0HPX`hpȣ 0@P`pФ 0@P`pХ 0@P`pЦ 0@P`pЧ 0@P`pШ 0@P`pЩ 0@P`pЪȡСءأЧ (8@HPX`hpȨ@HPX`hpx (08@HPX`hpxȫЫث (08@HPX`hpȬЬج (08@HPX`hpxȭЭح8ȡСء (08@HXhxȪت(8HXhxȫث(8HXhxȬج(8HXhxȭح(8HXhxȮخ(8HXhxȯد(8HXhxȠؠ(8HXhxȡء(8HXhxȢآ(8HXhxȣأ(8HXhxȤؤ(8HXhxȥإ(8HXhxȦئ(8HXhxȧا(8HXhx xФ 0@P`pХ 0@P`pЦ 0@P`pЧ 0@P`pШ 0@P`pЩ 0@P`pЪ 0@P`pЫ 0@P`pЬ 0@P`pЭ 0@P`pЮ 0@P`pЯ0d 0@P`pР 0@P`pС 0@P`pP `08آX`ȡ(Xpx`hpxȩЩة@PX`hxȪ/0/ *H .0.10  `He0\ +7N0L0 +70 010  `He \VlBD!XVn%nY)ɰŠ00xW!29wu\0  *H  0b1 0 UUS10U  DigiCert Inc10U www.digicert.com1!0UDigiCert Trusted Root G40 130801120000Z 380115120000Z0b1 0 UUS10U  DigiCert Inc10U www.digicert.com1!0UDigiCert Trusted Root G40"0  *H 0 sh޻]J<0"0i3§%.!=Y)=Xvͮ{ 08VƗmy_pUA2s*n|!LԼu]xf:1D3@ZI橠gݤ'O9X$\Fdivv=Y]BvizHftKc:=E%D+~am3K}Ï!Ռp,A`cDvb~d3щίCw !T)%lRQGt&Auz_?ɼA[P1r" |Lu?c!_ QkoOE_ ~ &i/-٩B0@0U00U0Uq]dL.g?纘O0  *H  a}lđádhVwpJx\ _)V 6I]Dcଡ଼f# =ymkTY9"SD]Pz}b! sfѠ`_襴m5|Z֢8xM Gr 20Y.qVjoPmhz6z$ Pz#aB)͢ Aќd&LPAq=?Mp# J܁2  Ok t094!U2qI(PMMuACDO,6E#SlogUFL?n(Zy&ҤbJGJ gf~[A;;cTQ*xίI󒙶a҅POBl C:qM&5]b2Ҡ+TWJ'S趉m[h#QV𦀠Su)wތ!G=uf~00@`ҜL^ͩ0  *H  0b1 0 UUS10U  DigiCert Inc10U www.digicert.com1!0UDigiCert Trusted Root G40 210429000000Z 360428235959Z0i1 0 UUS10U DigiCert, Inc.1A0?U8DigiCert Trusted G4 Code Signing RSA4096 SHA384 2021 CA10"0  *H 0 մ/B(x]9YB3=pŻą&0h\4$KOxCgROẂ>Mp$d}4}LWkC;GZL %Ӌ eI5=Q!xE.,IpB2ehMLHRhW]eO,HV5.7|2t9`ֹ1ܭ#GGnmjg-ҽD; Ǜ2Zj`TI\o&ղ8Αoa4\E(6*f(_s΋&%\Lb^3 +6yue̻HPwPFaX|<(9Է SGu00v[K]taM?v޿Xr)Am&vhAX&+MYxρJ>@G_ɁPs#!Y`dT!8|fx8E0OcOL SA|X=G2 l< VY0U0U00Uh7;_a{eNB0U#0q]dL.g?纘O0U0U% 0 +0w+k0i0$+0http://ocsp.digicert.com0A+05http://cacerts.digicert.com/DigiCertTrustedRootG4.crt0CU<0:08642http://crl3.digicert.com/DigiCertTrustedRootG4.crl0U 00g 0g 0  *H  :#D=v:VH4,tfrʯl0'DK|&7:]Hm?I'EPv~7q"Zj PyH~؀aVv_C>v9=ԙJ(_&XH'?v`\ 98Nn6!SZj>C3O8Tm]@3|╲!usRF4Kov7,?&C p)5\8U7 1.\9qᾜ &gN_zI.t<V+#{pk栺:?ERAHKMD@(V*/ d<3(<ˏ ;{˷w(?/"lA\flņ&3 Kjj@0HK4Q Y mP+JtRH!W;Eanh&`ȯc:VxN0w0_0 %# 0  *H  0i1 0 UUS10U DigiCert, Inc.1A0?U8DigiCert Trusted G4 Code Signing RSA4096 SHA384 2021 CA10 220117000000Z 250115235959Z0|1 0 UUS10 UOregon10U Beaverton1#0!U Python Software Foundation1#0!UPython Software Foundation0"0  *H 0 "jM ħlbcC/=;W03ɼ7Ud<OK "aeG%r5feؒ:a !..R1Fu$AZ܁g[g46F4gڟwŒOQ\*; #m_ȃaxur0$"GȮ؃c2=eJ9c~83HCӞ/r2tdV y,wa/ YX~ q JiN9OD7ZG4%z#3u5*؃H6NL9㽄{iLJd&&h#{Jz!yr;U 70503g 0)0'+http://www.digicert.com/CPS0+00$+0http://ocsp.digicert.com0\+0Phttp://cacerts.digicert.com/DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt0 U00  *H  omBH.}pa.miN#\ڻ$|}MKIhC5<5HdsᦱkO>U\ )8Kj3Oy.&䙓sBZ,k5g ,pekHAvu?U!t]qZ@P験"([h[rQU,9s="NqEI^0oH*ppZIZnBMI3Ls!:ZhRrGl#u: 9)>?D}[xR<*ٱ6[[ t1ԃ(Ȱ}j޾UwNq!9a T[2T3NGo!O\|T.]Ndr%2ukm_~'OD T Q !-4p2Tk=ېĬ3r$޹LQV˸^3꟱kIQי鷯t: D%ZmdzXprX , )gEH#?EGŦ`100}0i1 0 UUS10U DigiCert, Inc.1A0?U8DigiCert Trusted G4 Code Signing RSA4096 SHA384 2021 CA10 %# 0  `He0 *H  1  +70 +7 10  +70/ *H  1" #H3PK0\ +7 1N0LFDBuilt: Release_v3.11.4_20230607.010  *H OPD݈"725W|+:CPZSj@.q.lK ؄mOig%e69Y\Ju 3(!QyiŘ,|zP;Bmbq>xi/0qii 3ըS)ky^dtJU,\?wc?lCT^,՗@EPQԁY..|ODiET^gpiT<r;/okJ9trϩNL0{͔WnSmq=aTwkbaڶ0kNne9E#>R>nG֜| =af3BVE58aA =c<} g=09 +71)0% *H 010  `He0w *H  hf0d `Hl010  `He G-a 7>j$[೧BCpS7yi/ %#ƁUK`20230607055743Z00 MirK<*J=)=Z0  *H  0c1 0 UUS10U DigiCert, Inc.1;09U2DigiCert Trusted G4 RSA4096 SHA256 TimeStamping CA0 220921000000Z 331121235959Z0F1 0 UUS10U DigiCert1$0"UDigiCert Timestamp 2022 - 20"0  *H 0 &:Ʃk ۡt3&U6mU a w=/kdב81r:U3a(ېc\S:-B&xxzVdS*PHi /};S@rI(LVa:}nf\/MhjyF)>&LfȻP8 匔]Z{@noGy> ^f $ҜOnx(?P75xX9L~M­~-+F9Oq.KO{6DU6|1R{Z~%sj!-cYM/'ҫ8fQkSC9dV mdxs!/. ׁ]Kn1)AeX.)ad lQ` %S;j9bօٍyb{gxƈȰn2y Y,|{dĸS^_U})YN]Es~:w00U0 U00U% 0 +0 U 00g 0  `Hl0U#0mM/s)v/uj o0Uba1 =*R0ZUS0Q0OMKIhttp://crl3.digicert.com/DigiCertTrustedG4RSA4096SHA256TimeStampingCA.crl0+00$+0http://ocsp.digicert.com0X+0Lhttp://cacerts.digicert.com/DigiCertTrustedG4RSA4096SHA256TimeStampingCA.crt0  *H  U*FxW70uOօ#9%rwd6IQ,xcU F9iʛ)?x|Sbaf*EJB+P0 - y }jS` 裸׭Aߝ_J:R I56YTҲ~^ vTtmg+v&8D Yk">D!?|Hؒ OC_jY'b+AS4g&2{\B KJӘE`3#EGθBGA6qwtN.Z"OQ/_'.W`xVj•KȂ|qNzlZȟ\C*bx۽[ p~x]G,c%8?:~,LMrU,'aw0067$T|G(f*^[0  *H  0b1 0 UUS10U  DigiCert Inc10U www.digicert.com1!0UDigiCert Trusted Root G40 220323000000Z 370322235959Z0c1 0 UUS10U DigiCert, Inc.1;09U2DigiCert Trusted G4 RSA4096 SHA256 TimeStamping CA0"0  *H 0 Ɔ5I=rIQU%7Q҃ўLm̃ZDB_h} 3P &smW}Cs+"=+>BgQ=V(-ӱue)iِF{DA|jWz7y]dRvGa_T !hn7!@_J}9gcl6 \dt@rźNXMy׏s,9H1W)'.NvU&p&G CCc{un'%:8;["ق*ǒ>sZlR+Xt@(sCJk8)ʪsBhF:^KvQɌ ;["&}_#dc>t? v]Fu`X (T]^0Fvk 3ͱ]0Y0U00UmM/s)v/uj o0U#0q]dL.g?纘O0U0U% 0 +0w+k0i0$+0http://ocsp.digicert.com0A+05http://cacerts.digicert.com/DigiCertTrustedRootG4.crt0CU<0:08642http://crl3.digicert.com/DigiCertTrustedRootG4.crl0 U 00g 0  `Hl0  *H  }YoD"~f!B.M0SοP]K)p )ii>` \[m %41gͶoPLb Vs"%Εi?GwrtO,zC_`Of,d&l|p |屮uOZ](TՊqver#'D'$&*yV Ečrjq Ķ͇$OIwfrKR7~S;I9z%c',=?kfAO@!!@з$x:䞭4q&k8sO?;xLĕ{ _39Axz8#(_+~Fu,',&o{6Yp7 O'`gfU:)+A:1b  Wټ2]# v&evB) G+UT++/DJ78+|00u-P@Z0  *H  0e1 0 UUS10U  DigiCert Inc10U www.digicert.com1$0"UDigiCert Assured ID Root CA0 220801000000Z 311109235959Z0b1 0 UUS10U  DigiCert Inc10U www.digicert.com1!0UDigiCert Trusted Root G40"0  *H 0 sh޻]J<0"0i3§%.!=Y)=Xvͮ{ 08VƗmy_pUA2s*n|!LԼu]xf:1D3@ZI橠gݤ'O9X$\Fdivv=Y]BvizHftKc:=E%D+~am3K}Ï!Ռp,A`cDvb~d3щίCw !T)%lRQGt&Auz_?ɼA[P1r" |Lu?c!_ QkoOE_ ~ &i/-٩:060U00Uq]dL.g?纘O0U#0E뢯˂1-Q!m0U0y+m0k0$+0http://ocsp.digicert.com0C+07http://cacerts.digicert.com/DigiCertAssuredIDRootCA.crt0EU>0<0:864http://crl3.digicert.com/DigiCertAssuredIDRootCA.crl0U  00U 0  *H  pC\U8_t=W,^"iT"wmJz/-8r$RN*-V0z^CDC!rH˝Ow'DY/ 4<LJL@5FjiTV=wZ\ToP=v ho 5` X@cŘ"YUk'lvo#-~qj#k"T-'~:𶇖[\MsW^(⹔1v0r0w0c1 0 UUS10U DigiCert, Inc.1;09U2DigiCert Trusted G4 RSA4096 SHA256 TimeStamping CA MirK<*J=)=Z0  `He0 *H  1  *H  0 *H  1 230607055743Z0+ *H   1000"M35|s0/ *H  1" B'kKB1y=q` !9He 07 *H  /1(0&0$0" 2( &:Ox-dLuW#0  *H ʉ?GOf\6cƪv/uQƎD޵k_SnqJE|e>6haxs#j2m ;*F^S^}n)2$8bkm+R7&_̹#}3fqu "L lGxnɚbKѹT_OW9dgL8~!/ cF ]/ TӽƩxc<ME bng:lH?`,?*6"|4:ԵN؋ \7זZ!HtH;/H;&HtH;H;zLlL^HnH(aHH0(E3I;tI;u3ҹ6MI;tI;u3ҹMH;tH;u3ҹII;MDI;MDH;IDMtItI3ҹMtItI3ҹHtHtH3ҹH\$@Hl$HH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H ~HHtUI~MHHIuQHD$pHHGfD*HEIEo uU*H-Et I-M.E3E333Ll$ ;IY-M.H\$Ht$WH@HHL$ AA-HD$(DA|utHD$ H@BY#3t|$8t HL$0H\$PHt$XH@_̋AE33rHHXHhHpHx ATAUAWH H33DG5LHtPDG3ҋHt=HH+H AWHE# HHu1T TH\$@Hl$HHt$PH|$XH A_A]A\úDDI;HEMNjt HH+H~MT8u #T HAԋm LH3w Uy]E3HՋ:HT>H< HHHHu%S SH HE3IՋH3H\$LcHwMAIMkXJ BD8F\ADA@tXtHt(t uHBLJBd8BL80BLJBd8BL8BdBLJ Bd8EuA%@H\$H(HuRW9 "l3H(H\$Hl$VWATH DHH6SHc‚uLR K 8@t .R"3t{HCHSC{C u/'-H0H;t-H`H;u uHC+HS+kHBHC$C~DŋUW S6R6^6p666666667787H7^7x777777748333%@a@`@̧@@&@ bM"S@T@ccsUTF-8UTF-16LEUNICODEHH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunHH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSun  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~CorExitProcessmscoree.dllruntime error TLOSS error SING error DOMAIN error R6033 - Attempt to use MSIL code from this assembly during native code initialization This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain. R6032 - not enough space for locale information R6031 - Attempt to initialize the CRT more than once. This indicates a bug in your application. R6030 - CRT not initialized R6028 - unable to initialize heap R6027 - not enough space for lowio initialization R6026 - not enough space for stdio initialization R6025 - pure virtual function call R6024 - not enough space for _onexit/atexit table R6019 - unable to open console device R6018 - unexpected heap error R6017 - unexpected multithread lock error R6016 - not enough space for thread data R6010 - abort() has been called R6009 - not enough space for environment R6008 - not enough space for arguments R6002 - floating point support not loaded `@@ @ P@@@@@ @p @ @ @@ @ @ @ @ p @!@x`@y@@z @@@Microsoft Visual C++ Runtime Library ...<program name unknown>Runtime Error! Program: (null)(null)EEE50P( 8PX700WP `h````xpxxxx ((((( H h(((( H H  !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~  GetProcessWindowStationGetUserObjectInformationWGetLastActivePopupGetActiveWindowMessageBoxWUSER32.DLLEEE00P('8PW700PP (`h`hhhxppwppCONOUT$Fatal error in launcher: %s Fatal error in launcher: %s rbFailed to open executableUnable to find an appended archive.Unable to read from file#!PATHEXT;Job creation failedJob information querying failedJob information setting failedmaking stdin inheritable failedmaking stdout inheritable failedmaking stderr inheritable failedUnable to create process using '%ls': %lscontrol handler setting failedFailed to get exit code of process.exe/usr/bin/envExpected to find a command ending in '.exe' in shebang line: %lsExpected to find whitespace after '/usr/bin/env': %lsUnable to find executable in environment: %lsExpected terminating double-quote for executable in shebang line: %ls<launcher_dir>\Terminating quote without starting quote for executable in shebang line: %lsFailed to find shebangExpected to find terminator in shebang lineExpected to decode shebang line using UTF-8Expected to find '#' at start of shebang lineExpected to find '!' following '#' in shebang lineExpected to find executable in shebang lineExpected to find arguments (even if empty) in shebang lineExpected to be able to allocate command line memory"%ls" %ls "%ls" %lsRSDS|+GE Z0C:\Users\Vinay\Projects\simple_launcher\dist\t64.pdbd 4 R pC @ @2p`0C!!Z t d T 4 r- 5td 4 3 rP|0  4 rp  b 42 p`P  t d 4RC,,tbBp`0C-F.@  20. d4 p P|  4 2p42 pC33T42 p  td42C*6K6 td 4 rCI7p768 td4P d T 4 Rpd42pCI<X<RP  t d 4RC]==>>42 pCc?m?4 2 p `C@@  4 RpCAWBWB   d T 4 rp dT4 Rpd 4R pCHI7t42   20dT42p/ td4P|p  4 2pC[\Rr04r p`P|8  t d 4RC``R20Cddm  4 2pCFePeeee2P42pCfg+gbg4  P42 p d4rpCjk20- dQTP4OJp|@ tT4 t dT42d 4R pCtu7 t d 4 RCfvv-vvtd42td42Cxx2 t d T 4Rd 4R pd T42p  p ` 0 P d 4 2pC d T 42p4 2 p `CϖdT42p0 4 p`P|dT 4 pT 4 R pd T 4Rpd 4 R p  4 2p BCWP$ $4$p`P  4 rpCr!T4r p `|0 td 4 P- Etd4C P|Hd4 p- 5td43r P|0d4 p2 0 BC d4 R pCU t d 42C p`P0|Hd42 p6 %4q%f p`P| 4 2 p `C4 2 p `Ck0 4dZ p`P|4 2 p `C4p ` P 4R p ` Pd 4 r p t d T 424T 42 p `  b,|0, |0  4 Rp`P td4rP d T 42p t d T 423 "te"dd"4c"^P| 7 &t&d&4&P|B /3131122(2:2R2j222222233,3<3L3\3j333(888734 4$4<4N4j444444445&5N5`5n55555555555 6 6,6>6R6^6p666666667787H7^7x777777748333ExitProcessGetCommandLineW+SearchPathW~SetInformationJobObjectCreateProcessW}SetHandleInformation WaitForSingleObjectExAssignProcessToJobObjectdFormatMessageWGetExitCodeProcessGetModuleFileNameWQueryInformationJobObjectiMultiByteToWideCharjGetStartupInfoWGetTempPathWCreateJobObjectAkGetStdHandleGetLastErrorSetStdHandleGetFileType;SetConsoleCtrlHandler[SetCurrentDirectoryWRCloseHandleKERNEL32.dllPathRemoveFileSpecWEStrStrIW:PathCombineWSHLWAPI.dllHeapFreeHeapAllocEnterCriticalSection;LeaveCriticalSectionpGetStringTypeWUnhandledExceptionFilterSetUnhandledExceptionFilterIsDebuggerPresent&RtlVirtualUnwindRtlLookupFunctionEntryRtlCaptureContextEncodePointerDecodePointerTerminateProcessGetCurrentProcessInitializeCriticalSectionAndSpinCountGetCommandLineA%RtlUnwindExHeapSetInformationGetVersionHeapCreatexGetCPInfonGetACP>GetOEMCP IsValidCodePageZFlsGetValue[FlsSetValueYFlsFreeSetLastErrorGetCurrentThreadIdXFlsAllocLGetProcAddressGetModuleHandleW4WriteFile|SetHandleCountDeleteCriticalSectionSleep/LCMapStringWReadFiletSetFilePointergFreeEnvironmentStringsWGetEnvironmentStringsWGetModuleFileNameA WideCharToMultiByteQueryPerformanceCounterGetTickCountGetCurrentProcessIdGetSystemTimeAsFileTimeCreateFileWALoadLibraryWHeapReAllocGetConsoleCPGetConsoleMode]FlushFileBuffersdCompareStringWeSetEnvironmentVariableWaSetEndOfFileQGetProcessHeapHeapSize3WriteConsoleW@q@@q@2-+] f        ! 5A CPR S WY l m pr   )     abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZPE@`y!@~ڣ @ڣ AϢ[@~QQ^ _j21~CH@D@@@<@8@4@0@(@ @@@@@@@@@@@@@@@@@@@@@@@|@t@l@`@X@H@8@0@,@ @@@ @@@@@@@@@@x@`@P@8@0@(@ @@@@@@@@@@@@@@@@p@`@H@8@ @@@@@@@J@J@J@J@J@R@`@@p@J@PM@d@ @@`@b@p@p@p@p@p@p@p@p@p@p@..R@R@c@c@c@c@c@c@c@c@c@R@c@c@c@c@c@c@c@.Kr .t.O,P@.}0.. (b$d(t.(O.P\\.\..  P# T#!S!(t!"#"E"$H""("-#(0#F$#H$$.$%,%&(&&.& '( '='(')#))#***$,*c,$d, - $ -)-P$,-Z.X$\..$....?0$@0{0$|00.01* 1>1P$@11.23t.34$44&4j5$l55.56$68%89X%9!;p%$;B;P$D;;&;r<%t</=,0=2>%4>>(>?$??%?@@$@@A&A{BD&|BB.BCh&CEp&EH&HJ&\J|J.|JJ.JJ(K$K&0KHK&PKQK&`KaK&dK5L&8LoL&pL M* MXt*XVX.XXX$XY&Yp['p[*\0',\\T'\1_\'4_ax'aM[iy1Qqұ/Pp  >1\Qzq/Pp!+6@IZ1pQq/ P6pLbx1Qq,/KPip1Qq/-P?pRcv1Qqϑܱ/Pp!&,>X1qQq_______CCBABADL*(%$""&GABJIIDDJC??AD_-(''%$GG#_DIJIIJIIIDIJDD_+)(''%GG _JMCEJ?ABAECA?BA_,+)('%%"!_IM@AJACDCIDI____.,++>________JMJJJJJJJJJF_..,+)('%$"! #GIMCEJJJI?J__...,+(('%$"! &_JM?AJJJJCJ__...,+)(''%$" _IMJJJJJJJJ_K=...,++(''%$! _JMCDJJJJAJ_K_______L*%$"!_I_?AMNJJEJ_ L'%$"_I_MMMMMMJJ_ _('%%_I_CEMIJJMEM _(''*_I_?BMDJEMDMF _)(-LI_MMMCMMMMM_________< ____I_CEM1;MACDMEJM__I_?A_D1@IJJMJMM_FF_I__6_@/EMMMNMM_FF_I_C80EJDMJCJFF?:AA20?_M_MIEM______MIC4BC/ N______MMMMJIDAI_9/ HJJMMJMMMJ??BAI_A7503 IJMMCBCBA44CCI___BAO;6___C_MJIDIDMI_CI___O; @__C_C?J?AJI_?A_DJJI@ O_CM?;I?JI_________H9MAIJJIJI_CD_____JJI73C;IJIJI_?AMDJJDIMJIE5:JIJI__________MMIA:IJJJJJJJJJJJJJJJJMJ???( 444MMMRRRYYY~eGuuu}}}x>iErCE~7?HVbx/!P7pLcyϏ1Qq/Pp",6@J[1qQq/Pp  =1[Qyq/"P0p=LYgx1Qq&/@PZpt1Qq/&PAp[tϩ1Qq/P"p0>M[iy1Qqұ/Pp  >1\Qzq/Pp!+6@IZ1pQq/ P6pLbx1Qq,/KPip1Qq/-P?pRcv1Qqϑܱ/Pp!&,>X1qQq!%///* !*/"(%%'%/) /!#''////+/+"*(/ / !%(/ ( (*/ (///) */   )*  /"///// /+/// # + !%//  +"*+'#+//+'!%*++$++!+! !!!<(0`  !!$& &"   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?9}:z;w=t>q?n@kAiCfD}cE|cE}dFGA;=aVңi89|:yq?n@kBhCeD|cE|cELF@mzzznjʓP8~9{;yp?mAjBgCeD|cEPJ\¯mAjBgC~dEaV}:z;xq?n@lAiCJJJőPyq?n@~YVVV???wwwiiiΡkA|;y>>3@@@y~~~obbb000kkk@@@---U<<<&&&[[[6uuusssWWWIII$$$&&&qqqlllg|||s4bbbhhhƑUUU000QQQ}}}---{bbb(iiiLLLBBBaVggg+++NNN|||nj]]]tttkkkrrrwwwӦaVӦzzznjӦˉ ?????(  C﫫oIਨS=?_QF4aZмoEcaXMB70~Iq?c`VK@58z;u=qv>3Eyn@iB~dE}dFGHYYYuuuġ=xmAhC}dE}eGS444|||gC}cEMMM~>q?kAiGRRR¢Gu=xKʺ~AAAAAAAAAAAAAAAA ( h00 %   h4VS_VERSION_INFO?fStringFileInfoB080904b0JCompanyNameSimple Launcher User^FileDescriptionSimple Launcher Executable2 FileVersion1.1.0.140InternalNamet64.exej#LegalCopyrightCopyright (C) Simple Launcher User8OriginalFilenamet64.exe@ProductNameSimple Launcher6 ProductVersion1.1.0.14DVarFileInfo$Translation  PAPADDINGXXPADآPX4Ƞؠ(8HXhxȡء@ȪЪت (08@HPX`hpxȫЫث (08@HPX`hpxȬЬج (08@Hح8xPLpxȢТآ (08HPX`hpx#!"E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Scripts\python.exe" PKPqV}K2 __main__.py# -*- coding: utf-8 -*- import re import sys from pip._internal.cli.main import main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main()) PKPqV}K2 __main__.pyPK9PK{5Zh͐adadScripts/Activate.ps1nuW+A<# .Synopsis Activate a Python virtual environment for the current PowerShell session. .Description Pushes the python executable for a virtual environment to the front of the $Env:PATH environment variable and sets the prompt to signify that you are in a Python virtual environment. Makes use of the command line switches as well as the `pyvenv.cfg` file values present in the virtual environment. .Parameter VenvDir Path to the directory that contains the virtual environment to activate. The default value for this is the parent of the directory that the Activate.ps1 script is located within. .Parameter Prompt The prompt prefix to display when this virtual environment is activated. By default, this prompt is the name of the virtual environment folder (VenvDir) surrounded by parentheses and followed by a single space (ie. '(.venv) '). .Example Activate.ps1 Activates the Python virtual environment that contains the Activate.ps1 script. .Example Activate.ps1 -Verbose Activates the Python virtual environment that contains the Activate.ps1 script, and shows extra information about the activation as it executes. .Example Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv Activates the Python virtual environment located in the specified location. .Example Activate.ps1 -Prompt "MyPython" Activates the Python virtual environment that contains the Activate.ps1 script, and prefixes the current prompt with the specified string (surrounded in parentheses) while the virtual environment is active. .Notes On Windows, it may be required to enable this Activate.ps1 script by setting the execution policy for the user. You can do this by issuing the following PowerShell command: PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser For more information on Execution Policies: https://go.microsoft.com/fwlink/?LinkID=135170 #> Param( [Parameter(Mandatory = $false)] [String] $VenvDir, [Parameter(Mandatory = $false)] [String] $Prompt ) <# Function declarations --------------------------------------------------- #> <# .Synopsis Remove all shell session elements added by the Activate script, including the addition of the virtual environment's Python executable from the beginning of the PATH variable. .Parameter NonDestructive If present, do not remove this function from the global namespace for the session. #> function global:deactivate ([switch]$NonDestructive) { # Revert to original values # The prior prompt: if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT } # The prior PYTHONHOME: if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME } # The prior PATH: if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH Remove-Item -Path Env:_OLD_VIRTUAL_PATH } # Just remove the VIRTUAL_ENV altogether: if (Test-Path -Path Env:VIRTUAL_ENV) { Remove-Item -Path env:VIRTUAL_ENV } # Just remove VIRTUAL_ENV_PROMPT altogether. if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { Remove-Item -Path env:VIRTUAL_ENV_PROMPT } # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force } # Leave deactivate function in the global namespace if requested: if (-not $NonDestructive) { Remove-Item -Path function:deactivate } } <# .Description Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the given folder, and returns them in a map. For each line in the pyvenv.cfg file, if that line can be parsed into exactly two strings separated by `=` (with any amount of whitespace surrounding the =) then it is considered a `key = value` line. The left hand string is the key, the right hand is the value. If the value starts with a `'` or a `"` then the first and last character is stripped from the value before being captured. .Parameter ConfigDir Path to the directory that contains the `pyvenv.cfg` file. #> function Get-PyVenvConfig( [String] $ConfigDir ) { Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue # An empty map will be returned if no config file is found. $pyvenvConfig = @{ } if ($pyvenvConfigPath) { Write-Verbose "File exists, parse `key = value` lines" $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath $pyvenvConfigContent | ForEach-Object { $keyval = $PSItem -split "\s*=\s*", 2 if ($keyval[0] -and $keyval[1]) { $val = $keyval[1] # Remove extraneous quotations around a string value. if ("'""".Contains($val.Substring(0, 1))) { $val = $val.Substring(1, $val.Length - 2) } $pyvenvConfig[$keyval[0]] = $val Write-Verbose "Adding Key: '$($keyval[0])'='$val'" } } } return $pyvenvConfig } <# Begin Activate script --------------------------------------------------- #> # Determine the containing directory of this script $VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition $VenvExecDir = Get-Item -Path $VenvExecPath Write-Verbose "Activation script is located in path: '$VenvExecPath'" Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" # Set values required in priority: CmdLine, ConfigFile, Default # First, get the location of the virtual environment, it might not be # VenvExecDir if specified on the command line. if ($VenvDir) { Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" } else { Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") Write-Verbose "VenvDir=$VenvDir" } # Next, read the `pyvenv.cfg` file to determine any required value such # as `prompt`. $pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir # Next, set the prompt from the command line, or the config file, or # just use the name of the virtual environment folder. if ($Prompt) { Write-Verbose "Prompt specified as argument, using '$Prompt'" } else { Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" if ($pyvenvCfg -and $pyvenvCfg['prompt']) { Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" $Prompt = $pyvenvCfg['prompt']; } else { Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)" Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" $Prompt = Split-Path -Path $venvDir -Leaf } } Write-Verbose "Prompt = '$Prompt'" Write-Verbose "VenvDir='$VenvDir'" # Deactivate any currently active virtual environment, but leave the # deactivate function in place. deactivate -nondestructive # Now set the environment variable VIRTUAL_ENV, used by many tools to determine # that there is an activated venv. $env:VIRTUAL_ENV = $VenvDir if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { Write-Verbose "Setting prompt to '$Prompt'" # Set the prompt to include the env name # Make sure _OLD_VIRTUAL_PROMPT is global function global:_OLD_VIRTUAL_PROMPT { "" } Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt function global:prompt { Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " _OLD_VIRTUAL_PROMPT } $env:VIRTUAL_ENV_PROMPT = $Prompt } # Clear PYTHONHOME if (Test-Path -Path Env:PYTHONHOME) { Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME Remove-Item -Path Env:PYTHONHOME } # Add the venv to the PATH Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH $Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" # SIG # Begin signature block # MIIvIgYJKoZIhvcNAQcCoIIvEzCCLw8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBnL745ElCYk8vk # dBtMuQhLeWJ3ZGfzKW4DHCYzAn+QB6CCE8MwggWQMIIDeKADAgECAhAFmxtXno4h # MuI5B72nd3VcMA0GCSqGSIb3DQEBDAUAMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV # BAMTGERpZ2lDZXJ0IFRydXN0ZWQgUm9vdCBHNDAeFw0xMzA4MDExMjAwMDBaFw0z # ODAxMTUxMjAwMDBaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ # bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lDZXJ0 # IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC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EoMCYwJDAiBCDH9OG+MiiJIKviJjq+ # GsT8T+Z4HC1k0EyAdVegI7W2+jANBgkqhkiG9w0BAQEFAASCAgBt92vHxbHXh4Z2 # yl+aTo7PltgPhZhoQCWg+gDSyySEqkDN+kTuoW3ROuMjR1JR0htJOwVqnmI/enhW # r8VJiDKfGOGupHEfzAlMaIIC+K+C3sSoeaRR1aiOWrUA/oPpJIgwXyfo65Hf07qf # wdn//4y5zv6oMdHNtpSfFgibze5BjNRAgOUxl9rvKArEN7B+WTCnvLWw/EJe48MQ # B0zUbVFIORQUHlLnCL07JGRSN5bHaMtnn5eEwZFC9522kJaHyLrmfeP4jZLMhjhn # fGxv69HVzggM8CpjpQA8l8hh6Il48TDMZpdqkxwjoRmJVwt3hwTrfuE11NFrXEAD # 8dAAta6N/M722c3BE6UxM2R4QXyV05BL6e4jVJm1aR1ebUVS4nZVZ/jbCexR/+vx # mfSh1SezU3KlgRMDrLF+El883BFoe/99p4/QjjnELhn41lPPAYGefhMI9ioYZULQ # xMyG6qIPA8s2tnYIL/AKvh7SUgFVtOsTKbTFXMMr20sipBQQFUOb8ZD+8u4Iyc4M # UC4d2S6z9zwlPbSr1lk9m3R8rl+j2/VkB1S21nqda3xWFk/+n/2oEJe4gUkCiQxs # qFaykkcAhWYdZVRRNM89ZF23DeYAEkUEaD2M1ld0CZNtvtPNmv/NZV/Xbb3H0RPR # yDBB2JQI1BbEjl7HWy616MUsAqWA+Q== # SIG # End signature block PK{5Zc"ԕScripts/pip3.11.exenuW+AMZ@ !L!This program cannot be run in DOS mode. $`v%%%tՖ%%%ƛ%%%%%%%%%%%%%%%Rich%PEd b"  |B@@.<S@ l0.text! `.rdataD8:@@.dataDA@.@.pdata@  B@@.rsrcSTN@@.relocT@BumLISMCMK HHH3H3H$0LʺICDBHL$0HD$ *HLD$0HH`H ̅umLISMCMK HHH33H3H$0LʺICDBHL$0HD$ jLD$0HH`H SH\$Ht$WH BHH3LLBILHtBHA;IDII+LD9Ht$8HH\$0H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yMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunHH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSun  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~CorExitProcessmscoree.dllruntime error TLOSS error SING error DOMAIN error R6033 - Attempt to use MSIL code from this assembly during native code initialization This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain. R6032 - not enough space for locale information R6031 - Attempt to initialize the CRT more than once. This indicates a bug in your application. R6030 - CRT not initialized R6028 - unable to initialize heap R6027 - not enough space for lowio initialization R6026 - not enough space for stdio initialization R6025 - pure virtual function call R6024 - not enough space for _onexit/atexit table R6019 - unable to open console device R6018 - unexpected heap error R6017 - unexpected multithread lock error R6016 - not enough space for thread data R6010 - abort() has been called R6009 - not enough space for environment R6008 - not enough space for arguments R6002 - floating point support not loaded `@@ @ P@@@@@ @p @ @ @@ @ @ @ @ p @!@x`@y@@z @@@Microsoft Visual C++ Runtime Library ...<program name unknown>Runtime Error! Program: (null)(null)EEE50P( 8PX700WP `h````xpxxxx ((((( H h(((( H H  !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~  GetProcessWindowStationGetUserObjectInformationWGetLastActivePopupGetActiveWindowMessageBoxWUSER32.DLLEEE00P('8PW700PP (`h`hhhxppwppCONOUT$Fatal error in launcher: %s Fatal error in launcher: %s rbFailed to open executableUnable to find an appended archive.Unable to read from file#!PATHEXT;Job creation failedJob information querying failedJob information setting failedmaking stdin inheritable failedmaking stdout inheritable failedmaking stderr inheritable failedUnable to create process using '%ls': %lscontrol handler setting failedFailed to get exit code of process.exe/usr/bin/envExpected to find a command ending in '.exe' in shebang line: %lsExpected to find whitespace after '/usr/bin/env': %lsUnable to find executable in environment: %lsExpected terminating double-quote for executable in shebang line: %ls<launcher_dir>\Terminating quote without starting quote for executable in shebang line: %lsFailed to find shebangExpected to find terminator in shebang lineExpected to decode shebang line using UTF-8Expected to find '#' at start of shebang lineExpected to find '!' following '#' in shebang lineExpected to find executable in shebang lineExpected to find arguments (even if empty) in shebang lineExpected to be able to allocate command line memory"%ls" %ls "%ls" %lsRSDS|+GE Z0C:\Users\Vinay\Projects\simple_launcher\dist\t64.pdbd 4 R pC @ @2p`0C!!Z t d T 4 r- 5td 4 3 rP|0  4 rp  b 42 p`P  t d 4RC,,tbBp`0C-F.@  20. d4 p P|  4 2p42 pC33T42 p  td42C*6K6 td 4 rCI7p768 td4P d T 4 Rpd42pCI<X<RP  t d 4RC]==>>42 pCc?m?4 2 p `C@@  4 RpCAWBWB   d T 4 rp dT4 Rpd 4R pCHI7t42   20dT42p/ td4P|p  4 2pC[\Rr04r p`P|8  t d 4RC``R20Cddm  4 2pCFePeeee2P42pCfg+gbg4  P42 p d4rpCjk20- dQTP4OJp|@ tT4 t dT42d 4R pCtu7 t d 4 RCfvv-vvtd42td42Cxx2 t d T 4Rd 4R pd T42p  p ` 0 P d 4 2pC d T 42p4 2 p `CϖdT42p0 4 p`P|dT 4 pT 4 R pd T 4Rpd 4 R p  4 2p BCWP$ $4$p`P  4 rpCr!T4r p `|0 td 4 P- Etd4C P|Hd4 p- 5td43r P|0d4 p2 0 BC d4 R pCU t d 42C p`P0|Hd42 p6 %4q%f p`P| 4 2 p `C4 2 p `Ck0 4dZ p`P|4 2 p `C4p ` P 4R p ` Pd 4 r p t d T 424T 42 p `  b,|0, |0  4 Rp`P td4rP d T 42p t d T 423 "te"dd"4c"^P| 7 &t&d&4&P|B /3131122(2:2R2j222222233,3<3L3\3j333(888734 4$4<4N4j444444445&5N5`5n55555555555 6 6,6>6R6^6p666666667787H7^7x777777748333ExitProcessGetCommandLineW+SearchPathW~SetInformationJobObjectCreateProcessW}SetHandleInformation WaitForSingleObjectExAssignProcessToJobObjectdFormatMessageWGetExitCodeProcessGetModuleFileNameWQueryInformationJobObjectiMultiByteToWideCharjGetStartupInfoWGetTempPathWCreateJobObjectAkGetStdHandleGetLastErrorSetStdHandleGetFileType;SetConsoleCtrlHandler[SetCurrentDirectoryWRCloseHandleKERNEL32.dllPathRemoveFileSpecWEStrStrIW:PathCombineWSHLWAPI.dllHeapFreeHeapAllocEnterCriticalSection;LeaveCriticalSectionpGetStringTypeWUnhandledExceptionFilterSetUnhandledExceptionFilterIsDebuggerPresent&RtlVirtualUnwindRtlLookupFunctionEntryRtlCaptureContextEncodePointerDecodePointerTerminateProcessGetCurrentProcessInitializeCriticalSectionAndSpinCountGetCommandLineA%RtlUnwindExHeapSetInformationGetVersionHeapCreatexGetCPInfonGetACP>GetOEMCP IsValidCodePageZFlsGetValue[FlsSetValueYFlsFreeSetLastErrorGetCurrentThreadIdXFlsAllocLGetProcAddressGetModuleHandleW4WriteFile|SetHandleCountDeleteCriticalSectionSleep/LCMapStringWReadFiletSetFilePointergFreeEnvironmentStringsWGetEnvironmentStringsWGetModuleFileNameA WideCharToMultiByteQueryPerformanceCounterGetTickCountGetCurrentProcessIdGetSystemTimeAsFileTimeCreateFileWALoadLibraryWHeapReAllocGetConsoleCPGetConsoleMode]FlushFileBuffersdCompareStringWeSetEnvironmentVariableWaSetEndOfFileQGetProcessHeapHeapSize3WriteConsoleW@q@@q@2-+] f        ! 5A CPR S WY l m pr   )     abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY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@/EMMMNMM_FF_I_C80EJDMJCJFF?:AA20?_M_MIEM______MIC4BC/ N______MMMMJIDAI_9/ HJJMMJMMMJ??BAI_A7503 IJMMCBCBA44CCI___BAO;6___C_MJIDIDMI_CI___O; @__C_C?J?AJI_?A_DJJI@ O_CM?;I?JI_________H9MAIJJIJI_CD_____JJI73C;IJIJI_?AMDJJDIMJIE5:JIJI__________MMIA:IJJJJJJJJJJJJJJJJMJ???( 444MMMRRRYYY~eGuuu}}}x>iErCE~7?HVbx/!P7pLcyϏ1Qq/Pp",6@J[1qQq/Pp  =1[Qyq/"P0p=LYgx1Qq&/@PZpt1Qq/&PAp[tϩ1Qq/P"p0>M[iy1Qqұ/Pp  >1\Qzq/Pp!+6@IZ1pQq/ P6pLbx1Qq,/KPip1Qq/-P?pRcv1Qqϑܱ/Pp!&,>X1qQq!%///* !*/"(%%'%/) /!#''////+/+"*(/ / !%(/ ( (*/ (///) */   )*  /"///// /+/// # + !%//  +"*+'#+//+'!%*++$++!+! !!!<(0`  !!$& &"   WܱNj+<<:5pi$!!!4888&SNJFB=950,(%%%5ǎVRNIEѹ|Jq?o@ZUQMID@<73/+&"-Ɍ444"ք̴wq?]YUPLHC?;72.*%!"""4888&dya\XTPKGC>:61-)% OÑ%%%5ʎA{;ys`\WSOJFB>951,($(9|:z;xq?o@mAkBiCgCdDuZ;73.*Ǒ%%%5̎È>89}:{;yq?o@mAjBhCfD~dEuZ?:625Оa789}:{;yr>p?n@lAjBhCfD}dEB>:5^ό555"܄ѳ„7789}:{;xr?p@n@lAjBgCeDFA=9"""4;;;&ŌC89~9|:z;xr?p@mAkAiBgCIELɑQQQJnnn~~~Įq?o@mAkBiCHHH"""vvv9~:{;yq?o@mAkB:::'''___sssttt8Ϧuǣvyp?n@lA888T---6fffnddd%%%"""OOOSSSċDҧuʤv{;yr?p?xM<<r?̷999VVV###)))444ѳ͝b@~9|:z;}Cg˶Ӎ󑑑ZZZlll;;;!!!""")))___&&&2:::ppp{{{___WWWWWW:::!!!"""***www"""4888&,̑999ԖJJJ|||lll:::"""BBBXXX|||$$$6,uuuKKKCCC@@@...www* Ҍ666"KKKaaaLLLWWW@$"""4;;;&nnnfff!!!$$$999444]ttt|ȇɑ&&&5ЎvvvmmmVVV{{{OOOڥaaaCCCpppό555"ބ|||MMMfff"""4;;;&\\\Ǒ%%%5Ύݧܦ͌555"ۄۥ"""4:::&ڤÑ%%%5ˎܤׇ ww?ww??ww?ww?ww?ww?ww?ww?ww?ww?ww?ww?wwwwwwwwwwwwwwwwwwwwwwwwwwww?ww?ww?ww?ww?ww?ww?ww?ww?ww?ww?wwwwwwwwwwwwwwww?wwwwwwww( @ !!!0\\\JeeeQ666D555A0$ vH<602\7qڴvvvj&&&D1"gLF@;5?кVQKE?9(aV[UPJD>82-uuun{{{j`ZTOVo@lAb_YSMGB<60+%<aVmt>q?n@bb^XRLFA;5/)$Ywwwn}}}j~Cv=s>p?bba]WQKE@:4.(+{;xbba[VPJD?93-'aV~:{;xr?o@lAiBfD}dE|cE|cEiB<61?9}:z;w=t>q?n@kAiCfD}cE|cE}dFGA;=aVңi89|:yq?n@kBhCeD|cE|cELF@mzzznjʓP8~9{;yp?mAjBgCeD|cEPJ\¯mAjBgC~dEaV}:z;xq?n@lAiCJJJőPyq?n@~YVVV???wwwiiiΡkA|;y>>3@@@y~~~obbb000kkk@@@---U<<<&&&[[[6uuusssWWWIII$$$&&&qqqlllg|||s4bbbhhhƑUUU000QQQ}}}---{bbb(iiiLLLBBBaVggg+++NNN|||nj]]]tttkkkrrrwwwӦaVӦzzznjӦˉ ?????(  C﫫oIਨS=?_QF4aZмoEcaXMB70~Iq?c`VK@58z;u=qv>3Eyn@iB~dE}dFGHYYYuuuġ=xmAhC}dE}eGS444|||gC}cEMMM~>q?kAiGRRR¢Gu=xKʺ~AAAAAAAAAAAAAAAA ( h00 %   h4VS_VERSION_INFO?fStringFileInfoB080904b0JCompanyNameSimple Launcher User^FileDescriptionSimple Launcher Executable2 FileVersion1.1.0.140InternalNamet64.exej#LegalCopyrightCopyright (C) Simple Launcher User8OriginalFilenamet64.exe@ProductNameSimple Launcher6 ProductVersion1.1.0.14DVarFileInfo$Translation  PAPADDINGXXPADآPX4Ƞؠ(8HXhxȡء@ȪЪت (08@HPX`hpxȫЫث (08@HPX`hpxȬЬج (08@Hح8xPLpxȢТآ (08HPX`hpx#!"E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Scripts\python.exe" PKPqV}K2 __main__.py# -*- coding: utf-8 -*- import re import sys from pip._internal.cli.main import main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main()) PKPqV}K2 __main__.pyPK9PK{5Zc"ԕScripts/pip.exenuW+AMZ@ !L!This program cannot be run in DOS mode. $`v%%%tՖ%%%ƛ%%%%%%%%%%%%%%%Rich%PEd b"  |B@@.<S@ l0.text! `.rdataD8:@@.dataDA@.@.pdata@  B@@.rsrcSTN@@.relocT@BumLISMCMK HHH3H3H$0LʺICDBHL$0HD$ *HLD$0HH`H ̅umLISMCMK HHH33H3H$0LʺICDBHL$0HD$ jLD$0HH`H SH\$Ht$WH BHH3LLBILHtBHA;IDII+LD9Ht$8HH\$0H _H\$Ht$H|$ UATAUAVAWHH@LL' H0SHM8E3Le8pA̅H HM8ED$3D*HM8!HM8LcAAHE3*LM8E|$AIDIHHHtHMED$H%HcI+HHM8AHAHE3)LM8DIHHHxAHN HHHMHA覱HcHH+H]EHM8E3EH+1)LM8LII3AH HAEf; uMfHM8AHE3(LM8LIIAH HH1N\+M;r fA9t M+M;sMHM8+L\$@II[0Is@I{HIA_A^A]A\]H\$UVWH03HW.H|$` H-SHt-AE3H3H|$(Hl$ 4}L HT$hHL$X/)HT$hHL$XuRHL$X$ALH3H|$(Hl$ u3LD$`H HuHL$X H\$PHH#H0_^]H(t v1w,H fOHt 5O LrOA YH(@SH Ht#uuHDH [H%&H [H\$WH HH HHx ) HHHHH\$0H _HHXHhHpHx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HtHM+HILl$pMcHtE=MHIG3ɅuHfB94hfB9 hHHHuH5fH+HE3L9mHcHL.EtfL9ltHLHHHDHL9luHcHH;H TfA艀Ht{rH5;fH+HsLdM.\EyߍG;tLcHL;^H(HHHcL$LlM.HeD9l$xtuI螰H ~HHtUI~MHHIuQHD$pHHGfD*HEIEo uU*H-Et I-M.E3E333Ll$ ;IY-M.H\$Ht$WH@HHL$ AA-HD$(DA|utHD$ H@BY#3t|$8t HL$0H\$PHt$XH@_̋AE33rHHXHhHpHx ATAUAWH H33DG5LHtPDG3ҋHt=HH+H AWHE# HHu1T TH\$@Hl$HHt$PH|$XH A_A]A\úDDI;HEMNjt HH+H~MT8u #T HAԋm LH3w Uy]E3HՋ:HT>H< HHHHu%S SH HE3IՋH3H\$LcHwMAIMkXJ BD8F\ADA@tXtHt(t uHBLJBd8BL80BLJBd8BL8BdBLJ Bd8EuA%@H\$H(HuRW9 "l3H(H\$Hl$VWATH DHH6SHc‚uLR K 8@t .R"3t{HCHSC{C u/'-H0H;t-H`H;u uHC+HS+kHBHC$C~DŋUW S6R6^6p666666667787H7^7x777777748333%@a@`@̧@@&@ bM"S@T@ccsUTF-8UTF-16LEUNICODEHH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunHH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSun  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~CorExitProcessmscoree.dllruntime error TLOSS error SING error DOMAIN error R6033 - Attempt to use MSIL code from this assembly during native code initialization This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain. R6032 - not enough space for locale information R6031 - Attempt to initialize the CRT more than once. This indicates a bug in your application. R6030 - CRT not initialized R6028 - unable to initialize heap R6027 - not enough space for lowio initialization R6026 - not enough space for stdio initialization R6025 - pure virtual function call R6024 - not enough space for _onexit/atexit table R6019 - unable to open console device R6018 - unexpected heap error R6017 - unexpected multithread lock error R6016 - not enough space for thread data R6010 - abort() has been called R6009 - not enough space for environment R6008 - not enough space for arguments R6002 - floating point support not loaded `@@ @ P@@@@@ @p @ @ @@ @ @ @ @ p @!@x`@y@@z @@@Microsoft Visual C++ Runtime Library ...<program name unknown>Runtime Error! Program: (null)(null)EEE50P( 8PX700WP `h````xpxxxx ((((( H h(((( H H  !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~  GetProcessWindowStationGetUserObjectInformationWGetLastActivePopupGetActiveWindowMessageBoxWUSER32.DLLEEE00P('8PW700PP (`h`hhhxppwppCONOUT$Fatal error in launcher: %s Fatal error in launcher: %s rbFailed to open executableUnable to find an appended archive.Unable to read from file#!PATHEXT;Job creation failedJob information querying failedJob information setting failedmaking stdin inheritable failedmaking stdout inheritable failedmaking stderr inheritable failedUnable to create process using '%ls': %lscontrol handler setting failedFailed to get exit code of process.exe/usr/bin/envExpected to find a command ending in '.exe' in shebang line: %lsExpected to find whitespace after '/usr/bin/env': %lsUnable to find executable in environment: %lsExpected terminating double-quote for executable in shebang line: %ls<launcher_dir>\Terminating quote without starting quote for executable in shebang line: %lsFailed to find shebangExpected to find terminator in shebang lineExpected to decode shebang line using UTF-8Expected to find '#' at start of shebang lineExpected to find '!' following '#' in shebang lineExpected to find executable in shebang lineExpected to find arguments (even if empty) in shebang lineExpected to be able to allocate command line memory"%ls" %ls "%ls" %lsRSDS|+GE Z0C:\Users\Vinay\Projects\simple_launcher\dist\t64.pdbd 4 R pC @ @2p`0C!!Z t d T 4 r- 5td 4 3 rP|0  4 rp  b 42 p`P  t d 4RC,,tbBp`0C-F.@  20. d4 p P|  4 2p42 pC33T42 p  td42C*6K6 td 4 rCI7p768 td4P d T 4 Rpd42pCI<X<RP  t d 4RC]==>>42 pCc?m?4 2 p `C@@  4 RpCAWBWB   d T 4 rp dT4 Rpd 4R pCHI7t42   20dT42p/ td4P|p  4 2pC[\Rr04r p`P|8  t d 4RC``R20Cddm  4 2pCFePeeee2P42pCfg+gbg4  P42 p d4rpCjk20- dQTP4OJp|@ tT4 t dT42d 4R pCtu7 t d 4 RCfvv-vvtd42td42Cxx2 t d T 4Rd 4R pd T42p  p ` 0 P d 4 2pC d T 42p4 2 p `CϖdT42p0 4 p`P|dT 4 pT 4 R pd T 4Rpd 4 R p  4 2p BCWP$ $4$p`P  4 rpCr!T4r p `|0 td 4 P- Etd4C P|Hd4 p- 5td43r P|0d4 p2 0 BC d4 R pCU t d 42C p`P0|Hd42 p6 %4q%f p`P| 4 2 p `C4 2 p `Ck0 4dZ p`P|4 2 p `C4p ` P 4R p ` Pd 4 r p t d T 424T 42 p `  b,|0, |0  4 Rp`P td4rP d T 42p t d T 423 "te"dd"4c"^P| 7 &t&d&4&P|B /3131122(2:2R2j222222233,3<3L3\3j333(888734 4$4<4N4j444444445&5N5`5n55555555555 6 6,6>6R6^6p666666667787H7^7x777777748333ExitProcessGetCommandLineW+SearchPathW~SetInformationJobObjectCreateProcessW}SetHandleInformation WaitForSingleObjectExAssignProcessToJobObjectdFormatMessageWGetExitCodeProcessGetModuleFileNameWQueryInformationJobObjectiMultiByteToWideCharjGetStartupInfoWGetTempPathWCreateJobObjectAkGetStdHandleGetLastErrorSetStdHandleGetFileType;SetConsoleCtrlHandler[SetCurrentDirectoryWRCloseHandleKERNEL32.dllPathRemoveFileSpecWEStrStrIW:PathCombineWSHLWAPI.dllHeapFreeHeapAllocEnterCriticalSection;LeaveCriticalSectionpGetStringTypeWUnhandledExceptionFilterSetUnhandledExceptionFilterIsDebuggerPresent&RtlVirtualUnwindRtlLookupFunctionEntryRtlCaptureContextEncodePointerDecodePointerTerminateProcessGetCurrentProcessInitializeCriticalSectionAndSpinCountGetCommandLineA%RtlUnwindExHeapSetInformationGetVersionHeapCreatexGetCPInfonGetACP>GetOEMCP IsValidCodePageZFlsGetValue[FlsSetValueYFlsFreeSetLastErrorGetCurrentThreadIdXFlsAllocLGetProcAddressGetModuleHandleW4WriteFile|SetHandleCountDeleteCriticalSectionSleep/LCMapStringWReadFiletSetFilePointergFreeEnvironmentStringsWGetEnvironmentStringsWGetModuleFileNameA WideCharToMultiByteQueryPerformanceCounterGetTickCountGetCurrentProcessIdGetSystemTimeAsFileTimeCreateFileWALoadLibraryWHeapReAllocGetConsoleCPGetConsoleMode]FlushFileBuffersdCompareStringWeSetEnvironmentVariableWaSetEndOfFileQGetProcessHeapHeapSize3WriteConsoleW@q@@q@2-+] f        ! 5A CPR S WY l m pr   )     abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZPE@`y!@~ڣ @ڣ AϢ[@~QQ^ _j21~CH@D@@@<@8@4@0@(@ @@@@@@@@@@@@@@@@@@@@@@@|@t@l@`@X@H@8@0@,@ @@@ @@@@@@@@@@x@`@P@8@0@(@ @@@@@@@@@@@@@@@@p@`@H@8@ @@@@@@@J@J@J@J@J@R@`@@p@J@PM@d@ @@`@b@p@p@p@p@p@p@p@p@p@p@..R@R@c@c@c@c@c@c@c@c@c@R@c@c@c@c@c@c@c@.Kr .t.O,P@.}0.. (b$d(t.(O.P\\.\..  P# T#!S!(t!"#"E"$H""("-#(0#F$#H$$.$%,%&(&&.& '( '='(')#))#***$,*c,$d, - $ -)-P$,-Z.X$\..$....?0$@0{0$|00.01* 1>1P$@11.23t.34$44&4j5$l55.56$68%89X%9!;p%$;B;P$D;;&;r<%t</=,0=2>%4>>(>?$??%?@@$@@A&A{BD&|BB.BCh&CEp&EH&HJ&\J|J.|JJ.JJ(K$K&0KHK&PKQK&`KaK&dK5L&8LoL&pL M* MXt*XVX.XXX$XY&Yp['p[*\0',\\T'\1_\'4_ax'aM[iy1Qqұ/Pp  >1\Qzq/Pp!+6@IZ1pQq/ P6pLbx1Qq,/KPip1Qq/-P?pRcv1Qqϑܱ/Pp!&,>X1qQq_______CCBABADL*(%$""&GABJIIDDJC??AD_-(''%$GG#_DIJIIJIIIDIJDD_+)(''%GG _JMCEJ?ABAECA?BA_,+)('%%"!_IM@AJACDCIDI____.,++>________JMJJJJJJJJJF_..,+)('%$"! #GIMCEJJJI?J__...,+(('%$"! &_JM?AJJJJCJ__...,+)(''%$" _IMJJJJJJJJ_K=...,++(''%$! _JMCDJJJJAJ_K_______L*%$"!_I_?AMNJJEJ_ L'%$"_I_MMMMMMJJ_ _('%%_I_CEMIJJMEM _(''*_I_?BMDJEMDMF _)(-LI_MMMCMMMMM_________< ____I_CEM1;MACDMEJM__I_?A_D1@IJJMJMM_FF_I__6_@/EMMMNMM_FF_I_C80EJDMJCJFF?:AA20?_M_MIEM______MIC4BC/ N______MMMMJIDAI_9/ HJJMMJMMMJ??BAI_A7503 IJMMCBCBA44CCI___BAO;6___C_MJIDIDMI_CI___O; @__C_C?J?AJI_?A_DJJI@ O_CM?;I?JI_________H9MAIJJIJI_CD_____JJI73C;IJIJI_?AMDJJDIMJIE5:JIJI__________MMIA:IJJJJJJJJJJJJJJJJMJ???( 444MMMRRRYYY~eGuuu}}}x>iErCE~7?HVbx/!P7pLcyϏ1Qq/Pp",6@J[1qQq/Pp  =1[Qyq/"P0p=LYgx1Qq&/@PZpt1Qq/&PAp[tϩ1Qq/P"p0>M[iy1Qqұ/Pp  >1\Qzq/Pp!+6@IZ1pQq/ P6pLbx1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(aV[UPJD>82-uuun{{{j`ZTOVo@lAb_YSMGB<60+%<aVmt>q?n@bb^XRLFA;5/)$Ywwwn}}}j~Cv=s>p?bba]WQKE@:4.(+{;xbba[VPJD?93-'aV~:{;xr?o@lAiBfD}dE|cE|cEiB<61?9}:z;w=t>q?n@kAiCfD}cE|cE}dFGA;=aVңi89|:yq?n@kBhCeD|cE|cELF@mzzznjʓP8~9{;yp?mAjBgCeD|cEPJ\¯mAjBgC~dEaV}:z;xq?n@lAiCJJJőPyq?n@~YVVV???wwwiiiΡkA|;y>>3@@@y~~~obbb000kkk@@@---U<<<&&&[[[6uuusssWWWIII$$$&&&qqqlllg|||s4bbbhhhƑUUU000QQQ}}}---{bbb(iiiLLLBBBaVggg+++NNN|||nj]]]tttkkkrrrwwwӦaVӦzzznjӦˉ ?????(  C﫫oIਨS=?_QF4aZмoEcaXMB70~Iq?c`VK@58z;u=qv>3Eyn@iB~dE}dFGHYYYuuuġ=xmAhC}dE}eGS444|||gC}cEMMM~>q?kAiGRRR¢Gu=xKʺ~AAAAAAAAAAAAAAAA ( h00 %   h4VS_VERSION_INFO?fStringFileInfoB080904b0JCompanyNameSimple Launcher User^FileDescriptionSimple Launcher Executable2 FileVersion1.1.0.140InternalNamet64.exej#LegalCopyrightCopyright (C) Simple Launcher User8OriginalFilenamet64.exe@ProductNameSimple Launcher6 ProductVersion1.1.0.14DVarFileInfo$Translation  PAPADDINGXXPADآPX4Ƞؠ(8HXhxȡء@ȪЪت (08@HPX`hpxȫЫث (08@HPX`hpxȬЬج (08@Hح8xPLpxȢТآ (08HPX`hpx#!"E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Scripts\python.exe" PKPqV}K2 __main__.py# -*- coding: utf-8 -*- import re import sys from pip._internal.cli.main import main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main()) PKPqV}K2 __main__.pyPK9PK{5Z h"Scripts/activate.batnuW+A@echo off rem This file is UTF-8 encoded, so we need to update the current code page while executing it for /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do ( set _OLD_CODEPAGE=%%a ) if defined _OLD_CODEPAGE ( "%SystemRoot%\System32\chcp.com" 65001 > nul ) set VIRTUAL_ENV=E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv if not defined PROMPT set PROMPT=$P$G if defined _OLD_VIRTUAL_PROMPT set PROMPT=%_OLD_VIRTUAL_PROMPT% if defined _OLD_VIRTUAL_PYTHONHOME set PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME% set _OLD_VIRTUAL_PROMPT=%PROMPT% set PROMPT=(venv) %PROMPT% if defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME% set PYTHONHOME= if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH% if not defined _OLD_VIRTUAL_PATH set _OLD_VIRTUAL_PATH=%PATH% set PATH=%VIRTUAL_ENV%\Scripts;%PATH% set VIRTUAL_ENV_PROMPT=(venv) :END if defined _OLD_CODEPAGE ( "%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul set _OLD_CODEPAGE= ) PK{5ZRScripts/pythonw.exenuW+AMZ@ !L!This program cannot be run in DOS mode. $JcEz EzEzA~&A~A~Ez~~ ~RichPEdd" "X@`jP@:P8/0BT@@.text `.rdata\@@.data( \@.pdata8Ph@@_RDATA\p@@.rsrc@:<@@.reloc@BH<H\$WH@IHHT$pAHT$0HHD$(HH\$ HLܓHH\$PH@_LL$ SUVWAVH@IL$IHHhLt$0LHD$(LHHl$ HxHH@A^_^][HL$HT$LD$LL$ SH@H=ǎHt.Ht$8Ht$XHE3LHt$ HHt$8H@[HHHD$0DD$(AHT$ 3 HHHT$LD$LL$ SWH赅H+HcnH3H$0H$pHL$0HD$ LDHc؅uLH$0Xx3H$0+HD$ HcL $HL$0IH YQE3L$HT$03OH\$WH@HH3D$0H LD$(LL$ HH؅u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t t,t@tPtbtltxttttrpbpptnbnHn8'@8'@0@P@P@p?@@@@@$y@5@@h@܆@L@@@/@@ @(@8@ H@ X@ h@ x@ @@ @ @ @Ȼ@ ػ@ @ @@@@ @@@@@ @(@4@8@<@@@D@H@L@P@T@X@\@`@d@h@l@p@t@x@|@@@@@@@@@@@@@@ @ м@ؼ@@@@(@H@h@@@Ƚ@#@@ 8@X@&@@@@@о@#@@ @ @@@`@%@$@%ؿ@+@(@ P@"x@(@*@@ @ @ @0@H@h@@@@8@L@@x@X@@@__based(__cdecl__pascal__stdcall__thiscall__fastcall__vectorcall__clrcall__eabi__swift_1__swift_2__swift_3__ptr64__restrict__unalignedrestrict( new delete=>><<!==!=[]operator->*++---+&->*/%<<=>>=,()~^|&&||*=+=-=/=%=>>=<<=&=|=^=`vftable'`vbtable'`vcall'`typeof'`local static guard'`string'`vbase destructor'`vector deleting destructor'`default constructor closure'`scalar deleting destructor'`vector constructor iterator'`vector destructor iterator'`vector vbase constructor iterator'`virtual displacement map'`eh vector constructor iterator'`eh vector destructor iterator'`eh vector vbase constructor iterator'`copy constructor closure'`udt returning'`EH`RTTI`local vftable'`local vftable constructor closure' new[] delete[]`omni callsig'`placement delete closure'`placement delete[] closure'`managed vector constructor iterator'`managed vector destructor iterator'`eh vector copy constructor iterator'`eh vector vbase copy constructor iterator'`dynamic initializer for '`dynamic atexit destructor for '`vector copy constructor iterator'`vector vbase copy constructor iterator'`managed vector copy constructor iterator'`local static thread guard'operator "" operator co_awaitoperator<=> Type Descriptor' Base Class Descriptor at ( Base Class Array' Class Hierarchy Descriptor' Complete Object Locator'`anonymous namespace'@0@p@api-ms-win-core-fibers-l1-1-1api-ms-win-core-synch-l1-2-0kernel32api-ms-FlsAllocFlsFreeFlsGetValueFlsSetValueInitializeCriticalSectionEx) C@U@T\@Unknown exceptionxC@U@T\@bad exception"hR "RR0mscoree.dllCorExitProcess(null)(null)   ",Y "Z Z(L@@@@@@P@@(?@D?@@l@@@@Я@@+@@,@@@@`@@        ! 5A CPR S WY l m pr  )   Y* @@@@@@@@@@@@@@@@INFinfNANnanNAN(SNAN)nan(snan)NAN(IND)nan(ind)e+000@@@@@@@ @@ @(@8@D@P@\@`@d@h@l@p@t@x@|@@@@@@@@l@@@@@@@@@@@ @8@H@P@X@`@h@p@x@@@@@@@@@@@ @(@0@8@@@H@P@X@`@h@x@@@(@@@@@@@ @4@<@H@`@@@SunMonTueWedThuFriSatSundayMondayTuesdayWednesdayThursdayFridaySaturdayJanFebMarAprMayJunJulAugSepOctNovDecJanuaryFebruaryMarchAprilJuneJulyAugustSeptemberOctoberNovemberDecemberAMPMMM/dd/yydddd, MMMM dd, yyyyHH:mm:ssSunMonTueWedThuFriSatSundayMondayTuesdayWednesdayThursdayFridaySaturdayJanFebMarAprMayJunJulAugSepOctNovDecJanuaryFebruaryMarchAprilJuneJulyAugustSeptemberOctoberNovemberDecemberAMPMMM/dd/yydddd, MMMM dd, yyyyHH:mm:ssen-US`@@@@`@@@0@P@@@@`@@@`@p@x@@@@api-ms-win-core-datetime-l1-1-1api-ms-win-core-file-l1-2-4api-ms-win-core-file-l1-2-2api-ms-win-core-localization-l1-2-1api-ms-win-core-localization-obsolete-l1-2-0api-ms-win-core-processthreads-l1-1-2api-ms-win-core-string-l1-1-0api-ms-win-core-sysinfo-l1-2-1api-ms-win-core-winrt-l1-1-0api-ms-win-core-xstate-l2-1-0api-ms-win-rtcore-ntuser-window-l1-1-0api-ms-win-security-systemfunctions-l1-1-0ext-ms-win-ntuser-dialogbox-l1-1-0ext-ms-win-ntuser-windowstation-l1-1-0advapi32kernelbasentdllapi-ms-win-appmodel-runtime-l1-1-2user32ext-ms-LCMapStringExLocaleNameToLCIDAppPolicyGetProcessTerminationMethod ((((( H   !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_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@`@p@@@@@@@@@@ @! @"0@#@@$P@%`@&p@'@)@*@+@,@-@/@2@4@5@6(@78@8H@9X@:h@;x@>@?@@@A@C@D@E@F@G@I @J0@K@@LP@N`@Op@P@R@V@W@Z@e@k@l@@@@ @ 0@ @@ P@`@p@@@@@,@;@>@C@k@ (@ 8@ H@ X@ h@ x@ @; @k @@@@ @ @ @ @;0@@@P@`@ p@ @ @@;@@ @ @ @@; @0@ @@ P@`@;x@ @ @ @; @$@ $@ $@;$@(@ (@ ((@,8@ ,H@ ,X@0h@ 0x@ 0@4@ 4@ 4@8@ 8@<@ <@@@ @@ D(@ H8@ LH@ PX@|h@|x@arbgcazh-CHScsdadeelenesfifrhehuisitjakonlnoplptroruhrsksqsvthtruridbesletlvltfavihyazeumkafkafohimskkkyswuzttpagutateknmrsamnglkoksyrdivar-SAbg-BGca-EScs-CZda-DKde-DEel-GRfi-FIfr-FRhe-ILhu-HUis-ISit-ITnl-NLnb-NOpl-PLpt-BRro-ROru-RUhr-HRsk-SKsq-ALsv-SEth-THtr-TRur-PKid-IDuk-UAbe-BYsl-SIet-EElv-LVlt-LTfa-IRvi-VNhy-AMaz-AZ-Latneu-ESmk-MKtn-ZAxh-ZAzu-ZAaf-ZAka-GEfo-FOhi-INmt-MTse-NOms-MYkk-KZky-KGsw-KEuz-UZ-Latntt-RUbn-INpa-INgu-INta-INte-INkn-INml-INmr-INsa-INmn-MNcy-GBgl-ESkok-INsyr-SYdiv-MVquz-BOns-ZAmi-NZar-IQde-CHen-GBes-MXfr-BEit-CHnl-BEnn-NOpt-PTsr-SP-Latnsv-FIaz-AZ-Cyrlse-SEms-BNuz-UZ-Cyrlquz-ECar-EGzh-HKde-ATen-AUes-ESfr-CAsr-SP-Cyrlse-FIquz-PEar-LYzh-SGde-LUen-CAes-GTfr-CHhr-BAsmj-NOar-DZzh-MOde-LIen-NZes-CRfr-LUbs-BA-Latnsmj-SEar-MAen-IEes-PAfr-MCsr-BA-Latnsma-NOar-TNen-ZAes-DOsr-BA-Cyrlsma-SEar-OMen-JMes-VEsms-FIar-YEen-CBes-COsmn-FIar-SYen-BZes-PEar-JOen-TTes-ARar-LBen-ZWes-ECar-KWen-PHes-CLar-AEes-UYar-BHes-PYar-QAes-BOes-SVes-HNes-NIes-PRzh-CHTsr;@B@,@qp@@@@@@ @0@@@P@`@p@@@C@@@@)@@kx@!@cx@@D @}0@@H@E@X@Gh@@x@H@@@@I@@x@A@@@J@@@@(@8@H@X@h@x@@@K@@@ @@@@@@(@8@H@X@h@x@@@@@@@@@#@e@*@l@&@h@ (@L@.8@s@ H@X@h@x@M@@`@>@(@7@@ @N@/@t8@@@Z@ @O@(@jp@(@a@8@P@H@X@Q@h@R@-x@r@1@x@@:@@h@?@@S@2@y@%@g@$@f@@+@m@X@=(@H@;8@@0H@X@wh@ux@U@@@T@@@ @6@~@@V @@W@@@(@(@8@X0@H@YP@<X@h@x@v@@@@[@"@d@@@@@@H@@\x@(@@@X@p@P@@@]@3@zp@@@0@8@8@9@X@@^@n`@@_@5@|4@ (@bh@8@`@4H@`@{@'x@i@o@@@@@@@F@paf-zaar-aear-bhar-dzar-egar-iqar-joar-kwar-lbar-lyar-maar-omar-qaar-saar-syar-tnar-yeaz-az-cyrlaz-az-latnbe-bybg-bgbn-inbs-ba-latnca-escs-czcy-gbda-dkde-atde-chde-dede-lide-ludiv-mvel-gren-auen-bzen-caen-cben-gben-ieen-jmen-nzen-phen-tten-usen-zaen-zwes-ares-boes-cles-coes-cres-does-eces-eses-gtes-hnes-mxes-nies-paes-pees-pres-pyes-sves-uyes-veet-eeeu-esfa-irfi-fifo-fofr-befr-cafr-chfr-frfr-lufr-mcgl-esgu-inhe-ilhi-inhr-bahr-hrhu-huhy-amid-idis-isit-chit-itja-jpka-gekk-kzkn-inkok-inko-krky-kglt-ltlv-lvmi-nzmk-mkml-inmn-mnmr-inms-bnms-mymt-mtnb-nonl-benl-nlnn-nons-zapa-inpl-plpt-brpt-ptquz-boquz-ecquz-pero-roru-rusa-in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!`o(Sd42 p d T 42p t d T 4Rd T 4 Rpb+ dT4p8@d42 pd42 pd42 pd42 pT4 p `  4 Rp2 !d!4! p P8! !d !T !4!2p+  p`0P8dT42p t d T 4R t d T 4R t d T 4R42 p,b b2P t d T 4Rd T 4 Rpb+ dT4p8@d42 pd42 pd42 pd42 pT4 p `  4 Rp 4 p ` PdT42p44 t d T 4R t d T 4R t d T 4R44 t dT4220d42 pt4 PdT42p  rP42 p,z2P4 p `,02P  4 2pt d 4 Rਗ6LM2Pt4 Pd 4R p4 R p,)6xRP  4 2p2020B 8!( ( tdT4kW!kW  t d 4R,RP 4R p ` Pp0Pd42 p42 p,FP2P  4 2pd42 pdT42p4 R p`P20 td4 b>\0  4 2pBB42 p42 p d T 4 Rp42 p  4 2pBB t420Bd 4Rp, CÝ2PBr P b>\0 d T 42p d T 42p42 p,]gݝ2P42 p,2PBBB2020BB20B202020bB. d4 p P8d T 4Rpd42 pd42 p  4 PBB2020  202020202020d 4  p t d T 4 R tdT 4  t d T 42 dT4p d T 42pdT 4 p tT 4 T4 rp` t d T 4RB4 p`P8@  4 2p20  20BBd42 p20d42 pd42 p  20  4 2p  P  rP42 p,!2P42 p,E2P42 p, _2P42 p,Q_+2P20,y2P  4 2p tdT4 t dT4220t20d42 pdT 4 p  4 2p20 d T 4 2p  4 Rp,*2P20  b42 p,s2Pt4 P  p`0P4R`,ŞRP3 %4" p`Px- T4 p `8@- T4 p `8@1 T4 p `8`20 ' ܞ2Pd T42pdT 4 p t dT42t4 Pd42 p42 p,G2P  d 4 2Р,(2P 4 p ` P T4R p ` 4R p`Ptd42(td4P8p0 4bX p`P8 dT 4 RpBB% T4r p `88r0  4 2pd42 p +\+@2P% %dS%4R%NpP+t4 P8p4 r p,#H%&2P4pdT42pB t d 4 R,34r2Ptd42 t dT42dT42pd42pt d 4R,2^2Y2P2 0  20T42`  4 2p- 5td43 P8XBdT42p  20  4 2p,=>2P  4 2pdT42pBd42 p  4 2p  4 2p20,@@2PB d4r p,qB&CԟCCԟ2P42 p,@@2Pd T 4RpdT42pd42 p+  p`0P8 D p`P0!CEGe!EGeBr0 T4 R pd42 pd42 p20d T42pd T42pB d T 42pdT 4 pt4 Pt4 P4R`ZffRPd T 4Rp  BB tdT 4 rb' 't!'d'4'P  4 pk:k rPT 4 R p `T42 p d T 4 Rp  4 2pd4 p- Utd4S P8XBB  4 2p2020  4 2p20  htt d4r p`P080r0d T 4 rpBt4 P t d T 4220 d 4 2 ,#,,2P0d42 p& h  p`0P80  hbBt d42P20 d 42 p,Ҕٔٔ2PB20  4 2p,ЕЕ2P200B t dT42  4 2p4UjjjxTXU(nn@kTpnpȲ.upuutttpppppq*qFq`qvqqqqqqqrrLuJrrr~rrrrrrrrr ss0sBsNsZsfstssssssssstt t,t@tPtbtltxttttrpbpptnbnHnGetFileVersionInfoSizeWVerQueryValueWGetFileVersionInfoWVERSION.dllGetStartupInfoWSetConsoleCtrlHandler`SetInformationJobObjectlQueryInformationJobObjectGetCommandLineW2GetCurrentProcessGetStdHandle&AssignProcessToJobObjectGetModuleFileNameWFSetEnvironmentVariableWUGetEnvironmentVariableWaGetFileAttributesWADuplicateHandleMultiByteToWideCharFormatMessageW}GetLastErrorWaitForSingleObjectExCloseHandleCreateJobObjectACreateProcessWXGetExitCodeProcessKERNEL32.dllPostMessageAMessageBoxWGetMessageAUSER32.dllRtlCaptureContextRtlLookupFunctionEntryRtlVirtualUnwindUnhandledExceptionFilterSetUnhandledExceptionFilterTerminateProcessIsProcessorFeaturePresentpQueryPerformanceCounter3GetCurrentProcessId7GetCurrentThreadId GetSystemTimeAsFileTimeInitializeSListHeadIsDebuggerPresentGetModuleHandleWRtlUnwindExdSetLastErrorIEnterCriticalSectionLeaveCriticalSection#DeleteCriticalSectionInitializeCriticalSectionAndSpinCountTlsAllocTlsGetValueTlsSetValueTlsFreeFreeLibraryGetProcAddressLoadLibraryExWEEncodePointerRaiseExceptionRtlPcToFileHeaderxExitProcessGetModuleHandleExWGetCommandLineAKWriteFilepHeapFreelHeapAllocjGetFileTypeFlsAllocFlsGetValueFlsSetValueFlsFreeLCMapStringWFlushFileBuffersGetConsoleOutputCPGetConsoleModeGetStringTypeWReadFileReadConsoleWFindCloseFindFirstFileExWFindNextFileWIsValidCodePageGetACPGetOEMCPGetCPInfo7WideCharToMultiByteSGetEnvironmentStringsWFreeEnvironmentStringsWSetStdHandleGetProcessHeaphGetFileSizeExUSetFilePointerExCreateFileWuHeapSizesHeapReAllocJWriteConsoleWBSetEndOfFile] f2-+    p@Ȃ@Ȃ@Ȃ@Ȃ@Ȃ@`@@p@0@`@ @C r@ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`y!@~ڣ @ڣ AϢ[@~QQ^ _j21~@l@l@l@l@l@l@l@l@l@@p@p@p@p@p@p@p@..upythonX<@7@7@7@7@6@.?AVbad_exception@std@@6@.?AVexception@std@@6@.?AVtype_info@@h0KpK@KkKpK :K:KLL,L8L`O>[>hO\>n>@Op>>PO>>HO>>XO>:?tOP?`?Op?EOEFOF9FOHFFOFFOFH(QHIhQIJQJ]OQ`OyQQ|QRQRTQT8UPXUUPUUPU&VP(VX\PXXPX&ZO(ZZHPZ[P[8\P\\R\\R]&]R0]w]Rx]^ R^-^4R0^^h\@\0\[D\D\\\]\]3]4q^t]]t] `] |]kh]l?(]@8]@]jP]l] ]h^^4^@\^@^t^t^\^\H^H^^ ^_4_<_L_D__`(`$H`$x__ _ : l`X C `D F`H`[`\` ``NaPxa6(a8`aaa !a!#a#Z%b\%%Hb%t&Pbt&[(b\(*b*+\b++ b+,b,.(bP/.0b000b0q1xct11c1l2c2S3`c|34c4v5Lcx55 c 67c77c77c78c8:c;<,d<<@d==$d=&>Hd(>>td>%?d(?D?dP??d?*@d4@r@dt@@d@@ true PNG  IHDR\rf pHYsod IDATx{u߿ rIZ4J-ZKa،])?&Smܦm&m'Iڼkn^Gk)qڵEْ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|[[XVVRRRQOJJHHHDDAAu_el~[XWXXVVRRQOJJJHFFDDE_39[[XXXXVRVRRQOJJHHFDD_|X[X[X[VVRRRQOJJJHHF_$*yVRRQOJJHH_$$0jjjjhhghmxRQQOJJH_'$ \RRQOJJ_5'' /VRRRQO_e'''$ XVVRRR_aaaaaaaaa))$$ WXVRVy_d)(($ [XXXV_p4''' [[[\_* _< __<(.9 __aaaaaaaaaaaaaaaa>$k __e(k __'19$n__t6($$.o__tsqs____aaaaaaaaaa_________^^]`_`^^```^,88888888888888888888888888888888888888* 2222?222?( @eeei0l2l2n4p5q6s8u9w;y<{>|>z{B}@zH|J~@Ішӌ$֕4BCDEFJHIJQYmWŚcɞgœl¡w;<AEKGIMQWRUY\ip^aeimrtpzyrʬɬټ׼׽ūƬȭμͱѹӻY?-*-?YT--,+*78Tv653-,+op*|v:655--32*|D`v<:66T\YVVwwwwwwwwwF ^C<::6633-,++UwwwwwwwwK ^CC@@:6633-,+*lwwwwwwww' NCCC@@::65---,Awwwwwwww (ZCCC@@::665-,3wwwwwwwwz GgllklkZC6653-wwwwwwww  _@6656wwwwwwww%  \@66TwwEEEEEEqH  i@@;Zwwwwwwwwwt&  i@@C|wwwwwwwwwzzcQQMOKK#ummhwwwwwwwwwwwwwr xwzwwEEEEEEEEEEErcJ zwwwwwwwwwwwwwwwx bJ !wwwwwwwwwwwwwwwO$ "fwwwwwwwwwwwwwwwwrfcfrwwwwwwEEEEEEEwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww`]E`q``q``q``q``q``q`aaaah`]]``q``q``q``q``q``qaaaaa?(0@i0m3n4q6t9w;x;y<{>|>zA}@~@ȋ/Г7HCCDEFIOIR_\`ceiؚ@՟OϝQՠQܥRا^ޫ_řbˤqf=ADGJMQRVZ^bfimqzs­ŮͲʰѵ׺и׼һս˴ǨӼ{nn{}}X/+**:{l22-+\]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zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz߬`߬`߬`Ԏ'|ԏ(zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz( @ vy/sL?Fm.ʄUPKFAbh|a\WRMH;hc^YTOWV@eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeoje`5eeeɩz=u9sqlfb]XSNIDAeeeŨ}?z=w;sssnhd_ZUPKFAzeeeÛiA|?z=Ͼssssokfa\WRMHyeeeICA|?ossssqmhc^YTOTeeeHECA|>ŧpe`[VQeeeJGEC~@{>xxw;t9q7o4l2i0sokeeeʞeKIFDB}?z=w;t9q6n4k2ss{"eeeӻѸɮȭǬūlw;t8q6n4IeeeHFCA|?y=v:s8p6eeeeeeJԽչCA|>yxssspjc\VOIeeeGDAcqf_XReeeJGD~@~D\\YXhb[eeeǙ_IFC~@z=v:r7n4j1°qkdeeeȧLIFC}@y=u9q6m3sseeeܿ׹Ѳϯ̭{@u9q6įeeeԻIMB|?xw;зeeeeeeͣnPGDA]eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz(  @XNPD|;p;f}\RH>;eeeeeeeeeeeeeeeeeeeeesj`VLB eeeϴz=sndZPF<eeeNAssqh^TJieeeJELlbX}eeețbID}@w;q7n4ofWeeeҰ˦wğp^w;q6tseeeԴǟnC|>v:eeeδˤrGBheeeeeeeeeeeeeeeeeeeeezzzzzzzzzzzzzzzzzzzzzzzzzzzz G:@@(00 h ).@@ (B00 %     h Python Launcher for Windows Version %s usage: %s [launcher-args] [python-args] [script [script-args]] Launcher arguments: -2 : Launch the latest Python 2.x version -3 : Launch the latest Python 3.x version -X.Y : Launch the specified Python version The above default to an architecture native runtime, but will select any available. Add a "-32" to the argument to only launch 32-bit runtimes, or add "-64" to omit 32-bit runtimes (this latter option is deprecated). To select a specific runtime, use the -V: options. -V:TAG : Launch a Python runtime with the specified tag -V:COMPANY/TAG : Launch a Python runtime from the specified company and with the specified tag -0 --list : List the available pythons -0p --list-paths : List with paths If no options are given but a script is specified, the script is checked for a shebang line. Otherwise, an active virtual environment or global default will be selected. See https://docs.python.org/using/windows.html#python-launcher-for-windows for additional configuration. The following help text is from Python: 4VS_VERSION_INFO 6 6?StringFileInfo000004b0VCompanyNamePython Software Foundation6FileDescriptionPython.FileVersion3.11.4@InternalNamePython Launcher0LegalCopyrightCopyright 2001-2023 Python Software Foundation. Copyright 2000 BeOpen.com. Copyright 1995-2001 CNRI. Copyright 1991-1995 SMC.6OriginalFilenamepy.exe.ProductNamePython2ProductVersion3.11.4DVarFileInfo$Translation (8H`hpxУأ 0@P`pФ 0@P`pХ 0@P`pЦ 0@P`pЧ 0@P`pШ 0@P`pЩ 0@P`pЪء衸ȣ (08HPX`hpxȧЧاPX`hpxȩ08@HPX`hpxȪЪت (08@HPX`hpxȫЫث (08@HPX`hpxȬЬج<ȠРؠ (08@HPخ8HXhxȩة(8HXhxȪت(8HXhxȫث(8HXhxȬج(8HXhxȭح(8HXhxȮخ(8HXhxȯد(8HXhxȠؠ(8HXhxȡء(8HXhxȢآ(8HXhxȣأ(8HXhxȤؤ(8HXhxȥإ(8HXhxȦئ(8HXhУ 0@P`pФ 0@P`pХ 0@P`pЦ 0@P`pЧ 0@P`pШ 0@P`pЩ 0@P`pЪ 0@P`pЫ 0@P`pЬ 0@P`pЭ 0@P`pЮ 0@P`pЯ@ 0@P`pР 0@P`p0 Цئ@H`h (X`ȡ(Xpx`hpxȩЩة@PX`hxȪ/0/ *H .0.10  `He0\ +7N0L0 +70 010  `He Ce^6k J !\-'Huq00xW!29wu\0  *H  0b1 0 UUS10U  DigiCert Inc10U www.digicert.com1!0UDigiCert Trusted Root G40 130801120000Z 380115120000Z0b1 0 UUS10U  DigiCert Inc10U www.digicert.com1!0UDigiCert Trusted Root G40"0  *H 0 sh޻]J<0"0i3§%.!=Y)=Xvͮ{ 08VƗmy_pUA2s*n|!LԼu]xf:1D3@ZI橠gݤ'O9X$\Fdivv=Y]BvizHftKc:=E%D+~am3K}Ï!Ռp,A`cDvb~d3щίCw !T)%lRQGt&Auz_?ɼA[P1r" |Lu?c!_ QkoOE_ ~ &i/-٩B0@0U00U0Uq]dL.g?纘O0  *H  a}lđádhVwpJx\ _)V 6I]Dcଡ଼f# =ymkTY9"SD]Pz}b! sfѠ`_襴m5|Z֢8xM Gr 20Y.qVjoPmhz6z$ Pz#aB)͢ Aќd&LPAq=?Mp# J܁2  Ok t094!U2qI(PMMuACDO,6E#SlogUFL?n(Zy&ҤbJGJ gf~[A;;cTQ*xίI󒙶a҅POBl C:qM&5]b2Ҡ+TWJ'S趉m[h#QV𦀠Su)wތ!G=uf~00@`ҜL^ͩ0  *H  0b1 0 UUS10U  DigiCert Inc10U www.digicert.com1!0UDigiCert Trusted Root G40 210429000000Z 360428235959Z0i1 0 UUS10U DigiCert, Inc.1A0?U8DigiCert Trusted G4 Code Signing RSA4096 SHA384 2021 CA10"0  *H 0 մ/B(x]9YB3=pŻą&0h\4$KOxCgROẂ>Mp$d}4}LWkC;GZL %Ӌ eI5=Q!xE.,IpB2ehMLHRhW]eO,HV5.7|2t9`ֹ1ܭ#GGnmjg-ҽD; Ǜ2Zj`TI\o&ղ8Αoa4\E(6*f(_s΋&%\Lb^3 +6yue̻HPwPFaX|<(9Է SGu00v[K]taM?v޿Xr)Am&vhAX&+MYxρJ>@G_ɁPs#!Y`dT!8|fx8E0OcOL SA|X=G2 l< VY0U0U00Uh7;_a{eNB0U#0q]dL.g?纘O0U0U% 0 +0w+k0i0$+0http://ocsp.digicert.com0A+05http://cacerts.digicert.com/DigiCertTrustedRootG4.crt0CU<0:08642http://crl3.digicert.com/DigiCertTrustedRootG4.crl0U 00g 0g 0  *H  :#D=v:VH4,tfrʯl0'DK|&7:]Hm?I'EPv~7q"Zj PyH~؀aVv_C>v9=ԙJ(_&XH'?v`\ 98Nn6!SZj>C3O8Tm]@3|╲!usRF4Kov7,?&C p)5\8U7 1.\9qᾜ &gN_zI.t<V+#{pk栺:?ERAHKMD@(V*/ d<3(<ˏ ;{˷w(?/"lA\flņ&3 Kjj@0HK4Q Y mP+JtRH!W;Eanh&`ȯc:VxN0w0_0 %# 0  *H  0i1 0 UUS10U DigiCert, Inc.1A0?U8DigiCert Trusted G4 Code Signing RSA4096 SHA384 2021 CA10 220117000000Z 250115235959Z0|1 0 UUS10 UOregon10U Beaverton1#0!U Python Software Foundation1#0!UPython Software Foundation0"0  *H 0 "jM ħlbcC/=;W03ɼ7Ud<OK "aeG%r5feؒ:a !..R1Fu$AZ܁g[g46F4gڟwŒOQ\*; #m_ȃaxur0$"GȮ؃c2=eJ9c~83HCӞ/r2tdV y,wa/ YX~ q JiN9OD7ZG4%z#3u5*؃H6NL9㽄{iLJd&&h#{Jz!yr;U 70503g 0)0'+http://www.digicert.com/CPS0+00$+0http://ocsp.digicert.com0\+0Phttp://cacerts.digicert.com/DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt0 U00  *H  omBH.}pa.miN#\ڻ$|}MKIhC5<5HdsᦱkO>U\ )8Kj3Oy.&䙓sBZ,k5g ,pekHAvu?U!t]qZ@P験"([h[rQU,9s="NqEI^0oH*ppZIZnBMI3Ls!:ZhRrGl#u: 9)>?D}[xR<*ٱ6[[ t1ԃ(Ȱ}j޾UwNq!9a T[2T3NGo!O\|T.]Ndr%2ukm_~'OD T Q !-4p2Tk=ېĬ3r$޹LQV˸^3꟱kIQי鷯t: D%ZmdzXprX , )gEH#?EGŦ`100}0i1 0 UUS10U DigiCert, Inc.1A0?U8DigiCert Trusted G4 Code Signing RSA4096 SHA384 2021 CA10 %# 0  `He0 *H  1  +70 +7 10  +70/ *H  1" 6sXHhCǽ&0\ +7 1N0LFDBuilt: Release_v3.11.4_20230607.010  *H #Э~R^1_K&'{en^l(sϧ4E_:™yD"E XW< 4m&G2ѩ5ΆJIa.`AX[^k-3;:]E:14+G%&)#r=t٘;/0Cu^N9-&@rV ʜu =3K) u]ϖ#J9wN/f[5m$a: EhT ?ڄ܄3JSUfI1T kU` "zJ2:b we( 3FZ(xϕ|t ASG&&_4QB a|ԺjYdZη8Y\NxQo0: +71*0& *H 010  `He0x *H  ig0e `Hl010  `He Dtaiw`C 7>j>gPASXu9 20230607055743Z00 MirK<*J=)=Z0  *H  0c1 0 UUS10U DigiCert, Inc.1;09U2DigiCert Trusted G4 RSA4096 SHA256 TimeStamping CA0 220921000000Z 331121235959Z0F1 0 UUS10U DigiCert1$0"UDigiCert Timestamp 2022 - 20"0  *H 0 &:Ʃk ۡt3&U6mU a w=/kdב81r:U3a(ېc\S:-B&xxzVdS*PHi /};S@rI(LVa:}nf\/MhjyF)>&LfȻP8 匔]Z{@noGy> ^f $ҜOnx(?P75xX9L~M­~-+F9Oq.KO{6DU6|1R{Z~%sj!-cYM/'ҫ8fQkSC9dV mdxs!/. ׁ]Kn1)AeX.)ad lQ` %S;j9bօٍyb{gxƈȰn2y Y,|{dĸS^_U})YN]Es~:w00U0 U00U% 0 +0 U 00g 0  `Hl0U#0mM/s)v/uj o0Uba1 =*R0ZUS0Q0OMKIhttp://crl3.digicert.com/DigiCertTrustedG4RSA4096SHA256TimeStampingCA.crl0+00$+0http://ocsp.digicert.com0X+0Lhttp://cacerts.digicert.com/DigiCertTrustedG4RSA4096SHA256TimeStampingCA.crt0  *H  U*FxW70uOօ#9%rwd6IQ,xcU F9iʛ)?x|Sbaf*EJB+P0 - y }jS` 裸׭Aߝ_J:R I56YTҲ~^ vTtmg+v&8D Yk">D!?|Hؒ OC_jY'b+AS4g&2{\B KJӘE`3#EGθBGA6qwtN.Z"OQ/_'.W`xVj•KȂ|qNzlZȟ\C*bx۽[ p~x]G,c%8?:~,LMrU,'aw0067$T|G(f*^[0  *H  0b1 0 UUS10U  DigiCert Inc10U www.digicert.com1!0UDigiCert Trusted Root G40 220323000000Z 370322235959Z0c1 0 UUS10U DigiCert, Inc.1;09U2DigiCert Trusted G4 RSA4096 SHA256 TimeStamping CA0"0  *H 0 Ɔ5I=rIQU%7Q҃ўLm̃ZDB_h} 3P &smW}Cs+"=+>BgQ=V(-ӱue)iِF{DA|jWz7y]dRvGa_T !hn7!@_J}9gcl6 \dt@rźNXMy׏s,9H1W)'.NvU&p&G CCc{un'%:8;["ق*ǒ>sZlR+Xt@(sCJk8)ʪsBhF:^KvQɌ ;["&}_#dc>t? v]Fu`X (T]^0Fvk 3ͱ]0Y0U00UmM/s)v/uj o0U#0q]dL.g?纘O0U0U% 0 +0w+k0i0$+0http://ocsp.digicert.com0A+05http://cacerts.digicert.com/DigiCertTrustedRootG4.crt0CU<0:08642http://crl3.digicert.com/DigiCertTrustedRootG4.crl0 U 00g 0  `Hl0  *H  }YoD"~f!B.M0SοP]K)p )ii>` \[m %41gͶoPLb Vs"%Εi?GwrtO,zC_`Of,d&l|p |屮uOZ](TՊqver#'D'$&*yV Ečrjq Ķ͇$OIwfrKR7~S;I9z%c',=?kfAO@!!@з$x:䞭4q&k8sO?;xLĕ{ _39Axz8#(_+~Fu,',&o{6Yp7 O'`gfU:)+A:1b  Wټ2]# v&evB) G+UT++/DJ78+|00u-P@Z0  *H  0e1 0 UUS10U  DigiCert Inc10U www.digicert.com1$0"UDigiCert Assured ID Root CA0 220801000000Z 311109235959Z0b1 0 UUS10U  DigiCert Inc10U www.digicert.com1!0UDigiCert Trusted Root G40"0  *H 0 sh޻]J<0"0i3§%.!=Y)=Xvͮ{ 08VƗmy_pUA2s*n|!LԼu]xf:1D3@ZI橠gݤ'O9X$\Fdivv=Y]BvizHftKc:=E%D+~am3K}Ï!Ռp,A`cDvb~d3щίCw !T)%lRQGt&Auz_?ɼA[P1r" |Lu?c!_ QkoOE_ ~ &i/-٩:060U00Uq]dL.g?纘O0U#0E뢯˂1-Q!m0U0y+m0k0$+0http://ocsp.digicert.com0C+07http://cacerts.digicert.com/DigiCertAssuredIDRootCA.crt0EU>0<0:864http://crl3.digicert.com/DigiCertAssuredIDRootCA.crl0U  00U 0  *H  pC\U8_t=W,^"iT"wmJz/-8r$RN*-V0z^CDC!rH˝Ow'DY/ 4<LJL@5FjiTV=wZ\ToP=v ho 5` X@cŘ"YUk'lvo#-~qj#k"T-'~:𶇖[\MsW^(⹔1v0r0w0c1 0 UUS10U DigiCert, Inc.1;09U2DigiCert Trusted G4 RSA4096 SHA256 TimeStamping CA MirK<*J=)=Z0  `He0 *H  1  *H  0 *H  1 230607055743Z0+ *H   1000"M35|s0/ *H  1" c_܍PDc N@1;'07 *H  /1(0&0$0" 2( &:Ox-dLuW#0  *H IdfEuG[M5׫J™F5O~\/䝺L%_%䡧~Po-vhmG/(<K|̃>R_/YWCب9$2GMSNs̞wFO=e Vrɪ1(Ŭq R@,Rk~f%_Y?OZr"d'WI\ 4Ua>M*B3au*p.R܋Q\['^6Ts9 ?:/=A'jNue{J O:fB1(tvKO~lF.a GG#sSSќ8z ,=vvbmNN~] F^<\,J͞*-!;FY=o fеa)Hk, lG{]qPF@:b{r-B;l[D#`Y;ńdPK{5Z pyvenv.cfgnuW+Ahome = C:\Users\Developer\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0 include-system-site-packages = false version = 3.11.4 executable = C:\Users\Developer\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe command = C:\Users\Developer\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe -m venv E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv PK{5Z~()Lib/site-packages/setuptools/installer.pynuW+Aimport glob import os import subprocess import sys import tempfile import warnings from distutils import log from distutils.errors import DistutilsError import pkg_resources from setuptools.wheel import Wheel from ._deprecation_warning import SetuptoolsDeprecationWarning def _fixup_find_links(find_links): """Ensure find-links option end-up being a list of strings.""" if isinstance(find_links, str): return find_links.split() assert isinstance(find_links, (tuple, list)) return find_links def fetch_build_egg(dist, req): # noqa: C901 # is too complex (16) # FIXME """Fetch an egg needed for building. Use pip/wheel to fetch/build a wheel.""" warnings.warn( "setuptools.installer is deprecated. Requirements should " "be satisfied by a PEP 517 installer.", SetuptoolsDeprecationWarning, ) # Warn if wheel is not available try: pkg_resources.get_distribution('wheel') except pkg_resources.DistributionNotFound: dist.announce('WARNING: The wheel package is not available.', log.WARN) # Ignore environment markers; if supplied, it is required. req = strip_marker(req) # Take easy_install options into account, but do not override relevant # pip environment variables (like PIP_INDEX_URL or PIP_QUIET); they'll # take precedence. opts = dist.get_option_dict('easy_install') if 'allow_hosts' in opts: raise DistutilsError('the `allow-hosts` option is not supported ' 'when using pip to install requirements.') quiet = 'PIP_QUIET' not in os.environ and 'PIP_VERBOSE' not in os.environ if 'PIP_INDEX_URL' in os.environ: index_url = None elif 'index_url' in opts: index_url = opts['index_url'][1] else: index_url = None find_links = ( _fixup_find_links(opts['find_links'][1])[:] if 'find_links' in opts else [] ) if dist.dependency_links: find_links.extend(dist.dependency_links) eggs_dir = os.path.realpath(dist.get_egg_cache_dir()) environment = pkg_resources.Environment() for egg_dist in pkg_resources.find_distributions(eggs_dir): if egg_dist in req and environment.can_add(egg_dist): return egg_dist with tempfile.TemporaryDirectory() as tmpdir: cmd = [ sys.executable, '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', tmpdir, ] if quiet: cmd.append('--quiet') if index_url is not None: cmd.extend(('--index-url', index_url)) for link in find_links or []: cmd.extend(('--find-links', link)) # If requirement is a PEP 508 direct URL, directly pass # the URL to pip, as `req @ url` does not work on the # command line. cmd.append(req.url or str(req)) try: subprocess.check_call(cmd) except subprocess.CalledProcessError as e: raise DistutilsError(str(e)) from e wheel = Wheel(glob.glob(os.path.join(tmpdir, '*.whl'))[0]) dist_location = os.path.join(eggs_dir, wheel.egg_name()) wheel.install_as_egg(dist_location) dist_metadata = pkg_resources.PathMetadata( dist_location, os.path.join(dist_location, 'EGG-INFO')) dist = pkg_resources.Distribution.from_filename( dist_location, metadata=dist_metadata) return dist def strip_marker(req): """ Return a new requirement without the environment marker to avoid calling pip with something like `babel; extra == "i18n"`, which would always be ignored. """ # create a copy to avoid mutating the input req = pkg_resources.Requirement.parse(str(req)) req.marker = None return req PK{5Zqo/Lib/site-packages/setuptools/windows_support.pynuW+Aimport platform def windows_only(func): if platform.system() != 'Windows': return lambda *args, **kwargs: None return func @windows_only def hide_file(path): """ Set the hidden attribute on a file or directory. From http://stackoverflow.com/questions/19622133/ `path` must be text. """ import ctypes __import__('ctypes.wintypes') SetFileAttributes = ctypes.windll.kernel32.SetFileAttributesW SetFileAttributes.argtypes = ctypes.wintypes.LPWSTR, ctypes.wintypes.DWORD SetFileAttributes.restype = ctypes.wintypes.BOOL FILE_ATTRIBUTE_HIDDEN = 0x02 ret = SetFileAttributes(path, FILE_ATTRIBUTE_HIDDEN) if not ret: raise ctypes.WinError() PK{5ZVD*Lib/site-packages/setuptools/py34compat.pynuW+Aimport importlib try: import importlib.util except ImportError: pass try: module_from_spec = importlib.util.module_from_spec except AttributeError: def module_from_spec(spec): return spec.loader.load_module(spec.name) PK{5ZT*Lib/site-packages/setuptools/_itertools.pynuW+Afrom setuptools.extern.more_itertools import consume # noqa: F401 # copied from jaraco.itertools 6.1 def ensure_unique(iterable, key=lambda x: x): """ Wrap an iterable to raise a ValueError if non-unique values are encountered. >>> list(ensure_unique('abc')) ['a', 'b', 'c'] >>> consume(ensure_unique('abca')) Traceback (most recent call last): ... ValueError: Duplicate element 'a' encountered. """ seen = set() seen_add = seen.add for element in iterable: k = key(element) if k in seen: raise ValueError(f"Duplicate element {element!r} encountered.") seen_add(k) yield element PK{5ZT+-Lib/site-packages/setuptools/unicode_utils.pynuW+Aimport unicodedata import sys # HFS Plus uses decomposed UTF-8 def decompose(path): if isinstance(path, str): return unicodedata.normalize('NFD', path) try: path = path.decode('utf-8') path = unicodedata.normalize('NFD', path) path = path.encode('utf-8') except UnicodeError: pass # Not UTF-8 return path def filesys_decode(path): """ Ensure that the given path is decoded, NONE when no expected encoding works """ if isinstance(path, str): return path fs_enc = sys.getfilesystemencoding() or 'utf-8' candidates = fs_enc, 'utf-8' for enc in candidates: try: return path.decode(enc) except UnicodeDecodeError: continue def try_encode(string, enc): "turn unicode encoding into a functional routine" try: return string.encode(enc) except UnicodeEncodeError: return None PK{5ZHLb'Lib/site-packages/setuptools/version.pynuW+Aimport pkg_resources try: __version__ = pkg_resources.get_distribution('setuptools').version except Exception: __version__ = 'unknown' PK{5ZQ 8 8'Lib/site-packages/setuptools/sandbox.pynuW+Aimport os import sys import tempfile import operator import functools import itertools import re import contextlib import pickle import textwrap import builtins import pkg_resources from distutils.errors import DistutilsError from pkg_resources import working_set if sys.platform.startswith('java'): import org.python.modules.posix.PosixModule as _os else: _os = sys.modules[os.name] try: _file = file except NameError: _file = None _open = open __all__ = [ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", ] def _execfile(filename, globals, locals=None): """ Python 3 implementation of execfile. """ mode = 'rb' with open(filename, mode) as stream: script = stream.read() if locals is None: locals = globals code = compile(script, filename, 'exec') exec(code, globals, locals) @contextlib.contextmanager def save_argv(repl=None): saved = sys.argv[:] if repl is not None: sys.argv[:] = repl try: yield saved finally: sys.argv[:] = saved @contextlib.contextmanager def save_path(): saved = sys.path[:] try: yield saved finally: sys.path[:] = saved @contextlib.contextmanager def override_temp(replacement): """ Monkey-patch tempfile.tempdir with replacement, ensuring it exists """ os.makedirs(replacement, exist_ok=True) saved = tempfile.tempdir tempfile.tempdir = replacement try: yield finally: tempfile.tempdir = saved @contextlib.contextmanager def pushd(target): saved = os.getcwd() os.chdir(target) try: yield saved finally: os.chdir(saved) class UnpickleableException(Exception): """ An exception representing another Exception that could not be pickled. """ @staticmethod def dump(type, exc): """ Always return a dumped (pickled) type and exc. If exc can't be pickled, wrap it in UnpickleableException first. """ try: return pickle.dumps(type), pickle.dumps(exc) except Exception: # get UnpickleableException inside the sandbox from setuptools.sandbox import UnpickleableException as cls return cls.dump(cls, cls(repr(exc))) class ExceptionSaver: """ A Context Manager that will save an exception, serialized, and restore it later. """ def __enter__(self): return self def __exit__(self, type, exc, tb): if not exc: return # dump the exception self._saved = UnpickleableException.dump(type, exc) self._tb = tb # suppress the exception return True def resume(self): "restore and re-raise any exception" if '_saved' not in vars(self): return type, exc = map(pickle.loads, self._saved) raise exc.with_traceback(self._tb) @contextlib.contextmanager def save_modules(): """ Context in which imported modules are saved. Translates exceptions internal to the context into the equivalent exception outside the context. """ saved = sys.modules.copy() with ExceptionSaver() as saved_exc: yield saved sys.modules.update(saved) # remove any modules imported since del_modules = ( mod_name for mod_name in sys.modules if mod_name not in saved # exclude any encodings modules. See #285 and not mod_name.startswith('encodings.') ) _clear_modules(del_modules) saved_exc.resume() def _clear_modules(module_names): for mod_name in list(module_names): del sys.modules[mod_name] @contextlib.contextmanager def save_pkg_resources_state(): saved = pkg_resources.__getstate__() try: yield saved finally: pkg_resources.__setstate__(saved) @contextlib.contextmanager def setup_context(setup_dir): temp_dir = os.path.join(setup_dir, 'temp') with save_pkg_resources_state(): with save_modules(): with save_path(): hide_setuptools() with save_argv(): with override_temp(temp_dir): with pushd(setup_dir): # ensure setuptools commands are available __import__('setuptools') yield _MODULES_TO_HIDE = { 'setuptools', 'distutils', 'pkg_resources', 'Cython', '_distutils_hack', } def _needs_hiding(mod_name): """ >>> _needs_hiding('setuptools') True >>> _needs_hiding('pkg_resources') True >>> _needs_hiding('setuptools_plugin') False >>> _needs_hiding('setuptools.__init__') True >>> _needs_hiding('distutils') True >>> _needs_hiding('os') False >>> _needs_hiding('Cython') True """ base_module = mod_name.split('.', 1)[0] return base_module in _MODULES_TO_HIDE def hide_setuptools(): """ Remove references to setuptools' modules from sys.modules to allow the invocation to import the most appropriate setuptools. This technique is necessary to avoid issues such as #315 where setuptools upgrading itself would fail to find a function declared in the metadata. """ _distutils_hack = sys.modules.get('_distutils_hack', None) if _distutils_hack is not None: _distutils_hack.remove_shim() modules = filter(_needs_hiding, sys.modules) _clear_modules(modules) def run_setup(setup_script, args): """Run a distutils setup script, sandboxed in its directory""" setup_dir = os.path.abspath(os.path.dirname(setup_script)) with setup_context(setup_dir): try: sys.argv[:] = [setup_script] + list(args) sys.path.insert(0, setup_dir) # reset to include setup dir, w/clean callback list working_set.__init__() working_set.callbacks.append(lambda dist: dist.activate()) with DirectorySandbox(setup_dir): ns = dict(__file__=setup_script, __name__='__main__') _execfile(setup_script, ns) except SystemExit as v: if v.args and v.args[0]: raise # Normal exit, just return class AbstractSandbox: """Wrap 'os' module and 'open()' builtin for virtualizing setup scripts""" _active = False def __init__(self): self._attrs = [ name for name in dir(_os) if not name.startswith('_') and hasattr(self, name) ] def _copy(self, source): for name in self._attrs: setattr(os, name, getattr(source, name)) def __enter__(self): self._copy(self) if _file: builtins.file = self._file builtins.open = self._open self._active = True def __exit__(self, exc_type, exc_value, traceback): self._active = False if _file: builtins.file = _file builtins.open = _open self._copy(_os) def run(self, func): """Run 'func' under os sandboxing""" with self: return func() def _mk_dual_path_wrapper(name): original = getattr(_os, name) def wrap(self, src, dst, *args, **kw): if self._active: src, dst = self._remap_pair(name, src, dst, *args, **kw) return original(src, dst, *args, **kw) return wrap for name in ["rename", "link", "symlink"]: if hasattr(_os, name): locals()[name] = _mk_dual_path_wrapper(name) def _mk_single_path_wrapper(name, original=None): original = original or getattr(_os, name) def wrap(self, path, *args, **kw): if self._active: path = self._remap_input(name, path, *args, **kw) return original(path, *args, **kw) return wrap if _file: _file = _mk_single_path_wrapper('file', _file) _open = _mk_single_path_wrapper('open', _open) for name in [ "stat", "listdir", "chdir", "open", "chmod", "chown", "mkdir", "remove", "unlink", "rmdir", "utime", "lchown", "chroot", "lstat", "startfile", "mkfifo", "mknod", "pathconf", "access", ]: if hasattr(_os, name): locals()[name] = _mk_single_path_wrapper(name) def _mk_single_with_return(name): original = getattr(_os, name) def wrap(self, path, *args, **kw): if self._active: path = self._remap_input(name, path, *args, **kw) return self._remap_output(name, original(path, *args, **kw)) return original(path, *args, **kw) return wrap for name in ['readlink', 'tempnam']: if hasattr(_os, name): locals()[name] = _mk_single_with_return(name) def _mk_query(name): original = getattr(_os, name) def wrap(self, *args, **kw): retval = original(*args, **kw) if self._active: return self._remap_output(name, retval) return retval return wrap for name in ['getcwd', 'tmpnam']: if hasattr(_os, name): locals()[name] = _mk_query(name) def _validate_path(self, path): """Called to remap or validate any path, whether input or output""" return path def _remap_input(self, operation, path, *args, **kw): """Called for path inputs""" return self._validate_path(path) def _remap_output(self, operation, path): """Called for path outputs""" return self._validate_path(path) def _remap_pair(self, operation, src, dst, *args, **kw): """Called for path pairs like rename, link, and symlink operations""" return ( self._remap_input(operation + '-from', src, *args, **kw), self._remap_input(operation + '-to', dst, *args, **kw), ) if hasattr(os, 'devnull'): _EXCEPTIONS = [os.devnull] else: _EXCEPTIONS = [] class DirectorySandbox(AbstractSandbox): """Restrict operations to a single subdirectory - pseudo-chroot""" write_ops = dict.fromkeys( [ "open", "chmod", "chown", "mkdir", "remove", "unlink", "rmdir", "utime", "lchown", "chroot", "mkfifo", "mknod", "tempnam", ] ) _exception_patterns = [] "exempt writing to paths that match the pattern" def __init__(self, sandbox, exceptions=_EXCEPTIONS): self._sandbox = os.path.normcase(os.path.realpath(sandbox)) self._prefix = os.path.join(self._sandbox, '') self._exceptions = [ os.path.normcase(os.path.realpath(path)) for path in exceptions ] AbstractSandbox.__init__(self) def _violation(self, operation, *args, **kw): from setuptools.sandbox import SandboxViolation raise SandboxViolation(operation, args, kw) if _file: def _file(self, path, mode='r', *args, **kw): if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path): self._violation("file", path, mode, *args, **kw) return _file(path, mode, *args, **kw) def _open(self, path, mode='r', *args, **kw): if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path): self._violation("open", path, mode, *args, **kw) return _open(path, mode, *args, **kw) def tmpnam(self): self._violation("tmpnam") def _ok(self, path): active = self._active try: self._active = False realpath = os.path.normcase(os.path.realpath(path)) return ( self._exempted(realpath) or realpath == self._sandbox or realpath.startswith(self._prefix) ) finally: self._active = active def _exempted(self, filepath): start_matches = ( filepath.startswith(exception) for exception in self._exceptions ) pattern_matches = ( re.match(pattern, filepath) for pattern in self._exception_patterns ) candidates = itertools.chain(start_matches, pattern_matches) return any(candidates) def _remap_input(self, operation, path, *args, **kw): """Called for path inputs""" if operation in self.write_ops and not self._ok(path): self._violation(operation, os.path.realpath(path), *args, **kw) return path def _remap_pair(self, operation, src, dst, *args, **kw): """Called for path pairs like rename, link, and symlink operations""" if not self._ok(src) or not self._ok(dst): self._violation(operation, src, dst, *args, **kw) return (src, dst) def open(self, file, flags, mode=0o777, *args, **kw): """Called for low-level os.open()""" if flags & WRITE_FLAGS and not self._ok(file): self._violation("os.open", file, flags, mode, *args, **kw) return _os.open(file, flags, mode, *args, **kw) WRITE_FLAGS = functools.reduce( operator.or_, [ getattr(_os, a, 0) for a in "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split() ], ) class SandboxViolation(DistutilsError): """A setup script attempted to modify the filesystem outside the sandbox""" tmpl = textwrap.dedent( """ SandboxViolation: {cmd}{args!r} {kwargs} The package setup script has attempted to modify files on your system that are not within the EasyInstall build area, and has been aborted. This package cannot be safely installed by EasyInstall, and may not support alternate installation locations even if you run its setup script by hand. Please inform the package's author and the EasyInstall maintainers to find out if a fix or workaround is available. """ ).lstrip() def __str__(self): cmd, args, kwargs = self.args return self.tmpl.format(**locals()) PK{5ZZ2&Lib/site-packages/setuptools/monkey.pynuW+A""" Monkey patching of distutils. """ import sys import distutils.filelist import platform import types import functools from importlib import import_module import inspect import setuptools __all__ = [] """ Everything is private. Contact the project team if you think you need this functionality. """ def _get_mro(cls): """ Returns the bases classes for cls sorted by the MRO. Works around an issue on Jython where inspect.getmro will not return all base classes if multiple classes share the same name. Instead, this function will return a tuple containing the class itself, and the contents of cls.__bases__. See https://github.com/pypa/setuptools/issues/1024. """ if platform.python_implementation() == "Jython": return (cls,) + cls.__bases__ return inspect.getmro(cls) def get_unpatched(item): lookup = ( get_unpatched_class if isinstance(item, type) else get_unpatched_function if isinstance(item, types.FunctionType) else lambda item: None ) return lookup(item) def get_unpatched_class(cls): """Protect against re-patching the distutils if reloaded Also ensures that no other distutils extension monkeypatched the distutils first. """ external_bases = ( cls for cls in _get_mro(cls) if not cls.__module__.startswith('setuptools') ) base = next(external_bases) if not base.__module__.startswith('distutils'): msg = "distutils has already been patched by %r" % cls raise AssertionError(msg) return base def patch_all(): # we can't patch distutils.cmd, alas distutils.core.Command = setuptools.Command has_issue_12885 = sys.version_info <= (3, 5, 3) if has_issue_12885: # fix findall bug in distutils (http://bugs.python.org/issue12885) distutils.filelist.findall = setuptools.findall needs_warehouse = ( (3, 4) < sys.version_info < (3, 4, 6) or (3, 5) < sys.version_info <= (3, 5, 3) ) if needs_warehouse: warehouse = 'https://upload.pypi.org/legacy/' distutils.config.PyPIRCCommand.DEFAULT_REPOSITORY = warehouse _patch_distribution_metadata() # Install Distribution throughout the distutils for module in distutils.dist, distutils.core, distutils.cmd: module.Distribution = setuptools.dist.Distribution # Install the patched Extension distutils.core.Extension = setuptools.extension.Extension distutils.extension.Extension = setuptools.extension.Extension if 'distutils.command.build_ext' in sys.modules: sys.modules['distutils.command.build_ext'].Extension = ( setuptools.extension.Extension ) patch_for_msvc_specialized_compiler() def _patch_distribution_metadata(): """Patch write_pkg_file and read_pkg_file for higher metadata standards""" for attr in ('write_pkg_file', 'read_pkg_file', 'get_metadata_version'): new_val = getattr(setuptools.dist, attr) setattr(distutils.dist.DistributionMetadata, attr, new_val) def patch_func(replacement, target_mod, func_name): """ Patch func_name in target_mod with replacement Important - original must be resolved by name to avoid patching an already patched function. """ original = getattr(target_mod, func_name) # set the 'unpatched' attribute on the replacement to # point to the original. vars(replacement).setdefault('unpatched', original) # replace the function in the original module setattr(target_mod, func_name, replacement) def get_unpatched_function(candidate): return getattr(candidate, 'unpatched') def patch_for_msvc_specialized_compiler(): """ Patch functions in distutils to use standalone Microsoft Visual C++ compilers. """ # import late to avoid circular imports on Python < 3.5 msvc = import_module('setuptools.msvc') if platform.system() != 'Windows': # Compilers only available on Microsoft Windows return def patch_params(mod_name, func_name): """ Prepare the parameters for patch_func to patch indicated function. """ repl_prefix = 'msvc14_' repl_name = repl_prefix + func_name.lstrip('_') repl = getattr(msvc, repl_name) mod = import_module(mod_name) if not hasattr(mod, func_name): raise ImportError(func_name) return repl, mod, func_name # Python 3.5+ msvc14 = functools.partial(patch_params, 'distutils._msvccompiler') try: # Patch distutils._msvccompiler._get_vc_env patch_func(*msvc14('_get_vc_env')) except ImportError: pass try: # Patch distutils._msvccompiler.gen_lib_options for Numpy patch_func(*msvc14('gen_lib_options')) except ImportError: pass PK{5Z)$Lib/site-packages/setuptools/gui.exenuW+AMZ@ !L!This program cannot be run in DOS mode. $Sؠ222Ջ222}82`*2`;2`-2`?2Rich2PELQ  N&@@4(@@.text `.rdatah "@@.data+@QD$P@uSUV+WD-jPx 33ۉD$"p~WL$ <\uG <"u~Wj\V 3\F3T$CF;|Å~Wj\VV D$_"F^][YÁ A3ĉ$V$W$τtd$A9](u>u3@8tHF;w>:u5;t}jujQU&Fu9](uE;tu3]8tUP&YtFYe3C98 A4 AE0 A} 5+A0,Y}؅tx5+A,Yu܉}uu;rW+9t;rJ6++5+A+5+A+ 9}u9Et}}؉Eu܋}hp@d@_Yhx@t@OYE}u(8 AjlYu3C}tjSYËUjju ]ËUjju ]jjj jjj ËV*VY;V:VwV:V:V8V57V7h#@E*$A^ËU=D Au3u1h'YY]jXh0@3uEP4@j_}MZf9@u8<@@PEu' f9@ut@v39@Mu3CS?YujXY-ujGYW4] }j&Y0@+AQ>< A=}jY;}j YSY;tPY:]tMj YQPVh@E9uuPE}5E MPQ5YYËeE܉E}uP!EE3@ËeE>xUVuVSPk?YYt| ;u3@;u`3@ AF uNSW^^N 3_@[3^]ËU}t'Vu F tVf f&fY^]A @tyt$Ix  QP-YYu ËUVMEM >t} ^]ËUG @SVt2u,E+M}C>u8*uϰ?d}^[]ËUxA3ʼnES] Vu3W}uu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GetValueFlsAllocruntime error TLOSS error SING error DOMAIN error R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information. R6033 - Attempt to use MSIL code from this assembly during native code initialization This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain. R6032 - not enough space for locale information R6031 - Attempt to initialize the CRT more than once. This indicates a bug in your application. R6030 - CRT not initialized R6028 - unable to initialize heap R6027 - not enough space for lowio initialization R6026 - not enough space for stdio initialization R6025 - pure virtual function call R6024 - not enough space for _onexit/atexit table R6019 - unable to open console device R6018 - unexpected heap error R6017 - unexpected multithread lock error R6016 - not enough space for thread data This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. R6009 - not enough space for environment R6008 - not enough space for arguments R6002 - floating point support not loaded Microsoft Visual C++ Runtime Library ...Runtime Error! Program:  EEE00P('8PW700PP (`h`hhhxppwpp ((((( H h(((( H H  !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLLSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$.com.exe.bat.cmd.\SystemRootHA@8i@#@%@%@%@%@h5@l5@;@;@k=@7=@>@#@@MA@iA@]G@+K@N@P@P@R@R@eY@ [@[@][@a[@^@H_@__@j@l@y@ށ@@@M@@[@!@]@ܮ@@@\$<Thp$@^r &0@Vbr$2L\r"4FXjv$0@RRGenerateConsoleCtrlEventGetExitCodeProcessnWaitForSingleObjectCreateProcessASetConsoleCtrlHandlerGetModuleFileNameAEnterCriticalSectionLeaveCriticalSectionGetModuleHandleW+Sleep"GetProcAddressExitProcesspGetCommandLineA<GetStartupInfoASetHandleCount>GetStdHandleGetFileTypeDeleteCriticalSection7TerminateProcessGetCurrentProcessHUnhandledExceptionFilterSetUnhandledExceptionFilterIsDebuggerPresentGetLastErrorHeapFreeHeapAlloc\GetCPInfoInterlockedIncrementInterlockedDecrementSGetACPGetOEMCPIsValidCodePage>TlsGetValue<TlsAlloc?TlsSetValue=TlsFreeSetLastErrorGetCurrentThreadIdWriteFileLoadLibraryAInitializeCriticalSectionAndSpinCountKFreeEnvironmentStringsAGetEnvironmentStringsLFreeEnvironmentStringsWWideCharToMultiByteGetEnvironmentStringsWHeapCreateaVirtualFreeYQueryPerformanceCounterjGetTickCountGetCurrentProcessIdSGetSystemTimeAsFileTimeRtlUnwindHeapReAlloc^VirtualAllocGetConsoleCPGetConsoleModeBFlushFileBuffersLCMapStringAMultiByteToWideCharLCMapStringW@GetStringTypeACGetStringTypeWGetLocaleInfoASetFilePointerHeapSizeDCloseHandleWriteConsoleAGetConsoleOutputCPWriteConsoleWSetStdHandleyCreateFileASCompareStringAVCompareStringWSetEnvironmentVariableAKERNEL32.dllnReadFileSetEndOfFile&GetProcessHeapGetFileAttributesA+A+AN@D#@l@\@         ! 5A CPR S WY l m pr   )     abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZhA`y!@~ڣ @ڣ AϢ[@~QQ^ _j21~l@CAAAAAHAh@@p@AAAhA@@ @ @@@@\@$@@@@d@D@@ @!@"@x@y@z@@@^@^@^@^@^@^@^@^@^@^@x h@j@@@@@@@@x@p@h@\@P@H@<@8@4@0@,@(@$@ @@@@@ @@@@@(@@@@@@@@@@@|@p@ A.DA)A)A)A)A)A)A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$(H|$ l3;KUL$(HL$ MELlE3HcA;!DUA s;A;;MD$(HExELAHD$ olA;~`3HBHHrQHL6I;w*HAH;wHHW[H+H\$@I;tE3HI;tD0HDUII;tnMELA҉t$(H\$ k3;t?3HL$8DLHL$0;u L$(HL$ D$(HExHD$ A/kHKD91u菻HOD91u聻HLD;u HDpDuuHxAh Du3L}xLE;<3LMpЋω\$(H\$ HH;tDMpULAΉ\$(H\$ jLcDMD;uD;A~bIIwYHHw4HYH;w HHHYH+H\$@Ht%HHtD0HDMHu3Mc3HKD]DMpUMD\$(LH\$ *jEu3.LMLÉD$(AL|$ }L3L;DHKD91u(!DMpUD$(AL|$ i3H;tHL;t M;tI诹HMH3H]PHuXH}`He A_A^A]A\]H\$Ht$WHpHHL$PIAК$D$HL$PD\$@D$8$D$0H$LHD$($DNj։D$ O|$ht HL$`L\$pI[IsI_DL$ UATAUAVAWH@Hl$0H]@HuHH}PHH3HED ,3MDLwD;u=LMHrDNjh;t=6\gD xDDD ׸D;&D;D;Cuh;uIEp]xDMXMҋΉ\$(H\$  hLcD;A~hHL;wYKL$Hw5HAH;w HHVH+H|$0H;HH;t D(HHH;M3HMlDMXMƺDd$(H|$ Vg;tLM`DHAWgHOD9)u7DepHD;uIED`uh;uIEpA"u3U;t$LMXMƋЋΉ\$(H\$ PHH;tLHE`DMXMAAHD$ fH;tH誶HMH3H]@HuHH}PHeA_A^A]A\]H\$Ht$WH`HHL$@AI̗$D$HL$@D\$8D$0$D$(H$DLNjHD$ .|$Xt HL$PH\$pHt$xH`_ffLH+Irat6t  IȈHtf IfHt  IHMIuQMItH HHIuIMuI@ HIuIffffffffffffI sBH LT H HALQHD LT IHALQuIqffffHr  D @HuH@L LT L LQLL LT LILQLL LT (H@LILQLL LT LILQuIIq $fffffffffffIIrat6t HɊ IȈtHf Ift H IMIuPMItHH IHuIMuIHɊ IȈuIffffffffffffI sBHD LT H HALQHD L IHALuIsfffffHw H D @uH@LL LT LILQLL LT LILQLL LT H@LILQLL L LIL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,=@t%=t+=@t$=t=@u($#;uD$@$|$DA@A%=@$=t|=;A;vv8l$AA+ A;PD$D E3H;t E33nH| HT$DAbaA;t uk|$DuD@D$D$D=u %r=u# E3AD$ E33p;;vqA; E3H; E33Hu8D$DA HcEHTDD+NmD;AHc @$H@HHkXIDd8@l8HcHƒHHkXILƀd8D8@8|$Lu!@tHc HHHkXIDL A%=AHL$X>$D$PDD$HH$H|$0D$(ALL$`D$ A1$Hu6"~qLcIAHMkXIDBd BHcHʃHHkXILH H$HĀA_A^A]A\_^]HĉPL@LH VWHXH`E3HAEu(pHd$ E3E333oH$HD@d$0DD$(D$ @DLHT$@HL$DvD$H|$Dt9t(Hc|$@HHHLCtHkXId|$@n|$@t o0HX_^@SH0MHHHu&oHd$ E3E333nHUHtHL$ LL$XLD$@IHtLL$XLD$@HӹHL$@HqHL$XqHH0[H\$LD$UVWATAUAVAWH0E3MLHHI;u("oE3E333Lt$ 8nHD81tI;tHI;tD80t\v/HHfAI;I;AW9HRHI;H.IHXH{oHI;sLL5HHuA;tE3E333Lt$ XlLHHA;tE3E333Lt$ 1lH~ I;tH;vHHHύS/ HI;t&3 A;MIHHlIL`InHI;LIHA;tE3E333Lt$ kH"L4mM+D8IZx *:JXfp2Hbx$4JZl~"4\hxh@?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~=runtime error TLOSS error SING error DOMAIN error R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information. R6033 - Attempt to use MSIL code from this assembly during native code initialization This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain. R6032 - not enough space for locale information R6031 - Attempt to initialize the CRT more than once. This indicates a bug in your application. R6030 - CRT not initialized R6028 - unable to initialize heap R6027 - not enough space for lowio initialization R6026 - not enough space for stdio initialization R6025 - pure virtual function call R6024 - not enough space for _onexit/atexit table R6019 - unable to open console device R6018 - unexpected heap error R6017 - unexpected multithread lock error R6016 - not enough space for thread data This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. R6009 - not enough space for environment R6008 - not enough space for arguments R6002 - floating point support not loaded Microsoft Visual C++ Runtime Library ...Runtime Error! Program:  EEE00P('8PW700PP (`h`hhhxppwpp ((((( H h(((( H H  !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLLSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$.com.exe.bat.cmd.\SystemRoot t d T 42 4 pP  4 p d T 42p!<!(!HI(!HIdJ(!TR< Kp00bp`0+|I` 4R p ` Pr002042 p d4rp+'(x  4 Rp+*S+S+B d T 4 rpt42   20dT42p) 4dZ p`P  t d 4 +`:l:=  0 t dT42  20d 4R +KBB  t d RЌ+DMDCjDtd42dT42ptd42Ќ+OFF  4 Rpd T 4Rpd 4 r p  $d4 pp  4 2p+MN44r p`P8  t d 4RЌ+-RR420+VVM  4 2p+WWfWW42p+.Y\YfqYYdT pd T42p t 4R t d 42+_{`2P B+abb B+9b=b=b d4r p+esf b+fgg t d T 42d 4 R p t d T 4 rB  4 2pb4p ` Pd 4R p4 R p+uv/ 4qf p`P  d4 Rp+,~]~N4 R p `+?7  4 p dT4p- Etd4C PXd4 p1 5#td43r P8d4 p2 0R0 d4 Rp+֖ N T4r p ` tdT4  4 2pd 4 Rp+(7PT42 p  td42Ќ+ke t 4 rЌ+~4b(' EC p`0PpRPt d 4R+٭  T pdT4pT 4 r p$ 53 p`0PX 4R p ` P  p ` P 0 d4 Rp+ >N! !4!p`PrPp`+ t d T 42d42 p4  p P 0#  p`P0xd 4  pdT 4 pN0H`t|*>Zx *:JXfp2Hbx$4JZl~"4\hxSGenerateConsoleCtrlEventGetExitCodeProcessrWaitForSingleObjectCreateProcessASetConsoleCtrlHandlerGetModuleFileNameAEnterCriticalSectionLeaveCriticalSectionGetModuleHandleW/Sleep"GetProcAddressExitProcessqGetCommandLineARtlUnwindExSetHandleCount>GetStdHandleGetFileType<GetStartupInfoADeleteCriticalSection;TerminateProcessGetCurrentProcessLUnhandledExceptionFilter#SetUnhandledExceptionFilterIsDebuggerPresentRtlVirtualUnwindRtlLookupFunctionEntryRtlCaptureContextGetLastErrorHeapFreeHeapAlloc]GetCPInfoTGetACPGetOEMCPIsValidCodePageEncodePointerDecodePointer@FlsGetValueAFlsSetValue?FlsFreeSetLastErrorGetCurrentThreadId>FlsAllocWriteFileLoadLibraryAInitializeCriticalSectionAndSpinCountLFreeEnvironmentStringsAGetEnvironmentStringsMFreeEnvironmentStringsWWideCharToMultiByteGetEnvironmentStringsWHeapSetInformationHeapCreateSQueryPerformanceCounterjGetTickCountGetCurrentProcessIdSGetSystemTimeAsFileTimeHeapReAllocGetConsoleCPGetConsoleModeCFlushFileBuffersLCMapStringAMultiByteToWideCharLCMapStringW@GetStringTypeACGetStringTypeWGetLocaleInfoASetFilePointerHeapSizeDCloseHandleWriteConsoleAGetConsoleOutputCPWriteConsoleW SetStdHandlezCreateFileASCompareStringAVCompareStringWSetEnvironmentVariableAKERNEL32.dllhReadFileSetEndOfFile&GetProcessHeapGetFileAttributesAE@E@2-+] fL)@@@         ! 5A CPR S WY l m pr   )     abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(@`y!@~ڣ @ڣ A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Th?A? ?4 @ W@ T_Twk{#T9Txk{#_bT,kѵ"W{# +@x@#{үR }@?BT?i*8qKT)@9i4-R+C( iil8!H *)@8hi,8)5 @9i4+R( )Cj!(il8_jT @8)5{_ķ{S[ck+CC*Eq***Ta~@kw5@ @Hs@*R)RRqA***x5R A? RT<LT|Ds/Ct?RB **!R* 4R***U 49P66 4kTD@****u59~ A? T<LT|Dӧs/CsRRhsB***4*R*5Rj*5h_R kaT`BR_R kaTB*_CC+@kDcC[BSA{ƨ_D@*h_R kT`BѶS[c{C****@****#@94@HC yIC{è@cB[ASĨ_{.Sq{_h]AH5S {COsR#{@TR@@c@**"Rc5RQ@94 @HC yI{è @S¨_S[{ SC9R;9 @)R @ k!T@94 @HC yI"R@954 @HC yI"R4 @HC yIR 5@)R @ k!T#A94@HC yI"R#A954@HC yI"R4@HC yIRCv`5A3@K@ ?A93@*A93@Ru4B9h4K@*{˨[AS¨_bR%@x+$@xHQeqIhQLieqhK5l4BB_{R hD ( R ?{_S[{$HT vD R ?ր r4 4DR?֠R{[AS¨_S[{`RRR!S)(9h4)(!kRR`5SvR`R*{[AS¨_RS {9h4(855i@(9 h4H85H )T`@h8qT`4i@h@  { @S¨_R#RbR@8+@8HQeqIhQLieqhK5l4BB_{h]A5RR  A{@_T{_S {:RT{@TsRC@ @@8 ij8@8ij8 K5i4s@94 @HC yI{è @S¨_{#y_4S!RC~`4#@yR{¨_|P;_{ƬCha(j /?.?(G?g [H @y5@987OqQh qaTLR h qaTlRhqTRR)R K(! Q+  * L@9 SK@ S? qAzT kT 8qaT  * T? T)KKL y SI yRhKqiTADq"TR R(R) (yhkTOq__HRCa{_{*Ax   jTRRi`yR4R``]R{A_{``R{A_{`@`@IC @5@h@ kT@Rh@ k@T R{¨A_{ C5 @C@h(25R R{¨A_f )L T@`T %RR#RHa;/&RaRk@TERRCR X X Tn`t \8pp \ \ \+qf }`r;g;{y*sz | \8 yOT \RX yBXu+qR }yK]Yg^`g^;"Tz \gR1:p.fRn2\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{@@ {_a{@@6 {_a{@(4@@4 |@*FHA )@ yj*! I@9(H9 {_a{@ {_a{ @@ {_a{R {_a{@@ {_a{R {_a{R {_a{R {_a{R {_a{C@94`R {_a{ @e {_a{`R {_a{@ @R r? k{_a0F\n.L^.FXj|(:HVbt*6JZlv*<Tjz-@'@&@'@=@U@@z@hj@H>@failed to create process. failed to get exit code from process. %s %s-script.pyCannot open %s #!#!python.exeCannot find Python executable %s Could not exec %sp@@3@@@@@ (@ 8@ H@ X@ d@p@ @ @@ @ @ ‹@ċ@Ћ@؋@܋@@@@@@@@@ @@@@@ @$@(@,@0@4@8@<@@@D@H@L@P@T@X@\@`@d@h@l@p@t@x@|@@ @ @@@Ќ@@@@8@X@x@@#@@ @(@&P@p@@@@@#Ď@Ў@ @@@0@%X@$@%@+؏@@ @"H@(x@*@Ȑ@ ؐ@@ ‹@@@8@P@p@‹@@@P@H@(@Ќ@@__based(__cdecl__pascal__stdcall__thiscall__fastcall__vectorcall__clrcall__eabi__swift_1__swift_2__ptr64__restrict__unalignedrestrict( new delete=>><<!==!=[]operator->*++---+&->*/%<<=>>=,()~^|&&||*=+=-=/=%=>>=<<=&=|=^=`vftable'`vbtable'`vcall'`typeof'`local static guard'`string'`vbase destructor'`vector deleting destructor'`default constructor closure'`scalar deleting destructor'`vector constructor iterator'`vector destructor iterator'`vector vbase constructor iterator'`virtual displacement map'`eh vector constructor iterator'`eh vector destructor iterator'`eh vector vbase constructor iterator'`copy constructor closure'`udt returning'`EH`RTTI`local vftable'`local vftable constructor closure' new[] delete[]`omni callsig'`placement delete closure'`placement delete[] closure'`managed vector constructor iterator'`managed vector destructor iterator'`eh vector copy constructor iterator'`eh vector vbase copy constructor iterator'`dynamic initializer for '`dynamic atexit destructor for '`vector copy constructor iterator'`vector vbase copy constructor iterator'`managed vector copy constructor iterator'`local static thread guard'operator "" operator co_awaitoperator<=> Type Descriptor' Base Class Descriptor at ( Base Class Array' Class Hierarchy Descriptor' Complete Object Locator'`anonymous namespace'(null)(null)   mscoree.dllCorExitProcess@@X@@-@-@`@@ @ @P@@H@Ⱦ@@<@-@@-@Ѐ@p@-@@@-@.\.com.exe.bat.cmd        ! 5A CPR S WY l m pr  )   Y* @@@@@@p@@@@@@@@P@@@P@h@@@؞@api-ms-win-core-datetime-l1-1-1api-ms-win-core-fibers-l1-1-1api-ms-win-core-file-l1-2-2api-ms-win-core-localization-l1-2-1api-ms-win-core-localization-obsolete-l1-2-0api-ms-win-core-processthreads-l1-1-2api-ms-win-core-string-l1-1-0api-ms-win-core-synch-l1-2-0api-ms-win-core-sysinfo-l1-2-1api-ms-win-core-winrt-l1-1-0api-ms-win-core-xstate-l2-1-0api-ms-win-rtcore-ntuser-window-l1-1-0api-ms-win-security-systemfunctions-l1-1-0ext-ms-win-ntuser-dialogbox-l1-1-0ext-ms-win-ntuser-windowstation-l1-1-0advapi32kernel32ntdllapi-ms-win-appmodel-runtime-l1-1-2user32api-ms-ext-ms-AreFileApisANSICompareStringExFlsAllocFlsFreeFlsGetValueFlsSetValueInitializeCriticalSectionExLCMapStringExLocaleNameToLCIDAppPolicyGetProcessTerminationMethod@@@@@@@@@@@@Р@@@@INFinfNANnanNAN(SNAN)nan(snan)NAN(IND)nan(ind)e+000@ģ@ȣ@̣@У@ԣ@أ@ܣ@@@@@@ @,@0@4@8@<@@@D@H@L@P@T@X@`@h@t@|@<@@@@@@@Ȥ@Ԥ@ؤ@@@@@ @(@0@8@@@H@P@`@p@@@@@إ@@@@@@@@@ @(@0@8@H@`@p@@@@@@Ȧ@ئ@@@ @@0@X@p@SunMonTueWedThuFriSatSundayMondayTuesdayWednesdayThursdayFridaySaturdayJanFebMarAprMayJunJulAugSepOctNovDecJanuaryFebruaryMarchAprilJuneJulyAugustSeptemberOctoberNovemberDecemberAMPMMM/dd/yydddd, MMMM dd, yyyyHH:mm:ssSunMonTueWedThuFriSatSundayMondayTuesdayWednesdayThursdayFridaySaturdayJanFebMarAprMayJunJulAugSepOctNovDecJanuaryFebruaryMarchAprilJuneJulyAugustSeptemberOctoberNovemberDecemberAMPMMM/dd/yydddd, MMMM dd, yyyyHH:mm:ssen-USja-JPzh-CNko-KRzh-TW ((((( H   !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~uk=@@ @(@8@@@H@P@ X@ `@ h@ p@ x@@@@@@@@@@ȼ@м@ؼ@@@@@@ @!@"@#@$ @%(@&0@'8@)@@*H@+P@,X@-`@/h@6p@7x@8@9@>@?@@@A@C@D@F@GȽ@Iн@Jؽ@K@N@O@P@V@W@Z@e@ @(@8@H@@X@h@x@@ p@ @ @ @Ⱦ@ؾ@@@@@@@(@8@H@X@h@x@@@@ @!ȿ@"ؿ@#@$@%@&@'(@)8@*H@+X@,h@-@/@2@4@5@6@7@8@9@:@; @>0@?@@@P@A`@Cp@D@E@F@G@I@J@K@L@N@O@P(@R8@VH@WX@Zh@ex@k@l@@@@@ @ @ @@@(@8@H@`@,p@;@>@C@k@ @ @ @ @ @ @ 0@; H@k X@h@x@@ @ @ @@;@@@@ @ (@ 8@H@;`@p@ @ @ @@;@@ @ @@; @ 0@ @@ P@; `@$p@ $@ $@;$@(@ (@ (@,@ ,@ ,@0@ 0 @ 00@4@@ 4P@ 4`@8p@ 8@<@ <@@@ @@ D@ H@ L@ P@|@| @arbgcazh-CHScsdadeelenesfifrhehuisitjakonlnoplptroruhrsksqsvthtruridbesletlvltfavihyazeumkafkafohimskkkyswuzttpagutateknmrsamnglkoksyrdivar-SAbg-BGca-EScs-CZda-DKde-DEel-GRfi-FIfr-FRhe-ILhu-HUis-ISit-ITnl-NLnb-NOpl-PLpt-BRro-ROru-RUhr-HRsk-SKsq-ALsv-SEth-THtr-TRur-PKid-IDuk-UAbe-BYsl-SIet-EElv-LVlt-LTfa-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@@@F@paf-zaar-aear-bhar-dzar-egar-iqar-joar-kwar-lbar-lyar-maar-omar-qaar-saar-syar-tnar-yeaz-az-cyrlaz-az-latnbe-bybg-bgbn-inbs-ba-latnca-escs-czcy-gbda-dkde-atde-chde-dede-lide-ludiv-mvel-gren-auen-bzen-caen-cben-gben-ieen-jmen-nzen-phen-tten-usen-zaen-zwes-ares-boes-cles-coes-cres-does-eces-eses-gtes-hnes-mxes-nies-paes-pees-pres-pyes-sves-uyes-veet-eeeu-esfa-irfi-fifo-fofr-befr-cafr-chfr-frfr-lufr-mcgl-esgu-inhe-ilhi-inhr-bahr-hrhu-huhy-amid-idis-isit-chit-itja-jpka-gekk-kzkn-inkok-inko-krky-kglt-ltlv-lvmi-nzmk-mkml-inmn-mnmr-inms-bnms-mymt-mtnb-nonl-benl-nlnn-nons-zapa-inpl-plpt-brpt-ptquz-boquz-ecquz-pero-roru-rusa-inse-fise-nose-sesk-sksl-sisma-nosma-sesmj-nosmj-sesmn-fisms-fisq-alsr-ba-cyrlsr-ba-latnsr-sp-cyrlsr-sp-latnsv-fisv-sesw-kesyr-syta-inte-inth-thtn-zatr-trtt-ruuk-uaur-pkuz-uz-cyrluz-uz-latnvi-vnxh-zazh-chszh-chtzh-cnzh-hkzh-mozh-sgzh-twzu-za Tc-^k@tFМ, a\)cd4҇f;lDِe,BbE"&'O@V$gmsmrd'c%{pk>_nj f29.EZ%qVJ.C|!@Ί Ą' |Ô%I@T̿aYܫ\ DgR)`*! VG6K]_܀ @َЀk#cd8L2WBJa"=UD~ $s%rс@b;zO]3AOmm!3VV%(w;I-G 8NhU]i<$qE}A'JnWb쪉"f37>,ެdNj5jVg@;*xh2kůid&_U JW {,Ji)Ǫv6 UړǚK%v t:H孎cY˗i&>r䴆["93uzKG-wn@  _l%Bɝ s|-Ciu+-,W@zbjUUYԾX1EL9MLy;-"m^8{yrvxyN\lo};obwQ4Y+XW߯_w[R/=OB R E]B.4o?nz(wKgg;ɭVl H[=J6RMq! EJjت|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a%ieb0Yaimbqb`qbдXiueظ a`beaiagIiȾDEbX-`(uhxP-a`mbhXMH9aMaMa qih@fXgx4@T81dh5YaHb@aa`tHHXab4$qb@!`0%eXlp`ymeE`fefpe`-b@bQ a-`h QeIa8yb  1 e a0 Qb @  1` d08i h cpH@dx| ("@#,p&f (8)c*}*f@+b+P,--aa.IP./01Q2\6<H,0IHIc`JK}bL|P`QhTU!HU0VHXMX`YXZh[Y[x\=`\^ya(_1aX_e_]eaehijeajelpmn4hos=tTyyz\{@{d{{{,|(|L|l|||||}8}X}x}txآأ 0@P`pФ 0@P`pХ 0@P`pЦ 0@P`pЧ 0@P`pШ 0@P`pЩ 0@P`pЪdЦ (8@HPX`hpȧ`hpxȩЩة (08@HPX`hpx (08@HPX`hpxȡСء (08@HP`hpxȢТآ (08@HPX`hpxح(8HXhxȮخ(8HXhxȯد(8HXhxȠؠ(8HXhxȡء(8HXhxȢآ(8HXhxȣأ(8HXhxȤؤ(8HXhxȥإ(8HXhxȦئ(8HXhxȧا(8HXhxȨب(8HXhxȩة(8HXhxȪت(8HXhxȫث0@P`pШ 0@P`pЩ 0@P`pЪ 0@P`pЫ 0@P`pЬ 0@P`pЭ 0@P`pЮ 0@P`pЯ 0@P`pР 0@P`pС 0@P`pТ 0@P`pУ 0@P`pФ 0@P`pХ 0@P` h @Dآ8X@HPX`hpxȩЩPK{5Z%Lib/site-packages/setuptools/_reqs.pynuW+Aimport setuptools.extern.jaraco.text as text from pkg_resources import Requirement def parse_strings(strs): """ Yield requirement strings for each specification in `strs`. `strs` must be a string, or a (possibly-nested) iterable thereof. """ return text.join_continuation(map(text.drop_comment, text.yield_lines(strs))) def parse(strs): """ Deprecated drop-in replacement for pkg_resources.parse_requirements. """ return map(Requirement, parse_strings(strs)) PK{5Zu1  1Lib/site-packages/setuptools/_vendor/tomli/_re.pynuW+A# SPDX-License-Identifier: MIT # SPDX-FileCopyrightText: 2021 Taneli Hukkinen # Licensed to PSF under a Contributor Agreement. from __future__ import annotations from datetime import date, datetime, time, timedelta, timezone, tzinfo from functools import lru_cache import re from typing import Any from ._types import ParseFloat # E.g. # - 00:32:00.999999 # - 00:32:00 _TIME_RE_STR = r"([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(?:\.([0-9]{1,6})[0-9]*)?" RE_NUMBER = re.compile( r""" 0 (?: x[0-9A-Fa-f](?:_?[0-9A-Fa-f])* # hex | b[01](?:_?[01])* # bin | o[0-7](?:_?[0-7])* # oct ) | [+-]?(?:0|[1-9](?:_?[0-9])*) # dec, integer part (?P (?:\.[0-9](?:_?[0-9])*)? # optional fractional part (?:[eE][+-]?[0-9](?:_?[0-9])*)? # optional exponent part ) """, flags=re.VERBOSE, ) RE_LOCALTIME = re.compile(_TIME_RE_STR) RE_DATETIME = re.compile( rf""" ([0-9]{{4}})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]) # date, e.g. 1988-10-27 (?: [Tt ] {_TIME_RE_STR} (?:([Zz])|([+-])([01][0-9]|2[0-3]):([0-5][0-9]))? # optional time offset )? """, flags=re.VERBOSE, ) def match_to_datetime(match: re.Match) -> datetime | date: """Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`. Raises ValueError if the match does not correspond to a valid date or datetime. """ ( year_str, month_str, day_str, hour_str, minute_str, sec_str, micros_str, zulu_time, offset_sign_str, offset_hour_str, offset_minute_str, ) = match.groups() year, month, day = int(year_str), int(month_str), int(day_str) if hour_str is None: return date(year, month, day) hour, minute, sec = int(hour_str), int(minute_str), int(sec_str) micros = int(micros_str.ljust(6, "0")) if micros_str else 0 if offset_sign_str: tz: tzinfo | None = cached_tz( offset_hour_str, offset_minute_str, offset_sign_str ) elif zulu_time: tz = timezone.utc else: # local date-time tz = None return datetime(year, month, day, hour, minute, sec, micros, tzinfo=tz) @lru_cache(maxsize=None) def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone: sign = 1 if sign_str == "+" else -1 return timezone( timedelta( hours=sign * int(hour_str), minutes=sign * int(minute_str), ) ) def match_to_localtime(match: re.Match) -> time: hour_str, minute_str, sec_str, micros_str = match.groups() micros = int(micros_str.ljust(6, "0")) if micros_str else 0 return time(int(hour_str), int(minute_str), int(sec_str), micros) def match_to_number(match: re.Match, parse_float: ParseFloat) -> Any: if match.group("floatpart"): return parse_float(match.group()) return int(match.group(), 0) PK{5Zg4Lib/site-packages/setuptools/_vendor/tomli/_types.pynuW+A# SPDX-License-Identifier: MIT # SPDX-FileCopyrightText: 2021 Taneli Hukkinen # Licensed to PSF under a Contributor Agreement. from typing import Any, Callable, Tuple # Type annotations ParseFloat = Callable[[str], Any] Key = Tuple[str, ...] Pos = int PK{5ZUU "OLib/site-packages/setuptools/_vendor/tomli/__pycache__/__init__.cpython-311.pycnuW+A b;d0dZdZddlmZmZmZee_dS))loadsloadTOMLDecodeErrorz2.0.1)rrrN)__all__ __version___parserrrr__name__ __module__pE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/tomli/__init__.pyrs? / 1111111111&r PK{5ZMxxNLib/site-packages/setuptools/_vendor/tomli/__pycache__/_parser.cpython-311.pycnuW+A b;diX 4ddlmZddlmZddlZddlmZddlmZm Z m Z ddl m Z m Z mZmZmZmZddlmZmZmZed ed Deed zZeed z Zeed z ZeZeZeZedZeedzZ eej!ej"zdzZ#e#edzZ$eej%Z&edd ddddddZ'Gdde(Z)e*dd]d!Z+e*dd^d$Z,Gd%d&Z-Gd'd(Z.Gd)d*e Z/d_d0Z0d`d6Z1dad7Z2dad8Z3dbd;Z4dbd<Z5dcd?Z6dddAZ7dedBZ8dfdDZ9dfdEZ:dgdGZ;dhdIZdjdQZ?dfdRZ@dkdTZAdidUZBdldWZCdmdYZDdnd[ZEdod\ZFdS)p) annotations)IterableN)MappingProxyType)AnyBinaryIO NamedTuple) RE_DATETIME RE_LOCALTIME RE_NUMBERmatch_to_datetimematch_to_localtimematch_to_number)Key ParseFloatPosc#4K|]}t|VdSN)chr).0is oE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/tomli/_parser.py rs(11!s1vv111111  z z  z-_z"'  "\)z\bz\tz\nz\fz\rz\"z\\ceZdZdZdS)TOMLDecodeErrorz0An error raised if a document is not valid TOML.N)__name__ __module__ __qualname____doc__rrr%r%5s::::rr% parse_float__fprr,rreturndict[str, Any]c|} |}n#t$rtddwxYwt ||S)z%Parse TOML from a binary file object.zEFile must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`Nr+)readdecodeAttributeError TypeErrorloads)r-r,bss rloadr89sk A HHJJ  S     , , ,,s +A__sstrcd|dd}d}ttt}d}t |} t ||t } ||}n#t$rYn&wxYw|dkr|dz }>|tvr*t|||||}t ||t }n|dkr~ ||dz}n#t$rd}YnwxYw|j |dkrt|||\}}nt|||\}}t ||t }n|d krt||d t||} ||}n#t$rYn"wxYw|dkrt||d |dz }S|jjS) zParse TOML from a string.z rrr*Tr [N#zInvalid statementz5Expected newline or end of document after a statement)replaceOutput NestedDictFlagsmake_safe_parse_float skip_charsTOML_WS IndexErrorKEY_INITIAL_CHARSkey_value_ruleflagsfinalize_pendingcreate_list_rulecreate_dict_rule suffixed_err skip_commentdatadict)r9r,srcposoutheaderchar second_chars rr5r5Es ++fd # #C C uww ' 'CF' 44K0c7++ s8DD    E  4<< 1HC  $ $ $ c3 DDCS#w//CC S[[ #*-cAg,  # # #"  # I & & ( ( (c!!.sC== VV.sC== VS#w//CC S[[sC)<== =3$$ s8DD    E  4<<SQ  qa0d 8=s6*A33 BB C C%$C%/E88 FFcJeZdZdZdZdZddZdd Zdd Zdd Z ddZ ddZ dS)rAz)Flags that map to parsed keys/namespaces.rr r.Nonec:i|_t|_dSr)_flagsset_pending_flagsselfs r__init__zFlags.__init__s') 47EErkeyrflagintc>|j||fdSr)r[addr]r_r`s r add_pendingzFlags.add_pendings# d ,,,,,rc|jD]\}}|||d|jdS)NF recursive)r[rZclearrds rrIzFlags.finalize_pendingsN, 1 1IC HHS$%H 0 0 0 0 !!#####rc|j}|ddD]}||vrdS||d}||dddS)Nnested)rYpop)r]r_contks r unset_allzFlags.unset_alls^{SbS % %A}}78$DD R$rrhboolc<|j}|dd|d}}|D]5}||vr!ttid||<||d}6||vr!ttid||<|||rdnd|dS)Nrk)rHrecursive_flagsrlrlrsrH)rYrZrc)r]r_r`rhrn key_parentkey_stemros rrZz Flags.sets{"3B3xRH  % %A}}$'EEceerRRQ78$DD 4  '*uuRTUUDN XIB((7CGGMMMMMrc|sdS|j}|ddD]&}||vrdS||}||dvrdS|d}'|d}||vr||}||dvp ||dvSdS)NFrkrsTrlrH)rY)r]r_r`rnro inner_contrus ris_z Flags.is_s 5{SbS ( (A}}uuaJz"3444tth'DDr7 t  >D4=(KDD9J4K,K KurNr.rW)r_rr`rar.rWr_rr.rW)r_rr`rarhrqr.rW)r_rr`rar.rq) r&r'r(r)FROZEN EXPLICIT_NESTr^rerIrprZrxr*rrrArAs33FM::::----$$$$      N N N NrrAc,eZdZddZdddd Zdd Zd S)r@r.rWci|_dSr)rOr\s rr^zNestedDict.__init__s $& rT access_listsr_rrrqrOc|j}|D]V}||vri||<||}|rt|tr|d}t|tstdW|S)Nrkz There is no nest behind this key)rO isinstancelistKeyError)r]r_rrnros rget_or_create_nestzNestedDict.get_or_create_nests I C CA}}Q7D 4 6 6 BxdD)) CABBB C rc||dd}|d}||vrC||}t|tstd|idSig||<dS)Nrkz/An object other than list found behind this key)rrrrappend)r]r_rnlast_keylist_s rappend_nest_to_listzNestedDict.append_nest_to_lists&&s3B3x00r7 t  NEeT** RPQQQ LL      TDNNNrNry)r_rrrqr.rOrz)r&r'r(r^rrr*rrr@r@s_''''" " " " " " " "rr@c$eZdZUded<ded<dS)r?r@rNrArHN)r&r'r(__annotations__r*rrr?r?s%LLLLLrr?rPrQrchars Iterable[str]c\ |||vr|dz }|||vn#t$rYnwxYw|S)Nr )rE)rPrQrs rrCrCsV #h% 1HC#h%      Js  ))expecterror_onfrozenset[str] error_on_eofrqcB |||}n6#t$r)t|}|rt||d|dYnwxYw||||s3|||vr|dz }|||vt||d|||S)Nz Expected r zFound invalid character )index ValueErrorlenrL isdisjoint)rPrQrrrnew_poss r skip_untilrsO))FC(( OOOc((  OsG-C-C-CDD$ N O OO   s3w;/ 0 0N#hh&& 1HC#hh&&3%LC%L%LMMM Ns0A  A c ||}n#t$rd}YnwxYw|dkrt||dzdtdS|S)Nr=r rFrr)rErILLEGAL_COMMENT_CHARS)rPrQrTs rrMrMsms8  s{{ q$)>U     J  cf |}t||t}t||}||kr|S1r)rCTOML_WS_AND_NEWLINErM)rPrQpos_before_skips rskip_comments_and_array_wsrsBc#6773$$ / ! !J rrRtuple[Pos, Key]c>|dz }t||t}t||\}}|j|t js%|j|t jrt||d|d|j |t jd |j |n #t$rt||ddwxYw| d|st||d|dz|fS) Nr zCannot declare z twiceFrgCannot overwrite a value]z.Expected ']' at the end of a table declaration)rCrD parse_keyrHrxrAr|r{rLrZrNrr startswithrPrQrRr_s rrKrKs-1HC S#w ' 'Cc""HC y}}S%-..D#)--U\2R2RD3%Bs%B%B%BCCCIMM#u*eM<<<K ##C(((( KKK3%?@@dJK >>#s # #W3%UVVV 7C<s 6CC.c&|dz }t||t}t||\}}|j|t jrt||d||j||j |t j d |j |n #t$rt||ddwxYw|d|st||d|dz|fS)N"Cannot mutate immutable namespace Frgrz]]z0Expected ']]' at the end of an array declaration)rCrDrrHrxrAr{rLrprZr|rNrrrrs rrJrJ.s%1HC S#w ' 'Cc""HC y}}S%,''Q3%O#%O%OPPPIIMM#u*eM<<<K $$S)))) KKK3%?@@dJK >>$ $ $Y3%WXXX 7C<s *CC"rSrc& t|||\} } dd d}}|z} fdtdt D} | D]`} |j| t jrt||d| |j| t ja|j|t j rt||d| |j |} n #t$rt||ddwxYw|| vrt||dt|ttfr*|j zt j d|| |<|S) Nrkc32K|]}d|zVdSrr*)rrrSr_s rrz!key_value_rule..Js0LLAvBQB/LLLLLLrr zCannot redefine namespace rrTrg)parse_key_value_pairrangerrHrxrAr|rLrer{rNrrrrOrrZ) rPrQrRrSr,valuertruabs_key_parentrelative_path_cont_keyscont_keynestr_s ` @rrGrGCs+3[AAOCess8SWJj(NLLLLLq#c((9K9KLLL+== 9==5#6 7 7 RsC)Ph)P)PQQ Q h(;<<<< y}}^U\22  K>KK   Kx**>:: KKK3%?@@dJK43%?@@@%$&&B fslELD AAADN Js 6DD.tuple[Pos, Key, Any]ct||\}} ||}n#t$rd}YnwxYw|dkrt||d|dz }t||t}t |||\}}|||fS)N=z,Expected '=' after a key in a key/value pairr )rrErLrCrD parse_value)rPrQr,r_rTrs rrresc""HCs8  s{{3%STTT1HC S#w ' 'CS#{33JC U?s  --c>t||\}}|f}t||t} ||}n#t$rd}YnwxYw|dkr||fS|dz }t||t}t||\}}||fz }t||t}q)NT.r )parse_key_partrCrDrE)rPrQkey_partr_rTs rrrus"3,,MC{C S#w ' 'C , "3xDD   DDD  3;;8O qc7++&sC00 X {c7++ ,s8 AAtuple[Pos, str]c ||}n#t$rd}YnwxYw|tvr$|}t||t}||||fS|dkrt||S|dkrt ||St ||d)N'r"z(Invalid initial character for a key part)rEBARE_KEY_CHARSrCparse_literal_strparse_one_line_basic_strrL)rPrQrT start_poss rrrss8  ~ c>22C # &&& s{{ c*** s{{'S111 sC!K L LLrc0|dz }t||dS)Nr F multiline)parse_basic_strrPrQs rrrs 1HC 3u 5 5 55rtuple[Pos, list]c|dz }g}t||}|d|r|dz|fS t|||\}}||t||}|||dz}|dkr|dz|fS|dkrt ||d|dz }t||}|d|r|dz|fS)Nr rT,zUnclosed array)rrrrrL)rPrQr,arrayvalcs r parse_arrayrs1HCE $S# . .C ~~c3Qw~"sC55S S(c22 cAg  887E> ! 88sC)9:: : q(c22 >>#s # # "7E> !"rtuple[Pos, dict]cf|dz }t}t}t||t}|d|r |dz|jfS t |||\}}}|dd|d}}||tjrt||d| | |d} n #t$rt||ddwxYw|| vrt||d ||| |<t||t}|||dz} | dkr |dz|jfS| d krt||d t|t tfr"||tjd |dz }t||t}X) Nr }TrkrFrrzDuplicate inline table key rzUnclosed inline tablerg)r@rArCrDrrOrrxr{rLrrrrrZ) rPrQr, nested_dictrHr_rrtrurrs rparse_inline_tablers1HC,,K GGE S#w ' 'C ~~c3)Qw (((,.sCEES%"3B3xRH 99S%, ' ' UsC)Sc)S)STT T O11*51QQDD O O OsC)CDD$ N O t  sC)Sx)S)STT TXc7++ cAg  887K,, , 88sC)@AA A edD\ * * 9 IIc5<4I 8 8 8 qc7+++,s 7CC,Frrc|||dz}|dz }|rt|dvrp|dkrPt||t} ||}n#t$r|dfcYSwxYw|dkrt||d|dz }t||t}|dfS|dkrt ||d S|d krt ||d S |t |fS#t$rt||ddwxYw) Nr>\ \ \ rrzUnescaped '\' in a stringr z\uz\U)rCrDrErLrparse_hex_charBASIC_STR_ESCAPE_REPLACEMENTSr)rPrQr escape_idrTs rparse_basic_str_escapersMC#'M"I1HC Y"999   S#w//C 3x   Bw t||"3-IJJJ 1HCc#677BwEc3***Ec3***M1)<<< MMM3%ABBLMs?AA8CC$c&t||dS)NTr)rrs r parse_basic_str_escape_multiliners !#sd ; ; ;;rhex_lenrac$||||z}t||kst|st||d||z }t |d}t |st||d|t |fS)NzInvalid hex valuez/Escaped character is not a Unicode scalar value)rHEXDIGIT_CHARS issupersetrLrais_unicode_scalar_valuer)rPrQrhex_strhex_ints rrrs#g %&G 7||wn&?&?&H&H3%89997NC'2G "7 + +X3%VWWW G rc`|dz }|}t||dtd}|dz|||fS)Nr rTr)rILLEGAL_LITERAL_STR_CHARS)rPrQrs rrrsJ1HCI  S# 9   C 7C # & &&rliteralc`|dz }|d|r|dz }|r+d}t||dtd}|||}|dz}nd}t||d \}}|||s||fS|dz }|||s|||zfS|dz }|||d zzfS) Nrr r'''Trr"rr)rr#ILLEGAL_MULTILINE_LITERAL_STR_CHARSr)rPrQrdelimend_posresults rparse_multiline_strr s1HC ~~dC   q @   8    S[!k%c3$??? V >>% % %F{1HC >>% % %#FUN""1HC %!)$ $$rc|rt}t}nt}t}d}|} ||}n #t$rt ||ddwxYw|dkrB|s|dz||||zfS|d|r|dz||||zfS|dz }s|dkr$||||z }|||\}}||z }|}||vrt ||d ||dz }) NrTzUnterminated stringr"r """rr#zIllegal character )!ILLEGAL_MULTILINE_BASIC_STR_CHARSrILLEGAL_BASIC_STR_CHARSrrErLr) rPrQrr parse_escapesrrrT parsed_escapes rrr(sY/48 *. FI Js8DD J J JsC)>??T I J 3;; <QwYs]); ;;;~~eS)) <QwYs]); ;;; 1HC  4<< c)C-( (F!.sC!8!8 C m #FI  8  sC)Fd)F)FGG G q)s /A tuple[Pos, Any]cn ||}n#t$rd}YnwxYw|dkr8|d|rt||dSt||S|dkr8|d|rt||dSt ||S|dkr|d |r|d zdfS|d kr|d |r|d zdfS|dkrt |||S|dkrt |||Stj||}|rK t|}n$#t$r}t||d|d}~wwxYw| |fStj||}|r#| t|fStj||}|r$| t!||fS|||dz} | dvr|dz|| fS|||d z} | dvr|d z|| fSt||d)Nr"rF)rrrTttruerffalser<{zInvalid date or datetimer>infnan>+inf+nan-inf-nanz Invalid value)rErrrrrrr matchr rrLendr rr r) rPrQr,rTdatetime_match datetime_objelocaltime_match number_match first_three first_fours rrrHss8   s{{ >>% % % @&sC??? ?'S111 s{{ >>% % % ?&sC>>> > c*** s{{ >>&# & & !7D=  s{{ >>'3 ' ' "7E> ! s{{3[111 s{{!#sK888!&sC00N2 L,^<.coord_reprsu #c((??$$yyq#&&* 1991WFF3::dAs333F.t..f...rz (at ))rPr:rQrr.r:)r%)rPrQrrs rrLrLsC//// c?? 3(<(<??? @ @@r codepointcBd|cxkodkncpd|cxkodkncS)Nriiir*)rs rrrsE  # # # #e # # # # G))F)F)F)Fw)F)F)F)FGrc4turtSdfd }|S)a%A decorator to make `parse_float` safe. `parse_float` must not return dicts or lists, because these types would be mixed with parsed TOML tables and arrays, thus confusing the parser. The returned decorated callable raises `ValueError` instead of returning illegal types. float_strr:r.rct|}t|ttfrtd|S)Nz*parse_float must not return dicts or lists)rrOrr)r float_valuer,s rsafe_parse_floatz/make_safe_parse_float..safe_parse_floats>!k),, kD$< 0 0 KIJJ Jr)rr:r.r)float)r,r"s` rrBrBs;e  r)r-rr,rr.r/)r9r:r,rr.r/)rPr:rQrrrr.r) rPr:rQrrr:rrrrqr.r)rPr:rQrr.r)rPr:rQrrRr?r.r) rPr:rQrrRr?rSrr,rr.r)rPr:rQrr,rr.r)rPr:rQrr.r)rPr:rQrr.r)rPr:rQrr,rr.r)rPr:rQrr,rr.r)rPr:rQrrrqr.r)rPr:rQrrrar.r)rPr:rQrrrqr.r)rPr:rQrr,rr.r)rPr:rQrrr:r.r%)rrar.rq)r,rr.r)G __future__rcollections.abcrstringtypesrtypingrrr_rer r r r rr_typesrrr frozensetrr ASCII_CTRLrrrrrrDr ascii_lettersdigitsrrF hexdigitsrrrr%r#r8r5rAr@r?rCrrMrrKrJrGrrrrrrrrrrrrrrLrrBr*rrr0s #"""""$$$$$$ """""",,,,,,,,,,)((((((((( Y11uuRyy111 1 1IIcc#hh4G4G G %yy6$.61B1B$B!3&G#/ )E   $/6/&-?$FGG"YYu%5%556+,, 0 0 ! !;;;;;j;;;7< - - - - - -27??????D77777777t""""""""DZ ,    $*D     ,,,,$ M M M M 6666 """"0,,,,B.3MMMMMM:<<<<''''%%%%>@A2A2A2A2HAAAA"HHHHrPK{5ZwMLib/site-packages/setuptools/_vendor/tomli/__pycache__/_types.cpython-311.pycnuW+A b;dHddlmZmZmZeegefZeedfZeZdS))AnyCallableTuple.N) typingrrrstr ParseFloatKeyintPosnE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/tomli/_types.pyrsM ('''''''''seSj !  CHo r PK{5ZȘfJLib/site-packages/setuptools/_vendor/tomli/__pycache__/_re.cpython-311.pycnuW+A b;d *ddlmZddlmZmZmZmZmZmZddlm Z ddl Z ddl m Z ddl mZdZe jd e j Ze jeZe jd ed e j ZddZe dd dZd!dZd"dZdS)#) annotations)datedatetimetime timedeltatimezonetzinfo) lru_cacheN)Any) ParseFloatzE([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(?:\.([0-9]{1,6})[0-9]*)?a` 0 (?: x[0-9A-Fa-f](?:_?[0-9A-Fa-f])* # hex | b[01](?:_?[01])* # bin | o[0-7](?:_?[0-7])* # oct ) | [+-]?(?:0|[1-9](?:_?[0-9])*) # dec, integer part (?P (?:\.[0-9](?:_?[0-9])*)? # optional fractional part (?:[eE][+-]?[0-9](?:_?[0-9])*)? # optional exponent part ) )flagsz` ([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]) # date, e.g. 1988-10-27 (?: [Tt ] zR (?:([Zz])|([+-])([01][0-9]|2[0-3]):([0-5][0-9]))? # optional time offset )? matchre.Matchreturndatetime | datec |\ }}}}}}}}} } } t|t|t|}} } |t| | |St|t|t|}}}|r#t|ddnd}| rt | | | }n|r t j}nd}t| | ||||||S)zConvert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`. Raises ValueError if the match does not correspond to a valid date or datetime. N0r)r )groupsintrljust cached_tzrutcr)ryear_str month_strday_strhour_str minute_strsec_str micros_str zulu_timeoffset_sign_stroffset_hour_stroffset_minute_stryearmonthdayhourminutesecmicrostzs kE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/tomli/_re.pymatch_to_datetimer/4s $   8}}c)nnc'll%DD%%%%H s:G #&D.8 ?S!!!S)) * * *aF% .    \  D%dFC K K KK)maxsizerstrrsign_strrc |dkrdnd}tt|t|z|t|zS)N+r )hoursminutes)rrr)rrr3signs r.rrWsSC11RD X&3z??*     r0rc|\}}}}|r#t|ddnd}tt|t|t||S)Nrrr)rrrr)rrrr r!r,s r.match_to_localtimer;bse05 -Hj':.8 ?S!!!S)) * * *aF H s:G f E EEr0 parse_floatr r c|dr||St|dS)N floatpartr)groupr)rr<s r.match_to_numberr@hsF {{;*{5;;==))) u{{}}a  r0)rrrr)rr2rr2r3r2rr)rrrr)rrr<r rr ) __future__rrrrrrr functoolsr retypingr _typesr _TIME_RE_STRcompileVERBOSE RE_NUMBER RE_LOCALTIME RE_DATETIMEr/rr;r@r0r.rMs| #"""""FFFFFFFFFFFFFFFF  X BJ *#    &rz,'' bj  *     L L L LF 4FFFF !!!!!!r0PK{5Z%6Lib/site-packages/setuptools/_vendor/tomli/__init__.pynuW+A# SPDX-License-Identifier: MIT # SPDX-FileCopyrightText: 2021 Taneli Hukkinen # Licensed to PSF under a Contributor Agreement. __all__ = ("loads", "load", "TOMLDecodeError") __version__ = "2.0.1" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT from ._parser import TOMLDecodeError, load, loads # Pretend this exception was created here. TOMLDecodeError.__module__ = __name__ PK{5ZiiXiX5Lib/site-packages/setuptools/_vendor/tomli/_parser.pynuW+A# SPDX-License-Identifier: MIT # SPDX-FileCopyrightText: 2021 Taneli Hukkinen # Licensed to PSF under a Contributor Agreement. from __future__ import annotations from collections.abc import Iterable import string from types import MappingProxyType from typing import Any, BinaryIO, NamedTuple from ._re import ( RE_DATETIME, RE_LOCALTIME, RE_NUMBER, match_to_datetime, match_to_localtime, match_to_number, ) from ._types import Key, ParseFloat, Pos ASCII_CTRL = frozenset(chr(i) for i in range(32)) | frozenset(chr(127)) # Neither of these sets include quotation mark or backslash. They are # currently handled as separate cases in the parser functions. ILLEGAL_BASIC_STR_CHARS = ASCII_CTRL - frozenset("\t") ILLEGAL_MULTILINE_BASIC_STR_CHARS = ASCII_CTRL - frozenset("\t\n") ILLEGAL_LITERAL_STR_CHARS = ILLEGAL_BASIC_STR_CHARS ILLEGAL_MULTILINE_LITERAL_STR_CHARS = ILLEGAL_MULTILINE_BASIC_STR_CHARS ILLEGAL_COMMENT_CHARS = ILLEGAL_BASIC_STR_CHARS TOML_WS = frozenset(" \t") TOML_WS_AND_NEWLINE = TOML_WS | frozenset("\n") BARE_KEY_CHARS = frozenset(string.ascii_letters + string.digits + "-_") KEY_INITIAL_CHARS = BARE_KEY_CHARS | frozenset("\"'") HEXDIGIT_CHARS = frozenset(string.hexdigits) BASIC_STR_ESCAPE_REPLACEMENTS = MappingProxyType( { "\\b": "\u0008", # backspace "\\t": "\u0009", # tab "\\n": "\u000A", # linefeed "\\f": "\u000C", # form feed "\\r": "\u000D", # carriage return '\\"': "\u0022", # quote "\\\\": "\u005C", # backslash } ) class TOMLDecodeError(ValueError): """An error raised if a document is not valid TOML.""" def load(__fp: BinaryIO, *, parse_float: ParseFloat = float) -> dict[str, Any]: """Parse TOML from a binary file object.""" b = __fp.read() try: s = b.decode() except AttributeError: raise TypeError( "File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`" ) from None return loads(s, parse_float=parse_float) def loads(__s: str, *, parse_float: ParseFloat = float) -> dict[str, Any]: # noqa: C901 """Parse TOML from a string.""" # The spec allows converting "\r\n" to "\n", even in string # literals. Let's do so to simplify parsing. src = __s.replace("\r\n", "\n") pos = 0 out = Output(NestedDict(), Flags()) header: Key = () parse_float = make_safe_parse_float(parse_float) # Parse one statement at a time # (typically means one line in TOML source) while True: # 1. Skip line leading whitespace pos = skip_chars(src, pos, TOML_WS) # 2. Parse rules. Expect one of the following: # - end of file # - end of line # - comment # - key/value pair # - append dict to list (and move to its namespace) # - create dict (and move to its namespace) # Skip trailing whitespace when applicable. try: char = src[pos] except IndexError: break if char == "\n": pos += 1 continue if char in KEY_INITIAL_CHARS: pos = key_value_rule(src, pos, out, header, parse_float) pos = skip_chars(src, pos, TOML_WS) elif char == "[": try: second_char: str | None = src[pos + 1] except IndexError: second_char = None out.flags.finalize_pending() if second_char == "[": pos, header = create_list_rule(src, pos, out) else: pos, header = create_dict_rule(src, pos, out) pos = skip_chars(src, pos, TOML_WS) elif char != "#": raise suffixed_err(src, pos, "Invalid statement") # 3. Skip comment pos = skip_comment(src, pos) # 4. Expect end of line or end of file try: char = src[pos] except IndexError: break if char != "\n": raise suffixed_err( src, pos, "Expected newline or end of document after a statement" ) pos += 1 return out.data.dict class Flags: """Flags that map to parsed keys/namespaces.""" # Marks an immutable namespace (inline array or inline table). FROZEN = 0 # Marks a nest that has been explicitly created and can no longer # be opened using the "[table]" syntax. EXPLICIT_NEST = 1 def __init__(self) -> None: self._flags: dict[str, dict] = {} self._pending_flags: set[tuple[Key, int]] = set() def add_pending(self, key: Key, flag: int) -> None: self._pending_flags.add((key, flag)) def finalize_pending(self) -> None: for key, flag in self._pending_flags: self.set(key, flag, recursive=False) self._pending_flags.clear() def unset_all(self, key: Key) -> None: cont = self._flags for k in key[:-1]: if k not in cont: return cont = cont[k]["nested"] cont.pop(key[-1], None) def set(self, key: Key, flag: int, *, recursive: bool) -> None: # noqa: A003 cont = self._flags key_parent, key_stem = key[:-1], key[-1] for k in key_parent: if k not in cont: cont[k] = {"flags": set(), "recursive_flags": set(), "nested": {}} cont = cont[k]["nested"] if key_stem not in cont: cont[key_stem] = {"flags": set(), "recursive_flags": set(), "nested": {}} cont[key_stem]["recursive_flags" if recursive else "flags"].add(flag) def is_(self, key: Key, flag: int) -> bool: if not key: return False # document root has no flags cont = self._flags for k in key[:-1]: if k not in cont: return False inner_cont = cont[k] if flag in inner_cont["recursive_flags"]: return True cont = inner_cont["nested"] key_stem = key[-1] if key_stem in cont: cont = cont[key_stem] return flag in cont["flags"] or flag in cont["recursive_flags"] return False class NestedDict: def __init__(self) -> None: # The parsed content of the TOML document self.dict: dict[str, Any] = {} def get_or_create_nest( self, key: Key, *, access_lists: bool = True, ) -> dict: cont: Any = self.dict for k in key: if k not in cont: cont[k] = {} cont = cont[k] if access_lists and isinstance(cont, list): cont = cont[-1] if not isinstance(cont, dict): raise KeyError("There is no nest behind this key") return cont def append_nest_to_list(self, key: Key) -> None: cont = self.get_or_create_nest(key[:-1]) last_key = key[-1] if last_key in cont: list_ = cont[last_key] if not isinstance(list_, list): raise KeyError("An object other than list found behind this key") list_.append({}) else: cont[last_key] = [{}] class Output(NamedTuple): data: NestedDict flags: Flags def skip_chars(src: str, pos: Pos, chars: Iterable[str]) -> Pos: try: while src[pos] in chars: pos += 1 except IndexError: pass return pos def skip_until( src: str, pos: Pos, expect: str, *, error_on: frozenset[str], error_on_eof: bool, ) -> Pos: try: new_pos = src.index(expect, pos) except ValueError: new_pos = len(src) if error_on_eof: raise suffixed_err(src, new_pos, f"Expected {expect!r}") from None if not error_on.isdisjoint(src[pos:new_pos]): while src[pos] not in error_on: pos += 1 raise suffixed_err(src, pos, f"Found invalid character {src[pos]!r}") return new_pos def skip_comment(src: str, pos: Pos) -> Pos: try: char: str | None = src[pos] except IndexError: char = None if char == "#": return skip_until( src, pos + 1, "\n", error_on=ILLEGAL_COMMENT_CHARS, error_on_eof=False ) return pos def skip_comments_and_array_ws(src: str, pos: Pos) -> Pos: while True: pos_before_skip = pos pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE) pos = skip_comment(src, pos) if pos == pos_before_skip: return pos def create_dict_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]: pos += 1 # Skip "[" pos = skip_chars(src, pos, TOML_WS) pos, key = parse_key(src, pos) if out.flags.is_(key, Flags.EXPLICIT_NEST) or out.flags.is_(key, Flags.FROZEN): raise suffixed_err(src, pos, f"Cannot declare {key} twice") out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False) try: out.data.get_or_create_nest(key) except KeyError: raise suffixed_err(src, pos, "Cannot overwrite a value") from None if not src.startswith("]", pos): raise suffixed_err(src, pos, "Expected ']' at the end of a table declaration") return pos + 1, key def create_list_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]: pos += 2 # Skip "[[" pos = skip_chars(src, pos, TOML_WS) pos, key = parse_key(src, pos) if out.flags.is_(key, Flags.FROZEN): raise suffixed_err(src, pos, f"Cannot mutate immutable namespace {key}") # Free the namespace now that it points to another empty list item... out.flags.unset_all(key) # ...but this key precisely is still prohibited from table declaration out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False) try: out.data.append_nest_to_list(key) except KeyError: raise suffixed_err(src, pos, "Cannot overwrite a value") from None if not src.startswith("]]", pos): raise suffixed_err(src, pos, "Expected ']]' at the end of an array declaration") return pos + 2, key def key_value_rule( src: str, pos: Pos, out: Output, header: Key, parse_float: ParseFloat ) -> Pos: pos, key, value = parse_key_value_pair(src, pos, parse_float) key_parent, key_stem = key[:-1], key[-1] abs_key_parent = header + key_parent relative_path_cont_keys = (header + key[:i] for i in range(1, len(key))) for cont_key in relative_path_cont_keys: # Check that dotted key syntax does not redefine an existing table if out.flags.is_(cont_key, Flags.EXPLICIT_NEST): raise suffixed_err(src, pos, f"Cannot redefine namespace {cont_key}") # Containers in the relative path can't be opened with the table syntax or # dotted key/value syntax in following table sections. out.flags.add_pending(cont_key, Flags.EXPLICIT_NEST) if out.flags.is_(abs_key_parent, Flags.FROZEN): raise suffixed_err( src, pos, f"Cannot mutate immutable namespace {abs_key_parent}" ) try: nest = out.data.get_or_create_nest(abs_key_parent) except KeyError: raise suffixed_err(src, pos, "Cannot overwrite a value") from None if key_stem in nest: raise suffixed_err(src, pos, "Cannot overwrite a value") # Mark inline table and array namespaces recursively immutable if isinstance(value, (dict, list)): out.flags.set(header + key, Flags.FROZEN, recursive=True) nest[key_stem] = value return pos def parse_key_value_pair( src: str, pos: Pos, parse_float: ParseFloat ) -> tuple[Pos, Key, Any]: pos, key = parse_key(src, pos) try: char: str | None = src[pos] except IndexError: char = None if char != "=": raise suffixed_err(src, pos, "Expected '=' after a key in a key/value pair") pos += 1 pos = skip_chars(src, pos, TOML_WS) pos, value = parse_value(src, pos, parse_float) return pos, key, value def parse_key(src: str, pos: Pos) -> tuple[Pos, Key]: pos, key_part = parse_key_part(src, pos) key: Key = (key_part,) pos = skip_chars(src, pos, TOML_WS) while True: try: char: str | None = src[pos] except IndexError: char = None if char != ".": return pos, key pos += 1 pos = skip_chars(src, pos, TOML_WS) pos, key_part = parse_key_part(src, pos) key += (key_part,) pos = skip_chars(src, pos, TOML_WS) def parse_key_part(src: str, pos: Pos) -> tuple[Pos, str]: try: char: str | None = src[pos] except IndexError: char = None if char in BARE_KEY_CHARS: start_pos = pos pos = skip_chars(src, pos, BARE_KEY_CHARS) return pos, src[start_pos:pos] if char == "'": return parse_literal_str(src, pos) if char == '"': return parse_one_line_basic_str(src, pos) raise suffixed_err(src, pos, "Invalid initial character for a key part") def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]: pos += 1 return parse_basic_str(src, pos, multiline=False) def parse_array(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, list]: pos += 1 array: list = [] pos = skip_comments_and_array_ws(src, pos) if src.startswith("]", pos): return pos + 1, array while True: pos, val = parse_value(src, pos, parse_float) array.append(val) pos = skip_comments_and_array_ws(src, pos) c = src[pos : pos + 1] if c == "]": return pos + 1, array if c != ",": raise suffixed_err(src, pos, "Unclosed array") pos += 1 pos = skip_comments_and_array_ws(src, pos) if src.startswith("]", pos): return pos + 1, array def parse_inline_table(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, dict]: pos += 1 nested_dict = NestedDict() flags = Flags() pos = skip_chars(src, pos, TOML_WS) if src.startswith("}", pos): return pos + 1, nested_dict.dict while True: pos, key, value = parse_key_value_pair(src, pos, parse_float) key_parent, key_stem = key[:-1], key[-1] if flags.is_(key, Flags.FROZEN): raise suffixed_err(src, pos, f"Cannot mutate immutable namespace {key}") try: nest = nested_dict.get_or_create_nest(key_parent, access_lists=False) except KeyError: raise suffixed_err(src, pos, "Cannot overwrite a value") from None if key_stem in nest: raise suffixed_err(src, pos, f"Duplicate inline table key {key_stem!r}") nest[key_stem] = value pos = skip_chars(src, pos, TOML_WS) c = src[pos : pos + 1] if c == "}": return pos + 1, nested_dict.dict if c != ",": raise suffixed_err(src, pos, "Unclosed inline table") if isinstance(value, (dict, list)): flags.set(key, Flags.FROZEN, recursive=True) pos += 1 pos = skip_chars(src, pos, TOML_WS) def parse_basic_str_escape( src: str, pos: Pos, *, multiline: bool = False ) -> tuple[Pos, str]: escape_id = src[pos : pos + 2] pos += 2 if multiline and escape_id in {"\\ ", "\\\t", "\\\n"}: # Skip whitespace until next non-whitespace character or end of # the doc. Error if non-whitespace is found before newline. if escape_id != "\\\n": pos = skip_chars(src, pos, TOML_WS) try: char = src[pos] except IndexError: return pos, "" if char != "\n": raise suffixed_err(src, pos, "Unescaped '\\' in a string") pos += 1 pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE) return pos, "" if escape_id == "\\u": return parse_hex_char(src, pos, 4) if escape_id == "\\U": return parse_hex_char(src, pos, 8) try: return pos, BASIC_STR_ESCAPE_REPLACEMENTS[escape_id] except KeyError: raise suffixed_err(src, pos, "Unescaped '\\' in a string") from None def parse_basic_str_escape_multiline(src: str, pos: Pos) -> tuple[Pos, str]: return parse_basic_str_escape(src, pos, multiline=True) def parse_hex_char(src: str, pos: Pos, hex_len: int) -> tuple[Pos, str]: hex_str = src[pos : pos + hex_len] if len(hex_str) != hex_len or not HEXDIGIT_CHARS.issuperset(hex_str): raise suffixed_err(src, pos, "Invalid hex value") pos += hex_len hex_int = int(hex_str, 16) if not is_unicode_scalar_value(hex_int): raise suffixed_err(src, pos, "Escaped character is not a Unicode scalar value") return pos, chr(hex_int) def parse_literal_str(src: str, pos: Pos) -> tuple[Pos, str]: pos += 1 # Skip starting apostrophe start_pos = pos pos = skip_until( src, pos, "'", error_on=ILLEGAL_LITERAL_STR_CHARS, error_on_eof=True ) return pos + 1, src[start_pos:pos] # Skip ending apostrophe def parse_multiline_str(src: str, pos: Pos, *, literal: bool) -> tuple[Pos, str]: pos += 3 if src.startswith("\n", pos): pos += 1 if literal: delim = "'" end_pos = skip_until( src, pos, "'''", error_on=ILLEGAL_MULTILINE_LITERAL_STR_CHARS, error_on_eof=True, ) result = src[pos:end_pos] pos = end_pos + 3 else: delim = '"' pos, result = parse_basic_str(src, pos, multiline=True) # Add at maximum two extra apostrophes/quotes if the end sequence # is 4 or 5 chars long instead of just 3. if not src.startswith(delim, pos): return pos, result pos += 1 if not src.startswith(delim, pos): return pos, result + delim pos += 1 return pos, result + (delim * 2) def parse_basic_str(src: str, pos: Pos, *, multiline: bool) -> tuple[Pos, str]: if multiline: error_on = ILLEGAL_MULTILINE_BASIC_STR_CHARS parse_escapes = parse_basic_str_escape_multiline else: error_on = ILLEGAL_BASIC_STR_CHARS parse_escapes = parse_basic_str_escape result = "" start_pos = pos while True: try: char = src[pos] except IndexError: raise suffixed_err(src, pos, "Unterminated string") from None if char == '"': if not multiline: return pos + 1, result + src[start_pos:pos] if src.startswith('"""', pos): return pos + 3, result + src[start_pos:pos] pos += 1 continue if char == "\\": result += src[start_pos:pos] pos, parsed_escape = parse_escapes(src, pos) result += parsed_escape start_pos = pos continue if char in error_on: raise suffixed_err(src, pos, f"Illegal character {char!r}") pos += 1 def parse_value( # noqa: C901 src: str, pos: Pos, parse_float: ParseFloat ) -> tuple[Pos, Any]: try: char: str | None = src[pos] except IndexError: char = None # IMPORTANT: order conditions based on speed of checking and likelihood # Basic strings if char == '"': if src.startswith('"""', pos): return parse_multiline_str(src, pos, literal=False) return parse_one_line_basic_str(src, pos) # Literal strings if char == "'": if src.startswith("'''", pos): return parse_multiline_str(src, pos, literal=True) return parse_literal_str(src, pos) # Booleans if char == "t": if src.startswith("true", pos): return pos + 4, True if char == "f": if src.startswith("false", pos): return pos + 5, False # Arrays if char == "[": return parse_array(src, pos, parse_float) # Inline tables if char == "{": return parse_inline_table(src, pos, parse_float) # Dates and times datetime_match = RE_DATETIME.match(src, pos) if datetime_match: try: datetime_obj = match_to_datetime(datetime_match) except ValueError as e: raise suffixed_err(src, pos, "Invalid date or datetime") from e return datetime_match.end(), datetime_obj localtime_match = RE_LOCALTIME.match(src, pos) if localtime_match: return localtime_match.end(), match_to_localtime(localtime_match) # Integers and "normal" floats. # The regex will greedily match any type starting with a decimal # char, so needs to be located after handling of dates and times. number_match = RE_NUMBER.match(src, pos) if number_match: return number_match.end(), match_to_number(number_match, parse_float) # Special floats first_three = src[pos : pos + 3] if first_three in {"inf", "nan"}: return pos + 3, parse_float(first_three) first_four = src[pos : pos + 4] if first_four in {"-inf", "+inf", "-nan", "+nan"}: return pos + 4, parse_float(first_four) raise suffixed_err(src, pos, "Invalid value") def suffixed_err(src: str, pos: Pos, msg: str) -> TOMLDecodeError: """Return a `TOMLDecodeError` where error message is suffixed with coordinates in source.""" def coord_repr(src: str, pos: Pos) -> str: if pos >= len(src): return "end of document" line = src.count("\n", 0, pos) + 1 if line == 1: column = pos + 1 else: column = pos - src.rindex("\n", 0, pos) return f"line {line}, column {column}" return TOMLDecodeError(f"{msg} (at {coord_repr(src, pos)})") def is_unicode_scalar_value(codepoint: int) -> bool: return (0 <= codepoint <= 55295) or (57344 <= codepoint <= 1114111) def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat: """A decorator to make `parse_float` safe. `parse_float` must not return dicts or lists, because these types would be mixed with parsed TOML tables and arrays, thus confusing the parser. The returned decorated callable raises `ValueError` instead of returning illegal types. """ # The default `float` callable never returns illegal types. Optimize it. if parse_float is float: # type: ignore[comparison-overlap] return float def safe_parse_float(float_str: str) -> Any: float_value = parse_float(float_str) if isinstance(float_value, (dict, list)): raise ValueError("parse_float must not return dicts or lists") return float_value return safe_parse_float PK{5Zt1<Lib/site-packages/setuptools/_vendor/packaging/_musllinux.pynuW+A"""PEP 656 support. This module implements logic to detect if the currently running Python is linked against musl, and what musl version is used. """ import contextlib import functools import operator import os import re import struct import subprocess import sys from typing import IO, Iterator, NamedTuple, Optional, Tuple def _read_unpacked(f: IO[bytes], fmt: str) -> Tuple[int, ...]: return struct.unpack(fmt, f.read(struct.calcsize(fmt))) def _parse_ld_musl_from_elf(f: IO[bytes]) -> Optional[str]: """Detect musl libc location by parsing the Python executable. Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html """ f.seek(0) try: ident = _read_unpacked(f, "16B") except struct.error: return None if ident[:4] != tuple(b"\x7fELF"): # Invalid magic, not ELF. return None f.seek(struct.calcsize("HHI"), 1) # Skip file type, machine, and version. try: # e_fmt: Format for program header. # p_fmt: Format for section header. # p_idx: Indexes to find p_type, p_offset, and p_filesz. e_fmt, p_fmt, p_idx = { 1: ("IIIIHHH", "IIIIIIII", (0, 1, 4)), # 32-bit. 2: ("QQQIHHH", "IIQQQQQQ", (0, 2, 5)), # 64-bit. }[ident[4]] except KeyError: return None else: p_get = operator.itemgetter(*p_idx) # Find the interpreter section and return its content. try: _, e_phoff, _, _, _, e_phentsize, e_phnum = _read_unpacked(f, e_fmt) except struct.error: return None for i in range(e_phnum + 1): f.seek(e_phoff + e_phentsize * i) try: p_type, p_offset, p_filesz = p_get(_read_unpacked(f, p_fmt)) except struct.error: return None if p_type != 3: # Not PT_INTERP. continue f.seek(p_offset) interpreter = os.fsdecode(f.read(p_filesz)).strip("\0") if "musl" not in interpreter: return None return interpreter return None class _MuslVersion(NamedTuple): major: int minor: int def _parse_musl_version(output: str) -> Optional[_MuslVersion]: lines = [n for n in (n.strip() for n in output.splitlines()) if n] if len(lines) < 2 or lines[0][:4] != "musl": return None m = re.match(r"Version (\d+)\.(\d+)", lines[1]) if not m: return None return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2))) @functools.lru_cache() def _get_musl_version(executable: str) -> Optional[_MuslVersion]: """Detect currently-running musl runtime version. This is done by checking the specified executable's dynamic linking information, and invoking the loader to parse its output for a version string. If the loader is musl, the output would be something like:: musl libc (x86_64) Version 1.2.2 Dynamic Program Loader """ with contextlib.ExitStack() as stack: try: f = stack.enter_context(open(executable, "rb")) except OSError: return None ld = _parse_ld_musl_from_elf(f) if not ld: return None proc = subprocess.run([ld], stderr=subprocess.PIPE, universal_newlines=True) return _parse_musl_version(proc.stderr) def platform_tags(arch: str) -> Iterator[str]: """Generate musllinux tags compatible to the current platform. :param arch: Should be the part of platform tag after the ``linux_`` prefix, e.g. ``x86_64``. The ``linux_`` prefix is assumed as a prerequisite for the current platform to be musllinux-compatible. :returns: An iterator of compatible musllinux tags. """ sys_musl = _get_musl_version(sys.executable) if sys_musl is None: # Python not dynamically linked against musl. return for minor in range(sys_musl.minor, -1, -1): yield f"musllinux_{sys_musl.major}_{minor}_{arch}" if __name__ == "__main__": # pragma: no cover import sysconfig plat = sysconfig.get_platform() assert plat.startswith("linux-"), "not linux" print("plat:", plat) print("musl:", _get_musl_version(sys.executable)) print("tags:", end=" ") for t in platform_tags(re.sub(r"[.-]", "_", plat.split("-", 1)[-1])): print(t, end="\n ") PK{5Z*:c,,<Lib/site-packages/setuptools/_vendor/packaging/_manylinux.pynuW+Aimport collections import functools import os import re import struct import sys import warnings from typing import IO, Dict, Iterator, NamedTuple, Optional, Tuple # Python does not provide platform information at sufficient granularity to # identify the architecture of the running executable in some cases, so we # determine it dynamically by reading the information from the running # process. This only applies on Linux, which uses the ELF format. class _ELFFileHeader: # https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header class _InvalidELFFileHeader(ValueError): """ An invalid ELF file header was found. """ ELF_MAGIC_NUMBER = 0x7F454C46 ELFCLASS32 = 1 ELFCLASS64 = 2 ELFDATA2LSB = 1 ELFDATA2MSB = 2 EM_386 = 3 EM_S390 = 22 EM_ARM = 40 EM_X86_64 = 62 EF_ARM_ABIMASK = 0xFF000000 EF_ARM_ABI_VER5 = 0x05000000 EF_ARM_ABI_FLOAT_HARD = 0x00000400 def __init__(self, file: IO[bytes]) -> None: def unpack(fmt: str) -> int: try: data = file.read(struct.calcsize(fmt)) result: Tuple[int, ...] = struct.unpack(fmt, data) except struct.error: raise _ELFFileHeader._InvalidELFFileHeader() return result[0] self.e_ident_magic = unpack(">I") if self.e_ident_magic != self.ELF_MAGIC_NUMBER: raise _ELFFileHeader._InvalidELFFileHeader() self.e_ident_class = unpack("B") if self.e_ident_class not in {self.ELFCLASS32, self.ELFCLASS64}: raise _ELFFileHeader._InvalidELFFileHeader() self.e_ident_data = unpack("B") if self.e_ident_data not in {self.ELFDATA2LSB, self.ELFDATA2MSB}: raise _ELFFileHeader._InvalidELFFileHeader() self.e_ident_version = unpack("B") self.e_ident_osabi = unpack("B") self.e_ident_abiversion = unpack("B") self.e_ident_pad = file.read(7) format_h = "H" format_i = "I" format_q = "Q" format_p = format_i if self.e_ident_class == self.ELFCLASS32 else format_q self.e_type = unpack(format_h) self.e_machine = unpack(format_h) self.e_version = unpack(format_i) self.e_entry = unpack(format_p) self.e_phoff = unpack(format_p) self.e_shoff = unpack(format_p) self.e_flags = unpack(format_i) self.e_ehsize = unpack(format_h) self.e_phentsize = unpack(format_h) self.e_phnum = unpack(format_h) self.e_shentsize = unpack(format_h) self.e_shnum = unpack(format_h) self.e_shstrndx = unpack(format_h) def _get_elf_header() -> Optional[_ELFFileHeader]: try: with open(sys.executable, "rb") as f: elf_header = _ELFFileHeader(f) except (OSError, TypeError, _ELFFileHeader._InvalidELFFileHeader): return None return elf_header def _is_linux_armhf() -> bool: # hard-float ABI can be detected from the ELF header of the running # process # https://static.docs.arm.com/ihi0044/g/aaelf32.pdf elf_header = _get_elf_header() if elf_header is None: return False result = elf_header.e_ident_class == elf_header.ELFCLASS32 result &= elf_header.e_ident_data == elf_header.ELFDATA2LSB result &= elf_header.e_machine == elf_header.EM_ARM result &= ( elf_header.e_flags & elf_header.EF_ARM_ABIMASK ) == elf_header.EF_ARM_ABI_VER5 result &= ( elf_header.e_flags & elf_header.EF_ARM_ABI_FLOAT_HARD ) == elf_header.EF_ARM_ABI_FLOAT_HARD return result def _is_linux_i686() -> bool: elf_header = _get_elf_header() if elf_header is None: return False result = elf_header.e_ident_class == elf_header.ELFCLASS32 result &= elf_header.e_ident_data == elf_header.ELFDATA2LSB result &= elf_header.e_machine == elf_header.EM_386 return result def _have_compatible_abi(arch: str) -> bool: if arch == "armv7l": return _is_linux_armhf() if arch == "i686": return _is_linux_i686() return arch in {"x86_64", "aarch64", "ppc64", "ppc64le", "s390x"} # If glibc ever changes its major version, we need to know what the last # minor version was, so we can build the complete list of all versions. # For now, guess what the highest minor version might be, assume it will # be 50 for testing. Once this actually happens, update the dictionary # with the actual value. _LAST_GLIBC_MINOR: Dict[int, int] = collections.defaultdict(lambda: 50) class _GLibCVersion(NamedTuple): major: int minor: int def _glibc_version_string_confstr() -> Optional[str]: """ Primary implementation of glibc_version_string using os.confstr. """ # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely # to be broken or missing. This strategy is used in the standard library # platform module. # https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183 try: # os.confstr("CS_GNU_LIBC_VERSION") returns a string like "glibc 2.17". version_string = os.confstr("CS_GNU_LIBC_VERSION") assert version_string is not None _, version = version_string.split() except (AssertionError, AttributeError, OSError, ValueError): # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)... return None return version def _glibc_version_string_ctypes() -> Optional[str]: """ Fallback implementation of glibc_version_string using ctypes. """ try: import ctypes except ImportError: return None # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen # manpage says, "If filename is NULL, then the returned handle is for the # main program". This way we can let the linker do the work to figure out # which libc our process is actually using. # # We must also handle the special case where the executable is not a # dynamically linked executable. This can occur when using musl libc, # for example. In this situation, dlopen() will error, leading to an # OSError. Interestingly, at least in the case of musl, there is no # errno set on the OSError. The single string argument used to construct # OSError comes from libc itself and is therefore not portable to # hard code here. In any case, failure to call dlopen() means we # can proceed, so we bail on our attempt. try: process_namespace = ctypes.CDLL(None) except OSError: return None try: gnu_get_libc_version = process_namespace.gnu_get_libc_version except AttributeError: # Symbol doesn't exist -> therefore, we are not linked to # glibc. return None # Call gnu_get_libc_version, which returns a string like "2.5" gnu_get_libc_version.restype = ctypes.c_char_p version_str: str = gnu_get_libc_version() # py2 / py3 compatibility: if not isinstance(version_str, str): version_str = version_str.decode("ascii") return version_str def _glibc_version_string() -> Optional[str]: """Returns glibc version string, or None if not using glibc.""" return _glibc_version_string_confstr() or _glibc_version_string_ctypes() def _parse_glibc_version(version_str: str) -> Tuple[int, int]: """Parse glibc version. We use a regexp instead of str.split because we want to discard any random junk that might come after the minor version -- this might happen in patched/forked versions of glibc (e.g. Linaro's version of glibc uses version strings like "2.20-2014.11"). See gh-3588. """ m = re.match(r"(?P[0-9]+)\.(?P[0-9]+)", version_str) if not m: warnings.warn( "Expected glibc version with 2 components major.minor," " got: %s" % version_str, RuntimeWarning, ) return -1, -1 return int(m.group("major")), int(m.group("minor")) @functools.lru_cache() def _get_glibc_version() -> Tuple[int, int]: version_str = _glibc_version_string() if version_str is None: return (-1, -1) return _parse_glibc_version(version_str) # From PEP 513, PEP 600 def _is_compatible(name: str, arch: str, version: _GLibCVersion) -> bool: sys_glibc = _get_glibc_version() if sys_glibc < version: return False # Check for presence of _manylinux module. try: import _manylinux # noqa except ImportError: return True if hasattr(_manylinux, "manylinux_compatible"): result = _manylinux.manylinux_compatible(version[0], version[1], arch) if result is not None: return bool(result) return True if version == _GLibCVersion(2, 5): if hasattr(_manylinux, "manylinux1_compatible"): return bool(_manylinux.manylinux1_compatible) if version == _GLibCVersion(2, 12): if hasattr(_manylinux, "manylinux2010_compatible"): return bool(_manylinux.manylinux2010_compatible) if version == _GLibCVersion(2, 17): if hasattr(_manylinux, "manylinux2014_compatible"): return bool(_manylinux.manylinux2014_compatible) return True _LEGACY_MANYLINUX_MAP = { # CentOS 7 w/ glibc 2.17 (PEP 599) (2, 17): "manylinux2014", # CentOS 6 w/ glibc 2.12 (PEP 571) (2, 12): "manylinux2010", # CentOS 5 w/ glibc 2.5 (PEP 513) (2, 5): "manylinux1", } def platform_tags(linux: str, arch: str) -> Iterator[str]: if not _have_compatible_abi(arch): return # Oldest glibc to be supported regardless of architecture is (2, 17). too_old_glibc2 = _GLibCVersion(2, 16) if arch in {"x86_64", "i686"}: # On x86/i686 also oldest glibc to be supported is (2, 5). too_old_glibc2 = _GLibCVersion(2, 4) current_glibc = _GLibCVersion(*_get_glibc_version()) glibc_max_list = [current_glibc] # We can assume compatibility across glibc major versions. # https://sourceware.org/bugzilla/show_bug.cgi?id=24636 # # Build a list of maximum glibc versions so that we can # output the canonical list of all glibc from current_glibc # down to too_old_glibc2, including all intermediary versions. for glibc_major in range(current_glibc.major - 1, 1, -1): glibc_minor = _LAST_GLIBC_MINOR[glibc_major] glibc_max_list.append(_GLibCVersion(glibc_major, glibc_minor)) for glibc_max in glibc_max_list: if glibc_max.major == too_old_glibc2.major: min_minor = too_old_glibc2.minor else: # For other glibc major versions oldest supported is (x, 0). min_minor = -1 for glibc_minor in range(glibc_max.minor, min_minor, -1): glibc_version = _GLibCVersion(glibc_max.major, glibc_minor) tag = "manylinux_{}_{}".format(*glibc_version) if _is_compatible(tag, arch, glibc_version): yield linux.replace("linux", tag) # Handle the legacy manylinux1, manylinux2010, manylinux2014 tags. if glibc_version in _LEGACY_MANYLINUX_MAP: legacy_tag = _LEGACY_MANYLINUX_MAP[glibc_version] if _is_compatible(legacy_tag, arch, glibc_version): yield linux.replace("linux", legacy_tag) PK{5Z 2 I9I99Lib/site-packages/setuptools/_vendor/packaging/version.pynuW+A# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import collections import itertools import re import warnings from typing import Callable, Iterator, List, Optional, SupportsInt, Tuple, Union from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType __all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"] InfiniteTypes = Union[InfinityType, NegativeInfinityType] PrePostDevType = Union[InfiniteTypes, Tuple[str, int]] SubLocalType = Union[InfiniteTypes, int, str] LocalType = Union[ NegativeInfinityType, Tuple[ Union[ SubLocalType, Tuple[SubLocalType, str], Tuple[NegativeInfinityType, SubLocalType], ], ..., ], ] CmpKey = Tuple[ int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType ] LegacyCmpKey = Tuple[int, Tuple[str, ...]] VersionComparisonMethod = Callable[ [Union[CmpKey, LegacyCmpKey], Union[CmpKey, LegacyCmpKey]], bool ] _Version = collections.namedtuple( "_Version", ["epoch", "release", "dev", "pre", "post", "local"] ) def parse(version: str) -> Union["LegacyVersion", "Version"]: """ Parse the given version string and return either a :class:`Version` object or a :class:`LegacyVersion` object depending on if the given version is a valid PEP 440 version or a legacy version. """ try: return Version(version) except InvalidVersion: return LegacyVersion(version) class InvalidVersion(ValueError): """ An invalid version was found, users should refer to PEP 440. """ class _BaseVersion: _key: Union[CmpKey, LegacyCmpKey] def __hash__(self) -> int: return hash(self._key) # Please keep the duplicated `isinstance` check # in the six comparisons hereunder # unless you find a way to avoid adding overhead function calls. def __lt__(self, other: "_BaseVersion") -> bool: if not isinstance(other, _BaseVersion): return NotImplemented return self._key < other._key def __le__(self, other: "_BaseVersion") -> bool: if not isinstance(other, _BaseVersion): return NotImplemented return self._key <= other._key def __eq__(self, other: object) -> bool: if not isinstance(other, _BaseVersion): return NotImplemented return self._key == other._key def __ge__(self, other: "_BaseVersion") -> bool: if not isinstance(other, _BaseVersion): return NotImplemented return self._key >= other._key def __gt__(self, other: "_BaseVersion") -> bool: if not isinstance(other, _BaseVersion): return NotImplemented return self._key > other._key def __ne__(self, other: object) -> bool: if not isinstance(other, _BaseVersion): return NotImplemented return self._key != other._key class LegacyVersion(_BaseVersion): def __init__(self, version: str) -> None: self._version = str(version) self._key = _legacy_cmpkey(self._version) warnings.warn( "Creating a LegacyVersion has been deprecated and will be " "removed in the next major release", DeprecationWarning, ) def __str__(self) -> str: return self._version def __repr__(self) -> str: return f"" @property def public(self) -> str: return self._version @property def base_version(self) -> str: return self._version @property def epoch(self) -> int: return -1 @property def release(self) -> None: return None @property def pre(self) -> None: return None @property def post(self) -> None: return None @property def dev(self) -> None: return None @property def local(self) -> None: return None @property def is_prerelease(self) -> bool: return False @property def is_postrelease(self) -> bool: return False @property def is_devrelease(self) -> bool: return False _legacy_version_component_re = re.compile(r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE) _legacy_version_replacement_map = { "pre": "c", "preview": "c", "-": "final-", "rc": "c", "dev": "@", } def _parse_version_parts(s: str) -> Iterator[str]: for part in _legacy_version_component_re.split(s): part = _legacy_version_replacement_map.get(part, part) if not part or part == ".": continue if part[:1] in "0123456789": # pad for numeric comparison yield part.zfill(8) else: yield "*" + part # ensure that alpha/beta/candidate are before final yield "*final" def _legacy_cmpkey(version: str) -> LegacyCmpKey: # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch # greater than or equal to 0. This will effectively put the LegacyVersion, # which uses the defacto standard originally implemented by setuptools, # as before all PEP 440 versions. epoch = -1 # This scheme is taken from pkg_resources.parse_version setuptools prior to # it's adoption of the packaging library. parts: List[str] = [] for part in _parse_version_parts(version.lower()): if part.startswith("*"): # remove "-" before a prerelease tag if part < "*final": while parts and parts[-1] == "*final-": parts.pop() # remove trailing zeros from each series of numeric parts while parts and parts[-1] == "00000000": parts.pop() parts.append(part) return epoch, tuple(parts) # Deliberately not anchored to the start and end of the string, to make it # easier for 3rd party code to reuse VERSION_PATTERN = r""" v? (?: (?:(?P[0-9]+)!)? # epoch (?P[0-9]+(?:\.[0-9]+)*) # release segment (?P
                                          # pre-release
            [-_\.]?
            (?P(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P[0-9]+)?
        )?
        (?P                                         # post release
            (?:-(?P[0-9]+))
            |
            (?:
                [-_\.]?
                (?Ppost|rev|r)
                [-_\.]?
                (?P[0-9]+)?
            )
        )?
        (?P                                          # dev release
            [-_\.]?
            (?Pdev)
            [-_\.]?
            (?P[0-9]+)?
        )?
    )
    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
"""


class Version(_BaseVersion):

    _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)

    def __init__(self, version: str) -> None:

        # Validate the version and parse it into pieces
        match = self._regex.search(version)
        if not match:
            raise InvalidVersion(f"Invalid version: '{version}'")

        # Store the parsed out pieces of the version
        self._version = _Version(
            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
            release=tuple(int(i) for i in match.group("release").split(".")),
            pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")),
            post=_parse_letter_version(
                match.group("post_l"), match.group("post_n1") or match.group("post_n2")
            ),
            dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")),
            local=_parse_local_version(match.group("local")),
        )

        # Generate a key which will be used for sorting
        self._key = _cmpkey(
            self._version.epoch,
            self._version.release,
            self._version.pre,
            self._version.post,
            self._version.dev,
            self._version.local,
        )

    def __repr__(self) -> str:
        return f""

    def __str__(self) -> str:
        parts = []

        # Epoch
        if self.epoch != 0:
            parts.append(f"{self.epoch}!")

        # Release segment
        parts.append(".".join(str(x) for x in self.release))

        # Pre-release
        if self.pre is not None:
            parts.append("".join(str(x) for x in self.pre))

        # Post-release
        if self.post is not None:
            parts.append(f".post{self.post}")

        # Development release
        if self.dev is not None:
            parts.append(f".dev{self.dev}")

        # Local version segment
        if self.local is not None:
            parts.append(f"+{self.local}")

        return "".join(parts)

    @property
    def epoch(self) -> int:
        _epoch: int = self._version.epoch
        return _epoch

    @property
    def release(self) -> Tuple[int, ...]:
        _release: Tuple[int, ...] = self._version.release
        return _release

    @property
    def pre(self) -> Optional[Tuple[str, int]]:
        _pre: Optional[Tuple[str, int]] = self._version.pre
        return _pre

    @property
    def post(self) -> Optional[int]:
        return self._version.post[1] if self._version.post else None

    @property
    def dev(self) -> Optional[int]:
        return self._version.dev[1] if self._version.dev else None

    @property
    def local(self) -> Optional[str]:
        if self._version.local:
            return ".".join(str(x) for x in self._version.local)
        else:
            return None

    @property
    def public(self) -> str:
        return str(self).split("+", 1)[0]

    @property
    def base_version(self) -> str:
        parts = []

        # Epoch
        if self.epoch != 0:
            parts.append(f"{self.epoch}!")

        # Release segment
        parts.append(".".join(str(x) for x in self.release))

        return "".join(parts)

    @property
    def is_prerelease(self) -> bool:
        return self.dev is not None or self.pre is not None

    @property
    def is_postrelease(self) -> bool:
        return self.post is not None

    @property
    def is_devrelease(self) -> bool:
        return self.dev is not None

    @property
    def major(self) -> int:
        return self.release[0] if len(self.release) >= 1 else 0

    @property
    def minor(self) -> int:
        return self.release[1] if len(self.release) >= 2 else 0

    @property
    def micro(self) -> int:
        return self.release[2] if len(self.release) >= 3 else 0


def _parse_letter_version(
    letter: str, number: Union[str, bytes, SupportsInt]
) -> Optional[Tuple[str, int]]:

    if letter:
        # We consider there to be an implicit 0 in a pre-release if there is
        # not a numeral associated with it.
        if number is None:
            number = 0

        # We normalize any letters to their lower case form
        letter = letter.lower()

        # We consider some words to be alternate spellings of other words and
        # in those cases we want to normalize the spellings to our preferred
        # spelling.
        if letter == "alpha":
            letter = "a"
        elif letter == "beta":
            letter = "b"
        elif letter in ["c", "pre", "preview"]:
            letter = "rc"
        elif letter in ["rev", "r"]:
            letter = "post"

        return letter, int(number)
    if not letter and number:
        # We assume if we are given a number, but we are not given a letter
        # then this is using the implicit post release syntax (e.g. 1.0-1)
        letter = "post"

        return letter, int(number)

    return None


_local_version_separators = re.compile(r"[\._-]")


def _parse_local_version(local: str) -> Optional[LocalType]:
    """
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    """
    if local is not None:
        return tuple(
            part.lower() if not part.isdigit() else int(part)
            for part in _local_version_separators.split(local)
        )
    return None


def _cmpkey(
    epoch: int,
    release: Tuple[int, ...],
    pre: Optional[Tuple[str, int]],
    post: Optional[Tuple[str, int]],
    dev: Optional[Tuple[str, int]],
    local: Optional[Tuple[SubLocalType]],
) -> CmpKey:

    # When we compare a release version, we want to compare it with all of the
    # trailing zeros removed. So we'll use a reverse the list, drop all the now
    # leading zeros until we come to something non zero, then take the rest
    # re-reverse it back into the correct order and make it a tuple and use
    # that for our sorting key.
    _release = tuple(
        reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release))))
    )

    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
    # We'll do this by abusing the pre segment, but we _only_ want to do this
    # if there is not a pre or a post segment. If we have one of those then
    # the normal sorting rules will handle this case correctly.
    if pre is None and post is None and dev is not None:
        _pre: PrePostDevType = NegativeInfinity
    # Versions without a pre-release (except as noted above) should sort after
    # those with one.
    elif pre is None:
        _pre = Infinity
    else:
        _pre = pre

    # Versions without a post segment should sort before those with one.
    if post is None:
        _post: PrePostDevType = NegativeInfinity

    else:
        _post = post

    # Versions without a development segment should sort after those with one.
    if dev is None:
        _dev: PrePostDevType = Infinity

    else:
        _dev = dev

    if local is None:
        # Versions without a local segment should sort before those with one.
        _local: LocalType = NegativeInfinity
    else:
        # Versions with a local segment need that segment parsed to implement
        # the sorting rules in PEP440.
        # - Alpha numeric segments sort before numeric segments
        # - Alpha numeric segments sort lexicographically
        # - Numeric segments sort numerically
        # - Shorter versions sort before longer versions when the prefixes
        #   match exactly
        _local = tuple(
            (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
        )

    return epoch, _release, _pre, _post, _dev, _local
PK{5Z5uu<Lib/site-packages/setuptools/_vendor/packaging/specifiers.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import abc
import functools
import itertools
import re
import warnings
from typing import (
    Callable,
    Dict,
    Iterable,
    Iterator,
    List,
    Optional,
    Pattern,
    Set,
    Tuple,
    TypeVar,
    Union,
)

from .utils import canonicalize_version
from .version import LegacyVersion, Version, parse

ParsedVersion = Union[Version, LegacyVersion]
UnparsedVersion = Union[Version, LegacyVersion, str]
VersionTypeVar = TypeVar("VersionTypeVar", bound=UnparsedVersion)
CallableOperator = Callable[[ParsedVersion, str], bool]


class InvalidSpecifier(ValueError):
    """
    An invalid specifier was found, users should refer to PEP 440.
    """


class BaseSpecifier(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def __str__(self) -> str:
        """
        Returns the str representation of this Specifier like object. This
        should be representative of the Specifier itself.
        """

    @abc.abstractmethod
    def __hash__(self) -> int:
        """
        Returns a hash value for this Specifier like object.
        """

    @abc.abstractmethod
    def __eq__(self, other: object) -> bool:
        """
        Returns a boolean representing whether or not the two Specifier like
        objects are equal.
        """

    @abc.abstractproperty
    def prereleases(self) -> Optional[bool]:
        """
        Returns whether or not pre-releases as a whole are allowed by this
        specifier.
        """

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        """
        Sets whether or not pre-releases as a whole are allowed by this
        specifier.
        """

    @abc.abstractmethod
    def contains(self, item: str, prereleases: Optional[bool] = None) -> bool:
        """
        Determines if the given item is contained within this specifier.
        """

    @abc.abstractmethod
    def filter(
        self, iterable: Iterable[VersionTypeVar], prereleases: Optional[bool] = None
    ) -> Iterable[VersionTypeVar]:
        """
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        """


class _IndividualSpecifier(BaseSpecifier):

    _operators: Dict[str, str] = {}
    _regex: Pattern[str]

    def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
        match = self._regex.search(spec)
        if not match:
            raise InvalidSpecifier(f"Invalid specifier: '{spec}'")

        self._spec: Tuple[str, str] = (
            match.group("operator").strip(),
            match.group("version").strip(),
        )

        # Store whether or not this Specifier should accept prereleases
        self._prereleases = prereleases

    def __repr__(self) -> str:
        pre = (
            f", prereleases={self.prereleases!r}"
            if self._prereleases is not None
            else ""
        )

        return f"<{self.__class__.__name__}({str(self)!r}{pre})>"

    def __str__(self) -> str:
        return "{}{}".format(*self._spec)

    @property
    def _canonical_spec(self) -> Tuple[str, str]:
        return self._spec[0], canonicalize_version(self._spec[1])

    def __hash__(self) -> int:
        return hash(self._canonical_spec)

    def __eq__(self, other: object) -> bool:
        if isinstance(other, str):
            try:
                other = self.__class__(str(other))
            except InvalidSpecifier:
                return NotImplemented
        elif not isinstance(other, self.__class__):
            return NotImplemented

        return self._canonical_spec == other._canonical_spec

    def _get_operator(self, op: str) -> CallableOperator:
        operator_callable: CallableOperator = getattr(
            self, f"_compare_{self._operators[op]}"
        )
        return operator_callable

    def _coerce_version(self, version: UnparsedVersion) -> ParsedVersion:
        if not isinstance(version, (LegacyVersion, Version)):
            version = parse(version)
        return version

    @property
    def operator(self) -> str:
        return self._spec[0]

    @property
    def version(self) -> str:
        return self._spec[1]

    @property
    def prereleases(self) -> Optional[bool]:
        return self._prereleases

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value

    def __contains__(self, item: str) -> bool:
        return self.contains(item)

    def contains(
        self, item: UnparsedVersion, prereleases: Optional[bool] = None
    ) -> bool:

        # Determine if prereleases are to be allowed or not.
        if prereleases is None:
            prereleases = self.prereleases

        # Normalize item to a Version or LegacyVersion, this allows us to have
        # a shortcut for ``"2.0" in Specifier(">=2")
        normalized_item = self._coerce_version(item)

        # Determine if we should be supporting prereleases in this specifier
        # or not, if we do not support prereleases than we can short circuit
        # logic if this version is a prereleases.
        if normalized_item.is_prerelease and not prereleases:
            return False

        # Actually do the comparison to determine if this item is contained
        # within this Specifier or not.
        operator_callable: CallableOperator = self._get_operator(self.operator)
        return operator_callable(normalized_item, self.version)

    def filter(
        self, iterable: Iterable[VersionTypeVar], prereleases: Optional[bool] = None
    ) -> Iterable[VersionTypeVar]:

        yielded = False
        found_prereleases = []

        kw = {"prereleases": prereleases if prereleases is not None else True}

        # Attempt to iterate over all the values in the iterable and if any of
        # them match, yield them.
        for version in iterable:
            parsed_version = self._coerce_version(version)

            if self.contains(parsed_version, **kw):
                # If our version is a prerelease, and we were not set to allow
                # prereleases, then we'll store it for later in case nothing
                # else matches this specifier.
                if parsed_version.is_prerelease and not (
                    prereleases or self.prereleases
                ):
                    found_prereleases.append(version)
                # Either this is not a prerelease, or we should have been
                # accepting prereleases from the beginning.
                else:
                    yielded = True
                    yield version

        # Now that we've iterated over everything, determine if we've yielded
        # any values, and if we have not and we have any prereleases stored up
        # then we will go ahead and yield the prereleases.
        if not yielded and found_prereleases:
            for version in found_prereleases:
                yield version


class LegacySpecifier(_IndividualSpecifier):

    _regex_str = r"""
        (?P(==|!=|<=|>=|<|>))
        \s*
        (?P
            [^,;\s)]* # Since this is a "legacy" specifier, and the version
                      # string can be just about anything, we match everything
                      # except for whitespace, a semi-colon for marker support,
                      # a closing paren since versions can be enclosed in
                      # them, and a comma since it's a version separator.
        )
        """

    _regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE)

    _operators = {
        "==": "equal",
        "!=": "not_equal",
        "<=": "less_than_equal",
        ">=": "greater_than_equal",
        "<": "less_than",
        ">": "greater_than",
    }

    def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
        super().__init__(spec, prereleases)

        warnings.warn(
            "Creating a LegacyVersion has been deprecated and will be "
            "removed in the next major release",
            DeprecationWarning,
        )

    def _coerce_version(self, version: UnparsedVersion) -> LegacyVersion:
        if not isinstance(version, LegacyVersion):
            version = LegacyVersion(str(version))
        return version

    def _compare_equal(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective == self._coerce_version(spec)

    def _compare_not_equal(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective != self._coerce_version(spec)

    def _compare_less_than_equal(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective <= self._coerce_version(spec)

    def _compare_greater_than_equal(
        self, prospective: LegacyVersion, spec: str
    ) -> bool:
        return prospective >= self._coerce_version(spec)

    def _compare_less_than(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective < self._coerce_version(spec)

    def _compare_greater_than(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective > self._coerce_version(spec)


def _require_version_compare(
    fn: Callable[["Specifier", ParsedVersion, str], bool]
) -> Callable[["Specifier", ParsedVersion, str], bool]:
    @functools.wraps(fn)
    def wrapped(self: "Specifier", prospective: ParsedVersion, spec: str) -> bool:
        if not isinstance(prospective, Version):
            return False
        return fn(self, prospective, spec)

    return wrapped


class Specifier(_IndividualSpecifier):

    _regex_str = r"""
        (?P(~=|==|!=|<=|>=|<|>|===))
        (?P
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s]*    # We just match everything, except for whitespace
                          # since we are only testing for strict identity.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?

                # You cannot use a wild card and a dev or local version
                # together so group them with a | and make them optional.
                (?:
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                    |
                    \.\*  # Wild card syntax of .*
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?=": "greater_than_equal",
        "<": "less_than",
        ">": "greater_than",
        "===": "arbitrary",
    }

    @_require_version_compare
    def _compare_compatible(self, prospective: ParsedVersion, spec: str) -> bool:

        # Compatible releases have an equivalent combination of >= and ==. That
        # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to
        # implement this in terms of the other specifiers instead of
        # implementing it ourselves. The only thing we need to do is construct
        # the other specifiers.

        # We want everything but the last item in the version, but we want to
        # ignore suffix segments.
        prefix = ".".join(
            list(itertools.takewhile(_is_not_suffix, _version_split(spec)))[:-1]
        )

        # Add the prefix notation to the end of our string
        prefix += ".*"

        return self._get_operator(">=")(prospective, spec) and self._get_operator("==")(
            prospective, prefix
        )

    @_require_version_compare
    def _compare_equal(self, prospective: ParsedVersion, spec: str) -> bool:

        # We need special logic to handle prefix matching
        if spec.endswith(".*"):
            # In the case of prefix matching we want to ignore local segment.
            prospective = Version(prospective.public)
            # Split the spec out by dots, and pretend that there is an implicit
            # dot in between a release segment and a pre-release segment.
            split_spec = _version_split(spec[:-2])  # Remove the trailing .*

            # Split the prospective version out by dots, and pretend that there
            # is an implicit dot in between a release segment and a pre-release
            # segment.
            split_prospective = _version_split(str(prospective))

            # Shorten the prospective version to be the same length as the spec
            # so that we can determine if the specifier is a prefix of the
            # prospective version or not.
            shortened_prospective = split_prospective[: len(split_spec)]

            # Pad out our two sides with zeros so that they both equal the same
            # length.
            padded_spec, padded_prospective = _pad_version(
                split_spec, shortened_prospective
            )

            return padded_prospective == padded_spec
        else:
            # Convert our spec string into a Version
            spec_version = Version(spec)

            # If the specifier does not have a local segment, then we want to
            # act as if the prospective version also does not have a local
            # segment.
            if not spec_version.local:
                prospective = Version(prospective.public)

            return prospective == spec_version

    @_require_version_compare
    def _compare_not_equal(self, prospective: ParsedVersion, spec: str) -> bool:
        return not self._compare_equal(prospective, spec)

    @_require_version_compare
    def _compare_less_than_equal(self, prospective: ParsedVersion, spec: str) -> bool:

        # NB: Local version identifiers are NOT permitted in the version
        # specifier, so local version labels can be universally removed from
        # the prospective version.
        return Version(prospective.public) <= Version(spec)

    @_require_version_compare
    def _compare_greater_than_equal(
        self, prospective: ParsedVersion, spec: str
    ) -> bool:

        # NB: Local version identifiers are NOT permitted in the version
        # specifier, so local version labels can be universally removed from
        # the prospective version.
        return Version(prospective.public) >= Version(spec)

    @_require_version_compare
    def _compare_less_than(self, prospective: ParsedVersion, spec_str: str) -> bool:

        # Convert our spec to a Version instance, since we'll want to work with
        # it as a version.
        spec = Version(spec_str)

        # Check to see if the prospective version is less than the spec
        # version. If it's not we can short circuit and just return False now
        # instead of doing extra unneeded work.
        if not prospective < spec:
            return False

        # This special case is here so that, unless the specifier itself
        # includes is a pre-release version, that we do not accept pre-release
        # versions for the version mentioned in the specifier (e.g. <3.1 should
        # not match 3.1.dev0, but should match 3.0.dev0).
        if not spec.is_prerelease and prospective.is_prerelease:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # If we've gotten to here, it means that prospective version is both
        # less than the spec version *and* it's not a pre-release of the same
        # version in the spec.
        return True

    @_require_version_compare
    def _compare_greater_than(self, prospective: ParsedVersion, spec_str: str) -> bool:

        # Convert our spec to a Version instance, since we'll want to work with
        # it as a version.
        spec = Version(spec_str)

        # Check to see if the prospective version is greater than the spec
        # version. If it's not we can short circuit and just return False now
        # instead of doing extra unneeded work.
        if not prospective > spec:
            return False

        # This special case is here so that, unless the specifier itself
        # includes is a post-release version, that we do not accept
        # post-release versions for the version mentioned in the specifier
        # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0).
        if not spec.is_postrelease and prospective.is_postrelease:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # Ensure that we do not allow a local version of the version mentioned
        # in the specifier, which is technically greater than, to match.
        if prospective.local is not None:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # If we've gotten to here, it means that prospective version is both
        # greater than the spec version *and* it's not a pre-release of the
        # same version in the spec.
        return True

    def _compare_arbitrary(self, prospective: Version, spec: str) -> bool:
        return str(prospective).lower() == str(spec).lower()

    @property
    def prereleases(self) -> bool:

        # If there is an explicit prereleases set for this, then we'll just
        # blindly use that.
        if self._prereleases is not None:
            return self._prereleases

        # Look at all of our specifiers and determine if they are inclusive
        # operators, and if they are if they are including an explicit
        # prerelease.
        operator, version = self._spec
        if operator in ["==", ">=", "<=", "~=", "==="]:
            # The == specifier can include a trailing .*, if it does we
            # want to remove before parsing.
            if operator == "==" and version.endswith(".*"):
                version = version[:-2]

            # Parse the version, and if it is a pre-release than this
            # specifier allows pre-releases.
            if parse(version).is_prerelease:
                return True

        return False

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value


_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$")


def _version_split(version: str) -> List[str]:
    result: List[str] = []
    for item in version.split("."):
        match = _prefix_regex.search(item)
        if match:
            result.extend(match.groups())
        else:
            result.append(item)
    return result


def _is_not_suffix(segment: str) -> bool:
    return not any(
        segment.startswith(prefix) for prefix in ("dev", "a", "b", "rc", "post")
    )


def _pad_version(left: List[str], right: List[str]) -> Tuple[List[str], List[str]]:
    left_split, right_split = [], []

    # Get the release segment of our versions
    left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left)))
    right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right)))

    # Get the rest of our versions
    left_split.append(left[len(left_split[0]) :])
    right_split.append(right[len(right_split[0]) :])

    # Insert our padding
    left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0])))
    right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0])))

    return (list(itertools.chain(*left_split)), list(itertools.chain(*right_split)))


class SpecifierSet(BaseSpecifier):
    def __init__(
        self, specifiers: str = "", prereleases: Optional[bool] = None
    ) -> None:

        # Split on , to break each individual specifier into it's own item, and
        # strip each item to remove leading/trailing whitespace.
        split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()]

        # Parsed each individual specifier, attempting first to make it a
        # Specifier and falling back to a LegacySpecifier.
        parsed: Set[_IndividualSpecifier] = set()
        for specifier in split_specifiers:
            try:
                parsed.add(Specifier(specifier))
            except InvalidSpecifier:
                parsed.add(LegacySpecifier(specifier))

        # Turn our parsed specifiers into a frozen set and save them for later.
        self._specs = frozenset(parsed)

        # Store our prereleases value so we can use it later to determine if
        # we accept prereleases or not.
        self._prereleases = prereleases

    def __repr__(self) -> str:
        pre = (
            f", prereleases={self.prereleases!r}"
            if self._prereleases is not None
            else ""
        )

        return f""

    def __str__(self) -> str:
        return ",".join(sorted(str(s) for s in self._specs))

    def __hash__(self) -> int:
        return hash(self._specs)

    def __and__(self, other: Union["SpecifierSet", str]) -> "SpecifierSet":
        if isinstance(other, str):
            other = SpecifierSet(other)
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        specifier = SpecifierSet()
        specifier._specs = frozenset(self._specs | other._specs)

        if self._prereleases is None and other._prereleases is not None:
            specifier._prereleases = other._prereleases
        elif self._prereleases is not None and other._prereleases is None:
            specifier._prereleases = self._prereleases
        elif self._prereleases == other._prereleases:
            specifier._prereleases = self._prereleases
        else:
            raise ValueError(
                "Cannot combine SpecifierSets with True and False prerelease "
                "overrides."
            )

        return specifier

    def __eq__(self, other: object) -> bool:
        if isinstance(other, (str, _IndividualSpecifier)):
            other = SpecifierSet(str(other))
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        return self._specs == other._specs

    def __len__(self) -> int:
        return len(self._specs)

    def __iter__(self) -> Iterator[_IndividualSpecifier]:
        return iter(self._specs)

    @property
    def prereleases(self) -> Optional[bool]:

        # If we have been given an explicit prerelease modifier, then we'll
        # pass that through here.
        if self._prereleases is not None:
            return self._prereleases

        # If we don't have any specifiers, and we don't have a forced value,
        # then we'll just return None since we don't know if this should have
        # pre-releases or not.
        if not self._specs:
            return None

        # Otherwise we'll see if any of the given specifiers accept
        # prereleases, if any of them do we'll return True, otherwise False.
        return any(s.prereleases for s in self._specs)

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value

    def __contains__(self, item: UnparsedVersion) -> bool:
        return self.contains(item)

    def contains(
        self, item: UnparsedVersion, prereleases: Optional[bool] = None
    ) -> bool:

        # Ensure that our item is a Version or LegacyVersion instance.
        if not isinstance(item, (LegacyVersion, Version)):
            item = parse(item)

        # Determine if we're forcing a prerelease or not, if we're not forcing
        # one for this particular filter call, then we'll use whatever the
        # SpecifierSet thinks for whether or not we should support prereleases.
        if prereleases is None:
            prereleases = self.prereleases

        # We can determine if we're going to allow pre-releases by looking to
        # see if any of the underlying items supports them. If none of them do
        # and this item is a pre-release then we do not allow it and we can
        # short circuit that here.
        # Note: This means that 1.0.dev1 would not be contained in something
        #       like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0
        if not prereleases and item.is_prerelease:
            return False

        # We simply dispatch to the underlying specs here to make sure that the
        # given version is contained within all of them.
        # Note: This use of all() here means that an empty set of specifiers
        #       will always return True, this is an explicit design decision.
        return all(s.contains(item, prereleases=prereleases) for s in self._specs)

    def filter(
        self, iterable: Iterable[VersionTypeVar], prereleases: Optional[bool] = None
    ) -> Iterable[VersionTypeVar]:

        # Determine if we're forcing a prerelease or not, if we're not forcing
        # one for this particular filter call, then we'll use whatever the
        # SpecifierSet thinks for whether or not we should support prereleases.
        if prereleases is None:
            prereleases = self.prereleases

        # If we have any specifiers, then we want to wrap our iterable in the
        # filter method for each one, this will act as a logical AND amongst
        # each specifier.
        if self._specs:
            for spec in self._specs:
                iterable = spec.filter(iterable, prereleases=bool(prereleases))
            return iterable
        # If we do not have any specifiers, then we need to have a rough filter
        # which will filter out any pre-releases, unless there are no final
        # releases, and which will filter out LegacyVersion in general.
        else:
            filtered: List[VersionTypeVar] = []
            found_prereleases: List[VersionTypeVar] = []

            item: UnparsedVersion
            parsed_version: Union[Version, LegacyVersion]

            for item in iterable:
                # Ensure that we some kind of Version class for this item.
                if not isinstance(item, (LegacyVersion, Version)):
                    parsed_version = parse(item)
                else:
                    parsed_version = item

                # Filter out any item which is parsed as a LegacyVersion
                if isinstance(parsed_version, LegacyVersion):
                    continue

                # Store any item which is a pre-release for later unless we've
                # already found a final version or we are accepting prereleases
                if parsed_version.is_prerelease and not prereleases:
                    if not filtered:
                        found_prereleases.append(item)
                else:
                    filtered.append(item)

            # If we've found no items except for pre-releases, then we'll go
            # ahead and use the pre-releases
            if not filtered and found_prereleases and prereleases is None:
                return found_prereleases

            return filtered
PK{5Z	msS=S=6Lib/site-packages/setuptools/_vendor/packaging/tags.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import logging
import platform
import sys
import sysconfig
from importlib.machinery import EXTENSION_SUFFIXES
from typing import (
    Dict,
    FrozenSet,
    Iterable,
    Iterator,
    List,
    Optional,
    Sequence,
    Tuple,
    Union,
    cast,
)

from . import _manylinux, _musllinux

logger = logging.getLogger(__name__)

PythonVersion = Sequence[int]
MacVersion = Tuple[int, int]

INTERPRETER_SHORT_NAMES: Dict[str, str] = {
    "python": "py",  # Generic.
    "cpython": "cp",
    "pypy": "pp",
    "ironpython": "ip",
    "jython": "jy",
}


_32_BIT_INTERPRETER = sys.maxsize <= 2 ** 32


class Tag:
    """
    A representation of the tag triple for a wheel.

    Instances are considered immutable and thus are hashable. Equality checking
    is also supported.
    """

    __slots__ = ["_interpreter", "_abi", "_platform", "_hash"]

    def __init__(self, interpreter: str, abi: str, platform: str) -> None:
        self._interpreter = interpreter.lower()
        self._abi = abi.lower()
        self._platform = platform.lower()
        # The __hash__ of every single element in a Set[Tag] will be evaluated each time
        # that a set calls its `.disjoint()` method, which may be called hundreds of
        # times when scanning a page of links for packages with tags matching that
        # Set[Tag]. Pre-computing the value here produces significant speedups for
        # downstream consumers.
        self._hash = hash((self._interpreter, self._abi, self._platform))

    @property
    def interpreter(self) -> str:
        return self._interpreter

    @property
    def abi(self) -> str:
        return self._abi

    @property
    def platform(self) -> str:
        return self._platform

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, Tag):
            return NotImplemented

        return (
            (self._hash == other._hash)  # Short-circuit ASAP for perf reasons.
            and (self._platform == other._platform)
            and (self._abi == other._abi)
            and (self._interpreter == other._interpreter)
        )

    def __hash__(self) -> int:
        return self._hash

    def __str__(self) -> str:
        return f"{self._interpreter}-{self._abi}-{self._platform}"

    def __repr__(self) -> str:
        return f"<{self} @ {id(self)}>"


def parse_tag(tag: str) -> FrozenSet[Tag]:
    """
    Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.

    Returning a set is required due to the possibility that the tag is a
    compressed tag set.
    """
    tags = set()
    interpreters, abis, platforms = tag.split("-")
    for interpreter in interpreters.split("."):
        for abi in abis.split("."):
            for platform_ in platforms.split("."):
                tags.add(Tag(interpreter, abi, platform_))
    return frozenset(tags)


def _get_config_var(name: str, warn: bool = False) -> Union[int, str, None]:
    value = sysconfig.get_config_var(name)
    if value is None and warn:
        logger.debug(
            "Config variable '%s' is unset, Python ABI tag may be incorrect", name
        )
    return value


def _normalize_string(string: str) -> str:
    return string.replace(".", "_").replace("-", "_")


def _abi3_applies(python_version: PythonVersion) -> bool:
    """
    Determine if the Python version supports abi3.

    PEP 384 was first implemented in Python 3.2.
    """
    return len(python_version) > 1 and tuple(python_version) >= (3, 2)


def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> List[str]:
    py_version = tuple(py_version)  # To allow for version comparison.
    abis = []
    version = _version_nodot(py_version[:2])
    debug = pymalloc = ucs4 = ""
    with_debug = _get_config_var("Py_DEBUG", warn)
    has_refcount = hasattr(sys, "gettotalrefcount")
    # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled
    # extension modules is the best option.
    # https://github.com/pypa/pip/issues/3383#issuecomment-173267692
    has_ext = "_d.pyd" in EXTENSION_SUFFIXES
    if with_debug or (with_debug is None and (has_refcount or has_ext)):
        debug = "d"
    if py_version < (3, 8):
        with_pymalloc = _get_config_var("WITH_PYMALLOC", warn)
        if with_pymalloc or with_pymalloc is None:
            pymalloc = "m"
        if py_version < (3, 3):
            unicode_size = _get_config_var("Py_UNICODE_SIZE", warn)
            if unicode_size == 4 or (
                unicode_size is None and sys.maxunicode == 0x10FFFF
            ):
                ucs4 = "u"
    elif debug:
        # Debug builds can also load "normal" extension modules.
        # We can also assume no UCS-4 or pymalloc requirement.
        abis.append(f"cp{version}")
    abis.insert(
        0,
        "cp{version}{debug}{pymalloc}{ucs4}".format(
            version=version, debug=debug, pymalloc=pymalloc, ucs4=ucs4
        ),
    )
    return abis


def cpython_tags(
    python_version: Optional[PythonVersion] = None,
    abis: Optional[Iterable[str]] = None,
    platforms: Optional[Iterable[str]] = None,
    *,
    warn: bool = False,
) -> Iterator[Tag]:
    """
    Yields the tags for a CPython interpreter.

    The tags consist of:
    - cp--
    - cp-abi3-
    - cp-none-
    - cp-abi3-  # Older Python versions down to 3.2.

    If python_version only specifies a major version then user-provided ABIs and
    the 'none' ABItag will be used.

    If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
    their normal position and not at the beginning.
    """
    if not python_version:
        python_version = sys.version_info[:2]

    interpreter = f"cp{_version_nodot(python_version[:2])}"

    if abis is None:
        if len(python_version) > 1:
            abis = _cpython_abis(python_version, warn)
        else:
            abis = []
    abis = list(abis)
    # 'abi3' and 'none' are explicitly handled later.
    for explicit_abi in ("abi3", "none"):
        try:
            abis.remove(explicit_abi)
        except ValueError:
            pass

    platforms = list(platforms or platform_tags())
    for abi in abis:
        for platform_ in platforms:
            yield Tag(interpreter, abi, platform_)
    if _abi3_applies(python_version):
        yield from (Tag(interpreter, "abi3", platform_) for platform_ in platforms)
    yield from (Tag(interpreter, "none", platform_) for platform_ in platforms)

    if _abi3_applies(python_version):
        for minor_version in range(python_version[1] - 1, 1, -1):
            for platform_ in platforms:
                interpreter = "cp{version}".format(
                    version=_version_nodot((python_version[0], minor_version))
                )
                yield Tag(interpreter, "abi3", platform_)


def _generic_abi() -> Iterator[str]:
    abi = sysconfig.get_config_var("SOABI")
    if abi:
        yield _normalize_string(abi)


def generic_tags(
    interpreter: Optional[str] = None,
    abis: Optional[Iterable[str]] = None,
    platforms: Optional[Iterable[str]] = None,
    *,
    warn: bool = False,
) -> Iterator[Tag]:
    """
    Yields the tags for a generic interpreter.

    The tags consist of:
    - --

    The "none" ABI will be added if it was not explicitly provided.
    """
    if not interpreter:
        interp_name = interpreter_name()
        interp_version = interpreter_version(warn=warn)
        interpreter = "".join([interp_name, interp_version])
    if abis is None:
        abis = _generic_abi()
    platforms = list(platforms or platform_tags())
    abis = list(abis)
    if "none" not in abis:
        abis.append("none")
    for abi in abis:
        for platform_ in platforms:
            yield Tag(interpreter, abi, platform_)


def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]:
    """
    Yields Python versions in descending order.

    After the latest version, the major-only version will be yielded, and then
    all previous versions of that major version.
    """
    if len(py_version) > 1:
        yield f"py{_version_nodot(py_version[:2])}"
    yield f"py{py_version[0]}"
    if len(py_version) > 1:
        for minor in range(py_version[1] - 1, -1, -1):
            yield f"py{_version_nodot((py_version[0], minor))}"


def compatible_tags(
    python_version: Optional[PythonVersion] = None,
    interpreter: Optional[str] = None,
    platforms: Optional[Iterable[str]] = None,
) -> Iterator[Tag]:
    """
    Yields the sequence of tags that are compatible with a specific version of Python.

    The tags consist of:
    - py*-none-
    - -none-any  # ... if `interpreter` is provided.
    - py*-none-any
    """
    if not python_version:
        python_version = sys.version_info[:2]
    platforms = list(platforms or platform_tags())
    for version in _py_interpreter_range(python_version):
        for platform_ in platforms:
            yield Tag(version, "none", platform_)
    if interpreter:
        yield Tag(interpreter, "none", "any")
    for version in _py_interpreter_range(python_version):
        yield Tag(version, "none", "any")


def _mac_arch(arch: str, is_32bit: bool = _32_BIT_INTERPRETER) -> str:
    if not is_32bit:
        return arch

    if arch.startswith("ppc"):
        return "ppc"

    return "i386"


def _mac_binary_formats(version: MacVersion, cpu_arch: str) -> List[str]:
    formats = [cpu_arch]
    if cpu_arch == "x86_64":
        if version < (10, 4):
            return []
        formats.extend(["intel", "fat64", "fat32"])

    elif cpu_arch == "i386":
        if version < (10, 4):
            return []
        formats.extend(["intel", "fat32", "fat"])

    elif cpu_arch == "ppc64":
        # TODO: Need to care about 32-bit PPC for ppc64 through 10.2?
        if version > (10, 5) or version < (10, 4):
            return []
        formats.append("fat64")

    elif cpu_arch == "ppc":
        if version > (10, 6):
            return []
        formats.extend(["fat32", "fat"])

    if cpu_arch in {"arm64", "x86_64"}:
        formats.append("universal2")

    if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}:
        formats.append("universal")

    return formats


def mac_platforms(
    version: Optional[MacVersion] = None, arch: Optional[str] = None
) -> Iterator[str]:
    """
    Yields the platform tags for a macOS system.

    The `version` parameter is a two-item tuple specifying the macOS version to
    generate platform tags for. The `arch` parameter is the CPU architecture to
    generate platform tags for. Both parameters default to the appropriate value
    for the current system.
    """
    version_str, _, cpu_arch = platform.mac_ver()
    if version is None:
        version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2])))
    else:
        version = version
    if arch is None:
        arch = _mac_arch(cpu_arch)
    else:
        arch = arch

    if (10, 0) <= version and version < (11, 0):
        # Prior to Mac OS 11, each yearly release of Mac OS bumped the
        # "minor" version number.  The major version was always 10.
        for minor_version in range(version[1], -1, -1):
            compat_version = 10, minor_version
            binary_formats = _mac_binary_formats(compat_version, arch)
            for binary_format in binary_formats:
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=10, minor=minor_version, binary_format=binary_format
                )

    if version >= (11, 0):
        # Starting with Mac OS 11, each yearly release bumps the major version
        # number.   The minor versions are now the midyear updates.
        for major_version in range(version[0], 10, -1):
            compat_version = major_version, 0
            binary_formats = _mac_binary_formats(compat_version, arch)
            for binary_format in binary_formats:
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=major_version, minor=0, binary_format=binary_format
                )

    if version >= (11, 0):
        # Mac OS 11 on x86_64 is compatible with binaries from previous releases.
        # Arm64 support was introduced in 11.0, so no Arm binaries from previous
        # releases exist.
        #
        # However, the "universal2" binary format can have a
        # macOS version earlier than 11.0 when the x86_64 part of the binary supports
        # that version of macOS.
        if arch == "x86_64":
            for minor_version in range(16, 3, -1):
                compat_version = 10, minor_version
                binary_formats = _mac_binary_formats(compat_version, arch)
                for binary_format in binary_formats:
                    yield "macosx_{major}_{minor}_{binary_format}".format(
                        major=compat_version[0],
                        minor=compat_version[1],
                        binary_format=binary_format,
                    )
        else:
            for minor_version in range(16, 3, -1):
                compat_version = 10, minor_version
                binary_format = "universal2"
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=compat_version[0],
                    minor=compat_version[1],
                    binary_format=binary_format,
                )


def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]:
    linux = _normalize_string(sysconfig.get_platform())
    if is_32bit:
        if linux == "linux_x86_64":
            linux = "linux_i686"
        elif linux == "linux_aarch64":
            linux = "linux_armv7l"
    _, arch = linux.split("_", 1)
    yield from _manylinux.platform_tags(linux, arch)
    yield from _musllinux.platform_tags(arch)
    yield linux


def _generic_platforms() -> Iterator[str]:
    yield _normalize_string(sysconfig.get_platform())


def platform_tags() -> Iterator[str]:
    """
    Provides the platform tags for this installation.
    """
    if platform.system() == "Darwin":
        return mac_platforms()
    elif platform.system() == "Linux":
        return _linux_platforms()
    else:
        return _generic_platforms()


def interpreter_name() -> str:
    """
    Returns the name of the running interpreter.
    """
    name = sys.implementation.name
    return INTERPRETER_SHORT_NAMES.get(name) or name


def interpreter_version(*, warn: bool = False) -> str:
    """
    Returns the version of the running interpreter.
    """
    version = _get_config_var("py_version_nodot", warn=warn)
    if version:
        version = str(version)
    else:
        version = _version_nodot(sys.version_info[:2])
    return version


def _version_nodot(version: PythonVersion) -> str:
    return "".join(map(str, version))


def sys_tags(*, warn: bool = False) -> Iterator[Tag]:
    """
    Returns the sequence of tag triples for the running interpreter.

    The order of the sequence corresponds to priority order for the
    interpreter, from most to least important.
    """

    interp_name = interpreter_name()
    if interp_name == "cp":
        yield from cpython_tags(warn=warn)
    else:
        yield from generic_tags()

    if interp_name == "pp":
        yield from compatible_tags(interpreter="pp3")
    else:
        yield from compatible_tags()
PK{5ZX\\>Lib/site-packages/setuptools/_vendor/packaging/requirements.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import re
import string
import urllib.parse
from typing import List, Optional as TOptional, Set

from setuptools.extern.pyparsing import (  # noqa
    Combine,
    Literal as L,
    Optional,
    ParseException,
    Regex,
    Word,
    ZeroOrMore,
    originalTextFor,
    stringEnd,
    stringStart,
)

from .markers import MARKER_EXPR, Marker
from .specifiers import LegacySpecifier, Specifier, SpecifierSet


class InvalidRequirement(ValueError):
    """
    An invalid requirement was found, users should refer to PEP 508.
    """


ALPHANUM = Word(string.ascii_letters + string.digits)

LBRACKET = L("[").suppress()
RBRACKET = L("]").suppress()
LPAREN = L("(").suppress()
RPAREN = L(")").suppress()
COMMA = L(",").suppress()
SEMICOLON = L(";").suppress()
AT = L("@").suppress()

PUNCTUATION = Word("-_.")
IDENTIFIER_END = ALPHANUM | (ZeroOrMore(PUNCTUATION) + ALPHANUM)
IDENTIFIER = Combine(ALPHANUM + ZeroOrMore(IDENTIFIER_END))

NAME = IDENTIFIER("name")
EXTRA = IDENTIFIER

URI = Regex(r"[^ ]+")("url")
URL = AT + URI

EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA)
EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras")

VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE)
VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE)

VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY
VERSION_MANY = Combine(
    VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), joinString=",", adjacent=False
)("_raw_spec")
_VERSION_SPEC = Optional((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)
_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or "")

VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier")
VERSION_SPEC.setParseAction(lambda s, l, t: t[1])

MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
MARKER_EXPR.setParseAction(
    lambda s, l, t: Marker(s[t._original_start : t._original_end])
)
MARKER_SEPARATOR = SEMICOLON
MARKER = MARKER_SEPARATOR + MARKER_EXPR

VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER)
URL_AND_MARKER = URL + Optional(MARKER)

NAMED_REQUIREMENT = NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER)

REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd
# setuptools.extern.pyparsing isn't thread safe during initialization, so we do it eagerly, see
# issue #104
REQUIREMENT.parseString("x[]")


class Requirement:
    """Parse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.
    """

    # TODO: Can we test whether something is contained within a requirement?
    #       If so how do we do that? Do we need to test against the _name_ of
    #       the thing as well as the version? What about the markers?
    # TODO: Can we normalize the name and extra name?

    def __init__(self, requirement_string: str) -> None:
        try:
            req = REQUIREMENT.parseString(requirement_string)
        except ParseException as e:
            raise InvalidRequirement(
                f'Parse error at "{ requirement_string[e.loc : e.loc + 8]!r}": {e.msg}'
            )

        self.name: str = req.name
        if req.url:
            parsed_url = urllib.parse.urlparse(req.url)
            if parsed_url.scheme == "file":
                if urllib.parse.urlunparse(parsed_url) != req.url:
                    raise InvalidRequirement("Invalid URL given")
            elif not (parsed_url.scheme and parsed_url.netloc) or (
                not parsed_url.scheme and not parsed_url.netloc
            ):
                raise InvalidRequirement(f"Invalid URL: {req.url}")
            self.url: TOptional[str] = req.url
        else:
            self.url = None
        self.extras: Set[str] = set(req.extras.asList() if req.extras else [])
        self.specifier: SpecifierSet = SpecifierSet(req.specifier)
        self.marker: TOptional[Marker] = req.marker if req.marker else None

    def __str__(self) -> str:
        parts: List[str] = [self.name]

        if self.extras:
            formatted_extras = ",".join(sorted(self.extras))
            parts.append(f"[{formatted_extras}]")

        if self.specifier:
            parts.append(str(self.specifier))

        if self.url:
            parts.append(f"@ {self.url}")
            if self.marker:
                parts.append(" ")

        if self.marker:
            parts.append(f"; {self.marker}")

        return "".join(parts)

    def __repr__(self) -> str:
        return f""
PK{5Zs!!KKSLib/site-packages/setuptools/_vendor/packaging/__pycache__/__init__.cpython-311.pycnuW+A

b;d6ddlmZmZmZmZmZmZmZmZgdZ	dS))
__author__
__copyright__	__email____license____summary__	__title____uri____version__)rrr	r
rrrrN)
	__about__rrrrrrr	r
__all__tE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/packaging/__init__.pyrs~
																							rPK{5ZdWLib/site-packages/setuptools/_vendor/packaging/__pycache__/requirements.cpython-311.pycnuW+A

b;d\ddlZddlZddlZddlmZmZmZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZddlmZmZddlmZmZmZGddeZeejejzZed	 Z!ed
 Z"ed Z#ed Z$ed
 Z%ed Z&ed Z'edZ(eee(ezzZ)e
eee)zZ*e*dZ+e*Z,eddZ-e'e-zZ.e,ee%e,zzZ/e!ee/ze"zdZ0eej1ej2ej3zZ4eej1ej2ej3zZ5e4e5zZ6e
e6ee%e6zzd
ddZ7ee#e7ze$ze7zZ8e89dee8dZ:e:9deedZej9de&Z;e;ezZe+ee0ze>e=zzZ?ee?zezZ@e@AdGddZBdS) N)ListOptionalSet)
CombineLiteralrParseExceptionRegexWord
ZeroOrMoreoriginalTextFor	stringEndstringStart)MARKER_EXPRMarker)LegacySpecifier	SpecifierSpecifierSetceZdZdZdS)InvalidRequirementzJ
    An invalid requirement was found, users should refer to PEP 508.
    N)__name__
__module____qualname____doc__xE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/packaging/requirements.pyrrsrr[](),;@z-_.namez[^ ]+urlextrasF)
joinStringadjacent	_raw_specc|jpdS)N)r*slts   rr1@s
Q[->Br	specifierc|dS)Nrrr-s   rr1r1Cs
AaDrmarkercDt||j|jS)N)r_original_start
_original_endr-s   rr1r1GsF1Q.@ABBrzx[]c:eZdZdZdeddfdZdefdZdefdZdS)RequirementzParse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.
    requirement_stringreturnNc	t|}nA#t$r4}td||j|jdzd|jd}~wwxYw|j|_|jrtj	
|j}|jdkr8tj	||jkrtdn3|jr|j
r|js|j
std|j|j|_nd|_t|jr|jng|_t#|j|_|jr|jnd|_dS)NzParse error at "z": filezInvalid URL givenz
Invalid URL: )REQUIREMENTparseStringrrlocmsgr%r&urllibparseurlparsescheme
urlunparsenetlocsetr'asListrr2r4)selfr:reqe
parsed_urls     r__init__zRequirement.__init__ds	))*<==CC			$W$6ququqy7H$IWWPQPUWW
	
	7	..sw77J F**<**:66#'AA,-@AAAB '
DJ,=
D%
D.8.?
D))B)B)BCCC'*wDHHDH #3:$MCJ$5$5$7$7$72 N N'3CM'B'B7:z)Kts
A/AAc|jg}|jr@dt|j}|d|d|jr'|t
|j|jr9|d|j|jr|d|jr|d|jd|S)Nr"rrz@  z; r,)	r%r'joinsortedappendr2strr&r4)rKpartsformatted_extrass   r__str__zRequirement.__str__}s I;;	2"xxt{(;(;<<LL0-000111>	.LLT^,,---8	"LLdh))){
"S!!!;	-LL+dk++,,,wwu~~rcd|dS)Nzr)rKs r__repr__zRequirement.__repr__s)))))r)rrrrrUrOrXrZrrrr9r9Ws|L3L4LLLL2(*#******rr9)Crestringurllib.parserCtypingrr	TOptionalrsetuptools.extern.pyparsingrrLrr	r
rrr
rmarkersrr
specifiersrrr
ValueErrorr
ascii_lettersdigitsALPHANUMsuppressLBRACKETRBRACKETLPARENRPARENCOMMA	SEMICOLONATPUNCTUATIONIDENTIFIER_END
IDENTIFIERNAMEEXTRAURIURLEXTRAS_LISTEXTRAS
_regex_strVERBOSE
IGNORECASEVERSION_PEP440VERSION_LEGACYVERSION_ONEVERSION_MANY
_VERSION_SPECsetParseActionVERSION_SPECMARKER_SEPARATORMARKERVERSION_AND_MARKERURL_AND_MARKERNAMED_REQUIREMENTr?r@r9rrrrsj

			



3333333333)(((((((@@@@@@@@@@4$v}4551S66??1S66??	
3			
3			#
AcFFOO	QsVV__d5kkZZ44x?@
WX

> : ::
;
;
z&eeHooe3hjj///
5(XXk**
*X
5x	@	@y+RZ"--GHH12:
3MNN~-ww**U[0111cE
&</&8LHII

>>???-}--k::00111,ookkmm,,X66BB	K	'!HHV$4$44xx'''88F+++~@R/RS--	9;*;*;*;*;*;*;*;*;*;*rPK{5Z^33ULib/site-packages/setuptools/_vendor/packaging/__pycache__/_manylinux.cpython-311.pycnuW+A

b;d,UddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
Z
GddZdeefdZdefdZdefdZd	edefd
ZejdZe	eefed<Gd
deZdeefdZdeefdZdeefdZdede
eeffdZejde
eeffdZded	ededefdZ ddddZ!ded	ede
efdZ"dS)N)IODictIterator
NamedTupleOptionalTuplecveZdZGddeZdZdZdZdZdZ	dZ
dZdZd	Z
d
ZdZdZd
eeddfdZdS)_ELFFileHeaderceZdZdZdS)$_ELFFileHeader._InvalidELFFileHeaderz7
        An invalid ELF file header was found.
        N)__name__
__module____qualname____doc__vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/packaging/_manylinux.py_InvalidELFFileHeaderrs				rriFLE(>l~iifilereturnNcndtdtffd}|d|_|j|jkrt|d|_|j|j|jhvrt|d|_	|j	|j
|jhvrt|d|_|d|_
|d|_d|_|j	|j
krdnd}|j	|j
krd	nd}|j	|j
krd
nd}|j|jkr|n|}|||_|||_|||_|||_|||_|||_|||_|||_|||_|||_|||_|||_|||_dS)Nfmtrc	tj|}tj||}n,#tj$rt
wxYw|dS)Nr)readstructcalcsizeunpackerrorr
r)rdataresultrs   rr#z'_ELFFileHeader.__init__..unpack$so
=yy!5!566*0-T*B*B<
=
=
=$::<<<
=!9sIBzHzQ)strint
e_ident_magicELF_MAGIC_NUMBERr
r
e_ident_class
ELFCLASS32
ELFCLASS64e_ident_dataELFDATA2LSBELFDATA2MSBe_ident_version
e_ident_osabie_ident_abiversionr e_ident_pade_type	e_machine	e_versione_entrye_phoffe_shoffe_flagse_ehsizee_phentsizee_phnume_shentsizee_shnum
e_shstrndx)selfrr#format_hformat_iformat_qformat_ps `     r__init__z_ELFFileHeader.__init__#s`								$VD\\!666 66888#VC[[dot%GGG 66888"F3KKT%5t7G$HHH 66888%vc{{#VC[["(&++99Q<<,0@@@44d,0@@@44d,0@@@44d#1T_DD88(fX&&))))vh''vh''vh''vh''x((
!6(++vh''!6(++vh'' &**r)r
rr
ValueErrorrr,r.r/r1r2EM_386EM_S390EM_ARM	EM_X86_64EF_ARM_ABIMASKEF_ARM_ABI_VER5EF_ARM_ABI_FLOAT_HARDrbytesrIrrrr
r
s

"JJKK
FG
FIN O&&+RY&+4&+&+&+&+&+&+rr
rc	ttjd5}t|}dddn#1swxYwYn##tt
tjf$rYdSwxYw|S)Nrb)opensys
executabler
OSError	TypeErrorr)f
elf_headers  r_get_elf_headerr\Ls
#.$
'
'	+1'**J	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+Y DEtts-A8A<A<AA$#A$ct}|dS|j|jk}||j|jkz}||j|jkz}||j|jz|j	kz}||j|j
z|j
kz}|SNF)r\r-r.r0r1r8rMr=rOrPrQr[r&s  r_is_linux_armhfr`Us!""Ju

%)>
>F
j%)???F
j"j&777F
Z66		#$$FZ==		)**FMrct}|dS|j|jk}||j|jkz}||j|jkz}|Sr^)r\r-r.r0r1r8rKr_s  r_is_linux_i686rbhsW ""Ju

%)>
>F
j%)???F
j"j&777FMrarchcZ|dkrtS|dkrtS|dvS)Narmv7li686>ppc64s390xx86_64aarch64ppc64le)r`rb)rcs r_have_compatible_abirlrs:x   v~~EEErcdS)N2rrrrrosBr_LAST_GLIBC_MINORc$eZdZUeed<eed<dS)
_GLibCVersionmajorminorN)r
rrr*__annotations__rrrrrrrs"JJJJJJJJrrrc	tjd}|J|\}}n$#ttt
tf$rYdSwxYw|S)zJ
    Primary implementation of glibc_version_string using os.confstr.
    CS_GNU_LIBC_VERSIONN)osconfstrsplitAssertionErrorAttributeErrorrXrJ)version_string_versions   r_glibc_version_string_confstrrsl$9::)))#))++
77NGZ@ttNs/2AAc8	ddl}n#t$rYdSwxYw	|d}n#t$rYdSwxYw	|j}n#t
$rYdSwxYw|j|_|}t|ts|
d}|S)zG
    Fallback implementation of glibc_version_string using ctypes.
    rNascii)ctypesImportErrorCDLLrXgnu_get_libc_versionr|c_char_prestype
isinstancer)decode)rprocess_namespacerversion_strs    r_glibc_version_string_ctypesrs



tt "KK--tt0Ett$*? ++--Kk3''2!((11s*
/
==A		
AAc:tp
tS)z9Returns glibc version string, or None if not using glibc.)rrrrr_glibc_version_stringrs(**L.J.L.LLrrctjd|}|stjd|ztdSt|dt|dfS)a3Parse glibc version.

    We use a regexp instead of str.split because we want to discard any
    random junk that might come after the minor version -- this might happen
    in patched/forked versions of glibc (e.g. Linaro's version of glibc
    uses version strings like "2.20-2014.11"). See gh-3588.
    z$(?P[0-9]+)\.(?P[0-9]+)z=Expected glibc version with 2 components major.minor, got: %srrsrt)rematchwarningswarnRuntimeWarningr*group)rms  r_parse_glibc_versionrs|	8+FFA

$
%	
	
	

vqwww  #aggg&6&6"7"777rcDt}|dSt|S)Nr)rr)rs r_get_glibc_versionrs&'))Kx,,,rnamerc<t}||krdS	ddl}n#t$rYdSwxYwt|dr6||d|d|}|t|SdS|t
ddkr$t|drt|jS|t
dd	kr$t|d
rt|jS|t
ddkr$t|drt|j	SdS)
NFrTmanylinux_compatiblerrmanylinux1_compatiblemanylinux2010_compatiblemanylinux2014_compatible)
r
_manylinuxrhasattrrboolrrrrr)rrcr	sys_glibcrr&s      r_is_compatiblersL"$$I7uttz12200WQZNN<<t-1%%%%:677	:
8999-2&&&&:9::	=
;<<<-2&&&&:9::	=
;<<<4s
++
manylinux2014
manylinux2010
manylinux1))rr)rr)rrlinuxc#Kt|sdStdd}|dvrtdd}tt}|g}t|jdz
ddD]2}t
|}|t||3|D]}|j|jkr|j}nd}t|j|dD]}t|j|}	dj|	}
t|
||	r|
d|
V|	tvr6t|	}t|||	r|
d|VdS)	Nr>rfrirrzmanylinux_{}_{}r)rlrrrrangersrpappendrtformatrreplace_LEGACY_MANYLINUX_MAP)rrctoo_old_glibc2
current_glibcglibc_max_listglibc_majorglibc_minor	glibc_max	min_minor
glibc_versiontag
legacy_tags            r
platform_tagsrs%%"1b))N!!!&q!,,!#5#7#78M#_N]014a<<GG'4mKEEFFFF#==	?n222&,III )R@@		=		=K))/;GGM*#*M:Cc477
2mmGS11111 5552=A
!*dMBB=--<<<<<		=
==r)#collections	functoolsrxrr!rVrtypingrrrrrrr
r\rr`rbr)rldefaultdictrpr*rurrrrrr	lru_cacherrrrrrrrs								







BBBBBBBBBBBBBBBB:+:+:+:+:+:+:+:+z.1&FsFtFFFF%GGGJ
x}&)hsm))))XMx}MMMM
8c8eCHo8888&-E#s(O----C-D8

"="=C"=HSM"="="="="="=rPK{5Z}}VLib/site-packages/setuptools/_vendor/packaging/__pycache__/_structures.cpython-311.pycnuW+A

b;dbGddZeZGddZeZdS)ceZdZdefdZdefdZdedefdZ	dedefdZ
dedefdZdedefdZdedefd	Z
d
eddfdZd
S)InfinityTypereturncdS)NInfinityselfs wE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/packaging/_structures.py__repr__zInfinityType.__repr__szc:tt|SNhashreprrs r
__hash__zInfinityType.__hash__
DJJrothercdSNFrr	rs  r
__lt__zInfinityType.__lt__
urcdSrrrs  r
__le__zInfinityType.__le__rrc,t||jSr
isinstance	__class__rs  r
__eq__zInfinityType.__eq__%000rcdSNTrrs  r
__gt__zInfinityType.__gt__trcdSr#rrs  r
__ge__zInfinityType.__ge__r%rr	NegativeInfinityTypectSr)NegativeInfinityrs r
__neg__zInfinityType.__neg__srN)__name__
__module____qualname__strrintrobjectboolrrr r$r'r+rrr
rrs# #    FtFt1F1t1111FtFt f !7      rrceZdZdefdZdefdZdedefdZ	dedefdZ
dedefdZdedefdZdedefd	Z
d
edefdZdS)
r(rcdS)Nz	-Infinityrrs r
rzNegativeInfinityType.__repr__$s{rc:tt|Srrrs r
rzNegativeInfinityType.__hash__'rrrcdSr#rrs  r
rzNegativeInfinityType.__lt__*r%rcdSr#rrs  r
rzNegativeInfinityType.__le__-r%rc,t||jSrrrs  r
r zNegativeInfinityType.__eq__0r!rcdSrrrs  r
r$zNegativeInfinityType.__gt__3rrcdSrrrs  r
r'zNegativeInfinityType.__ge__6rrr	ctSr)rrs r
r+zNegativeInfinityType.__neg__9srN)r,r-r.r/rr0rr1r2rrr r$r'rr+rrr
r(r(#s# #    FtFt1F1t1111FtFtfrr(N)rrr(r*rrr
r<sy        4<>>4('))rPK{5Z|S|SOLib/site-packages/setuptools/_vendor/packaging/__pycache__/tags.cpython-311.pycnuW+A

b;dS=
$UddlZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZmZddlmZmZejeZe
eZeeefZdddd	d
dZeeefed<ejd
kZGddZdedeefdZ d4dede!deeedffdZ"dedefdZ#dede!fdZ$d4dede!deefdZ%			d5dddeedee	edee	ede!de
ef
d Z&de
efd!Z'			d5ddd"eedee	edee	ede!de
ef
d#Z(dede
efd$Z)			d5deed"eedee	ede
efd%Z*efd&ed'e!defd(Z+d)ed*edeefd+Z,	d6d)eed&eede
efd,Z-efd'e!de
efd-Z.de
efd.Z/de
efd/Z0defd0Z1ddde!defd1Z2d)edefd2Z3ddde!de
efd3Z4dS)7N)EXTENSION_SUFFIXES)
Dict	FrozenSetIterableIteratorListOptionalSequenceTupleUnioncast)
_manylinux
_musllinuxpycpppipjy)pythoncpythonpypy
ironpythonjythonINTERPRETER_SHORT_NAMESlceZdZdZgdZdedededdfdZedefd	Zedefd
Z	edefdZ
dedefd
Z
defdZdefdZdefdZdS)Tagz
    A representation of the tag triple for a wheel.

    Instances are considered immutable and thus are hashable. Equality checking
    is also supported.
    )_interpreter_abi	_platform_hashinterpreterabiplatformreturnNc||_||_|j|_t	|j|j|jf|_dSN)lowerrrr hashr!)selfr"r#r$s    pE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/packaging/tags.py__init__zTag.__init__4sY'--//IIKK	'))4,diHII


c|jSr')rr*s r+r"zTag.interpreter?s  r-c|jSr')rr/s r+r#zTag.abiCs
yr-c|jSr')r r/s r+r$zTag.platformGs
~r-otherct|tstS|j|jko/|j|jko|j|jko|j|jkSr')
isinstancerNotImplementedr!r rr)r*r2s  r+__eq__z
Tag.__eq__Ksd%%%	"!!Z5;
&
:5?2
:ej(
:"e&88		
r-c|jSr')r!r/s r+__hash__zTag.__hash__Vs
zr-c4|jd|jd|jS)N-)rrr r/s r+__str__zTag.__str__Ys%#BBdiBB$.BBBr-c.d|dt|dS)N)idr/s r+__repr__zTag.__repr__\s!'4''BtHH''''r-)__name__
__module____qualname____doc__	__slots__strr,propertyr"r#r$objectboolr6intr8r;r@r-r+rr*sP?>>I	JC	Jc	JS	JT	J	J	J	J!S!!!X!SX#X	
F	
t	
	
	
	
#CCCCC(#((((((r-rtagr%c
Ft}|d\}}}|dD]V}|dD]>}|dD]&}|t|||'?Wt	|S)z
    Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.

    Returning a set is required due to the possibility that the tag is a
    compressed tag set.
    r:.)setsplitaddr	frozenset)rLtagsinterpretersabis	platformsr"r#	platform_s        r+	parse_tagrX`s55D$'IIcNN!L$	#))#..;;::c??	;	;C&__S11
;
;	[#y99::::
;	;T??r-Fnamewarncltj|}||rtd||S)Nz>Config variable '%s' is unset, Python ABI tag may be incorrect)	sysconfigget_config_varloggerdebug)rYrZvalues   r+_get_config_varraps=$T**E}}Ld	
	
	
Lr-stringcV|ddddS)NrN_r:)replace)rbs r+_normalize_stringrfys&>>#s##++C555r-python_versioncNt|dkot|dkS)zj
    Determine if the Python version supports abi3.

    PEP 384 was first implemented in Python 3.2.
    r))lentuple)rgs r+
_abi3_appliesrm}s)~"Fu^'<'<'FFr-
py_versionc	t|}g}t|dd}dx}x}}td|}ttd}dt
v}	|s||s|	rd}|dkrGtd|}
|
s|
d	}|d
kr*td|}|dks|tjd
krd}n|r|d||dd	|||||S)NrjPy_DEBUGgettotalrefcountz_d.pydd)ri
WITH_PYMALLOCm)ririPy_UNICODE_SIZEiurrz"cp{version}{debug}{pymalloc}{ucs4})versionr_pymallocucs4)
rl_version_nodotrahasattrsysr
maxunicodeappendinsertformat)rnrZrUrzr_r{r|
with_debughas_refcounthas_ext
with_pymallocunicode_sizes            r+
_cpython_abisrsMz""J
DZ^,,G  E Ht T22J3 233L,,Gj(l(g(F'>>
	M1H*+--
    - cp-abi3-
    - cp-none-
    - cp-abi3-  # Older Python versions down to 3.2.

    If python_version only specifies a major version then user-provided ABIs and
    the 'none' ABItag will be used.

    If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
    their normal position and not at the beginning.
    Nrjrr)abi3nonec3:K|]}td|VdS)rNr.0rWr"s  r+	zcpython_tags..s/SSICVY77SSSSSSr-c3:K|]}td|VdS)rNrrs  r+rzcpython_tags..s/OO	K33OOOOOOr-zcp{version}rrzr)
rversion_infor}rkrlistremove
ValueError
platform_tagsrrmranger)	rgrUrVrZexplicit_abir#rW
minor_versionr"s	        @r+cpython_tagsrs*,.)"1"-;~nRaR&899;;K|~"" 66DDD::D(	KK%%%%			D	Y1-//22I33"	3	3Ik3	222222	3^$$TSSSSSSSSSSSSSSOOOOYOOOOOOOOOO^$$:">!#4q#8!R@@	:	:M&
:
:	+22*N1,=}+MNN3+vy999999	
:::	:	:s0B
BBc#\Ktjd}|rt|VdSdS)NSOABI)r\r]rf)r#s r+_generic_abirsB

"7
+
+C
%$$$$$$$%%r-r"c#\K|s5t}t|}d||g}|t}t	|p
t}t	|}d|vr|d|D]}|D]}t|||VdS)z
    Yields the tags for a generic interpreter.

    The tags consist of:
    - --

    The "none" ABI will be added if it was not explicitly provided.
    rrpNr)interpreter_nameinterpreter_versionjoinrrrrr)r"rUrVrZinterp_nameinterp_versionr#rWs        r+generic_tagsrs=&((,$777gg{N;<<|~~Y1-//22I::D
TF33"	3	3Ik3	222222	333r-c#Kt|dkrdt|ddVd|dVt|dkr9t|ddz
ddD] }dt|d|fVdSdS)z
    Yields Python versions in descending order.

    After the latest version, the major-only version will be yielded, and then
    all previous versions of that major version.
    rrNrjrr)rkr}r)rnminors  r+_py_interpreter_rangers:3>*RaR.1133333
z!}


::a=1,b"55	@	@E?~z!}e&<==??????	@	@r-c#8K|stjdd}t|p
t}t	|D]}|D]}t|d|V|rt|ddVt	|D]}t|ddVdS)z
    Yields the sequence of tags that are compatible with a specific version of Python.

    The tags consist of:
    - py*-none-
    - -none-any  # ... if `interpreter` is provided.
    - py*-none-any
    Nrjrany)rrrrrr)rgr"rVrzrWs     r+compatible_tagsrs.)"1"-Y1-//22I(8822"	2	2Igvy111111	2.+vu-----(88**'65))))))**r-archis_32bitc<|s|S|drdSdS)Nppci386)
startswith)rrs  r+	_mac_archr/s-uu6r-rzcpu_archc|g}|dkr |dkrgS|gdnu|dkr |dkrgS|gdnO|dkr$|dks|dkrgS|dn%|d	kr|d
krgS|ddg|d
vr|d|dvr|d|S)Nx86_64)
rx)intelfat64fat32r)rrfatppc64)rrr)rrr>arm64r
universal2>rrrrr	universal)extendr)rzrformatss   r+_mac_binary_formatsr9s$jG8WI2223333	V		WI0001111	W		W' 1 1Iw	U		WI'(((&&&|$$$>>>{###Nr-c#Ktj\}}}|Ltdtt	t
|ddd}n|}|t|}n|}d|krS|dkrMt|dddD]5}d	|f}t||}|D]}d

d	||V6|dkrMt|dd	dD]5}	|	df}t||}|D]}d

|	d|V6|dkr|d
krUtdddD]A}d	|f}t||}|D](}d

|d|d|V)BdStdddD]0}d	|f}d}d

|d|d|V/dSdS)aD
    Yields the platform tags for a macOS system.

    The `version` parameter is a two-item tuple specifying the macOS version to
    generate platform tags for. The `arch` parameter is the CPU architecture to
    generate platform tags for. Both parameters default to the appropriate value
    for the current system.
    N
MacVersionrNrj)rr)rrrrz&macosx_{major}_{minor}_{binary_format})majorr
binary_formatrrrir)r$mac_verr
rlmaprJrPrrrr)
rzrversion_strrdrrcompat_versionbinary_formatsr
major_versions
          r+
mac_platformsrYs (/11KH|U3sK4E4Ec4J4J2A24N+O+O%P%PQQ|""'g//#71:r266		M.N0FFN!/


>EEMF

'#71:r266		M*A-N0FFN!/


>EE'q
F

'8!&r1b!1!1


!#]!2!4^T!J!J%3MBII,Q/,Q/&3J

"'r1b!1!1


!#]!2 ,
>EE(+(+"/F-&

r-c#Kttj}|r|dkrd}n|dkrd}|dd\}}t	j||Ed{Vt
j|Ed{V|VdS)Nlinux_x86_64
linux_i686
linux_aarch64linux_armv7lrdr)rfr\get_platformrPrrr)rlinuxrdrs    r+_linux_platformsrsi46677E#N"" EE
o
%
%"Ekk#q!!GAt't444444444'---------
KKKKKr-c#NKttjVdSr')rfr\rrKr-r+_generic_platformsrs)
I244
5
555555r-ctjdkrtStjdkrtSt	S)z;
    Provides the platform tags for this installation.
    DarwinLinux)r$systemrrrrKr-r+rrsLH$$			g	%	%!!!!###r-c\tjj}t|p|S)z6
    Returns the name of the running interpreter.
    )rimplementationrYrget)rYs r+rrs("D"&&t,,44r-ctd|}|rt|}n!ttjdd}|S)z9
    Returns the version of the running interpreter.
    py_version_nodotrNrj)rarFr}rr)rZrzs  r+rrsJ0t<<>!!!!!!!d"u555555555555"$$$$$$$$$$$r-)F)NNN)NN)5loggingr$rr\importlib.machineryrtypingrrrrrr	r
rrr
rprr	getLoggerrAr^rJ
PythonVersionrrrF__annotations__maxsize_32_BIT_INTERPRETERrrXrIrarfrmrrrrrrrrrrrrrrr}rrKr-r+rs




222222%$$$$$$$		8	$	$


38_
++c3hkW,3(3(3(3(3(3(3(3(l
3
9S>



 #TeCdN6K6c6c6666G-GDGGGG!!m!4!DI!!!!J/3$()-6:
6:6:6:]+6:
8C=
!6:
&6:
6:c]
6:6:6:6:r%hsm%%%%"&$()-3
333#3
8C=
!3
&3
3c]
3333<@m@
@@@@ /3!%)-**]+*#*
&*c]	****2+>C4#stCyBAEEE
j
!E08
E
c]EEEEP':

t
hsm



6HSM6666	$x}	$	$	$	$5#5555).				#				&M&c&&&&#%%%d%x}%%%%%%r-PK{5ZGB\UUULib/site-packages/setuptools/_vendor/packaging/__pycache__/_musllinux.cpython-311.pycnuW+A

b;d
dZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZm
Z
mZde
ededeedffdZde
ede
efd	ZGd
deZdede
efd
Zejdede
efdZdedeefdZedkrddlZejZeds
Jdedeedeejeddeej dde!dddD]Z"ee"ddSdS) zPEP 656 support.

This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
N)IOIterator
NamedTupleOptionalTupleffmtreturn.cvtj||tj|SN)structunpackreadcalcsize)rr	s  vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/packaging/_musllinux.py_read_unpackedrs*=affV_S%9%9::;;;cb|d	t|d}n#tj$rYdSwxYw|ddt	dkrdS|tjdd	dd	d
|d\}}}t
j|}n#t$rYdSwxYw	t||\}}}}}}}	n#tj$rYdSwxYwt|	dzD]}
||||
zz	|t||\}}}
n#tj$rYdSwxYw|dkrZ||tj||

d}d
|vrdS|cSdS)zDetect musl libc location by parsing the Python executable.

    Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
    ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
    r16BNsELFHHI)IIIIHHHIIIIIIII)rrr)QQQIHHHIIQQQQQQ)r)rrmusl)seekrr
errortupleroperator
itemgetterKeyErrorrangeosfsdecoderstrip)ridente_fmtp_fmtp_idxp_get_e_phoffe_phentsizee_phnumip_typep_offsetp_fileszinterpreters               r_parse_ld_musl_from_elfr:s$FF1IIIq%((<ttRaRyE*%%%%tFF6?5!!1%%%,
21

(ue#U+tt4B1e4L4L17Aq![''<tt
7Q;

	wq()))	).~a/G/G)H)H&FHhh|			444	Q;;	xk!&&"2"23399$??$$444sB(;;B((
B65B6:CC&%C&D77E
Ec$eZdZUeed<eed<dS)_MuslVersionmajorminorN)__name__
__module____qualname__int__annotations__rrr<r<Gs"JJJJJJJJrr<outputcdd|DD}t|dks|ddddkrdStjd|d}|sdSt	t|dt|d	S)
Ncg|]}||SrDrD.0ns  r
z'_parse_musl_version..MsFFF1AFQFFFrc3>K|]}|VdSr)r+rHs  r	z&_parse_musl_version..Ms*@@q@@@@@@rrrrr!zVersion (\d+)\.(\d+)r)r=r>)
splitlineslenrematchr<rBgroup)rElinesms   r_parse_musl_versionrULsFF@@F,=,=,?,?@@@FFFE
5zzA~~q"1"//t
(%(33Atc!''!**ooS__EEEEr
executablecltj5}	|t|d}n#t$rYddddSwxYwt|}dddn#1swxYwY|sdSt
j|gtjd}t|j
S)a`Detect currently-running musl runtime version.

    This is done by checking the specified executable's dynamic linking
    information, and invoking the loader to parse its output for a version
    string. If the loader is musl, the output would be something like::

        musl libc (x86_64)
        Version 1.2.2
        Dynamic Program Loader
    rbNT)stderruniversal_newlines)
contextlib	ExitStack
enter_contextopenOSErrorr:
subprocessrunPIPErUrY)rVstackrldprocs     r_get_musl_versionrfVs
			(5	##DT$:$:;;AA				((((((((	
$Q
'
'(((((((((((((((t>2$z4PPPDt{+++s1A1#:A1
AA1AA11A58A5archc#Kttj}|dSt|jddD]}d|jd|d|VdS)aTGenerate musllinux tags compatible to the current platform.

    :param arch: Should be the part of platform tag after the ``linux_``
        prefix, e.g. ``x86_64``. The ``linux_`` prefix is assumed as a
        prerequisite for the current platform to be musllinux-compatible.

    :returns: An iterator of compatible musllinux tags.
    N
musllinux_r1)rfsysrVr(r>r=)rgsys_muslr>s   r
platform_tagsrmnsr!00Hx~r2..;;:8>::E::D::::::;;r__main__zlinux-z	not linuxzplat:zmusl:ztags: )endz[.-]r1-rriz
      )#__doc__r[	functoolsr%r)rPr
r`rktypingrrrrrbytesstrrBrr:r<rU	lru_cacherfrmr?	sysconfigget_platformplat
startswithprintrVsubsplittrDrrrs								







<<<<<<<<<<<<<<FFFF,#,(<*@,,,,.
;
;

;
;
;
; z!9!##D??8$$11k111	E'4	E'$$S^44555	E's
]626'3

30B0B20FGG
H
H!!
aZ     !!rPK{5ZO[33PLib/site-packages/setuptools/_vendor/packaging/__pycache__/utils.cpython-311.pycnuW+A

b;dh	ddlZddlmZmZmZmZmZddlmZm	Z	ddl
mZmZeedee
effZedeZGdd	eZGd
deZejdZejd
ZdedefdZdeeefdefdZdedeeeeeeffdZdedeeeffdZdS)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
qE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/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..4466E&&&rversionc
t|tr#	t|}n#t$r|cYSwxYw|}g}|jdkr||jd|t
jdddd|j	D|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!z(\.0)+$.c34K|]}t|VdSNstr.0xs  r	z'canonicalize_version..<s(0P0PAQ0P0P0P0P0P0PrNc34K|]}t|VdSr*r+r-s  rr0z'canonicalize_version..@s(88SVV888888rz.postz.dev+)
isinstancer,rrepochappendrer joinreleaseprepostdevlocal)r$parsedpartss   rcanonicalize_versionr?&s
'3	W%%FF			NNN	E|q
'''(((
LL
B0P0P0P0P0P(P(PQQRRRz
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: rrDzInvalid build number: z in ''r
)endswithrcountsplitr6matchUNICODEr#r_build_tag_regexrBuildTagintgroupr
)
r@dashesr>	name_partrr$
build_partbuild_matchbuildtagss
          rparse_wheel_filenamerXQsV$$
"L(LL

	
}H
^^C
 
 F
V"IxII

	

NN3
++EaIyBH^Y
KKS"#FH#F#FGGGY''DeAhG
{{1X
&,,Z88&EEE(EEE
XK$5$5a$8$8 9 9;;L;LQ;O;OPQQU2YD'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: )rIlenr
rpartitionr#r)r@	file_stemrSsepversion_partrr$s       rparse_sdist_filenamer_us##
.I./					6	"	"
^F|^,		"




	
$-#7#7#<#< IsLJ"#Hh#H#HIIIY''Dl##G'?r)r6typingrrrrrrWr	r
r$rrrPr,rOr
ValueErrorrrcompilerrNr#r?rXr_r
rrrcs

			99999999999999        ,,,,,,,,rE#s(O+,)3//::!bj++2:l++'C'N''''(%"5(#((((V!(!(
>7Hin<=!(!(!(!(H351H+IrPK{5Z
htUURLib/site-packages/setuptools/_vendor/packaging/__pycache__/version.cpython-311.pycnuW+A

b;dI9ddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
mZmZmZgdZeeefZeee
eeffZeeeefZeee
eee
eefe
eeffdffZe
ee
edfeeeefZe
ee
edffZeeeefeeefgefZejdgdZd	ed
edfdZGd
deZ GddZ!Gdde!Z"ej#dej$Z%ddddddZ&ded
eefdZ'd	ed
efdZ(dZ)Gdde!Z*dedeee+e	fd
ee
eeffd Z,ej#d!Z-d"ed
eefd#Z.d$ed%e
edfd&ee
eefd'ee
eefd(ee
eefd"ee
ed
efd)Z/dS)*N)CallableIteratorListOptionalSupportsIntTupleUnion)InfinityInfinityTypeNegativeInfinityNegativeInfinityType)parseVersion
LegacyVersionInvalidVersionVERSION_PATTERN._Version)epochreleasedevprepostlocalversionreturn)rrc`	t|S#t$rt|cYSwxYw)z
    Parse the given version string and return either a :class:`Version` object
    or a :class:`LegacyVersion` object depending on if the given version is
    a valid PEP 440 version or a legacy version.
    )rrr)rs sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/packaging/version.pyrr*sD&w&&&W%%%%%&s--ceZdZdZdS)rzF
    An invalid version was found, users should refer to PEP 440.
    N)__name__
__module____qualname____doc__rrr6sr%rceZdZUeeefed<defdZddde	fdZ
ddde	fdZdede	fdZ
ddde	fdZddde	fd	Zdede	fd
ZdS)_BaseVersion_keyrc*t|jSN)hashr(selfs r__hash__z_BaseVersion.__hash__?sDIr%othercZt|tstS|j|jkSr*
isinstancer'NotImplementedr(r-r/s  r__lt__z_BaseVersion.__lt__E)%..	"!!y5:%%r%cZt|tstS|j|jkSr*r1r4s  r__le__z_BaseVersion.__le__K)%..	"!!yEJ&&r%cZt|tstS|j|jkSr*r1r4s  r__eq__z_BaseVersion.__eq__Qr9r%cZt|tstS|j|jkSr*r1r4s  r__ge__z_BaseVersion.__ge__Wr9r%cZt|tstS|j|jkSr*r1r4s  r__gt__z_BaseVersion.__gt__]r6r%cZt|tstS|j|jkSr*r1r4s  r__ne__z_BaseVersion.__ne__cr9r%N)r r!r"r	CmpKeyLegacyCmpKey__annotations__intr.boolr5r8objectr;r=r?rAr$r%rr'r'<s
$
%%%%#&N&t&&&&'N't'''''F't'''''N't''''&N&t&&&&'F't''''''r%r'cVeZdZdeddfdZdefdZdefdZedefdZedefdZ	ede
fd	Zedd
ZeddZ
eddZedd
ZeddZedefdZedefdZedefdZdS)rrrNct||_t|j|_t	jdtdS)NzZCreating a LegacyVersion has been deprecated and will be removed in the next major release)str_version_legacy_cmpkeyr(warningswarnDeprecationWarning)r-rs  r__init__zLegacyVersion.__init__ksFG
"4=11	

0	
	
	
	
	
r%c|jSr*rKr,s r__str__zLegacyVersion.__str__us
}r%cd|dS)Nzr$r,s r__repr__zLegacyVersion.__repr__xs+$++++r%c|jSr*rRr,s rpubliczLegacyVersion.public{
}r%c|jSr*rRr,s rbase_versionzLegacyVersion.base_versionrYr%cdS)Nr$r,s rrzLegacyVersion.epochsrr%cdSr*r$r,s rrzLegacyVersion.releasetr%cdSr*r$r,s rrzLegacyVersion.prer_r%cdSr*r$r,s rrzLegacyVersion.postr_r%cdSr*r$r,s rrzLegacyVersion.devr_r%cdSr*r$r,s rrzLegacyVersion.localr_r%cdSNFr$r,s r
is_prereleasezLegacyVersion.is_prereleaseur%cdSrer$r,s ris_postreleasezLegacyVersion.is_postreleasergr%cdSrer$r,s r
is_devreleasezLegacyVersion.is_devreleasergr%)rN)r r!r"rJrPrSrVpropertyrXr[rErrrrrrrFrfrirkr$r%rrrjs





,#,,,,XcXsXXXXXXtXXtXr%rz(\d+ | [a-z]+ | \.| -)czfinal-@)rpreview-rcrsc#Kt|D]Q}t||}|r|dkr&|dddvr|dVJd|zVRdVdS)N.r

0123456789**final)_legacy_version_component_resplit_legacy_version_replacement_mapgetzfill)rrparts  r_parse_version_partsrs,22155

.224>>	ts{{8|##**Q--*NNNNNr%cd}g}t|D]}|drf|dkr0|r.|ddkr"||r|ddk"|r.|ddkr"||r|ddk"|||t|fS)Nr]rwrxz*final-00000000)rlower
startswithpopappendtuple)rrpartsr~s    rrLrLs
EE$W]]__55??3	h b	Y 6 6IIKKK b	Y 6 6
E"I33		
E"I33	T%,,r%a
    v?
    (?:
        (?:(?P[0-9]+)!)?                           # epoch
        (?P[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P
                                          # pre-release
            [-_\.]?
            (?P(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P[0-9]+)?
        )?
        (?P                                         # post release
            (?:-(?P[0-9]+))
            |
            (?:
                [-_\.]?
                (?Ppost|rev|r)
                [-_\.]?
                (?P[0-9]+)?
            )
        )?
        (?P                                          # dev release
            [-_\.]?
            (?Pdev)
            [-_\.]?
            (?P[0-9]+)?
        )?
    )
    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
cVeZdZejdezdzejejzZde	ddfdZ
de	fdZde	fdZe
defd	Ze
deed
ffdZe
deee	effdZe
deefd
Ze
deefdZe
dee	fdZe
de	fdZe
de	fdZe
defdZe
defdZe
defdZe
defdZe
defdZe
defdZdS)rz^\s*z\s*$rrNc|j|}|std|dt|dr"t|dndt
d|ddDt|d|d	t|d
|dp|dt|d
|dt|d|_
t|j
j|j
j
|j
j|j
j|j
j|j
j|_dS)NzInvalid version: ''rrc34K|]}t|VdSr*)rE.0is  r	z#Version.__init__..s(LLQ#a&&LLLLLLr%rrtpre_lpre_npost_lpost_n1post_n2dev_ldev_nr)rrrrrr)_regexsearchrrgrouprErrz_parse_letter_version_parse_local_versionrK_cmpkeyrrrrrrr()r-rmatchs   rrPzVersion.__init__s""7++	B !@g!@!@!@AAA!/4{{7/C/CJ#ekk'**+++LL%++i*@*@*F*Fs*K*KLLLLL%ekk'&:&:EKK.-(;;c!ff;;;;;;r%c34K|]}t|VdSr*rrs  rrz"Version.__str__..1s( : :AQ : : : : : :r%z.postz.dev+)rrjoinrrrrrr-rs  rrSzVersion.__str__%s :??LLDJ)))***	SXX;;dl;;;;;<<<8LL : : : : :::;;;9 LL,,,---8LL***+++:!LL)TZ))***wwu~~r%c|jj}|Sr*)rKr)r-_epochs  rrz
Version.epochAsm)
r%.c|jj}|Sr*)rKr)r-_releases  rrzVersion.releaseFs$(M$9r%c|jj}|Sr*)rKr)r-_pres  rrzVersion.preKs*.-*;r%cB|jjr|jjdndSNr
)rKrr,s rrzVersion.postPs!(,
(:Dt}!!$$Dr%cB|jjr|jjdndSr)rKrr,s rrzVersion.devTs!'+}'8Bt} ##dBr%cp|jjr)dd|jjDSdS)Nrtc34K|]}t|VdSr*rrs  rrz Version.local..[s(@@qCFF@@@@@@r%)rKrrr,s rrz
Version.localXs:=	88@@DM,?@@@@@@4r%cTt|dddS)Nrr
r)rJrzr,s rrXzVersion.public_s!4yysA&&q))r%cg}|jdkr||jd|dd|jDd|S)Nrrrtc34K|]}t|VdSr*rrs  rrz'Version.base_version..lrr%r)rrrrrs  rr[zVersion.base_versioncsr:??LLDJ)))***	SXX;;dl;;;;;<<<wwu~~r%c&|jdup|jduSr*)rrr,s rrfzVersion.is_prereleasepsxt#;txt';;r%c|jduSr*)rr,s rrizVersion.is_postreleasetsy$$r%c|jduSr*)rr,s rrkzVersion.is_devreleasexsxt##r%cPt|jdkr
|jdndS)Nr
rlenrr,s rmajorz
Version.major|&"%dl"3"3q"8"8t|Aa?r%cPt|jdkr
|jdndS)Nr
rrr,s rminorz
Version.minorrr%cPt|jdkr
|jdndS)Nrrrr,s rmicroz
Version.microrr%) r r!r"recompilerVERBOSE
IGNORECASErrJrPrVrSrlrErrrrrrrrrXr[rFrfrirkrrrr$r%rrrs
RZ/1G;RZ"-=W
X
XF





:&#&&&&8sXsCxXXeCHo.XEhsmEEEXECXc]CCCXCx}X****X*
c


X
F
WFF
v

FF
.
.
.FF
|
#
#Fs6{{""#f#s6{{""4r%z[\._-]rcl|1tdt|DSdS)zR
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    Nc3K|];}|s|nt|V.sU

!%=DJJLLLCII





r%)r_local_version_separatorsrz)rs rrrsM


177>>




	
4r%rrrrrcPttttjdt|}||
|t
}n|t}n|}|t
}n|}|t}	n|}	|t
}
ntd|D}
|||||	|
fS)Nc|dkS)Nrr$)rs rz_cmpkey..s
AFr%c3ZK|]&}t|tr|dfnt|fV'dS)rN)r2rEr
rs  rrz_cmpkey..sP

IJz!S))DQGG0@!/D





r%)rreversedlist	itertools	dropwhiler
r)rrrrrrrr_post_dev_locals           rrrsi)*:*:HWrs*
				PPPPPPPPPPPPPPPPPPWWWWWWWWWWWW
T
T
Tl$889
}eCHo56]C,-	
,#$&45
7	

		


	
sCx...)S
S%S/)*"
6< %(<"=>D";!CCC
	&3	&5!;<	&	&	&	&Z+'+'+'+'+'+'+'+'\;;;;;L;;;| *rz*CRZPP	

##CHSM"CL:@E@E@E@E@E@lE@E@E@P!!sE;67!
eCHo!!!!H'BJy11		(;				<6<6
38_<6
%S/	"<65c?
#	<6

%S/	"<6E,'(
<6<6<6<6<6<6<6r%PK{5ZeLeSSULib/site-packages/setuptools/_vendor/packaging/__pycache__/specifiers.cpython-311.pycnuW+A

b;du	nddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZddlmZddlmZmZmZeeefZeeeefZedeZeeegefZGdd	eZGd
dejZ Gd
de Z!Gdde!Z"dedeegefdedeegeffdZ#Gdde!Z$ej%dZ&dede
efdZ'dedefdZ(de
ede
edee
ee
effdZ)Gdde Z*dS) N)CallableDictIterableIteratorListOptionalPatternSetTupleTypeVarUnion)canonicalize_version)
LegacyVersionVersionparseVersionTypeVar)boundceZdZdZdS)InvalidSpecifierzH
    An invalid specifier was found, users should refer to PEP 440.
    N)__name__
__module____qualname____doc__vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/packaging/specifiers.pyrr!srrc	reZdZejdefdZejdefdZejde	de
fdZejde
e
fdZejde
ddfd	Zejdd
ede
e
de
fdZej	dd
eede
e
deefdZdS)
BaseSpecifierreturncdS)z
        Returns the str representation of this Specifier like object. This
        should be representative of the Specifier itself.
        Nrselfs r__str__zBaseSpecifier.__str__(rcdS)zF
        Returns a hash value for this Specifier like object.
        Nrr"s r__hash__zBaseSpecifier.__hash__/r%rothercdS)zq
        Returns a boolean representing whether or not the two Specifier like
        objects are equal.
        Nrr#r(s  r__eq__zBaseSpecifier.__eq__5r%rcdS)zg
        Returns whether or not pre-releases as a whole are allowed by this
        specifier.
        Nrr"s rprereleaseszBaseSpecifier.prereleases<r%rvalueNcdS)zd
        Sets whether or not pre-releases as a whole are allowed by this
        specifier.
        Nrr#r.s  rr-zBaseSpecifier.prereleasesCr%ritemr-cdS)zR
        Determines if the given item is contained within this specifier.
        Nrr#r1r-s   rcontainszBaseSpecifier.containsJr%riterablecdS)z
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        Nr)r#r5r-s   rfilterzBaseSpecifier.filterPr%rN)rrrabcabstractmethodstrr$intr'objectboolr+abstractpropertyrr-setterr4rrr7rrrrr's	#
	Ft	Xd^$	Sx~
	PT 0?G~	.	!rr)	metaclassceZdZUiZeeefed<eeed<ddedee	ddfdZ
defd	Zdefd
Ze
deeeffdZdefdZd
ede	fdZdedefdZdedefdZe
defdZe
defdZe
dee	fdZejde	ddfdZdede	fdZ	ddedee	de	fdZ	ddee dee	dee fdZ!dS)_IndividualSpecifier
_operators_regexNspecr-r c|j|}|std|d|d|df|_||_dS)NzInvalid specifier: ''operatorversion)rEsearchrgroupstrip_spec_prereleases)r#rGr-matchs    r__init__z_IndividualSpecifier.__init___s""4((	C"#A$#A#A#ABBB
KK
##))++KK	""((**'

(rcl|j
d|jnd}d|jjdt	||dS)N, prereleases=rF<()>)rPr-	__class__rr;r#pres  r__repr__z_IndividualSpecifier.__repr__lsT ,
2T-111	B4>*AASYYA#AAAArc dj|jS)Nz{}{})formatrOr"s rr$z_IndividualSpecifier.__str__usv}dj))rcP|jdt|jdfS)Nrr)rOrr"s r_canonical_specz$_IndividualSpecifier._canonical_specxs"z!}24:a=AAAArc*t|jSr8)hashr_r"s rr'z_IndividualSpecifier.__hash__|sD()))rr(ct|tr;	|t|}n3#t$r
tcYSwxYwt||jstS|j|jkSr8)
isinstancer;rXrNotImplementedr_r*s  rr+z_IndividualSpecifier.__eq__seS!!	"
&s5zz22#
&
&
&%%%%
&E4>22	"!!#u'<<rRr[r$propertyrr_r<r'r=r+CallableOperatorrjUnparsedVersion
ParsedVersionrmrJrKr-r@ryr4rrr7rrrrCrCZs!#JS#X###CL((S(HTN(d((((B#BBBB*****BsCxBBBXB*#****	=F	=t	=	=	=	=!!(8!!!!=
#XX!Xd^!!!X!""$""""######DH@@#@2:4.@	
@@@@0QU!! 0!?G~!	.	!!!!!!!rrCc eZdZdZejdezdzejejzZdddddd	d
Z	dd
e
deeddffd
Z
dedefdZded
e
defdZded
e
defdZded
e
defdZded
e
defdZded
e
defdZded
e
defdZxZS)LegacySpecifiera
        (?P(==|!=|<=|>=|<|>))
        \s*
        (?P
            [^,;\s)]* # Since this is a "legacy" specifier, and the version
                      # string can be just about anything, we match everything
                      # except for whitespace, a semi-colon for marker support,
                      # a closing paren since versions can be enclosed in
                      # them, and a comma since it's a version separator.
        )
        ^\s*\s*$equal	not_equalless_than_equalgreater_than_equal	less_thangreater_than)==!=<=>=rU>rFNrGr-r ct||tjdtdS)NzZCreating a LegacyVersion has been deprecated and will be removed in the next major release)superrRwarningswarnDeprecationWarning)r#rGr-rXs   rrRzLegacySpecifier.__init__sC
{+++

0	
	
	
	
	
rrKcht|tstt|}|Sr8)rcrr;rls  rrmzLegacySpecifier._coerce_versions,'=11	2#CLL11Grprospectivec4|||kSr8rmr#rrGs   r_compare_equalzLegacySpecifier._compare_equal
d2248888rc4|||kSr8rrs   r_compare_not_equalz"LegacySpecifier._compare_not_equal
rrc4|||kSr8rrs   r_compare_less_than_equalz(LegacySpecifier._compare_less_than_equalrrc4|||kSr8rrs   r_compare_greater_than_equalz+LegacySpecifier._compare_greater_than_equalsd2248888rc4|||kSr8rrs   r_compare_less_thanz"LegacySpecifier._compare_less_thanT11$7777rc4|||kSr8rrs   r_compare_greater_thanz%LegacySpecifier._compare_greater_thanrrr)rrr
_regex_strrecompileVERBOSE
IGNORECASErErDr;rr>rRrrrmrrrrrr
__classcell__)rXs@rrrs
JRZ*,w6
R]8R
S
SF"


J

S
HTN
d





=
9-9s9t99999m939499999M99QU99999(9039	
9999
8m8384888888c8d88888888rrfn	Specifierr c	vtjdddtdtdtffd}|S)Nr#rrrGr cLt|tsdS|||Sr|)rcr)r#rrGrs   rwrappedz)_require_version_compare..wrapped"s.+w//	5r$T***r)	functoolswrapsrr;r>)rrs` r_require_version_comparers[_R+k+
+S+T++++++
Nrc	eZdZdZejdezdzejejzZdddddd	d
ddZ	e
d
edede
fdZe
d
edede
fdZe
d
edede
fdZe
d
edede
fdZe
d
edede
fdZe
d
edede
fdZe
d
edede
fdZd
edede
fdZede
fdZejde
ddfdZdS)ra
        (?P(~=|==|!=|<=|>=|<|>|===))
        (?P
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s]*    # We just match everything, except for whitespace
                          # since we are only testing for strict identity.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?

                # You cannot use a wild card and a dev or local version
                # together so group them with a | and make them optional.
                (?:
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                    |
                    \.\*  # Wild card syntax of .*
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?rrrrrrrrrrr-r@rrrrr+sm[JzRZ*,w6
R]8R
S
SF"

		J
}
C
D



*%/-%/s%/t%/%/%/%/N:m:3:4::::=g=S=T====TX0""$""""""rz^([0-9]+)((?:a|b|c|rc)[0-9]+)$rKcg}|dD][}t|}|r(||F||\|S)Nr)split
_prefix_regexrLextendgroupsr)rKresultr1rQs    rrrIstF

c""  $$T**	 MM%,,..))))MM$Mrsegmentc<tfddDS)Nc3BK|]}|VdSr8)
startswith).0rrs  r	z!_is_not_suffix..UsB'-6""r)devabrcpost)any)rs`rrrTs@1PrleftrightcRgg}}|ttjd||ttjd|||t	|dd||t	|dd|ddgt
dt	|dt	|dz
z|ddgt
dt	|dt	|dz
zttj|ttj|fS)Nc*|Sr8isdigitxs rz_pad_version..^src*|Sr8rrs rrz_pad_version.._s!))++rrr0)rrrrrinsertmaxchain)rr
left_splitright_splits    rrrZsr "Jd9./D/DdKKLLMMMtI/0E0EuMMNNOOOd3z!}--//0111uSQ00223444a#QKN(;(;c*Q->P>P(P!Q!QQRRRq3%#aZ]););c+a.>Q>Q)Q"R"RRSSS*-..Y_k5R0S0STTrcleZdZ	ddedeeddfdZdefdZdefdZde	fd	Z
d
edefddfdZd
e
defdZde	fd
ZdeefdZedeefdZejdeddfdZdedefdZ	ddedeedefdZ	ddeedeedeefdZdS)SpecifierSetrFN
specifiersr-r cJd|dD}t}|D]W}	|t|&#t$r%|t|YTwxYwt
||_||_dS)Nc^g|]*}||+Sr)rNrss  r
z)SpecifierSet.__init__..ss-RRR!		RAGGIIRRRr,)	rsetaddrrr	frozenset_specsrP)r#rr-split_specifiersparsed	specifiers      rrRzSpecifierSet.__init__msSRz/?/?/D/DRRR-0EE)	7	7I
7

9Y//0000#
7
7
7

?95566666
7 ''(s"A,BBcR|j
d|jnd}dt||dS)NrTrFz.s(;;!s1vv;;;;;;r)rsortedrr"s rr$zSpecifierSet.__str__s-xx;;t{;;;;;<<.s$66Q1=666666r)rPrrr"s rr-zSpecifierSet.prereleasessH
($$
{	466$+666666rr.c||_dSr8rsr0s  rr-zSpecifierSet.prereleasesrurr1c,||Sr8rwrxs  rryzSpecifierSet.__contains__rzrctttfst|js	jrdSt
fd|jDS)NFc3FK|]}|VdS)r0Nrw)rrr1r-s  rrz(SpecifierSet.contains..s3RR1::d:<<RRRRRRr)rcrrrr-r}allrr3s ``rr4zSpecifierSet.containss{
$ 899	;;D
*K	t1	5RRRRRdkRRRRRRrr5c||j}|jr0|jD]&}||t|}'|Sg}g}|D]|}t	|t
tfst|}n|}t	|t
rF|jr|s|s|	|g|	|}|s|r||S|S)Nr0)
r-rr7r>rcrrrr}r)r#r5r-rGfilteredrr1rs        rr7zSpecifierSet.filters*K
;&	
P
P;;xT+=N=N;OOO
.0H68
!
*
*!$(@AA*%*4[[NN%)Nnm<<"/**#7)00666OOD))))
) 1
)k6I((Orrr8)rrrr;rr>rRr[r$r<r'r
r'r=r+r*rrCr-rr-r@rryr4rrr7rrrrrls0BF(((19$(	
((((05#5555=====!#!!!!U>3#67N.+F+t++++     !(#78!!!!7Xd^777X7"""$""""##T####DHSS#S2:4.S	
SSSS<QU33 03?G~3	.	!333333rr)+r9rrrrtypingrrrrrrr	r
rrr
utilsrrKrrrrr;rrr>rr&rABCMetarrCrrrrrrrrrrrrr;sQ



				('''''2222222222g},-
34)AAA]C0$67z00000ck0000fFFFFF=FFFR9898989898*989898x	+}c2D89	
{M3/56				X"X"X"X"X"$X"X"X"v
<==
CDICDUtCyUcUuT#YS	=Q7RUUUU$vvvvv=vvvvvrPK{5Zɒ_TLib/site-packages/setuptools/_vendor/packaging/__pycache__/__about__.cpython-311.pycnuW+A

b;d4gdZdZdZdZdZdZdZdZdezZd	S)
)	__title____summary____uri____version__
__author__	__email____license__
__copyright__	packagingz"Core utilities for Python packagesz!https://github.com/pypa/packagingz21.3z)Donald Stufft and individual contributorszdonald@stufft.iozBSD-2-Clause or Apache-2.0z2014-2019 %sN)	__all__rrrrrrrr	uE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/packaging/__about__.pyrsI
			
	2
-
8
	*+


r
PK{5ZD@@RLib/site-packages/setuptools/_vendor/packaging/__pycache__/markers.cpython-311.pycnuW+A

b;d-!	UddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
mZmZmZmZmZmZmZmZddlmZmZgdZeeegefZGddeZGd	d
eZ GddeZ!Gd
dZ"Gdde"Z#Gdde"Z$Gdde"Z%ededzedzedzedzedzedzedzedzedzedzed zed!zed"zed#zed$zed%zed&zZ&ddddddd'Z'e&(d(ed)ed*zed+zed,zed-zed.zed/zed0zZ)e)ed1zed2zZ*e*(d3ed4ed5zZ+e+(d6ed7ed8zZ,e&e+zZ-ee-e*ze-zZ.e.(d9ed:/Z0ed;/Z1e
Z2e.ee0e2ze1zzZ3e2e3ee,e2zzzee2zezZ4dZ5	dYd@eeee
e"dAfefdBe	ed=efdCZ6dDdEej7ej8ej9ej:ej;ej<dFZ=eeefe>dG<dHedIe%dJed=efdKZ?GdLdMZ@e@ZAdNeeefdOed=efdPZBdQeedNeeefd=efdRZCdSdTd=efdUZDd=eeeffdVZEGdWdXZFdS)ZN)AnyCallableDictListOptionalTupleUnion)	ForwardGroupLiteralParseExceptionParseResultsQuotedString
ZeroOrMore	stringEndstringStart)InvalidSpecifier	Specifier)
InvalidMarkerUndefinedComparisonUndefinedEnvironmentNameMarkerdefault_environmentceZdZdZdS)rzE
    An invalid marker was found, users should refer to PEP 508.
    N__name__
__module____qualname____doc__sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/packaging/markers.pyrr$r"rceZdZdZdS)rzP
    An invalid operation was attempted on a value that doesn't support it.
    Nrr!r"r#rr*r$r"rceZdZdZdS)rz\
    A name was attempted to be used that does not exist inside of the
    environment.
    Nrr!r"r#rr0sr"rcBeZdZdeddfdZdefdZdefdZdefdZdS)NodevaluereturnNc||_dSN)r))selfr)s  r#__init__z
Node.__init__8s



r"c*t|jSr,)strr)r-s r#__str__zNode.__str__;s4:r"c(d|jjd|dS)N)	__class__rr1s r#__repr__z
Node.__repr__>s 74>*77d7777r"ctr,)NotImplementedErrorr1s r#	serializezNode.serializeAs!!r")	rrrrr.r0r2r7r:r!r"r#r(r(7scd8#8888"3""""""r"r(ceZdZdefdZdS)Variabler*c t|Sr,r0r1s r#r:zVariable.serializeF4yyr"Nrrrr0r:r!r"r#r<r<E/3r"r<ceZdZdefdZdS)Valuer*cd|dS)N"r!r1s r#r:zValue.serializeKs4{{{r"Nr@r!r"r#rCrCJs/3r"rCceZdZdefdZdS)Opr*c t|Sr,r>r1s r#r:zOp.serializePr?r"Nr@r!r"r#rGrGOrAr"rGimplementation_versionplatform_python_implementationimplementation_namepython_full_versionplatform_releaseplatform_versionplatform_machineplatform_systempython_versionsys_platformos_nameos.namesys.platformplatform.versionplatform.machineplatform.python_implementationpython_implementationextra)rTrUrVrWrXrYcjtt|d|dSNr)r<ALIASESgetslts   r#rcps$QqT1Q41H1H(I(Ir"z=====>=<=!=z~=>r4not ininc,t|dSr\)rGr_s   r#rcrcwsAaDr"'rEc,t|dSr\)rCr_s   r#rcrczsE!A$KKr"andorc,t|dSr\)tupler_s   r#rcrcs51;;r"()resultsr*cHt|trd|DS|S)Nc,g|]}t|Sr!)_coerce_parse_result).0is  r#
z(_coerce_parse_result..s!999A$Q''999r")
isinstancer)rts r#rwrws-'<((999999r"Tmarker.firstct|tttfsJt|trJt	|dkr7t|dttfrt|dSt|tr>d|D}|rd|Sdd|zdzSt|trdd|DS|S)Nrrc38K|]}t|dVdS)F)r}N)_format_markerrxms  r#	z!_format_marker..s/@@A///@@@@@@r" rrrsc6g|]}|Sr!)r:rs  r#rzz"_format_marker..s 7771777r")r{listrqr0lenrjoin)r|r}inners   r#rrsftUC011111	64  )KK1vay4-00
fQi(((&$	@@@@@	/88E??"%(3..	FE	"	"xx77777888
r"c
||vSr,r!lhsrhss  r#rcrcs
3#:r"c
||vSr,r!rs  r#rcrcs
s#~r")rjrir4rfrdrgrerh
_operatorsroprc	`	td||g}||S#t$rYnwxYwt
|}|td|d|d|d|||S)Nz
Undefined z on z and .)rrr:containsrrr^r)rrrspecopers     r#_eval_oprs"",,..#!67788}}S!!!



 *~~bllnn==D|!"Mr"M"M"M"MS"M"M"MNNN4S>>s6A

AAceZdZdS)	UndefinedN)rrrr!r"r#rrsDr"renvironmentnamec||t}t|trt	|d|S)Nz* does not exist in evaluation environment.)r^
_undefinedr{rr)rrr)s   r#_get_envrsL#.??4#D#DE%##
&AAA

	
Lr"markerscxgg}|D]}t|tttfsJt|tr*|dt||ft|tr|\}}}t|trt||j}|j}n|j}t||j}|dt||||dvsJ|dkr|gtd|DS)N)rnroroc34K|]}t|VdSr,)all)rxitems  r#rz$_evaluate_markers..s(,,Ts4yy,,,,,,r")r{rrqr0append_evaluate_markersr<rr)rany)	rrgroupsr|rrr	lhs_value	rhs_values	         r#rrs? "tF""&4"455555fd##	"2J/DDEEEE

&
&	"!LCS#x((
=$[#)<<	I		I	$[#)<<	2Jhy"i@@AAAA]****~~

b!!!,,V,,,,,,r"infozsys._version_infocd|}|j}|dkr ||dt|jzz
}|S)Nz{0.major}.{0.minor}.{0.micro}finalr)formatreleaselevelr0serial)rversionkinds   r#format_full_versionrsH-44T::GDw47S----Nr"cttjj}tjj}||t
jt
jt
jt
j	t
jt
j
t
jdt
j
ddtjdS)Nr)rKrIrSrOrMrPrNrLrJrQrR)rsysimplementationrrosplatformmachinereleasesystemrQrYrpython_version_tuple)iverrKs  r#rrss19::D,12"&7$,..$,..#?,,$,..'688*2*H*J*J((8#@#B#B2A2#FGGr"cdeZdZdeddfdZdefdZdefdZd	deeeefde	fdZ
dS)
rr|r*Nc
	tt||_dS#t$r/}td|d||j|jdzd}~wwxYw)NzInvalid marker: z, parse error at )rwMARKERparseString_markersr
rloc)r-r|es   r#r.zMarker.__init__s	01C1CF1K1KLLDMMM			1611!%!%!)+,11
	s,0
A)*A$$A)c*t|jSr,)rrr1s r#r2zMarker.__str__sdm,,,r"cd|dS)Nz	rs
				



DDDDDDDDDDDDDDDDDD





















43333333S#J$%J*z""""""""t
D
Aa())*aaa	
aa
aaa	a	ll
a	llaa
aa())* a  !!"ajj#	*"**&F=
	IIJJJAeHHqqww4 11T77*QQtWW4qqww>3G!!C&&P
!!H++%$/		11222|C  <<#4#4477888	
5AAdGG	

$
eJ*Z78866777	
3			
3		giiEE&;"6"?@@@{ZZ(<=====	{	"Y	.%d3i(?"@T#YNR$s)U49-s23 NormalizedName:
    # This is taken from PEP 503.
    value = _canonicalize_regex.sub("-", name).lower()
    return cast(NormalizedName, value)


def canonicalize_version(version: Union[Version, str]) -> str:
    """
    This is very similar to Version.__str__, but has one subtle difference
    with the way it handles the release segment.
    """
    if isinstance(version, str):
        try:
            parsed = Version(version)
        except InvalidVersion:
            # Legacy versions cannot be normalized
            return version
    else:
        parsed = version

    parts = []

    # Epoch
    if parsed.epoch != 0:
        parts.append(f"{parsed.epoch}!")

    # Release segment
    # NB: This strips trailing '.0's to normalize
    parts.append(re.sub(r"(\.0)+$", "", ".".join(str(x) for x in parsed.release)))

    # Pre-release
    if parsed.pre is not None:
        parts.append("".join(str(x) for x in parsed.pre))

    # Post-release
    if parsed.post is not None:
        parts.append(f".post{parsed.post}")

    # Development release
    if parsed.dev is not None:
        parts.append(f".dev{parsed.dev}")

    # Local version segment
    if parsed.local is not None:
        parts.append(f"+{parsed.local}")

    return "".join(parts)


def parse_wheel_filename(
    filename: str,
) -> Tuple[NormalizedName, Version, BuildTag, FrozenSet[Tag]]:
    if not filename.endswith(".whl"):
        raise InvalidWheelFilename(
            f"Invalid wheel filename (extension must be '.whl'): {filename}"
        )

    filename = filename[:-4]
    dashes = filename.count("-")
    if dashes not in (4, 5):
        raise InvalidWheelFilename(
            f"Invalid wheel filename (wrong number of parts): {filename}"
        )

    parts = filename.split("-", dashes - 2)
    name_part = parts[0]
    # See PEP 427 for the rules on escaping the project name
    if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None:
        raise InvalidWheelFilename(f"Invalid project name: {filename}")
    name = canonicalize_name(name_part)
    version = Version(parts[1])
    if dashes == 5:
        build_part = parts[2]
        build_match = _build_tag_regex.match(build_part)
        if build_match is None:
            raise InvalidWheelFilename(
                f"Invalid build number: {build_part} in '{filename}'"
            )
        build = cast(BuildTag, (int(build_match.group(1)), build_match.group(2)))
    else:
        build = ()
    tags = parse_tag(parts[-1])
    return (name, version, build, tags)


def parse_sdist_filename(filename: str) -> Tuple[NormalizedName, Version]:
    if filename.endswith(".tar.gz"):
        file_stem = filename[: -len(".tar.gz")]
    elif filename.endswith(".zip"):
        file_stem = filename[: -len(".zip")]
    else:
        raise InvalidSdistFilename(
            f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):"
            f" {filename}"
        )

    # We are requiring a PEP 440 version, which cannot contain dashes,
    # so we split on the last dash.
    name_part, sep, version_part = file_stem.rpartition("-")
    if not sep:
        raise InvalidSdistFilename(f"Invalid sdist filename: {filename}")

    name = canonicalize_name(name_part)
    version = Version(version_part)
    return (name, version)
PK{5Z:Lib/site-packages/setuptools/_vendor/packaging/__init__.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

from .__about__ import (
    __author__,
    __copyright__,
    __email__,
    __license__,
    __summary__,
    __title__,
    __uri__,
    __version__,
)

__all__ = [
    "__title__",
    "__summary__",
    "__uri__",
    "__version__",
    "__author__",
    "__email__",
    "__license__",
    "__copyright__",
]
PK{5ZXQ-!-!9Lib/site-packages/setuptools/_vendor/packaging/markers.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import operator
import os
import platform
import sys
from typing import Any, Callable, Dict, List, Optional, Tuple, Union

from setuptools.extern.pyparsing import (  # noqa: N817
    Forward,
    Group,
    Literal as L,
    ParseException,
    ParseResults,
    QuotedString,
    ZeroOrMore,
    stringEnd,
    stringStart,
)

from .specifiers import InvalidSpecifier, Specifier

__all__ = [
    "InvalidMarker",
    "UndefinedComparison",
    "UndefinedEnvironmentName",
    "Marker",
    "default_environment",
]

Operator = Callable[[str, str], bool]


class InvalidMarker(ValueError):
    """
    An invalid marker was found, users should refer to PEP 508.
    """


class UndefinedComparison(ValueError):
    """
    An invalid operation was attempted on a value that doesn't support it.
    """


class UndefinedEnvironmentName(ValueError):
    """
    A name was attempted to be used that does not exist inside of the
    environment.
    """


class Node:
    def __init__(self, value: Any) -> None:
        self.value = value

    def __str__(self) -> str:
        return str(self.value)

    def __repr__(self) -> str:
        return f"<{self.__class__.__name__}('{self}')>"

    def serialize(self) -> str:
        raise NotImplementedError


class Variable(Node):
    def serialize(self) -> str:
        return str(self)


class Value(Node):
    def serialize(self) -> str:
        return f'"{self}"'


class Op(Node):
    def serialize(self) -> str:
        return str(self)


VARIABLE = (
    L("implementation_version")
    | L("platform_python_implementation")
    | L("implementation_name")
    | L("python_full_version")
    | L("platform_release")
    | L("platform_version")
    | L("platform_machine")
    | L("platform_system")
    | L("python_version")
    | L("sys_platform")
    | L("os_name")
    | L("os.name")  # PEP-345
    | L("sys.platform")  # PEP-345
    | L("platform.version")  # PEP-345
    | L("platform.machine")  # PEP-345
    | L("platform.python_implementation")  # PEP-345
    | L("python_implementation")  # undocumented setuptools legacy
    | L("extra")  # PEP-508
)
ALIASES = {
    "os.name": "os_name",
    "sys.platform": "sys_platform",
    "platform.version": "platform_version",
    "platform.machine": "platform_machine",
    "platform.python_implementation": "platform_python_implementation",
    "python_implementation": "platform_python_implementation",
}
VARIABLE.setParseAction(lambda s, l, t: Variable(ALIASES.get(t[0], t[0])))

VERSION_CMP = (
    L("===") | L("==") | L(">=") | L("<=") | L("!=") | L("~=") | L(">") | L("<")
)

MARKER_OP = VERSION_CMP | L("not in") | L("in")
MARKER_OP.setParseAction(lambda s, l, t: Op(t[0]))

MARKER_VALUE = QuotedString("'") | QuotedString('"')
MARKER_VALUE.setParseAction(lambda s, l, t: Value(t[0]))

BOOLOP = L("and") | L("or")

MARKER_VAR = VARIABLE | MARKER_VALUE

MARKER_ITEM = Group(MARKER_VAR + MARKER_OP + MARKER_VAR)
MARKER_ITEM.setParseAction(lambda s, l, t: tuple(t[0]))

LPAREN = L("(").suppress()
RPAREN = L(")").suppress()

MARKER_EXPR = Forward()
MARKER_ATOM = MARKER_ITEM | Group(LPAREN + MARKER_EXPR + RPAREN)
MARKER_EXPR << MARKER_ATOM + ZeroOrMore(BOOLOP + MARKER_EXPR)

MARKER = stringStart + MARKER_EXPR + stringEnd


def _coerce_parse_result(results: Union[ParseResults, List[Any]]) -> List[Any]:
    if isinstance(results, ParseResults):
        return [_coerce_parse_result(i) for i in results]
    else:
        return results


def _format_marker(
    marker: Union[List[str], Tuple[Node, ...], str], first: Optional[bool] = True
) -> str:

    assert isinstance(marker, (list, tuple, str))

    # Sometimes we have a structure like [[...]] which is a single item list
    # where the single item is itself it's own list. In that case we want skip
    # the rest of this function so that we don't get extraneous () on the
    # outside.
    if (
        isinstance(marker, list)
        and len(marker) == 1
        and isinstance(marker[0], (list, tuple))
    ):
        return _format_marker(marker[0])

    if isinstance(marker, list):
        inner = (_format_marker(m, first=False) for m in marker)
        if first:
            return " ".join(inner)
        else:
            return "(" + " ".join(inner) + ")"
    elif isinstance(marker, tuple):
        return " ".join([m.serialize() for m in marker])
    else:
        return marker


_operators: Dict[str, Operator] = {
    "in": lambda lhs, rhs: lhs in rhs,
    "not in": lambda lhs, rhs: lhs not in rhs,
    "<": operator.lt,
    "<=": operator.le,
    "==": operator.eq,
    "!=": operator.ne,
    ">=": operator.ge,
    ">": operator.gt,
}


def _eval_op(lhs: str, op: Op, rhs: str) -> bool:
    try:
        spec = Specifier("".join([op.serialize(), rhs]))
    except InvalidSpecifier:
        pass
    else:
        return spec.contains(lhs)

    oper: Optional[Operator] = _operators.get(op.serialize())
    if oper is None:
        raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.")

    return oper(lhs, rhs)


class Undefined:
    pass


_undefined = Undefined()


def _get_env(environment: Dict[str, str], name: str) -> str:
    value: Union[str, Undefined] = environment.get(name, _undefined)

    if isinstance(value, Undefined):
        raise UndefinedEnvironmentName(
            f"{name!r} does not exist in evaluation environment."
        )

    return value


def _evaluate_markers(markers: List[Any], environment: Dict[str, str]) -> bool:
    groups: List[List[bool]] = [[]]

    for marker in markers:
        assert isinstance(marker, (list, tuple, str))

        if isinstance(marker, list):
            groups[-1].append(_evaluate_markers(marker, environment))
        elif isinstance(marker, tuple):
            lhs, op, rhs = marker

            if isinstance(lhs, Variable):
                lhs_value = _get_env(environment, lhs.value)
                rhs_value = rhs.value
            else:
                lhs_value = lhs.value
                rhs_value = _get_env(environment, rhs.value)

            groups[-1].append(_eval_op(lhs_value, op, rhs_value))
        else:
            assert marker in ["and", "or"]
            if marker == "or":
                groups.append([])

    return any(all(item) for item in groups)


def format_full_version(info: "sys._version_info") -> str:
    version = "{0.major}.{0.minor}.{0.micro}".format(info)
    kind = info.releaselevel
    if kind != "final":
        version += kind[0] + str(info.serial)
    return version


def default_environment() -> Dict[str, str]:
    iver = format_full_version(sys.implementation.version)
    implementation_name = sys.implementation.name
    return {
        "implementation_name": implementation_name,
        "implementation_version": iver,
        "os_name": os.name,
        "platform_machine": platform.machine(),
        "platform_release": platform.release(),
        "platform_system": platform.system(),
        "platform_version": platform.version(),
        "python_full_version": platform.python_version(),
        "platform_python_implementation": platform.python_implementation(),
        "python_version": ".".join(platform.python_version_tuple()[:2]),
        "sys_platform": sys.platform,
    }


class Marker:
    def __init__(self, marker: str) -> None:
        try:
            self._markers = _coerce_parse_result(MARKER.parseString(marker))
        except ParseException as e:
            raise InvalidMarker(
                f"Invalid marker: {marker!r}, parse error at "
                f"{marker[e.loc : e.loc + 8]!r}"
            )

    def __str__(self) -> str:
        return _format_marker(self._markers)

    def __repr__(self) -> str:
        return f""

    def evaluate(self, environment: Optional[Dict[str, str]] = None) -> bool:
        """Evaluate a marker.

        Return the boolean from evaluating the given marker against the
        environment. environment is an optional argument to override all or
        part of the determined environment.

        The environment is determined from the current Python process.
        """
        current_environment = default_environment()
        if environment is not None:
            current_environment.update(environment)

        return _evaluate_markers(self._markers, current_environment)
PK{5ZFc;Lib/site-packages/setuptools/_vendor/packaging/__about__.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

__all__ = [
    "__title__",
    "__summary__",
    "__uri__",
    "__version__",
    "__author__",
    "__email__",
    "__license__",
    "__copyright__",
]

__title__ = "packaging"
__summary__ = "Core utilities for Python packages"
__uri__ = "https://github.com/pypa/packaging"

__version__ = "21.3"

__author__ = "Donald Stufft and individual contributors"
__email__ = "donald@stufft.io"

__license__ = "BSD-2-Clause or Apache-2.0"
__copyright__ = "2014-2019 %s" % __author__
PK{5Z0=Lib/site-packages/setuptools/_vendor/packaging/_structures.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.


class InfinityType:
    def __repr__(self) -> str:
        return "Infinity"

    def __hash__(self) -> int:
        return hash(repr(self))

    def __lt__(self, other: object) -> bool:
        return False

    def __le__(self, other: object) -> bool:
        return False

    def __eq__(self, other: object) -> bool:
        return isinstance(other, self.__class__)

    def __gt__(self, other: object) -> bool:
        return True

    def __ge__(self, other: object) -> bool:
        return True

    def __neg__(self: object) -> "NegativeInfinityType":
        return NegativeInfinity


Infinity = InfinityType()


class NegativeInfinityType:
    def __repr__(self) -> str:
        return "-Infinity"

    def __hash__(self) -> int:
        return hash(repr(self))

    def __lt__(self, other: object) -> bool:
        return True

    def __le__(self, other: object) -> bool:
        return True

    def __eq__(self, other: object) -> bool:
        return isinstance(other, self.__class__)

    def __gt__(self, other: object) -> bool:
        return False

    def __ge__(self, other: object) -> bool:
        return False

    def __neg__(self: object) -> InfinityType:
        return Infinity


NegativeInfinity = NegativeInfinityType()
PK{5ZDwmwm[Lib/site-packages/setuptools/_vendor/pyparsing/diagram/__pycache__/__init__.cpython-311.pycnuW+A

b;dt\ddlZddlZddlZddlmZmZmZmZmZmZm	Z	m
Z
ddlmZddl
mZddlZdZeeZeddefdejejfd	efgZ	ed
ZGddejZGd
dejZGddeeZdeedefdZdddefdZ				d-dejdejedede de deefdZ!ded e
ejde fd!Z"Gd"d#Z#Gd$d%Z$dejde fd&Z%d'Z&d e
ejfd(Z'e&						d.dejd)ejed*e$ded	ed+ede de dejefd,Z(dS)/N)List
NamedTupleGenericTypeVarDictCallableSetIterable)Template)StringIOaM


    {% if not head %}
        
    {% else %}
        {{ head | safe }}
    {% endif %}


{{ body | safe }}
{% for diagram in diagrams %}
    

{{ diagram.title }}

{{ diagram.text }}
{{ diagram.svg }}
{% endfor %} NamedDiagramnamediagramindexTc&eZdZdZdZfdZxZS)EachItemz Custom railroad item to compose a: - Group containing a - OneOrMore containing a - Choice of the elements in the Each with the group label indicating that all must be matched z[ALL]ctjt|dz g|R}tj|}t ||jdS)Nitem)label)railroadChoicelen OneOrMoresuper__init__ all_label)selfitems choice_itemone_or_more_item __class__s |E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/pyparsing/diagram/__init__.pyrzEachItem.__init__Is^oc%jj1n=u=== #-;??? )@@@@@)__name__ __module__ __qualname____doc__rr __classcell__r$s@r%rr>sRIAAAAAAAAAr&rc(eZdZdZdeffd ZxZS) AnnotatedItemzC Simple subclass of Group that creates an annotation label rc|t||rd|n|dS)Nz[{}]rr)rrformat)r rrr$s r%rzAnnotatedItem.__init__Ts< d%*R&--*>*>*>USSSSSr&)r'r(r)r*strrr+r,s@r%r.r.OsYTcTTTTTTTTTTr&r.ceZdZdZdedefdedefdZe dedefddfd Z e d Z defd Z d S) EditablePartialz Acts like a functools.partial, but can be edited. In other words, it represents a type that hasn't yet been constructed. func.argskwargsc0||_||_||_dSNr5r6r7)r r5r6r7s r%rzEditablePartial.__init__as   r&returnEditablePartial[T]c@t|t||S)z If you call this function in the same way that you would call the constructor, it will store the arguments as you expect. For example EditablePartial.from_call(Fraction, 1, 3)() == Fraction(1, 3) r:)r4list)clsr5r6r7s r% from_callzEditablePartial.from_callfs DtDzz&IIIIr&c|jdS)Nr)r7r s r%rzEditablePartial.namens{6""r&c|j}|j}tj|j}|j|jvr|||jz }|j|i|S)z< Evaluate the partial and return the result )r6copyr7inspectgetfullargspecr5varargspop)r r6r7arg_specs r%__call__zEditablePartial.__call__rs|y~~!!##)$)44  t{ * * FJJx/00 0Dty$)&)))r&N)r'r(r)r*rrr>dictr classmethodr@propertyrrJr&r%r4r4XsXc1f-T4 JXc1f-JCWJJJ[J##X# *! * * * * * *r&r4diagramsr;c $g}|D]y}|j t}|j|j|j}|jdkr|dz }||d|dztj dd|i|S)z Given a list of NamedDiagram, produce a single HTML string that visualises those diagrams :params kwargs: kwargs to be passed in to the template Nrz (root))titletextsvgrOrN) rr writeSvgwriterrappendgetvaluetemplaterender)rOr7datariorRs r%railroad_to_htmlr]s DHH ? "  ZZ  ***  =A   Y E eR FFGGGG ? 3 3D 3F 3 33r&partialr<cPt|trz#resolve_partial..s 444q""444r&c4i|]\}}|t|SrNra)rckeyrds r% z#resolve_partial..s&FFFFC_Q''FFFr&) isinstancer4rbr6r7r>rKr!)r^s r%rbrbs'?++ &w|44 (88wyy GT " "44G4444 GT " "FFgmmooFFFFr&Felementdiagram_kwargsverticalshow_results_names show_groupscbt|pi}t||d|||t|}||vr2|js d||_||||dt |j}t|dkrmt}g} |D]M} | jdkr| j8| j|vr/| | j| | Nd | D} n d |D} t| d S) a Convert a pyparsing element tree into a list of diagrams. This is the recommended entrypoint to diagram creation if you want to access the Railroad tree before it is converted to HTML :param element: base element of the parser being diagrammed :param diagram_kwargs: kwargs to pass to the Diagram() constructor :param vertical: (optional) - int - limit at which number of alternatives should be shown vertically instead of horizontally :param show_results_names - bool to indicate whether results name annotations should be included in the diagram :param show_groups - bool to indicate whether groups should be highlighted with an unlabeled surrounding box )rlN)lookupparentrmrnrorQT)forcerz...c,g|]}t|SrNrarcr^s r%rezto_railroad..s JJJOG,,JJJr&c,g|]}t|SrNrarus r%rezto_railroad..s BBBOG,,BBBr&c|jSr9r)diags r%zto_railroad..sTZr&)rg)ConverterState_to_diagram_elementid customNamermark_for_extractionr>rOvaluesrsetaddrWsorted) rkrlrmrnrorqroot_iddiagsseen deduped_diagsdresolveds r% to_railroadrsf(>+?R @ @ @F- kkG&! &#%F7O w++GV4+HHH '')) * *E 5zzA~~uu  ( (Avv!afD&8&8   $$Q'''JJMJJJCBEBBB ( 7 7 8 8 88r& specificationexprscJ|dStt||kS)zF Returns true if we should return a vertical list of elements NF)r_visible_exprs)rrs r%_should_verticalrs* u>%(())]::r&cteZdZdZ ddejdedededede j ef d Z dd ed d dede fdZ dS) ElementStatez< State recorded for an individual pyparsing Element Nrk convertedrrnumberr parent_indexcv||_||_||_||_||_||_d|_d|_dSNF)rkrrrrrrextractcomplete)r rkrrrrrrs r%rzElementState.__init__sA18 *. *3'- ! 2>" # r&Fel_idstater{rscd|_|js/|r||_n%|jjr|jj|_nd|_|s|jr+t |jr||dSdSdS)a Called when this instance has been seen twice, and thus should eventually be extracted into a sub-diagram :param el_id: id of the element :param state: element/diagram state tracker :param name: name to use for this element's text :param force: If true, force extraction now, regardless of the state of this. Only useful for extracting the root element when we know we're finished TrQN)rrrkr~r_worth_extractingextract_into_diagram)r rrrrss r%rz ElementState.mark_for_extraction s y    (  L3   .T] .'8'F'F .  & &u - - - - - . . . .r&)NNr)r'r(r)r* pyparsing ParserElementr4intr2typingOptionalrboolrrNr&r%rrs-1$$($#$ $  $  $oc*$$$$6TY...!1.9<.LP......r&rceZdZdZddejefdZdede fdZ dede fd Z defd Z defd Z defd Zdefd ZdefdZdS)r{zR Stores some state that persists between recursions into the element tree Nrlcvi|_i|_d|_d|_|pi|_t |_dS)Nrr)_element_diagram_statesrO unnamed_indexrrlrextracted_diagram_names)r rls r%rzConverterState.__init__.s?@B$BD "# $2$8b14$$$r&rgvaluec||j|<dSr9r)r rgrs r% __setitem__zConverterState.__setitem__;s,1$S)))r&r;c|j|Sr9rr rgs r% __getitem__zConverterState.__getitem__>s+C00r&c|j|=dSr9rrs r% __delitem__zConverterState.__delitem__As  ( - - -r&c||jvSr9rrs r% __contains__zConverterState.__contains__Dsd222r&c0|xjdz c_|jS)zT Generate a number used in the name of an otherwise unnamed diagram r)rrBs r%generate_unnamedzConverterState.generate_unnamedGs! a!!r&c0|xjdz c_|jS)z; Generate a number used to index a diagram rrxrBs r%generate_indexzConverterState.generate_indexNs a zr&rc ||}|jrqttj|j}d|jjvr||jjd<n(d|jjvr||jjd|j<|jj tj kr|jjd}n|j}tt|jtjtj |fi|j |j|j|<||=dS)z Used when we encounter the same token twice in the same tree. When this happens, we replace all instances of that token with a terminal, and create a new subdiagram for the token rSrr!)rrrN)rrr4r@r NonTerminalrr7rrr5Groupr DiagramrlrrO)r rpositionretcontents r%rz#ConverterState.extract_into_diagramUs ; ? M!++H,@x}+UUC///14&v..HO222IL&w/0EF   "hn 4 4(/7GG(G.88 #- '-1-@/ 9   e KKKr&r9)r'r(r)r*rrrKrrrrrrrrrrrNr&r%r{r{)s 7 7vt'< 7 7 7 72s2<22221s1|1111.s....33333"#""""#r&r{c\|}td|DS)z Returns true if this element is worth having its own sub-diagram. Simply, if any of its children themselves have children, then its complex enough to extract c3>K|]}|VdSr9)recurse)rcchilds r% z$_worth_extracting..}s*555u}}555555r&)rany)rkchildrens r%rrws0   H 55H555 5 55r&c ddtjdtjtdt dt dt d td td td tjtffd }|S)z decorator to ensure enhancements to a diagram item (such as results name annotations) get applied on return from _to_diagram_element (we do this since there are several returns in _to_diagram_element) NrFrkrrrqrmr name_hintrnror;c  ||||||||}|r@|>|j} | r5| |jrdndz } ttj|| }|S)NrQ*r0) resultsName modalResultsr4r@rr) rkrrrqrmrrrnrorelement_results_namefns r%_innerz0_apply_diagram_item_enhancements.._innersb             #/#*#6 # $g.B(KK$%//N4H0 r&NNrNFF) rrrrr4r{rr2r)rrs` r% _apply_diagram_item_enhancementsrs"&#(!  ( 0       !    )      D Mr&cptjtjtjjffd|DS)NcPg|]"}|j |jt| |#SrN)r~rri)rcenon_diagramming_exprss r%rez"_visible_exprs..sR      !"  2ttj|j| jd}|St |tjr|sdSt+t-d|DdkrCttjd t1t+| }nt3||r(ttjg }nHttjg }n t |tjtjfre|sdSt3||r)ttjdg }nttjg }nt |tj r'|sdSttBg }nTt |tj"r$ttFd d }nt |tj$r$ttFdd }nt |tj%r$ttFdd }nt |tj&rO|r$ttFd d }nZttj&d d }n1t |tj'rHttFtQ|j)d }nt |tj*r(ttj+d }nt |tjr(ttjd }nKt |tj,r(ttj,d }n t |tj&r(ttj&d| }nt |tj-r |jsd}nt+|dkr'ttjg }nit+|dkr*| s(ttj&d | }n,ttj.|j/}|}|dSta|||||1|| <|jr"||  | ||jd}|D]}d|jvr!|jd2|dt|||||||}|3d|jvr ||jd<Xd|jvr||jd|<|dz }wd|jvr|jd|=|rbd|jvrt+|jddksd|jvr2|jd%ttj.| }| |vr d|| _3| |vrm|| j4r`|| j3rS|5| |.s+::qAFAM*::::::r&rrQ)rrepeat)r!NOT)rr LOOKAHEAD LOOKBEHINDrr0)rkrrrrrr!)rrrqrmrrnrorT)6rr~r$r'r}rrirLocatedr|exprrrr4r@rrrrOr7rrrrr2rStackSequenceOr MatchFirstrHorizontalChoiceEachrNotAnyr. FollowedBy PrecededByrTokenConvertertypelowerOptr ZeroOrMoreEmptyTerminal defaultNamerrinsertrrr)rkrrrqrmrrrnrorrrrpropagated_name looked_uprterminalirrs r%r|r|s0 OO  E  H* Hg.?.HD wKKE".    !     Qx*+&*OO&*O*L!!%-'9 +    !! F??u I  ) )%i ) H H H!++H,@y~+VVCJ fo % %"++$6?5+A+H+P,CJ '9=)): 4 s::E::::: ; ;q @ @!++"CE OO,CCh . . I!++HN"+EECC!++H,=R+HHCC GilI,@A B B- 4 He , , Q!++HOQb+IICC!++H,ER+PPCC GY^ , ,& 4''';; GY- . ."'' U'LL GY1 2 2 '' [r'RR GY1 2 2'' \PR'SS GY_ - -  O!++M"+MMCC!++HN"2+NNCC GY5 6 6'' g!7!=!=!?!?b(   GY] + +''(9'CC GY0 1 1''(:'DD GY1 2 2''(;"'EE GY_ - - '' N-A(   GY_ - - g6H  Ua''(9'DD Ua 4''Rt'LL",,X->@STT {!$$&& F5MMu ))%9KLLL A'' cj Jw  & &q$ / / /" 1#     ##%) 6""CJ&&)- 7#A&Q  " " 7#A& A CJ  3sz'':#;#;q#@#@ cj SZ%7%?''(94@@ !%u  6%=0VE]5K##E*** ?!++$6?5+A+H+P,C Jr&)NrjFFr))rrrrrrrrrr r jinja2r r\r rEjinja2_template_sourcerYr2r DiagramItemrr rrrr.r4r]rbrrKrrrrr{rrrr|rNr&r%rs                      : 8* + +z c]Y0D EFRUW  GCLLAAAAAx~AAA"TTTTTHNTTT'*'*'*'*'*gaj'*'*'*T4tL144444& 1 a    $-1$ 7979  $79OD)7979 79  79  , 79797979t ; ;' (?@ ;  ; ; ; ;;.;.;.;.;.;.;.;.|KKKKKKKK\6y6646666)))X (9#:;    ""$HH  $H OO ,H H H  H  HHH __%HHH"!HHHr&PK{5Z-2Ut\t\BLib/site-packages/setuptools/_vendor/pyparsing/diagram/__init__.pynuW+Aimport railroad import pyparsing import typing from typing import ( List, NamedTuple, Generic, TypeVar, Dict, Callable, Set, Iterable, ) from jinja2 import Template from io import StringIO import inspect jinja2_template_source = """\ {% if not head %} {% else %} {{ head | safe }} {% endif %} {{ body | safe }} {% for diagram in diagrams %}

{{ diagram.title }}

{{ diagram.text }}
{{ diagram.svg }}
{% endfor %} """ template = Template(jinja2_template_source) # Note: ideally this would be a dataclass, but we're supporting Python 3.5+ so we can't do this yet NamedDiagram = NamedTuple( "NamedDiagram", [("name", str), ("diagram", typing.Optional[railroad.DiagramItem]), ("index", int)], ) """ A simple structure for associating a name with a railroad diagram """ T = TypeVar("T") class EachItem(railroad.Group): """ Custom railroad item to compose a: - Group containing a - OneOrMore containing a - Choice of the elements in the Each with the group label indicating that all must be matched """ all_label = "[ALL]" def __init__(self, *items): choice_item = railroad.Choice(len(items) - 1, *items) one_or_more_item = railroad.OneOrMore(item=choice_item) super().__init__(one_or_more_item, label=self.all_label) class AnnotatedItem(railroad.Group): """ Simple subclass of Group that creates an annotation label """ def __init__(self, label: str, item): super().__init__(item=item, label="[{}]".format(label) if label else label) class EditablePartial(Generic[T]): """ Acts like a functools.partial, but can be edited. In other words, it represents a type that hasn't yet been constructed. """ # We need this here because the railroad constructors actually transform the data, so can't be called until the # entire tree is assembled def __init__(self, func: Callable[..., T], args: list, kwargs: dict): self.func = func self.args = args self.kwargs = kwargs @classmethod def from_call(cls, func: Callable[..., T], *args, **kwargs) -> "EditablePartial[T]": """ If you call this function in the same way that you would call the constructor, it will store the arguments as you expect. For example EditablePartial.from_call(Fraction, 1, 3)() == Fraction(1, 3) """ return EditablePartial(func=func, args=list(args), kwargs=kwargs) @property def name(self): return self.kwargs["name"] def __call__(self) -> T: """ Evaluate the partial and return the result """ args = self.args.copy() kwargs = self.kwargs.copy() # This is a helpful hack to allow you to specify varargs parameters (e.g. *args) as keyword args (e.g. # args=['list', 'of', 'things']) arg_spec = inspect.getfullargspec(self.func) if arg_spec.varargs in self.kwargs: args += kwargs.pop(arg_spec.varargs) return self.func(*args, **kwargs) def railroad_to_html(diagrams: List[NamedDiagram], **kwargs) -> str: """ Given a list of NamedDiagram, produce a single HTML string that visualises those diagrams :params kwargs: kwargs to be passed in to the template """ data = [] for diagram in diagrams: if diagram.diagram is None: continue io = StringIO() diagram.diagram.writeSvg(io.write) title = diagram.name if diagram.index == 0: title += " (root)" data.append({"title": title, "text": "", "svg": io.getvalue()}) return template.render(diagrams=data, **kwargs) def resolve_partial(partial: "EditablePartial[T]") -> T: """ Recursively resolves a collection of Partials into whatever type they are """ if isinstance(partial, EditablePartial): partial.args = resolve_partial(partial.args) partial.kwargs = resolve_partial(partial.kwargs) return partial() elif isinstance(partial, list): return [resolve_partial(x) for x in partial] elif isinstance(partial, dict): return {key: resolve_partial(x) for key, x in partial.items()} else: return partial def to_railroad( element: pyparsing.ParserElement, diagram_kwargs: typing.Optional[dict] = None, vertical: int = 3, show_results_names: bool = False, show_groups: bool = False, ) -> List[NamedDiagram]: """ Convert a pyparsing element tree into a list of diagrams. This is the recommended entrypoint to diagram creation if you want to access the Railroad tree before it is converted to HTML :param element: base element of the parser being diagrammed :param diagram_kwargs: kwargs to pass to the Diagram() constructor :param vertical: (optional) - int - limit at which number of alternatives should be shown vertically instead of horizontally :param show_results_names - bool to indicate whether results name annotations should be included in the diagram :param show_groups - bool to indicate whether groups should be highlighted with an unlabeled surrounding box """ # Convert the whole tree underneath the root lookup = ConverterState(diagram_kwargs=diagram_kwargs or {}) _to_diagram_element( element, lookup=lookup, parent=None, vertical=vertical, show_results_names=show_results_names, show_groups=show_groups, ) root_id = id(element) # Convert the root if it hasn't been already if root_id in lookup: if not element.customName: lookup[root_id].name = "" lookup[root_id].mark_for_extraction(root_id, lookup, force=True) # Now that we're finished, we can convert from intermediate structures into Railroad elements diags = list(lookup.diagrams.values()) if len(diags) > 1: # collapse out duplicate diags with the same name seen = set() deduped_diags = [] for d in diags: # don't extract SkipTo elements, they are uninformative as subdiagrams if d.name == "...": continue if d.name is not None and d.name not in seen: seen.add(d.name) deduped_diags.append(d) resolved = [resolve_partial(partial) for partial in deduped_diags] else: # special case - if just one diagram, always display it, even if # it has no name resolved = [resolve_partial(partial) for partial in diags] return sorted(resolved, key=lambda diag: diag.index) def _should_vertical( specification: int, exprs: Iterable[pyparsing.ParserElement] ) -> bool: """ Returns true if we should return a vertical list of elements """ if specification is None: return False else: return len(_visible_exprs(exprs)) >= specification class ElementState: """ State recorded for an individual pyparsing Element """ # Note: this should be a dataclass, but we have to support Python 3.5 def __init__( self, element: pyparsing.ParserElement, converted: EditablePartial, parent: EditablePartial, number: int, name: str = None, parent_index: typing.Optional[int] = None, ): #: The pyparsing element that this represents self.element: pyparsing.ParserElement = element #: The name of the element self.name: typing.Optional[str] = name #: The output Railroad element in an unconverted state self.converted: EditablePartial = converted #: The parent Railroad element, which we store so that we can extract this if it's duplicated self.parent: EditablePartial = parent #: The order in which we found this element, used for sorting diagrams if this is extracted into a diagram self.number: int = number #: The index of this inside its parent self.parent_index: typing.Optional[int] = parent_index #: If true, we should extract this out into a subdiagram self.extract: bool = False #: If true, all of this element's children have been filled out self.complete: bool = False def mark_for_extraction( self, el_id: int, state: "ConverterState", name: str = None, force: bool = False ): """ Called when this instance has been seen twice, and thus should eventually be extracted into a sub-diagram :param el_id: id of the element :param state: element/diagram state tracker :param name: name to use for this element's text :param force: If true, force extraction now, regardless of the state of this. Only useful for extracting the root element when we know we're finished """ self.extract = True # Set the name if not self.name: if name: # Allow forcing a custom name self.name = name elif self.element.customName: self.name = self.element.customName else: self.name = "" # Just because this is marked for extraction doesn't mean we can do it yet. We may have to wait for children # to be added # Also, if this is just a string literal etc, don't bother extracting it if force or (self.complete and _worth_extracting(self.element)): state.extract_into_diagram(el_id) class ConverterState: """ Stores some state that persists between recursions into the element tree """ def __init__(self, diagram_kwargs: typing.Optional[dict] = None): #: A dictionary mapping ParserElements to state relating to them self._element_diagram_states: Dict[int, ElementState] = {} #: A dictionary mapping ParserElement IDs to subdiagrams generated from them self.diagrams: Dict[int, EditablePartial[NamedDiagram]] = {} #: The index of the next unnamed element self.unnamed_index: int = 1 #: The index of the next element. This is used for sorting self.index: int = 0 #: Shared kwargs that are used to customize the construction of diagrams self.diagram_kwargs: dict = diagram_kwargs or {} self.extracted_diagram_names: Set[str] = set() def __setitem__(self, key: int, value: ElementState): self._element_diagram_states[key] = value def __getitem__(self, key: int) -> ElementState: return self._element_diagram_states[key] def __delitem__(self, key: int): del self._element_diagram_states[key] def __contains__(self, key: int): return key in self._element_diagram_states def generate_unnamed(self) -> int: """ Generate a number used in the name of an otherwise unnamed diagram """ self.unnamed_index += 1 return self.unnamed_index def generate_index(self) -> int: """ Generate a number used to index a diagram """ self.index += 1 return self.index def extract_into_diagram(self, el_id: int): """ Used when we encounter the same token twice in the same tree. When this happens, we replace all instances of that token with a terminal, and create a new subdiagram for the token """ position = self[el_id] # Replace the original definition of this element with a regular block if position.parent: ret = EditablePartial.from_call(railroad.NonTerminal, text=position.name) if "item" in position.parent.kwargs: position.parent.kwargs["item"] = ret elif "items" in position.parent.kwargs: position.parent.kwargs["items"][position.parent_index] = ret # If the element we're extracting is a group, skip to its content but keep the title if position.converted.func == railroad.Group: content = position.converted.kwargs["item"] else: content = position.converted self.diagrams[el_id] = EditablePartial.from_call( NamedDiagram, name=position.name, diagram=EditablePartial.from_call( railroad.Diagram, content, **self.diagram_kwargs ), index=position.number, ) del self[el_id] def _worth_extracting(element: pyparsing.ParserElement) -> bool: """ Returns true if this element is worth having its own sub-diagram. Simply, if any of its children themselves have children, then its complex enough to extract """ children = element.recurse() return any(child.recurse() for child in children) def _apply_diagram_item_enhancements(fn): """ decorator to ensure enhancements to a diagram item (such as results name annotations) get applied on return from _to_diagram_element (we do this since there are several returns in _to_diagram_element) """ def _inner( element: pyparsing.ParserElement, parent: typing.Optional[EditablePartial], lookup: ConverterState = None, vertical: int = None, index: int = 0, name_hint: str = None, show_results_names: bool = False, show_groups: bool = False, ) -> typing.Optional[EditablePartial]: ret = fn( element, parent, lookup, vertical, index, name_hint, show_results_names, show_groups, ) # apply annotation for results name, if present if show_results_names and ret is not None: element_results_name = element.resultsName if element_results_name: # add "*" to indicate if this is a "list all results" name element_results_name += "" if element.modalResults else "*" ret = EditablePartial.from_call( railroad.Group, item=ret, label=element_results_name ) return ret return _inner def _visible_exprs(exprs: Iterable[pyparsing.ParserElement]): non_diagramming_exprs = ( pyparsing.ParseElementEnhance, pyparsing.PositionToken, pyparsing.And._ErrorStop, ) return [ e for e in exprs if not (e.customName or e.resultsName or isinstance(e, non_diagramming_exprs)) ] @_apply_diagram_item_enhancements def _to_diagram_element( element: pyparsing.ParserElement, parent: typing.Optional[EditablePartial], lookup: ConverterState = None, vertical: int = None, index: int = 0, name_hint: str = None, show_results_names: bool = False, show_groups: bool = False, ) -> typing.Optional[EditablePartial]: """ Recursively converts a PyParsing Element to a railroad Element :param lookup: The shared converter state that keeps track of useful things :param index: The index of this element within the parent :param parent: The parent of this element in the output tree :param vertical: Controls at what point we make a list of elements vertical. If this is an integer (the default), it sets the threshold of the number of items before we go vertical. If True, always go vertical, if False, never do so :param name_hint: If provided, this will override the generated name :param show_results_names: bool flag indicating whether to add annotations for results names :returns: The converted version of the input element, but as a Partial that hasn't yet been constructed :param show_groups: bool flag indicating whether to show groups using bounding box """ exprs = element.recurse() name = name_hint or element.customName or element.__class__.__name__ # Python's id() is used to provide a unique identifier for elements el_id = id(element) element_results_name = element.resultsName # Here we basically bypass processing certain wrapper elements if they contribute nothing to the diagram if not element.customName: if isinstance( element, ( # pyparsing.TokenConverter, # pyparsing.Forward, pyparsing.Located, ), ): # However, if this element has a useful custom name, and its child does not, we can pass it on to the child if exprs: if not exprs[0].customName: propagated_name = name else: propagated_name = None return _to_diagram_element( element.expr, parent=parent, lookup=lookup, vertical=vertical, index=index, name_hint=propagated_name, show_results_names=show_results_names, show_groups=show_groups, ) # If the element isn't worth extracting, we always treat it as the first time we say it if _worth_extracting(element): if el_id in lookup: # If we've seen this element exactly once before, we are only just now finding out that it's a duplicate, # so we have to extract it into a new diagram. looked_up = lookup[el_id] looked_up.mark_for_extraction(el_id, lookup, name=name_hint) ret = EditablePartial.from_call(railroad.NonTerminal, text=looked_up.name) return ret elif el_id in lookup.diagrams: # If we have seen the element at least twice before, and have already extracted it into a subdiagram, we # just put in a marker element that refers to the sub-diagram ret = EditablePartial.from_call( railroad.NonTerminal, text=lookup.diagrams[el_id].kwargs["name"] ) return ret # Recursively convert child elements # Here we find the most relevant Railroad element for matching pyparsing Element # We use ``items=[]`` here to hold the place for where the child elements will go once created if isinstance(element, pyparsing.And): # detect And's created with ``expr*N`` notation - for these use a OneOrMore with a repeat # (all will have the same name, and resultsName) if not exprs: return None if len(set((e.name, e.resultsName) for e in exprs)) == 1: ret = EditablePartial.from_call( railroad.OneOrMore, item="", repeat=str(len(exprs)) ) elif _should_vertical(vertical, exprs): ret = EditablePartial.from_call(railroad.Stack, items=[]) else: ret = EditablePartial.from_call(railroad.Sequence, items=[]) elif isinstance(element, (pyparsing.Or, pyparsing.MatchFirst)): if not exprs: return None if _should_vertical(vertical, exprs): ret = EditablePartial.from_call(railroad.Choice, 0, items=[]) else: ret = EditablePartial.from_call(railroad.HorizontalChoice, items=[]) elif isinstance(element, pyparsing.Each): if not exprs: return None ret = EditablePartial.from_call(EachItem, items=[]) elif isinstance(element, pyparsing.NotAny): ret = EditablePartial.from_call(AnnotatedItem, label="NOT", item="") elif isinstance(element, pyparsing.FollowedBy): ret = EditablePartial.from_call(AnnotatedItem, label="LOOKAHEAD", item="") elif isinstance(element, pyparsing.PrecededBy): ret = EditablePartial.from_call(AnnotatedItem, label="LOOKBEHIND", item="") elif isinstance(element, pyparsing.Group): if show_groups: ret = EditablePartial.from_call(AnnotatedItem, label="", item="") else: ret = EditablePartial.from_call(railroad.Group, label="", item="") elif isinstance(element, pyparsing.TokenConverter): ret = EditablePartial.from_call( AnnotatedItem, label=type(element).__name__.lower(), item="" ) elif isinstance(element, pyparsing.Opt): ret = EditablePartial.from_call(railroad.Optional, item="") elif isinstance(element, pyparsing.OneOrMore): ret = EditablePartial.from_call(railroad.OneOrMore, item="") elif isinstance(element, pyparsing.ZeroOrMore): ret = EditablePartial.from_call(railroad.ZeroOrMore, item="") elif isinstance(element, pyparsing.Group): ret = EditablePartial.from_call( railroad.Group, item=None, label=element_results_name ) elif isinstance(element, pyparsing.Empty) and not element.customName: # Skip unnamed "Empty" elements ret = None elif len(exprs) > 1: ret = EditablePartial.from_call(railroad.Sequence, items=[]) elif len(exprs) > 0 and not element_results_name: ret = EditablePartial.from_call(railroad.Group, item="", label=name) else: terminal = EditablePartial.from_call(railroad.Terminal, element.defaultName) ret = terminal if ret is None: return # Indicate this element's position in the tree so we can extract it if necessary lookup[el_id] = ElementState( element=element, converted=ret, parent=parent, parent_index=index, number=lookup.generate_index(), ) if element.customName: lookup[el_id].mark_for_extraction(el_id, lookup, element.customName) i = 0 for expr in exprs: # Add a placeholder index in case we have to extract the child before we even add it to the parent if "items" in ret.kwargs: ret.kwargs["items"].insert(i, None) item = _to_diagram_element( expr, parent=ret, lookup=lookup, vertical=vertical, index=i, show_results_names=show_results_names, show_groups=show_groups, ) # Some elements don't need to be shown in the diagram if item is not None: if "item" in ret.kwargs: ret.kwargs["item"] = item elif "items" in ret.kwargs: # If we've already extracted the child, don't touch this index, since it's occupied by a nonterminal ret.kwargs["items"][i] = item i += 1 elif "items" in ret.kwargs: # If we're supposed to skip this element, remove it from the parent del ret.kwargs["items"][i] # If all this items children are none, skip this item if ret and ( ("items" in ret.kwargs and len(ret.kwargs["items"]) == 0) or ("item" in ret.kwargs and ret.kwargs["item"] is None) ): ret = EditablePartial.from_call(railroad.Terminal, name) # Mark this element as "complete", ie it has all of its children if el_id in lookup: lookup[el_id].complete = True if el_id in lookup and lookup[el_id].extract and lookup[el_id].complete: lookup.extract_into_diagram(el_id) if ret is not None: ret = EditablePartial.from_call( railroad.NonTerminal, text=lookup.diagrams[el_id].kwargs["name"] ) return ret PK{5Z^bb9Lib/site-packages/setuptools/_vendor/pyparsing/results.pynuW+A# results.py from collections.abc import MutableMapping, Mapping, MutableSequence, Iterator import pprint from weakref import ref as wkref from typing import Tuple, Any str_type: Tuple[type, ...] = (str, bytes) _generator_type = type((_ for _ in ())) class _ParseResultsWithOffset: __slots__ = ["tup"] def __init__(self, p1, p2): self.tup = (p1, p2) def __getitem__(self, i): return self.tup[i] def __getstate__(self): return self.tup def __setstate__(self, *args): self.tup = args[0] class ParseResults: """Structured parse results, to provide multiple means of access to the parsed data: - as a list (``len(results)``) - by list index (``results[0], results[1]``, etc.) - by attribute (``results.`` - see :class:`ParserElement.set_results_name`) Example:: integer = Word(nums) date_str = (integer.set_results_name("year") + '/' + integer.set_results_name("month") + '/' + integer.set_results_name("day")) # equivalent form: # date_str = (integer("year") + '/' # + integer("month") + '/' # + integer("day")) # parse_string returns a ParseResults object result = date_str.parse_string("1999/12/31") def test(s, fn=repr): print("{} -> {}".format(s, fn(eval(s)))) test("list(result)") test("result[0]") test("result['month']") test("result.day") test("'month' in result") test("'minutes' in result") test("result.dump()", str) prints:: list(result) -> ['1999', '/', '12', '/', '31'] result[0] -> '1999' result['month'] -> '12' result.day -> '31' 'month' in result -> True 'minutes' in result -> False result.dump() -> ['1999', '/', '12', '/', '31'] - day: '31' - month: '12' - year: '1999' """ _null_values: Tuple[Any, ...] = (None, [], "", ()) __slots__ = [ "_name", "_parent", "_all_names", "_modal", "_toklist", "_tokdict", "__weakref__", ] class List(list): """ Simple wrapper class to distinguish parsed list results that should be preserved as actual Python lists, instead of being converted to :class:`ParseResults`: LBRACK, RBRACK = map(pp.Suppress, "[]") element = pp.Forward() item = ppc.integer element_list = LBRACK + pp.delimited_list(element) + RBRACK # add parse actions to convert from ParseResults to actual Python collection types def as_python_list(t): return pp.ParseResults.List(t.as_list()) element_list.add_parse_action(as_python_list) element <<= item | element_list element.run_tests(''' 100 [2,3,4] [[2, 1],3,4] [(2, 1),3,4] (2,3,4) ''', post_parse=lambda s, r: (r[0], type(r[0]))) prints: 100 (100, ) [2,3,4] ([2, 3, 4], ) [[2, 1],3,4] ([[2, 1], 3, 4], ) (Used internally by :class:`Group` when `aslist=True`.) """ def __new__(cls, contained=None): if contained is None: contained = [] if not isinstance(contained, list): raise TypeError( "{} may only be constructed with a list," " not {}".format(cls.__name__, type(contained).__name__) ) return list.__new__(cls) def __new__(cls, toklist=None, name=None, **kwargs): if isinstance(toklist, ParseResults): return toklist self = object.__new__(cls) self._name = None self._parent = None self._all_names = set() if toklist is None: self._toklist = [] elif isinstance(toklist, (list, _generator_type)): self._toklist = ( [toklist[:]] if isinstance(toklist, ParseResults.List) else list(toklist) ) else: self._toklist = [toklist] self._tokdict = dict() return self # Performance tuning: we construct a *lot* of these, so keep this # constructor as small and fast as possible def __init__( self, toklist=None, name=None, asList=True, modal=True, isinstance=isinstance ): self._modal = modal if name is not None and name != "": if isinstance(name, int): name = str(name) if not modal: self._all_names = {name} self._name = name if toklist not in self._null_values: if isinstance(toklist, (str_type, type)): toklist = [toklist] if asList: if isinstance(toklist, ParseResults): self[name] = _ParseResultsWithOffset( ParseResults(toklist._toklist), 0 ) else: self[name] = _ParseResultsWithOffset( ParseResults(toklist[0]), 0 ) self[name]._name = name else: try: self[name] = toklist[0] except (KeyError, TypeError, IndexError): if toklist is not self: self[name] = toklist else: self._name = name def __getitem__(self, i): if isinstance(i, (int, slice)): return self._toklist[i] else: if i not in self._all_names: return self._tokdict[i][-1][0] else: return ParseResults([v[0] for v in self._tokdict[i]]) def __setitem__(self, k, v, isinstance=isinstance): if isinstance(v, _ParseResultsWithOffset): self._tokdict[k] = self._tokdict.get(k, list()) + [v] sub = v[0] elif isinstance(k, (int, slice)): self._toklist[k] = v sub = v else: self._tokdict[k] = self._tokdict.get(k, list()) + [ _ParseResultsWithOffset(v, 0) ] sub = v if isinstance(sub, ParseResults): sub._parent = wkref(self) def __delitem__(self, i): if isinstance(i, (int, slice)): mylen = len(self._toklist) del self._toklist[i] # convert int to slice if isinstance(i, int): if i < 0: i += mylen i = slice(i, i + 1) # get removed indices removed = list(range(*i.indices(mylen))) removed.reverse() # fixup indices in token dictionary for name, occurrences in self._tokdict.items(): for j in removed: for k, (value, position) in enumerate(occurrences): occurrences[k] = _ParseResultsWithOffset( value, position - (position > j) ) else: del self._tokdict[i] def __contains__(self, k) -> bool: return k in self._tokdict def __len__(self) -> int: return len(self._toklist) def __bool__(self) -> bool: return not not (self._toklist or self._tokdict) def __iter__(self) -> Iterator: return iter(self._toklist) def __reversed__(self) -> Iterator: return iter(self._toklist[::-1]) def keys(self): return iter(self._tokdict) def values(self): return (self[k] for k in self.keys()) def items(self): return ((k, self[k]) for k in self.keys()) def haskeys(self) -> bool: """ Since ``keys()`` returns an iterator, this method is helpful in bypassing code that looks for the existence of any defined results names.""" return bool(self._tokdict) def pop(self, *args, **kwargs): """ Removes and returns item at specified index (default= ``last``). Supports both ``list`` and ``dict`` semantics for ``pop()``. If passed no argument or an integer argument, it will use ``list`` semantics and pop tokens from the list of parsed tokens. If passed a non-integer argument (most likely a string), it will use ``dict`` semantics and pop the corresponding value from any defined results names. A second default return value argument is supported, just as in ``dict.pop()``. Example:: numlist = Word(nums)[...] print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321'] def remove_first(tokens): tokens.pop(0) numlist.add_parse_action(remove_first) print(numlist.parse_string("0 123 321")) # -> ['123', '321'] label = Word(alphas) patt = label("LABEL") + Word(nums)[1, ...] print(patt.parse_string("AAB 123 321").dump()) # Use pop() in a parse action to remove named result (note that corresponding value is not # removed from list form of results) def remove_LABEL(tokens): tokens.pop("LABEL") return tokens patt.add_parse_action(remove_LABEL) print(patt.parse_string("AAB 123 321").dump()) prints:: ['AAB', '123', '321'] - LABEL: 'AAB' ['AAB', '123', '321'] """ if not args: args = [-1] for k, v in kwargs.items(): if k == "default": args = (args[0], v) else: raise TypeError( "pop() got an unexpected keyword argument {!r}".format(k) ) if isinstance(args[0], int) or len(args) == 1 or args[0] in self: index = args[0] ret = self[index] del self[index] return ret else: defaultvalue = args[1] return defaultvalue def get(self, key, default_value=None): """ Returns named result matching the given key, or if there is no such name, then returns the given ``default_value`` or ``None`` if no ``default_value`` is specified. Similar to ``dict.get()``. Example:: integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") result = date_str.parse_string("1999/12/31") print(result.get("year")) # -> '1999' print(result.get("hour", "not specified")) # -> 'not specified' print(result.get("hour")) # -> None """ if key in self: return self[key] else: return default_value def insert(self, index, ins_string): """ Inserts new element at location index in the list of parsed tokens. Similar to ``list.insert()``. Example:: numlist = Word(nums)[...] print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321'] # use a parse action to insert the parse location in the front of the parsed results def insert_locn(locn, tokens): tokens.insert(0, locn) numlist.add_parse_action(insert_locn) print(numlist.parse_string("0 123 321")) # -> [0, '0', '123', '321'] """ self._toklist.insert(index, ins_string) # fixup indices in token dictionary for name, occurrences in self._tokdict.items(): for k, (value, position) in enumerate(occurrences): occurrences[k] = _ParseResultsWithOffset( value, position + (position > index) ) def append(self, item): """ Add single element to end of ``ParseResults`` list of elements. Example:: numlist = Word(nums)[...] print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321'] # use a parse action to compute the sum of the parsed integers, and add it to the end def append_sum(tokens): tokens.append(sum(map(int, tokens))) numlist.add_parse_action(append_sum) print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321', 444] """ self._toklist.append(item) def extend(self, itemseq): """ Add sequence of elements to end of ``ParseResults`` list of elements. Example:: patt = Word(alphas)[1, ...] # use a parse action to append the reverse of the matched strings, to make a palindrome def make_palindrome(tokens): tokens.extend(reversed([t[::-1] for t in tokens])) return ''.join(tokens) patt.add_parse_action(make_palindrome) print(patt.parse_string("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl' """ if isinstance(itemseq, ParseResults): self.__iadd__(itemseq) else: self._toklist.extend(itemseq) def clear(self): """ Clear all elements and results names. """ del self._toklist[:] self._tokdict.clear() def __getattr__(self, name): try: return self[name] except KeyError: if name.startswith("__"): raise AttributeError(name) return "" def __add__(self, other) -> "ParseResults": ret = self.copy() ret += other return ret def __iadd__(self, other) -> "ParseResults": if other._tokdict: offset = len(self._toklist) addoffset = lambda a: offset if a < 0 else a + offset otheritems = other._tokdict.items() otherdictitems = [ (k, _ParseResultsWithOffset(v[0], addoffset(v[1]))) for k, vlist in otheritems for v in vlist ] for k, v in otherdictitems: self[k] = v if isinstance(v[0], ParseResults): v[0]._parent = wkref(self) self._toklist += other._toklist self._all_names |= other._all_names return self def __radd__(self, other) -> "ParseResults": if isinstance(other, int) and other == 0: # useful for merging many ParseResults using sum() builtin return self.copy() else: # this may raise a TypeError - so be it return other + self def __repr__(self) -> str: return "{}({!r}, {})".format(type(self).__name__, self._toklist, self.as_dict()) def __str__(self) -> str: return ( "[" + ", ".join( [ str(i) if isinstance(i, ParseResults) else repr(i) for i in self._toklist ] ) + "]" ) def _asStringList(self, sep=""): out = [] for item in self._toklist: if out and sep: out.append(sep) if isinstance(item, ParseResults): out += item._asStringList() else: out.append(str(item)) return out def as_list(self) -> list: """ Returns the parse results as a nested list of matching tokens, all converted to strings. Example:: patt = Word(alphas)[1, ...] result = patt.parse_string("sldkj lsdkj sldkj") # even though the result prints in string-like form, it is actually a pyparsing ParseResults print(type(result), result) # -> ['sldkj', 'lsdkj', 'sldkj'] # Use as_list() to create an actual list result_list = result.as_list() print(type(result_list), result_list) # -> ['sldkj', 'lsdkj', 'sldkj'] """ return [ res.as_list() if isinstance(res, ParseResults) else res for res in self._toklist ] def as_dict(self) -> dict: """ Returns the named parse results as a nested dictionary. Example:: integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") result = date_str.parse_string('12/31/1999') print(type(result), repr(result)) # -> (['12', '/', '31', '/', '1999'], {'day': [('1999', 4)], 'year': [('12', 0)], 'month': [('31', 2)]}) result_dict = result.as_dict() print(type(result_dict), repr(result_dict)) # -> {'day': '1999', 'year': '12', 'month': '31'} # even though a ParseResults supports dict-like access, sometime you just need to have a dict import json print(json.dumps(result)) # -> Exception: TypeError: ... is not JSON serializable print(json.dumps(result.as_dict())) # -> {"month": "31", "day": "1999", "year": "12"} """ def to_item(obj): if isinstance(obj, ParseResults): return obj.as_dict() if obj.haskeys() else [to_item(v) for v in obj] else: return obj return dict((k, to_item(v)) for k, v in self.items()) def copy(self) -> "ParseResults": """ Returns a new copy of a :class:`ParseResults` object. """ ret = ParseResults(self._toklist) ret._tokdict = self._tokdict.copy() ret._parent = self._parent ret._all_names |= self._all_names ret._name = self._name return ret def get_name(self): r""" Returns the results name for this token expression. Useful when several different expressions might match at a particular location. Example:: integer = Word(nums) ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d") house_number_expr = Suppress('#') + Word(nums, alphanums) user_data = (Group(house_number_expr)("house_number") | Group(ssn_expr)("ssn") | Group(integer)("age")) user_info = user_data[1, ...] result = user_info.parse_string("22 111-22-3333 #221B") for item in result: print(item.get_name(), ':', item[0]) prints:: age : 22 ssn : 111-22-3333 house_number : 221B """ if self._name: return self._name elif self._parent: par = self._parent() def find_in_parent(sub): return next( ( k for k, vlist in par._tokdict.items() for v, loc in vlist if sub is v ), None, ) return find_in_parent(self) if par else None elif ( len(self) == 1 and len(self._tokdict) == 1 and next(iter(self._tokdict.values()))[0][1] in (0, -1) ): return next(iter(self._tokdict.keys())) else: return None def dump(self, indent="", full=True, include_list=True, _depth=0) -> str: """ Diagnostic method for listing out the contents of a :class:`ParseResults`. Accepts an optional ``indent`` argument so that this string can be embedded in a nested display of other data. Example:: integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") result = date_str.parse_string('1999/12/31') print(result.dump()) prints:: ['1999', '/', '12', '/', '31'] - day: '31' - month: '12' - year: '1999' """ out = [] NL = "\n" out.append(indent + str(self.as_list()) if include_list else "") if full: if self.haskeys(): items = sorted((str(k), v) for k, v in self.items()) for k, v in items: if out: out.append(NL) out.append("{}{}- {}: ".format(indent, (" " * _depth), k)) if isinstance(v, ParseResults): if v: out.append( v.dump( indent=indent, full=full, include_list=include_list, _depth=_depth + 1, ) ) else: out.append(str(v)) else: out.append(repr(v)) if any(isinstance(vv, ParseResults) for vv in self): v = self for i, vv in enumerate(v): if isinstance(vv, ParseResults): out.append( "\n{}{}[{}]:\n{}{}{}".format( indent, (" " * (_depth)), i, indent, (" " * (_depth + 1)), vv.dump( indent=indent, full=full, include_list=include_list, _depth=_depth + 1, ), ) ) else: out.append( "\n%s%s[%d]:\n%s%s%s" % ( indent, (" " * (_depth)), i, indent, (" " * (_depth + 1)), str(vv), ) ) return "".join(out) def pprint(self, *args, **kwargs): """ Pretty-printer for parsed results as a list, using the `pprint `_ module. Accepts additional positional or keyword args as defined for `pprint.pprint `_ . Example:: ident = Word(alphas, alphanums) num = Word(nums) func = Forward() term = ident | num | Group('(' + func + ')') func <<= ident + Group(Optional(delimited_list(term))) result = func.parse_string("fna a,b,(fnb c,d,200),100") result.pprint(width=40) prints:: ['fna', ['a', 'b', ['(', 'fnb', ['c', 'd', '200'], ')'], '100']] """ pprint.pprint(self.as_list(), *args, **kwargs) # add support for pickle protocol def __getstate__(self): return ( self._toklist, ( self._tokdict.copy(), self._parent is not None and self._parent() or None, self._all_names, self._name, ), ) def __setstate__(self, state): self._toklist, (self._tokdict, par, inAccumNames, self._name) = state self._all_names = set(inAccumNames) if par is not None: self._parent = wkref(par) else: self._parent = None def __getnewargs__(self): return self._toklist, self._name def __dir__(self): return dir(type(self)) + list(self.keys()) @classmethod def from_dict(cls, other, name=None) -> "ParseResults": """ Helper classmethod to construct a ``ParseResults`` from a ``dict``, preserving the name-value relations as results names. If an optional ``name`` argument is given, a nested ``ParseResults`` will be returned. """ def is_iterable(obj): try: iter(obj) except Exception: return False else: return not isinstance(obj, str_type) ret = cls([]) for k, v in other.items(): if isinstance(v, Mapping): ret += cls.from_dict(v, name=k) else: ret += cls([v], name=k, asList=is_iterable(v)) if name is not None: ret = cls([ret], name=name) return ret asList = as_list asDict = as_dict getName = get_name MutableMapping.register(ParseResults) MutableSequence.register(ParseResults) PK{5Z<ǀ>A>A6Lib/site-packages/setuptools/_vendor/pyparsing/core.pynuW+A# # core.py # import os import typing from typing import ( NamedTuple, Union, Callable, Any, Generator, Tuple, List, TextIO, Set, Sequence, ) from abc import ABC, abstractmethod from enum import Enum import string import copy import warnings import re import sys from collections.abc import Iterable import traceback import types from operator import itemgetter from functools import wraps from threading import RLock from pathlib import Path from .util import ( _FifoCache, _UnboundedCache, __config_flags, _collapse_string_to_ranges, _escape_regex_range_chars, _bslash, _flatten, LRUMemo as _LRUMemo, UnboundedMemo as _UnboundedMemo, ) from .exceptions import * from .actions import * from .results import ParseResults, _ParseResultsWithOffset from .unicode import pyparsing_unicode _MAX_INT = sys.maxsize str_type: Tuple[type, ...] = (str, bytes) # # Copyright (c) 2003-2022 Paul T. McGuire # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # if sys.version_info >= (3, 8): from functools import cached_property else: class cached_property: def __init__(self, func): self._func = func def __get__(self, instance, owner=None): ret = instance.__dict__[self._func.__name__] = self._func(instance) return ret class __compat__(__config_flags): """ A cross-version compatibility configuration for pyparsing features that will be released in a future version. By setting values in this configuration to True, those features can be enabled in prior versions for compatibility development and testing. - ``collect_all_And_tokens`` - flag to enable fix for Issue #63 that fixes erroneous grouping of results names when an :class:`And` expression is nested within an :class:`Or` or :class:`MatchFirst`; maintained for compatibility, but setting to ``False`` no longer restores pre-2.3.1 behavior """ _type_desc = "compatibility" collect_all_And_tokens = True _all_names = [__ for __ in locals() if not __.startswith("_")] _fixed_names = """ collect_all_And_tokens """.split() class __diag__(__config_flags): _type_desc = "diagnostic" warn_multiple_tokens_in_named_alternation = False warn_ungrouped_named_tokens_in_collection = False warn_name_set_on_empty_Forward = False warn_on_parse_using_empty_Forward = False warn_on_assignment_to_Forward = False warn_on_multiple_string_args_to_oneof = False warn_on_match_first_with_lshift_operator = False enable_debug_on_named_expressions = False _all_names = [__ for __ in locals() if not __.startswith("_")] _warning_names = [name for name in _all_names if name.startswith("warn")] _debug_names = [name for name in _all_names if name.startswith("enable_debug")] @classmethod def enable_all_warnings(cls) -> None: for name in cls._warning_names: cls.enable(name) class Diagnostics(Enum): """ Diagnostic configuration (all default to disabled) - ``warn_multiple_tokens_in_named_alternation`` - flag to enable warnings when a results name is defined on a :class:`MatchFirst` or :class:`Or` expression with one or more :class:`And` subexpressions - ``warn_ungrouped_named_tokens_in_collection`` - flag to enable warnings when a results name is defined on a containing expression with ungrouped subexpressions that also have results names - ``warn_name_set_on_empty_Forward`` - flag to enable warnings when a :class:`Forward` is defined with a results name, but has no contents defined - ``warn_on_parse_using_empty_Forward`` - flag to enable warnings when a :class:`Forward` is defined in a grammar but has never had an expression attached to it - ``warn_on_assignment_to_Forward`` - flag to enable warnings when a :class:`Forward` is defined but is overwritten by assigning using ``'='`` instead of ``'<<='`` or ``'<<'`` - ``warn_on_multiple_string_args_to_oneof`` - flag to enable warnings when :class:`one_of` is incorrectly called with multiple str arguments - ``enable_debug_on_named_expressions`` - flag to auto-enable debug on all subsequent calls to :class:`ParserElement.set_name` Diagnostics are enabled/disabled by calling :class:`enable_diag` and :class:`disable_diag`. All warnings can be enabled by calling :class:`enable_all_warnings`. """ warn_multiple_tokens_in_named_alternation = 0 warn_ungrouped_named_tokens_in_collection = 1 warn_name_set_on_empty_Forward = 2 warn_on_parse_using_empty_Forward = 3 warn_on_assignment_to_Forward = 4 warn_on_multiple_string_args_to_oneof = 5 warn_on_match_first_with_lshift_operator = 6 enable_debug_on_named_expressions = 7 def enable_diag(diag_enum: Diagnostics) -> None: """ Enable a global pyparsing diagnostic flag (see :class:`Diagnostics`). """ __diag__.enable(diag_enum.name) def disable_diag(diag_enum: Diagnostics) -> None: """ Disable a global pyparsing diagnostic flag (see :class:`Diagnostics`). """ __diag__.disable(diag_enum.name) def enable_all_warnings() -> None: """ Enable all global pyparsing diagnostic warnings (see :class:`Diagnostics`). """ __diag__.enable_all_warnings() # hide abstract class del __config_flags def _should_enable_warnings( cmd_line_warn_options: typing.Iterable[str], warn_env_var: typing.Optional[str] ) -> bool: enable = bool(warn_env_var) for warn_opt in cmd_line_warn_options: w_action, w_message, w_category, w_module, w_line = (warn_opt + "::::").split( ":" )[:5] if not w_action.lower().startswith("i") and ( not (w_message or w_category or w_module) or w_module == "pyparsing" ): enable = True elif w_action.lower().startswith("i") and w_module in ("pyparsing", ""): enable = False return enable if _should_enable_warnings( sys.warnoptions, os.environ.get("PYPARSINGENABLEALLWARNINGS") ): enable_all_warnings() # build list of single arg builtins, that can be used as parse actions _single_arg_builtins = { sum, len, sorted, reversed, list, tuple, set, any, all, min, max, } _generatorType = types.GeneratorType ParseAction = Union[ Callable[[], Any], Callable[[ParseResults], Any], Callable[[int, ParseResults], Any], Callable[[str, int, ParseResults], Any], ] ParseCondition = Union[ Callable[[], bool], Callable[[ParseResults], bool], Callable[[int, ParseResults], bool], Callable[[str, int, ParseResults], bool], ] ParseFailAction = Callable[[str, int, "ParserElement", Exception], None] DebugStartAction = Callable[[str, int, "ParserElement", bool], None] DebugSuccessAction = Callable[ [str, int, int, "ParserElement", ParseResults, bool], None ] DebugExceptionAction = Callable[[str, int, "ParserElement", Exception, bool], None] alphas = string.ascii_uppercase + string.ascii_lowercase identchars = pyparsing_unicode.Latin1.identchars identbodychars = pyparsing_unicode.Latin1.identbodychars nums = "0123456789" hexnums = nums + "ABCDEFabcdef" alphanums = alphas + nums printables = "".join([c for c in string.printable if c not in string.whitespace]) _trim_arity_call_line: traceback.StackSummary = None def _trim_arity(func, max_limit=3): """decorator to trim function calls to match the arity of the target""" global _trim_arity_call_line if func in _single_arg_builtins: return lambda s, l, t: func(t) limit = 0 found_arity = False def extract_tb(tb, limit=0): frames = traceback.extract_tb(tb, limit=limit) frame_summary = frames[-1] return [frame_summary[:2]] # synthesize what would be returned by traceback.extract_stack at the call to # user's parse action 'func', so that we don't incur call penalty at parse time # fmt: off LINE_DIFF = 7 # IF ANY CODE CHANGES, EVEN JUST COMMENTS OR BLANK LINES, BETWEEN THE NEXT LINE AND # THE CALL TO FUNC INSIDE WRAPPER, LINE_DIFF MUST BE MODIFIED!!!! _trim_arity_call_line = (_trim_arity_call_line or traceback.extract_stack(limit=2)[-1]) pa_call_line_synth = (_trim_arity_call_line[0], _trim_arity_call_line[1] + LINE_DIFF) def wrapper(*args): nonlocal found_arity, limit while 1: try: ret = func(*args[limit:]) found_arity = True return ret except TypeError as te: # re-raise TypeErrors if they did not come from our arity testing if found_arity: raise else: tb = te.__traceback__ trim_arity_type_error = ( extract_tb(tb, limit=2)[-1][:2] == pa_call_line_synth ) del tb if trim_arity_type_error: if limit < max_limit: limit += 1 continue raise # fmt: on # copy func name to wrapper for sensible debug output # (can't use functools.wraps, since that messes with function signature) func_name = getattr(func, "__name__", getattr(func, "__class__").__name__) wrapper.__name__ = func_name wrapper.__doc__ = func.__doc__ return wrapper def condition_as_parse_action( fn: ParseCondition, message: str = None, fatal: bool = False ) -> ParseAction: """ Function to convert a simple predicate function that returns ``True`` or ``False`` into a parse action. Can be used in places when a parse action is required and :class:`ParserElement.add_condition` cannot be used (such as when adding a condition to an operator level in :class:`infix_notation`). Optional keyword arguments: - ``message`` - define a custom message to be used in the raised exception - ``fatal`` - if True, will raise :class:`ParseFatalException` to stop parsing immediately; otherwise will raise :class:`ParseException` """ msg = message if message is not None else "failed user-defined condition" exc_type = ParseFatalException if fatal else ParseException fn = _trim_arity(fn) @wraps(fn) def pa(s, l, t): if not bool(fn(s, l, t)): raise exc_type(s, l, msg) return pa def _default_start_debug_action( instring: str, loc: int, expr: "ParserElement", cache_hit: bool = False ): cache_hit_str = "*" if cache_hit else "" print( ( "{}Match {} at loc {}({},{})\n {}\n {}^".format( cache_hit_str, expr, loc, lineno(loc, instring), col(loc, instring), line(loc, instring), " " * (col(loc, instring) - 1), ) ) ) def _default_success_debug_action( instring: str, startloc: int, endloc: int, expr: "ParserElement", toks: ParseResults, cache_hit: bool = False, ): cache_hit_str = "*" if cache_hit else "" print("{}Matched {} -> {}".format(cache_hit_str, expr, toks.as_list())) def _default_exception_debug_action( instring: str, loc: int, expr: "ParserElement", exc: Exception, cache_hit: bool = False, ): cache_hit_str = "*" if cache_hit else "" print( "{}Match {} failed, {} raised: {}".format( cache_hit_str, expr, type(exc).__name__, exc ) ) def null_debug_action(*args): """'Do-nothing' debug action, to suppress debugging output during parsing.""" class ParserElement(ABC): """Abstract base level parser element class.""" DEFAULT_WHITE_CHARS: str = " \n\t\r" verbose_stacktrace: bool = False _literalStringClass: typing.Optional[type] = None @staticmethod def set_default_whitespace_chars(chars: str) -> None: r""" Overrides the default whitespace chars Example:: # default whitespace chars are space, and newline Word(alphas)[1, ...].parse_string("abc def\nghi jkl") # -> ['abc', 'def', 'ghi', 'jkl'] # change to just treat newline as significant ParserElement.set_default_whitespace_chars(" \t") Word(alphas)[1, ...].parse_string("abc def\nghi jkl") # -> ['abc', 'def'] """ ParserElement.DEFAULT_WHITE_CHARS = chars # update whitespace all parse expressions defined in this module for expr in _builtin_exprs: if expr.copyDefaultWhiteChars: expr.whiteChars = set(chars) @staticmethod def inline_literals_using(cls: type) -> None: """ Set class to be used for inclusion of string literals into a parser. Example:: # default literal class used is Literal integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") date_str.parse_string("1999/12/31") # -> ['1999', '/', '12', '/', '31'] # change to Suppress ParserElement.inline_literals_using(Suppress) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") date_str.parse_string("1999/12/31") # -> ['1999', '12', '31'] """ ParserElement._literalStringClass = cls class DebugActions(NamedTuple): debug_try: typing.Optional[DebugStartAction] debug_match: typing.Optional[DebugSuccessAction] debug_fail: typing.Optional[DebugExceptionAction] def __init__(self, savelist: bool = False): self.parseAction: List[ParseAction] = list() self.failAction: typing.Optional[ParseFailAction] = None self.customName = None self._defaultName = None self.resultsName = None self.saveAsList = savelist self.skipWhitespace = True self.whiteChars = set(ParserElement.DEFAULT_WHITE_CHARS) self.copyDefaultWhiteChars = True # used when checking for left-recursion self.mayReturnEmpty = False self.keepTabs = False self.ignoreExprs: List["ParserElement"] = list() self.debug = False self.streamlined = False # optimize exception handling for subclasses that don't advance parse index self.mayIndexError = True self.errmsg = "" # mark results names as modal (report only last) or cumulative (list all) self.modalResults = True # custom debug actions self.debugActions = self.DebugActions(None, None, None) # avoid redundant calls to preParse self.callPreparse = True self.callDuringTry = False self.suppress_warnings_: List[Diagnostics] = [] def suppress_warning(self, warning_type: Diagnostics) -> "ParserElement": """ Suppress warnings emitted for a particular diagnostic on this expression. Example:: base = pp.Forward() base.suppress_warning(Diagnostics.warn_on_parse_using_empty_Forward) # statement would normally raise a warning, but is now suppressed print(base.parseString("x")) """ self.suppress_warnings_.append(warning_type) return self def copy(self) -> "ParserElement": """ Make a copy of this :class:`ParserElement`. Useful for defining different parse actions for the same parsing pattern, using copies of the original parse element. Example:: integer = Word(nums).set_parse_action(lambda toks: int(toks[0])) integerK = integer.copy().add_parse_action(lambda toks: toks[0] * 1024) + Suppress("K") integerM = integer.copy().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M") print((integerK | integerM | integer)[1, ...].parse_string("5K 100 640K 256M")) prints:: [5120, 100, 655360, 268435456] Equivalent form of ``expr.copy()`` is just ``expr()``:: integerM = integer().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M") """ cpy = copy.copy(self) cpy.parseAction = self.parseAction[:] cpy.ignoreExprs = self.ignoreExprs[:] if self.copyDefaultWhiteChars: cpy.whiteChars = set(ParserElement.DEFAULT_WHITE_CHARS) return cpy def set_results_name( self, name: str, list_all_matches: bool = False, *, listAllMatches: bool = False ) -> "ParserElement": """ Define name for referencing matching tokens as a nested attribute of the returned parse results. Normally, results names are assigned as you would assign keys in a dict: any existing value is overwritten by later values. If it is necessary to keep all values captured for a particular results name, call ``set_results_name`` with ``list_all_matches`` = True. NOTE: ``set_results_name`` returns a *copy* of the original :class:`ParserElement` object; this is so that the client can define a basic element, such as an integer, and reference it in multiple places with different names. You can also set results names using the abbreviated syntax, ``expr("name")`` in place of ``expr.set_results_name("name")`` - see :class:`__call__`. If ``list_all_matches`` is required, use ``expr("name*")``. Example:: date_str = (integer.set_results_name("year") + '/' + integer.set_results_name("month") + '/' + integer.set_results_name("day")) # equivalent form: date_str = integer("year") + '/' + integer("month") + '/' + integer("day") """ listAllMatches = listAllMatches or list_all_matches return self._setResultsName(name, listAllMatches) def _setResultsName(self, name, listAllMatches=False): if name is None: return self newself = self.copy() if name.endswith("*"): name = name[:-1] listAllMatches = True newself.resultsName = name newself.modalResults = not listAllMatches return newself def set_break(self, break_flag: bool = True) -> "ParserElement": """ Method to invoke the Python pdb debugger when this element is about to be parsed. Set ``break_flag`` to ``True`` to enable, ``False`` to disable. """ if break_flag: _parseMethod = self._parse def breaker(instring, loc, doActions=True, callPreParse=True): import pdb # this call to pdb.set_trace() is intentional, not a checkin error pdb.set_trace() return _parseMethod(instring, loc, doActions, callPreParse) breaker._originalParseMethod = _parseMethod self._parse = breaker else: if hasattr(self._parse, "_originalParseMethod"): self._parse = self._parse._originalParseMethod return self def set_parse_action(self, *fns: ParseAction, **kwargs) -> "ParserElement": """ Define one or more actions to perform when successfully matching parse element definition. Parse actions can be called to perform data conversions, do extra validation, update external data structures, or enhance or replace the parsed tokens. Each parse action ``fn`` is a callable method with 0-3 arguments, called as ``fn(s, loc, toks)`` , ``fn(loc, toks)`` , ``fn(toks)`` , or just ``fn()`` , where: - s = the original string being parsed (see note below) - loc = the location of the matching substring - toks = a list of the matched tokens, packaged as a :class:`ParseResults` object The parsed tokens are passed to the parse action as ParseResults. They can be modified in place using list-style append, extend, and pop operations to update the parsed list elements; and with dictionary-style item set and del operations to add, update, or remove any named results. If the tokens are modified in place, it is not necessary to return them with a return statement. Parse actions can also completely replace the given tokens, with another ``ParseResults`` object, or with some entirely different object (common for parse actions that perform data conversions). A convenient way to build a new parse result is to define the values using a dict, and then create the return value using :class:`ParseResults.from_dict`. If None is passed as the ``fn`` parse action, all previously added parse actions for this expression are cleared. Optional keyword arguments: - call_during_try = (default= ``False``) indicate if parse action should be run during lookaheads and alternate testing. For parse actions that have side effects, it is important to only call the parse action once it is determined that it is being called as part of a successful parse. For parse actions that perform additional validation, then call_during_try should be passed as True, so that the validation code is included in the preliminary "try" parses. Note: the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`parse_string` for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. Example:: # parse dates in the form YYYY/MM/DD # use parse action to convert toks from str to int at parse time def convert_to_int(toks): return int(toks[0]) # use a parse action to verify that the date is a valid date def is_valid_date(instring, loc, toks): from datetime import date year, month, day = toks[::2] try: date(year, month, day) except ValueError: raise ParseException(instring, loc, "invalid date given") integer = Word(nums) date_str = integer + '/' + integer + '/' + integer # add parse actions integer.set_parse_action(convert_to_int) date_str.set_parse_action(is_valid_date) # note that integer fields are now ints, not strings date_str.run_tests(''' # successful parse - note that integer fields were converted to ints 1999/12/31 # fail - invalid date 1999/13/31 ''') """ if list(fns) == [None]: self.parseAction = [] else: if not all(callable(fn) for fn in fns): raise TypeError("parse actions must be callable") self.parseAction = [_trim_arity(fn) for fn in fns] self.callDuringTry = kwargs.get( "call_during_try", kwargs.get("callDuringTry", False) ) return self def add_parse_action(self, *fns: ParseAction, **kwargs) -> "ParserElement": """ Add one or more parse actions to expression's list of parse actions. See :class:`set_parse_action`. See examples in :class:`copy`. """ self.parseAction += [_trim_arity(fn) for fn in fns] self.callDuringTry = self.callDuringTry or kwargs.get( "call_during_try", kwargs.get("callDuringTry", False) ) return self def add_condition(self, *fns: ParseCondition, **kwargs) -> "ParserElement": """Add a boolean predicate function to expression's list of parse actions. See :class:`set_parse_action` for function call signatures. Unlike ``set_parse_action``, functions passed to ``add_condition`` need to return boolean success/fail of the condition. Optional keyword arguments: - message = define a custom message to be used in the raised exception - fatal = if True, will raise ParseFatalException to stop parsing immediately; otherwise will raise ParseException - call_during_try = boolean to indicate if this method should be called during internal tryParse calls, default=False Example:: integer = Word(nums).set_parse_action(lambda toks: int(toks[0])) year_int = integer.copy() year_int.add_condition(lambda toks: toks[0] >= 2000, message="Only support years 2000 and later") date_str = year_int + '/' + integer + '/' + integer result = date_str.parse_string("1999/12/31") # -> Exception: Only support years 2000 and later (at char 0), (line:1, col:1) """ for fn in fns: self.parseAction.append( condition_as_parse_action( fn, message=kwargs.get("message"), fatal=kwargs.get("fatal", False) ) ) self.callDuringTry = self.callDuringTry or kwargs.get( "call_during_try", kwargs.get("callDuringTry", False) ) return self def set_fail_action(self, fn: ParseFailAction) -> "ParserElement": """ Define action to perform if parsing fails at this expression. Fail acton fn is a callable function that takes the arguments ``fn(s, loc, expr, err)`` where: - s = string being parsed - loc = location where expression match was attempted and failed - expr = the parse expression that failed - err = the exception thrown The function returns no value. It may throw :class:`ParseFatalException` if it is desired to stop parsing immediately.""" self.failAction = fn return self def _skipIgnorables(self, instring, loc): exprsFound = True while exprsFound: exprsFound = False for e in self.ignoreExprs: try: while 1: loc, dummy = e._parse(instring, loc) exprsFound = True except ParseException: pass return loc def preParse(self, instring, loc): if self.ignoreExprs: loc = self._skipIgnorables(instring, loc) if self.skipWhitespace: instrlen = len(instring) white_chars = self.whiteChars while loc < instrlen and instring[loc] in white_chars: loc += 1 return loc def parseImpl(self, instring, loc, doActions=True): return loc, [] def postParse(self, instring, loc, tokenlist): return tokenlist # @profile def _parseNoCache( self, instring, loc, doActions=True, callPreParse=True ) -> Tuple[int, ParseResults]: TRY, MATCH, FAIL = 0, 1, 2 debugging = self.debug # and doActions) len_instring = len(instring) if debugging or self.failAction: # print("Match {} at loc {}({}, {})".format(self, loc, lineno(loc, instring), col(loc, instring))) try: if callPreParse and self.callPreparse: pre_loc = self.preParse(instring, loc) else: pre_loc = loc tokens_start = pre_loc if self.debugActions.debug_try: self.debugActions.debug_try(instring, tokens_start, self, False) if self.mayIndexError or pre_loc >= len_instring: try: loc, tokens = self.parseImpl(instring, pre_loc, doActions) except IndexError: raise ParseException(instring, len_instring, self.errmsg, self) else: loc, tokens = self.parseImpl(instring, pre_loc, doActions) except Exception as err: # print("Exception raised:", err) if self.debugActions.debug_fail: self.debugActions.debug_fail( instring, tokens_start, self, err, False ) if self.failAction: self.failAction(instring, tokens_start, self, err) raise else: if callPreParse and self.callPreparse: pre_loc = self.preParse(instring, loc) else: pre_loc = loc tokens_start = pre_loc if self.mayIndexError or pre_loc >= len_instring: try: loc, tokens = self.parseImpl(instring, pre_loc, doActions) except IndexError: raise ParseException(instring, len_instring, self.errmsg, self) else: loc, tokens = self.parseImpl(instring, pre_loc, doActions) tokens = self.postParse(instring, loc, tokens) ret_tokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList, modal=self.modalResults ) if self.parseAction and (doActions or self.callDuringTry): if debugging: try: for fn in self.parseAction: try: tokens = fn(instring, tokens_start, ret_tokens) except IndexError as parse_action_exc: exc = ParseException("exception raised in parse action") raise exc from parse_action_exc if tokens is not None and tokens is not ret_tokens: ret_tokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList and isinstance(tokens, (ParseResults, list)), modal=self.modalResults, ) except Exception as err: # print "Exception raised in user parse action:", err if self.debugActions.debug_fail: self.debugActions.debug_fail( instring, tokens_start, self, err, False ) raise else: for fn in self.parseAction: try: tokens = fn(instring, tokens_start, ret_tokens) except IndexError as parse_action_exc: exc = ParseException("exception raised in parse action") raise exc from parse_action_exc if tokens is not None and tokens is not ret_tokens: ret_tokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList and isinstance(tokens, (ParseResults, list)), modal=self.modalResults, ) if debugging: # print("Matched", self, "->", ret_tokens.as_list()) if self.debugActions.debug_match: self.debugActions.debug_match( instring, tokens_start, loc, self, ret_tokens, False ) return loc, ret_tokens def try_parse(self, instring: str, loc: int, raise_fatal: bool = False) -> int: try: return self._parse(instring, loc, doActions=False)[0] except ParseFatalException: if raise_fatal: raise raise ParseException(instring, loc, self.errmsg, self) def can_parse_next(self, instring: str, loc: int) -> bool: try: self.try_parse(instring, loc) except (ParseException, IndexError): return False else: return True # cache for left-recursion in Forward references recursion_lock = RLock() recursion_memos: typing.Dict[ Tuple[int, "Forward", bool], Tuple[int, Union[ParseResults, Exception]] ] = {} # argument cache for optimizing repeated calls when backtracking through recursive expressions packrat_cache = ( {} ) # this is set later by enabled_packrat(); this is here so that reset_cache() doesn't fail packrat_cache_lock = RLock() packrat_cache_stats = [0, 0] # this method gets repeatedly called during backtracking with the same arguments - # we can cache these arguments and save ourselves the trouble of re-parsing the contained expression def _parseCache( self, instring, loc, doActions=True, callPreParse=True ) -> Tuple[int, ParseResults]: HIT, MISS = 0, 1 TRY, MATCH, FAIL = 0, 1, 2 lookup = (self, instring, loc, callPreParse, doActions) with ParserElement.packrat_cache_lock: cache = ParserElement.packrat_cache value = cache.get(lookup) if value is cache.not_in_cache: ParserElement.packrat_cache_stats[MISS] += 1 try: value = self._parseNoCache(instring, loc, doActions, callPreParse) except ParseBaseException as pe: # cache a copy of the exception, without the traceback cache.set(lookup, pe.__class__(*pe.args)) raise else: cache.set(lookup, (value[0], value[1].copy(), loc)) return value else: ParserElement.packrat_cache_stats[HIT] += 1 if self.debug and self.debugActions.debug_try: try: self.debugActions.debug_try(instring, loc, self, cache_hit=True) except TypeError: pass if isinstance(value, Exception): if self.debug and self.debugActions.debug_fail: try: self.debugActions.debug_fail( instring, loc, self, value, cache_hit=True ) except TypeError: pass raise value loc_, result, endloc = value[0], value[1].copy(), value[2] if self.debug and self.debugActions.debug_match: try: self.debugActions.debug_match( instring, loc_, endloc, self, result, cache_hit=True ) except TypeError: pass return loc_, result _parse = _parseNoCache @staticmethod def reset_cache() -> None: ParserElement.packrat_cache.clear() ParserElement.packrat_cache_stats[:] = [0] * len( ParserElement.packrat_cache_stats ) ParserElement.recursion_memos.clear() _packratEnabled = False _left_recursion_enabled = False @staticmethod def disable_memoization() -> None: """ Disables active Packrat or Left Recursion parsing and their memoization This method also works if neither Packrat nor Left Recursion are enabled. This makes it safe to call before activating Packrat nor Left Recursion to clear any previous settings. """ ParserElement.reset_cache() ParserElement._left_recursion_enabled = False ParserElement._packratEnabled = False ParserElement._parse = ParserElement._parseNoCache @staticmethod def enable_left_recursion( cache_size_limit: typing.Optional[int] = None, *, force=False ) -> None: """ Enables "bounded recursion" parsing, which allows for both direct and indirect left-recursion. During parsing, left-recursive :class:`Forward` elements are repeatedly matched with a fixed recursion depth that is gradually increased until finding the longest match. Example:: import pyparsing as pp pp.ParserElement.enable_left_recursion() E = pp.Forward("E") num = pp.Word(pp.nums) # match `num`, or `num '+' num`, or `num '+' num '+' num`, ... E <<= E + '+' - num | num print(E.parse_string("1+2+3")) Recursion search naturally memoizes matches of ``Forward`` elements and may thus skip reevaluation of parse actions during backtracking. This may break programs with parse actions which rely on strict ordering of side-effects. Parameters: - cache_size_limit - (default=``None``) - memoize at most this many ``Forward`` elements during matching; if ``None`` (the default), memoize all ``Forward`` elements. Bounded Recursion parsing works similar but not identical to Packrat parsing, thus the two cannot be used together. Use ``force=True`` to disable any previous, conflicting settings. """ if force: ParserElement.disable_memoization() elif ParserElement._packratEnabled: raise RuntimeError("Packrat and Bounded Recursion are not compatible") if cache_size_limit is None: ParserElement.recursion_memos = _UnboundedMemo() elif cache_size_limit > 0: ParserElement.recursion_memos = _LRUMemo(capacity=cache_size_limit) else: raise NotImplementedError("Memo size of %s" % cache_size_limit) ParserElement._left_recursion_enabled = True @staticmethod def enable_packrat(cache_size_limit: int = 128, *, force: bool = False) -> None: """ Enables "packrat" parsing, which adds memoizing to the parsing logic. Repeated parse attempts at the same string location (which happens often in many complex grammars) can immediately return a cached value, instead of re-executing parsing/validating code. Memoizing is done of both valid results and parsing exceptions. Parameters: - cache_size_limit - (default= ``128``) - if an integer value is provided will limit the size of the packrat cache; if None is passed, then the cache size will be unbounded; if 0 is passed, the cache will be effectively disabled. This speedup may break existing programs that use parse actions that have side-effects. For this reason, packrat parsing is disabled when you first import pyparsing. To activate the packrat feature, your program must call the class method :class:`ParserElement.enable_packrat`. For best results, call ``enable_packrat()`` immediately after importing pyparsing. Example:: import pyparsing pyparsing.ParserElement.enable_packrat() Packrat parsing works similar but not identical to Bounded Recursion parsing, thus the two cannot be used together. Use ``force=True`` to disable any previous, conflicting settings. """ if force: ParserElement.disable_memoization() elif ParserElement._left_recursion_enabled: raise RuntimeError("Packrat and Bounded Recursion are not compatible") if not ParserElement._packratEnabled: ParserElement._packratEnabled = True if cache_size_limit is None: ParserElement.packrat_cache = _UnboundedCache() else: ParserElement.packrat_cache = _FifoCache(cache_size_limit) ParserElement._parse = ParserElement._parseCache def parse_string( self, instring: str, parse_all: bool = False, *, parseAll: bool = False ) -> ParseResults: """ Parse a string with respect to the parser definition. This function is intended as the primary interface to the client code. :param instring: The input string to be parsed. :param parse_all: If set, the entire input string must match the grammar. :param parseAll: retained for pre-PEP8 compatibility, will be removed in a future release. :raises ParseException: Raised if ``parse_all`` is set and the input string does not match the whole grammar. :returns: the parsed data as a :class:`ParseResults` object, which may be accessed as a `list`, a `dict`, or an object with attributes if the given parser includes results names. If the input string is required to match the entire grammar, ``parse_all`` flag must be set to ``True``. This is also equivalent to ending the grammar with :class:`StringEnd`(). To report proper column numbers, ``parse_string`` operates on a copy of the input string where all tabs are converted to spaces (8 spaces per tab, as per the default in ``string.expandtabs``). If the input string contains tabs and the grammar uses parse actions that use the ``loc`` argument to index into the string being parsed, one can ensure a consistent view of the input string by doing one of the following: - calling ``parse_with_tabs`` on your grammar before calling ``parse_string`` (see :class:`parse_with_tabs`), - define your parse action using the full ``(s,loc,toks)`` signature, and reference the input string using the parse action's ``s`` argument, or - explicitly expand the tabs in your input string before calling ``parse_string``. Examples: By default, partial matches are OK. >>> res = Word('a').parse_string('aaaaabaaa') >>> print(res) ['aaaaa'] The parsing behavior varies by the inheriting class of this abstract class. Please refer to the children directly to see more examples. It raises an exception if parse_all flag is set and instring does not match the whole grammar. >>> res = Word('a').parse_string('aaaaabaaa', parse_all=True) Traceback (most recent call last): ... pyparsing.ParseException: Expected end of text, found 'b' (at char 5), (line:1, col:6) """ parseAll = parse_all or parseAll ParserElement.reset_cache() if not self.streamlined: self.streamline() for e in self.ignoreExprs: e.streamline() if not self.keepTabs: instring = instring.expandtabs() try: loc, tokens = self._parse(instring, 0) if parseAll: loc = self.preParse(instring, loc) se = Empty() + StringEnd() se._parse(instring, loc) except ParseBaseException as exc: if ParserElement.verbose_stacktrace: raise else: # catch and re-raise exception from here, clearing out pyparsing internal stack trace raise exc.with_traceback(None) else: return tokens def scan_string( self, instring: str, max_matches: int = _MAX_INT, overlap: bool = False, *, debug: bool = False, maxMatches: int = _MAX_INT, ) -> Generator[Tuple[ParseResults, int, int], None, None]: """ Scan the input string for expression matches. Each match will return the matching tokens, start location, and end location. May be called with optional ``max_matches`` argument, to clip scanning after 'n' matches are found. If ``overlap`` is specified, then overlapping matches will be reported. Note that the start and end locations are reported relative to the string being parsed. See :class:`parse_string` for more information on parsing strings with embedded tabs. Example:: source = "sldjf123lsdjjkf345sldkjf879lkjsfd987" print(source) for tokens, start, end in Word(alphas).scan_string(source): print(' '*start + '^'*(end-start)) print(' '*start + tokens[0]) prints:: sldjf123lsdjjkf345sldkjf879lkjsfd987 ^^^^^ sldjf ^^^^^^^ lsdjjkf ^^^^^^ sldkjf ^^^^^^ lkjsfd """ maxMatches = min(maxMatches, max_matches) if not self.streamlined: self.streamline() for e in self.ignoreExprs: e.streamline() if not self.keepTabs: instring = str(instring).expandtabs() instrlen = len(instring) loc = 0 preparseFn = self.preParse parseFn = self._parse ParserElement.resetCache() matches = 0 try: while loc <= instrlen and matches < maxMatches: try: preloc = preparseFn(instring, loc) nextLoc, tokens = parseFn(instring, preloc, callPreParse=False) except ParseException: loc = preloc + 1 else: if nextLoc > loc: matches += 1 if debug: print( { "tokens": tokens.asList(), "start": preloc, "end": nextLoc, } ) yield tokens, preloc, nextLoc if overlap: nextloc = preparseFn(instring, loc) if nextloc > loc: loc = nextLoc else: loc += 1 else: loc = nextLoc else: loc = preloc + 1 except ParseBaseException as exc: if ParserElement.verbose_stacktrace: raise else: # catch and re-raise exception from here, clears out pyparsing internal stack trace raise exc.with_traceback(None) def transform_string(self, instring: str, *, debug: bool = False) -> str: """ Extension to :class:`scan_string`, to modify matching text with modified tokens that may be returned from a parse action. To use ``transform_string``, define a grammar and attach a parse action to it that modifies the returned token list. Invoking ``transform_string()`` on a target string will then scan for matches, and replace the matched text patterns according to the logic in the parse action. ``transform_string()`` returns the resulting transformed string. Example:: wd = Word(alphas) wd.set_parse_action(lambda toks: toks[0].title()) print(wd.transform_string("now is the winter of our discontent made glorious summer by this sun of york.")) prints:: Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York. """ out: List[str] = [] lastE = 0 # force preservation of s, to minimize unwanted transformation of string, and to # keep string locs straight between transform_string and scan_string self.keepTabs = True try: for t, s, e in self.scan_string(instring, debug=debug): out.append(instring[lastE:s]) if t: if isinstance(t, ParseResults): out += t.as_list() elif isinstance(t, Iterable) and not isinstance(t, str_type): out.extend(t) else: out.append(t) lastE = e out.append(instring[lastE:]) out = [o for o in out if o] return "".join([str(s) for s in _flatten(out)]) except ParseBaseException as exc: if ParserElement.verbose_stacktrace: raise else: # catch and re-raise exception from here, clears out pyparsing internal stack trace raise exc.with_traceback(None) def search_string( self, instring: str, max_matches: int = _MAX_INT, *, debug: bool = False, maxMatches: int = _MAX_INT, ) -> ParseResults: """ Another extension to :class:`scan_string`, simplifying the access to the tokens found to match the given parse expression. May be called with optional ``max_matches`` argument, to clip searching after 'n' matches are found. Example:: # a capitalized word starts with an uppercase letter, followed by zero or more lowercase letters cap_word = Word(alphas.upper(), alphas.lower()) print(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity")) # the sum() builtin can be used to merge results into a single ParseResults object print(sum(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity"))) prints:: [['More'], ['Iron'], ['Lead'], ['Gold'], ['I'], ['Electricity']] ['More', 'Iron', 'Lead', 'Gold', 'I', 'Electricity'] """ maxMatches = min(maxMatches, max_matches) try: return ParseResults( [t for t, s, e in self.scan_string(instring, maxMatches, debug=debug)] ) except ParseBaseException as exc: if ParserElement.verbose_stacktrace: raise else: # catch and re-raise exception from here, clears out pyparsing internal stack trace raise exc.with_traceback(None) def split( self, instring: str, maxsplit: int = _MAX_INT, include_separators: bool = False, *, includeSeparators=False, ) -> Generator[str, None, None]: """ Generator method to split a string using the given expression as a separator. May be called with optional ``maxsplit`` argument, to limit the number of splits; and the optional ``include_separators`` argument (default= ``False``), if the separating matching text should be included in the split results. Example:: punc = one_of(list(".,;:/-!?")) print(list(punc.split("This, this?, this sentence, is badly punctuated!"))) prints:: ['This', ' this', '', ' this sentence', ' is badly punctuated', ''] """ includeSeparators = includeSeparators or include_separators last = 0 for t, s, e in self.scan_string(instring, max_matches=maxsplit): yield instring[last:s] if includeSeparators: yield t[0] last = e yield instring[last:] def __add__(self, other) -> "ParserElement": """ Implementation of ``+`` operator - returns :class:`And`. Adding strings to a :class:`ParserElement` converts them to :class:`Literal`s by default. Example:: greet = Word(alphas) + "," + Word(alphas) + "!" hello = "Hello, World!" print(hello, "->", greet.parse_string(hello)) prints:: Hello, World! -> ['Hello', ',', 'World', '!'] ``...`` may be used as a parse expression as a short form of :class:`SkipTo`. Literal('start') + ... + Literal('end') is equivalent to: Literal('start') + SkipTo('end')("_skipped*") + Literal('end') Note that the skipped text is returned with '_skipped' as a results name, and to support having multiple skips in the same parser, the value returned is a list of all skipped text. """ if other is Ellipsis: return _PendingSkip(self) if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return And([self, other]) def __radd__(self, other) -> "ParserElement": """ Implementation of ``+`` operator when left operand is not a :class:`ParserElement` """ if other is Ellipsis: return SkipTo(self)("_skipped*") + self if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return other + self def __sub__(self, other) -> "ParserElement": """ Implementation of ``-`` operator, returns :class:`And` with error stop """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return self + And._ErrorStop() + other def __rsub__(self, other) -> "ParserElement": """ Implementation of ``-`` operator when left operand is not a :class:`ParserElement` """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return other - self def __mul__(self, other) -> "ParserElement": """ Implementation of ``*`` operator, allows use of ``expr * 3`` in place of ``expr + expr + expr``. Expressions may also be multiplied by a 2-integer tuple, similar to ``{min, max}`` multipliers in regular expressions. Tuples may also include ``None`` as in: - ``expr*(n, None)`` or ``expr*(n, )`` is equivalent to ``expr*n + ZeroOrMore(expr)`` (read as "at least n instances of ``expr``") - ``expr*(None, n)`` is equivalent to ``expr*(0, n)`` (read as "0 to n instances of ``expr``") - ``expr*(None, None)`` is equivalent to ``ZeroOrMore(expr)`` - ``expr*(1, None)`` is equivalent to ``OneOrMore(expr)`` Note that ``expr*(None, n)`` does not raise an exception if more than n exprs exist in the input stream; that is, ``expr*(None, n)`` does not enforce a maximum number of expr occurrences. If this behavior is desired, then write ``expr*(None, n) + ~expr`` """ if other is Ellipsis: other = (0, None) elif isinstance(other, tuple) and other[:1] == (Ellipsis,): other = ((0,) + other[1:] + (None,))[:2] if isinstance(other, int): minElements, optElements = other, 0 elif isinstance(other, tuple): other = tuple(o if o is not Ellipsis else None for o in other) other = (other + (None, None))[:2] if other[0] is None: other = (0, other[1]) if isinstance(other[0], int) and other[1] is None: if other[0] == 0: return ZeroOrMore(self) if other[0] == 1: return OneOrMore(self) else: return self * other[0] + ZeroOrMore(self) elif isinstance(other[0], int) and isinstance(other[1], int): minElements, optElements = other optElements -= minElements else: raise TypeError( "cannot multiply ParserElement and ({}) objects".format( ",".join(type(item).__name__ for item in other) ) ) else: raise TypeError( "cannot multiply ParserElement and {} objects".format( type(other).__name__ ) ) if minElements < 0: raise ValueError("cannot multiply ParserElement by negative value") if optElements < 0: raise ValueError( "second tuple value must be greater or equal to first tuple value" ) if minElements == optElements == 0: return And([]) if optElements: def makeOptionalList(n): if n > 1: return Opt(self + makeOptionalList(n - 1)) else: return Opt(self) if minElements: if minElements == 1: ret = self + makeOptionalList(optElements) else: ret = And([self] * minElements) + makeOptionalList(optElements) else: ret = makeOptionalList(optElements) else: if minElements == 1: ret = self else: ret = And([self] * minElements) return ret def __rmul__(self, other) -> "ParserElement": return self.__mul__(other) def __or__(self, other) -> "ParserElement": """ Implementation of ``|`` operator - returns :class:`MatchFirst` """ if other is Ellipsis: return _PendingSkip(self, must_skip=True) if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return MatchFirst([self, other]) def __ror__(self, other) -> "ParserElement": """ Implementation of ``|`` operator when left operand is not a :class:`ParserElement` """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return other | self def __xor__(self, other) -> "ParserElement": """ Implementation of ``^`` operator - returns :class:`Or` """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return Or([self, other]) def __rxor__(self, other) -> "ParserElement": """ Implementation of ``^`` operator when left operand is not a :class:`ParserElement` """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return other ^ self def __and__(self, other) -> "ParserElement": """ Implementation of ``&`` operator - returns :class:`Each` """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return Each([self, other]) def __rand__(self, other) -> "ParserElement": """ Implementation of ``&`` operator when left operand is not a :class:`ParserElement` """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return other & self def __invert__(self) -> "ParserElement": """ Implementation of ``~`` operator - returns :class:`NotAny` """ return NotAny(self) # disable __iter__ to override legacy use of sequential access to __getitem__ to # iterate over a sequence __iter__ = None def __getitem__(self, key): """ use ``[]`` indexing notation as a short form for expression repetition: - ``expr[n]`` is equivalent to ``expr*n`` - ``expr[m, n]`` is equivalent to ``expr*(m, n)`` - ``expr[n, ...]`` or ``expr[n,]`` is equivalent to ``expr*n + ZeroOrMore(expr)`` (read as "at least n instances of ``expr``") - ``expr[..., n]`` is equivalent to ``expr*(0, n)`` (read as "0 to n instances of ``expr``") - ``expr[...]`` and ``expr[0, ...]`` are equivalent to ``ZeroOrMore(expr)`` - ``expr[1, ...]`` is equivalent to ``OneOrMore(expr)`` ``None`` may be used in place of ``...``. Note that ``expr[..., n]`` and ``expr[m, n]``do not raise an exception if more than ``n`` ``expr``s exist in the input stream. If this behavior is desired, then write ``expr[..., n] + ~expr``. """ # convert single arg keys to tuples try: if isinstance(key, str_type): key = (key,) iter(key) except TypeError: key = (key, key) if len(key) > 2: raise TypeError( "only 1 or 2 index arguments supported ({}{})".format( key[:5], "... [{}]".format(len(key)) if len(key) > 5 else "" ) ) # clip to 2 elements ret = self * tuple(key[:2]) return ret def __call__(self, name: str = None) -> "ParserElement": """ Shortcut for :class:`set_results_name`, with ``list_all_matches=False``. If ``name`` is given with a trailing ``'*'`` character, then ``list_all_matches`` will be passed as ``True``. If ``name` is omitted, same as calling :class:`copy`. Example:: # these are equivalent userdata = Word(alphas).set_results_name("name") + Word(nums + "-").set_results_name("socsecno") userdata = Word(alphas)("name") + Word(nums + "-")("socsecno") """ if name is not None: return self._setResultsName(name) else: return self.copy() def suppress(self) -> "ParserElement": """ Suppresses the output of this :class:`ParserElement`; useful to keep punctuation from cluttering up returned output. """ return Suppress(self) def ignore_whitespace(self, recursive: bool = True) -> "ParserElement": """ Enables the skipping of whitespace before matching the characters in the :class:`ParserElement`'s defined pattern. :param recursive: If ``True`` (the default), also enable whitespace skipping in child elements (if any) """ self.skipWhitespace = True return self def leave_whitespace(self, recursive: bool = True) -> "ParserElement": """ Disables the skipping of whitespace before matching the characters in the :class:`ParserElement`'s defined pattern. This is normally only used internally by the pyparsing module, but may be needed in some whitespace-sensitive grammars. :param recursive: If true (the default), also disable whitespace skipping in child elements (if any) """ self.skipWhitespace = False return self def set_whitespace_chars( self, chars: Union[Set[str], str], copy_defaults: bool = False ) -> "ParserElement": """ Overrides the default whitespace chars """ self.skipWhitespace = True self.whiteChars = set(chars) self.copyDefaultWhiteChars = copy_defaults return self def parse_with_tabs(self) -> "ParserElement": """ Overrides default behavior to expand ```` s to spaces before parsing the input string. Must be called before ``parse_string`` when the input grammar contains elements that match ```` characters. """ self.keepTabs = True return self def ignore(self, other: "ParserElement") -> "ParserElement": """ Define expression to be ignored (e.g., comments) while doing pattern matching; may be called repeatedly, to define multiple comment or other ignorable patterns. Example:: patt = Word(alphas)[1, ...] patt.parse_string('ablaj /* comment */ lskjd') # -> ['ablaj'] patt.ignore(c_style_comment) patt.parse_string('ablaj /* comment */ lskjd') # -> ['ablaj', 'lskjd'] """ import typing if isinstance(other, str_type): other = Suppress(other) if isinstance(other, Suppress): if other not in self.ignoreExprs: self.ignoreExprs.append(other) else: self.ignoreExprs.append(Suppress(other.copy())) return self def set_debug_actions( self, start_action: DebugStartAction, success_action: DebugSuccessAction, exception_action: DebugExceptionAction, ) -> "ParserElement": """ Customize display of debugging messages while doing pattern matching: - ``start_action`` - method to be called when an expression is about to be parsed; should have the signature ``fn(input_string: str, location: int, expression: ParserElement, cache_hit: bool)`` - ``success_action`` - method to be called when an expression has successfully parsed; should have the signature ``fn(input_string: str, start_location: int, end_location: int, expression: ParserELement, parsed_tokens: ParseResults, cache_hit: bool)`` - ``exception_action`` - method to be called when expression fails to parse; should have the signature ``fn(input_string: str, location: int, expression: ParserElement, exception: Exception, cache_hit: bool)`` """ self.debugActions = self.DebugActions( start_action or _default_start_debug_action, success_action or _default_success_debug_action, exception_action or _default_exception_debug_action, ) self.debug = True return self def set_debug(self, flag: bool = True) -> "ParserElement": """ Enable display of debugging messages while doing pattern matching. Set ``flag`` to ``True`` to enable, ``False`` to disable. Example:: wd = Word(alphas).set_name("alphaword") integer = Word(nums).set_name("numword") term = wd | integer # turn on debugging for wd wd.set_debug() term[1, ...].parse_string("abc 123 xyz 890") prints:: Match alphaword at loc 0(1,1) Matched alphaword -> ['abc'] Match alphaword at loc 3(1,4) Exception raised:Expected alphaword (at char 4), (line:1, col:5) Match alphaword at loc 7(1,8) Matched alphaword -> ['xyz'] Match alphaword at loc 11(1,12) Exception raised:Expected alphaword (at char 12), (line:1, col:13) Match alphaword at loc 15(1,16) Exception raised:Expected alphaword (at char 15), (line:1, col:16) The output shown is that produced by the default debug actions - custom debug actions can be specified using :class:`set_debug_actions`. Prior to attempting to match the ``wd`` expression, the debugging message ``"Match at loc (,)"`` is shown. Then if the parse succeeds, a ``"Matched"`` message is shown, or an ``"Exception raised"`` message is shown. Also note the use of :class:`set_name` to assign a human-readable name to the expression, which makes debugging and exception messages easier to understand - for instance, the default name created for the :class:`Word` expression without calling ``set_name`` is ``"W:(A-Za-z)"``. """ if flag: self.set_debug_actions( _default_start_debug_action, _default_success_debug_action, _default_exception_debug_action, ) else: self.debug = False return self @property def default_name(self) -> str: if self._defaultName is None: self._defaultName = self._generateDefaultName() return self._defaultName @abstractmethod def _generateDefaultName(self): """ Child classes must define this method, which defines how the ``default_name`` is set. """ def set_name(self, name: str) -> "ParserElement": """ Define name for this expression, makes debugging and exception messages clearer. Example:: Word(nums).parse_string("ABC") # -> Exception: Expected W:(0-9) (at char 0), (line:1, col:1) Word(nums).set_name("integer").parse_string("ABC") # -> Exception: Expected integer (at char 0), (line:1, col:1) """ self.customName = name self.errmsg = "Expected " + self.name if __diag__.enable_debug_on_named_expressions: self.set_debug() return self @property def name(self) -> str: # This will use a user-defined name if available, but otherwise defaults back to the auto-generated name return self.customName if self.customName is not None else self.default_name def __str__(self) -> str: return self.name def __repr__(self) -> str: return str(self) def streamline(self) -> "ParserElement": self.streamlined = True self._defaultName = None return self def recurse(self) -> Sequence["ParserElement"]: return [] def _checkRecursion(self, parseElementList): subRecCheckList = parseElementList[:] + [self] for e in self.recurse(): e._checkRecursion(subRecCheckList) def validate(self, validateTrace=None) -> None: """ Check defined expressions for valid structure, check for infinite recursive definitions. """ self._checkRecursion([]) def parse_file( self, file_or_filename: Union[str, Path, TextIO], encoding: str = "utf-8", parse_all: bool = False, *, parseAll: bool = False, ) -> ParseResults: """ Execute the parse expression on the given file or filename. If a filename is specified (instead of a file object), the entire file is opened, read, and closed before parsing. """ parseAll = parseAll or parse_all try: file_contents = file_or_filename.read() except AttributeError: with open(file_or_filename, "r", encoding=encoding) as f: file_contents = f.read() try: return self.parse_string(file_contents, parseAll) except ParseBaseException as exc: if ParserElement.verbose_stacktrace: raise else: # catch and re-raise exception from here, clears out pyparsing internal stack trace raise exc.with_traceback(None) def __eq__(self, other): if self is other: return True elif isinstance(other, str_type): return self.matches(other, parse_all=True) elif isinstance(other, ParserElement): return vars(self) == vars(other) return False def __hash__(self): return id(self) def matches( self, test_string: str, parse_all: bool = True, *, parseAll: bool = True ) -> bool: """ Method for quick testing of a parser against a test string. Good for simple inline microtests of sub expressions while building up larger parser. Parameters: - ``test_string`` - to test against this expression for a match - ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests Example:: expr = Word(nums) assert expr.matches("100") """ parseAll = parseAll and parse_all try: self.parse_string(str(test_string), parse_all=parseAll) return True except ParseBaseException: return False def run_tests( self, tests: Union[str, List[str]], parse_all: bool = True, comment: typing.Optional[Union["ParserElement", str]] = "#", full_dump: bool = True, print_results: bool = True, failure_tests: bool = False, post_parse: Callable[[str, ParseResults], str] = None, file: typing.Optional[TextIO] = None, with_line_numbers: bool = False, *, parseAll: bool = True, fullDump: bool = True, printResults: bool = True, failureTests: bool = False, postParse: Callable[[str, ParseResults], str] = None, ) -> Tuple[bool, List[Tuple[str, Union[ParseResults, Exception]]]]: """ Execute the parse expression on a series of test strings, showing each test, the parsed results or where the parse failed. Quick and easy way to run a parse expression against a list of sample strings. Parameters: - ``tests`` - a list of separate test strings, or a multiline string of test strings - ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests - ``comment`` - (default= ``'#'``) - expression for indicating embedded comments in the test string; pass None to disable comment filtering - ``full_dump`` - (default= ``True``) - dump results as list followed by results names in nested outline; if False, only dump nested list - ``print_results`` - (default= ``True``) prints test output to stdout - ``failure_tests`` - (default= ``False``) indicates if these tests are expected to fail parsing - ``post_parse`` - (default= ``None``) optional callback for successful parse results; called as `fn(test_string, parse_results)` and returns a string to be added to the test output - ``file`` - (default= ``None``) optional file-like object to which test output will be written; if None, will default to ``sys.stdout`` - ``with_line_numbers`` - default= ``False``) show test strings with line and column numbers Returns: a (success, results) tuple, where success indicates that all tests succeeded (or failed if ``failure_tests`` is True), and the results contain a list of lines of each test's output Example:: number_expr = pyparsing_common.number.copy() result = number_expr.run_tests(''' # unsigned integer 100 # negative integer -100 # float with scientific notation 6.02e23 # integer with scientific notation 1e-12 ''') print("Success" if result[0] else "Failed!") result = number_expr.run_tests(''' # stray character 100Z # missing leading digit before '.' -.100 # too many '.' 3.14.159 ''', failure_tests=True) print("Success" if result[0] else "Failed!") prints:: # unsigned integer 100 [100] # negative integer -100 [-100] # float with scientific notation 6.02e23 [6.02e+23] # integer with scientific notation 1e-12 [1e-12] Success # stray character 100Z ^ FAIL: Expected end of text (at char 3), (line:1, col:4) # missing leading digit before '.' -.100 ^ FAIL: Expected {real number with scientific notation | real number | signed integer} (at char 0), (line:1, col:1) # too many '.' 3.14.159 ^ FAIL: Expected end of text (at char 4), (line:1, col:5) Success Each test string must be on a single line. If you want to test a string that spans multiple lines, create a test like this:: expr.run_tests(r"this is a test\\n of strings that spans \\n 3 lines") (Note that this is a raw string literal, you must include the leading ``'r'``.) """ from .testing import pyparsing_test parseAll = parseAll and parse_all fullDump = fullDump and full_dump printResults = printResults and print_results failureTests = failureTests or failure_tests postParse = postParse or post_parse if isinstance(tests, str_type): line_strip = type(tests).strip tests = [line_strip(test_line) for test_line in tests.rstrip().splitlines()] if isinstance(comment, str_type): comment = Literal(comment) if file is None: file = sys.stdout print_ = file.write result: Union[ParseResults, Exception] allResults = [] comments = [] success = True NL = Literal(r"\n").add_parse_action(replace_with("\n")).ignore(quoted_string) BOM = "\ufeff" for t in tests: if comment is not None and comment.matches(t, False) or comments and not t: comments.append( pyparsing_test.with_line_numbers(t) if with_line_numbers else t ) continue if not t: continue out = [ "\n" + "\n".join(comments) if comments else "", pyparsing_test.with_line_numbers(t) if with_line_numbers else t, ] comments = [] try: # convert newline marks to actual newlines, and strip leading BOM if present t = NL.transform_string(t.lstrip(BOM)) result = self.parse_string(t, parse_all=parseAll) except ParseBaseException as pe: fatal = "(FATAL)" if isinstance(pe, ParseFatalException) else "" out.append(pe.explain()) out.append("FAIL: " + str(pe)) if ParserElement.verbose_stacktrace: out.extend(traceback.format_tb(pe.__traceback__)) success = success and failureTests result = pe except Exception as exc: out.append("FAIL-EXCEPTION: {}: {}".format(type(exc).__name__, exc)) if ParserElement.verbose_stacktrace: out.extend(traceback.format_tb(exc.__traceback__)) success = success and failureTests result = exc else: success = success and not failureTests if postParse is not None: try: pp_value = postParse(t, result) if pp_value is not None: if isinstance(pp_value, ParseResults): out.append(pp_value.dump()) else: out.append(str(pp_value)) else: out.append(result.dump()) except Exception as e: out.append(result.dump(full=fullDump)) out.append( "{} failed: {}: {}".format( postParse.__name__, type(e).__name__, e ) ) else: out.append(result.dump(full=fullDump)) out.append("") if printResults: print_("\n".join(out)) allResults.append((t, result)) return success, allResults def create_diagram( self, output_html: Union[TextIO, Path, str], vertical: int = 3, show_results_names: bool = False, show_groups: bool = False, **kwargs, ) -> None: """ Create a railroad diagram for the parser. Parameters: - output_html (str or file-like object) - output target for generated diagram HTML - vertical (int) - threshold for formatting multiple alternatives vertically instead of horizontally (default=3) - show_results_names - bool flag whether diagram should show annotations for defined results names - show_groups - bool flag whether groups should be highlighted with an unlabeled surrounding box Additional diagram-formatting keyword arguments can also be included; see railroad.Diagram class. """ try: from .diagram import to_railroad, railroad_to_html except ImportError as ie: raise Exception( "must ``pip install pyparsing[diagrams]`` to generate parser railroad diagrams" ) from ie self.streamline() railroad = to_railroad( self, vertical=vertical, show_results_names=show_results_names, show_groups=show_groups, diagram_kwargs=kwargs, ) if isinstance(output_html, (str, Path)): with open(output_html, "w", encoding="utf-8") as diag_file: diag_file.write(railroad_to_html(railroad)) else: # we were passed a file-like object, just write to it output_html.write(railroad_to_html(railroad)) setDefaultWhitespaceChars = set_default_whitespace_chars inlineLiteralsUsing = inline_literals_using setResultsName = set_results_name setBreak = set_break setParseAction = set_parse_action addParseAction = add_parse_action addCondition = add_condition setFailAction = set_fail_action tryParse = try_parse canParseNext = can_parse_next resetCache = reset_cache enableLeftRecursion = enable_left_recursion enablePackrat = enable_packrat parseString = parse_string scanString = scan_string searchString = search_string transformString = transform_string setWhitespaceChars = set_whitespace_chars parseWithTabs = parse_with_tabs setDebugActions = set_debug_actions setDebug = set_debug defaultName = default_name setName = set_name parseFile = parse_file runTests = run_tests ignoreWhitespace = ignore_whitespace leaveWhitespace = leave_whitespace class _PendingSkip(ParserElement): # internal placeholder class to hold a place were '...' is added to a parser element, # once another ParserElement is added, this placeholder will be replaced with a SkipTo def __init__(self, expr: ParserElement, must_skip: bool = False): super().__init__() self.anchor = expr self.must_skip = must_skip def _generateDefaultName(self): return str(self.anchor + Empty()).replace("Empty", "...") def __add__(self, other) -> "ParserElement": skipper = SkipTo(other).set_name("...")("_skipped*") if self.must_skip: def must_skip(t): if not t._skipped or t._skipped.as_list() == [""]: del t[0] t.pop("_skipped", None) def show_skip(t): if t._skipped.as_list()[-1:] == [""]: t.pop("_skipped") t["_skipped"] = "missing <" + repr(self.anchor) + ">" return ( self.anchor + skipper().add_parse_action(must_skip) | skipper().add_parse_action(show_skip) ) + other return self.anchor + skipper + other def __repr__(self): return self.defaultName def parseImpl(self, *args): raise Exception( "use of `...` expression without following SkipTo target expression" ) class Token(ParserElement): """Abstract :class:`ParserElement` subclass, for defining atomic matching patterns. """ def __init__(self): super().__init__(savelist=False) def _generateDefaultName(self): return type(self).__name__ class Empty(Token): """ An empty token, will always match. """ def __init__(self): super().__init__() self.mayReturnEmpty = True self.mayIndexError = False class NoMatch(Token): """ A token that will never match. """ def __init__(self): super().__init__() self.mayReturnEmpty = True self.mayIndexError = False self.errmsg = "Unmatchable token" def parseImpl(self, instring, loc, doActions=True): raise ParseException(instring, loc, self.errmsg, self) class Literal(Token): """ Token to exactly match a specified string. Example:: Literal('blah').parse_string('blah') # -> ['blah'] Literal('blah').parse_string('blahfooblah') # -> ['blah'] Literal('blah').parse_string('bla') # -> Exception: Expected "blah" For case-insensitive matching, use :class:`CaselessLiteral`. For keyword matching (force word break before and after the matched string), use :class:`Keyword` or :class:`CaselessKeyword`. """ def __init__(self, match_string: str = "", *, matchString: str = ""): super().__init__() match_string = matchString or match_string self.match = match_string self.matchLen = len(match_string) try: self.firstMatchChar = match_string[0] except IndexError: raise ValueError("null string passed to Literal; use Empty() instead") self.errmsg = "Expected " + self.name self.mayReturnEmpty = False self.mayIndexError = False # Performance tuning: modify __class__ to select # a parseImpl optimized for single-character check if self.matchLen == 1 and type(self) is Literal: self.__class__ = _SingleCharLiteral def _generateDefaultName(self): return repr(self.match) def parseImpl(self, instring, loc, doActions=True): if instring[loc] == self.firstMatchChar and instring.startswith( self.match, loc ): return loc + self.matchLen, self.match raise ParseException(instring, loc, self.errmsg, self) class _SingleCharLiteral(Literal): def parseImpl(self, instring, loc, doActions=True): if instring[loc] == self.firstMatchChar: return loc + 1, self.match raise ParseException(instring, loc, self.errmsg, self) ParserElement._literalStringClass = Literal class Keyword(Token): """ Token to exactly match a specified string as a keyword, that is, it must be immediately followed by a non-keyword character. Compare with :class:`Literal`: - ``Literal("if")`` will match the leading ``'if'`` in ``'ifAndOnlyIf'``. - ``Keyword("if")`` will not; it will only match the leading ``'if'`` in ``'if x=1'``, or ``'if(y==2)'`` Accepts two optional constructor arguments in addition to the keyword string: - ``identChars`` is a string of characters that would be valid identifier characters, defaulting to all alphanumerics + "_" and "$" - ``caseless`` allows case-insensitive matching, default is ``False``. Example:: Keyword("start").parse_string("start") # -> ['start'] Keyword("start").parse_string("starting") # -> Exception For case-insensitive matching, use :class:`CaselessKeyword`. """ DEFAULT_KEYWORD_CHARS = alphanums + "_$" def __init__( self, match_string: str = "", ident_chars: typing.Optional[str] = None, caseless: bool = False, *, matchString: str = "", identChars: typing.Optional[str] = None, ): super().__init__() identChars = identChars or ident_chars if identChars is None: identChars = Keyword.DEFAULT_KEYWORD_CHARS match_string = matchString or match_string self.match = match_string self.matchLen = len(match_string) try: self.firstMatchChar = match_string[0] except IndexError: raise ValueError("null string passed to Keyword; use Empty() instead") self.errmsg = "Expected {} {}".format(type(self).__name__, self.name) self.mayReturnEmpty = False self.mayIndexError = False self.caseless = caseless if caseless: self.caselessmatch = match_string.upper() identChars = identChars.upper() self.identChars = set(identChars) def _generateDefaultName(self): return repr(self.match) def parseImpl(self, instring, loc, doActions=True): errmsg = self.errmsg errloc = loc if self.caseless: if instring[loc : loc + self.matchLen].upper() == self.caselessmatch: if loc == 0 or instring[loc - 1].upper() not in self.identChars: if ( loc >= len(instring) - self.matchLen or instring[loc + self.matchLen].upper() not in self.identChars ): return loc + self.matchLen, self.match else: # followed by keyword char errmsg += ", was immediately followed by keyword character" errloc = loc + self.matchLen else: # preceded by keyword char errmsg += ", keyword was immediately preceded by keyword character" errloc = loc - 1 # else no match just raise plain exception else: if ( instring[loc] == self.firstMatchChar and self.matchLen == 1 or instring.startswith(self.match, loc) ): if loc == 0 or instring[loc - 1] not in self.identChars: if ( loc >= len(instring) - self.matchLen or instring[loc + self.matchLen] not in self.identChars ): return loc + self.matchLen, self.match else: # followed by keyword char errmsg += ( ", keyword was immediately followed by keyword character" ) errloc = loc + self.matchLen else: # preceded by keyword char errmsg += ", keyword was immediately preceded by keyword character" errloc = loc - 1 # else no match just raise plain exception raise ParseException(instring, errloc, errmsg, self) @staticmethod def set_default_keyword_chars(chars) -> None: """ Overrides the default characters used by :class:`Keyword` expressions. """ Keyword.DEFAULT_KEYWORD_CHARS = chars setDefaultKeywordChars = set_default_keyword_chars class CaselessLiteral(Literal): """ Token to match a specified string, ignoring case of letters. Note: the matched results will always be in the case of the given match string, NOT the case of the input text. Example:: CaselessLiteral("CMD")[1, ...].parse_string("cmd CMD Cmd10") # -> ['CMD', 'CMD', 'CMD'] (Contrast with example for :class:`CaselessKeyword`.) """ def __init__(self, match_string: str = "", *, matchString: str = ""): match_string = matchString or match_string super().__init__(match_string.upper()) # Preserve the defining literal. self.returnString = match_string self.errmsg = "Expected " + self.name def parseImpl(self, instring, loc, doActions=True): if instring[loc : loc + self.matchLen].upper() == self.match: return loc + self.matchLen, self.returnString raise ParseException(instring, loc, self.errmsg, self) class CaselessKeyword(Keyword): """ Caseless version of :class:`Keyword`. Example:: CaselessKeyword("CMD")[1, ...].parse_string("cmd CMD Cmd10") # -> ['CMD', 'CMD'] (Contrast with example for :class:`CaselessLiteral`.) """ def __init__( self, match_string: str = "", ident_chars: typing.Optional[str] = None, *, matchString: str = "", identChars: typing.Optional[str] = None, ): identChars = identChars or ident_chars match_string = matchString or match_string super().__init__(match_string, identChars, caseless=True) class CloseMatch(Token): """A variation on :class:`Literal` which matches "close" matches, that is, strings with at most 'n' mismatching characters. :class:`CloseMatch` takes parameters: - ``match_string`` - string to be matched - ``caseless`` - a boolean indicating whether to ignore casing when comparing characters - ``max_mismatches`` - (``default=1``) maximum number of mismatches allowed to count as a match The results from a successful parse will contain the matched text from the input string and the following named results: - ``mismatches`` - a list of the positions within the match_string where mismatches were found - ``original`` - the original match_string used to compare against the input string If ``mismatches`` is an empty list, then the match was an exact match. Example:: patt = CloseMatch("ATCATCGAATGGA") patt.parse_string("ATCATCGAAXGGA") # -> (['ATCATCGAAXGGA'], {'mismatches': [[9]], 'original': ['ATCATCGAATGGA']}) patt.parse_string("ATCAXCGAAXGGA") # -> Exception: Expected 'ATCATCGAATGGA' (with up to 1 mismatches) (at char 0), (line:1, col:1) # exact match patt.parse_string("ATCATCGAATGGA") # -> (['ATCATCGAATGGA'], {'mismatches': [[]], 'original': ['ATCATCGAATGGA']}) # close match allowing up to 2 mismatches patt = CloseMatch("ATCATCGAATGGA", max_mismatches=2) patt.parse_string("ATCAXCGAAXGGA") # -> (['ATCAXCGAAXGGA'], {'mismatches': [[4, 9]], 'original': ['ATCATCGAATGGA']}) """ def __init__( self, match_string: str, max_mismatches: int = None, *, maxMismatches: int = 1, caseless=False, ): maxMismatches = max_mismatches if max_mismatches is not None else maxMismatches super().__init__() self.match_string = match_string self.maxMismatches = maxMismatches self.errmsg = "Expected {!r} (with up to {} mismatches)".format( self.match_string, self.maxMismatches ) self.caseless = caseless self.mayIndexError = False self.mayReturnEmpty = False def _generateDefaultName(self): return "{}:{!r}".format(type(self).__name__, self.match_string) def parseImpl(self, instring, loc, doActions=True): start = loc instrlen = len(instring) maxloc = start + len(self.match_string) if maxloc <= instrlen: match_string = self.match_string match_stringloc = 0 mismatches = [] maxMismatches = self.maxMismatches for match_stringloc, s_m in enumerate( zip(instring[loc:maxloc], match_string) ): src, mat = s_m if self.caseless: src, mat = src.lower(), mat.lower() if src != mat: mismatches.append(match_stringloc) if len(mismatches) > maxMismatches: break else: loc = start + match_stringloc + 1 results = ParseResults([instring[start:loc]]) results["original"] = match_string results["mismatches"] = mismatches return loc, results raise ParseException(instring, loc, self.errmsg, self) class Word(Token): """Token for matching words composed of allowed character sets. Parameters: - ``init_chars`` - string of all characters that should be used to match as a word; "ABC" will match "AAA", "ABAB", "CBAC", etc.; if ``body_chars`` is also specified, then this is the string of initial characters - ``body_chars`` - string of characters that can be used for matching after a matched initial character as given in ``init_chars``; if omitted, same as the initial characters (default=``None``) - ``min`` - minimum number of characters to match (default=1) - ``max`` - maximum number of characters to match (default=0) - ``exact`` - exact number of characters to match (default=0) - ``as_keyword`` - match as a keyword (default=``False``) - ``exclude_chars`` - characters that might be found in the input ``body_chars`` string but which should not be accepted for matching ;useful to define a word of all printables except for one or two characters, for instance (default=``None``) :class:`srange` is useful for defining custom character set strings for defining :class:`Word` expressions, using range notation from regular expression character sets. A common mistake is to use :class:`Word` to match a specific literal string, as in ``Word("Address")``. Remember that :class:`Word` uses the string argument to define *sets* of matchable characters. This expression would match "Add", "AAA", "dAred", or any other word made up of the characters 'A', 'd', 'r', 'e', and 's'. To match an exact literal string, use :class:`Literal` or :class:`Keyword`. pyparsing includes helper strings for building Words: - :class:`alphas` - :class:`nums` - :class:`alphanums` - :class:`hexnums` - :class:`alphas8bit` (alphabetic characters in ASCII range 128-255 - accented, tilded, umlauted, etc.) - :class:`punc8bit` (non-alphabetic characters in ASCII range 128-255 - currency, symbols, superscripts, diacriticals, etc.) - :class:`printables` (any non-whitespace character) ``alphas``, ``nums``, and ``printables`` are also defined in several Unicode sets - see :class:`pyparsing_unicode``. Example:: # a word composed of digits integer = Word(nums) # equivalent to Word("0123456789") or Word(srange("0-9")) # a word with a leading capital, and zero or more lowercase capital_word = Word(alphas.upper(), alphas.lower()) # hostnames are alphanumeric, with leading alpha, and '-' hostname = Word(alphas, alphanums + '-') # roman numeral (not a strict parser, accepts invalid mix of characters) roman = Word("IVXLCDM") # any string of non-whitespace characters, except for ',' csv_value = Word(printables, exclude_chars=",") """ def __init__( self, init_chars: str = "", body_chars: typing.Optional[str] = None, min: int = 1, max: int = 0, exact: int = 0, as_keyword: bool = False, exclude_chars: typing.Optional[str] = None, *, initChars: typing.Optional[str] = None, bodyChars: typing.Optional[str] = None, asKeyword: bool = False, excludeChars: typing.Optional[str] = None, ): initChars = initChars or init_chars bodyChars = bodyChars or body_chars asKeyword = asKeyword or as_keyword excludeChars = excludeChars or exclude_chars super().__init__() if not initChars: raise ValueError( "invalid {}, initChars cannot be empty string".format( type(self).__name__ ) ) initChars = set(initChars) self.initChars = initChars if excludeChars: excludeChars = set(excludeChars) initChars -= excludeChars if bodyChars: bodyChars = set(bodyChars) - excludeChars self.initCharsOrig = "".join(sorted(initChars)) if bodyChars: self.bodyCharsOrig = "".join(sorted(bodyChars)) self.bodyChars = set(bodyChars) else: self.bodyCharsOrig = "".join(sorted(initChars)) self.bodyChars = set(initChars) self.maxSpecified = max > 0 if min < 1: raise ValueError( "cannot specify a minimum length < 1; use Opt(Word()) if zero-length word is permitted" ) self.minLen = min if max > 0: self.maxLen = max else: self.maxLen = _MAX_INT if exact > 0: self.maxLen = exact self.minLen = exact self.errmsg = "Expected " + self.name self.mayIndexError = False self.asKeyword = asKeyword # see if we can make a regex for this Word if " " not in self.initChars | self.bodyChars and (min == 1 and exact == 0): if self.bodyChars == self.initChars: if max == 0: repeat = "+" elif max == 1: repeat = "" else: repeat = "{{{},{}}}".format( self.minLen, "" if self.maxLen == _MAX_INT else self.maxLen ) self.reString = "[{}]{}".format( _collapse_string_to_ranges(self.initChars), repeat, ) elif len(self.initChars) == 1: if max == 0: repeat = "*" else: repeat = "{{0,{}}}".format(max - 1) self.reString = "{}[{}]{}".format( re.escape(self.initCharsOrig), _collapse_string_to_ranges(self.bodyChars), repeat, ) else: if max == 0: repeat = "*" elif max == 2: repeat = "" else: repeat = "{{0,{}}}".format(max - 1) self.reString = "[{}][{}]{}".format( _collapse_string_to_ranges(self.initChars), _collapse_string_to_ranges(self.bodyChars), repeat, ) if self.asKeyword: self.reString = r"\b" + self.reString + r"\b" try: self.re = re.compile(self.reString) except re.error: self.re = None else: self.re_match = self.re.match self.__class__ = _WordRegex def _generateDefaultName(self): def charsAsStr(s): max_repr_len = 16 s = _collapse_string_to_ranges(s, re_escape=False) if len(s) > max_repr_len: return s[: max_repr_len - 3] + "..." else: return s if self.initChars != self.bodyChars: base = "W:({}, {})".format( charsAsStr(self.initChars), charsAsStr(self.bodyChars) ) else: base = "W:({})".format(charsAsStr(self.initChars)) # add length specification if self.minLen > 1 or self.maxLen != _MAX_INT: if self.minLen == self.maxLen: if self.minLen == 1: return base[2:] else: return base + "{{{}}}".format(self.minLen) elif self.maxLen == _MAX_INT: return base + "{{{},...}}".format(self.minLen) else: return base + "{{{},{}}}".format(self.minLen, self.maxLen) return base def parseImpl(self, instring, loc, doActions=True): if instring[loc] not in self.initChars: raise ParseException(instring, loc, self.errmsg, self) start = loc loc += 1 instrlen = len(instring) bodychars = self.bodyChars maxloc = start + self.maxLen maxloc = min(maxloc, instrlen) while loc < maxloc and instring[loc] in bodychars: loc += 1 throwException = False if loc - start < self.minLen: throwException = True elif self.maxSpecified and loc < instrlen and instring[loc] in bodychars: throwException = True elif self.asKeyword: if ( start > 0 and instring[start - 1] in bodychars or loc < instrlen and instring[loc] in bodychars ): throwException = True if throwException: raise ParseException(instring, loc, self.errmsg, self) return loc, instring[start:loc] class _WordRegex(Word): def parseImpl(self, instring, loc, doActions=True): result = self.re_match(instring, loc) if not result: raise ParseException(instring, loc, self.errmsg, self) loc = result.end() return loc, result.group() class Char(_WordRegex): """A short-cut class for defining :class:`Word` ``(characters, exact=1)``, when defining a match of any single character in a string of characters. """ def __init__( self, charset: str, as_keyword: bool = False, exclude_chars: typing.Optional[str] = None, *, asKeyword: bool = False, excludeChars: typing.Optional[str] = None, ): asKeyword = asKeyword or as_keyword excludeChars = excludeChars or exclude_chars super().__init__( charset, exact=1, asKeyword=asKeyword, excludeChars=excludeChars ) self.reString = "[{}]".format(_collapse_string_to_ranges(self.initChars)) if asKeyword: self.reString = r"\b{}\b".format(self.reString) self.re = re.compile(self.reString) self.re_match = self.re.match class Regex(Token): r"""Token for matching strings that match a given regular expression. Defined with string specifying the regular expression in a form recognized by the stdlib Python `re module `_. If the given regex contains named groups (defined using ``(?P...)``), these will be preserved as named :class:`ParseResults`. If instead of the Python stdlib ``re`` module you wish to use a different RE module (such as the ``regex`` module), you can do so by building your ``Regex`` object with a compiled RE that was compiled using ``regex``. Example:: realnum = Regex(r"[+-]?\d+\.\d*") # ref: https://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression roman = Regex(r"M{0,4}(CM|CD|D?{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})") # named fields in a regex will be returned as named results date = Regex(r'(?P\d{4})-(?P\d\d?)-(?P\d\d?)') # the Regex class will accept re's compiled using the regex module import regex parser = pp.Regex(regex.compile(r'[0-9]')) """ def __init__( self, pattern: Any, flags: Union[re.RegexFlag, int] = 0, as_group_list: bool = False, as_match: bool = False, *, asGroupList: bool = False, asMatch: bool = False, ): """The parameters ``pattern`` and ``flags`` are passed to the ``re.compile()`` function as-is. See the Python `re module `_ module for an explanation of the acceptable patterns and flags. """ super().__init__() asGroupList = asGroupList or as_group_list asMatch = asMatch or as_match if isinstance(pattern, str_type): if not pattern: raise ValueError("null string passed to Regex; use Empty() instead") self._re = None self.reString = self.pattern = pattern self.flags = flags elif hasattr(pattern, "pattern") and hasattr(pattern, "match"): self._re = pattern self.pattern = self.reString = pattern.pattern self.flags = flags else: raise TypeError( "Regex may only be constructed with a string or a compiled RE object" ) self.errmsg = "Expected " + self.name self.mayIndexError = False self.asGroupList = asGroupList self.asMatch = asMatch if self.asGroupList: self.parseImpl = self.parseImplAsGroupList if self.asMatch: self.parseImpl = self.parseImplAsMatch @cached_property def re(self): if self._re: return self._re else: try: return re.compile(self.pattern, self.flags) except re.error: raise ValueError( "invalid pattern ({!r}) passed to Regex".format(self.pattern) ) @cached_property def re_match(self): return self.re.match @cached_property def mayReturnEmpty(self): return self.re_match("") is not None def _generateDefaultName(self): return "Re:({})".format(repr(self.pattern).replace("\\\\", "\\")) def parseImpl(self, instring, loc, doActions=True): result = self.re_match(instring, loc) if not result: raise ParseException(instring, loc, self.errmsg, self) loc = result.end() ret = ParseResults(result.group()) d = result.groupdict() if d: for k, v in d.items(): ret[k] = v return loc, ret def parseImplAsGroupList(self, instring, loc, doActions=True): result = self.re_match(instring, loc) if not result: raise ParseException(instring, loc, self.errmsg, self) loc = result.end() ret = result.groups() return loc, ret def parseImplAsMatch(self, instring, loc, doActions=True): result = self.re_match(instring, loc) if not result: raise ParseException(instring, loc, self.errmsg, self) loc = result.end() ret = result return loc, ret def sub(self, repl: str) -> ParserElement: r""" Return :class:`Regex` with an attached parse action to transform the parsed result as if called using `re.sub(expr, repl, string) `_. Example:: make_html = Regex(r"(\w+):(.*?):").sub(r"<\1>\2") print(make_html.transform_string("h1:main title:")) # prints "

main title

" """ if self.asGroupList: raise TypeError("cannot use sub() with Regex(asGroupList=True)") if self.asMatch and callable(repl): raise TypeError("cannot use sub() with a callable with Regex(asMatch=True)") if self.asMatch: def pa(tokens): return tokens[0].expand(repl) else: def pa(tokens): return self.re.sub(repl, tokens[0]) return self.add_parse_action(pa) class QuotedString(Token): r""" Token for matching strings that are delimited by quoting characters. Defined with the following parameters: - ``quote_char`` - string of one or more characters defining the quote delimiting string - ``esc_char`` - character to re_escape quotes, typically backslash (default= ``None``) - ``esc_quote`` - special quote sequence to re_escape an embedded quote string (such as SQL's ``""`` to re_escape an embedded ``"``) (default= ``None``) - ``multiline`` - boolean indicating whether quotes can span multiple lines (default= ``False``) - ``unquote_results`` - boolean indicating whether the matched text should be unquoted (default= ``True``) - ``end_quote_char`` - string of one or more characters defining the end of the quote delimited string (default= ``None`` => same as quote_char) - ``convert_whitespace_escapes`` - convert escaped whitespace (``'\t'``, ``'\n'``, etc.) to actual whitespace (default= ``True``) Example:: qs = QuotedString('"') print(qs.search_string('lsjdf "This is the quote" sldjf')) complex_qs = QuotedString('{{', end_quote_char='}}') print(complex_qs.search_string('lsjdf {{This is the "quote"}} sldjf')) sql_qs = QuotedString('"', esc_quote='""') print(sql_qs.search_string('lsjdf "This is the quote with ""embedded"" quotes" sldjf')) prints:: [['This is the quote']] [['This is the "quote"']] [['This is the quote with "embedded" quotes']] """ ws_map = ((r"\t", "\t"), (r"\n", "\n"), (r"\f", "\f"), (r"\r", "\r")) def __init__( self, quote_char: str = "", esc_char: typing.Optional[str] = None, esc_quote: typing.Optional[str] = None, multiline: bool = False, unquote_results: bool = True, end_quote_char: typing.Optional[str] = None, convert_whitespace_escapes: bool = True, *, quoteChar: str = "", escChar: typing.Optional[str] = None, escQuote: typing.Optional[str] = None, unquoteResults: bool = True, endQuoteChar: typing.Optional[str] = None, convertWhitespaceEscapes: bool = True, ): super().__init__() escChar = escChar or esc_char escQuote = escQuote or esc_quote unquoteResults = unquoteResults and unquote_results endQuoteChar = endQuoteChar or end_quote_char convertWhitespaceEscapes = ( convertWhitespaceEscapes and convert_whitespace_escapes ) quote_char = quoteChar or quote_char # remove white space from quote chars - wont work anyway quote_char = quote_char.strip() if not quote_char: raise ValueError("quote_char cannot be the empty string") if endQuoteChar is None: endQuoteChar = quote_char else: endQuoteChar = endQuoteChar.strip() if not endQuoteChar: raise ValueError("endQuoteChar cannot be the empty string") self.quoteChar = quote_char self.quoteCharLen = len(quote_char) self.firstQuoteChar = quote_char[0] self.endQuoteChar = endQuoteChar self.endQuoteCharLen = len(endQuoteChar) self.escChar = escChar self.escQuote = escQuote self.unquoteResults = unquoteResults self.convertWhitespaceEscapes = convertWhitespaceEscapes sep = "" inner_pattern = "" if escQuote: inner_pattern += r"{}(?:{})".format(sep, re.escape(escQuote)) sep = "|" if escChar: inner_pattern += r"{}(?:{}.)".format(sep, re.escape(escChar)) sep = "|" self.escCharReplacePattern = re.escape(self.escChar) + "(.)" if len(self.endQuoteChar) > 1: inner_pattern += ( "{}(?:".format(sep) + "|".join( "(?:{}(?!{}))".format( re.escape(self.endQuoteChar[:i]), re.escape(self.endQuoteChar[i:]), ) for i in range(len(self.endQuoteChar) - 1, 0, -1) ) + ")" ) sep = "|" if multiline: self.flags = re.MULTILINE | re.DOTALL inner_pattern += r"{}(?:[^{}{}])".format( sep, _escape_regex_range_chars(self.endQuoteChar[0]), (_escape_regex_range_chars(escChar) if escChar is not None else ""), ) else: self.flags = 0 inner_pattern += r"{}(?:[^{}\n\r{}])".format( sep, _escape_regex_range_chars(self.endQuoteChar[0]), (_escape_regex_range_chars(escChar) if escChar is not None else ""), ) self.pattern = "".join( [ re.escape(self.quoteChar), "(?:", inner_pattern, ")*", re.escape(self.endQuoteChar), ] ) try: self.re = re.compile(self.pattern, self.flags) self.reString = self.pattern self.re_match = self.re.match except re.error: raise ValueError( "invalid pattern {!r} passed to Regex".format(self.pattern) ) self.errmsg = "Expected " + self.name self.mayIndexError = False self.mayReturnEmpty = True def _generateDefaultName(self): if self.quoteChar == self.endQuoteChar and isinstance(self.quoteChar, str_type): return "string enclosed in {!r}".format(self.quoteChar) return "quoted string, starting with {} ending with {}".format( self.quoteChar, self.endQuoteChar ) def parseImpl(self, instring, loc, doActions=True): result = ( instring[loc] == self.firstQuoteChar and self.re_match(instring, loc) or None ) if not result: raise ParseException(instring, loc, self.errmsg, self) loc = result.end() ret = result.group() if self.unquoteResults: # strip off quotes ret = ret[self.quoteCharLen : -self.endQuoteCharLen] if isinstance(ret, str_type): # replace escaped whitespace if "\\" in ret and self.convertWhitespaceEscapes: for wslit, wschar in self.ws_map: ret = ret.replace(wslit, wschar) # replace escaped characters if self.escChar: ret = re.sub(self.escCharReplacePattern, r"\g<1>", ret) # replace escaped quotes if self.escQuote: ret = ret.replace(self.escQuote, self.endQuoteChar) return loc, ret class CharsNotIn(Token): """Token for matching words composed of characters *not* in a given set (will include whitespace in matched characters if not listed in the provided exclusion set - see example). Defined with string containing all disallowed characters, and an optional minimum, maximum, and/or exact length. The default value for ``min`` is 1 (a minimum value < 1 is not valid); the default values for ``max`` and ``exact`` are 0, meaning no maximum or exact length restriction. Example:: # define a comma-separated-value as anything that is not a ',' csv_value = CharsNotIn(',') print(delimited_list(csv_value).parse_string("dkls,lsdkjf,s12 34,@!#,213")) prints:: ['dkls', 'lsdkjf', 's12 34', '@!#', '213'] """ def __init__( self, not_chars: str = "", min: int = 1, max: int = 0, exact: int = 0, *, notChars: str = "", ): super().__init__() self.skipWhitespace = False self.notChars = not_chars or notChars self.notCharsSet = set(self.notChars) if min < 1: raise ValueError( "cannot specify a minimum length < 1; use " "Opt(CharsNotIn()) if zero-length char group is permitted" ) self.minLen = min if max > 0: self.maxLen = max else: self.maxLen = _MAX_INT if exact > 0: self.maxLen = exact self.minLen = exact self.errmsg = "Expected " + self.name self.mayReturnEmpty = self.minLen == 0 self.mayIndexError = False def _generateDefaultName(self): not_chars_str = _collapse_string_to_ranges(self.notChars) if len(not_chars_str) > 16: return "!W:({}...)".format(self.notChars[: 16 - 3]) else: return "!W:({})".format(self.notChars) def parseImpl(self, instring, loc, doActions=True): notchars = self.notCharsSet if instring[loc] in notchars: raise ParseException(instring, loc, self.errmsg, self) start = loc loc += 1 maxlen = min(start + self.maxLen, len(instring)) while loc < maxlen and instring[loc] not in notchars: loc += 1 if loc - start < self.minLen: raise ParseException(instring, loc, self.errmsg, self) return loc, instring[start:loc] class White(Token): """Special matching class for matching whitespace. Normally, whitespace is ignored by pyparsing grammars. This class is included when some whitespace structures are significant. Define with a string containing the whitespace characters to be matched; default is ``" \\t\\r\\n"``. Also takes optional ``min``, ``max``, and ``exact`` arguments, as defined for the :class:`Word` class. """ whiteStrs = { " ": "", "\t": "", "\n": "", "\r": "", "\f": "", "\u00A0": "", "\u1680": "", "\u180E": "", "\u2000": "", "\u2001": "", "\u2002": "", "\u2003": "", "\u2004": "", "\u2005": "", "\u2006": "", "\u2007": "", "\u2008": "", "\u2009": "", "\u200A": "", "\u200B": "", "\u202F": "", "\u205F": "", "\u3000": "", } def __init__(self, ws: str = " \t\r\n", min: int = 1, max: int = 0, exact: int = 0): super().__init__() self.matchWhite = ws self.set_whitespace_chars( "".join(c for c in self.whiteStrs if c not in self.matchWhite), copy_defaults=True, ) # self.leave_whitespace() self.mayReturnEmpty = True self.errmsg = "Expected " + self.name self.minLen = min if max > 0: self.maxLen = max else: self.maxLen = _MAX_INT if exact > 0: self.maxLen = exact self.minLen = exact def _generateDefaultName(self): return "".join(White.whiteStrs[c] for c in self.matchWhite) def parseImpl(self, instring, loc, doActions=True): if instring[loc] not in self.matchWhite: raise ParseException(instring, loc, self.errmsg, self) start = loc loc += 1 maxloc = start + self.maxLen maxloc = min(maxloc, len(instring)) while loc < maxloc and instring[loc] in self.matchWhite: loc += 1 if loc - start < self.minLen: raise ParseException(instring, loc, self.errmsg, self) return loc, instring[start:loc] class PositionToken(Token): def __init__(self): super().__init__() self.mayReturnEmpty = True self.mayIndexError = False class GoToColumn(PositionToken): """Token to advance to a specific column of input text; useful for tabular report scraping. """ def __init__(self, colno: int): super().__init__() self.col = colno def preParse(self, instring, loc): if col(loc, instring) != self.col: instrlen = len(instring) if self.ignoreExprs: loc = self._skipIgnorables(instring, loc) while ( loc < instrlen and instring[loc].isspace() and col(loc, instring) != self.col ): loc += 1 return loc def parseImpl(self, instring, loc, doActions=True): thiscol = col(loc, instring) if thiscol > self.col: raise ParseException(instring, loc, "Text not in expected column", self) newloc = loc + self.col - thiscol ret = instring[loc:newloc] return newloc, ret class LineStart(PositionToken): r"""Matches if current position is at the beginning of a line within the parse string Example:: test = '''\ AAA this line AAA and this line AAA but not this one B AAA and definitely not this one ''' for t in (LineStart() + 'AAA' + restOfLine).search_string(test): print(t) prints:: ['AAA', ' this line'] ['AAA', ' and this line'] """ def __init__(self): super().__init__() self.leave_whitespace() self.orig_whiteChars = set() | self.whiteChars self.whiteChars.discard("\n") self.skipper = Empty().set_whitespace_chars(self.whiteChars) self.errmsg = "Expected start of line" def preParse(self, instring, loc): if loc == 0: return loc else: ret = self.skipper.preParse(instring, loc) if "\n" in self.orig_whiteChars: while instring[ret : ret + 1] == "\n": ret = self.skipper.preParse(instring, ret + 1) return ret def parseImpl(self, instring, loc, doActions=True): if col(loc, instring) == 1: return loc, [] raise ParseException(instring, loc, self.errmsg, self) class LineEnd(PositionToken): """Matches if current position is at the end of a line within the parse string """ def __init__(self): super().__init__() self.whiteChars.discard("\n") self.set_whitespace_chars(self.whiteChars, copy_defaults=False) self.errmsg = "Expected end of line" def parseImpl(self, instring, loc, doActions=True): if loc < len(instring): if instring[loc] == "\n": return loc + 1, "\n" else: raise ParseException(instring, loc, self.errmsg, self) elif loc == len(instring): return loc + 1, [] else: raise ParseException(instring, loc, self.errmsg, self) class StringStart(PositionToken): """Matches if current position is at the beginning of the parse string """ def __init__(self): super().__init__() self.errmsg = "Expected start of text" def parseImpl(self, instring, loc, doActions=True): if loc != 0: # see if entire string up to here is just whitespace and ignoreables if loc != self.preParse(instring, 0): raise ParseException(instring, loc, self.errmsg, self) return loc, [] class StringEnd(PositionToken): """ Matches if current position is at the end of the parse string """ def __init__(self): super().__init__() self.errmsg = "Expected end of text" def parseImpl(self, instring, loc, doActions=True): if loc < len(instring): raise ParseException(instring, loc, self.errmsg, self) elif loc == len(instring): return loc + 1, [] elif loc > len(instring): return loc, [] else: raise ParseException(instring, loc, self.errmsg, self) class WordStart(PositionToken): """Matches if the current position is at the beginning of a :class:`Word`, and is not preceded by any character in a given set of ``word_chars`` (default= ``printables``). To emulate the ``\b`` behavior of regular expressions, use ``WordStart(alphanums)``. ``WordStart`` will also match at the beginning of the string being parsed, or at the beginning of a line. """ def __init__(self, word_chars: str = printables, *, wordChars: str = printables): wordChars = word_chars if wordChars == printables else wordChars super().__init__() self.wordChars = set(wordChars) self.errmsg = "Not at the start of a word" def parseImpl(self, instring, loc, doActions=True): if loc != 0: if ( instring[loc - 1] in self.wordChars or instring[loc] not in self.wordChars ): raise ParseException(instring, loc, self.errmsg, self) return loc, [] class WordEnd(PositionToken): """Matches if the current position is at the end of a :class:`Word`, and is not followed by any character in a given set of ``word_chars`` (default= ``printables``). To emulate the ``\b`` behavior of regular expressions, use ``WordEnd(alphanums)``. ``WordEnd`` will also match at the end of the string being parsed, or at the end of a line. """ def __init__(self, word_chars: str = printables, *, wordChars: str = printables): wordChars = word_chars if wordChars == printables else wordChars super().__init__() self.wordChars = set(wordChars) self.skipWhitespace = False self.errmsg = "Not at the end of a word" def parseImpl(self, instring, loc, doActions=True): instrlen = len(instring) if instrlen > 0 and loc < instrlen: if ( instring[loc] in self.wordChars or instring[loc - 1] not in self.wordChars ): raise ParseException(instring, loc, self.errmsg, self) return loc, [] class ParseExpression(ParserElement): """Abstract subclass of ParserElement, for combining and post-processing parsed tokens. """ def __init__(self, exprs: typing.Iterable[ParserElement], savelist: bool = False): super().__init__(savelist) self.exprs: List[ParserElement] if isinstance(exprs, _generatorType): exprs = list(exprs) if isinstance(exprs, str_type): self.exprs = [self._literalStringClass(exprs)] elif isinstance(exprs, ParserElement): self.exprs = [exprs] elif isinstance(exprs, Iterable): exprs = list(exprs) # if sequence of strings provided, wrap with Literal if any(isinstance(expr, str_type) for expr in exprs): exprs = ( self._literalStringClass(e) if isinstance(e, str_type) else e for e in exprs ) self.exprs = list(exprs) else: try: self.exprs = list(exprs) except TypeError: self.exprs = [exprs] self.callPreparse = False def recurse(self) -> Sequence[ParserElement]: return self.exprs[:] def append(self, other) -> ParserElement: self.exprs.append(other) self._defaultName = None return self def leave_whitespace(self, recursive: bool = True) -> ParserElement: """ Extends ``leave_whitespace`` defined in base class, and also invokes ``leave_whitespace`` on all contained expressions. """ super().leave_whitespace(recursive) if recursive: self.exprs = [e.copy() for e in self.exprs] for e in self.exprs: e.leave_whitespace(recursive) return self def ignore_whitespace(self, recursive: bool = True) -> ParserElement: """ Extends ``ignore_whitespace`` defined in base class, and also invokes ``leave_whitespace`` on all contained expressions. """ super().ignore_whitespace(recursive) if recursive: self.exprs = [e.copy() for e in self.exprs] for e in self.exprs: e.ignore_whitespace(recursive) return self def ignore(self, other) -> ParserElement: if isinstance(other, Suppress): if other not in self.ignoreExprs: super().ignore(other) for e in self.exprs: e.ignore(self.ignoreExprs[-1]) else: super().ignore(other) for e in self.exprs: e.ignore(self.ignoreExprs[-1]) return self def _generateDefaultName(self): return "{}:({})".format(self.__class__.__name__, str(self.exprs)) def streamline(self) -> ParserElement: if self.streamlined: return self super().streamline() for e in self.exprs: e.streamline() # collapse nested :class:`And`'s of the form ``And(And(And(a, b), c), d)`` to ``And(a, b, c, d)`` # but only if there are no parse actions or resultsNames on the nested And's # (likewise for :class:`Or`'s and :class:`MatchFirst`'s) if len(self.exprs) == 2: other = self.exprs[0] if ( isinstance(other, self.__class__) and not other.parseAction and other.resultsName is None and not other.debug ): self.exprs = other.exprs[:] + [self.exprs[1]] self._defaultName = None self.mayReturnEmpty |= other.mayReturnEmpty self.mayIndexError |= other.mayIndexError other = self.exprs[-1] if ( isinstance(other, self.__class__) and not other.parseAction and other.resultsName is None and not other.debug ): self.exprs = self.exprs[:-1] + other.exprs[:] self._defaultName = None self.mayReturnEmpty |= other.mayReturnEmpty self.mayIndexError |= other.mayIndexError self.errmsg = "Expected " + str(self) return self def validate(self, validateTrace=None) -> None: tmp = (validateTrace if validateTrace is not None else [])[:] + [self] for e in self.exprs: e.validate(tmp) self._checkRecursion([]) def copy(self) -> ParserElement: ret = super().copy() ret.exprs = [e.copy() for e in self.exprs] return ret def _setResultsName(self, name, listAllMatches=False): if ( __diag__.warn_ungrouped_named_tokens_in_collection and Diagnostics.warn_ungrouped_named_tokens_in_collection not in self.suppress_warnings_ ): for e in self.exprs: if ( isinstance(e, ParserElement) and e.resultsName and Diagnostics.warn_ungrouped_named_tokens_in_collection not in e.suppress_warnings_ ): warnings.warn( "{}: setting results name {!r} on {} expression " "collides with {!r} on contained expression".format( "warn_ungrouped_named_tokens_in_collection", name, type(self).__name__, e.resultsName, ), stacklevel=3, ) return super()._setResultsName(name, listAllMatches) ignoreWhitespace = ignore_whitespace leaveWhitespace = leave_whitespace class And(ParseExpression): """ Requires all given :class:`ParseExpression` s to be found in the given order. Expressions may be separated by whitespace. May be constructed using the ``'+'`` operator. May also be constructed using the ``'-'`` operator, which will suppress backtracking. Example:: integer = Word(nums) name_expr = Word(alphas)[1, ...] expr = And([integer("id"), name_expr("name"), integer("age")]) # more easily written as: expr = integer("id") + name_expr("name") + integer("age") """ class _ErrorStop(Empty): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.leave_whitespace() def _generateDefaultName(self): return "-" def __init__( self, exprs_arg: typing.Iterable[ParserElement], savelist: bool = True ): exprs: List[ParserElement] = list(exprs_arg) if exprs and Ellipsis in exprs: tmp = [] for i, expr in enumerate(exprs): if expr is Ellipsis: if i < len(exprs) - 1: skipto_arg: ParserElement = (Empty() + exprs[i + 1]).exprs[-1] tmp.append(SkipTo(skipto_arg)("_skipped*")) else: raise Exception( "cannot construct And with sequence ending in ..." ) else: tmp.append(expr) exprs[:] = tmp super().__init__(exprs, savelist) if self.exprs: self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs) if not isinstance(self.exprs[0], White): self.set_whitespace_chars( self.exprs[0].whiteChars, copy_defaults=self.exprs[0].copyDefaultWhiteChars, ) self.skipWhitespace = self.exprs[0].skipWhitespace else: self.skipWhitespace = False else: self.mayReturnEmpty = True self.callPreparse = True def streamline(self) -> ParserElement: # collapse any _PendingSkip's if self.exprs: if any( isinstance(e, ParseExpression) and e.exprs and isinstance(e.exprs[-1], _PendingSkip) for e in self.exprs[:-1] ): for i, e in enumerate(self.exprs[:-1]): if e is None: continue if ( isinstance(e, ParseExpression) and e.exprs and isinstance(e.exprs[-1], _PendingSkip) ): e.exprs[-1] = e.exprs[-1] + self.exprs[i + 1] self.exprs[i + 1] = None self.exprs = [e for e in self.exprs if e is not None] super().streamline() # link any IndentedBlocks to the prior expression for prev, cur in zip(self.exprs, self.exprs[1:]): # traverse cur or any first embedded expr of cur looking for an IndentedBlock # (but watch out for recursive grammar) seen = set() while cur: if id(cur) in seen: break seen.add(id(cur)) if isinstance(cur, IndentedBlock): prev.add_parse_action( lambda s, l, t, cur_=cur: setattr( cur_, "parent_anchor", col(l, s) ) ) break subs = cur.recurse() cur = next(iter(subs), None) self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs) return self def parseImpl(self, instring, loc, doActions=True): # pass False as callPreParse arg to _parse for first element, since we already # pre-parsed the string as part of our And pre-parsing loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False ) errorStop = False for e in self.exprs[1:]: # if isinstance(e, And._ErrorStop): if type(e) is And._ErrorStop: errorStop = True continue if errorStop: try: loc, exprtokens = e._parse(instring, loc, doActions) except ParseSyntaxException: raise except ParseBaseException as pe: pe.__traceback__ = None raise ParseSyntaxException._from_exception(pe) except IndexError: raise ParseSyntaxException( instring, len(instring), self.errmsg, self ) else: loc, exprtokens = e._parse(instring, loc, doActions) if exprtokens or exprtokens.haskeys(): resultlist += exprtokens return loc, resultlist def __iadd__(self, other): if isinstance(other, str_type): other = self._literalStringClass(other) return self.append(other) # And([self, other]) def _checkRecursion(self, parseElementList): subRecCheckList = parseElementList[:] + [self] for e in self.exprs: e._checkRecursion(subRecCheckList) if not e.mayReturnEmpty: break def _generateDefaultName(self): inner = " ".join(str(e) for e in self.exprs) # strip off redundant inner {}'s while len(inner) > 1 and inner[0 :: len(inner) - 1] == "{}": inner = inner[1:-1] return "{" + inner + "}" class Or(ParseExpression): """Requires that at least one :class:`ParseExpression` is found. If two expressions match, the expression that matches the longest string will be used. May be constructed using the ``'^'`` operator. Example:: # construct Or using '^' operator number = Word(nums) ^ Combine(Word(nums) + '.' + Word(nums)) print(number.search_string("123 3.1416 789")) prints:: [['123'], ['3.1416'], ['789']] """ def __init__(self, exprs: typing.Iterable[ParserElement], savelist: bool = False): super().__init__(exprs, savelist) if self.exprs: self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs) self.skipWhitespace = all(e.skipWhitespace for e in self.exprs) else: self.mayReturnEmpty = True def streamline(self) -> ParserElement: super().streamline() if self.exprs: self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs) self.saveAsList = any(e.saveAsList for e in self.exprs) self.skipWhitespace = all( e.skipWhitespace and not isinstance(e, White) for e in self.exprs ) else: self.saveAsList = False return self def parseImpl(self, instring, loc, doActions=True): maxExcLoc = -1 maxException = None matches = [] fatals = [] if all(e.callPreparse for e in self.exprs): loc = self.preParse(instring, loc) for e in self.exprs: try: loc2 = e.try_parse(instring, loc, raise_fatal=True) except ParseFatalException as pfe: pfe.__traceback__ = None pfe.parserElement = e fatals.append(pfe) maxException = None maxExcLoc = -1 except ParseException as err: if not fatals: err.__traceback__ = None if err.loc > maxExcLoc: maxException = err maxExcLoc = err.loc except IndexError: if len(instring) > maxExcLoc: maxException = ParseException( instring, len(instring), e.errmsg, self ) maxExcLoc = len(instring) else: # save match among all matches, to retry longest to shortest matches.append((loc2, e)) if matches: # re-evaluate all matches in descending order of length of match, in case attached actions # might change whether or how much they match of the input. matches.sort(key=itemgetter(0), reverse=True) if not doActions: # no further conditions or parse actions to change the selection of # alternative, so the first match will be the best match best_expr = matches[0][1] return best_expr._parse(instring, loc, doActions) longest = -1, None for loc1, expr1 in matches: if loc1 <= longest[0]: # already have a longer match than this one will deliver, we are done return longest try: loc2, toks = expr1._parse(instring, loc, doActions) except ParseException as err: err.__traceback__ = None if err.loc > maxExcLoc: maxException = err maxExcLoc = err.loc else: if loc2 >= loc1: return loc2, toks # didn't match as much as before elif loc2 > longest[0]: longest = loc2, toks if longest != (-1, None): return longest if fatals: if len(fatals) > 1: fatals.sort(key=lambda e: -e.loc) if fatals[0].loc == fatals[1].loc: fatals.sort(key=lambda e: (-e.loc, -len(str(e.parserElement)))) max_fatal = fatals[0] raise max_fatal if maxException is not None: maxException.msg = self.errmsg raise maxException else: raise ParseException( instring, loc, "no defined alternatives to match", self ) def __ixor__(self, other): if isinstance(other, str_type): other = self._literalStringClass(other) return self.append(other) # Or([self, other]) def _generateDefaultName(self): return "{" + " ^ ".join(str(e) for e in self.exprs) + "}" def _setResultsName(self, name, listAllMatches=False): if ( __diag__.warn_multiple_tokens_in_named_alternation and Diagnostics.warn_multiple_tokens_in_named_alternation not in self.suppress_warnings_ ): if any( isinstance(e, And) and Diagnostics.warn_multiple_tokens_in_named_alternation not in e.suppress_warnings_ for e in self.exprs ): warnings.warn( "{}: setting results name {!r} on {} expression " "will return a list of all parsed tokens in an And alternative, " "in prior versions only the first token was returned; enclose " "contained argument in Group".format( "warn_multiple_tokens_in_named_alternation", name, type(self).__name__, ), stacklevel=3, ) return super()._setResultsName(name, listAllMatches) class MatchFirst(ParseExpression): """Requires that at least one :class:`ParseExpression` is found. If more than one expression matches, the first one listed is the one that will match. May be constructed using the ``'|'`` operator. Example:: # construct MatchFirst using '|' operator # watch the order of expressions to match number = Word(nums) | Combine(Word(nums) + '.' + Word(nums)) print(number.search_string("123 3.1416 789")) # Fail! -> [['123'], ['3'], ['1416'], ['789']] # put more selective expression first number = Combine(Word(nums) + '.' + Word(nums)) | Word(nums) print(number.search_string("123 3.1416 789")) # Better -> [['123'], ['3.1416'], ['789']] """ def __init__(self, exprs: typing.Iterable[ParserElement], savelist: bool = False): super().__init__(exprs, savelist) if self.exprs: self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs) self.skipWhitespace = all(e.skipWhitespace for e in self.exprs) else: self.mayReturnEmpty = True def streamline(self) -> ParserElement: if self.streamlined: return self super().streamline() if self.exprs: self.saveAsList = any(e.saveAsList for e in self.exprs) self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs) self.skipWhitespace = all( e.skipWhitespace and not isinstance(e, White) for e in self.exprs ) else: self.saveAsList = False self.mayReturnEmpty = True return self def parseImpl(self, instring, loc, doActions=True): maxExcLoc = -1 maxException = None for e in self.exprs: try: return e._parse( instring, loc, doActions, ) except ParseFatalException as pfe: pfe.__traceback__ = None pfe.parserElement = e raise except ParseException as err: if err.loc > maxExcLoc: maxException = err maxExcLoc = err.loc except IndexError: if len(instring) > maxExcLoc: maxException = ParseException( instring, len(instring), e.errmsg, self ) maxExcLoc = len(instring) if maxException is not None: maxException.msg = self.errmsg raise maxException else: raise ParseException( instring, loc, "no defined alternatives to match", self ) def __ior__(self, other): if isinstance(other, str_type): other = self._literalStringClass(other) return self.append(other) # MatchFirst([self, other]) def _generateDefaultName(self): return "{" + " | ".join(str(e) for e in self.exprs) + "}" def _setResultsName(self, name, listAllMatches=False): if ( __diag__.warn_multiple_tokens_in_named_alternation and Diagnostics.warn_multiple_tokens_in_named_alternation not in self.suppress_warnings_ ): if any( isinstance(e, And) and Diagnostics.warn_multiple_tokens_in_named_alternation not in e.suppress_warnings_ for e in self.exprs ): warnings.warn( "{}: setting results name {!r} on {} expression " "will return a list of all parsed tokens in an And alternative, " "in prior versions only the first token was returned; enclose " "contained argument in Group".format( "warn_multiple_tokens_in_named_alternation", name, type(self).__name__, ), stacklevel=3, ) return super()._setResultsName(name, listAllMatches) class Each(ParseExpression): """Requires all given :class:`ParseExpression` s to be found, but in any order. Expressions may be separated by whitespace. May be constructed using the ``'&'`` operator. Example:: color = one_of("RED ORANGE YELLOW GREEN BLUE PURPLE BLACK WHITE BROWN") shape_type = one_of("SQUARE CIRCLE TRIANGLE STAR HEXAGON OCTAGON") integer = Word(nums) shape_attr = "shape:" + shape_type("shape") posn_attr = "posn:" + Group(integer("x") + ',' + integer("y"))("posn") color_attr = "color:" + color("color") size_attr = "size:" + integer("size") # use Each (using operator '&') to accept attributes in any order # (shape and posn are required, color and size are optional) shape_spec = shape_attr & posn_attr & Opt(color_attr) & Opt(size_attr) shape_spec.run_tests(''' shape: SQUARE color: BLACK posn: 100, 120 shape: CIRCLE size: 50 color: BLUE posn: 50,80 color:GREEN size:20 shape:TRIANGLE posn:20,40 ''' ) prints:: shape: SQUARE color: BLACK posn: 100, 120 ['shape:', 'SQUARE', 'color:', 'BLACK', 'posn:', ['100', ',', '120']] - color: BLACK - posn: ['100', ',', '120'] - x: 100 - y: 120 - shape: SQUARE shape: CIRCLE size: 50 color: BLUE posn: 50,80 ['shape:', 'CIRCLE', 'size:', '50', 'color:', 'BLUE', 'posn:', ['50', ',', '80']] - color: BLUE - posn: ['50', ',', '80'] - x: 50 - y: 80 - shape: CIRCLE - size: 50 color: GREEN size: 20 shape: TRIANGLE posn: 20,40 ['color:', 'GREEN', 'size:', '20', 'shape:', 'TRIANGLE', 'posn:', ['20', ',', '40']] - color: GREEN - posn: ['20', ',', '40'] - x: 20 - y: 40 - shape: TRIANGLE - size: 20 """ def __init__(self, exprs: typing.Iterable[ParserElement], savelist: bool = True): super().__init__(exprs, savelist) if self.exprs: self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs) else: self.mayReturnEmpty = True self.skipWhitespace = True self.initExprGroups = True self.saveAsList = True def streamline(self) -> ParserElement: super().streamline() if self.exprs: self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs) else: self.mayReturnEmpty = True return self def parseImpl(self, instring, loc, doActions=True): if self.initExprGroups: self.opt1map = dict( (id(e.expr), e) for e in self.exprs if isinstance(e, Opt) ) opt1 = [e.expr for e in self.exprs if isinstance(e, Opt)] opt2 = [ e for e in self.exprs if e.mayReturnEmpty and not isinstance(e, (Opt, Regex, ZeroOrMore)) ] self.optionals = opt1 + opt2 self.multioptionals = [ e.expr.set_results_name(e.resultsName, list_all_matches=True) for e in self.exprs if isinstance(e, _MultipleMatch) ] self.multirequired = [ e.expr.set_results_name(e.resultsName, list_all_matches=True) for e in self.exprs if isinstance(e, OneOrMore) ] self.required = [ e for e in self.exprs if not isinstance(e, (Opt, ZeroOrMore, OneOrMore)) ] self.required += self.multirequired self.initExprGroups = False tmpLoc = loc tmpReqd = self.required[:] tmpOpt = self.optionals[:] multis = self.multioptionals[:] matchOrder = [] keepMatching = True failed = [] fatals = [] while keepMatching: tmpExprs = tmpReqd + tmpOpt + multis failed.clear() fatals.clear() for e in tmpExprs: try: tmpLoc = e.try_parse(instring, tmpLoc, raise_fatal=True) except ParseFatalException as pfe: pfe.__traceback__ = None pfe.parserElement = e fatals.append(pfe) failed.append(e) except ParseException: failed.append(e) else: matchOrder.append(self.opt1map.get(id(e), e)) if e in tmpReqd: tmpReqd.remove(e) elif e in tmpOpt: tmpOpt.remove(e) if len(failed) == len(tmpExprs): keepMatching = False # look for any ParseFatalExceptions if fatals: if len(fatals) > 1: fatals.sort(key=lambda e: -e.loc) if fatals[0].loc == fatals[1].loc: fatals.sort(key=lambda e: (-e.loc, -len(str(e.parserElement)))) max_fatal = fatals[0] raise max_fatal if tmpReqd: missing = ", ".join([str(e) for e in tmpReqd]) raise ParseException( instring, loc, "Missing one or more required elements ({})".format(missing), ) # add any unmatched Opts, in case they have default values defined matchOrder += [e for e in self.exprs if isinstance(e, Opt) and e.expr in tmpOpt] total_results = ParseResults([]) for e in matchOrder: loc, results = e._parse(instring, loc, doActions) total_results += results return loc, total_results def _generateDefaultName(self): return "{" + " & ".join(str(e) for e in self.exprs) + "}" class ParseElementEnhance(ParserElement): """Abstract subclass of :class:`ParserElement`, for combining and post-processing parsed tokens. """ def __init__(self, expr: Union[ParserElement, str], savelist: bool = False): super().__init__(savelist) if isinstance(expr, str_type): if issubclass(self._literalStringClass, Token): expr = self._literalStringClass(expr) elif issubclass(type(self), self._literalStringClass): expr = Literal(expr) else: expr = self._literalStringClass(Literal(expr)) self.expr = expr if expr is not None: self.mayIndexError = expr.mayIndexError self.mayReturnEmpty = expr.mayReturnEmpty self.set_whitespace_chars( expr.whiteChars, copy_defaults=expr.copyDefaultWhiteChars ) self.skipWhitespace = expr.skipWhitespace self.saveAsList = expr.saveAsList self.callPreparse = expr.callPreparse self.ignoreExprs.extend(expr.ignoreExprs) def recurse(self) -> Sequence[ParserElement]: return [self.expr] if self.expr is not None else [] def parseImpl(self, instring, loc, doActions=True): if self.expr is not None: return self.expr._parse(instring, loc, doActions, callPreParse=False) else: raise ParseException(instring, loc, "No expression defined", self) def leave_whitespace(self, recursive: bool = True) -> ParserElement: super().leave_whitespace(recursive) if recursive: self.expr = self.expr.copy() if self.expr is not None: self.expr.leave_whitespace(recursive) return self def ignore_whitespace(self, recursive: bool = True) -> ParserElement: super().ignore_whitespace(recursive) if recursive: self.expr = self.expr.copy() if self.expr is not None: self.expr.ignore_whitespace(recursive) return self def ignore(self, other) -> ParserElement: if isinstance(other, Suppress): if other not in self.ignoreExprs: super().ignore(other) if self.expr is not None: self.expr.ignore(self.ignoreExprs[-1]) else: super().ignore(other) if self.expr is not None: self.expr.ignore(self.ignoreExprs[-1]) return self def streamline(self) -> ParserElement: super().streamline() if self.expr is not None: self.expr.streamline() return self def _checkRecursion(self, parseElementList): if self in parseElementList: raise RecursiveGrammarException(parseElementList + [self]) subRecCheckList = parseElementList[:] + [self] if self.expr is not None: self.expr._checkRecursion(subRecCheckList) def validate(self, validateTrace=None) -> None: if validateTrace is None: validateTrace = [] tmp = validateTrace[:] + [self] if self.expr is not None: self.expr.validate(tmp) self._checkRecursion([]) def _generateDefaultName(self): return "{}:({})".format(self.__class__.__name__, str(self.expr)) ignoreWhitespace = ignore_whitespace leaveWhitespace = leave_whitespace class IndentedBlock(ParseElementEnhance): """ Expression to match one or more expressions at a given indentation level. Useful for parsing text where structure is implied by indentation (like Python source code). """ class _Indent(Empty): def __init__(self, ref_col: int): super().__init__() self.errmsg = "expected indent at column {}".format(ref_col) self.add_condition(lambda s, l, t: col(l, s) == ref_col) class _IndentGreater(Empty): def __init__(self, ref_col: int): super().__init__() self.errmsg = "expected indent at column greater than {}".format(ref_col) self.add_condition(lambda s, l, t: col(l, s) > ref_col) def __init__( self, expr: ParserElement, *, recursive: bool = False, grouped: bool = True ): super().__init__(expr, savelist=True) # if recursive: # raise NotImplementedError("IndentedBlock with recursive is not implemented") self._recursive = recursive self._grouped = grouped self.parent_anchor = 1 def parseImpl(self, instring, loc, doActions=True): # advance parse position to non-whitespace by using an Empty() # this should be the column to be used for all subsequent indented lines anchor_loc = Empty().preParse(instring, loc) # see if self.expr matches at the current location - if not it will raise an exception # and no further work is necessary self.expr.try_parse(instring, anchor_loc, doActions) indent_col = col(anchor_loc, instring) peer_detect_expr = self._Indent(indent_col) inner_expr = Empty() + peer_detect_expr + self.expr if self._recursive: sub_indent = self._IndentGreater(indent_col) nested_block = IndentedBlock( self.expr, recursive=self._recursive, grouped=self._grouped ) nested_block.set_debug(self.debug) nested_block.parent_anchor = indent_col inner_expr += Opt(sub_indent + nested_block) inner_expr.set_name(f"inner {hex(id(inner_expr))[-4:].upper()}@{indent_col}") block = OneOrMore(inner_expr) trailing_undent = self._Indent(self.parent_anchor) | StringEnd() if self._grouped: wrapper = Group else: wrapper = lambda expr: expr return (wrapper(block) + Optional(trailing_undent)).parseImpl( instring, anchor_loc, doActions ) class AtStringStart(ParseElementEnhance): """Matches if expression matches at the beginning of the parse string:: AtStringStart(Word(nums)).parse_string("123") # prints ["123"] AtStringStart(Word(nums)).parse_string(" 123") # raises ParseException """ def __init__(self, expr: Union[ParserElement, str]): super().__init__(expr) self.callPreparse = False def parseImpl(self, instring, loc, doActions=True): if loc != 0: raise ParseException(instring, loc, "not found at string start") return super().parseImpl(instring, loc, doActions) class AtLineStart(ParseElementEnhance): r"""Matches if an expression matches at the beginning of a line within the parse string Example:: test = '''\ AAA this line AAA and this line AAA but not this one B AAA and definitely not this one ''' for t in (AtLineStart('AAA') + restOfLine).search_string(test): print(t) prints:: ['AAA', ' this line'] ['AAA', ' and this line'] """ def __init__(self, expr: Union[ParserElement, str]): super().__init__(expr) self.callPreparse = False def parseImpl(self, instring, loc, doActions=True): if col(loc, instring) != 1: raise ParseException(instring, loc, "not found at line start") return super().parseImpl(instring, loc, doActions) class FollowedBy(ParseElementEnhance): """Lookahead matching of the given parse expression. ``FollowedBy`` does *not* advance the parsing position within the input string, it only verifies that the specified parse expression matches at the current position. ``FollowedBy`` always returns a null token list. If any results names are defined in the lookahead expression, those *will* be returned for access by name. Example:: # use FollowedBy to match a label only if it is followed by a ':' data_word = Word(alphas) label = data_word + FollowedBy(':') attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) attr_expr[1, ...].parse_string("shape: SQUARE color: BLACK posn: upper left").pprint() prints:: [['shape', 'SQUARE'], ['color', 'BLACK'], ['posn', 'upper left']] """ def __init__(self, expr: Union[ParserElement, str]): super().__init__(expr) self.mayReturnEmpty = True def parseImpl(self, instring, loc, doActions=True): # by using self._expr.parse and deleting the contents of the returned ParseResults list # we keep any named results that were defined in the FollowedBy expression _, ret = self.expr._parse(instring, loc, doActions=doActions) del ret[:] return loc, ret class PrecededBy(ParseElementEnhance): """Lookbehind matching of the given parse expression. ``PrecededBy`` does not advance the parsing position within the input string, it only verifies that the specified parse expression matches prior to the current position. ``PrecededBy`` always returns a null token list, but if a results name is defined on the given expression, it is returned. Parameters: - expr - expression that must match prior to the current parse location - retreat - (default= ``None``) - (int) maximum number of characters to lookbehind prior to the current parse location If the lookbehind expression is a string, :class:`Literal`, :class:`Keyword`, or a :class:`Word` or :class:`CharsNotIn` with a specified exact or maximum length, then the retreat parameter is not required. Otherwise, retreat must be specified to give a maximum number of characters to look back from the current parse position for a lookbehind match. Example:: # VB-style variable names with type prefixes int_var = PrecededBy("#") + pyparsing_common.identifier str_var = PrecededBy("$") + pyparsing_common.identifier """ def __init__( self, expr: Union[ParserElement, str], retreat: typing.Optional[int] = None ): super().__init__(expr) self.expr = self.expr().leave_whitespace() self.mayReturnEmpty = True self.mayIndexError = False self.exact = False if isinstance(expr, str_type): retreat = len(expr) self.exact = True elif isinstance(expr, (Literal, Keyword)): retreat = expr.matchLen self.exact = True elif isinstance(expr, (Word, CharsNotIn)) and expr.maxLen != _MAX_INT: retreat = expr.maxLen self.exact = True elif isinstance(expr, PositionToken): retreat = 0 self.exact = True self.retreat = retreat self.errmsg = "not preceded by " + str(expr) self.skipWhitespace = False self.parseAction.append(lambda s, l, t: t.__delitem__(slice(None, None))) def parseImpl(self, instring, loc=0, doActions=True): if self.exact: if loc < self.retreat: raise ParseException(instring, loc, self.errmsg) start = loc - self.retreat _, ret = self.expr._parse(instring, start) else: # retreat specified a maximum lookbehind window, iterate test_expr = self.expr + StringEnd() instring_slice = instring[max(0, loc - self.retreat) : loc] last_expr = ParseException(instring, loc, self.errmsg) for offset in range(1, min(loc, self.retreat + 1) + 1): try: # print('trying', offset, instring_slice, repr(instring_slice[loc - offset:])) _, ret = test_expr._parse( instring_slice, len(instring_slice) - offset ) except ParseBaseException as pbe: last_expr = pbe else: break else: raise last_expr return loc, ret class Located(ParseElementEnhance): """ Decorates a returned token with its starting and ending locations in the input string. This helper adds the following results names: - ``locn_start`` - location where matched expression begins - ``locn_end`` - location where matched expression ends - ``value`` - the actual parsed results Be careful if the input text contains ```` characters, you may want to call :class:`ParserElement.parse_with_tabs` Example:: wd = Word(alphas) for match in Located(wd).search_string("ljsdf123lksdjjf123lkkjj1222"): print(match) prints:: [0, ['ljsdf'], 5] [8, ['lksdjjf'], 15] [18, ['lkkjj'], 23] """ def parseImpl(self, instring, loc, doActions=True): start = loc loc, tokens = self.expr._parse(instring, start, doActions, callPreParse=False) ret_tokens = ParseResults([start, tokens, loc]) ret_tokens["locn_start"] = start ret_tokens["value"] = tokens ret_tokens["locn_end"] = loc if self.resultsName: # must return as a list, so that the name will be attached to the complete group return loc, [ret_tokens] else: return loc, ret_tokens class NotAny(ParseElementEnhance): """ Lookahead to disallow matching with the given parse expression. ``NotAny`` does *not* advance the parsing position within the input string, it only verifies that the specified parse expression does *not* match at the current position. Also, ``NotAny`` does *not* skip over leading whitespace. ``NotAny`` always returns a null token list. May be constructed using the ``'~'`` operator. Example:: AND, OR, NOT = map(CaselessKeyword, "AND OR NOT".split()) # take care not to mistake keywords for identifiers ident = ~(AND | OR | NOT) + Word(alphas) boolean_term = Opt(NOT) + ident # very crude boolean expression - to support parenthesis groups and # operation hierarchy, use infix_notation boolean_expr = boolean_term + ((AND | OR) + boolean_term)[...] # integers that are followed by "." are actually floats integer = Word(nums) + ~Char(".") """ def __init__(self, expr: Union[ParserElement, str]): super().__init__(expr) # do NOT use self.leave_whitespace(), don't want to propagate to exprs # self.leave_whitespace() self.skipWhitespace = False self.mayReturnEmpty = True self.errmsg = "Found unwanted token, " + str(self.expr) def parseImpl(self, instring, loc, doActions=True): if self.expr.can_parse_next(instring, loc): raise ParseException(instring, loc, self.errmsg, self) return loc, [] def _generateDefaultName(self): return "~{" + str(self.expr) + "}" class _MultipleMatch(ParseElementEnhance): def __init__( self, expr: ParserElement, stop_on: typing.Optional[Union[ParserElement, str]] = None, *, stopOn: typing.Optional[Union[ParserElement, str]] = None, ): super().__init__(expr) stopOn = stopOn or stop_on self.saveAsList = True ender = stopOn if isinstance(ender, str_type): ender = self._literalStringClass(ender) self.stopOn(ender) def stopOn(self, ender) -> ParserElement: if isinstance(ender, str_type): ender = self._literalStringClass(ender) self.not_ender = ~ender if ender is not None else None return self def parseImpl(self, instring, loc, doActions=True): self_expr_parse = self.expr._parse self_skip_ignorables = self._skipIgnorables check_ender = self.not_ender is not None if check_ender: try_not_ender = self.not_ender.tryParse # must be at least one (but first see if we are the stopOn sentinel; # if so, fail) if check_ender: try_not_ender(instring, loc) loc, tokens = self_expr_parse(instring, loc, doActions) try: hasIgnoreExprs = not not self.ignoreExprs while 1: if check_ender: try_not_ender(instring, loc) if hasIgnoreExprs: preloc = self_skip_ignorables(instring, loc) else: preloc = loc loc, tmptokens = self_expr_parse(instring, preloc, doActions) if tmptokens or tmptokens.haskeys(): tokens += tmptokens except (ParseException, IndexError): pass return loc, tokens def _setResultsName(self, name, listAllMatches=False): if ( __diag__.warn_ungrouped_named_tokens_in_collection and Diagnostics.warn_ungrouped_named_tokens_in_collection not in self.suppress_warnings_ ): for e in [self.expr] + self.expr.recurse(): if ( isinstance(e, ParserElement) and e.resultsName and Diagnostics.warn_ungrouped_named_tokens_in_collection not in e.suppress_warnings_ ): warnings.warn( "{}: setting results name {!r} on {} expression " "collides with {!r} on contained expression".format( "warn_ungrouped_named_tokens_in_collection", name, type(self).__name__, e.resultsName, ), stacklevel=3, ) return super()._setResultsName(name, listAllMatches) class OneOrMore(_MultipleMatch): """ Repetition of one or more of the given expression. Parameters: - expr - expression that must match one or more times - stop_on - (default= ``None``) - expression for a terminating sentinel (only required if the sentinel would ordinarily match the repetition expression) Example:: data_word = Word(alphas) label = data_word + FollowedBy(':') attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).set_parse_action(' '.join)) text = "shape: SQUARE posn: upper left color: BLACK" attr_expr[1, ...].parse_string(text).pprint() # Fail! read 'color' as data instead of next label -> [['shape', 'SQUARE color']] # use stop_on attribute for OneOrMore to avoid reading label string as part of the data attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) OneOrMore(attr_expr).parse_string(text).pprint() # Better -> [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'BLACK']] # could also be written as (attr_expr * (1,)).parse_string(text).pprint() """ def _generateDefaultName(self): return "{" + str(self.expr) + "}..." class ZeroOrMore(_MultipleMatch): """ Optional repetition of zero or more of the given expression. Parameters: - ``expr`` - expression that must match zero or more times - ``stop_on`` - expression for a terminating sentinel (only required if the sentinel would ordinarily match the repetition expression) - (default= ``None``) Example: similar to :class:`OneOrMore` """ def __init__( self, expr: ParserElement, stop_on: typing.Optional[Union[ParserElement, str]] = None, *, stopOn: typing.Optional[Union[ParserElement, str]] = None, ): super().__init__(expr, stopOn=stopOn or stop_on) self.mayReturnEmpty = True def parseImpl(self, instring, loc, doActions=True): try: return super().parseImpl(instring, loc, doActions) except (ParseException, IndexError): return loc, ParseResults([], name=self.resultsName) def _generateDefaultName(self): return "[" + str(self.expr) + "]..." class _NullToken: def __bool__(self): return False def __str__(self): return "" class Opt(ParseElementEnhance): """ Optional matching of the given expression. Parameters: - ``expr`` - expression that must match zero or more times - ``default`` (optional) - value to be returned if the optional expression is not found. Example:: # US postal code can be a 5-digit zip, plus optional 4-digit qualifier zip = Combine(Word(nums, exact=5) + Opt('-' + Word(nums, exact=4))) zip.run_tests(''' # traditional ZIP code 12345 # ZIP+4 form 12101-0001 # invalid ZIP 98765- ''') prints:: # traditional ZIP code 12345 ['12345'] # ZIP+4 form 12101-0001 ['12101-0001'] # invalid ZIP 98765- ^ FAIL: Expected end of text (at char 5), (line:1, col:6) """ __optionalNotMatched = _NullToken() def __init__( self, expr: Union[ParserElement, str], default: Any = __optionalNotMatched ): super().__init__(expr, savelist=False) self.saveAsList = self.expr.saveAsList self.defaultValue = default self.mayReturnEmpty = True def parseImpl(self, instring, loc, doActions=True): self_expr = self.expr try: loc, tokens = self_expr._parse(instring, loc, doActions, callPreParse=False) except (ParseException, IndexError): default_value = self.defaultValue if default_value is not self.__optionalNotMatched: if self_expr.resultsName: tokens = ParseResults([default_value]) tokens[self_expr.resultsName] = default_value else: tokens = [default_value] else: tokens = [] return loc, tokens def _generateDefaultName(self): inner = str(self.expr) # strip off redundant inner {}'s while len(inner) > 1 and inner[0 :: len(inner) - 1] == "{}": inner = inner[1:-1] return "[" + inner + "]" Optional = Opt class SkipTo(ParseElementEnhance): """ Token for skipping over all undefined text until the matched expression is found. Parameters: - ``expr`` - target expression marking the end of the data to be skipped - ``include`` - if ``True``, the target expression is also parsed (the skipped text and target expression are returned as a 2-element list) (default= ``False``). - ``ignore`` - (default= ``None``) used to define grammars (typically quoted strings and comments) that might contain false matches to the target expression - ``fail_on`` - (default= ``None``) define expressions that are not allowed to be included in the skipped test; if found before the target expression is found, the :class:`SkipTo` is not a match Example:: report = ''' Outstanding Issues Report - 1 Jan 2000 # | Severity | Description | Days Open -----+----------+-------------------------------------------+----------- 101 | Critical | Intermittent system crash | 6 94 | Cosmetic | Spelling error on Login ('log|n') | 14 79 | Minor | System slow when running too many reports | 47 ''' integer = Word(nums) SEP = Suppress('|') # use SkipTo to simply match everything up until the next SEP # - ignore quoted strings, so that a '|' character inside a quoted string does not match # - parse action will call token.strip() for each matched token, i.e., the description body string_data = SkipTo(SEP, ignore=quoted_string) string_data.set_parse_action(token_map(str.strip)) ticket_expr = (integer("issue_num") + SEP + string_data("sev") + SEP + string_data("desc") + SEP + integer("days_open")) for tkt in ticket_expr.search_string(report): print tkt.dump() prints:: ['101', 'Critical', 'Intermittent system crash', '6'] - days_open: '6' - desc: 'Intermittent system crash' - issue_num: '101' - sev: 'Critical' ['94', 'Cosmetic', "Spelling error on Login ('log|n')", '14'] - days_open: '14' - desc: "Spelling error on Login ('log|n')" - issue_num: '94' - sev: 'Cosmetic' ['79', 'Minor', 'System slow when running too many reports', '47'] - days_open: '47' - desc: 'System slow when running too many reports' - issue_num: '79' - sev: 'Minor' """ def __init__( self, other: Union[ParserElement, str], include: bool = False, ignore: bool = None, fail_on: typing.Optional[Union[ParserElement, str]] = None, *, failOn: Union[ParserElement, str] = None, ): super().__init__(other) failOn = failOn or fail_on self.ignoreExpr = ignore self.mayReturnEmpty = True self.mayIndexError = False self.includeMatch = include self.saveAsList = False if isinstance(failOn, str_type): self.failOn = self._literalStringClass(failOn) else: self.failOn = failOn self.errmsg = "No match found for " + str(self.expr) def parseImpl(self, instring, loc, doActions=True): startloc = loc instrlen = len(instring) self_expr_parse = self.expr._parse self_failOn_canParseNext = ( self.failOn.canParseNext if self.failOn is not None else None ) self_ignoreExpr_tryParse = ( self.ignoreExpr.tryParse if self.ignoreExpr is not None else None ) tmploc = loc while tmploc <= instrlen: if self_failOn_canParseNext is not None: # break if failOn expression matches if self_failOn_canParseNext(instring, tmploc): break if self_ignoreExpr_tryParse is not None: # advance past ignore expressions while 1: try: tmploc = self_ignoreExpr_tryParse(instring, tmploc) except ParseBaseException: break try: self_expr_parse(instring, tmploc, doActions=False, callPreParse=False) except (ParseException, IndexError): # no match, advance loc in string tmploc += 1 else: # matched skipto expr, done break else: # ran off the end of the input string without matching skipto expr, fail raise ParseException(instring, loc, self.errmsg, self) # build up return values loc = tmploc skiptext = instring[startloc:loc] skipresult = ParseResults(skiptext) if self.includeMatch: loc, mat = self_expr_parse(instring, loc, doActions, callPreParse=False) skipresult += mat return loc, skipresult class Forward(ParseElementEnhance): """ Forward declaration of an expression to be defined later - used for recursive grammars, such as algebraic infix notation. When the expression is known, it is assigned to the ``Forward`` variable using the ``'<<'`` operator. Note: take care when assigning to ``Forward`` not to overlook precedence of operators. Specifically, ``'|'`` has a lower precedence than ``'<<'``, so that:: fwd_expr << a | b | c will actually be evaluated as:: (fwd_expr << a) | b | c thereby leaving b and c out as parseable alternatives. It is recommended that you explicitly group the values inserted into the ``Forward``:: fwd_expr << (a | b | c) Converting to use the ``'<<='`` operator instead will avoid this problem. See :class:`ParseResults.pprint` for an example of a recursive parser created using ``Forward``. """ def __init__(self, other: typing.Optional[Union[ParserElement, str]] = None): self.caller_frame = traceback.extract_stack(limit=2)[0] super().__init__(other, savelist=False) self.lshift_line = None def __lshift__(self, other): if hasattr(self, "caller_frame"): del self.caller_frame if isinstance(other, str_type): other = self._literalStringClass(other) self.expr = other self.mayIndexError = self.expr.mayIndexError self.mayReturnEmpty = self.expr.mayReturnEmpty self.set_whitespace_chars( self.expr.whiteChars, copy_defaults=self.expr.copyDefaultWhiteChars ) self.skipWhitespace = self.expr.skipWhitespace self.saveAsList = self.expr.saveAsList self.ignoreExprs.extend(self.expr.ignoreExprs) self.lshift_line = traceback.extract_stack(limit=2)[-2] return self def __ilshift__(self, other): return self << other def __or__(self, other): caller_line = traceback.extract_stack(limit=2)[-2] if ( __diag__.warn_on_match_first_with_lshift_operator and caller_line == self.lshift_line and Diagnostics.warn_on_match_first_with_lshift_operator not in self.suppress_warnings_ ): warnings.warn( "using '<<' operator with '|' is probably an error, use '<<='", stacklevel=2, ) ret = super().__or__(other) return ret def __del__(self): # see if we are getting dropped because of '=' reassignment of var instead of '<<=' or '<<' if ( self.expr is None and __diag__.warn_on_assignment_to_Forward and Diagnostics.warn_on_assignment_to_Forward not in self.suppress_warnings_ ): warnings.warn_explicit( "Forward defined here but no expression attached later using '<<=' or '<<'", UserWarning, filename=self.caller_frame.filename, lineno=self.caller_frame.lineno, ) def parseImpl(self, instring, loc, doActions=True): if ( self.expr is None and __diag__.warn_on_parse_using_empty_Forward and Diagnostics.warn_on_parse_using_empty_Forward not in self.suppress_warnings_ ): # walk stack until parse_string, scan_string, search_string, or transform_string is found parse_fns = [ "parse_string", "scan_string", "search_string", "transform_string", ] tb = traceback.extract_stack(limit=200) for i, frm in enumerate(reversed(tb), start=1): if frm.name in parse_fns: stacklevel = i + 1 break else: stacklevel = 2 warnings.warn( "Forward expression was never assigned a value, will not parse any input", stacklevel=stacklevel, ) if not ParserElement._left_recursion_enabled: return super().parseImpl(instring, loc, doActions) # ## Bounded Recursion algorithm ## # Recursion only needs to be processed at ``Forward`` elements, since they are # the only ones that can actually refer to themselves. The general idea is # to handle recursion stepwise: We start at no recursion, then recurse once, # recurse twice, ..., until more recursion offers no benefit (we hit the bound). # # The "trick" here is that each ``Forward`` gets evaluated in two contexts # - to *match* a specific recursion level, and # - to *search* the bounded recursion level # and the two run concurrently. The *search* must *match* each recursion level # to find the best possible match. This is handled by a memo table, which # provides the previous match to the next level match attempt. # # See also "Left Recursion in Parsing Expression Grammars", Medeiros et al. # # There is a complication since we not only *parse* but also *transform* via # actions: We do not want to run the actions too often while expanding. Thus, # we expand using `doActions=False` and only run `doActions=True` if the next # recursion level is acceptable. with ParserElement.recursion_lock: memo = ParserElement.recursion_memos try: # we are parsing at a specific recursion expansion - use it as-is prev_loc, prev_result = memo[loc, self, doActions] if isinstance(prev_result, Exception): raise prev_result return prev_loc, prev_result.copy() except KeyError: act_key = (loc, self, True) peek_key = (loc, self, False) # we are searching for the best recursion expansion - keep on improving # both `doActions` cases must be tracked separately here! prev_loc, prev_peek = memo[peek_key] = ( loc - 1, ParseException( instring, loc, "Forward recursion without base case", self ), ) if doActions: memo[act_key] = memo[peek_key] while True: try: new_loc, new_peek = super().parseImpl(instring, loc, False) except ParseException: # we failed before getting any match – do not hide the error if isinstance(prev_peek, Exception): raise new_loc, new_peek = prev_loc, prev_peek # the match did not get better: we are done if new_loc <= prev_loc: if doActions: # replace the match for doActions=False as well, # in case the action did backtrack prev_loc, prev_result = memo[peek_key] = memo[act_key] del memo[peek_key], memo[act_key] return prev_loc, prev_result.copy() del memo[peek_key] return prev_loc, prev_peek.copy() # the match did get better: see if we can improve further else: if doActions: try: memo[act_key] = super().parseImpl(instring, loc, True) except ParseException as e: memo[peek_key] = memo[act_key] = (new_loc, e) raise prev_loc, prev_peek = memo[peek_key] = new_loc, new_peek def leave_whitespace(self, recursive: bool = True) -> ParserElement: self.skipWhitespace = False return self def ignore_whitespace(self, recursive: bool = True) -> ParserElement: self.skipWhitespace = True return self def streamline(self) -> ParserElement: if not self.streamlined: self.streamlined = True if self.expr is not None: self.expr.streamline() return self def validate(self, validateTrace=None) -> None: if validateTrace is None: validateTrace = [] if self not in validateTrace: tmp = validateTrace[:] + [self] if self.expr is not None: self.expr.validate(tmp) self._checkRecursion([]) def _generateDefaultName(self): # Avoid infinite recursion by setting a temporary _defaultName self._defaultName = ": ..." # Use the string representation of main expression. retString = "..." try: if self.expr is not None: retString = str(self.expr)[:1000] else: retString = "None" finally: return self.__class__.__name__ + ": " + retString def copy(self) -> ParserElement: if self.expr is not None: return super().copy() else: ret = Forward() ret <<= self return ret def _setResultsName(self, name, list_all_matches=False): if ( __diag__.warn_name_set_on_empty_Forward and Diagnostics.warn_name_set_on_empty_Forward not in self.suppress_warnings_ ): if self.expr is None: warnings.warn( "{}: setting results name {!r} on {} expression " "that has no contained expression".format( "warn_name_set_on_empty_Forward", name, type(self).__name__ ), stacklevel=3, ) return super()._setResultsName(name, list_all_matches) ignoreWhitespace = ignore_whitespace leaveWhitespace = leave_whitespace class TokenConverter(ParseElementEnhance): """ Abstract subclass of :class:`ParseExpression`, for converting parsed results. """ def __init__(self, expr: Union[ParserElement, str], savelist=False): super().__init__(expr) # , savelist) self.saveAsList = False class Combine(TokenConverter): """Converter to concatenate all matching tokens to a single string. By default, the matching patterns must also be contiguous in the input string; this can be disabled by specifying ``'adjacent=False'`` in the constructor. Example:: real = Word(nums) + '.' + Word(nums) print(real.parse_string('3.1416')) # -> ['3', '.', '1416'] # will also erroneously match the following print(real.parse_string('3. 1416')) # -> ['3', '.', '1416'] real = Combine(Word(nums) + '.' + Word(nums)) print(real.parse_string('3.1416')) # -> ['3.1416'] # no match when there are internal spaces print(real.parse_string('3. 1416')) # -> Exception: Expected W:(0123...) """ def __init__( self, expr: ParserElement, join_string: str = "", adjacent: bool = True, *, joinString: typing.Optional[str] = None, ): super().__init__(expr) joinString = joinString if joinString is not None else join_string # suppress whitespace-stripping in contained parse expressions, but re-enable it on the Combine itself if adjacent: self.leave_whitespace() self.adjacent = adjacent self.skipWhitespace = True self.joinString = joinString self.callPreparse = True def ignore(self, other) -> ParserElement: if self.adjacent: ParserElement.ignore(self, other) else: super().ignore(other) return self def postParse(self, instring, loc, tokenlist): retToks = tokenlist.copy() del retToks[:] retToks += ParseResults( ["".join(tokenlist._asStringList(self.joinString))], modal=self.modalResults ) if self.resultsName and retToks.haskeys(): return [retToks] else: return retToks class Group(TokenConverter): """Converter to return the matched tokens as a list - useful for returning tokens of :class:`ZeroOrMore` and :class:`OneOrMore` expressions. The optional ``aslist`` argument when set to True will return the parsed tokens as a Python list instead of a pyparsing ParseResults. Example:: ident = Word(alphas) num = Word(nums) term = ident | num func = ident + Opt(delimited_list(term)) print(func.parse_string("fn a, b, 100")) # -> ['fn', 'a', 'b', '100'] func = ident + Group(Opt(delimited_list(term))) print(func.parse_string("fn a, b, 100")) # -> ['fn', ['a', 'b', '100']] """ def __init__(self, expr: ParserElement, aslist: bool = False): super().__init__(expr) self.saveAsList = True self._asPythonList = aslist def postParse(self, instring, loc, tokenlist): if self._asPythonList: return ParseResults.List( tokenlist.asList() if isinstance(tokenlist, ParseResults) else list(tokenlist) ) else: return [tokenlist] class Dict(TokenConverter): """Converter to return a repetitive expression as a list, but also as a dictionary. Each element can also be referenced using the first token in the expression as its key. Useful for tabular report scraping when the first column can be used as a item key. The optional ``asdict`` argument when set to True will return the parsed tokens as a Python dict instead of a pyparsing ParseResults. Example:: data_word = Word(alphas) label = data_word + FollowedBy(':') text = "shape: SQUARE posn: upper left color: light blue texture: burlap" attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) # print attributes as plain groups print(attr_expr[1, ...].parse_string(text).dump()) # instead of OneOrMore(expr), parse using Dict(Group(expr)[1, ...]) - Dict will auto-assign names result = Dict(Group(attr_expr)[1, ...]).parse_string(text) print(result.dump()) # access named fields as dict entries, or output as dict print(result['shape']) print(result.as_dict()) prints:: ['shape', 'SQUARE', 'posn', 'upper left', 'color', 'light blue', 'texture', 'burlap'] [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']] - color: 'light blue' - posn: 'upper left' - shape: 'SQUARE' - texture: 'burlap' SQUARE {'color': 'light blue', 'posn': 'upper left', 'texture': 'burlap', 'shape': 'SQUARE'} See more examples at :class:`ParseResults` of accessing fields by results name. """ def __init__(self, expr: ParserElement, asdict: bool = False): super().__init__(expr) self.saveAsList = True self._asPythonDict = asdict def postParse(self, instring, loc, tokenlist): for i, tok in enumerate(tokenlist): if len(tok) == 0: continue ikey = tok[0] if isinstance(ikey, int): ikey = str(ikey).strip() if len(tok) == 1: tokenlist[ikey] = _ParseResultsWithOffset("", i) elif len(tok) == 2 and not isinstance(tok[1], ParseResults): tokenlist[ikey] = _ParseResultsWithOffset(tok[1], i) else: try: dictvalue = tok.copy() # ParseResults(i) except Exception: exc = TypeError( "could not extract dict values from parsed results" " - Dict expression must contain Grouped expressions" ) raise exc from None del dictvalue[0] if len(dictvalue) != 1 or ( isinstance(dictvalue, ParseResults) and dictvalue.haskeys() ): tokenlist[ikey] = _ParseResultsWithOffset(dictvalue, i) else: tokenlist[ikey] = _ParseResultsWithOffset(dictvalue[0], i) if self._asPythonDict: return [tokenlist.as_dict()] if self.resultsName else tokenlist.as_dict() else: return [tokenlist] if self.resultsName else tokenlist class Suppress(TokenConverter): """Converter for ignoring the results of a parsed expression. Example:: source = "a, b, c,d" wd = Word(alphas) wd_list1 = wd + (',' + wd)[...] print(wd_list1.parse_string(source)) # often, delimiters that are useful during parsing are just in the # way afterward - use Suppress to keep them out of the parsed output wd_list2 = wd + (Suppress(',') + wd)[...] print(wd_list2.parse_string(source)) # Skipped text (using '...') can be suppressed as well source = "lead in START relevant text END trailing text" start_marker = Keyword("START") end_marker = Keyword("END") find_body = Suppress(...) + start_marker + ... + end_marker print(find_body.parse_string(source) prints:: ['a', ',', 'b', ',', 'c', ',', 'd'] ['a', 'b', 'c', 'd'] ['START', 'relevant text ', 'END'] (See also :class:`delimited_list`.) """ def __init__(self, expr: Union[ParserElement, str], savelist: bool = False): if expr is ...: expr = _PendingSkip(NoMatch()) super().__init__(expr) def __add__(self, other) -> "ParserElement": if isinstance(self.expr, _PendingSkip): return Suppress(SkipTo(other)) + other else: return super().__add__(other) def __sub__(self, other) -> "ParserElement": if isinstance(self.expr, _PendingSkip): return Suppress(SkipTo(other)) - other else: return super().__sub__(other) def postParse(self, instring, loc, tokenlist): return [] def suppress(self) -> ParserElement: return self def trace_parse_action(f: ParseAction) -> ParseAction: """Decorator for debugging parse actions. When the parse action is called, this decorator will print ``">> entering method-name(line:, , )"``. When the parse action completes, the decorator will print ``"<<"`` followed by the returned value, or any exception that the parse action raised. Example:: wd = Word(alphas) @trace_parse_action def remove_duplicate_chars(tokens): return ''.join(sorted(set(''.join(tokens)))) wds = wd[1, ...].set_parse_action(remove_duplicate_chars) print(wds.parse_string("slkdjs sld sldd sdlf sdljf")) prints:: >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {})) < 3: thisFunc = paArgs[0].__class__.__name__ + "." + thisFunc sys.stderr.write( ">>entering {}(line: {!r}, {}, {!r})\n".format(thisFunc, line(l, s), l, t) ) try: ret = f(*paArgs) except Exception as exc: sys.stderr.write("< str: r"""Helper to easily define string ranges for use in :class:`Word` construction. Borrows syntax from regexp ``'[]'`` string range definitions:: srange("[0-9]") -> "0123456789" srange("[a-z]") -> "abcdefghijklmnopqrstuvwxyz" srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_" The input string must be enclosed in []'s, and the returned string is the expanded character set joined into a single string. The values enclosed in the []'s may be: - a single character - an escaped character with a leading backslash (such as ``\-`` or ``\]``) - an escaped hex character with a leading ``'\x'`` (``\x21``, which is a ``'!'`` character) (``\0x##`` is also supported for backwards compatibility) - an escaped octal character with a leading ``'\0'`` (``\041``, which is a ``'!'`` character) - a range of any of the above, separated by a dash (``'a-z'``, etc.) - any combination of the above (``'aeiouy'``, ``'a-zA-Z0-9_$'``, etc.) """ _expanded = ( lambda p: p if not isinstance(p, ParseResults) else "".join(chr(c) for c in range(ord(p[0]), ord(p[1]) + 1)) ) try: return "".join(_expanded(part) for part in _reBracketExpr.parse_string(s).body) except Exception: return "" def token_map(func, *args) -> ParseAction: """Helper to define a parse action by mapping a function to all elements of a :class:`ParseResults` list. If any additional args are passed, they are forwarded to the given function as additional arguments after the token, as in ``hex_integer = Word(hexnums).set_parse_action(token_map(int, 16))``, which will convert the parsed data to an integer using base 16. Example (compare the last to example in :class:`ParserElement.transform_string`:: hex_ints = Word(hexnums)[1, ...].set_parse_action(token_map(int, 16)) hex_ints.run_tests(''' 00 11 22 aa FF 0a 0d 1a ''') upperword = Word(alphas).set_parse_action(token_map(str.upper)) upperword[1, ...].run_tests(''' my kingdom for a horse ''') wd = Word(alphas).set_parse_action(token_map(str.title)) wd[1, ...].set_parse_action(' '.join).run_tests(''' now is the winter of our discontent made glorious summer by this sun of york ''') prints:: 00 11 22 aa FF 0a 0d 1a [0, 17, 34, 170, 255, 10, 13, 26] my kingdom for a horse ['MY', 'KINGDOM', 'FOR', 'A', 'HORSE'] now is the winter of our discontent made glorious summer by this sun of york ['Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York'] """ def pa(s, l, t): return [func(tokn, *args) for tokn in t] func_name = getattr(func, "__name__", getattr(func, "__class__").__name__) pa.__name__ = func_name return pa def autoname_elements() -> None: """ Utility to simplify mass-naming of parser elements, for generating railroad diagram with named subdiagrams. """ for name, var in sys._getframe().f_back.f_locals.items(): if isinstance(var, ParserElement) and not var.customName: var.set_name(name) dbl_quoted_string = Combine( Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*') + '"' ).set_name("string enclosed in double quotes") sgl_quoted_string = Combine( Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*") + "'" ).set_name("string enclosed in single quotes") quoted_string = Combine( Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*') + '"' | Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*") + "'" ).set_name("quotedString using single or double quotes") unicode_string = Combine("u" + quoted_string.copy()).set_name("unicode string literal") alphas8bit = srange(r"[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]") punc8bit = srange(r"[\0xa1-\0xbf\0xd7\0xf7]") # build list of built-in expressions, for future reference if a global default value # gets updated _builtin_exprs: List[ParserElement] = [ v for v in vars().values() if isinstance(v, ParserElement) ] # backward compatibility names tokenMap = token_map conditionAsParseAction = condition_as_parse_action nullDebugAction = null_debug_action sglQuotedString = sgl_quoted_string dblQuotedString = dbl_quoted_string quotedString = quoted_string unicodeString = unicode_string lineStart = line_start lineEnd = line_end stringStart = string_start stringEnd = string_end traceParseAction = trace_parse_action PK{5Ze~228Lib/site-packages/setuptools/_vendor/pyparsing/common.pynuW+A# common.py from .core import * from .helpers import delimited_list, any_open_tag, any_close_tag from datetime import datetime # some other useful expressions - using lower-case class name since we are really using this as a namespace class pyparsing_common: """Here are some common low-level expressions that may be useful in jump-starting parser development: - numeric forms (:class:`integers`, :class:`reals`, :class:`scientific notation`) - common :class:`programming identifiers` - network addresses (:class:`MAC`, :class:`IPv4`, :class:`IPv6`) - ISO8601 :class:`dates` and :class:`datetime` - :class:`UUID` - :class:`comma-separated list` - :class:`url` Parse actions: - :class:`convertToInteger` - :class:`convertToFloat` - :class:`convertToDate` - :class:`convertToDatetime` - :class:`stripHTMLTags` - :class:`upcaseTokens` - :class:`downcaseTokens` Example:: pyparsing_common.number.runTests(''' # any int or real number, returned as the appropriate type 100 -100 +100 3.14159 6.02e23 1e-12 ''') pyparsing_common.fnumber.runTests(''' # any int or real number, returned as float 100 -100 +100 3.14159 6.02e23 1e-12 ''') pyparsing_common.hex_integer.runTests(''' # hex numbers 100 FF ''') pyparsing_common.fraction.runTests(''' # fractions 1/2 -3/4 ''') pyparsing_common.mixed_integer.runTests(''' # mixed fractions 1 1/2 -3/4 1-3/4 ''') import uuid pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID)) pyparsing_common.uuid.runTests(''' # uuid 12345678-1234-5678-1234-567812345678 ''') prints:: # any int or real number, returned as the appropriate type 100 [100] -100 [-100] +100 [100] 3.14159 [3.14159] 6.02e23 [6.02e+23] 1e-12 [1e-12] # any int or real number, returned as float 100 [100.0] -100 [-100.0] +100 [100.0] 3.14159 [3.14159] 6.02e23 [6.02e+23] 1e-12 [1e-12] # hex numbers 100 [256] FF [255] # fractions 1/2 [0.5] -3/4 [-0.75] # mixed fractions 1 [1] 1/2 [0.5] -3/4 [-0.75] 1-3/4 [1.75] # uuid 12345678-1234-5678-1234-567812345678 [UUID('12345678-1234-5678-1234-567812345678')] """ convert_to_integer = token_map(int) """ Parse action for converting parsed integers to Python int """ convert_to_float = token_map(float) """ Parse action for converting parsed numbers to Python float """ integer = Word(nums).set_name("integer").set_parse_action(convert_to_integer) """expression that parses an unsigned integer, returns an int""" hex_integer = ( Word(hexnums).set_name("hex integer").set_parse_action(token_map(int, 16)) ) """expression that parses a hexadecimal integer, returns an int""" signed_integer = ( Regex(r"[+-]?\d+") .set_name("signed integer") .set_parse_action(convert_to_integer) ) """expression that parses an integer with optional leading sign, returns an int""" fraction = ( signed_integer().set_parse_action(convert_to_float) + "/" + signed_integer().set_parse_action(convert_to_float) ).set_name("fraction") """fractional expression of an integer divided by an integer, returns a float""" fraction.add_parse_action(lambda tt: tt[0] / tt[-1]) mixed_integer = ( fraction | signed_integer + Opt(Opt("-").suppress() + fraction) ).set_name("fraction or mixed integer-fraction") """mixed integer of the form 'integer - fraction', with optional leading integer, returns float""" mixed_integer.add_parse_action(sum) real = ( Regex(r"[+-]?(?:\d+\.\d*|\.\d+)") .set_name("real number") .set_parse_action(convert_to_float) ) """expression that parses a floating point number and returns a float""" sci_real = ( Regex(r"[+-]?(?:\d+(?:[eE][+-]?\d+)|(?:\d+\.\d*|\.\d+)(?:[eE][+-]?\d+)?)") .set_name("real number with scientific notation") .set_parse_action(convert_to_float) ) """expression that parses a floating point number with optional scientific notation and returns a float""" # streamlining this expression makes the docs nicer-looking number = (sci_real | real | signed_integer).setName("number").streamline() """any numeric expression, returns the corresponding Python type""" fnumber = ( Regex(r"[+-]?\d+\.?\d*([eE][+-]?\d+)?") .set_name("fnumber") .set_parse_action(convert_to_float) ) """any int or real number, returned as float""" identifier = Word(identchars, identbodychars).set_name("identifier") """typical code identifier (leading alpha or '_', followed by 0 or more alphas, nums, or '_')""" ipv4_address = Regex( r"(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}" ).set_name("IPv4 address") "IPv4 address (``0.0.0.0 - 255.255.255.255``)" _ipv6_part = Regex(r"[0-9a-fA-F]{1,4}").set_name("hex_integer") _full_ipv6_address = (_ipv6_part + (":" + _ipv6_part) * 7).set_name( "full IPv6 address" ) _short_ipv6_address = ( Opt(_ipv6_part + (":" + _ipv6_part) * (0, 6)) + "::" + Opt(_ipv6_part + (":" + _ipv6_part) * (0, 6)) ).set_name("short IPv6 address") _short_ipv6_address.add_condition( lambda t: sum(1 for tt in t if pyparsing_common._ipv6_part.matches(tt)) < 8 ) _mixed_ipv6_address = ("::ffff:" + ipv4_address).set_name("mixed IPv6 address") ipv6_address = Combine( (_full_ipv6_address | _mixed_ipv6_address | _short_ipv6_address).set_name( "IPv6 address" ) ).set_name("IPv6 address") "IPv6 address (long, short, or mixed form)" mac_address = Regex( r"[0-9a-fA-F]{2}([:.-])[0-9a-fA-F]{2}(?:\1[0-9a-fA-F]{2}){4}" ).set_name("MAC address") "MAC address xx:xx:xx:xx:xx (may also have '-' or '.' delimiters)" @staticmethod def convert_to_date(fmt: str = "%Y-%m-%d"): """ Helper to create a parse action for converting parsed date string to Python datetime.date Params - - fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%d"``) Example:: date_expr = pyparsing_common.iso8601_date.copy() date_expr.setParseAction(pyparsing_common.convertToDate()) print(date_expr.parseString("1999-12-31")) prints:: [datetime.date(1999, 12, 31)] """ def cvt_fn(ss, ll, tt): try: return datetime.strptime(tt[0], fmt).date() except ValueError as ve: raise ParseException(ss, ll, str(ve)) return cvt_fn @staticmethod def convert_to_datetime(fmt: str = "%Y-%m-%dT%H:%M:%S.%f"): """Helper to create a parse action for converting parsed datetime string to Python datetime.datetime Params - - fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%dT%H:%M:%S.%f"``) Example:: dt_expr = pyparsing_common.iso8601_datetime.copy() dt_expr.setParseAction(pyparsing_common.convertToDatetime()) print(dt_expr.parseString("1999-12-31T23:59:59.999")) prints:: [datetime.datetime(1999, 12, 31, 23, 59, 59, 999000)] """ def cvt_fn(s, l, t): try: return datetime.strptime(t[0], fmt) except ValueError as ve: raise ParseException(s, l, str(ve)) return cvt_fn iso8601_date = Regex( r"(?P\d{4})(?:-(?P\d\d)(?:-(?P\d\d))?)?" ).set_name("ISO8601 date") "ISO8601 date (``yyyy-mm-dd``)" iso8601_datetime = Regex( r"(?P\d{4})-(?P\d\d)-(?P\d\d)[T ](?P\d\d):(?P\d\d)(:(?P\d\d(\.\d*)?)?)?(?PZ|[+-]\d\d:?\d\d)?" ).set_name("ISO8601 datetime") "ISO8601 datetime (``yyyy-mm-ddThh:mm:ss.s(Z|+-00:00)``) - trailing seconds, milliseconds, and timezone optional; accepts separating ``'T'`` or ``' '``" uuid = Regex(r"[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}").set_name("UUID") "UUID (``xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx``)" _html_stripper = any_open_tag.suppress() | any_close_tag.suppress() @staticmethod def strip_html_tags(s: str, l: int, tokens: ParseResults): """Parse action to remove HTML tags from web page HTML source Example:: # strip HTML links from normal text text = 'More info at the pyparsing wiki page' td, td_end = makeHTMLTags("TD") table_text = td + SkipTo(td_end).setParseAction(pyparsing_common.stripHTMLTags)("body") + td_end print(table_text.parseString(text).body) Prints:: More info at the pyparsing wiki page """ return pyparsing_common._html_stripper.transform_string(tokens[0]) _commasepitem = ( Combine( OneOrMore( ~Literal(",") + ~LineEnd() + Word(printables, exclude_chars=",") + Opt(White(" \t") + ~FollowedBy(LineEnd() | ",")) ) ) .streamline() .set_name("commaItem") ) comma_separated_list = delimited_list( Opt(quoted_string.copy() | _commasepitem, default="") ).set_name("comma separated list") """Predefined expression of 1 or more printable words or quoted strings, separated by commas.""" upcase_tokens = staticmethod(token_map(lambda t: t.upper())) """Parse action to convert tokens to upper case.""" downcase_tokens = staticmethod(token_map(lambda t: t.lower())) """Parse action to convert tokens to lower case.""" # fmt: off url = Regex( # https://mathiasbynens.be/demo/url-regex # https://gist.github.com/dperini/729294 r"^" + # protocol identifier (optional) # short syntax // still required r"(?:(?:(?Phttps?|ftp):)?\/\/)" + # user:pass BasicAuth (optional) r"(?:(?P\S+(?::\S*)?)@)?" + r"(?P" + # IP address exclusion # private & local networks r"(?!(?:10|127)(?:\.\d{1,3}){3})" + r"(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})" + r"(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})" + # IP address dotted notation octets # excludes loopback network 0.0.0.0 # excludes reserved space >= 224.0.0.0 # excludes network & broadcast addresses # (first & last IP address of each class) r"(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])" + r"(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}" + r"(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))" + r"|" + # host & domain names, may end with dot # can be replaced by a shortest alternative # (?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.)+ r"(?:" + r"(?:" + r"[a-z0-9\u00a1-\uffff]" + r"[a-z0-9\u00a1-\uffff_-]{0,62}" + r")?" + r"[a-z0-9\u00a1-\uffff]\." + r")+" + # TLD identifier name, may end with dot r"(?:[a-z\u00a1-\uffff]{2,}\.?)" + r")" + # port number (optional) r"(:(?P\d{2,5}))?" + # resource path (optional) r"(?P\/[^?# ]*)?" + # query string (optional) r"(\?(?P[^#]*))?" + # fragment (optional) r"(#(?P\S*))?" + r"$" ).set_name("url") # fmt: on # pre-PEP8 compatibility names convertToInteger = convert_to_integer convertToFloat = convert_to_float convertToDate = convert_to_date convertToDatetime = convert_to_datetime stripHTMLTags = strip_html_tags upcaseTokens = upcase_tokens downcaseTokens = downcase_tokens _builtin_exprs = [ v for v in vars(pyparsing_common).values() if isinstance(v, ParserElement) ] PK{5Z~S SLib/site-packages/setuptools/_vendor/pyparsing/__pycache__/__init__.cpython-311.pycnuW+A b;d#^dZddlmZGddeZedddddZdZejZeZd Zd d l Td d l Td d l Td d l m Z mZd d lTd d l Td d l mZd d lTd d lmZd dlmZmZmZd dlmZd dlmZmZdevreZdevreZdevreZeeezz ZgdZdS)a pyparsing module - Classes and methods to define and execute parsing grammars ============================================================================= The pyparsing module is an alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions. With pyparsing, you don't need to learn a new syntax for defining grammars or matching expressions - the parsing module provides a library of classes that you use to construct the grammar directly in Python. Here is a program to parse "Hello, World!" (or any greeting of the form ``", !"``), built up using :class:`Word`, :class:`Literal`, and :class:`And` elements (the :meth:`'+'` operators create :class:`And` expressions, and the strings are auto-converted to :class:`Literal` expressions):: from pyparsing import Word, alphas # define grammar of a greeting greet = Word(alphas) + "," + Word(alphas) + "!" hello = "Hello, World!" print(hello, "->", greet.parse_string(hello)) The program outputs the following:: Hello, World! -> ['Hello', ',', 'World', '!'] The Python representation of the grammar is quite readable, owing to the self-explanatory class names, and the use of :class:`'+'`, :class:`'|'`, :class:`'^'` and :class:`'&'` operators. The :class:`ParseResults` object returned from :class:`ParserElement.parseString` can be accessed as a nested list, a dictionary, or an object with named attributes. The pyparsing module handles some of the problems that are typically vexing when writing text parsers: - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello , World !", etc.) - quoted strings - embedded comments Getting Started - ----------------- Visit the classes :class:`ParserElement` and :class:`ParseResults` to see the base classes that most other pyparsing classes inherit from. Use the docstrings for examples of how to: - construct literal match expressions from :class:`Literal` and :class:`CaselessLiteral` classes - construct character word-group expressions using the :class:`Word` class - see how to create repetitive expressions using :class:`ZeroOrMore` and :class:`OneOrMore` classes - use :class:`'+'`, :class:`'|'`, :class:`'^'`, and :class:`'&'` operators to combine simple expressions into more complex ones - associate names with your parsed results using :class:`ParserElement.setResultsName` - access the parsed data, which is returned as a :class:`ParseResults` object - find some helpful expression short-cuts like :class:`delimitedList` and :class:`oneOf` - find more useful common expressions in the :class:`pyparsing_common` namespace class ) NamedTuplecdeZdZUeed<eed<eed<eed<eed<edZdZdZ d S) version_infomajorminormicro releaselevelserialcd|j|j|jd|jddkrdnd|jd|jdf|jdkzS)Nz{}.{}.{}z{}{}{}rcrfinal)formatrrrr r selfs tE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/pyparsing/__init__.py __version__zversion_info.__version__js   dj$*dj A A,Q/366CCB%a(K  7*, , cNdt|jtS)Nz {} {} / {})r__name__r__version_time__rs r__str__zversion_info.__str__xs""8T-=?OPPPrc dtt|jddt |j|DS)Nz {}.{}({})z, c3*K|]}dj|VdS)z{}={!r}N)r).0nvs r z(version_info.__repr__..s-NN&i&+NNNNNNr)rrtypejoinzip_fieldsrs r__repr__zversion_info.__repr__{sS!!  JJ  IINNc$,6M6MNNN N N   rN) r __module__ __qualname__int__annotations__strpropertyrrr#rrrrcs JJJ JJJ JJJ KKK    X  QQQ     rr rz05 May 2022 07:02 UTCz+Paul McGuire )*)__diag__ __compat__)_builtin_exprs) unicode_setUnicodeRangeListpyparsing_unicode)pyparsing_test)pyparsing_commonr1r4r6r5)rr __author__r0r/And AtLineStart AtStringStartCaselessKeywordCaselessLiteral CharsNotInCombineDictEachEmpty FollowedByForward GoToColumnGroup IndentedBlockKeywordLineEnd LineStartLiteralLocated PrecededBy MatchFirstNoMatchNotAny OneOrMoreOnlyOnceOpAssocOptOptionalOrParseBaseExceptionParseElementEnhanceParseExceptionParseExpressionParseFatalException ParseResultsParseSyntaxException ParserElement PositionToken QuotedStringRecursiveGrammarExceptionRegexSkipTo StringEnd StringStartSuppressTokenTokenConverterWhiteWordWordEnd WordStart ZeroOrMoreChar alphanumsalphas alphas8bit any_close_tag any_open_tagc_style_commentcolcommon_html_entity counted_arraycpp_style_commentdbl_quoted_stringdbl_slash_commentdelimited_listdict_ofemptyhexnums html_comment identcharsidentbodycharsjava_style_commentlineline_end line_startlinenomake_html_tags make_xml_tagsmatch_only_at_colmatch_previous_exprmatch_previous_literal nested_exprnull_debug_actionnumsone_of printablespunc8bitpython_style_comment quoted_string remove_quotes replace_withreplace_html_entity rest_of_linesgl_quoted_stringsrange string_end string_starttrace_parse_actionunicode_stringwith_attribute indentedBlockoriginal_text_forungroupinfix_notation locatedExpr with_class CloseMatch token_mapr6r4r2condition_as_parse_actionr5__versionTime__ anyCloseTag anyOpenTag cStyleCommentcommonHTMLEntity countedArraycppStyleCommentdblQuotedStringdblSlashComment delimitedListdictOf htmlCommentjavaStyleCommentlineEnd lineStart makeHTMLTags makeXMLTagsmatchOnlyAtColmatchPreviousExprmatchPreviousLiteral nestedExprnullDebugActiononeOfopAssocpythonStyleComment quotedString removeQuotesreplaceHTMLEntity replaceWith restOfLinesglQuotedString stringEnd stringStarttraceParseAction unicodeString withAttributeroriginalTextFor infixNotationr withClasstokenMapconditionAsParseActionautoname_elementsN)__doc__typingrr__version_info__rrrr7util exceptionsactionscorer/r0resultsr1core_builtin_exprshelpershelper_builtin_exprsunicoder2r3r4testingr5commonr6common_builtin_exprsglobals__all__r*rrrs2F N     :   @ <1a!44** " : &&&&&&&&666666;;;;;;PPPPPPPPPP...... ggii''WWYY&&7799$$N*-AAAf f f rPK{5ZJ99QLib/site-packages/setuptools/_vendor/pyparsing/__pycache__/common.cpython-311.pycnuW+A b;d2ddlTddlmZmZmZddlmZGddZdeeDZ dS) )*)delimited_list any_open_tag any_close_tag)datetimec eZdZdZeeZ eeZ e e  d eZ e e d eedZ ed d eZ e edze ez dZ ed eeeed ezzz d Z eeed  d  eZ ed d eZ eezezdZ ed d eZ e ee dZ ed dZ! ed dZ"e"de"zdzz dZ#ee"de"zdzzdzee"de"zdzzz dZ$e$%dde!z d Z&e'e#e&ze$z d! d!Z( ed" d#Z) e*d?d%e+fd&Z,e*d@d%e+fd(Z-ed) d*Z. ed+ d,Z/ ed- d.Z0 e1je2jzZ3e*d/e+d0ed1e4fd2Z5e'e6e7d3e8ze e9d34zee:d5e;e8d3zzz d6Z<e=ee>?eS)Apyparsing_commona" Here are some common low-level expressions that may be useful in jump-starting parser development: - numeric forms (:class:`integers`, :class:`reals`, :class:`scientific notation`) - common :class:`programming identifiers` - network addresses (:class:`MAC`, :class:`IPv4`, :class:`IPv6`) - ISO8601 :class:`dates` and :class:`datetime` - :class:`UUID` - :class:`comma-separated list` - :class:`url` Parse actions: - :class:`convertToInteger` - :class:`convertToFloat` - :class:`convertToDate` - :class:`convertToDatetime` - :class:`stripHTMLTags` - :class:`upcaseTokens` - :class:`downcaseTokens` Example:: pyparsing_common.number.runTests(''' # any int or real number, returned as the appropriate type 100 -100 +100 3.14159 6.02e23 1e-12 ''') pyparsing_common.fnumber.runTests(''' # any int or real number, returned as float 100 -100 +100 3.14159 6.02e23 1e-12 ''') pyparsing_common.hex_integer.runTests(''' # hex numbers 100 FF ''') pyparsing_common.fraction.runTests(''' # fractions 1/2 -3/4 ''') pyparsing_common.mixed_integer.runTests(''' # mixed fractions 1 1/2 -3/4 1-3/4 ''') import uuid pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID)) pyparsing_common.uuid.runTests(''' # uuid 12345678-1234-5678-1234-567812345678 ''') prints:: # any int or real number, returned as the appropriate type 100 [100] -100 [-100] +100 [100] 3.14159 [3.14159] 6.02e23 [6.02e+23] 1e-12 [1e-12] # any int or real number, returned as float 100 [100.0] -100 [-100.0] +100 [100.0] 3.14159 [3.14159] 6.02e23 [6.02e+23] 1e-12 [1e-12] # hex numbers 100 [256] FF [255] # fractions 1/2 [0.5] -3/4 [-0.75] # mixed fractions 1 [1] 1/2 [0.5] -3/4 [-0.75] 1-3/4 [1.75] # uuid 12345678-1234-5678-1234-567812345678 [UUID('12345678-1234-5678-1234-567812345678')] integerz hex integerz[+-]?\d+zsigned integer/fractionc$|d|dz S)Nr)tts rE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/pyparsing/common.pyzpyparsing_common.sAB-z"fraction or mixed integer-fractionz[+-]?(?:\d+\.\d*|\.\d+)z real numberz@[+-]?(?:\d+(?:[eE][+-]?\d+)|(?:\d+\.\d*|\.\d+)(?:[eE][+-]?\d+)?)z$real number with scientific notationnumberz[+-]?\d+\.?\d*([eE][+-]?\d+)?fnumber identifierzK(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}z IPv4 addressz[0-9a-fA-F]{1,4} hex_integer:zfull IPv6 address)rz::zshort IPv6 addressc<td|DdkS)Nc3XK|]%}tj|!dV&dS)rN)r _ipv6_partmatches).0rs r z,pyparsing_common...s9OOB'7'B'J'J2'N'NOaOOOOOOr)sumts rrzpyparsing_common.s##OO!OOOOORSSrz::ffff:zmixed IPv6 addressz IPv6 addressz:[0-9a-fA-F]{2}([:.-])[0-9a-fA-F]{2}(?:\1[0-9a-fA-F]{2}){4}z MAC address%Y-%m-%dfmtcfd}|S)a Helper to create a parse action for converting parsed date string to Python datetime.date Params - - fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%d"``) Example:: date_expr = pyparsing_common.iso8601_date.copy() date_expr.setParseAction(pyparsing_common.convertToDate()) print(date_expr.parseString("1999-12-31")) prints:: [datetime.date(1999, 12, 31)] c tj|dS#t$r#}t ||t |d}~wwxYwNr)rstrptimedate ValueErrorParseExceptionstr)ssllrver)s rcvt_fnz0pyparsing_common.convert_to_date..cvt_fnsb 6(A4499;;; 6 6 6$RSWW555 6s,0 AAArr)r5s` rconvert_to_datez pyparsing_common.convert_to_dates#& 6 6 6 6 6  r%Y-%m-%dT%H:%M:%S.%fcfd}|S)aHelper to create a parse action for converting parsed datetime string to Python datetime.datetime Params - - fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%dT%H:%M:%S.%f"``) Example:: dt_expr = pyparsing_common.iso8601_datetime.copy() dt_expr.setParseAction(pyparsing_common.convertToDatetime()) print(dt_expr.parseString("1999-12-31T23:59:59.999")) prints:: [datetime.datetime(1999, 12, 31, 23, 59, 59, 999000)] c tj|dS#t$r#}t||t |d}~wwxYwr,)rr-r/r0r1)slr'r4r)s rr5z4pyparsing_common.convert_to_datetime..cvt_fn*sV 4(1s333 4 4 4$Q3r77333 4s A AA rr6s` rconvert_to_datetimez$pyparsing_common.convert_to_datetimes#& 4 4 4 4 4  rz7(?P\d{4})(?:-(?P\d\d)(?:-(?P\d\d))?)?z ISO8601 datez(?P\d{4})-(?P\d\d)-(?P\d\d)[T ](?P\d\d):(?P\d\d)(:(?P\d\d(\.\d*)?)?)?(?PZ|[+-]\d\d:?\d\d)?zISO8601 datetimez2[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}UUIDr;r<tokenscLtj|dS)aParse action to remove HTML tags from web page HTML source Example:: # strip HTML links from normal text text = 'More info at the pyparsing wiki page' td, td_end = makeHTMLTags("TD") table_text = td + SkipTo(td_end).setParseAction(pyparsing_common.stripHTMLTags)("body") + td_end print(table_text.parseString(text).body) Prints:: More info at the pyparsing wiki page r)r _html_strippertransform_string)r;r<r?s rstrip_html_tagsz pyparsing_common.strip_html_tagsAs  .??q JJJr,) exclude_charsz commaItem)defaultzcomma separated listc*|SN)upperr&s rrzpyparsing_common.dsQWWYYrc*|SrJ)lowerr&s rrzpyparsing_common.gsqwwyyra^(?:(?:(?Phttps?|ftp):)?\/\/)(?:(?P\S+(?::\S*)?)@)?(?P(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(:(?P\d{2,5}))?(?P\/[^?# ]*)?(\?(?P[^#]*))?(#(?P\S*))?$urlN)r()r8)K__name__ __module__ __qualname____doc__ token_mapintconvert_to_integerfloatconvert_to_floatWordnumsset_nameset_parse_actionr hexnumsrRegexsigned_integerradd_parse_actionOptsuppress mixed_integerr%realsci_realsetName streamlinerr identcharsidentbodycharsr ipv4_addressr _full_ipv6_address_short_ipv6_address add_condition_mixed_ipv6_addressCombine ipv6_address mac_address staticmethodr1r7r= iso8601_dateiso8601_datetimeuuidrrrA ParseResultsrC OneOrMoreLiteralLineEnd printablesWhite FollowedBy _commasepitemr quoted_stringcopycomma_separated_list upcase_tokensdowncase_tokensrNconvertToIntegerconvertToFloat convertToDateconvertToDatetime stripHTMLTags upcaseTokensdowncaseTokensrrrr r sOOb#3!y''d4jj!!),,==>PQQGD W }-->>yyb?Q?QRRG k " # #  , - - W ))*:;;   .   + +,< = = >hz  U 77888 >CCC(9(9(;(;h(F$G$GGGh344g""3''' ()) -  * + + M QRR 8 9 9  * + + /o. 7 7 A A L L N NFG .// )    * + + 4j.11::<HHJd5Vh~3*++44]CCJ$j(8A'==GG J# *f4 455   #jC*,66 7 7 8h#$$  %%SS%|3==>RSS7 1 14G GQQ   h~  0%Eh}GS\4\45Bh~$u Rh!""] 5F G G P PQW X XD5*\*,,/E}/E/G/GGNK3K3K KKK\K$  I 799*$z5556#eeElljjS&A&A%AABBC      +  *> M   = 0"===h%&&e L+>+>!?!?@@M7"l99-@-@#A#ABBO7 %* . . \huoo]d*%N#M+#M L$NNNrr c<g|]}t|t|Sr) isinstance ParserElement)r"vs r rs7 *Q 2N2NrN) corehelpersrrrrr varsvalues_builtin_exprsrrrrs@@@@@@@@@@[%[%[%[%[%[%[%[%| t$%%,,..rPK{5Z~xK<<OLib/site-packages/setuptools/_vendor/pyparsing/__pycache__/core.cpython-311.pycnuW+A b;d>A UddlZddlZddlmZmZmZmZmZmZmZm Z m Z m Z ddl m Z mZddlmZddlZddlZddlZddlZddlZddlmZddlZddlZddlmZddlmZddlmZdd l m!Z!d d l"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z+m,Z-d d l.Td d l/Td d l0m1Z1m2Z2d dl3m4Z4ej5Z6e7e8fZ9ee:dfe;d<ej<dkrddlm=Z=n GddZ=Gdde%Z>Gdde%Z?GddeZ@de@ddfdZAde@ddfdZBddZC[%d eje7d!ejDe7deEfd"ZFeFejGejHId#r eCeJeKeLeMeNeOePeQeReSeTh ZUejVZWeegefee1gefeeXe1gefee7eXe1geffZYeegeEfee1geEfeeXe1geEfee7eXe1geEffZZee7eXd$e[gdfZ\ee7eXd$eEgdfZ]ee7eXeXd$e1eEgdfZ^ee7eXd$e[eEgdfZ_ej`ejazZbe4jcjdZde4jcjeZed%Zfefd&zZgebefzZhd'id(ejjDZkdalejme;d)<dd+Zn dd-eZd.e7d/eEdeYfd0Zo dd1e7d2eXd3d$d4eEfd5Zp dd1e7d6eXd7eXd3d$d8e1d4eEf d9Zq dd1e7d2eXd3d$d:e[d4eEf d;Zrd<ZsGd=d$e ZtGd>d?etZuGd@dAetZvGdBdCevZwGdDdEevZxGdFdGevZyGdHdIeyZzeyet_{GdJdKevZ|GdLdMeyZ}GdNdOe|Z~GdPdQevZGdRdSevZGdTdUeZGdVdWeZGdXdYevZGdZd[evZGd\d]evZGd^d_evZGd`daevZGdbdceZGdddeeZGdfdgeZGdhdieZGdjdkeZGdldmeZGdndoeZGdpdqetZGdrdseZGdtdueZGdvdweZGdxdyeZGdzd{etZGd|d}eZGd~deZGddeZGddeZGddeZGddeZGddeZGddeZGddeZGddeZGddZGddeZeZDGddeZGddeZGddeZGddeZGddeZGddeZGddeZdeYdeYfdZewdZedZedZedZedZee(dddZeddZeddZeezezedd zZeeedzezZeydeddzeeeezdzdzZde7de7fdZdeYfdZddZeeddzdZeeddzdZeeddzeddzzd¦ZedezdĦZedŦZedƦZdDŽeDZeete;d<eZeoZesZeZeZeZeZeZeZeZeZeZdS)N) NamedTupleUnionCallableAny GeneratorTupleListTextIOSetSequence)ABCabstractmethod)Enum)Iterable) itemgetter)wraps)RLock)Path) _FifoCache_UnboundedCache__config_flags_collapse_string_to_ranges_escape_regex_range_chars_bslash_flattenLRUMemo UnboundedMemo)*) ParseResults_ParseResultsWithOffset)pyparsing_unicode.str_type))cached_propertyceZdZdZddZdS)r&c||_dSN)_func)selffuncs pE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/pyparsing/core.py__init__zcached_property.__init__Qs DJJJNcX||x}|j|jj<|Sr))r*__dict____name__)r+instanceownerrets r-__get__zcached_property.__get__Ts*;?::h;O;O OC(#DJ$78Jr/r))r2 __module__ __qualname__r.r6r/r-r&r&Ps7         r/r&cjeZdZdZdZdZdeDZdZ dS) __compat__aJ A cross-version compatibility configuration for pyparsing features that will be released in a future version. By setting values in this configuration to True, those features can be enabled in prior versions for compatibility development and testing. - ``collect_all_And_tokens`` - flag to enable fix for Issue #63 that fixes erroneous grouping of results names when an :class:`And` expression is nested within an :class:`Or` or :class:`MatchFirst`; maintained for compatibility, but setting to ``False`` no longer restores pre-2.3.1 behavior compatibilityTc<g|]}|d|S_ startswith.0__s r- z__compat__.j)BBBr}}S/A/AB"BBBr/z( collect_all_And_tokens N) r2r7r8__doc__ _type_desccollect_all_And_tokenslocals _all_namessplit _fixed_namesr9r/r-r;r;YsQ  !J!BBvvxxBBBJ EGGLLr/r;ceZdZdZdZdZdZdZdZdZ dZ dZ de DZ de DZde DZed dZdS) __diag__ diagnosticFc<g|]}|d|Sr>r@rBs r-rEz__diag__.|rFr/c<g|]}|d|S)warnr@rCnames r-rEz__diag__.}s)MMMtT__V5L5LMdMMMr/c<g|]}|d|S) enable_debugr@rTs r-rEz__diag__.~s)SSST4??>3R3RSDSSSr/returnNcD|jD]}||dSr))_warning_namesenable)clsrUs r-enable_all_warningsz__diag__.enable_all_warningss3&  D JJt      r/rXN)r2r7r8rH)warn_multiple_tokens_in_named_alternation)warn_ungrouped_named_tokens_in_collectionwarn_name_set_on_empty_Forward!warn_on_parse_using_empty_Forwardwarn_on_assignment_to_Forward%warn_on_multiple_string_args_to_oneof(warn_on_match_first_with_lshift_operator!enable_debug_on_named_expressionsrJrKrZ _debug_names classmethodr]r9r/r-rOrOpsJ05-05-%*"(-%$)!,1)/4,(-%BBvvxxBBBJMMzMMMNSSZSSSL[r/rOc2eZdZdZdZdZdZdZdZdZ dZ d Z d S) Diagnosticsa Diagnostic configuration (all default to disabled) - ``warn_multiple_tokens_in_named_alternation`` - flag to enable warnings when a results name is defined on a :class:`MatchFirst` or :class:`Or` expression with one or more :class:`And` subexpressions - ``warn_ungrouped_named_tokens_in_collection`` - flag to enable warnings when a results name is defined on a containing expression with ungrouped subexpressions that also have results names - ``warn_name_set_on_empty_Forward`` - flag to enable warnings when a :class:`Forward` is defined with a results name, but has no contents defined - ``warn_on_parse_using_empty_Forward`` - flag to enable warnings when a :class:`Forward` is defined in a grammar but has never had an expression attached to it - ``warn_on_assignment_to_Forward`` - flag to enable warnings when a :class:`Forward` is defined but is overwritten by assigning using ``'='`` instead of ``'<<='`` or ``'<<'`` - ``warn_on_multiple_string_args_to_oneof`` - flag to enable warnings when :class:`one_of` is incorrectly called with multiple str arguments - ``enable_debug_on_named_expressions`` - flag to auto-enable debug on all subsequent calls to :class:`ParserElement.set_name` Diagnostics are enabled/disabled by calling :class:`enable_diag` and :class:`disable_diag`. All warnings can be enabled by calling :class:`enable_all_warnings`. rrr$N) r2r7r8rGr_r`rarbrcrdrerfr9r/r-rjrjsL,12-01-%&"()%$%!,-)/0,()%%%r/rj diag_enumrXcDt|jdS)zO Enable a global pyparsing diagnostic flag (see :class:`Diagnostics`). N)rOr[rUrps r- enable_diagrss OOIN#####r/cDt|jdS)zP Disable a global pyparsing diagnostic flag (see :class:`Diagnostics`). N)rOdisablerUrrs r- disable_diagrvs  Y^$$$$$r/c8tdS)zU Enable all global pyparsing diagnostic warnings (see :class:`Diagnostics`). N)rOr]r9r/r-r]r]s   """""r/cmd_line_warn_options warn_env_varc@t|}|D]}|dzddd\}}}}}|ds|s|s|r|dkrd}^|dr|dvrd}|S) Nz:::::rmi pyparsingT)r}F)boolrLlowerrA) rxryr[warn_optw_action w_message w_categoryw_modulew_lines r-_should_enable_warningsrs,  F)  =E=NO2O2OF Mr/PYPARSINGENABLEALLWARNINGS ParserElement 0123456789 ABCDEFabcdefr~c.g|]}|tjv|Sr9)string whitespacerCcs r-rErEs%PPPAQf>O5O5Oa5O5O5Or/_trim_arity_call_liner$cBtvrfdSddd dd}tptjddatdtd |zffd }t d t d j}||_j|_|S)zAdecorator to trim function calls to match the arity of the targetc|Sr)r9)sltr,s r-z_trim_arity.. sttAwwr/rFcTtj||}|d}|ddgS)Nlimitrk) traceback extract_tb)tbrframes frame_summarys r-rz_trim_arity..extract_tbs2%b666r bqb!""r/rorkrrrc |d}d|S#t$rB}r|j}|dddd k}~|r kr dz Yd}~Yd}~wwxYw)NrTrkrr) TypeError __traceback__) argsr5tertrim_arity_type_errorr found_arityr,r max_limitpa_call_line_synths r-wrapperz_trim_arity..wrappers  dDL)"     )B" 2Q///3BQB7;MM*,% 9,,!QJE$HHHH! s A!7AAA!r2 __class__r)_single_arg_builtinsrr extract_stackgetattrr2rG) r,r LINE_DIFFr func_namerrrrs `` @@@@r- _trim_arityrs ###&&&&& EK####I3Zi6MTU6V6V6VWY6Z/24I!4Ly4XY8j'$ *D*D*MNNI GlGO Nr/Ffnmessagefatalc||nd|rtntttfd}|S)aC Function to convert a simple predicate function that returns ``True`` or ``False`` into a parse action. Can be used in places when a parse action is required and :class:`ParserElement.add_condition` cannot be used (such as when adding a condition to an operator level in :class:`infix_notation`). Optional keyword arguments: - ``message`` - define a custom message to be used in the raised exception - ``fatal`` - if True, will raise :class:`ParseFatalException` to stop parsing immediately; otherwise will raise :class:`ParseException` Nzfailed user-defined conditioncVt|||s ||dSr))r)rrrexc_typermsgs r-paz%condition_as_parse_action..paVs=BBq!QKK   &(1a%% % & &r/)ParseFatalExceptionParseExceptionrr)rrrrrrs` @@r-condition_as_parse_actionrBsk (''.MC&+?""H RB 2YY&&&&&&Y& Ir/instringlocexpr cache_hitc|rdnd}td|||t||t||t ||dt||dz zdS)Nrr~z&{}Match {} at loc {}({},{}) {} {}^ r)printformatlinenocolline)rrrr cache_hit_strs r-_default_start_debug_actionr^s%,CC"M 6 = =sH%%C""S(##s3))A-.       r/startlocendloctoksc~|rdnd}td|||dS)Nrr~z{}Matched {} -> {})rras_list)rrrrrrrs r-_default_success_debug_actionrqsA%,CC"M  % %mT4<<>> J JKKKKKr/excc |rdnd}td||t|j|dS)Nrr~z {}Match {} failed, {} raised: {})rrtyper2)rrrrrrs r-_default_exception_debug_actionr}sS%,CC"M *11 4c!3S  r/cdS)zG'Do-nothing' debug action, to suppress debugging output during parsing.Nr9)rs r-null_debug_actionrr/c'eZdZUdZdZeed<dZeed<dZ e j e ed<e ded dfd Ze d e d dfd ZGd deZddefdZded dfdZddZ ddddededed dfdZddZdded dfdZded dfdZded dfdZded dfd Zd!ed dfd"Zd#Z d$Z!dd%Z"d&Z# dd e$e%e&ffd'Z'dd(ed)e%d*ed e%fd+Z(d(ed)e%d efd,Z)e*Z+iZ,e j-e$e%d-efe$e%e.e&e/fffed.<iZ0e*Z1d/d/gZ2 dd e$e%e&ffd0Z3e'Z4e dd1Z5dZ6dZ7e dd2Z8e ddd3d4e j e%d dfd5Z9e ddd3d4e%d7ed dfd8Z: ddd9d(ed:ed;ed e&fd<Z;ee%d?ed@edAe%d e=e$e&e%e%fddff dBZ>ddCd(ed@ed efdDZ?ee%d@edAe%d e&f dEZ@eZe@Ze?ZeVZeWZe\Ze]Ze_ZebZemZesZeSZeTZdS)rz)Abstract base level parser element class.z DEFAULT_WHITE_CHARSFverbose_stacktraceN_literalStringClasscharsrXch|t_tD]}|jrt ||_dS)a Overrides the default whitespace chars Example:: # default whitespace chars are space, and newline Word(alphas)[1, ...].parse_string("abc def\nghi jkl") # -> ['abc', 'def', 'ghi', 'jkl'] # change to just treat newline as significant ParserElement.set_default_whitespace_chars(" \t") Word(alphas)[1, ...].parse_string("abc def\nghi jkl") # -> ['abc', 'def'] N)rr_builtin_exprscopyDefaultWhiteCharsset whiteChars)rrs r-set_default_whitespace_charsz*ParserElement.set_default_whitespace_charss@-2 )# - -D) -"%e** - -r/r\c|t_dS)al Set class to be used for inclusion of string literals into a parser. Example:: # default literal class used is Literal integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") date_str.parse_string("1999/12/31") # -> ['1999', '/', '12', '/', '31'] # change to Suppress ParserElement.inline_literals_using(Suppress) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") date_str.parse_string("1999/12/31") # -> ['1999', '12', '31'] N)rr)r\s r-inline_literals_usingz#ParserElement.inline_literals_usings(-0 )))r/cpeZdZUejeed<ejeed<ejeed<dS)ParserElement.DebugActions debug_try debug_match debug_failN) r2r7r8typingOptionalDebugStartAction__annotations__DebugSuccessActionDebugExceptionActionr9r/r- DebugActionsrsN?#34444_%78888O$8999999r/rsavelistct|_d|_d|_d|_d|_||_d|_ttj |_ d|_ d|_ d|_t|_d|_d|_d|_d|_d|_|ddd|_d|_d|_g|_dS)NTFr~)list parseAction failAction customName _defaultName resultsName saveAsListskipWhitespacerrrrrmayReturnEmptykeepTabs ignoreExprsdebug streamlined mayIndexErrorerrmsg modalResultsr debugActions callPreparse callDuringTrysuppress_warnings_)r+rs r-r.zParserElement.__init__s.2ff<@ ""m?@@%)"# 26&&  !   --dD$?? "57r/ warning_typec:|j||S)aY Suppress warnings emitted for a particular diagnostic on this expression. Example:: base = pp.Forward() base.suppress_warning(Diagnostics.warn_on_parse_using_empty_Forward) # statement would normally raise a warning, but is now suppressed print(base.parseString("x")) )rappend)r+rs r-suppress_warningzParserElement.suppress_warnings  &&|444 r/ctj|}|jdd|_|jdd|_|jrt t j|_|S)a7 Make a copy of this :class:`ParserElement`. Useful for defining different parse actions for the same parsing pattern, using copies of the original parse element. Example:: integer = Word(nums).set_parse_action(lambda toks: int(toks[0])) integerK = integer.copy().add_parse_action(lambda toks: toks[0] * 1024) + Suppress("K") integerM = integer.copy().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M") print((integerK | integerM | integer)[1, ...].parse_string("5K 100 640K 256M")) prints:: [5120, 100, 655360, 268435456] Equivalent form of ``expr.copy()`` is just ``expr()``:: integerM = integer().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M") N)copyrrrrrrr)r+cpys r-r zParserElement.copysZ,ioo*111-*111-  % D !BCCCN r/)listAllMatchesrUlist_all_matchesrc6|p|}|||S)a Define name for referencing matching tokens as a nested attribute of the returned parse results. Normally, results names are assigned as you would assign keys in a dict: any existing value is overwritten by later values. If it is necessary to keep all values captured for a particular results name, call ``set_results_name`` with ``list_all_matches`` = True. NOTE: ``set_results_name`` returns a *copy* of the original :class:`ParserElement` object; this is so that the client can define a basic element, such as an integer, and reference it in multiple places with different names. You can also set results names using the abbreviated syntax, ``expr("name")`` in place of ``expr.set_results_name("name")`` - see :class:`__call__`. If ``list_all_matches`` is required, use ``expr("name*")``. Example:: date_str = (integer.set_results_name("year") + '/' + integer.set_results_name("month") + '/' + integer.set_results_name("day")) # equivalent form: date_str = integer("year") + '/' + integer("month") + '/' + integer("day") )_setResultsName)r+rUrrs r-set_results_namezParserElement.set_results_names%<(;+;##D.999r/c||S|}|dr |dd}d}||_| |_|S)NrrT)r endswithrr)r+rUrnewselfs r-rzParserElement._setResultsName1sW <K))++ ==   "9D!N"#11r/T break_flagc|r|jdfd }|_||_n&t|jdr|jj|_|S)z Method to invoke the Python pdb debugger when this element is about to be parsed. Set ``break_flag`` to ``True`` to enable, ``False`` to disable. TcPddl}|||||SNr)pdb set_trace)rr doActions callPreParser _parseMethods r-breakerz(ParserElement.set_break..breakerEs1  #|Hc9lKKKr/_originalParseMethodTT)_parser hasattr)r+rrrs @r- set_breakzParserElement.set_break<sq  ?;L L L L L L L,8G (!DKKt{$:;; ?"k>  r/fnsct|dgkrg|_nhtd|Dstdd|D|_|d|dd|_|S)ao Define one or more actions to perform when successfully matching parse element definition. Parse actions can be called to perform data conversions, do extra validation, update external data structures, or enhance or replace the parsed tokens. Each parse action ``fn`` is a callable method with 0-3 arguments, called as ``fn(s, loc, toks)`` , ``fn(loc, toks)`` , ``fn(toks)`` , or just ``fn()`` , where: - s = the original string being parsed (see note below) - loc = the location of the matching substring - toks = a list of the matched tokens, packaged as a :class:`ParseResults` object The parsed tokens are passed to the parse action as ParseResults. They can be modified in place using list-style append, extend, and pop operations to update the parsed list elements; and with dictionary-style item set and del operations to add, update, or remove any named results. If the tokens are modified in place, it is not necessary to return them with a return statement. Parse actions can also completely replace the given tokens, with another ``ParseResults`` object, or with some entirely different object (common for parse actions that perform data conversions). A convenient way to build a new parse result is to define the values using a dict, and then create the return value using :class:`ParseResults.from_dict`. If None is passed as the ``fn`` parse action, all previously added parse actions for this expression are cleared. Optional keyword arguments: - call_during_try = (default= ``False``) indicate if parse action should be run during lookaheads and alternate testing. For parse actions that have side effects, it is important to only call the parse action once it is determined that it is being called as part of a successful parse. For parse actions that perform additional validation, then call_during_try should be passed as True, so that the validation code is included in the preliminary "try" parses. Note: the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`parse_string` for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. Example:: # parse dates in the form YYYY/MM/DD # use parse action to convert toks from str to int at parse time def convert_to_int(toks): return int(toks[0]) # use a parse action to verify that the date is a valid date def is_valid_date(instring, loc, toks): from datetime import date year, month, day = toks[::2] try: date(year, month, day) except ValueError: raise ParseException(instring, loc, "invalid date given") integer = Word(nums) date_str = integer + '/' + integer + '/' + integer # add parse actions integer.set_parse_action(convert_to_int) date_str.set_parse_action(is_valid_date) # note that integer fields are now ints, not strings date_str.run_tests(''' # successful parse - note that integer fields were converted to ints 1999/12/31 # fail - invalid date 1999/13/31 ''') Nc34K|]}t|VdSr))callablerCrs r- z1ParserElement.set_parse_action..s(22x||222222r/zparse actions must be callablec,g|]}t|Sr9rr)s r-rEz2ParserElement.set_parse_action..s>>>B B>>>r/call_during_tryrF)rrallrgetrr+r%kwargss r-set_parse_actionzParserElement.set_parse_actionSsV 99  !D  22c22222 B @AAA>>#>>>D !'!6::ou#E#E""D  r/c|xjd|Dz c_|jp)|d|dd|_|S)z Add one or more parse actions to expression's list of parse actions. See :class:`set_parse_action`. See examples in :class:`copy`. c,g|]}t|Sr9r,r)s r-rEz2ParserElement.add_parse_action..s;;;[__;;;r/r-rF)rrr/r0s r-add_parse_actionzParserElement.add_parse_actionsa ;;s;;;;!/ 6:: vzz/5AA4 4  r/c |D]S}|jt||d|ddT|jp)|d|dd|_|S)aAdd a boolean predicate function to expression's list of parse actions. See :class:`set_parse_action` for function call signatures. Unlike ``set_parse_action``, functions passed to ``add_condition`` need to return boolean success/fail of the condition. Optional keyword arguments: - message = define a custom message to be used in the raised exception - fatal = if True, will raise ParseFatalException to stop parsing immediately; otherwise will raise ParseException - call_during_try = boolean to indicate if this method should be called during internal tryParse calls, default=False Example:: integer = Word(nums).set_parse_action(lambda toks: int(toks[0])) year_int = integer.copy() year_int.add_condition(lambda toks: toks[0] >= 2000, message="Only support years 2000 and later") date_str = year_int + '/' + integer + '/' + integer result = date_str.parse_string("1999/12/31") # -> Exception: Only support years 2000 and later (at char 0), (line:1, col:1) rrF)rrr-r)rr rr/r)r+r%r1rs r- add_conditionzParserElement.add_conditions.  B   # #) 9 5 5VZZQV=W=W     "/ 6:: vzz/5AA4 4  r/rc||_|S)a Define action to perform if parsing fails at this expression. Fail acton fn is a callable function that takes the arguments ``fn(s, loc, expr, err)`` where: - s = string being parsed - loc = location where expression match was attempted and failed - expr = the parse expression that failed - err = the exception thrown The function returns no value. It may throw :class:`ParseFatalException` if it is desired to stop parsing immediately.)r)r+rs r-set_fail_actionzParserElement.set_fail_actions r/cd}|r;d}|jD]/} |||\}}d}#t$rY,wxYw|;|SNTF)rr"r)r+rr exprsFoundedummys r-_skipIgnorableszParserElement._skipIgnorabless  J%  *%&XXh%<%< U%) *&D  s . ;;c|jr|||}|jr;t|}|j}||kr|||vr|dz }||kr |||v|SNr)rr?rlenr)r+rrinstrlen white_charss r-preParsezParserElement.preParses   6&&x55C   8}}H/K..Xc]k%A%Aq..Xc]k%A%A r/c |gfSr)r9r+rrrs r- parseImplzParserElement.parseImpls Bwr/c|Sr)r9r+rr tokenlists r- postParsezParserElement.postParsesr/c  d\}}}|j}t|} |s|jr |r|jr|||} n|} | } |jjr|j|| |d|js| | krA ||| |\}} n?#t$rt|| |j |wxYw||| |\}} n#t$rO} |jj r|j || || d|jr||| || d} ~ wwxYw|r|jr|||} n|} | } |js| | krA ||| |\}} n?#t$rt|| |j |wxYw||| |\}} |||| } t| |j|j|j}|jrM|s|jrC|r |jD]y} ||| |} n$#t$r}td}||d}~wwxYw| B| |ur>t| |j|jot+| tt,f|j}zn#t$r0} |jj r|j || || dd} ~ wwxYw|jD]y} ||| |} n$#t$r}td}||d}~wwxYw| B| |ur>t| |j|jot+| tt,f|j}z|r+|jjr|j|| |||d||fS)NrrrkF)asListmodalz exception raised in parse action)rrBrrrErrrrH IndexErrorrr ExceptionrrLr rrrrr isinstancerr)r+rrrrTRYMATCHFAIL debugging len_instringpre_loc tokens_starttokenserr ret_tokensrparse_action_excrs r- _parseNoCachezParserElement._parseNoCaches#UDJ 8}} & K& K "D$5""mmHc::GG!G& $.U%//,eTTT%OL)@)@X&*nnXw &R&R VV%XXX,X|T[RVWWWX#'..7I"N"NKC   $/%00 ,c5?GOOHlD#FFF   1 --#66"L! KW %<%<T"&..7I"N"NKC!TTT(<dSSST#nnXw JJ V#v66! D$T_DDU     ( ( d.@( ' ".<%'R, %K%KFF)<<<"01S"T"TC"%+;;<"-& 2J2J)5 & $ 0'+(M$.v d7K$L$L&*&7 ***J!(3)44$lD#u *B8!#HlJ!G!G%888,-OPP!'778)fJ.F.F%1" ,#'?$I *6L$3G H H"&"3 &&&    , !--lCz5JsACBC"CC D7(A D22D7,F"F) J H,+J, I 6II  AJ K +K  K K++ L 5LL rr raise_fatalc |||ddS#t$r|rt|||j|wxYw)NFrr)r"rrr)r+rrr`s r- try_parsezParserElement.try_parsense C;;x;>>qA A" C C C  3 TBB B Cs  %Acd |||dS#ttf$rYdSwxYwr;)rcrrQ)r+rrs r-can_parse_nextzParserElement.can_parse_nextvsK  NN8S ) ) )4 +   55 s //Forwardrecursion_memosrc xd\}}d\}}} |||||f} tj5tj} | | } | | jurtj|xxdz cc< |||||} | | | d| d|f| cdddS#t$r)} | | | j | j d} ~ wwxYwtj|xxdz cc<|j r<|j jr0 |j |||dn#t$rYnwxYwt!| t"rF|j r=|j jr1 |j |||| dn#t$rYnwxYw| | d| d| d}}}|j r>|j jr2 |j |||||dn#t$rYnwxYw||fcdddS#1swxYwYdS)N)rrrNrrT)rrk)rpackrat_cache_lock packrat_cacher/ not_in_cachepackrat_cache_statsr_rr ParseBaseExceptionrrrrrrrSrRrr)r+rrrrHITMISSrTrUrVlookupcachevaluepeloc_resultrs r- _parseCachezParserElement._parseCaches6 T"UD#|Y?  -( $( $!/EIIf%%E***1$7771<777! ..xiVVE IIfuQxq#&FGGG ( $( $( $( $( $( $( $( $*IIflblBG&<===1#666!;666:$"3"=)33Hc4SW3XXXX$eY// z!d&7&B!! -88 (#tUd9 )!!! D!K',Qxq%(ff:$"3"?)55$dFD&D6%V|Q( $( $( $( $( $( $( $( $( $( $( $( $( $( $( $( $( $( $sAH/%C=8H/ C5 $C00C550H/&EH/ EH/E+H/>FH/ F+(H/*F++AH/. HH/ HH/HH//H36H3ctjdgttjztjdd<tjdSr)rrjclearrBrlrgr9r/r- reset_cachezParserElement.reset_caches^#))+++01sS  -6 6 0 )!!!, %++-----r/ctdt_dt_tjt_dS)a$ Disables active Packrat or Left Recursion parsing and their memoization This method also works if neither Packrat nor Left Recursion are enabled. This makes it safe to call before activating Packrat nor Left Recursion to clear any previous settings. FN)rry_left_recursion_enabled_packratEnabledr_r"r9r/r-disable_memoizationz!ParserElement.disable_memoizations7 !!###05 -(- %,: r/)forcecache_size_limitc(|rtntjrtd|t t_n3|dkrt |t_ntd|zdt_dS)a# Enables "bounded recursion" parsing, which allows for both direct and indirect left-recursion. During parsing, left-recursive :class:`Forward` elements are repeatedly matched with a fixed recursion depth that is gradually increased until finding the longest match. Example:: import pyparsing as pp pp.ParserElement.enable_left_recursion() E = pp.Forward("E") num = pp.Word(pp.nums) # match `num`, or `num '+' num`, or `num '+' num '+' num`, ... E <<= E + '+' - num | num print(E.parse_string("1+2+3")) Recursion search naturally memoizes matches of ``Forward`` elements and may thus skip reevaluation of parse actions during backtracking. This may break programs with parse actions which rely on strict ordering of side-effects. Parameters: - cache_size_limit - (default=``None``) - memoize at most this many ``Forward`` elements during matching; if ``None`` (the default), memoize all ``Forward`` elements. Bounded Recursion parsing works similar but not identical to Packrat parsing, thus the two cannot be used together. Use ``force=True`` to disable any previous, conflicting settings. 0Packrat and Bounded Recursion are not compatibleNr)capacityzMemo size of %sT) rr}r| RuntimeError_UnboundedMemorg_LRUMemoNotImplementedErrorr{rr~s r-enable_left_recursionz#ParserElement.enable_left_recursionsH  S  - - / / / /  * SQRR R  #,:,<,N,O,O,OM ) )%&7:J&JKK K04 ---r/r~c<|rtntjrtdtjsXdt_|t t_nt|t_tjt_ dSdS)af Enables "packrat" parsing, which adds memoizing to the parsing logic. Repeated parse attempts at the same string location (which happens often in many complex grammars) can immediately return a cached value, instead of re-executing parsing/validating code. Memoizing is done of both valid results and parsing exceptions. Parameters: - cache_size_limit - (default= ``128``) - if an integer value is provided will limit the size of the packrat cache; if None is passed, then the cache size will be unbounded; if 0 is passed, the cache will be effectively disabled. This speedup may break existing programs that use parse actions that have side-effects. For this reason, packrat parsing is disabled when you first import pyparsing. To activate the packrat feature, your program must call the class method :class:`ParserElement.enable_packrat`. For best results, call ``enable_packrat()`` immediately after importing pyparsing. Example:: import pyparsing pyparsing.ParserElement.enable_packrat() Packrat parsing works similar but not identical to Bounded Recursion parsing, thus the two cannot be used together. Use ``force=True`` to disable any previous, conflicting settings. rTN) rr}r{rr|rrjrrvr"rs r-enable_packratzParserElement.enable_packrats@  S  - - / / / /  2 SQRR R, =,0M )'.=.?.? ++.89I.J.J +#0#>> res = Word('a').parse_string('aaaaabaaa') >>> print(res) ['aaaaa'] The parsing behavior varies by the inheriting class of this abstract class. Please refer to the children directly to see more examples. It raises an exception if parse_all flag is set and instring does not match the whole grammar. >>> res = Word('a').parse_string('aaaaabaaa', parse_all=True) Traceback (most recent call last): ... pyparsing.ParseException: Expected end of text, found 'b' (at char 5), (line:1, col:6) rN)rryr streamlinerr expandtabsr"rEEmpty StringEndrmrwith_traceback) r+rrrr=rr[sers r- parse_stringzParserElement.parse_string4s!Z(!!###  OO   !  A LLNNNN} -**,,H ++h22KC )mmHc22WWy{{* (C(((M" / / // /((...  /s3A$C D #"DD )r maxMatches max_matchesoverlaprrc#*Kt||}|js||jD]}||js!t |}t|}d}|j} |j } t d} ||kr| |kr | ||} | || d\} }| |krS| dz } |r%t| | | d|| | fV|r| ||}||kr| }n$|dz }n| }n| dz}n#t$r| dz}YnwxYw||kr | |kdSdSdSdS#t$r'}tjr|dd}~wwxYw)at Scan the input string for expression matches. Each match will return the matching tokens, start location, and end location. May be called with optional ``max_matches`` argument, to clip scanning after 'n' matches are found. If ``overlap`` is specified, then overlapping matches will be reported. Note that the start and end locations are reported relative to the string being parsed. See :class:`parse_string` for more information on parsing strings with embedded tabs. Example:: source = "sldjf123lsdjjkf345sldkjf879lkjsfd987" print(source) for tokens, start, end in Word(alphas).scan_string(source): print(' '*start + '^'*(end-start)) print(' '*start + tokens[0]) prints:: sldjf123lsdjjkf345sldkjf879lkjsfd987 ^^^^^ sldjf ^^^^^^^ lsdjjkf ^^^^^^ sldkjf ^^^^^^ lkjsfd rFrr)r[startendN)minrrrrstrrrBrEr"r resetCacherrOrrmrr)r+rrrrrr=rCr preparseFnparseFnmatchesprelocnextLocr[nextlocrs r- scan_stringzParserElement.scan_stringys.N[11   OO   !  A LLNNNN} 28}}//11Hx==] +  """" ///g &:&:)'Z#66F&-ghU&S&S&SOGV}}1  !.4mmoo-3+2!"!"%fg5555"*&0j3&?&?G&}}&- #q")CC$qj/&%%% 1*CCC% //g &:&:&:&://&:&://8" / / // /((...  /s=/ E!<D8AE!8E E! E  E!! F+"F  Frcg}d}d|_ |||D]\}}}|||||rt|tr||z }nUt|t r+t|ts||n|||}|||dd|D}d dt|DS#t$r'}tj r|dd}~wwxYw)ab Extension to :class:`scan_string`, to modify matching text with modified tokens that may be returned from a parse action. To use ``transform_string``, define a grammar and attach a parse action to it that modifies the returned token list. Invoking ``transform_string()`` on a target string will then scan for matches, and replace the matched text patterns according to the logic in the parse action. ``transform_string()`` returns the resulting transformed string. Example:: wd = Word(alphas) wd.set_parse_action(lambda toks: toks[0].title()) print(wd.transform_string("now is the winter of our discontent made glorious summer by this sun of york.")) prints:: Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York. rTrNcg|]}||Sr9r9rCos r-rEz2ParserElement.transform_string..s'''Q'1'''r/r~c,g|]}t|Sr9r)rCrs r-rEz2ParserElement.transform_string..s:::qCFF:::r/)rrr rSr rrr#extendjoinrrmrrr) r+rroutlastErrr=rs r-transform_stringzParserElement.transform_stringso(  /++HE+BB  1a 8E!G,---&!!\22&qyy{{*#Ax00&Ax9P9P& 1  1  JJx' ( ( (''c'''C77::HSMM:::;; ;! / / // /((...  /sDD## E-"EEct||} td||||DS#t$r'}tjr|dd}~wwxYw)a Another extension to :class:`scan_string`, simplifying the access to the tokens found to match the given parse expression. May be called with optional ``max_matches`` argument, to clip searching after 'n' matches are found. Example:: # a capitalized word starts with an uppercase letter, followed by zero or more lowercase letters cap_word = Word(alphas.upper(), alphas.lower()) print(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity")) # the sum() builtin can be used to merge results into a single ParseResults object print(sum(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity"))) prints:: [['More'], ['Iron'], ['Lead'], ['Gold'], ['I'], ['Electricity']] ['More', 'Iron', 'Lead', 'Gold', 'I', 'Electricity'] cg|]\}}}| Sr9r9)rCrrr=s r-rEz/ParserElement.search_string..sVVVwq!QVVVr/rN)rr rrmrrr)r+rrrrrs r- search_stringzParserElement.search_strings8[11  /VV$"2"28Zu"2"U"UVVV " / / // /((...  /s.A A2 "A--A2)includeSeparatorsmaxsplitinclude_separatorsc#K|p|}d}|||D] \}}}|||V|r |dV|}!||dVdS)aT Generator method to split a string using the given expression as a separator. May be called with optional ``maxsplit`` argument, to limit the number of splits; and the optional ``include_separators`` argument (default= ``False``), if the separating matching text should be included in the split results. Example:: punc = one_of(list(".,;:/-!?")) print(list(punc.split("This, this?, this sentence, is badly punctuated!"))) prints:: ['This', ' this', '', ' this sentence', ' is badly punctuated', ''] r)rN)r) r+rrrrlastrrr=s r-rLzParserElement.split(s..C1C''h'GG  GAq!46" " " "  d DDtuuor/c:|turt|St|tr||}t|t s4t dt|j t||gS)ah Implementation of ``+`` operator - returns :class:`And`. Adding strings to a :class:`ParserElement` converts them to :class:`Literal`s by default. Example:: greet = Word(alphas) + "," + Word(alphas) + "!" hello = "Hello, World!" print(hello, "->", greet.parse_string(hello)) prints:: Hello, World! -> ['Hello', ',', 'World', '!'] ``...`` may be used as a parse expression as a short form of :class:`SkipTo`. Literal('start') + ... + Literal('end') is equivalent to: Literal('start') + SkipTo('end')("_skipped*") + Literal('end') Note that the skipped text is returned with '_skipped' as a results name, and to support having multiple skips in the same parser, the value returned is a list of all skipped text. 4Cannot combine element of type {} with ParserElement) Ellipsis _PendingSkiprSr#rrrrrr2Andr+others r-__add__zParserElement.__add__Hs6 H  %% % eX & & 4,,U33E%// FMMKK(  D%=!!!r/c:|turt|d|zSt|tr||}t|t s4t dt|j ||zS)zd Implementation of ``+`` operator when left operand is not a :class:`ParserElement` _skipped*r) rSkipTorSr#rrrrrr2rs r-__radd__zParserElement.__radd__ps H  6$<< ,,t3 3 eX & & 4,,U33E%// FMMKK(  t|r/c&t|tr||}t|ts4t dt |j|t z|zS)zX Implementation of ``-`` operator, returns :class:`And` with error stop r) rSr#rrrrrr2r _ErrorStoprs r-__sub__zParserElement.__sub__s eX & & 4,,U33E%// FMMKK(  cnn&&&..r/ct|tr||}t|ts4t dt |j||z S)zd Implementation of ``-`` operator when left operand is not a :class:`ParserElement` rrSr#rrrrrr2rs r-__rsub__zParserElement.__rsub__x eX & & 4,,U33E%// FMMKK(  t|r/c&|turd}nAt|tr,|ddtfkrd|ddzdzdd}t|tr|d}}nvt|tr,td|D}|d zdd}|d d|df}t|dtrY|dQ|ddkrt S|ddkrt S|dzt zSt|dtr&t|dtr |\}}||z}nst d d d |Dt d t|j |dkrtd|dkrtd||cxkrdkrnntgS|rIfd|r5|dkr|z}nHtg|z|z}n(|}n|dkr}ntg|z}|S)a Implementation of ``*`` operator, allows use of ``expr * 3`` in place of ``expr + expr + expr``. Expressions may also be multiplied by a 2-integer tuple, similar to ``{min, max}`` multipliers in regular expressions. Tuples may also include ``None`` as in: - ``expr*(n, None)`` or ``expr*(n, )`` is equivalent to ``expr*n + ZeroOrMore(expr)`` (read as "at least n instances of ``expr``") - ``expr*(None, n)`` is equivalent to ``expr*(0, n)`` (read as "0 to n instances of ``expr``") - ``expr*(None, None)`` is equivalent to ``ZeroOrMore(expr)`` - ``expr*(1, None)`` is equivalent to ``OneOrMore(expr)`` Note that ``expr*(None, n)`` does not raise an exception if more than n exprs exist in the input stream; that is, ``expr*(None, n)`` does not enforce a maximum number of expr occurrences. If this behavior is desired, then write ``expr*(None, n) + ~expr`` )rNNrrr)rkrc30K|]}|tur|ndVdSr))rrs r-r*z(ParserElement.__mul__..s0JJqq00!!dJJJJJJr/)NNz.cannot multiply ParserElement and ({}) objects,c3>K|]}t|jVdSr)rr2)rCitems r-r*z(ParserElement.__mul__..s+ G Gd!4 G G G G G Gr/z,cannot multiply ParserElement and {} objectsz/cannot multiply ParserElement by negative valuez@second tuple value must be greater or equal to first tuple valuecj|dkrt|dz zStSrA)Opt)nmakeOptionalListr+s r-rz/ParserElement.__mul__..makeOptionalLists;q55t&6&6q1u&=&==>>>t99$r/) rrStupleint ZeroOrMore OneOrMorerrrrr2 ValueErrorr)r+r minElements optElementsr5rs` @r-__mul__zParserElement.__mul__s( H  EE u % % 5%){*B*BE!""I%/!4E eS ! ! ',aKK u % % JJEJJJJJE\)2A2.EQxE!H %(C(( U1X-=8q==%d+++8q==$T??*%(?Z-=-===E!Hc** z%(C/H/H +0( [{* DKK G G G G GGG >EEKK(  ??NOO O ??R  + * * * * * * * * *r77N  0 % % % % % %  4!##!1!1+!>!>>CCtf{2336F6F{6S6SSCC&&{33a4&;.// r/c,||Sr))rrs r-__rmul__zParserElement.__rmul__s||E"""r/c>|turt|dSt|tr||}t|t s4t dt|j t||gS)zP Implementation of ``|`` operator - returns :class:`MatchFirst` T) must_skipr) rrrSr#rrrrrr2 MatchFirstrs r-__or__zParserElement.__or__s H  555 5 eX & & 4,,U33E%// FMMKK(  4-(((r/ct|tr||}t|ts4t dt |j||zS)zd Implementation of ``|`` operator when left operand is not a :class:`ParserElement` rrrs r-__ror__zParserElement.__ror__rr/c t|tr||}t|ts4t dt |jt||gS)zH Implementation of ``^`` operator - returns :class:`Or` r) rSr#rrrrrr2Orrs r-__xor__zParserElement.__xor__s eX & & 4,,U33E%// FMMKK(  4-   r/ct|tr||}t|ts4t dt |j||z S)zd Implementation of ``^`` operator when left operand is not a :class:`ParserElement` rrrs r-__rxor__zParserElement.__rxor__#rr/c t|tr||}t|ts4t dt |jt||gS)zJ Implementation of ``&`` operator - returns :class:`Each` r) rSr#rrrrrr2Eachrs r-__and__zParserElement.__and__1s eX & & 4,,U33E%// FMMKK(  T5M"""r/ct|tr||}t|ts4t dt |j||zS)zd Implementation of ``&`` operator when left operand is not a :class:`ParserElement` rrrs r-__rand__zParserElement.__rand__?rr/c t|S)zL Implementation of ``~`` operator - returns :class:`NotAny` )NotAnyr+s r- __invert__zParserElement.__invert__Msd||r/c  t|tr|f}t|n#t$r||f}YnwxYwt |dkr`td|ddt |dkr"dt |nd|t |ddz}|S)a{ use ``[]`` indexing notation as a short form for expression repetition: - ``expr[n]`` is equivalent to ``expr*n`` - ``expr[m, n]`` is equivalent to ``expr*(m, n)`` - ``expr[n, ...]`` or ``expr[n,]`` is equivalent to ``expr*n + ZeroOrMore(expr)`` (read as "at least n instances of ``expr``") - ``expr[..., n]`` is equivalent to ``expr*(0, n)`` (read as "0 to n instances of ``expr``") - ``expr[...]`` and ``expr[0, ...]`` are equivalent to ``ZeroOrMore(expr)`` - ``expr[1, ...]`` is equivalent to ``OneOrMore(expr)`` ``None`` may be used in place of ``...``. Note that ``expr[..., n]`` and ``expr[m, n]``do not raise an exception if more than ``n`` ``expr``s exist in the input stream. If this behavior is desired, then write ``expr[..., n] + ~expr``. rkz,only 1 or 2 index arguments supported ({}{})Nrmz... [{}]r~)rSr#iterrrBrr)r+keyr5s r- __getitem__zParserElement.__getitem__Ws, #x(( f IIII   *CCC  s88a<<>EEGCHHqLLZ..s3xx888b U3rr7^^# s '*;;cX|||S|S)a Shortcut for :class:`set_results_name`, with ``list_all_matches=False``. If ``name`` is given with a trailing ``'*'`` character, then ``list_all_matches`` will be passed as ``True``. If ``name` is omitted, same as calling :class:`copy`. Example:: # these are equivalent userdata = Word(alphas).set_results_name("name") + Word(nums + "-").set_results_name("socsecno") userdata = Word(alphas)("name") + Word(nums + "-")("socsecno") )rr r+rUs r-__call__zParserElement.__call__s,  ''-- -99;; r/c t|S)z Suppresses the output of this :class:`ParserElement`; useful to keep punctuation from cluttering up returned output. )Suppressrs r-suppresszParserElement.suppresss ~~r/ recursivecd|_|S)z Enables the skipping of whitespace before matching the characters in the :class:`ParserElement`'s defined pattern. :param recursive: If ``True`` (the default), also enable whitespace skipping in child elements (if any) Trr+rs r-ignore_whitespacezParserElement.ignore_whitespaces# r/cd|_|S)a| Disables the skipping of whitespace before matching the characters in the :class:`ParserElement`'s defined pattern. This is normally only used internally by the pyparsing module, but may be needed in some whitespace-sensitive grammars. :param recursive: If true (the default), also disable whitespace skipping in child elements (if any) Frrs r-leave_whitespacezParserElement.leave_whitespaces$ r/ copy_defaultscJd|_t||_||_|S)z8 Overrides the default whitespace chars T)rrrr)r+rrs r-set_whitespace_charsz"ParserElement.set_whitespace_charss& #e**%2" r/cd|_|S)z Overrides default behavior to expand ```` s to spaces before parsing the input string. Must be called before ``parse_string`` when the input grammar contains elements that match ```` characters. T)rrs r-parse_with_tabszParserElement.parse_with_tabss   r/rc:ddl}t|trt|}t|tr$||jvr|j|n9|jt||S)a Define expression to be ignored (e.g., comments) while doing pattern matching; may be called repeatedly, to define multiple comment or other ignorable patterns. Example:: patt = Word(alphas)[1, ...] patt.parse_string('ablaj /* comment */ lskjd') # -> ['ablaj'] patt.ignore(c_style_comment) patt.parse_string('ablaj /* comment */ lskjd') # -> ['ablaj', 'lskjd'] rN)rrSr#rrr r )r+rrs r-ignorezParserElement.ignores  eX & & $UOOE eX & & <D,,, ''...   # #HUZZ\\$:$: ; ; ; r/ start_actionsuccess_actionexception_actioncv||pt|pt|pt|_d|_|S)a  Customize display of debugging messages while doing pattern matching: - ``start_action`` - method to be called when an expression is about to be parsed; should have the signature ``fn(input_string: str, location: int, expression: ParserElement, cache_hit: bool)`` - ``success_action`` - method to be called when an expression has successfully parsed; should have the signature ``fn(input_string: str, start_location: int, end_location: int, expression: ParserELement, parsed_tokens: ParseResults, cache_hit: bool)`` - ``exception_action`` - method to be called when expression fails to parse; should have the signature ``fn(input_string: str, location: int, expression: ParserElement, exception: Exception, cache_hit: bool)`` T)rrrrrr)r+rrrs r-set_debug_actionszParserElement.set_debug_actionssE$!--  77  ;;  ? ?     r/flagcf|r'|tttnd|_|S)a Enable display of debugging messages while doing pattern matching. Set ``flag`` to ``True`` to enable, ``False`` to disable. Example:: wd = Word(alphas).set_name("alphaword") integer = Word(nums).set_name("numword") term = wd | integer # turn on debugging for wd wd.set_debug() term[1, ...].parse_string("abc 123 xyz 890") prints:: Match alphaword at loc 0(1,1) Matched alphaword -> ['abc'] Match alphaword at loc 3(1,4) Exception raised:Expected alphaword (at char 4), (line:1, col:5) Match alphaword at loc 7(1,8) Matched alphaword -> ['xyz'] Match alphaword at loc 11(1,12) Exception raised:Expected alphaword (at char 12), (line:1, col:13) Match alphaword at loc 15(1,16) Exception raised:Expected alphaword (at char 15), (line:1, col:16) The output shown is that produced by the default debug actions - custom debug actions can be specified using :class:`set_debug_actions`. Prior to attempting to match the ``wd`` expression, the debugging message ``"Match at loc (,)"`` is shown. Then if the parse succeeds, a ``"Matched"`` message is shown, or an ``"Exception raised"`` message is shown. Also note the use of :class:`set_name` to assign a human-readable name to the expression, which makes debugging and exception messages easier to understand - for instance, the default name created for the :class:`Word` expression without calling ``set_name`` is ``"W:(A-Za-z)"``. F)rrrrr)r+rs r- set_debugzParserElement.set_debugsAJ    " "+-/     DJ r/cP|j||_|jSr))r_generateDefaultNamers r- default_namezParserElement.default_name(s(   $ $ 9 9 ; ;D   r/cdS)zg Child classes must define this method, which defines how the ``default_name`` is set. Nr9rs r-rz"ParserElement._generateDefaultName.rr/cr||_d|jz|_tjr||S)a\ Define name for this expression, makes debugging and exception messages clearer. Example:: Word(nums).parse_string("ABC") # -> Exception: Expected W:(0-9) (at char 0), (line:1, col:1) Word(nums).set_name("integer").parse_string("ABC") # -> Exception: Expected integer (at char 0), (line:1, col:1) Expected )rrUrrOrfrrs r-set_namezParserElement.set_name4s9!DI-  5  NN    r/c,|j|jn|jSr))rrrs r-rUzParserElement.nameAs#'/"=t4CTTr/c|jSr)rUrs r-__str__zParserElement.__str__Fs yr/c t|Sr)rrs r-__repr__zParserElement.__repr__Is4yyr/c"d|_d|_|SNT)rrrs r-rzParserElement.streamlineLs  r/cgSr)r9rs r-recursezParserElement.recurseQ r/cz|dd|gz}|D]}||dSr))r&_checkRecursionr+parseElementListsubRecCheckListr=s r-r)zParserElement._checkRecursionTsO*111-6 / /A  o . . . . / /r/c0|gdS)zj Check defined expressions for valid structure, check for infinite recursive definitions. N)r))r+ validateTraces r-validatezParserElement.validateYs R     r/utf-8file_or_filenameencodingch|p|} |}nN#t$rAt|d|5}|}dddn #1swxYwYYnwxYw |||S#t$r'}t jr|dd}~wwxYw)z Execute the parse expression on the given file or filename. If a filename is specified (instead of a file object), the entire file is opened, read, and closed before parsing. rr2N)readAttributeErroropenrrmrrr)r+r1r2rr file_contentsfrs r- parse_filezParserElement.parse_file_s(y ),1133MM ) ) )&h??? )1 !  ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) /$$]H== =! / / // /((...  /sJA&A A&A A&A A&%A&*B B1 "B,,B1c||urdSt|tr||dSt|tr t |t |kSdS)NTrF)rSr#rrvarsrs r-__eq__zParserElement.__eq__{sf 5==4 x ( ( -<<<66 6 } - - -::e, ,ur/c t|Sr))idrs r-__hash__zParserElement.__hash__s $xxr/ test_stringcz|o|} |t||dS#t$rYdSwxYw)a Method for quick testing of a parser against a test string. Good for simple inline microtests of sub expressions while building up larger parser. Parameters: - ``test_string`` - to test against this expression for a match - ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests Example:: expr = Word(nums) assert expr.matches("100") r=TF)rrrm)r+rCrrs r-rzParserElement.matchess[ )     c+..(  C C C4!   55 s $, ::#)rfullDump printResults failureTestsrLtestscomment full_dump print_results failure_tests post_parsefilewith_line_numbersrFrGrHrLc  V ddlm}| o|} | o|} | o|} | p|} |p|}t|trFt |jfd|D}t|trt|}| tj }|j }g}g}d}td tdt}d}|D]}|||d s|r/|s-|| r||n|L|sO|rdd|znd | r||n|g}g} |||}||| }|o| }| |||}|`t|t.r(||nJ|t3|n'||n#t4$ru}||| |d |jt |j|Yd}~nxd}~wwxYw||| nE#t:$r}t|t<rdnd }|||dt3|zt@j!r,|"tGj$|j%|o| }|}Yd}~nd}~wt4$r}|dt |j|t@j!r,|"tGj$|j%|o| }|}Yd}~nd}~wwxYw|d | r|d||||f||fS)a Execute the parse expression on a series of test strings, showing each test, the parsed results or where the parse failed. Quick and easy way to run a parse expression against a list of sample strings. Parameters: - ``tests`` - a list of separate test strings, or a multiline string of test strings - ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests - ``comment`` - (default= ``'#'``) - expression for indicating embedded comments in the test string; pass None to disable comment filtering - ``full_dump`` - (default= ``True``) - dump results as list followed by results names in nested outline; if False, only dump nested list - ``print_results`` - (default= ``True``) prints test output to stdout - ``failure_tests`` - (default= ``False``) indicates if these tests are expected to fail parsing - ``post_parse`` - (default= ``None``) optional callback for successful parse results; called as `fn(test_string, parse_results)` and returns a string to be added to the test output - ``file`` - (default= ``None``) optional file-like object to which test output will be written; if None, will default to ``sys.stdout`` - ``with_line_numbers`` - default= ``False``) show test strings with line and column numbers Returns: a (success, results) tuple, where success indicates that all tests succeeded (or failed if ``failure_tests`` is True), and the results contain a list of lines of each test's output Example:: number_expr = pyparsing_common.number.copy() result = number_expr.run_tests(''' # unsigned integer 100 # negative integer -100 # float with scientific notation 6.02e23 # integer with scientific notation 1e-12 ''') print("Success" if result[0] else "Failed!") result = number_expr.run_tests(''' # stray character 100Z # missing leading digit before '.' -.100 # too many '.' 3.14.159 ''', failure_tests=True) print("Success" if result[0] else "Failed!") prints:: # unsigned integer 100 [100] # negative integer -100 [-100] # float with scientific notation 6.02e23 [6.02e+23] # integer with scientific notation 1e-12 [1e-12] Success # stray character 100Z ^ FAIL: Expected end of text (at char 3), (line:1, col:4) # missing leading digit before '.' -.100 ^ FAIL: Expected {real number with scientific notation | real number | signed integer} (at char 0), (line:1, col:1) # too many '.' 3.14.159 ^ FAIL: Expected end of text (at char 4), (line:1, col:5) Success Each test string must be on a single line. If you want to test a string that spans multiple lines, create a test like this:: expr.run_tests(r"this is a test\n of strings that spans \n 3 lines") (Note that this is a raw string literal, you must include the leading ``'r'``.) r)pyparsing_testc&g|] }|Sr9r9)rC test_line line_strips r-rEz+ParserElement.run_tests..s#XXXyZZ **XXXr/NT\n uFr~r=)fullz{} failed: {}: {}z(FATAL)zFAIL: zFAIL-EXCEPTION: {}: {})&testingrRrSr#rstriprstrip splitlinesLiteralsysstdoutwriter5 replace_withr  quoted_stringrr rPrrlstriprr dumprrRrr2rmrexplainrrrr format_tbr)r+rIrrJrKrLrMrNrOrPrrFrGrHrLrRprint_ allResultscommentssuccessNLBOMrrrupp_valuer=rsrrrUs @r- run_testszParserElement.run_testss` ,+++++) ) #5 #4} + eX & & Ye*JXXXXELLNNtyy****B7HO00333aCH& ;'' 66**1*AA "6,&6(#,9Q#7#7#/)(LAA: # 8==?? ; ; ; ; # 3x== 9 9 9 9JJv{{}}555$ 6;;H;#=#=>>> /66 ) 2DGG4DaJJv{{{99::::E&   %/4G%H%HP b 2::<<((( 8c"gg-... 3FJJy223CDDEEE!2l    3::499;MsSSTTT 3GJJy233DEEFFF!2l  6 JJrNNN 'tyy~~&&&   q&k * * * * ""s@?LBI'' K&1A*K!!K& QB#O QA9QQr$ output_htmlverticalshow_results_names show_groupsc  ddlm}m}n"#t$r}t d|d}~wwxYw|||||||} t |ttfrKt|dd5} | || ddddS#1swxYwYdS| || dS) a Create a railroad diagram for the parser. Parameters: - output_html (str or file-like object) - output target for generated diagram HTML - vertical (int) - threshold for formatting multiple alternatives vertically instead of horizontally (default=3) - show_results_names - bool flag whether diagram should show annotations for defined results names - show_groups - bool flag whether groups should be highlighted with an unlabeled surrounding box Additional diagram-formatting keyword arguments can also be included; see railroad.Diagram class. r) to_railroadrailroad_to_htmlzMmust ``pip install pyparsing[diagrams]`` to generate parser railroad diagramsN)rprqrrdiagram_kwargswr0r5) diagramrtru ImportErrorrRrrSrrr8r`) r+rorprqrrr1rtruierailroad diag_files r-create_diagramzParserElement.create_diagramasd.  > > > > > > > > >   _   ; 1#!     kC; / / :k3999       8&+/   4--d-o----^!c!!!X!   ^ S _    UcUUUXU# /2/// !!!!!  /  ///T6 12// /  / ////837LP+/EI 4@C"#9=(,"'A#!"8.must_skipsPz,QZ%7%7%9%9bT%A%A!EE*d+++++&B%Ar/c|jdddgkr4|ddtjzdz|d<dSdS)Nrr~rz missing <>)rrrreprr)rr+s r- show_skipz'_PendingSkip.__add__..show_skipsb:%%'',44EE*%%%$/$t{2C2C$Cc$IAjMMM54r/)rrrrr5)r+rskipperrrs` r-rz_PendingSkip.__add__s/&--((// << >  , , ,  J J J J J  ggii88CCC')),,Y778  {W$u,,r/c|jSr))rrs r-r"z_PendingSkip.__repr__s r/c td)NzBuse of `...` expression without following SkipTo target expression)rR)r+rs r-rHz_PendingSkip.parseImpls P   r/r~r) r2r7r8rrr.rrr"rH __classcell__rs@r-rrs##]#t###### BBB----*          r/rc(eZdZdZfdZdZxZS)TokenzYAbstract :class:`ParserElement` subclass, for defining atomic matching patterns. cLtddS)NFrrr.r+rs r-r.zToken.__init__s$ %(((((r/c*t|jSr)rrs r-rzToken._generateDefaultNamesDzz""r/)r2r7r8rGr.rrrs@r-rrsQ)))))#######r/rc"eZdZdZfdZxZS)rz, An empty token, will always match. cdtd|_d|_dSr;rr.rrrs r-r.zEmpty.__init__/ ""r/)r2r7r8rGr.rrs@r-rrsB#########r/rc*eZdZdZfdZddZxZS)NoMatchz( A token that will never match. crtd|_d|_d|_dS)NTFzUnmatchable token)rr.rrrrs r-r.zNoMatch.__init__s4 "") r/Tc0t|||j|r))rrrGs r-rHzNoMatch.parseImplsXsDK>>>r/rr2r7r8rGr.rHrrs@r-rrsV***** ????????r/rcBeZdZdZd dddedeffdZdZd d ZxZS) r]a Token to exactly match a specified string. Example:: Literal('blah').parse_string('blah') # -> ['blah'] Literal('blah').parse_string('blahfooblah') # -> ['blah'] Literal('blah').parse_string('bla') # -> Exception: Expected "blah" For case-insensitive matching, use :class:`CaselessLiteral`. For keyword matching (force word break before and after the matched string), use :class:`Keyword` or :class:`CaselessKeyword`. r~ matchString match_stringrczt|p|}||_t||_ |d|_n#t $rtdwxYwd|jz|_ d|_ d|_ |jdkr$t|turt|_dSdSdS)Nrz2null string passed to Literal; use Empty() insteadrFr)rr.matchrBmatchLenfirstMatchCharrQrrUrrrrr]_SingleCharLiteralrr+rrrs r-r.zLiteral.__init__ s "2l ! L))  S".q/D   S S SQRR R S!DI- #" =A  $t**"7"7/DNNN  "7"7s  AA*c*t|jSr)rrrs r-rzLiteral._generateDefaultName DJr/Tc|||jkr,||j|r||jz|jfSt |||j|r))rrArrrrrGs r-rHzLiteral.parseImpl s\ C=D/ / /H4G4G J5 5 /& 2 2XsDK>>>r/r~r) r2r7r8rGrr.rrHrrs@r-r]r]s  0R000S0s000000$   ????????r/r]ceZdZddZdS)rTcj|||jkr |dz|jfSt|||j|rA)rrrrrGs r-rHz_SingleCharLiteral.parseImpl) s; C=D/ / /7DJ& &XsDK>>>r/Nrr2r7r8rHr9r/r-rr( s(??????r/rc eZdZdZedzZ dddddedejed e d ed ejef fd Z d Z ddZ e ddZeZxZS)Keyworda Token to exactly match a specified string as a keyword, that is, it must be immediately followed by a non-keyword character. Compare with :class:`Literal`: - ``Literal("if")`` will match the leading ``'if'`` in ``'ifAndOnlyIf'``. - ``Keyword("if")`` will not; it will only match the leading ``'if'`` in ``'if x=1'``, or ``'if(y==2)'`` Accepts two optional constructor arguments in addition to the keyword string: - ``identChars`` is a string of characters that would be valid identifier characters, defaulting to all alphanumerics + "_" and "$" - ``caseless`` allows case-insensitive matching, default is ``False``. Example:: Keyword("start").parse_string("start") # -> ['start'] Keyword("start").parse_string("starting") # -> Exception For case-insensitive matching, use :class:`CaselessKeyword`. z_$r~NFr identCharsr ident_charscaselessrrct|p|}| tj}|p|}||_t ||_ |d|_n#t$rtdwxYwd t|j |j |_d|_d|_||_|r-||_|}t)||_dS)Nrz2null string passed to Keyword; use Empty() insteadzExpected {} {}F)rr.rDEFAULT_KEYWORD_CHARSrrBrrrQrrrr2rUrrrrupper caselessmatchrr)r+rrrrrrs r-r.zKeyword.__init__O s  .;   6J"2l ! L))  S".q/D   S S SQRR R S&--d4jj.A49MM #"   ,!-!3!3!5!5D #))++Jj//s  A""A<c*t|jSr)rrs r-rzKeyword._generateDefaultNamel rr/Tc,|j}|}|jr||||jz|jkr|dks$||dz |jvre|t ||jz ks)|||jz|jvr||jz|jfS|dz }||jz}n|dz }|dz }n|||jkr |jdks| |j|ru|dks||dz |jvrS|t ||jz ks|||jz|jvr||jz|jfS|dz }||jz}n |dz }|dz }t||||)Nrrz/, was immediately followed by keyword characterz7, keyword was immediately preceded by keyword characterz7, keyword was immediately followed by keyword character) rrrrrrrBrrrAr)r+rrrrerrlocs r-rHzKeyword.parseImplo s =' %cDM11288::d>PPP!88xa06688OOs8}}t}<<<#C$-$78>>@@WW"T]2DJ>>"SS!$t}!4WWF 1WF  !444MQ&&&&tz377'!88xa0GGs8}}t}<<<#C$-$78OO"T]2DJ>>U"%t}!4WWF 1WFXvvt<< ['CMD', 'CMD', 'CMD'] (Contrast with example for :class:`CaselessKeyword`.) r~rrrc|p|}t|||_d|jz|_dS)Nr)rr.r returnStringrUrrs r-r.zCaselessLiteral.__init__ sK"2l  ++--...(!DI- r/Tc||||jz|jkr||jz|jfSt |||j|r))rrrrrrrGs r-rHzCaselessLiteral.parseImpl sW C# -- . 4 4 6 6$* D D&(99 9XsDK>>>r/rr)r2r7r8rGrr.rHrrs@r-rr sz  .R...S.s......????????r/rc neZdZdZ d ddddedejededejeffd ZxZS) CaselessKeywordz Caseless version of :class:`Keyword`. Example:: CaselessKeyword("CMD")[1, ...].parse_string("cmd CMD Cmd10") # -> ['CMD', 'CMD'] (Contrast with example for :class:`CaselessLiteral`.) r~Nrrrrrc`|p|}|p|}t||ddS)NT)rr)r+rrrrrs r-r.zCaselessKeyword.__init__ s> .; "2l  zDAAAAAr/)r~N) r2r7r8rGrrrr.rrs@r-rr s  ,0 B +/ B B B B_S) B  B OC( B B B B B B B B B Br/rcJeZdZdZ d ddddededeffd Zd Zdd ZxZ S) CloseMatchaA variation on :class:`Literal` which matches "close" matches, that is, strings with at most 'n' mismatching characters. :class:`CloseMatch` takes parameters: - ``match_string`` - string to be matched - ``caseless`` - a boolean indicating whether to ignore casing when comparing characters - ``max_mismatches`` - (``default=1``) maximum number of mismatches allowed to count as a match The results from a successful parse will contain the matched text from the input string and the following named results: - ``mismatches`` - a list of the positions within the match_string where mismatches were found - ``original`` - the original match_string used to compare against the input string If ``mismatches`` is an empty list, then the match was an exact match. Example:: patt = CloseMatch("ATCATCGAATGGA") patt.parse_string("ATCATCGAAXGGA") # -> (['ATCATCGAAXGGA'], {'mismatches': [[9]], 'original': ['ATCATCGAATGGA']}) patt.parse_string("ATCAXCGAAXGGA") # -> Exception: Expected 'ATCATCGAATGGA' (with up to 1 mismatches) (at char 0), (line:1, col:1) # exact match patt.parse_string("ATCATCGAATGGA") # -> (['ATCATCGAATGGA'], {'mismatches': [[]], 'original': ['ATCATCGAATGGA']}) # close match allowing up to 2 mismatches patt = CloseMatch("ATCATCGAATGGA", max_mismatches=2) patt.parse_string("ATCAXCGAAXGGA") # -> (['ATCAXCGAAXGGA'], {'mismatches': [[4, 9]], 'original': ['ATCATCGAATGGA']}) NrF) maxMismatchesrrmax_mismatchesrc||n|}t||_||_d|j|j|_||_d|_d|_dS)Nz(Expected {!r} (with up to {} mismatches)F) rr.rrrrrrr)r+rrrrrs r-r.zCloseMatch.__init__ sz+9*D-  (*@GG  t1   ! "#r/c\dt|j|jS)Nz{}:{!r})rrr2rrs r-rzCloseMatch._generateDefaultName s$T 3T5FGGGr/Tc*|}t|}|t|jz}||kr|j}d}g} |j} tt ||||D]i\}} | \} } |jr(| | } } | | kr*| |t| | krn/j||zdz}t|||g}||d<| |d<||fSt|||j |)Nrroriginal mismatches) rBrr enumerateziprrr r rr)r+rrrrrCmaxlocrmatch_stringlocrrs_msrcmatresultss r-rHzCloseMatch.parseImpl s>x==T./// X  ,LOJ .M(1HSZ(,77)) $ $$S=8"yy{{CIIKKC#::%%o666:66o-1&s(;'<==&2 #(2 %G|#XsDK>>>r/r)r r2r7r8rGrrr.rrHrrs@r-rr s  J#$  $$$$$  $$$$$$&HHH????????r/rceZdZdZ ddddddded ejed ed ed ed edejedejedejededejeffdZ dZ ddZ xZ S)Worda8 Token for matching words composed of allowed character sets. Parameters: - ``init_chars`` - string of all characters that should be used to match as a word; "ABC" will match "AAA", "ABAB", "CBAC", etc.; if ``body_chars`` is also specified, then this is the string of initial characters - ``body_chars`` - string of characters that can be used for matching after a matched initial character as given in ``init_chars``; if omitted, same as the initial characters (default=``None``) - ``min`` - minimum number of characters to match (default=1) - ``max`` - maximum number of characters to match (default=0) - ``exact`` - exact number of characters to match (default=0) - ``as_keyword`` - match as a keyword (default=``False``) - ``exclude_chars`` - characters that might be found in the input ``body_chars`` string but which should not be accepted for matching ;useful to define a word of all printables except for one or two characters, for instance (default=``None``) :class:`srange` is useful for defining custom character set strings for defining :class:`Word` expressions, using range notation from regular expression character sets. A common mistake is to use :class:`Word` to match a specific literal string, as in ``Word("Address")``. Remember that :class:`Word` uses the string argument to define *sets* of matchable characters. This expression would match "Add", "AAA", "dAred", or any other word made up of the characters 'A', 'd', 'r', 'e', and 's'. To match an exact literal string, use :class:`Literal` or :class:`Keyword`. pyparsing includes helper strings for building Words: - :class:`alphas` - :class:`nums` - :class:`alphanums` - :class:`hexnums` - :class:`alphas8bit` (alphabetic characters in ASCII range 128-255 - accented, tilded, umlauted, etc.) - :class:`punc8bit` (non-alphabetic characters in ASCII range 128-255 - currency, symbols, superscripts, diacriticals, etc.) - :class:`printables` (any non-whitespace character) ``alphas``, ``nums``, and ``printables`` are also defined in several Unicode sets - see :class:`pyparsing_unicode``. Example:: # a word composed of digits integer = Word(nums) # equivalent to Word("0123456789") or Word(srange("0-9")) # a word with a leading capital, and zero or more lowercase capital_word = Word(alphas.upper(), alphas.lower()) # hostnames are alphanumeric, with leading alpha, and '-' hostname = Word(alphas, alphanums + '-') # roman numeral (not a strict parser, accepts invalid mix of characters) roman = Word("IVXLCDM") # any string of non-whitespace characters, except for ',' csv_value = Word(printables, exclude_chars=",") r~NrrF) initChars bodyChars asKeyword excludeChars init_chars body_charsrmaxexact as_keyword exclude_charsrrr r c~|p|}| p|} | p|} | p|} t|s4tdt |jt |}||_| r(t | } || z}| rt | | z } dt||_ | rEEJJ'   NN "  :|,,L  %I : NN\9 WWVI%6%677  ,!# ):):!;!;D  ^^DNN!# ):):!;!;D  ^^DN!G 77g  77DKK"DK 199DKDK!DI- "" dnt~5 5 53!88QR ~//!88 FFAXXFF(// 4;(+B+BRR F!).t~>>!! T^$$))!88 FF'..sQw77F * 1 1Id011.t~>>!! !88 FFAXXFF'..sQw77F , 3 3.t~>>.t~>>!! ~ > % 5 =  ,*T]33!%  !+ 8    S 6 588 sNN65N6c2d}|j|jkr3d||j||j}n#d||j}|jdks|jt kr|j|jkr2|jdkr |ddS|d|jzS|jt kr|d|jzS|d|j|jzS|S) Ncrd}t|d}t||kr|d|dz dzS|S)NF) re_escaper$r)rrB)r max_repr_lens r- charsAsStrz-Word._generateDefaultName..charsAsStr sJL*1>>>A1vv $$+T^ + +&& 4>**JJt~,F,FDD??::dn#=#=>>D ;??dkX55{dk));!##8O(//$+">">>>((l11$+>>>>k00dkJJJJ r/Tc|||jvrt|||j||}|dz }t|}|j}||jz}t ||}||kr|||vr|dz }||kr |||vd}||z |jkrd}nF|jr||kr |||vrd}n,|j r%|dkr ||dz |vs||kr |||vrd}|rt|||j|||||fS)NrFTr) rrrrBrrrrrr ) r+rrrrrC bodycharsrthrowExceptions r-rHzWord.parseImpl s[ C= . . 3 TBB B qx==N $VX&&Fllx} 99 1HCFllx} 99 ; $ $!NN   &3>>hsmy6P6P!NN ^ & UQY'944>>SMY..!%  C 3 TBB BHU3Y'''r/)r~NrrrFNr) r2r7r8rGrrrrrr.rrHrrs@r-rr5 sC>>D+/ .2o,+/*.-1o,o,o,o,OC(o, o,  o,  o,o,s+o,?3'o,?3'o,o,oc*o,o,o,o,o,o,b:((((((((r/rceZdZddZdS)rTc|||}|st|||j||}||fSr))rrrrgroup)r+rrrrus r-rHz_WordRegex.parseImpl& sTx-- C 3 TBB BjjllFLLNN""r/Nrrr9r/r-rr% s(######r/rc reZdZdZ d ddddededejeded ejef fd ZxZ S) CharzA short-cut class for defining :class:`Word` ``(characters, exact=1)``, when defining a match of any single character in a string of characters. FN)r r charsetrrr r cZ|p|}|p|}t|d||dt|j|_|rd|j|_t j|j|_|jj|_ dS)Nr)rr r z[{}]z\b{}\b) rr.rrrrrrrr)r+r1rrr r rs r-r.z Char.__init__5 s+ #4}   1      &@&P&PQQ  <%,,T];;DM*T]++  r/)FN) r2r7r8rGrrrrr.rrs@r-r0r0/ s!.2 &  -1&&&&&s+ &  &oc*&&&&&&&&&&r/r0ceZdZdZ dddddedeejefde de d e d e f fd Z e d Ze d Z e dZ dZddZddZddZdedefdZxZS)RegexaToken for matching strings that match a given regular expression. Defined with string specifying the regular expression in a form recognized by the stdlib Python `re module `_. If the given regex contains named groups (defined using ``(?P...)``), these will be preserved as named :class:`ParseResults`. If instead of the Python stdlib ``re`` module you wish to use a different RE module (such as the ``regex`` module), you can do so by building your ``Regex`` object with a compiled RE that was compiled using ``regex``. Example:: realnum = Regex(r"[+-]?\d+\.\d*") # ref: https://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression roman = Regex(r"M{0,4}(CM|CD|D?{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})") # named fields in a regex will be returned as named results date = Regex(r'(?P\d{4})-(?P\d\d?)-(?P\d\d?)') # the Regex class will accept re's compiled using the regex module import regex parser = pp.Regex(regex.compile(r'[0-9]')) rF) asGroupListasMatchpatternflags as_group_listas_matchr5r6ct|p|}|p|}t|tr.|st dd|_|x|_|_||_nQt|dr2t|dr"||_|jx|_|_||_ntdd|j z|_ d|_ ||_||_|jr |j|_|jr|j|_dSdS)aThe parameters ``pattern`` and ``flags`` are passed to the ``re.compile()`` function as-is. See the Python `re module `_ module for an explanation of the acceptable patterns and flags. z0null string passed to Regex; use Empty() insteadNr7rzCRegex may only be constructed with a string or a compiled RE objectrF)rr.rSr#r_rerr7r8r#rrUrrr5r6parseImplAsGroupListrHparseImplAsMatch)r+r7r8r9r:r5r6rs r-r.zRegex.__init__c s/ !2] %X gx ( (  U !STTTDH+2 2DMDLDJJ Wi ( ( WWg-F-F DH+2? :DL4=DJJU "DI- "&   7!6DN < 3!2DNNN 3 3r/c|jr|jS tj|j|jS#tj$r(t d|jwxYw)Nz&invalid pattern ({!r}) passed to Regex)r<rrr7r8r rrrs r-rzRegex.re sp 8 8O z$, ;;;8    <CCDLQQ s /7A&c|jjSr))rrrs r-rzRegex.re_match s w}r/c0|dduSNr~)rrs r-rzRegex.mayReturnEmpty s}}R  ,,r/cxdt|jddS)NzRe:({})z\\\)rrr7rrs r-rzRegex._generateDefaultName s0T\ 2 2 : :64 H HIIIr/Tc<|||}|st|||j||}t |}|}|r|D] \}}|||< ||fSr))rrrrr r. groupdictitems) r+rrrrur5dkvs r-rHzRegex.parseImpl sx-- C 3 TBB Bjjll6<<>>**          1ACxr/c|||}|st|||j||}|}||fSr))rrrrgroupsr+rrrrur5s r-r=zRegex.parseImplAsGroupList sWx-- C 3 TBB BjjllmmooCxr/c|||}|st|||j||}|}||fSr))rrrrrMs r-r>zRegex.parseImplAsMatch sOx-- C 3 TBB BjjllCxr/replrXcjrtdjrtrtdjrfd}nfd}|S)a Return :class:`Regex` with an attached parse action to transform the parsed result as if called using `re.sub(expr, repl, string) `_. Example:: make_html = Regex(r"(\w+):(.*?):").sub(r"<\1>\2") print(make_html.transform_string("h1:main title:")) # prints "

main title

" z-cannot use sub() with Regex(asGroupList=True)z9cannot use sub() with a callable with Regex(asMatch=True)c:|dSr)expand)r[rOs r-rzRegex.sub..pa say''---r/cFj|dSr)rsub)r[rOr+s r-rzRegex.sub..pa sw{{4333r/)r5rr6r(r5)r+rOrs`` r-rTz Regex.sub s   MKLL L < YHTNN YWXX X < 4 . . . . . .  4 4 4 4 4 4$$R(((r/)rFFr)r2r7r8rGrrr RegexFlagrrr.r&rrrrHr=r>rrrTrrs@r-r4r4J sq6+,# ,3",3,3,3,3R\3&',3 ,3  ,3,3,3,3,3,3,3,3\  _ _--_-JJJ    )) ))))))))r/r4ceZdZdZdZ ddddddddded ejed ejed ed ed ejedededejedejededejedeffdZ dZ ddZ xZ S) QuotedStringa Token for matching strings that are delimited by quoting characters. Defined with the following parameters: - ``quote_char`` - string of one or more characters defining the quote delimiting string - ``esc_char`` - character to re_escape quotes, typically backslash (default= ``None``) - ``esc_quote`` - special quote sequence to re_escape an embedded quote string (such as SQL's ``""`` to re_escape an embedded ``"``) (default= ``None``) - ``multiline`` - boolean indicating whether quotes can span multiple lines (default= ``False``) - ``unquote_results`` - boolean indicating whether the matched text should be unquoted (default= ``True``) - ``end_quote_char`` - string of one or more characters defining the end of the quote delimited string (default= ``None`` => same as quote_char) - ``convert_whitespace_escapes`` - convert escaped whitespace (``'\t'``, ``'\n'``, etc.) to actual whitespace (default= ``True``) Example:: qs = QuotedString('"') print(qs.search_string('lsjdf "This is the quote" sldjf')) complex_qs = QuotedString('{{', end_quote_char='}}') print(complex_qs.search_string('lsjdf {{This is the "quote"}} sldjf')) sql_qs = QuotedString('"', esc_quote='""') print(sql_qs.search_string('lsjdf "This is the quote with ""embedded"" quotes" sldjf')) prints:: [['This is the quote']] [['This is the "quote"']] [['This is the quote with "embedded" quotes']] ))z\t )rVrW)z\f )z\r r~NFT) quoteCharescCharescQuoteunquoteResults endQuoteCharconvertWhitespaceEscapes quote_charesc_char esc_quote multilineunquote_resultsend_quote_charconvert_whitespace_escapesr[r\r]r^r_r`c t| p|} | p|} | o|} | p|} | o|} |p|}|}|std| |} n%| } | std|_t |_|d_| _t | _ | _ | _ | _ | _ d}d}| r-|d|tj| z }d}| rN|d|tj| z }d}tjj dz_t jd krc|d |dfd t't jd z dd Dzd zz }d}|rbtjtjz_|d|t/jd| t/| ndz }nJd_|d|t/jd| t/| ndz }dtjjd|dtjjg_ tjjj_j_jj_n:#tj$r(tdjwxYwdjz_d_ d_!dS)Nz%quote_char cannot be the empty stringz'endQuoteChar cannot be the empty stringrr~z{}(?:{})|z {}(?:{}.)z(.)rz{}(?:c 3K|]X}dtjjd|tjj|dVYdS)z (?:{}(?!{}))N)rrrr_)rCr|r+s r-r*z(QuotedString.__init__..N s{  #)) $"3BQB"788 $"3ABB"788r/r)z {}(?:[^{}{}])z{}(?:[^{}\n\r{}])z(?:z)*z$invalid pattern {!r} passed to RegexrFT)"rr.rZrr[rB quoteCharLenfirstQuoteCharr_endQuoteCharLenr\r]r^r`rrrescCharReplacePatternrrange MULTILINEDOTALLr8rr7rrrrr rUrrr)r+rarbrcrdrerfrgr[r\r]r^r_r`sep inner_patternrs` r-r.zQuotedString.__init__ s" %X(y';O#5~ $ C)C !,*  %%''  FDEE E  %LL'--//L L !JKKK# OO(m("<00   ,(@%   [//RYx5H5HII IMC  I \00bi6H6HII IMC)+4<)@)@5)HD & t ! !A % % s##(( #3t'8#9#9A#=q"EE  MC   1DJ -44)$*;A*>??7>7J*7333PR MM DJ 188)$*;A*>??7>7J*7333PR M ww $.)) $+,,      jtz::DG LDM GMDMMx   6==dlKK   "DI- ""s #AL%%7Mc|j|jkr4t|jtrd|jSd|j|jS)Nzstring enclosed in {!r}z.quoted string, starting with {} ending with {})r[r_rSr#rrs r-rz!QuotedString._generateDefaultName s[ >T. . .:dnh3W3W .,33DNCC C?FF ND-   r/c.|||jkr|||pd}|st|||j||}|}|jr||j|j }t|trwd|vr*|j r#|j D]\}}| ||}|jrtj|jd|}|jr | |j|j}||fS)NrDz\g<1>)rmrrrrr.r^rlrnrSr#r`ws_maprr\rrTror]r_)r+rrrrur5wslitwschars r-rHzQuotedString.parseImpl s3 SMT0 0 - h,,    C 3 TBB Bjjllllnn   Hd'4+?*??@C#x(( H3;;4#@;)-99 v!kk%88<L&!;XsKKC=H++dmT5FGGCCxr/)r~NNFTNTr) r2r7r8rGrwrrrrr.rrHrrs@r-rWrW sn%%LJF)-*. $/3+/o#(,)-#-1)-o#o#o#o#/#&o#?3' o#  o#  o#,o#%)o#o#%o#/#&o#o#oc*o##'o#o#o#o#o#o#b   r/rWc VeZdZdZ ddddededed ed ef fd Zd ZddZxZ S) CharsNotInaToken for matching words composed of characters *not* in a given set (will include whitespace in matched characters if not listed in the provided exclusion set - see example). Defined with string containing all disallowed characters, and an optional minimum, maximum, and/or exact length. The default value for ``min`` is 1 (a minimum value < 1 is not valid); the default values for ``max`` and ``exact`` are 0, meaning no maximum or exact length restriction. Example:: # define a comma-separated-value as anything that is not a ',' csv_value = CharsNotIn(',') print(delimited_list(csv_value).parse_string("dkls,lsdkjf,s12 34,@!#,213")) prints:: ['dkls', 'lsdkjf', 's12 34', '@!#', '213'] r~rr)notChars not_charsrr rr|cztd|_|p||_t |j|_|dkrt d||_|dkr||_n t|_|dkr||_||_d|j z|_ |jdk|_ d|_ dS)NFrzacannot specify a minimum length < 1; use Opt(CharsNotIn()) if zero-length char group is permittedrr)rr.rr|r notCharsSetrrrrrUrrr)r+r}rr rr|rs r-r.zCharsNotIn.__init__ s #!-X t}-- 77K   77DKK"DK 199DKDK!DI- "kQ."r/ct|j}t|dkr"d|jddSd|jS)Nr$z !W:({}...) z!W:({}))rr|rBr)r+ not_chars_strs r-rzCharsNotIn._generateDefaultName sY24=AA }   " "&&t}XvX'>?? ?##DM22 2r/TcV|j}|||vrt|||j||}|dz }t||jzt |}||kr|||vr|dz }||kr |||v||z |jkrt|||j|||||fSrA)rrrrrrBr)r+rrrnotcharsrmaxlens r-rHzCharsNotIn.parseImpl s# C=H $ $ 3 TBB B qUT[(#h--88Fllx}H<< 1HCFllx}H<< ; $ $ 3 TBB BHU3Y'''r/)r~rrrrrrs@r-r{r{ s, !#!#!#!#!#!# !#  !#!#!#!#!#!#!#F333((((((((r/r{c eZdZdZidddddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*Zd6d.ed/ed0ed1effd2 Zd3Zd7d5Z xZ S)8WhiteaSpecial matching class for matching whitespace. Normally, whitespace is ignored by pyparsing grammars. This class is included when some whitespace structures are significant. Define with a string containing the whitespace characters to be matched; default is ``" \t\r\n"``. Also takes optional ``min``, ``max``, and ``exact`` arguments, as defined for the :class:`Word` class. rzrXzrWzrZzrYz zu zu᠎zu z u z u z u z u zu zu zu zu zz z zzzz)u u u​u u u  rrwsrr rcht|_dfdjDdd_djz_|_ |dkr|_ n t_ |dkr|_ |_ dSdS)Nr~c3.K|]}|jv |VdSr)) matchWhite)rCrr+s r-r*z!White.__init__..! s/JJ!$/1I1IA1I1I1I1IJJr/Trrr) rr.rr r whiteStrsrrUrrrr)r+rrr rrs` r-r.zWhite.__init__ s  !! GGJJJJt~JJJ J J "   #!DI-  77DKK"DK 199DKDKKK 9r/cJdd|jDS)Nr~c3:K|]}tj|VdSr))rrrs r-r*z-White._generateDefaultName..4 s)CCauq)CCCCCCr/)rrrs r-rzWhite._generateDefaultName3 s%wwCC4?CCCCCCr/Tcj|||jvrt|||j||}|dz }||jz}t |t |}||kr)|||jvr|dz }||kr|||jv||z |jkrt|||j|||||fSrA)rrrrrrBr)r+rrrrrs r-rHzWhite.parseImpl6 s C= / / 3 TBB B q$VS]]++Fllx}?? 1HCFllx}?? ; $ $ 3 TBB BHU3Y'''r/)rrrrr) r2r7r8rGrrrr.rrHrrs@r-rr s V g f f  f  (  & / + + , , ( ' & "!" '#$! &'/I4  3  s s      ,DDD ( ( ( ( ( ( ( (r/rceZdZfdZxZS) PositionTokencdtd|_d|_dSr;rrs r-r.zPositionToken.__init__G rr/)r2r7r8r.rrs@r-rrF s8#########r/rc6eZdZdZdeffd ZdZddZxZS) GoToColumnzaToken to advance to a specific column of input text; useful for tabular report scraping. colnocVt||_dSr))rr.r)r+rrs r-r.zGoToColumn.__init__R s$ r/c~t|||jkrt|}|jr|||}||krq||rWt|||jkr>|dz }||kr3||rt|||jk>|SrA)rrBrr?isspace)r+rrrCs r-rEzGoToColumn.preParseV s sH   ) )8}}H :**8S99hSM))++X&&$(22q hSM))++X&&$(22 r/Tct||}||jkrt||d|||jz|z }|||}||fS)NzText not in expected column)rr)r+rrrthiscolnewlocr5s r-rHzGoToColumn.parseImplc s[c8$$ TX   30MtTT Ttx')s6z"s{r/r) r2r7r8rGrr.rErHrrs@r-rrM sqc   r/rc0eZdZdZfdZdZddZxZS) LineStartaMatches if current position is at the beginning of a line within the parse string Example:: test = '''\ AAA this line AAA and this line AAA but not this one B AAA and definitely not this one ''' for t in (LineStart() + 'AAA' + restOfLine).search_string(test): print(t) prints:: ['AAA', ' this line'] ['AAA', ' and this line'] c>t|t|jz|_|jdt|j|_ d|_ dS)NrWzExpected start of line) rr.rrrorig_whiteCharsdiscardrr rrrs r-r.zLineStart.__init__ sz  "uut6 %%%ww33DODD . r/c|dkr|S|j||}d|jvr@|||dzdkr/|j||dz}|||dzdk/|S)NrrWr)rrEr)r+rrr5s r-rEzLineStart.preParse s !88J,''#66Ct+++sS1W}-55,//#'BBCsS1W}-55Jr/Tc`t||dkr|gfSt|||j|rA)rrrrGs r-rHzLineStart.parseImpl s6 sH   " "7NXsDK>>>r/r)r2r7r8rGr.rErHrrs@r-rrl se,/////????????r/rc*eZdZdZfdZddZxZS)LineEndzTMatches if current position is at the end of a line within the parse string ct|jd||jdd|_dS)NrWFrzExpected end of line)rr.rrr rrs r-r.zLineEnd.__init__ sU  %%% !!$/!GGG, r/Tc|t|kr*||dkr|dzdfSt|||j||t|kr|dzgfSt|||j|)NrWrrBrrrGs r-rHzLineEnd.parseImpl s{ X  }$$Qw}$$XsDKFFF CMM ! !7B;  3 TBB Br/rrrs@r-rr s^----- C C C C C C C Cr/rc*eZdZdZfdZddZxZS) StringStartzLMatches if current position is at the beginning of the parse string cVtd|_dS)NzExpected start of textrr.rrs r-r.zStringStart.__init__ s$ . r/Tcx|dkr1|||dkrt|||j||gfSr)rErrrGs r-rHzStringStart.parseImpl sC !88dmmHa0000$XsDKFFFBwr/rrrs@r-rr sV/////r/rc*eZdZdZfdZddZxZS)rzG Matches if current position is at the end of the parse string cVtd|_dS)NzExpected end of textrrs r-r.zStringEnd.__init__ s$ , r/Tc|t|krt|||j||t|kr|dzgfS|t|kr|gfSt|||j|rArrGs r-rHzStringEnd.parseImpl sx X   3 TBB B CMM ! !7B;  3x== 7N 3 TBB Br/rrrs@r-rr s^-----CCCCCCCCr/rc>eZdZdZefeddedeffdZddZxZS) WordStartaMatches if the current position is at the beginning of a :class:`Word`, and is not preceded by any character in a given set of ``word_chars`` (default= ``printables``). To emulate the ```` behavior of regular expressions, use ``WordStart(alphanums)``. ``WordStart`` will also match at the beginning of the string being parsed, or at the beginning of a line.  wordChars word_charsrc|tkr|n|}tt||_d|_dS)NzNot at the start of a word) printablesrr.rrrr+rrrs r-r.zWordStart.__init__ sD"+z"9"9JJy  Y2 r/Tc|dkr8||dz |jvs|||jvrt|||j||gfSNrr)rrrrGs r-rHzWordStart.parseImpl sQ !88q!T^33C=66$XsDKFFFBwr/r r2r7r8rGrrr.rHrrs@r-rr s*43333333333333 r/rc>eZdZdZefeddedeffdZddZxZS) WordEndaiMatches if the current position is at the end of a :class:`Word`, and is not followed by any character in a given set of ``word_chars`` (default= ``printables``). To emulate the ```` behavior of regular expressions, use ``WordEnd(alphanums)``. ``WordEnd`` will also match at the end of the string being parsed, or at the end of a line. rrrc|tkr|n|}tt||_d|_d|_dS)NFzNot at the end of a word)rrr.rrrrrs r-r.zWordEnd.__init__ sL"+z"9"9JJy  Y#0 r/Tct|}|dkr>||kr8|||jvs||dz |jvrt|||j||gfSr)rBrrr)r+rrrrCs r-rHzWordEnd.parseImplsdx== a<.s,@@$:dH--@@@@@@r/c3pK|]0}t|tr|n|V1dSr))rSr#r)rCr=r+s r-r*z+ParseExpression.__init__..sZ4>a3J3JQD,,Q///PQr/F) rr.rS_generatorTyperr#rrrranyrrr+rrrs` r-r.zParseExpression.__init__sG """ ' e^ , , KKE eX & & %22599:DJJ } - - %DJJ x ( ( %KKE@@%@@@@@ "eDJJ %!%[[  % % %#W  %!s:DD$#D$rXc |jddSr))rrs r-r&zParseExpression.recurse+sz!!!}r/cH|j|d|_|Sr))rr rrs r-r zParseExpression.append.s% %     r/Trct||r5d|jD|_|jD]}|||S)z Extends ``leave_whitespace`` defined in base class, and also invokes ``leave_whitespace`` on all contained expressions. c6g|]}|Sr9r rCr=s r-rEz4ParseExpression.leave_whitespace..; 777q!&&((777r/)rrrr+rr=rs r-rz ParseExpression.leave_whitespace3si   +++  .77DJ777DJZ . .""9---- r/ct||r5d|jD|_|jD]}|||S)z Extends ``ignore_whitespace`` defined in base class, and also invokes ``leave_whitespace`` on all contained expressions. c6g|]}|Sr9rrs r-rEz5ParseExpression.ignore_whitespace..Grr/)rrrrs r-rz!ParseExpression.ignore_whitespace@si !!),,,  /77DJ777DJZ / /##I.... r/crt|trU||jvrKt||jD]"}||jd#nKt||jD]"}||jd#|SNr)rSrrrr r)r+rr=rs r-r zParseExpression.ignoreLs eX & & /D,,,u%%%33AHHT-b12222 GGNN5 ! ! !Z / /)"-.... r/cfd|jjt|jSNz{}:({}))rrr2rrrs r-rz$ParseExpression._generateDefaultNameXs% 7TZIIIr/c$|jr|St|jD]}|t |jdkr|jd}t ||jri|jsb|j[|j sT|jdd|jdgz|_d|_ |xj |j zc_ |xj |j zc_ |jd}t ||jrj|jsc|j\|j sU|jdd|jddz|_d|_ |xj |j zc_ |xj |j zc_ dt|z|_|S)Nrkrrrr)rrrrrBrSrrrrrrrrr)r+r=rrs r-rzParseExpression.streamline[s   K   A LLNNNN tz??a  JqME5$.11 :) :%- .#[^tz!}o= $(!##u';;##""e&99""JrNE5$.11 :) :%- ."Z_u{111~= $(!##u';;##""e&99""!CII-  r/Nc||ngdd|gz}|jD]}|||gdSr))rr/r))r+r.tmpr=s r-r/zParseExpression.validates\ - 9}}r111EN  A JJsOOOO R     r/ctt}d|jD|_|S)Nc6g|]}|Sr9rrs r-rEz(ParseExpression.copy..s 222!QVVXX222r/)rr rr+r5rs r-r zParseExpression.copys0ggllnn22tz222  r/c ~tjrtj|jvr||jD]t}t |t r]|jrVtj|jvrCtj d d|t|j |jdut||SNzY{}: setting results name {!r} on {} expression collides with {!r} on contained expressionr`r$ stacklevel)rOr`rjrrrSrrwarningsrSrrr2rrr+rUrr=rs r-rzParseExpression._setResultsNames  > E*++Z  q-00 $M/00MEEKVG  JJ/M FF $%    ww&&t^<<.%%K%K1a&6%K%K%K%K%K%Kr/rrFT)rrrrBrrr rrRrr.r.rrSrr rrrr) r+rrrrr|r skipto_argrs r-r.z And.__init__s&*)__  X&&C$U++ % %48##3u::>))5:WWuQU|5K4RSU4V  #56*#5#5k#B#BCCCC'NJJt$$$$E!!!H ))) : '"%%K%K %K%K%K"K"KD djmU33 ,))JqM,"&*Q-"E*'+jm&B##&+##"&D  r/rXc|jrtd|jddDrt|jddD]w\}}|t|trZ|jrSt|jdt r3|jd|j|dzz|jd<d|j|dz<xd|jD|_t t|j|jddD]\}}t}|rt||vrn| t|t|tr| |fdn3|}tt!|d}|t#d|jD|_|S)Nc3K|]@}t|to&|jot|jdtVAdSrN)rSrrrrs r-r*z!And.streamline..sd1o..:G:qwr{L99r/rrcg|]}||Sr)r9rs r-rEz"And.streamline..sEEEAq}a}}}r/c@t|dt||S)N parent_anchor)setattrr)rrrcur_s r-rz And.streamline.. s' /3q!9933r/c3$K|] }|jV dSr)rrs r-r*z!And.streamline..s%!G!Gq!"2!G!G!G!G!G!Gr/)rrrrSrrrrrrrAadd IndentedBlockr5r&nextrr.r)r+r|r=prevcurseensubsrs r-rzAnd.streamlines  : FCRC  F &dj"o66 1 1DAqy "1o661G1'qwr{LAA1 '(gbkDJq1u4E&E ,0 1q5)EEEEE  TZABB88 - -ID#55D -c77d??C!!!c=11))-0 {{}}4::t,, -"!G!GDJ!G!G!GGG r/c6|jd|||d\}}d}|jddD]}t|tjurd} |r ||||\}}n#t $rt $r&}d|_t |d}~wt$r%t |t||j |wxYw||||\}}|s| r||z }||fS)NrFrrT) rr"rrrParseSyntaxExceptionrmr_from_exceptionrQrBrhaskeys) r+rrr resultlist errorStopr= exprtokensrss r-rHz And.parseImplsh*Q-.. c95/  Z ABB ) )AAww#.((  E &'hhxi&H&HOC+)CCC'+B$.>>rBBB!. #h--d #$((8S)"D"DZ )Z//11 )j( JsA77C !B,,2Cct|tr||}||Sr)rSr#rr rs r-__iadd__z And.__iadd__39 eX & & 4,,U33E{{5!!!r/ct|dd|gz}|jD]!}|||jsdS"dSr))rr)rr*s r-r)zAnd._checkRecursion8s]*111-6  A  o . . .#    r/c6dd|jD}t|dkr[|ddt|dz dkr<|dd}t|dkr|ddt|dz dk.@s(44AQ444444r/rr{}r{})rrrBr+inners r-rzAnd._generateDefaultName?s4444444%jj1nnq':CJJN':!;t!C!C!B$KE%jj1nnq':CJJN':!;t!C!CU{S  r/r)r2r7r8rGrrrrrrr.rrHr r)rrrs@r-rrs"UKO!!7!CG!!!!!!B+M++++++Z<""" !!!!!!!r/rcteZdZdZd dejedeffd Zdeffd Z dd Z d Z d Z d fd Z xZS)raRequires that at least one :class:`ParseExpression` is found. If two expressions match, the expression that matches the longest string will be used. May be constructed using the ``'^'`` operator. Example:: # construct Or using '^' operator number = Word(nums) ^ Combine(Word(nums) + '.' + Word(nums)) print(number.search_string("123 3.1416 789")) prints:: [['123'], ['3.1416'], ['789']] Frrct|||jrHtd|jD|_t d|jD|_dSd|_dS)Nc3$K|] }|jV dSr)rrs r-r*zOr.__init__..\rr/c3$K|] }|jV dSr)rrs r-r*zOr.__init__..]rr/Trr.rrrr.rrs r-r.z Or.__init__Y} ))) : '"%%K%K %K%K%K"K"KD "%%K%K %K%K%K"K"KD   "&D   r/rXc8t|jrjtd|jD|_td|jD|_t d|jD|_nd|_|S)Nc3$K|] }|jV dSr)rrs r-r*z Or.streamline..drr/c3$K|] }|jV dSr)rrs r-r*z Or.streamline..e$!C!C1!,!C!C!C!C!C!Cr/c3PK|]!}|jot|t V"dSr)rrSrrs r-r*z Or.streamline..fH&&BC =Au)=)=%=&&&&&&r/F)rrrrrrr.rrs r-rz Or.streamlineas  : $"%%K%K %K%K%K"K"KD !!C!C !C!C!CCCDO"%&&GKz&&&##D  $DO r/Tc0d}d}g}g}td|jDr|||}|jD]} |||d} || |f3#t $r1} d| _|| _|| d}d}Yd} ~ id} ~ wt$r'} |sd| _| j |kr | }| j }Yd} ~ d} ~ wt$rIt||kr3t|t||j |}t|}YwxYw|r| tdd|s%|dd} | |||Sd} |D]~\}}|| dkr| cS ||||\} }| |kr| |fcS| | dkr| |f} M#t$r%} d| _| j |kr | }| j }Yd} ~ wd} ~ wwxYw| dkr| S|rgt|dkrJ| d |dj |dj kr| d |d}|||j |_|t||d |) Nrc3$K|] }|jV dSr))rrs r-r*zOr.parseImpl..rs$22!q~222222r/Tr`r)rreverserrc|j Sr)rr=s r-rzOr.parseImpl.. 15&r/rcV|j tt|j fSr)rrBr parserElementr(s r-rzOr.parseImpl..$vC.(;;1A;;;;;;r/rrrrs r-rzOr._generateDefaultName/UZZ;; ;;;;;;cAAr/c <tjrntj|jvr[t d|jDr=t jdd|t|j dt ||S)Nc3fK|],}t|totj|jvV-dSr)rSrrjr_rrs r-r*z%Or._setResultsName..X1c"",I+,r/{}: setting results name {!r} on {} expression will return a list of all parsed tokens in an And alternative, in prior versions only the first token was returned; enclose contained argument in Groupr_r$r rOr_rjrrrrrSrrr2rrr+rUrrs r-rzOr._setResultsName  > E*++    239&CT +33 !    ww&&t^<< [['123'], ['3'], ['1416'], ['789']] # put more selective expression first number = Combine(Word(nums) + '.' + Word(nums)) | Word(nums) print(number.search_string("123 3.1416 789")) # Better -> [['123'], ['3.1416'], ['789']] Frrct|||jrHtd|jD|_t d|jD|_dSd|_dS)Nc3$K|] }|jV dSr)rrs r-r*z&MatchFirst.__init__..rr/c3$K|] }|jV dSr)rrs r-r*z&MatchFirst.__init__..rr/Trrs r-r.zMatchFirst.__init__rr/rXcX|jr|St|jrjt d|jD|_t d|jD|_td|jD|_nd|_d|_|S)Nc3$K|] }|jV dSr)rrs r-r*z(MatchFirst.streamline..rr/c3$K|] }|jV dSr)rrs r-r*z(MatchFirst.streamline..rr/c3PK|]!}|jot|t V"dSr)r rs r-r*z(MatchFirst.streamline..r!r/FT) rrrrrrrr.rrs r-rzMatchFirst.streamlines   K  : '!!C!C !C!C!CCCDO"%%K%K %K%K%K"K"KD "%&&GKz&&&##D  $DO"&D  r/Tcd}d}|jD]} ||||cS#t$r}d|_||_d}~wt $r}|j|kr |}|j}Yd}~[d}~wt$rIt||kr3t |t||j |}t|}YwxYw||j |_ |t ||d|)Nrr/) rr"rrr-rrrQrBrr) r+rrrr1r2r=r5r\s r-rHzMatchFirst.parseImpl s9   . .A .xx '   $(!$%!! ( ( (7Y&&#&L #I . . .x==9,,#1 #h--4$$L!$H I  .  ##{L   #A4 s'( B=A B=A''AB=<B=ct|tr||}||Sr)r rs r-__ior__zMatchFirst.__ior__.r r/cVddd|jDzdzS)Nrz | c34K|]}t|VdSr)rrs r-r*z2MatchFirst._generateDefaultName..4r?r/rr@rs r-rzMatchFirst._generateDefaultName3rAr/c <tjrntj|jvr[t d|jDr=t jdd|t|j dt ||S)Nc3fK|],}t|totj|jvV-dSr)rDrs r-r*z-MatchFirst._setResultsName..<rEr/rFr_r$rrGrHs r-rzMatchFirst._setResultsName6rIr/r~r)r2r7r8rGrrrrr.rrHrTrrrrs@r-rrs"''fom<'''''''M    D""" BBB==========r/rcbeZdZdZd dejedeffd Zdeffd Z d dZ d Z xZ S) ralRequires all given :class:`ParseExpression` s to be found, but in any order. Expressions may be separated by whitespace. May be constructed using the ``'&'`` operator. Example:: color = one_of("RED ORANGE YELLOW GREEN BLUE PURPLE BLACK WHITE BROWN") shape_type = one_of("SQUARE CIRCLE TRIANGLE STAR HEXAGON OCTAGON") integer = Word(nums) shape_attr = "shape:" + shape_type("shape") posn_attr = "posn:" + Group(integer("x") + ',' + integer("y"))("posn") color_attr = "color:" + color("color") size_attr = "size:" + integer("size") # use Each (using operator '&') to accept attributes in any order # (shape and posn are required, color and size are optional) shape_spec = shape_attr & posn_attr & Opt(color_attr) & Opt(size_attr) shape_spec.run_tests(''' shape: SQUARE color: BLACK posn: 100, 120 shape: CIRCLE size: 50 color: BLUE posn: 50,80 color:GREEN size:20 shape:TRIANGLE posn:20,40 ''' ) prints:: shape: SQUARE color: BLACK posn: 100, 120 ['shape:', 'SQUARE', 'color:', 'BLACK', 'posn:', ['100', ',', '120']] - color: BLACK - posn: ['100', ',', '120'] - x: 100 - y: 120 - shape: SQUARE shape: CIRCLE size: 50 color: BLUE posn: 50,80 ['shape:', 'CIRCLE', 'size:', '50', 'color:', 'BLUE', 'posn:', ['50', ',', '80']] - color: BLUE - posn: ['50', ',', '80'] - x: 50 - y: 80 - shape: CIRCLE - size: 50 color: GREEN size: 20 shape: TRIANGLE posn: 20,40 ['color:', 'GREEN', 'size:', '20', 'shape:', 'TRIANGLE', 'posn:', ['20', ',', '40']] - color: GREEN - posn: ['20', ',', '40'] - x: 20 - y: 40 - shape: TRIANGLE - size: 20 Trrct|||jr$td|jD|_nd|_d|_d|_d|_dS)Nc3$K|] }|jV dSr)rrs r-r*z Each.__init__..rr/T)rr.rr.rrinitExprGroupsrrs r-r.z Each.__init__sn ))) : '"%%K%K %K%K%K"K"KD  "&D ""r/rXct|jr$td|jD|_nd|_|S)Nc3$K|] }|jV dSr)rrs r-r*z"Each.streamline..rr/T)rrrr.rrs r-rzEach.streamlinesT  : '"%%K%K %K%K%K"K"KD  "&D  r/cv|jrtd|jD|_d|jD}d|jD}||z|_d|jD|_d|jD|_d|jD|_|xj|jz c_d|_|}|jdd}|jdd|jdd}g} d} g} g} | rP|z|z} | | | D]} | ||d }| |j t||||vr| |p|vr |#t$rB}d|_||_| || |Yd}~d}~wt"$r| |YwxYwt%| t%| krd} | P| rgt%| d krJ| d | d j| d jkr| d | d }||rCdd|D}t#||d|| fd|jDz } t/g}| D]!}||||\}}||z }"||fS)Nc3lK|]/}t|tt|j|fV0dSr))rSrrArrs r-r*z!Each.parseImpl..sQ  $%z!S7I7I AFQ      r/cFg|]}t|t|jSr9rSrrrs r-rEz"Each.parseImpl..s)EEEq*Q2D2DEAFEEEr/cdg|]-}|j t|tttf+|.Sr9)rrSrr4rrs r-rEz"Each.parseImpl..sL#-7q3z:R,S,Sr/czg|]8}t|t|j|jd9ST)r)rS_MultipleMatchrrrrs r-rEz"Each.parseImpl..sO###a00#'' 'MM###r/czg|]8}t|t|j|jd9Sre)rSrrrrrs r-rEz"Each.parseImpl..sO"""a++"'' 'MM"""r/cVg|]&}t|tttf$|'Sr9)rSrrrrs r-rEz"Each.parseImpl..s>ZCY;W-X-Xr/FTr$rc|j Sr)r'r(s r-rz Each.parseImpl..r)r/r*rcV|j tt|j fSr)r,r(s r-rz Each.parseImpl..r.r/z, c,g|]}t|Sr9rrs r-rEz"Each.parseImpl..s 9 9 9AQ 9 9 9r/z*Missing one or more required elements ({})cPg|]"}t|t|jv |#Sr9rb)rCr=tmpOpts r-rEz"Each.parseImpl..s5XXXQ 1c0B0BXqvQWGWGWqGWGWGWr/)r\dictropt1map optionalsmultioptionals multirequiredrequiredrxrcr r/rAremoverrr-rrBr0rrrr r")r+rrropt1opt2tmpLoctmpReqdmultis matchOrder keepMatchingfailedr3tmpExprsr=r5r:missing total_resultsrrms @r-rHzEach.parseImpls   (  )-   DLFEDJEEEDD "D[DN#####D  """""D  :DM MMT/ /MM"'D -""$QQQ'   %'&0H LLNNN LLNNN ) ))[[6t[LLF%%dl&6&6r!uua&@&@AAAG||q))))f a(((+%%%(,C%()C%MM#&&&MM!$$$$$$$$%%%%MM!$$$$$%6{{c(mm++$ + %0  6{{Q 0 0 111!9=F1IM11KK$R$RKSSSq IO  ii 9 9 9 9 9::G <CCGLL  XXXX$*XXXX $R((  % %A88Hc9==LC W $MMM!!s%F,, H68G33"HHcVddd|jDzdzS)Nrz & c34K|]}t|VdSr)rrs r-r*z,Each._generateDefaultName..r?r/rr@rs r-rzEach._generateDefaultNamerAr/r) r2r7r8rGrrrrr.rrHrrrs@r-rrQs77rfom<MU"U"U"U"nBBBBBBBr/rceZdZdZddeeefdeffd Zde efdZ dd Z dd edeffd Z dd edeffd Z deffd Zdeffd ZdZdddZdZe Ze ZxZS)ParseElementEnhancezfAbstract subclass of :class:`ParserElement`, for combining and post-processing parsed tokens. Frrct|t|trt |jt r||}nTt t||jrt|}n"|t|}||_ |~|j |_ |j |_ | |j |j|j|_|j|_|j|_|j|jdSdS)Nr)rr.rSr# issubclassrrrr]rrrr rrrrrrrr+rrrs r-r.zParseElementEnhance.__init__s+ """ dH % % ?$2E:: ?//55DJJ(@AA ?t}}// >>  !%!3D "&"5D   % %t/I &   #'"5D "oDO $ 1D    # #D$4 5 5 5 5 5  r/rXc$|j|jgngSr)rrs r-r&zParseElementEnhance.recurses"i3 {{;r/Tcp|j|j|||dSt||d|)NFrzNo expression defined)rr"rrGs r-rHzParseElementEnhance.parseImpls> 9 9##Hc95#QQ Q 30GNN Nr/rct||r?|j|_|j|j||Sr))rrrr r+rrs r-rz$ParseElementEnhance.leave_whitespacesY   +++  6 ((DIy$ **9555 r/ct||r?|j|_|j|j||Sr))rrrr rs r-rz%ParseElementEnhance.ignore_whitespace$sY !!),,,  7 ((DIy$ ++I666 r/czt|trW||jvrMt||j%|j|jdnMt||j%|j|jd|Sr)rSrrrr rr+rrs r-r zParseElementEnhance.ignore-s eX & & 7D,,,u%%%9(I$$T%5b%9::: GGNN5 ! ! !y$   !1"!5666 r/ct|j|j|Sr))rrrrs r-rzParseElementEnhance.streamline9s:  9 I " " " r/c||vrt||gz|dd|gz}|j|j|dSdSr))RecursiveGrammarExceptionrr))r+r+r,s r-r)z#ParseElementEnhance._checkRecursion?se # # #+,<v,EFF F*111-6 9 I % %o 6 6 6 6 6 ! r/Nc|g}|dd|gz}|j|j||gdSr)rr/r)r+r.rs r-r/zParseElementEnhance.validateFsZ  MAAA$' 9 I  s # # # R     r/cfd|jjt|jSr)rrr2rrrs r-rz(ParseElementEnhance._generateDefaultNameNs% 7TYHHHr/r~rr)r^)r2r7r8rGrrrrr.r r&rHrrr rr)r/rrrrrs@r-rrs66U=##566$666666*<-0<<<<OOOO $-4= }      M 777!!!!!III)&OOOOOr/rcxeZdZdZGddeZGddeZdddd ed ed effd Z dd Z xZ S)rz Expression to match one or more expressions at a given indentation level. Useful for parsing text where structure is implied by indentation (like Python source code). c$eZdZdeffd ZxZS)IndentedBlock._Indentref_colctd|_|fddS)Nzexpected indent at column {}c,t||kSr)rrrrrs r-rz0IndentedBlock._Indent.__init__.._ss1ayyG/Cr/rr.rrr7r+rrs `r-r.zIndentedBlock._Indent.__init__\sS GG     8??HHDK   CCCC D D D D Dr/r2r7r8rr.rrs@r-_Indentr[sO EC E E E E E E E E E Er/rc$eZdZdeffd ZxZS)IndentedBlock._IndentGreaterrctd|_|fddS)Nz)expected indent at column greater than {}c,t||kSr)rrs r-rz7IndentedBlock._IndentGreater.__init__..ess1ayy7/Br/rrs `r-r.z%IndentedBlock._IndentGreater.__init__bsS GG     ELLWUUDK   BBBB C C C C Cr/rrs@r-_IndentGreaterrasO DC D D D D D D D D D Dr/rFTrgroupedrrrcxt|d||_||_d|_dS)NTrr)rr. _recursive_groupedr)r+rrrrs r-r.zIndentedBlock.__init__gs@ ---$ r/crt||}|j|||t ||}||}t|z|jz}|jrl||}t|j|j|j } | |j || _ |t|| zz }|dtt!|ddd|t%|} ||j t'z} |j rt(} nd} | | t+| z|||S)Nrzinner @c|Sr)r9rs r-rz)IndentedBlock.parseImpl..s4r/)rrErrcrrrrrrrrrrrhexrArrrGrouprrH) r+rrr anchor_loc indent_colpeer_detect_expr inner_expr sub_indent nested_blockblocktrailing_undentrs r-rHzIndentedBlock.parseImplqsWW%%h44  Hj)<<<X.. << 33WW//$); ? 9,,Z88J( T_dmL  " "4: . . .)3L & #j<788 8JTSJ%8%8%=%C%C%E%ETT TTUUU*%%,,t'9::Y[[H = (GG''G/!:!::EE j)   r/r) r2r7r8rGrrrrrr.rHrrs@r-rrUs EEEEE%EEE DDDDDDDD9>t!15HL! ! ! ! ! ! ! ! r/rcDeZdZdZdeeefffd Zdfd ZxZ S) AtStringStartzMatches if expression matches at the beginning of the parse string:: AtStringStart(Word(nums)).parse_string("123") # prints ["123"] AtStringStart(Word(nums)).parse_string(" 123") # raises ParseException rcXt|d|_dSNFrr.rr+rrs r-r.zAtStringStart.__init__) !r/Tcx|dkrt||dt|||S)Nrznot found at string start)rrrHr+rrrrs r-rHzAtStringStart.parseImpls; !88 30KLL Lww  3 :::r/r r2r7r8rGrrrr.rHrrs@r-rrsv"U=##56"""""";;;;;;;;;;r/rcDeZdZdZdeeefffd Zdfd ZxZ S) AtLineStartaMatches if an expression matches at the beginning of a line within the parse string Example:: test = '''\ AAA this line AAA and this line AAA but not this one B AAA and definitely not this one ''' for t in (AtLineStart('AAA') + restOfLine).search_string(test): print(t) prints:: ['AAA', ' this line'] ['AAA', ' and this line'] rcXt|d|_dSrrrs r-r.zAtLineStart.__init__rr/Tct||dkrt||dt|||S)Nrznot found at line start)rrrrHrs r-rHzAtLineStart.parseImplsG sH   " " 30IJJ Jww  3 :::r/rrrs@r-rrsv,"U=##56"""""";;;;;;;;;;r/rc@eZdZdZdeeefffd ZddZxZ S) FollowedByacLookahead matching of the given parse expression. ``FollowedBy`` does *not* advance the parsing position within the input string, it only verifies that the specified parse expression matches at the current position. ``FollowedBy`` always returns a null token list. If any results names are defined in the lookahead expression, those *will* be returned for access by name. Example:: # use FollowedBy to match a label only if it is followed by a ':' data_word = Word(alphas) label = data_word + FollowedBy(':') attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) attr_expr[1, ...].parse_string("shape: SQUARE color: BLACK posn: upper left").pprint() prints:: [['shape', 'SQUARE'], ['color', 'BLACK'], ['posn', 'upper left']] rcXt|d|_dSr$rr.rrs r-r.zFollowedBy.__init__s) "r/TcT|j|||\}}|dd=||fS)Nrb)rr")r+rrrr?r5s r-rHzFollowedBy.parseImpls8!!(C9!EE3 FCxr/rrrs@r-rrsl,#U=##56######r/rc^eZdZdZ d deeefdeje ffd Z d dZ xZ S) PrecededByaLookbehind matching of the given parse expression. ``PrecededBy`` does not advance the parsing position within the input string, it only verifies that the specified parse expression matches prior to the current position. ``PrecededBy`` always returns a null token list, but if a results name is defined on the given expression, it is returned. Parameters: - expr - expression that must match prior to the current parse location - retreat - (default= ``None``) - (int) maximum number of characters to lookbehind prior to the current parse location If the lookbehind expression is a string, :class:`Literal`, :class:`Keyword`, or a :class:`Word` or :class:`CharsNotIn` with a specified exact or maximum length, then the retreat parameter is not required. Otherwise, retreat must be specified to give a maximum number of characters to look back from the current parse position for a lookbehind match. Example:: # VB-style variable names with type prefixes int_var = PrecededBy("#") + pyparsing_common.identifier str_var = PrecededBy("$") + pyparsing_common.identifier Nrretreatct|||_d|_d|_d|_t|trt|}d|_nt|ttfr|j }d|_nYt|ttfr|jt kr|j}d|_nt|t"r d}d|_||_dt'|z|_d|_|jddS)NTFrznot preceded by cH|tddSr)) __delitem__slicerrrs r-rz%PrecededBy.__init__..$s eD$>O>O0P0Pr/)rr.rrrrrrSr#rBr]rrrr{rrrrrrrrr )r+rrrs r-r.zPrecededBy.__init__ s/ IIKK0022 "" dH % % $iiGDJJ w0 1 1 mGDJJ tZ0 1 1 dkX6M6MkGDJJ m , , GDJ (3t994 #  P PQQQQQr/rTc(|jrJ||jkrt|||j||jz }|j||\}}n|jt z}|td||jz |}t|||j} tdt||jdzdzD]F} ||t|| z \}}n#t$r } | } Yd} ~ ?d} ~ wwxYw| ||fSr) rrrrrr"rr rprrBrm) r+rrrrr?r5 test_exprinstring_slice last_exproffsetpbes r-rHzPrecededBy.parseImpl&sA : T\!!$XsDK@@@$,&EY%%h66FAss IKK/I%c!S4<-?&@&@3&FGN&xdkBBI3sDL1,<#=#=#ABB &--&N(;(;f(DFAs E*$$$ #IIIIII$  Cxs )C55 D ?DD r))rT) r2r7r8rGrrrrrrr.rHrrs@r-rrs<PTRR-,-R8>8LRRRRRR2r/rceZdZdZddZdS)Locateda Decorates a returned token with its starting and ending locations in the input string. This helper adds the following results names: - ``locn_start`` - location where matched expression begins - ``locn_end`` - location where matched expression ends - ``value`` - the actual parsed results Be careful if the input text contains ```` characters, you may want to call :class:`ParserElement.parse_with_tabs` Example:: wd = Word(alphas) for match in Located(wd).search_string("ljsdf123lksdjjf123lkkjj1222"): print(match) prints:: [0, ['ljsdf'], 5] [8, ['lksdjjf'], 15] [18, ['lkkjj'], 23] Tc|}|j|||d\}}t|||g}||d<||d<||d<|jr||gfS||fS)NFr locn_startrrlocn_end)rr"r r)r+rrrrr[r]s r-rHzLocated.parseImpl\s~i&&x PU&VV V!5&#"677 #( < $ 7!$ :   # $ $ ? "r/Nr)r2r7r8rGrHr9r/r-rr@s26 # # # # # #r/rcFeZdZdZdeeefffd ZddZdZ xZ S)ra Lookahead to disallow matching with the given parse expression. ``NotAny`` does *not* advance the parsing position within the input string, it only verifies that the specified parse expression does *not* match at the current position. Also, ``NotAny`` does *not* skip over leading whitespace. ``NotAny`` always returns a null token list. May be constructed using the ``'~'`` operator. Example:: AND, OR, NOT = map(CaselessKeyword, "AND OR NOT".split()) # take care not to mistake keywords for identifiers ident = ~(AND | OR | NOT) + Word(alphas) boolean_term = Opt(NOT) + ident # very crude boolean expression - to support parenthesis groups and # operation hierarchy, use infix_notation boolean_expr = boolean_term + ((AND | OR) + boolean_term)[...] # integers that are followed by "." are actually floats integer = Word(nums) + ~Char(".") rct|d|_d|_dt |jz|_dS)NFTzFound unwanted token, )rr.rrrrrrs r-r.zNotAny.__init__sE $".TY? r/Tcn|j||rt|||j||gfSr))rrerrrGs r-rHzNotAny.parseImpls< 9 # #Hc 2 2 C 3 TBB BBwr/c6dt|jzdzS)Nz~{rrrrs r-rzNotAny._generateDefaultNamesc$)nn$s**r/r) r2r7r8rGrrrr.rHrrrs@r-rrjs0@U=##56@@@@@@ +++++++r/rc eZdZ d dddedejeeefdejeeefffdZdefdZ dd Z dfd Z xZ S)rfNstopOnrstop_onrct||p|}d|_|}t|tr||}||dSr$)rr.rrSr#rr)r+rrrenderrs r-r.z_MultipleMatch.__init__sp "7 eX & & 4,,U33E Er/rXcrt|tr||}||nd|_|Sr))rSr#r not_ender)r+rs r-rz_MultipleMatch.stopOns> eX & & 4,,U33E#(#4%$ r/Tct|jj}|j}|jdu}|r |jj}|r |||||||\}} |j } |r |||| r |||} n|} ||| |\}} | s| r|| z }K#ttf$rYnwxYw||fSr)) rr"r?rrrrrrQ) r+rrrself_expr_parseself_skip_ignorables check_ender try_not_enderr[hasIgnoreExprsr tmptokenss r-rHz_MultipleMatch.parseImpls-)*#3nD0  4 N3M  ) M(C ( ( (%ohY?? V %)%5!55N (1!M(C000!!11(C@@FF F!069!M!MY( 1 1 3 3(i'F ( +    D F{s ABB32B3Fc tjrtj|jvr|jg|jzD]t}t |tr]|jrVtj|jvrCtj d d|t|j |jdut||Sr)rOr`rjrrr&rSrrrrSrrr2rrrs r-rz_MultipleMatch._setResultsNames  > E*++i[49#4#4#6#66  q-00 $M/00MEEKVG  JJ/M FF $%    ww&&t^<<B    }c'9!:;  mS&8 9:      } :==========r/rfceZdZdZdZdS)rar Repetition of one or more of the given expression. Parameters: - expr - expression that must match one or more times - stop_on - (default= ``None``) - expression for a terminating sentinel (only required if the sentinel would ordinarily match the repetition expression) Example:: data_word = Word(alphas) label = data_word + FollowedBy(':') attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).set_parse_action(' '.join)) text = "shape: SQUARE posn: upper left color: BLACK" attr_expr[1, ...].parse_string(text).pprint() # Fail! read 'color' as data instead of next label -> [['shape', 'SQUARE color']] # use stop_on attribute for OneOrMore to avoid reading label string as part of the data attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) OneOrMore(attr_expr).parse_string(text).pprint() # Better -> [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'BLACK']] # could also be written as (attr_expr * (1,)).parse_string(text).pprint() c6dt|jzdzS)Nrz}...rrs r-rzOneOrMore._generateDefaultNameS^^#f,,r/N)r2r7r8rGrr9r/r-rrs-4-----r/rc eZdZdZ d dddedejeeefdejeeefffdZ d fd Z d Z xZ S) rao Optional repetition of zero or more of the given expression. Parameters: - ``expr`` - expression that must match zero or more times - ``stop_on`` - expression for a terminating sentinel (only required if the sentinel would ordinarily match the repetition expression) - (default= ``None``) Example: similar to :class:`OneOrMore` Nrrrrc`t||p|d|_dS)NrTr)r+rrrrs r-r.zZeroOrMore.__init__s5 f&7888"r/Tc t|||S#ttf$r|t g|jfcYSwxYw)Nr)rrHrrQr rrs r-rHzZeroOrMore.parseImplsj @77$$XsI>> > + @ @ @ Rd.>???? ? ? ? @s"&)AAc6dt|jzdzS)N[z]...rrs r-rzZeroOrMore._generateDefaultNamerr/r)r) r2r7r8rGrrrrrr.rHrrrs@r-rrs  ?C# >B ####}c'9!:;# mS&8 9: ######@@@@@@ -------r/rceZdZdZdZdS) _NullTokencdSrr9rs r-__bool__z_NullToken.__bool__$sur/cdSrBr9rs r-r z_NullToken.__str__'srr/N)r2r7r8rr r9r/r-rr#s2r/rcbeZdZdZeZefdeeefde ffd Z ddZ dZ xZ S) raN Optional matching of the given expression. Parameters: - ``expr`` - expression that must match zero or more times - ``default`` (optional) - value to be returned if the optional expression is not found. Example:: # US postal code can be a 5-digit zip, plus optional 4-digit qualifier zip = Combine(Word(nums, exact=5) + Opt('-' + Word(nums, exact=4))) zip.run_tests(''' # traditional ZIP code 12345 # ZIP+4 form 12101-0001 # invalid ZIP 98765- ''') prints:: # traditional ZIP code 12345 ['12345'] # ZIP+4 form 12101-0001 ['12101-0001'] # invalid ZIP 98765- ^ FAIL: Expected end of text (at char 5), (line:1, col:6) rdefaultct|d|jj|_||_d|_dS)NFrT)rr.rr defaultValuer)r+rrrs r-r.z Opt.__init__TsD ...).#"r/Tc|j} ||||d\}}nO#ttf$r;|j}||jur&|jrt|g}|||j<n|g}ng}YnwxYw||fS)NFr)rr"rrQr_Opt__optionalNotMatchedrr )r+rrr self_exprr[ default_values r-rHz Opt.parseImpl\sI  #**8S)RW*XXKC +    -MD$===(-)=/::F4AF9011+_FF F{s&A A21A2ct|j}t|dkr[|ddt|dz dkr<|dd}t|dkr|ddt|dz dkt||p|}||_d|_d|_||_d|_t|tr| ||_ n||_ dt|j z|_ dS)NTFzNo match found for )rr. ignoreExprrr includeMatchrrSr#rr rrr)r+rrr rr rs r-r.zSkipTo.__init__s "7 ""# fh ' ' !226::DKK DK+c$)nn< r/Tc|}t|}|jj}|j |jjnd}|j |jjnd}|} | |krd| ||| rnl| ||| } n#t$rYnwxYw ||| ddn9#ttf$r| dz } YnwxYw| |kdt|||j || }|||} t| } |j r||||d\}} | | z } || fS)NrF)rrr) rBrr"r rrrrmrrQrr r) r+rrrrrCrself_failOn_canParseNextself_ignoreExpr_tryParsetmplocskiptext skipresultrs r-rHzSkipTo.parseImplsx==)*(, (?DK $ $T !)-(CDO $ $ !  '3++Hf=='3!9!9(F!K!K-  &EPUVVVV  #J/   !  !  2!3 TBB BHSL)!(++   &xieTTTHC # JJs$# A00 A=<A=BB+*B+)FNNr) r2r7r8rGrrrrrrr.rHrrs@r-rrws::~>B =-1===]C'(== = }c'9!:; =mS()======,00000000r/rceZdZdZddejeeefffd Z dZ dZ fdZ dZ dfd Zdd ed efd Zdd ed efdZd efdZdddZdZd effd Zdfd ZeZeZxZS)rfaw Forward declaration of an expression to be defined later - used for recursive grammars, such as algebraic infix notation. When the expression is known, it is assigned to the ``Forward`` variable using the ``'<<'`` operator. Note: take care when assigning to ``Forward`` not to overlook precedence of operators. Specifically, ``'|'`` has a lower precedence than ``'<<'``, so that:: fwd_expr << a | b | c will actually be evaluated as:: (fwd_expr << a) | b | c thereby leaving b and c out as parseable alternatives. It is recommended that you explicitly group the values inserted into the ``Forward``:: fwd_expr << (a | b | c) Converting to use the ``'<<='`` operator instead will avoid this problem. See :class:`ParseResults.pprint` for an example of a recursive parser created using ``Forward``. Nrctjdd|_t|dd|_dS)NrkrrFr)rr caller_framerr. lshift_liners r-r.zForward.__init__sI%3!<<> >( )/ Q/ Q 0D- Q(,S$ -A(B%+k955&%%!1!1!3!33/ Q/ Q/ Q/ Q/ Q/ Q/ Q/ Q' Q' Q' Qd+u-!G" #'Ld8#)d8n 3$(NDMQ@,1GG,=,=hU,S,S))@@@%i;;"!,4i @ (**$@FJ']R1HkDN $XW #+[-=-=-?-?#???I/ Q/ Q/ Q/ Q/ Q/ Q/ Q/ QJ!N')9)9999M/ Q/ Q/ Q/ Q/ Q/ Q/ Q/ QR%&&050A0A(CQU0V0VW #1&&&BI1 MXg %&@G?PP+)d8n5Q' Q/ Q/ Q/ Q/ Q/ Q/ Q/ Q/ Q/ Q/ Qs I5:DAI2 &FI2$F.+I2-F..7I2%I53I2 I5I2&II2 I  II  I22I55I9<I9rrXcd|_|Srrrs r-rzForward.leave_whitespaces# r/cd|_|Sr$rrs r-rzForward.ignore_whitespaces" r/cb|js'd|_|j|j|Sr$)rrrrs r-rzForward.streamlines6 '#D y$ $$&&& r/c|g}||vr/|dd|gz}|j|j||gdSr)rrs r-r/zForward.validatese  M } $ $"dV+Cy$ ""3''' R     r/cd|_d} |jt|jdd}nd}|jjdz|zS#|jjdz|zccYSxYw)Nz: ...riNonez: )rrrrr2)r+ retStrings r-rzForward._generateDefaultNamesz#  >y$ NN5D51 " >*T1I= =4>*T1I= = = = = = = = =s &AAc||j tSt}||z}|Sr))rrr rfrs r-r z Forward.copys4 9 77<<>> !))C DLCJr/Fc tjrWtj|jvrD|j=t jdd|t|j dt ||S)NzO{}: setting results name {!r} on {} expression that has no contained expressionrar$r) rOrarjrrrrSrrr2rr)r+rUrrs r-rzForward._setResultsNames  3 :*++y  77=v8$T @S88 ! ww&&t-=>>>r/r)rr^r~)r2r7r8rGrrrrrr.rr!rr(rHrrrrr/rr rrrrrs@r-rfrfs8  foeM34F.GH      "        ]Q]Q]Q]Q]Q]Q~$-4=M!!!!! > > >m??????")&OOOOOr/rfc:eZdZdZddeeefffd ZxZS)TokenConverterzW Abstract subclass of :class:`ParseExpression`, for converting parsed results. FrcXt|d|_dSr)rr.rrs r-r.zTokenConverter.__init__s& r/r~) r2r7r8rGrrrr.rrs@r-rArAs]  U=##56          r/rAc leZdZdZ ddddededed ejeffd Z d effd Z d Z xZ S)CombineaConverter to concatenate all matching tokens to a single string. By default, the matching patterns must also be contiguous in the input string; this can be disabled by specifying ``'adjacent=False'`` in the constructor. Example:: real = Word(nums) + '.' + Word(nums) print(real.parse_string('3.1416')) # -> ['3', '.', '1416'] # will also erroneously match the following print(real.parse_string('3. 1416')) # -> ['3', '.', '1416'] real = Combine(Word(nums) + '.' + Word(nums)) print(real.parse_string('3.1416')) # -> ['3.1416'] # no match when there are internal spaces print(real.parse_string('3. 1416')) # -> Exception: Expected W:(0123...) r~TN) joinStringr join_stringadjacentrEct|||n|}|r|||_d|_||_d|_dSr$)rr.rrGrrEr)r+rrFrGrErs r-r.zCombine.__init__si #-#9ZZ{  $  ! ! # # #  "$ r/rXc|jrt||n!t||Sr))rGrr rrs r-r zCombine.ignore"sA = "  u - - - - GGNN5 ! ! ! r/c|}|dd=|td||jg|jz }|jr|r|gS|S)Nr~)rP)r r r _asStringListrErrr)r+rrrKretTokss r-rLzCombine.postParse)s.."" AAAJ< WWY,,T_== > > ?tGX        1 1 9 Nr/)r~T) r2r7r8rGrrrrrr.r rLrrs@r-rDrDs* ! ,0 !!!!! ! OC( !!!!!!$}       r/rDc4eZdZdZddedeffd ZdZxZS)raConverter to return the matched tokens as a list - useful for returning tokens of :class:`ZeroOrMore` and :class:`OneOrMore` expressions. The optional ``aslist`` argument when set to True will return the parsed tokens as a Python list instead of a pyparsing ParseResults. Example:: ident = Word(alphas) num = Word(nums) term = ident | num func = ident + Opt(delimited_list(term)) print(func.parse_string("fn a, b, 100")) # -> ['fn', 'a', 'b', '100'] func = ident + Group(Opt(delimited_list(term))) print(func.parse_string("fn a, b, 100")) # -> ['fn', ['a', 'b', '100']] Fraslistcft|d|_||_dSr$)rr.r _asPythonList)r+rrNrs r-r.zGroup.__init__K0 #r/c|jrJtjt|tr|nt |S|gSr))rPr r rSrOrrJs r-rLzGroup.postParsePsX   $i66%   """)__  ; r/r~ r2r7r8rGrrr.rLrrs@r-rr6si($$]$D$$$$$$ r/rc4eZdZdZddedeffd ZdZxZS)rarConverter to return a repetitive expression as a list, but also as a dictionary. Each element can also be referenced using the first token in the expression as its key. Useful for tabular report scraping when the first column can be used as a item key. The optional ``asdict`` argument when set to True will return the parsed tokens as a Python dict instead of a pyparsing ParseResults. Example:: data_word = Word(alphas) label = data_word + FollowedBy(':') text = "shape: SQUARE posn: upper left color: light blue texture: burlap" attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) # print attributes as plain groups print(attr_expr[1, ...].parse_string(text).dump()) # instead of OneOrMore(expr), parse using Dict(Group(expr)[1, ...]) - Dict will auto-assign names result = Dict(Group(attr_expr)[1, ...]).parse_string(text) print(result.dump()) # access named fields as dict entries, or output as dict print(result['shape']) print(result.as_dict()) prints:: ['shape', 'SQUARE', 'posn', 'upper left', 'color', 'light blue', 'texture', 'burlap'] [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']] - color: 'light blue' - posn: 'upper left' - shape: 'SQUARE' - texture: 'burlap' SQUARE {'color': 'light blue', 'posn': 'upper left', 'texture': 'burlap', 'shape': 'SQUARE'} See more examples at :class:`ParseResults` of accessing fields by results name. Frasdictcft|d|_||_dSr$)rr.r _asPythonDict)r+rrUrs r-r.z Dict.__init__rQr/c~t|D]j\}}t|dkr|d}t|tr!t |}t|dkrt d|||<t|dkr5t|dtst |d|||< |}n #t$rtd}|dwxYw|d=t|dks)t|tr)| rt ||||<Qt |d|||<l|j r0|j r|gn|S|j r|gn|S)Nrrr~rkzdcould not extract dict values from parsed results - Dict expression must contain Grouped expressions)rrBrSrrrZr!r r rRrrrWras_dict) r+rrrKr|tokikey dictvaluers r-rLzDict.postParses ** O OFAs3xx1}}q6D$$$ )4yy((3xx1}}"9"a"@"@ $SQz#a&,'G'G"9#a&!"D"D $( # II (((#NC4' (aLy>>Q&&y,77'i&K&KIdOO&=ilA&N&NIdOO   B,0,<UI%%''(()BSBSBUBU U"&"2AI;; As C--D r~rSrs@r-rr[sq''R$$]$D$$$$$$ %B%B%B%B%B%B%Br/rcheZdZdZd deeefdeffd Zd fd Z d fd Z d Z defd Z xZ S)raConverter for ignoring the results of a parsed expression. Example:: source = "a, b, c,d" wd = Word(alphas) wd_list1 = wd + (',' + wd)[...] print(wd_list1.parse_string(source)) # often, delimiters that are useful during parsing are just in the # way afterward - use Suppress to keep them out of the parsed output wd_list2 = wd + (Suppress(',') + wd)[...] print(wd_list2.parse_string(source)) # Skipped text (using '...') can be suppressed as well source = "lead in START relevant text END trailing text" start_marker = Keyword("START") end_marker = Keyword("END") find_body = Suppress(...) + start_marker + ... + end_marker print(find_body.parse_string(source) prints:: ['a', ',', 'b', ',', 'c', ',', 'd'] ['a', 'b', 'c', 'd'] ['START', 'relevant text ', 'END'] (See also :class:`delimited_list`.) Frrc|durtt}t|dS)N.)rrrr.rs r-r.zSuppress.__init__s; 3;; **D r/rXrct|jtrtt ||zSt |Sr))rSrrrrrrrs r-rzSuppress.__add__F di . . *F5MM**U2 277??5)) )r/ct|jtrtt ||z St |Sr))rSrrrrrrrs r-rzSuppress.__sub__r`r/cgSr)r9rJs r-rLzSuppress.postParser'r/c|Sr)r9rs r-rzSuppress.suppresss r/r~r)r2r7r8rGrrrrr.rrrLrrrs@r-rrs<U=##56$ ****** ****** -r/rr:cHtfd}j|_|S)asDecorator for debugging parse actions. When the parse action is called, this decorator will print ``">> entering method-name(line:, , )"``. When the parse action completes, the decorator will print ``"<<"`` followed by the returned value, or any exception that the parse action raised. Example:: wd = Word(alphas) @trace_parse_action def remove_duplicate_chars(tokens): return ''.join(sorted(set(''.join(tokens)))) wds = wd[1, ...].set_parse_action(remove_duplicate_chars) print(wds.parse_string("slkdjs sld sldd sdlf sdljf")) prints:: >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {})) <>entering {}(line: {!r}, {}, {!r}) z<.zs :+1a v;;??ay*3c9HDH  3 : :8T!QZZQRTU V V    !V*CC    J  =DDXsSS T T T   5< "0123456789" srange("[a-z]") -> "abcdefghijklmnopqrstuvwxyz" srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_" The input string must be enclosed in []'s, and the returned string is the expanded character set joined into a single string. The values enclosed in the []'s may be: - a single character - an escaped character with a leading backslash (such as ``\-`` or ``\]``) - an escaped hex character with a leading ``'\x'`` (``\x21``, which is a ``'!'`` character) (``\0x##`` is also supported for backwards compatibility) - an escaped octal character with a leading ``'\0'`` (``\041``, which is a ``'!'`` character) - a range of any of the above, separated by a dash (``'a-z'``, etc.) - any combination of the above (``'aeiouy'``, ``'a-zA-Z0-9_$'``, etc.) c t|ts|nUddtt |dt |ddzDS)Nr~c34K|]}t|VdSr))rtrs r-r*z+srange....Qs(EESVVEEEEEEr/rr)rSr rrpord)ps r-rzsrange..Os^!\**F!! WWEEU3qt99c!A$ii!m%D%DEEE E Er/r~c3.K|]}|VdSr)r9)rCpart _expandeds r-r*zsrange..Ts+WW4yyWWWWWWr/)r_reBracketExprrrxrR)rrs @r-sranger4ss6 F F wwWWWW>3N3Nq3Q3Q3VWWWWWW rrs=A AAclfd}tdtdj}||_|S)a^Helper to define a parse action by mapping a function to all elements of a :class:`ParseResults` list. If any additional args are passed, they are forwarded to the given function as additional arguments after the token, as in ``hex_integer = Word(hexnums).set_parse_action(token_map(int, 16))``, which will convert the parsed data to an integer using base 16. Example (compare the last to example in :class:`ParserElement.transform_string`:: hex_ints = Word(hexnums)[1, ...].set_parse_action(token_map(int, 16)) hex_ints.run_tests(''' 00 11 22 aa FF 0a 0d 1a ''') upperword = Word(alphas).set_parse_action(token_map(str.upper)) upperword[1, ...].run_tests(''' my kingdom for a horse ''') wd = Word(alphas).set_parse_action(token_map(str.title)) wd[1, ...].set_parse_action(' '.join).run_tests(''' now is the winter of our discontent made glorious summer by this sun of york ''') prints:: 00 11 22 aa FF 0a 0d 1a [0, 17, 34, 170, 255, 10, 13, 26] my kingdom for a horse ['MY', 'KINGDOM', 'FOR', 'A', 'HORSE'] now is the winter of our discontent made glorious summer by this sun of york ['Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York'] c"fd|DS)Nc"g|] }|gR Sr9r9)rCtoknrr,s r-rEz)token_map..pa..s+000dT!D!!!000r/r9)rrrrr,s r-rztoken_map..pa~s 00000a0000r/r2r)rr2)r,rrrs`` r- token_maprYsOJ111111j'$ *D*D*MNNIBK Ir/ctjjjD]6\}}t |t r|js||7dS)zy Utility to simplify mass-naming of parser elements, for generating railroad diagram with named subdiagrams. N) r^ _getframef_backf_localsrGrSrrr)rUvars r-autoname_elementsrsg ]__+4::<< c c= ) ) #.  LL   r/z4"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*"z string enclosed in double quotesz4'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*'z string enclosed in single quotesz*quotedString using single or double quotesuzunicode string literalz#[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]z[\0xa1-\0xbf\0xd7\0xf7]c<g|]}t|t|Sr9)rSr)rCrJs r-rErEs7''' *Q ">">''''r/rr^)r$rr~)osrrrrrrrr r r r abcr renumrrr rrr^collections.abcrrtypesoperatorr functoolsr threadingrpathlibrutilrrrrrrrrrrr exceptionsactionsrr r!unicoder"maxsizerrbytesr#rr version_infor&r;rOrjrsrvr]rrr warnoptionsenvironr/sumrBrr+rrrrr.rr r GeneratorTyperrrrrRrrrrascii_uppercaseascii_lowercasealphasLatin1 identcharsidentbodycharsnumshexnumsrr printablerr StackSummaryrrrrrrrrrrrr]rrrrrrrrr0r4rWr{rrrrrrrrrrrrrrrrrrrrrrrfrrrrrrfrArDrrrrlrrmrnrorprqr2 _escapedPunc_escapedHexChar_escapedOctChar _singleChar _charRangerrrrrdbl_quoted_stringsgl_quoted_stringrbunicode_string alphas8bitpunc8bitr>valuesrtokenMapconditionAsParseActionnullDebugActionsglQuotedStringdblQuotedString quotedString unicodeString lineStartlineEnd stringStart stringEndtraceParseActionr9r/r-rs                         $#######  $$$$$$                       ::::::::&&&&&& ;!5\%c )))4v))))))).~,*****$***B$;$4$$$$%K%D%%%%####!?3/?Es?S "ORZ^^$@AA     $ RW l^S ! c< # %& c3 %s *+-  RX l^T !" c< $ &' c3 %t +,. CoyA4GHS#=tCD#sO\48$> c?It Ld RS  &"8 8  % 0 ")8   TM WWPP!1PPP Q Q 04y-4449999z,?,?,?,?,? ,?,?,?^CCCCCmCCC.-"CCCCC CCC( 4m6^'^'^'^'^'m^'^'^'BW!W!W!W!W!/W!W!W!tX=X=X=X=X=X=X=X=vl=l=l=l=l=l=l=l=^dBdBdBdBdB?dBdBdBNZ'Z'Z'Z'Z'-Z'Z'Z'z= = = = = '= = = @;;;;;';;;*;;;;;%;;;B!!!!!$!!!HNNNNN$NNNb'#'#'#'#'#!'#'#'#T(+(+(+(+(+ (+(+(+VK=K=K=K=K=(K=K=K=\-------->--------BF!F!F!F!F! F!F!F!R CCCCC CCCLs's's's's'!s's's'l     (   66666n666r"""""N"""JTBTBTBTBTB>TBTBTBn44444~444n, +, +, , , , ` !! Y[[ ! !, / / 799  j ) ){}}%%n55 Y[[ ! !, / / tG.a888II %/00AA55% %%66))?"_4zz%q7Q7Q7QQ U;#.< = =  GCLL c#hh))* eIIj;. / /00AA&IIJ  "c"c""""J+k++++\G E ABBSH ( -..G E ABBSH ( -.. E ABBSH e CDDsJK ( 788 }1133344==>VWWV: ; ; 6, - -''tvv}}''']# 2###     %r/PK{5ZDIL&!&!RLib/site-packages/setuptools/_vendor/pyparsing/__pycache__/actions.cpython-311.pycnuW+A b;dddlmZddlmZGddZdZdZdZdZe e_ d d Z eZ eZ eZe ZeZd S) )ParseException)colc$eZdZdZdZdZdZdS)OnlyOncezI Wrapper for parse actions, to ensure they are only called once. c@ddlm}|||_d|_dS)Nr) _trim_arityF)corercallablecalled)self method_callrs sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/pyparsing/actions.py__init__zOnlyOnce.__init__ s0%%%%%%# K00  cr|js ||||}d|_|St||d)NTz.OnlyOnce obj called multiple times w/out reset)r r r)r sltresultss r__call__zOnlyOnce.__call__s@{ mmAq!,,GDKNQ#STTTrcd|_dS)zK Allow the associated parse action to be called once more. FN)r )r s rresetzOnlyOnce.resets  rN)__name__ __module__ __qualname____doc__rrrrrrrsN UUUrrcfd}|S)zt Helper method for defining parse actions that require matching at a specific column in the input text. cxt||kr$t||ddS)Nzmatched token not at column {})rrformat)strglocntoksns r verify_colz%match_only_at_col..verify_col's@ tT??a   t-M-T-TUV-W-WXX X rr)r$r%s` rmatch_only_at_colr&!s) YYYYY rcfdS)a Helper method for common parse actions that simply return a literal value. Especially useful when used with :class:`transform_string` (). Example:: num = Word(nums).set_parse_action(lambda toks: int(toks[0])) na = one_of("N/A NA").set_parse_action(replace_with(math.nan)) term = na | num term[1, ...].parse_string("324 234 N/A 234") # -> [324, 234, nan, 234] c gS)Nr)rrrrepl_strs rzreplace_with..<s H:rr)r)s`r replace_withr+.s & % % %%rc"|dddS)a# Helper parse action for removing quotation marks from parsed quoted strings. Example:: # by default, quotation marks are included in parsed results quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["'Now is the Winter of our Discontent'"] # use remove_quotes to strip quotation marks from parsed results quoted_string.set_parse_action(remove_quotes) quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["Now is the Winter of our Discontent"] rr)rrrs r remove_quotesr/?s Q4":rcl|r |ddn|dDfd}|S)aK Helper to create a validating parse action to be used with start tags created with :class:`make_xml_tags` or :class:`make_html_tags`. Use ``with_attribute`` to qualify a starting tag with a required attribute value, to avoid false matches on common tags such as ```` or ``
``. Call ``with_attribute`` with a series of attribute names and values. Specify the list of filter attributes names and values as: - keyword arguments, as in ``(align="right")``, or - as an explicit dict with ``**`` operator, when an attribute name is also a Python reserved word, as in ``**{"class":"Customer", "align":"right"}`` - a list of name-value tuples, as in ``(("ns1:class", "Customer"), ("ns2:align", "right"))`` For attribute names with a namespace prefix, you must use the second form. Attribute names are matched insensitive to upper/lower case. If just testing for ``class`` (with or without a namespace), use :class:`with_class`. To verify that the attribute exists, but without specifying a value, pass ``with_attribute.ANY_VALUE`` as the value. Example:: html = '''
Some text
1 4 0 1 0
1,3 2,3 1,1
this has no type
''' div,div_end = make_html_tags("div") # only match div tag having a type attribute with value "grid" div_grid = div().set_parse_action(with_attribute(type="grid")) grid_expr = div_grid + SkipTo(div | div_end)("body") for grid_header in grid_expr.search_string(html): print(grid_header.body) # construct a match with any div tag having a type attribute, regardless of the value div_any_type = div().set_parse_action(with_attribute(type=with_attribute.ANY_VALUE)) div_expr = div_any_type + SkipTo(div | div_end)("body") for div_header in div_expr.search_string(html): print(div_header.body) prints:: 1 4 0 1 0 1 4 0 1 0 1,3 2,3 1,1 Ncg|] \}}||f Srr).0kvs r z"with_attribute..s & & &1aV & & &rc D]e\}}||vrt||d|z|tjkr8|||kr,t||d||||fdS)Nzno matching attribute z+attribute {!r} has value {!r}, must be {!r})rwith_attribute ANY_VALUEr )rrtokensattrName attrValueattrss rpazwith_attribute..pas#(   Hiv%%$Q+Ch+NOOON4449IY9V9V$AHH &"2I  r)items)args attr_dictr=r<s @rr7r7Ps_r "QQQ!! & & & & &E      IrcP|rd|nd}tdi||iS)a Simplified version of :class:`with_attribute` when matching on a div class - made difficult because ``class`` is a reserved word in Python. Example:: html = '''
Some text
1 4 0 1 0
1,3 2,3 1,1
this <div> has no class
''' div,div_end = make_html_tags("div") div_grid = div().set_parse_action(with_class("grid")) grid_expr = div_grid + SkipTo(div | div_end)("body") for grid_header in grid_expr.search_string(html): print(grid_header.body) div_any_type = div().set_parse_action(with_class(withAttribute.ANY_VALUE)) div_expr = div_any_type + SkipTo(div | div_end)("body") for div_header in div_expr.search_string(html): print(div_header.body) prints:: 1 4 0 1 0 1 4 0 1 0 1,3 2,3 1,1 z{}:classclassr)r r7) classname namespace classattrs r with_classrGs;H1:F !!),,,wI  3 3Y 2 3 33rN)rA) exceptionsrutilrrr&r+r/r7objectr8rG replaceWith removeQuotes withAttribute withClassmatchOnlyAtColrrrrPs'&&&&&4   &&&""LLL^"688%4%4%4%4R    "rPK{5ZXU JLJLRLib/site-packages/setuptools/_vendor/pyparsing/__pycache__/testing.cpython-311.pycnuW+A b;dZ4PddlmZddlZddlmZmZmZmZmZGddZ dS))contextmanagerN) ParserElementParseExceptionKeyword__diag__ __compat__ceZdZdZGddZGddZe dd ed ej e d ej e d e d edej edej edefdZ dS)pyparsing_testzB namespace class for classes useful in writing unit tests c6eZdZdZdZdZdZdZdZdZ dS) &pyparsing_test.reset_pyparsing_contexta Context manager to be used when writing unit tests that modify pyparsing config values: - packrat parsing - bounded recursion parsing - default whitespace characters. - default keyword characters - literal string auto-conversion class - __diag__ settings Example:: with reset_pyparsing_context(): # test that literals used to construct a grammar are automatically suppressed ParserElement.inlineLiteralsUsing(Suppress) term = Word(alphas) | Word(nums) group = Group('(' + term[...] + ')') # assert that the '()' characters are not included in the parsed tokens self.assertParseAndCheckList(group, "(abc 123 def)", ['abc', '123', 'def']) # after exiting context manager, literals are converted to Literal expressions again ci|_dSN) _save_contextselfs sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/pyparsing/testing.py__init__z/pyparsing_test.reset_pyparsing_context.__init__-s!#D   ctj|jd<tj|jd<tj|jd<tj|jd<tj|jd<tjrtjj |jd<n d|jd<tj |jd<tj |jd<d tj D|jd <d tji|jd <|S) Ndefault_whitespacedefault_keyword_charsliteral_string_classverbose_stacktracepackrat_enabledpackrat_cache_size packrat_parserecursion_enabledc:i|]}|tt|S)getattrr).0names r z?pyparsing_test.reset_pyparsing_context.save..Fs1...26gh--...rrcollect_all_And_tokensr )rDEFAULT_WHITE_CHARSrrDEFAULT_KEYWORD_CHARS_literalStringClassr_packratEnabled packrat_cachesize_parse_left_recursion_enabledr _all_namesr r%rs rsavez+pyparsing_test.reset_pyparsing_context.save0s7D7XD 3 4:A:WD 6 71  & 8E7WD 3 44A4QD 0 1, @"/4"(<@"#782?2FD  /5  # ..:B:M...D z * )**K0D | ,Krctj|jdkrtj|jd|jdt_|jdt _tj|jd|jdD](\}}|r tj n tj |)dt_ |jdr tj |jdn|jd t_|jd t_|jd t _|S) NrrrrrFrrrrr )rr&rset_default_whitespace_charsrrr'inlineLiteralsUsingitemsrenabledisabler)enable_packratr,r-r r%)rr#values rrestorez.pyparsing_test.reset_pyparsing_context.restorePsE1%&:;<<:&';<04/ABV/WM ,,0,>?V,WG )  -"#9:    $1*=CCEE G G e?E?x/?FFFF,1M )!"34 K,T-?@T-UVVVV'+'9/'J $484F#5M 1150B<0PJ -Krcrt|}|j|j|Sr)typerupdate)rrets rcopyz+pyparsing_test.reset_pyparsing_context.copyqs2$t**,,C   $ $T%7 8 8 8Jrc*|Sr)r/rs r __enter__z0pyparsing_test.reset_pyparsing_context.__enter__vs99;; rc.|dSr)r8)rargss r__exit__z/pyparsing_test.reset_pyparsing_context.__exit__ys LLNNNNNrN) __name__ __module__ __qualname____doc__rr/r8r=r?rBr rrreset_pyparsing_contextr sz  0 $ $ $   @   B            rrGcVeZdZdZ d dZ d dZ d dZ d dZee dfdZ dS) &pyparsing_test.TestParseResultsAssertszk A mixin class to add parse results assertion methods to normal unittest.TestCase classes. Nc|*|||||,||||dSdS)z Unit test assertion to compare a :class:`ParseResults` object with an optional ``expected_list``, and compare any defined results names with an optional ``expected_dict``. Nmsg) assertEqualas_listas_dict)rresult expected_list expected_dictrLs rassertParseResultsEqualsz?pyparsing_test.TestParseResultsAsserts.assertParseResultsEqualssh(  0@0@c JJJ(  0@0@c JJJJJ)(rTc||d}|r"t|n!t|||||dS)z Convenience wrapper assert to test a parser element and input string, and assert that the resulting ``ParseResults.asList()`` is equal to the ``expected_list``. T) parse_all)rQrLN parse_stringprintdumprNrS)rexpr test_stringrQrLverboserPs rassertParseAndCheckListz>pyparsing_test.TestParseResultsAsserts.assertParseAndCheckListsw&&{d&CCF (fkkmm$$$$fnn&&'''  ) )& SV ) W W W W Wrc||d}|r"t|n!t|||||dS)z Convenience wrapper assert to test a parser element and input string, and assert that the resulting ``ParseResults.asDict()`` is equal to the ``expected_dict``. T)parseAll)rRrLNrV)rrZr[rRrLr\rPs rassertParseAndCheckDictz>pyparsing_test.TestParseResultsAsserts.assertParseAndCheckDictsw&&{T&BBF (fkkmm$$$$fnn&&'''  ) )& SV ) W W W W Wrc|\}}|dt||D}|D]\}}} td| Dd} td| Dd} | J|| | p|5t|tr| dddn #1swxYwYtd| Dd} td| Dd} | | fdkr||| | | p| t d |||||nd dS) ah Unit test assertion to evaluate output of ``ParserElement.runTests()``. If a list of list-dict tuples is given as the ``expected_parse_results`` argument, then these are zipped with the report tuples returned by ``runTests`` and evaluated using ``assertParseResultsEquals``. Finally, asserts that the overall ``runTests()`` success value is ``True``. :param run_tests_report: tuple(bool, [tuple(str, ParseResults or Exception)]) returned from runTests :param expected_parse_results (optional): [tuple(str, list, dict, Exception)] Nc"g|] \}}g||R Sr r )r"rptexpecteds r zOpyparsing_test.TestParseResultsAsserts.assertRunTestResults..s9%X%c$8$$rc3DK|]}t|t|VdSr) isinstancestrr"exps r zNpyparsing_test.TestParseResultsAsserts.assertRunTestResults..s1IIJsC4H4HIIIIIIIrc3nK|]0}t|tt|t,|V1dSr)rgr: issubclass Exceptionris rrkzNpyparsing_test.TestParseResultsAsserts.assertRunTestResults..s[ #)#t44:DC9S9Sr)expected_exceptionrLc3DK|]}t|t|VdSr)rglistris rrkzNpyparsing_test.TestParseResultsAsserts.assertRunTestResults..1NNS 38M8MNSNNNNNNrc3DK|]}t|t|VdSr)rgdictris rrkzNpyparsing_test.TestParseResultsAsserts.assertRunTestResults..rrrNN)rQrRrLzno validation for {!r}zfailed runTestsrK) zipnext assertRaisesrgrnrSrXformat assertTrue)rrun_tests_reportexpected_parse_resultsrLrun_test_successrun_test_resultsmergedr[rPrdfail_msgrorQrRs rassertRunTestResultsz;pyparsing_test.TestParseResultsAsserts.assertRunTestResultss82B . .%1),-=?U)V)V6<%P%P1K $IIIII4  H*.'/  **&*5!../AxSV/-- *&)<<-&, ---------------- )-NNHNNNPT)) )-NNHNNNPT)) *=9\II 99 &.;.;$,O :"":"A"A+"N"NOOOO OO S_ccBS      s;B  B$ 'B$ c#rK|||5dVddddS#1swxYwYdS)NrK)rx)rexc_typerLs rassertRaisesParseExceptionzApyparsing_test.TestParseResultsAsserts.assertRaisesParseExceptions""8"55                    s ,00)NNN)NTru) rCrDrErFrSr]r`rrrrr rrTestParseResultsAssertsrI|s  GK K K K KGK X X X XGK X X X XFJ= = = = ~ 6D$       rrNT|s start_lineend_line expand_tabseol_mark mark_spaces mark_controlreturnc |r|}dkrVtdtt ddt ddDdd iz}d nEtfd t t dd dgzD}||}|U|d krO|dkr3tddd}||}n|d |}|d}|t|}t|t|}ttd||}dkr | |dz |}n*d| d|dz |D}|sd Stt|td|D} d dzz} | dkrD| d dt t| dzdDzdz} nd } | | zd dt | dz Dzdz} | d| dz zzdz} | | zd fdt||DzdzS)u  Helpful method for debugging a parser - prints a string with line and column numbers. (Line and column numbers are 1-based.) :param s: tuple(bool, str - string to be printed with line and column numbers :param start_line: int - (optional) starting line number in s to print (default=1) :param end_line: int - (optional) ending line number in s to print (default=len(s)) :param expand_tabs: bool - (optional) expand tabs to spaces, to match the pyparsing default :param eol_mark: str - (optional) string to mark the end of lines, helps visualize trailing spaces (default="|") :param mark_spaces: str - (optional) special character to display in place of spaces :param mark_control: str - (optional) convert non-printing control characters to a placeholding character; valid values: - "unicode" - replaces control chars with Unicode symbols, such as "␍" and "␊" - any single character string - replace control characters with given string - None (default) - string is displayed as-is :return: str - input string with leading line numbers and column number headers Nunicodeci|]\}}|| Sr r )r"cus rr$z4pyparsing_test.with_line_numbers..sOOOdaQOOOrr!i$i3$i!$ci|]}|Sr r )r"rrs rr$z4pyparsing_test.with_line_numbers..sIIIQ IIIr  i $i#$) rrcg|]}|dzS)␊r r"lines rrez4pyparsing_test.with_line_numbers..'sZZZte|ZZZrrc34K|]}t|VdSr)lenrs rrkz3pyparsing_test.with_line_numbers..,s(993t99999999rcc3NK|] }dd|dzdzV!dS)z{}{}zc rdNryr"is rrkz3pyparsing_test.with_line_numbers..1sLMM(QUcM::rr c3LK|]}d|dzdzV dS)z {}r Nrrs rrkz3pyparsing_test.with_line_numbers..<sL$$a!er\22rr 1234567890c3NK|]\}}d||V dS)z {:{}d}:{}{}Nr)r"rrr lineno_widths rrkz3pyparsing_test.with_line_numbers..FsOAt$$Q dHEEr)start) expandtabsrh maketransrvrangerq translatereplacerminmax splitlinessplitjoin enumerate)rrrrrrrtbls_lines max_line_lenleadheader0header1header2rs ` ` @rwith_line_numbersz pyparsing_test.with_line_numberssn8   A  #y((mmOOc%2,,ff8M8M&N&NOOOFm$mmIIIId5B<<.@.@C5.HIII C  A  "{c'9'9i''mmF$;$;<<KK$$IIc;//  J  1vvHxQ((Q ++X66 9 $ $llnnZ!^h%>?GGZZzA~PX?X0YZZZG 23x==)) 9999999 lQ&' 2  ''"3|s':A#>#>??   GG  gg,"!4566     L=B+>)?@@4G  ii( CCC     r)NNTrNN) rCrDrErFrGr staticmethodrhtypingOptionalintboolrr rrr r s0ffffffffPoooooooob,0)- ,0-1] ] ] OC(] /#&]  ]  ] _S) ] oc*]  ] ] ] \] ] ] rr ) contextlibrrcorerrrrr r r rrrs&%%%%% | | | | | | | | | | rPK{5ZRLib/site-packages/setuptools/_vendor/pyparsing/__pycache__/results.cpython-311.pycnuW+A b;dbUddlmZmZmZmZddlZddlmZddl m Z m Z e e fZe edfed<eddDZGd d ZGd d ZejeejedS) )MutableMappingMappingMutableSequenceIteratorN)ref)TupleAny.str_typec#K|]}|VdSN).0_s sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/pyparsing/results.py rsar c,eZdZdgZdZdZdZdZdS)_ParseResultsWithOffsettupc||f|_dSr r)selfp1p2s r__init__z _ParseResultsWithOffset.__init__s8rc|j|Sr rris r __getitem__z#_ParseResultsWithOffset.__getitem__sx{rc|jSr rrs r __getstate__z$_ParseResultsWithOffset.__getstate__s xrc |d|_dSNrr)rargss r __setstate__z$_ParseResultsWithOffset.__setstate__s7rN)__name__ __module__ __qualname__ __slots__rrr"r&r rrrr sWIrrceZdZUdZdgddfZeedfed<gdZGdd e Z d3d Z ddd d e fd Z d Ze fdZdZdefdZdefdZdefdZdefdZdefdZdZdZdZdefdZdZd4dZdZdZ dZ!dZ"d Z#d5d!Z$d5d"Z%d5d#Z&de'fd$Z(de'fd%Z)d6d&Z*de fd'Z+de,fd(Z-d5d)Z.d*Z/d7de'fd,Z0d-Z1d.Z2d/Z3d0Z4d1Z5e6d4d5d2Z7e+Z8e-Z9e/Z:dS)8 ParseResultsaStructured parse results, to provide multiple means of access to the parsed data: - as a list (``len(results)``) - by list index (``results[0], results[1]``, etc.) - by attribute (``results.`` - see :class:`ParserElement.set_results_name`) Example:: integer = Word(nums) date_str = (integer.set_results_name("year") + '/' + integer.set_results_name("month") + '/' + integer.set_results_name("day")) # equivalent form: # date_str = (integer("year") + '/' # + integer("month") + '/' # + integer("day")) # parse_string returns a ParseResults object result = date_str.parse_string("1999/12/31") def test(s, fn=repr): print("{} -> {}".format(s, fn(eval(s)))) test("list(result)") test("result[0]") test("result['month']") test("result.day") test("'month' in result") test("'minutes' in result") test("result.dump()", str) prints:: list(result) -> ['1999', '/', '12', '/', '31'] result[0] -> '1999' result['month'] -> '12' result.day -> '31' 'month' in result -> True 'minutes' in result -> False result.dump() -> ['1999', '/', '12', '/', '31'] - day: '31' - month: '12' - year: '1999' Nr . _null_values)_name_parent _all_names_modal_toklist_tokdict __weakref__ceZdZdZddZdS)ParseResults.Lista Simple wrapper class to distinguish parsed list results that should be preserved as actual Python lists, instead of being converted to :class:`ParseResults`: LBRACK, RBRACK = map(pp.Suppress, "[]") element = pp.Forward() item = ppc.integer element_list = LBRACK + pp.delimited_list(element) + RBRACK # add parse actions to convert from ParseResults to actual Python collection types def as_python_list(t): return pp.ParseResults.List(t.as_list()) element_list.add_parse_action(as_python_list) element <<= item | element_list element.run_tests(''' 100 [2,3,4] [[2, 1],3,4] [(2, 1),3,4] (2,3,4) ''', post_parse=lambda s, r: (r[0], type(r[0]))) prints: 100 (100, ) [2,3,4] ([2, 3, 4], ) [[2, 1],3,4] ([[2, 1], 3, 4], ) (Used internally by :class:`Group` when `aslist=True`.) Nc|g}t|ts:td|jt |jt|S)Nz.{} may only be constructed with a list, not {}) isinstancelist TypeErrorformatr'type__new__)cls containeds rr>zParseResults.List.__new__|sd  i.. $fS\4 ??3KLL <<$$ $rr )r'r(r)__doc__r>r rrListr7Us3$ $ L % % % % % %rrBc t|tr|St|}d|_d|_t |_|g|_n^t|ttfr:t|tj r |ddgnt||_n|g|_t|_ |Sr )r9r,objectr>r/r0setr1r3r:_generator_typerBdictr4)r?toklistnamekwargsrs rr>zParseResults.__new__s g| , , N~~c""  %% ?DMM $!8 9 9 &g|'899# ']] MM %IDM  rTc4||_| |dkr||trt|}|s|h|_||_||jvr||t tfr|g}|rl||tr&tt|j d||<n&tt|dd||<|||_dS |d||<dS#tttf$r||ur|||<YdS||_YdSwxYwdSdSdS)Nr-r)r2intstrr1r/r.r r=r,rr3KeyErrorr; IndexError)rrHrIasListmodalr9s rrzParseResults.__init__sl   z$$$ !4yy )#'&DJd///:g$'788(&iG.!z'<88%<()9::A&&T &=(44a&&T (,DJ$$$.%,QZT $i<..."$..)0DJJJJ)-DJJJJ .-   0/s C## DDDct|ttfr |j|S||jvr|j|ddSt d|j|DS)Nrcg|] }|d S)rr )rvs r z,ParseResults.__getitem__..s$D$D$DaQqT$D$D$Dr)r9rLslicer3r1r4r,rs rrzParseResults.__getitem__sn a#u & & F=# #''}Q'+A..#$D$D4=3C$D$D$DEEErc||tr<|j|t|gz|j|<|d}nh||tt fr ||j|<|}nC|j|tt|dgz|j|<|}||trt||_ dSdSr$) rr4getr:rLrWr3r,wkrefr0)rkrUr9subs r __setitem__zParseResults.__setitem__s :a0 1 1 #}00DFF;;qcADM! A$CC ZC< ( (  DM! CC#}00DFF;;'1--? DM! C :c< ( ( &++CKKK & &rc t|ttfrt|j}|j|=t|tr|dkr||z }t||dz}t t ||}||j D]<\}}|D]4}t|D]"\}\}} t|| | |kz ||<#5=dS|j |=dS)Nr) r9rLrWlenr3r:rangeindicesreverser4items enumerater) rrmylenremovedrI occurrencesjr[valuepositions r __delitem__zParseResults.__delitem__s1 a#u & & ! &&E a !S!! $q55JA!QUOO5!))E"2"2344G OO   %)]%8%8%:%:  !k A09+0F0F,,E8)@!8x!|#<** A   a   rreturnc||jvSr )r4)rr[s r __contains__zParseResults.__contains__sDM!!rc*t|jSr )r`r3r!s r__len__zParseResults.__len__s4=!!!rc"|jp|j Sr )r3r4r!s r__bool__zParseResults.__bool__s 6777rc*t|jSr iterr3r!s r__iter__zParseResults.__iter__DM"""rc<t|jdddS)NrSrur!s r __reversed__zParseResults.__reversed__sDM$$B$'(((rc*t|jSr )rvr4r!s rkeyszParseResults.keysrxrcDfdDS)Nc3(K|] }|V dSr r rr[rs rrz&ParseResults.values..s'--AQ------rr|r!s`rvalueszParseResults.valuess%--------rcDfdDS)Nc3,K|]}||fVdSr r rs rrz%ParseResults.items..s+22DG 222222rrr!s`rrdzParseResults.itemss%2222diikk2222rc*t|jS)z Since ``keys()`` returns an iterator, this method is helpful in bypassing code that looks for the existence of any defined results names.)boolr4r!s rhaskeyszParseResults.haskeyssDM"""rcR|sdg}|D]7\}}|dkr |d|f}td|t|dtst |dks |d|vr|d}||}||=|S|d}|S)a Removes and returns item at specified index (default= ``last``). Supports both ``list`` and ``dict`` semantics for ``pop()``. If passed no argument or an integer argument, it will use ``list`` semantics and pop tokens from the list of parsed tokens. If passed a non-integer argument (most likely a string), it will use ``dict`` semantics and pop the corresponding value from any defined results names. A second default return value argument is supported, just as in ``dict.pop()``. Example:: numlist = Word(nums)[...] print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321'] def remove_first(tokens): tokens.pop(0) numlist.add_parse_action(remove_first) print(numlist.parse_string("0 123 321")) # -> ['123', '321'] label = Word(alphas) patt = label("LABEL") + Word(nums)[1, ...] print(patt.parse_string("AAB 123 321").dump()) # Use pop() in a parse action to remove named result (note that corresponding value is not # removed from list form of results) def remove_LABEL(tokens): tokens.pop("LABEL") return tokens patt.add_parse_action(remove_LABEL) print(patt.parse_string("AAB 123 321").dump()) prints:: ['AAB', '123', '321'] - LABEL: 'AAB' ['AAB', '123', '321'] rSdefaultrz-pop() got an unexpected keyword argument {!r}r_)rdr;r<r9rLr`)rr%rJr[rUindexret defaultvalues rpopzParseResults.pop sP 4DLLNN  DAqI~~Q|CJJ1MM d1gs # # s4yyA~~aDGEu+CU J7L rc||vr||S|S)a^ Returns named result matching the given key, or if there is no such name, then returns the given ``default_value`` or ``None`` if no ``default_value`` is specified. Similar to ``dict.get()``. Example:: integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") result = date_str.parse_string("1999/12/31") print(result.get("year")) # -> '1999' print(result.get("hour", "not specified")) # -> 'not specified' print(result.get("hour")) # -> None r )rkey default_values rrYzParseResults.getFs$ $;;9  rc|j|||jD]7\}}t |D]"\}\}}t ||||kz||<#8dS)a; Inserts new element at location index in the list of parsed tokens. Similar to ``list.insert()``. Example:: numlist = Word(nums)[...] print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321'] # use a parse action to insert the parse location in the front of the parsed results def insert_locn(locn, tokens): tokens.insert(0, locn) numlist.add_parse_action(insert_locn) print(numlist.parse_string("0 123 321")) # -> [0, '0', '123', '321'] N)r3insertr4rdrer)rr ins_stringrIrhr[rjrks rrzParseResults.insert]s" UJ///!%!4!4!6!6   D+(1+(>(>  $$E8!88x%'78"" A   rc:|j|dS)a Add single element to end of ``ParseResults`` list of elements. Example:: numlist = Word(nums)[...] print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321'] # use a parse action to compute the sum of the parsed integers, and add it to the end def append_sum(tokens): tokens.append(sum(map(int, tokens))) numlist.add_parse_action(append_sum) print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321', 444] N)r3append)ritems rrzParseResults.appendvs  T"""""rct|tr||dS|j|dS)a Add sequence of elements to end of ``ParseResults`` list of elements. Example:: patt = Word(alphas)[1, ...] # use a parse action to append the reverse of the matched strings, to make a palindrome def make_palindrome(tokens): tokens.extend(reversed([t[::-1] for t in tokens])) return ''.join(tokens) patt.add_parse_action(make_palindrome) print(patt.parse_string("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl' N)r9r,__iadd__r3extend)ritemseqs rrzParseResults.extendsJ g| , , * MM' " " " " " M  ) ) ) ) )rcL|jdd=|jdS)z7 Clear all elements and results names. N)r3r4clearr!s rrzParseResults.clears, M!!!  rc~ ||S#t$r(|drt|YdSwxYw)N__r-)rN startswithAttributeError)rrIs r __getattr__zParseResults.__getattr__sU :    t$$ +$T***22 s  .<<c8|}||z }|Sr )copy)rotherrs r__add__zParseResults.__add__siikk u  rcp|jrt|jfd|j}fd|D}|D]?\}}|||<t |dt rt ||d_@|xj|jz c_|xj|jzc_|S)Nc|dkrn|zSr$r )aoffsets rz'ParseResults.__iadd__..sAEE&&q6zrc ng|]1\}}|D])}|t|d|df*2S)rr_)r)rr[vlistrU addoffsets rrVz)ParseResults.__iadd__..sdAu+AaD))AaD//BBCrr) r4r`r3rdr9r,rZr0r1)rr otheritemsotherdictitemsr[rUrrs @@rrzParseResults.__iadd__s > /''FAAAAI--//J *N ' / /1QadL11/#(;;AaDL '  5++ rcjt|tr|dkr|S||zSr$)r9rLr)rrs r__radd__zParseResults.__radd__s6 eS ! ! eqjj99;; 4< rcdt|j|j|S)Nz {}({!r}, {}))r<r=r'r3as_dictr!s r__repr__zParseResults.__repr__s-$$T$ZZ%8$-XXXrcVddd|jDzdzS)N[z, ctg|]5}t|trt|nt|6Sr )r9r,rMrepr)rrs rrVz(ParseResults.__str__..sG)L99FCFFFtAwwr])joinr3r!s r__str__zParseResults.__str__sH ii!]   rcg}|jD]j}|r|r||t|tr||z }H|t |k|Sr )r3rr9r, _asStringListrM)rsepoutrs rrzParseResults._asStringListsM & &D s  3$ -- &t))+++ 3t99%%%% rc$d|jDS)ax Returns the parse results as a nested list of matching tokens, all converted to strings. Example:: patt = Word(alphas)[1, ...] result = patt.parse_string("sldkj lsdkj sldkj") # even though the result prints in string-like form, it is actually a pyparsing ParseResults print(type(result), result) # -> ['sldkj', 'lsdkj', 'sldkj'] # Use as_list() to create an actual list result_list = result.as_list() print(type(result_list), result_list) # -> ['sldkj', 'lsdkj', 'sldkj'] cdg|]-}t|tr|n|.Sr )r9r,as_list)rress rrVz(ParseResults.as_list..sC   (\:: CCKKMMM   r)r3r!s rrzParseResults.as_lists%  }    rchfdtfd|DS)a Returns the named parse results as a nested dictionary. Example:: integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") result = date_str.parse_string('12/31/1999') print(type(result), repr(result)) # -> (['12', '/', '31', '/', '1999'], {'day': [('1999', 4)], 'year': [('12', 0)], 'month': [('31', 2)]}) result_dict = result.as_dict() print(type(result_dict), repr(result_dict)) # -> {'day': '1999', 'year': '12', 'month': '31'} # even though a ParseResults supports dict-like access, sometime you just need to have a dict import json print(json.dumps(result)) # -> Exception: TypeError: ... is not JSON serializable print(json.dumps(result.as_dict())) # -> {"month": "31", "day": "1999", "year": "12"} ct|tr6|r|n fd|DS|S)Nc&g|] }|Sr r )rrUto_items rrVz9ParseResults.as_dict..to_item..s!;T;T;T1GGAJJ;T;T;Tr)r9r,rr)objrs rrz%ParseResults.as_dict..to_item sO#|,, (+ Ts{{}}};T;T;T;TPS;T;T;TT rc38K|]\}}||fVdSr r )rr[rUrs rrz'ParseResults.as_dict..s3==1Q O======r)rGrd)rrs @rrzParseResults.as_dictsI*      ==== ======rct|j}|j|_|j|_|xj|jzc_|j|_|S)zG Returns a new copy of a :class:`ParseResults` object. )r,r3r4rr0r1r/)rrs rrzParseResults.copysQ4=))}))++ l  $/)J  rc|jr|jS|jr(|fd}r ||ndSt|dkrt|jdkrtt t |jdddvr3t t |jSdS)a Returns the results name for this token expression. Useful when several different expressions might match at a particular location. Example:: integer = Word(nums) ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d") house_number_expr = Suppress('#') + Word(nums, alphanums) user_data = (Group(house_number_expr)("house_number") | Group(ssn_expr)("ssn") | Group(integer)("age")) user_info = user_data[1, ...] result = user_info.parse_string("22 111-22-3333 #221B") for item in result: print(item.get_name(), ':', item[0]) prints:: age : 22 ssn : 111-22-3333 house_number : 221B cltfdjDdS)Nc3:K|]\}}|D] \}}|u |VdSr r )rr[rrUlocr\s rrz@ParseResults.get_name..find_in_parent..@sS$Au&+#As!88$8888 r)nextr4rd)r\pars`rfind_in_parentz-ParseResults.get_name..find_in_parent>sO(+ (:(:(<(< rNr_r)rrS)r/r0r`r4rrvrr|)rrrs @rget_namezParseResults.get_name s2 : :  \ ,,..C     ,/8>>$'''D 8 IINNDM""a''T$-..00112215a8GCCT]//112233 34rrctg}d}||r$|t|znd|r|rt d|D}|D]\}} |r|||d|d|z|t| trU| r0|| ||||dz|t| |t| td|Dr|} t| D]\} } t| trQ|d |d|z| |d|dzz| ||||dzk|d |d|z| |d|dzzt| fzd |S) aM Diagnostic method for listing out the contents of a :class:`ParseResults`. Accepts an optional ``indent`` argument so that this string can be embedded in a nested display of other data. Example:: integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") result = date_str.parse_string('1999/12/31') print(result.dump()) prints:: ['1999', '/', '12', '/', '31'] - day: '31' - month: '12' - year: '1999'  r-c3>K|]\}}t||fVdSr )rM)rr[rUs rrz$ParseResults.dump..ns0DDtq!A{DDDDDDrz {}{}- {}: z r_)indentfull include_list_depthc3@K|]}t|tVdSr )r9r,)rvvs rrz$ParseResults.dump..s,??B:b,//??????rz {}{}[{}]: {}{}{}z %s%s[%d]: %s%s%s)rrMrrsortedrdr<r9r,dumpranyrer) rrrrrrNLrdr[rUrrs rrzParseResults.dumpSs*  <G6C ////RHHH 3 ||~~ ,DDtzz||DDDDD!,,DAq' 2JJ|226D6MANNOOO!!\22 , /JJ !+1)-1=+1A: !'!"!" JJs1vv.... 477++++??$????? &q\\EAr!"l33 188 &!% ! &!%!!4 "+1)-1=+1A: !(!"!"    1 &!% ! &!%!!4 #B     wws||rcTtj|g|Ri|dS)a% Pretty-printer for parsed results as a list, using the `pprint `_ module. Accepts additional positional or keyword args as defined for `pprint.pprint `_ . Example:: ident = Word(alphas, alphanums) num = Word(nums) func = Forward() term = ident | num | Group('(' + func + ')') func <<= ident + Group(Optional(delimited_list(term))) result = func.parse_string("fna a,b,(fnb c,d,200),100") result.pprint(width=40) prints:: ['fna', ['a', 'b', ['(', 'fnb', ['c', 'd', '200'], ')'], '100']] N)pprintr)rr%rJs rrzParseResults.pprints22  dllnn6t666v66666rc|j|j|jdur|pd|j|jffSr )r3r4rr0r1r/r!s rr"zParseResults.__getstate__sM M ""$$ D(;T\\^^Ct    rc|\|_\|_}}|_t||_|t ||_dSd|_dSr )r3r4r/rEr1rZr0)rstater inAccumNamess rr&zParseResults.__setstate__sKHME E sL$*l++ ? ::DLLLDLLLrc|j|jfSr )r3r/r!s r__getnewargs__zParseResults.__getnewargs__s}dj((rc~tt|t|zSr )dirr=r:r|r!s r__dir__zParseResults.__dir__s)4::diikk!2!222rc  d}|g}|D]P\}}t|tr||||z }5|||g|||z }Q|||g|}|S)z Helper classmethod to construct a ``ParseResults`` from a ``dict``, preserving the name-value relations as results names. If an optional ``name`` argument is given, a nested ``ParseResults`` will be returned. cp t|t|t S#t$rYdSwxYw)NF)rvr9r Exception)rs r is_iterablez+ParseResults.from_dict..is_iterablesK 5S &c84444   uu s ' 55)rI)rIrP)rdr9r from_dict)r?rrIrrr[rUs rrzParseResults.from_dicts 5 5 5c"ggKKMM ? ?DAq!W%% ?s}}QQ}///ssA3Q{{1~~>>>>  #se$'''C r)NNr )rmr,)r-)r-TTr);r'r(r)rAr.rr __annotations__r*r:rBr>r9rrr]rlrrorLrqrsrrwrzr|rrdrrrYrrrrrrrrrMrrrrrGrrrrrr"r&rr classmethodrrPasDictgetNamer rrr,r,s++Z&*2r2$6L%S/666I1%1%1%1%1%t1%1%1%f0d$:....@FFF,6 & & & &!!!.""""""""""8$8888#(####)h))))###...333##### 8 8 8 t!!!!.2###"***( &    Y#YYYY                (>>>>>:    111fNNNNNN`7778       )))333[2F FGGGrr,)collections.abcrrrrrweakrefrrZtypingrr rMbytesr r=rrFrr,registerr rrrsNNNNNNNNNNNNN !5\%c )))$2''         Y Y Y Y Y Y Y Y x %%%&&&&&rPK{5Z!l<<RLib/site-packages/setuptools/_vendor/pyparsing/__pycache__/unicode.cpython-311.pycnuW+A b;d#*ddlZddlmZddlmZmZmZGddZeeeeefeefZ GddZ Gdd e Z e j j je j jjze j jjze j _e je _e je _e je _e je _e je _e je _e j e _e j j e j _e j je j _e j je j _ e j!e _"e j#e _$e j%e _&dS) N) filterfalse)ListTupleUnionceZdZdZdZdS)_lazyclasspropertycD||_|j|_|j|_dS)N)fn__doc____name__)selfr s sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/pyparsing/unicode.py__init__z_lazyclassproperty.__init__ sz   c"t|tdr(tfdjddDri_|jj}|jvr|j|<j|S)N_internc3HK|]}jt|dguVdS)rN)rgetattr).0 superclassclss r z-_lazyclassproperty.__get__..sJ. .  K7:y"== =. . . . . . r)typehasattrany__mro__rr r )r objrattrnames ` r__get__z_lazyclassproperty.__get__s ;s))CsI&& #. . . . !k!""o. . . + +  CK7# 3; & &$(GGCLLCK !{8$$rN)r __module__ __qualname__rr rrrrs2$$$ % % % % %rrceZdZUdZgZeed<edZedZ edZ edZ edZ edZ ed Zd S) unicode_seta A set of Unicode characters, for language-specific strings for ``alphas``, ``nums``, ``alphanums``, and ``printables``. A unicode_set is defined by a list of ranges in the Unicode character set, in a class attribute ``_ranges``. Ranges can be specified using 2-tuples or a 1-tuple, such as:: _ranges = [ (0x0020, 0x007e), (0x00a0, 0x00ff), (0x0100,), ] Ranges are left- and right-inclusive. A 1-tuple of (x,) is treated as (x, x). A unicode set can also be defined using multiple inheritance of other unicode sets:: class CJK(Chinese, Japanese, Korean): pass _rangesc g}|jD]S}|turnGt|ddD]4}|t |d|ddz5Tdt t |DS)Nr&r#rrc,g|]}t|Sr#)chrrcs r z1unicode_set._chars_for_ranges..?s1111A111r)rr%rextendrangesortedset)rretccrrs r_chars_for_rangeszunicode_set._chars_for_ranges7s+ 5 5B[  b)R00 5 5 5A2 334444 511s3xx 0 01111rcfdttj|jS)z+all non-whitespace characters in this range)joinrstrisspacer5rs r printableszunicode_set.printablesAs%ww{3;0EFFGGGrcfdttj|jS)z'all alphabetic characters in this ranger7)r8filterr9isalphar5r;s ralphaszunicode_set.alphasF%wwvck3+@AABBBrcfdttj|jS)z*all numeric digit characters in this ranger7)r8r>r9isdigitr5r;s rnumszunicode_set.numsKrArc |j|jzS)z)all alphanumeric characters in this range)r@rDr;s r alphanumszunicode_set.alphanumsPszCH$$rc dttdttj|jdzdzdzS)zVall characters in this range that are valid identifier characters, plus underscore '_'r7u:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzªµºu|ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ_)r8r0r1r>r9 isidentifierr5r;s r identcharszunicode_set.identcharsUsrww GGF3#3S5JKKLLRSUU     rc dtt|jdzdd|jDzS)zu all characters in this range that are valid identifier body characters, plus the digits 0-9 r7 0123456789c@g|]}d|z|S)rH)rIr+s rr-z.unicode_set.identbodychars..os-VVVqcAg=S=S=U=UVVVVr)r8r0r1rJr5r;s ridentbodycharszunicode_set.identbodycharscsk ww N"#ggVVC$9VVV     rN)r r!r"r r&UnicodeRangeList__annotations__rr5r<r@rDrFrJrNr#rrr%r%s*!#G """222HHHCCCCCC%%%          rr%ceZdZUdZdejfgZeed<Gdde Z Gdde Z Gdd e Z Gd d e Z Gd d e ZGdde ZGdde ZGdde ZGdde ZeZGddeeeZGdde ZGdde ZGdde ZGdde Zd S)!pyparsing_unicodezF A namespace class for defining common language unicode_sets. r&c$eZdZUdZdgZeed<dS)(pyparsing_unicode.BasicMultilingualPlanez,Unicode set for the Basic Multilingual Plane)rSir&Nr r!r"r r&rOrPr#rrBasicMultilingualPlanerUs866 % !     rrWc&eZdZUdZddgZeed<dS)pyparsing_unicode.Latin1z/Unicode set for Latin-1 Unicode Character Range)rS~)r&NrVr#rrLatin1rYs;99  % !     rr]c$eZdZUdZdgZeed<dS)pyparsing_unicode.LatinAz/Unicode set for Latin-A Unicode Character Range)ir&NrVr#rrLatinAr_899 % !     rrac$eZdZUdZdgZeed<dS)pyparsing_unicode.LatinBz/Unicode set for Latin-B Unicode Character Range)iiOr&NrVr#rrLatinBrdrbrrec&eZdZUdZgdZeed<dS)pyparsing_unicode.Greekz.Unicode set for Greek Unicode Character Ranges)#)iBiE)ipiw)izi)ii)i)ii)ii)ii)i&i*)i^)i`)ifij)ii)ii)i iE)iHiM)iPiW)iY)i[)i])i_i})ii)ii)ii)ii)ii)ii)ii)i)!)i'i')ie)i@i)i)iiE)iir&NrVr#rrGreekrgs?88$% $% $% !$ $ $ $ $ rrhc&eZdZUdZgdZeed<dS)pyparsing_unicode.Cyrillicz0Unicode set for Cyrillic Unicode Character Range))ii/)ii)i+)ix)i-i-)i@ir)iti)i.i/r&NrVr#rrCyrillicrjs?:: % % % ! rrkc&eZdZUdZgdZeed<dS)pyparsing_unicode.Chinesez/Unicode set for Chinese Unicode Character Range))i.i.)i.i.)i1i1)i4iM)Ni)ii)iim)ipi)ioio)ii)ii;)i@iH)ii֦)ii4)i@i)i i)ii)iir&NrVr#rrChineserms?99% % % !     rrocveZdZUdZgZeed<GddeZGddeZ GddeZ d S) pyparsing_unicode.Japanesez`Unicode set for Japanese Unicode Character Range, combining Kanji, Hiragana, and Katakana rangesr&c&eZdZUdZddgZeed<dS) pyparsing_unicode.Japanese.Kanjiz-Unicode set for Kanji Unicode Character Range)rni)i0i?0r&NrVr#rrKanjirss; ; ;  )G%     rrtc&eZdZUdZgdZeed<dS)#pyparsing_unicode.Japanese.Hiraganaz0Unicode set for Hiragana Unicode Character Range))iA0i0)00)i0)ip)i)iPiR)ir&NrVr#rrHiraganarvs? > >)))G%     rryc&eZdZUdZgdZeed<dS)#pyparsing_unicode.Japanese.Katakanaz1Unicode set for Katakana Unicode Character Range) )rwi0)rxi0)i1i1)i2i2)iei)i)idig)ii)ir&NrVr#rrKatakanar{s? ? ? ) ) )G%     rr|N) r r!r"r r&rOrPr%rtryr|r#rrJapaneserqsjj$&!&&&     K        {        {     rr}c&eZdZUdZgdZeed<dS)pyparsing_unicode.Hangulz7Unicode set for Hangul (Korean) Unicode Character Range))ii)i.0i/0)i11i1)i2i2)i`2i{2)i~2)i`i|)ii)ii)ii)ii)ii)ii)ii)iir&NrVr#rrHangulr s?AA% % % !     rrceZdZdZdS)pyparsing_unicode.CJKzTUnicode set for combined Chinese, Japanese, and Korean (CJK) Unicode Character RangeN)r r!r"r r#rrCJKr"s^^^^rrc&eZdZUdZddgZeed<dS)pyparsing_unicode.Thaiz,Unicode set for Thai Unicode Character Range)ii:)i?i[r&NrVr#rrThair%s;66  % !     rrc&eZdZUdZgdZeed<dS)pyparsing_unicode.Arabicz.Unicode set for Arabic Unicode Character Range))ii)ii)iir&NrVr#rrArabicr,s?88% % % !     rrc&eZdZUdZgdZeed<dS)pyparsing_unicode.Hebrewz.Unicode set for Hebrew Unicode Character Range) )ii)ii)ii)ii6)i8i<)i>)i@iA)iCiD)iFiOr&NrVr#rrHebrewr4s?88 % % % ! rrc&eZdZUdZddgZeed<dS)pyparsing_unicode.Devanagariz2Unicode set for Devanagari Unicode Character Range)i i )iir&NrVr#rr DevanagarirBs;<<  % !     rrN)r r!r"r sys maxunicoder&rOrPr%rWr]rarerhrkror}rKoreanrrrrrr#rrrRrRvs  !G                                 & & & & & & & & P      ;         +   .#####;###J        (F_____gx___     {                          [     rrR)'r itertoolsrtypingrrrrintrOr%rRr}rtr&ryr|rWBMPrالعربيةro中文rkкириллицаrhΕλληνικάrעִברִית 日本語漢字 カタカナ ひらがなr 한국어r ไทยrदेवनागरीr#rrrs !!!!!!%%%%%%%%%%%%%%%%%%(eCHouSz9:;T T T T T T T T nQ Q Q Q Q Q Q Q n$, )12 )12" *@$5#; ,4'8'A$%6%<"#4#; /8$5$>$D!*;*D*M'*;*D*M'/6/4->-I***rPK{5Zgb22ULib/site-packages/setuptools/_vendor/pyparsing/__pycache__/exceptions.cpython-311.pycnuW+A b;d?# pddlZddlZddlZddlmZmZmZmZddlm Z Gdde j e j e j e je jZeejZejdezdzZGd d eZGd d eZGd deZGddeZGddeZdS)N)collinelineno_collapse_string_to_ranges)pyparsing_unicodeceZdZdS)ExceptionWordUnicodeN)__name__ __module__ __qualname__vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/pyparsing/exceptions.pyr r sDrr z([z ]{1,16})|.ceZdZdZ ddededejefdZe dd Z e d Z e d efd Ze d efd Ze d efdZe d efdZd efdZdZdddded efdZdd efdZeZdS)ParseBaseExceptionz7base exception class for all parsing runtime exceptionsrNpstrlocmsgc||_|||_d|_n||_||_|x|_|_|||f|_dS)N)rrrparser_element parserElementargs)selfrrrelems r__init__zParseBaseException.__init__sP ;DHDIIDHDI377d03$ rcddl}ddlm}|tj}g}t |t r=||j|d|j dz zdz|d t|j ||dkr| |j|}t}t!|| dD]M\}}|d} | jd d} t | |r| jjd vrHt+| |vrZ|t+| t| } |d | j| j | n| Ct| } |d | j| j n?| j} | jd vr|d | j|dz}|snOd|S)a Method to take an exception and translate the Python internal traceback into a list of the pyparsing expressions that caused the exception to be raised. Parameters: - exc - exception raised during parsing (need not be a ParseException, in support of Python exceptions that might be raised in a parse action) - depth (default=16) - number of levels back in the stack trace to list expression and function names; if None, the full stack trace names will be listed; if 0, only the failing input line, marker, and exception string will be shown Returns a multi-line string listing the ParserElements and/or function names in the exception's stack trace. rNr) ParserElement ^z{}: {})contextr) parseImpl _parseNoCachez {}.{} - {}z{}.{})wrapperzz{} )inspectcorer sysgetrecursionlimit isinstancerappendrcolumnformattyper getinnerframes __traceback__set enumeratef_localsgetf_codeco_nameidaddr join) excdepthr(r retcallersseenifffrmf_self self_typecodes rexplain_exceptionz$ParseBaseException.explain_exception)sW" '''''' =)++E c- . . 5 JJsx JJscj1n-3 4 4 4 8??499#5s;;<<< 199,,S->,NNG55D"7E677#344  2e))&$77fm44:z)1OOO &zzT)) HHRZZ((( $V IJJ$++%0)2Df ' $V IJJw~~i.BIDVWWXXXX:D|'>>> JJt{{4<88999 Eyy~~rcF||j|j|j|jS)z internal factory method to simplify creating one type of ParseException from another - avoids having __init__ signature conflicts among subclasses )rrrr)clspes r_from_exceptionz"ParseBaseException._from_exceptionks# s27BFBFB,<===rreturnc6t|j|jS)zG Return the line of text where the exception occurred. )rrrrs rrzParseBaseException.liness DHdi(((rc6t|j|jS)zV Return the 1-based line number of text where the exception occurred. )rrrrNs rrzParseBaseException.linenozs dh ***rc6t|j|jSz] Return the 1-based column on the line of text where the exception occurred. rrrrNs rrzParseBaseException.col 48TY'''rc6t|j|jSrQrRrNs rr.zParseBaseException.columnrSrc|jr|jt|jkrd}nut|j|j}||d}n|j|j|jdz}d|zdd}nd}d|j||j|j |j S) Nz, found end of textrrz , found %rz\\\rz%{}{} (at char {}), (line:{}, col:{})) rrlen_exception_word_extractormatchgroupreplacer/rrr.)rfoundstr found_matchfounds r__str__zParseBaseException.__str__s 9 x3ty>>))08==diRR *'--a00EE IdhA&=>E(5099%FFH6== Hh$+t{   rc t|SN)strrNs r__repr__zParseBaseException.__repr__s4yyrz>!<) markerString marker_stringc||n|}|j}|jdz }|r(d|d||||df}|S)z Extracts the exception line from the input string, and marks the location of the exception with a special symbol. Nrr)rr.r;strip)rrerdline_str line_columns rmark_input_linez"ParseBaseException.mark_input_linesm )6(A}}| 9kAo  ww,;,'x 7MNH~~rc.|||S)a  Method to translate the Python internal traceback into a list of the pyparsing expressions that caused the exception to be raised. Parameters: - depth (default=16) - number of levels back in the stack trace to list expression and function names; if None, the full stack trace names will be listed; if 0, only the failing input line, marker, and exception string will be shown Returns a multi-line string listing the ParserElements and/or function names in the exception's stack trace. Example:: expr = pp.Word(pp.nums) * 3 try: expr.parse_string("123 456 A789") except pp.ParseException as pe: print(pe.explain(depth=0)) prints:: 123 456 A789 ^ ParseException: Expected W:(0-9), found 'A' (at char 8), (line:1, col:9) Note: the diagnostic output will include string representations of the expressions that failed to parse. These representations will be more helpful if you use `set_name` to give identifiable names to your expressions. Otherwise they will use the default string forms, which may be cryptic to read. Note: pyparsing's default truncation of exception tracebacks may also truncate the stack of expressions that are displayed in the ``explain`` output. To get the full listing of parser expressions, you may have to set ``ParserElement.verbose_stacktrace = True`` )rG)rr=s rexplainzParseBaseException.explainsJ%%dE222r)rNN)rra)r r r __doc__rbinttypingOptionalr staticmethodrG classmethodrKpropertyrrrr.r_rcrjrl markInputlinerrrrrsAA$(  %%%%_S ! %%%%"???\?B>>[>)c)))X) ++++X+ (S(((X( ((((X(      $      S  SV     %3%33%3%3%3%3N$MMMrrceZdZdZdS)ParseExceptionaq Exception thrown when a parse expression doesn't match the input string Example:: try: Word(nums).set_name("integer").parse_string("ABC") except ParseException as pe: print(pe) print("column: {}".format(pe.column)) prints:: Expected integer (at char 0), (line:1, col:1) column: 1 Nr r r rmrrrrvrvsrrvceZdZdZdS)ParseFatalExceptionzu User-throwable exception thrown when inconsistent parse content is found; stops all parsing immediately NrwrrrryrysrryceZdZdZdS)ParseSyntaxExceptionz Just like :class:`ParseFatalException`, but thrown internally when an :class:`ErrorStop` ('-' operator) indicates that parsing is to stop immediately because an unbacktrackable syntax error has been found. Nrwrrrr{r{srr{c$eZdZdZdZdefdZdS)RecursiveGrammarExceptionz Exception thrown by :class:`ParserElement.validate` if the grammar could be left-recursive; parser may need to enable left recursion using :class:`ParserElement.enable_left_recursion` c||_dSra)parseElementTrace)rparseElementLists rrz"RecursiveGrammarException.__init__s!1rrLc6d|jS)NzRecursiveGrammarException: {})r/rrNs rr_z!RecursiveGrammarException.__str__ s.55d6LMMMrN)r r r rmrrbr_rrrr}r}sO 222NNNNNNNrr})rer*routilrrrrunicoderppuLatin1LatinALatinBGreekCyrillicr alphanums_extract_alphanumscompilerX Exceptionrrvryr{r}rrrrs ????????????------     3:sz3:sy#,   0/0D0NOO&BJt.@'@<'OPPF$F$F$F$F$F$F$F$R'(,. N N N N N N N N N NrPK{5Z77OLib/site-packages/setuptools/_vendor/pyparsing/__pycache__/util.cpython-311.pycnuW+A b;dddlZddlZddlZddlZddlmZddlmZmZm Z e dZ GddZ edd e d ed e fd Zedd e d ed e fd Zedd e d ed efdZGddZGddZGddZGddeZded efdZ ddeee efded efdZded efdZdS)N) lru_cache)ListUnionIterable\ceZdZUdZgZeeed<gZeeed<dZ e dZ e dZ e dZ dS) __config_flagsz=Internal class for defining compatibility and debugging flags _all_names _fixed_names configurationc b||jvrctjd|j||jt t||dS||j vrt|||dStd|j|)Nz'{}.{} {} is {} and cannot be overriddenzno such {} {!r}) r warningswarnformat__name__ _type_descstrgetattrupperr setattr ValueError)clsdnamevalues pE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/pyparsing/util.py_setz__config_flags._sets C$ $ $ M9@@LNU++,,2244     F CN " " C & & & & &.55cneLLMM Mc.||dS)NTrrnames rz__config_flags.$s388D$+?+?rc.||dS)NFrr s rr"z__config_flags.%sCHHT5,A,ArN)r __module__ __qualname____doc__r rr__annotations__r r classmethodrenabledisablerrr r sGGJS  L$s)    JNN[N [?? @ @FkAABBGGGrr )maxsizelocstrgreturnc|}d|cxkrt|krnn||dz dkrdn||dd|z S)a Returns current column within a string, counting newlines as line separators. The first column is number 1. Note: the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`ParserElement.parseString` for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. r )lenrfind)r.r/ss rcolr7(sc AC    #a&&     QsQwZ4%7%711S1774QRTWCXCX=XXrc6|dd|dzS)aReturns current line number within a string, counting newlines as line separators. The first line is number 1. Note - the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`ParserElement.parseString` for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. r3rr2)count)r.r/s rlinenor:9s ::dAs # #a ''rc|dd|}|d|}|dkr ||dz|n ||dzdS)zh Returns the line of text containing loc within a string, counting newlines as line separators. r3rr2N)r5find)r.r/last_crnext_crs rliner?GsZ jjq#&&Giic""G*1Q,,4! g% & &D1.getW9S,// /rc||<dSrDr+)rFrGrcaches rset_z&_UnboundedCache.__init__..set_ZsE#JJJrc0dSrDclearrFrMs rrQz'_UnboundedCache.__init__..clear] KKMMMMMr)rJobjectrIsizetypes MethodTypesetrQ)selfrJrNrQrMrHrIs @@@r__init__z_UnboundedCache.__init__RsI +1883L 0 0 0 0 0 0           #C..#D$//%eT22 rNrr$r%rZr+rrrArAQs#33333rrAceZdZdZdS) _FifoCachec8tx|_tjjfd}fd}fd}|_t j|||_t j|||_t j|||_ dS)Nc|SrDr+rEs rrJz _FifoCache.__init__..getlrKrc||<tkr+dtk)dSdSNF)last)r4popitem)rFrGrrMrUs rrNz!_FifoCache.__init__..set_osPE#Je**t## 5 )))e**t######rc0dSrDrPrRs rrQz"_FifoCache.__init__..cleartrSr) rTrI collections OrderedDictrJrUrVrWrXrQ)rYrUrJrNrQrMrHrIs ` @@@rrZz_FifoCache.__init__gs+1883L'))I  0 0 0 0 0 0 * * * * * *       #C..#D$//%eT22 rNr[r+rrr]r]fs#33333rr]c0eZdZdZdZdZdZdZdZdS)LRUMemoz A memoizing mapping that retains `capacity` deleted items The memo tracks retained items by their access order; once `capacity` items are retained, the least recently used item is discarded. cR||_i|_tj|_dSrD) _capacity_activererf_memory)rYcapacitys rrZzLRUMemo.__init__s$! ".00 rc |j|S#t$r*|j||j|cYSwxYwrD)rkKeyErrorrl move_to_endrYrGs r __getitem__zLRUMemo.__getitem__sX %<$ $ % % % L $ $S ) ) )<$ $ $ $ %s 1AAcP|j|d||j|<dSrD)rlpoprkrYrGrs r __setitem__zLRUMemo.__setitem__s, d###! Src |j|}t|j|jkr8|jdt|j|jk8||j|<dS#t $rYdSwxYwra)rkrtr4rlrjrcrorus r __delitem__zLRUMemo.__delitem__s &L$$S))Edl##t~55 $$%$000dl##t~55 %DL        DD sA== B  B cj|j|jdSrD)rkrQrl)rYs rrQz LRUMemo.clears0  rN) rr$r%r&rZrrrvrxrQr+rrrhrh}si111 %%%"""&&&rrhceZdZdZdZdS) UnboundedMemoz< A memoizing mapping that retains all deleted items cdSrDr+rqs rrxzUnboundedMemo.__delitem__s rN)rr$r%r&rxr+rrr{r{s-     rr{r6cdD] }||t|z}!|dd}|dd}t|S)Nz\^-[]r3z\n z\t)replace_bslashr)r6cs r_escape_regex_range_charsrs[ && IIa1 % % $A $A q66MrT re_escapec < fd d _tj _d _d d}|s| g}dt t|}t|dkrtj | D]\}}t|x}}tj tj t|g|d }||kr| |t#|t#|d zkrdnd }|d  || |n fd |D}d|S)Nct|}|jc_}||z dkrtj_jS)Nr2)ordprevnextcounterr)rc_intris_consecutives rrz2_collapse_string_to_ranges..is_consecutivesKA$)>+>!T 4#?#?N ##rrc|dvrd|zn|S)Nz\^-][\r+rs rescape_re_range_charz8_collapse_string_to_ranges..escape_re_range_chars==taxxa/rc|SrDr+rs rno_escape_re_range_charz;_collapse_string_to_ranges..no_escape_re_range_charsr)rGr2)maxlen-z{}{}{}c&g|] }|Sr+r+).0rrs r z._collapse_string_to_ranges..s%2221##A&&222r)r itertoolsr9rrjoinsortedrXr4groupbyrredequechainiterrtappendrr) r6rrretrFcharsfirstrbseprrs @@r_collapse_string_to_rangesrs$$$$$N&_..NN000 76 C s1vvA 1vvzz!)!@@@  HAu;; &ED$dV e44Qcee }} //667777IIUa77bbS OO,,U33S:N:Nt:T:T 3222222 773<<rllcg}|D]O}t|tr#|t|:||P|SrD) isinstancelistextend_flattenr)rris rrrsY C  a    JJx{{ # # # # JJqMMMM Jr)T)rrVrer functoolsrtypingrrrchrrr intrr7r:r?rAr]rhdictr{rboolrrrr+rrrs (((((((((( #b''CCCCCCCC8 3 YS Y Y Y Y Y Y  3 ( (3 (3 ( ( ( ( 3PcPPPPPP33333333*33333333.$$$$$$$$N     D   59++ S(3-  +-1+++++\$rPK{5ZRLib/site-packages/setuptools/_vendor/pyparsing/__pycache__/helpers.cpython-311.pycnuW+A b;d٘UddlZddlZddlZddlmZddlTddlmZm Z m Z  dXddd e e e fd e e e fd ed ejed ejedede fdZ dYddd e deje deje de fdZd e de fdZd e de fdZ dZdddde eje e fdededededede fdZd e d!e de fd"Z d[dd#d e d$ed%ede fd&Zd e de fd'Zd e de fd(Zd)d*defed+d,e e e fd-e e e fd.eje d/e d0e de f d1Zed2ed3fd4Zd5e e e fdee e ffd6Z d5e e e fdee e ffd7Z!e e"d8<e e"d9<e e#e$e%d:z&d;\Z'Z(d<ej)j*+DZ,e-d=d>.e,zd?z&d@Z/dAZ0GdBdCe1Z2e e e ee e e fe e e fffZ3e ee3ee2eje4fee3ee2ffZ5ed)ed*fdDe dEe6e5dFe e e fdGe e e fde f dHZ7dgfdIZ8e9e-dJdKz&dLZ: e-dM&dNZ; e-dO<&dPZ=e-dQ&dRZ> e9e-dJdKze>z&dSZ? e?Z@ e-dT&dUZA dVeBCDZDe6e e"dW<eZEeZFeZGeZHeZIeZJeZKeZLe ZMe!ZNe'e(cZOZPe/ZQe0ZRe2ZSe7ZTe:ZUe;ZVe=ZWe>ZXe?ZYe@ZZeAZ[dS)\N)__diag__)*)_bslash_flatten_escape_regex_range_chars,F)allow_trailing_delimexprdelimcombineminmaxr returnc t|trt|}dt |t ||r"dt |nd}|st|}||dkrtd|dz}||||krtd|dz}|||z||fz}|r|t|z }|r"t| |S| |S) a/Helper to define a delimited list of expressions - the delimiter defaults to ','. By default, the list elements and delimiters can have intervening whitespace, and comments, but this can be overridden by passing ``combine=True`` in the constructor. If ``combine`` is set to ``True``, the matching tokens are returned as a single token string, with the delimiters included; otherwise, the matching tokens are returned as a list of tokens, with the delimiters suppressed. If ``allow_trailing_delim`` is set to True, then the list may end with a delimiter. Example:: delimited_list(Word(alphas)).parse_string("aa,bb,cc") # -> ['aa', 'bb', 'cc'] delimited_list(Word(hexnums), delim=':', combine=True).parse_string("AA:BB:CC:DD:EE") # -> ['AA:BB:CC:DD:EE'] z{expr} [{delim} {expr}]...{end}z [{}])r r endNrzmin must be greater than 0z)max must be greater than, or equal to min) isinstancestr_type ParserElement_literalStringClassformatstrcopy streamlineSuppress ValueErrorOptCombineset_name)r r r rrr dlNamedelimited_list_exprs sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/pyparsing/helpers.pydelimited_listr$sY4$!!70066 . 5 5 '')) * *%jj*> FGNN3u:: & & &B6F    779:: : q  ?sczzHII I q%$,S!99*s5zz)4*++44V<<<"++F333)intExprint_exprr&cb|p|}tfd}|)ttd}n|}|d||d|zdtzdzS) a~Helper to define a counted list of expressions. This helper defines a pattern of the form:: integer expr expr expr... where the leading integer tells how many expr expressions follow. The matched tokens returns the array of expr tokens as a list - the leading count token is suppressed. If ``int_expr`` is specified, it should be a pyparsing expression that produces an integer value. Example:: counted_array(Word(alphas)).parse_string('2 ab cd ef') # -> ['ab', 'cd'] # in this parser, the leading integer value is given in binary, # '10' indicating that 2 values are in the array binary_constant = Word('01').set_parse_action(lambda t: int(t[0], 2)) counted_array(Word(alphas), int_expr=binary_constant).parse_string('10 ab cd ef') # -> ['ab', 'cd'] # if other fields must be parsed after the count but before the # list items, give the fields results names and they will # be preserved in the returned ParseResults: count_with_metadata = integer + Word(alphas)("type") typed_array = counted_array(Word(alphanums), int_expr=count_with_metadata)("items") result = typed_array.parse_string("3 bool True True False") print(result.dump()) # prints # ['True', 'True', 'False'] # - items: ['True', 'True', 'False'] # - type: 'bool' cR|d}|r|zn tz|dd=dSNr)Empty)sltn array_exprr s r#count_field_parse_actionz/counted_array..count_field_parse_actionss6 aDQ3qEGG3 aaaDDDr%Nc,t|dSr*)intr.s r#zcounted_array..{sAaD r%arrayLenT)call_during_tryz(len) z...)ForwardWordnumsset_parse_actionrr add_parse_actionr)r r'r&r1r0s` @r# counted_arrayr=GsR!GJt**--.A.ABB,,.. Z    5tLLL j * *8c$ii+?%+G H HHr%ctfd}||ddt|zS)a9Helper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example:: first = Word(nums) second = match_previous_literal(first) match_expr = first + ":" + second will match ``"1:1"``, but not ``"1:2"``. Because this matches a previous literal, will also match the leading ``"1:1"`` in ``"1:10"``. If this is not desired, use :class:`match_previous_expr`. Do *not* use with packrat parsing enabled. c|r_t|dkr |dzdSt|}td|DzdSt zdS)Nrrc34K|]}t|VdSN)Literal).0tts r# zImatch_previous_literal..copy_token_to_repeater..s(77272;;777777r%)lenras_listAndr+)r,r-r.tflatreps r#copy_token_to_repeaterz6match_previous_literal..copy_token_to_repeaters{  1vv{{qt !--s77777777777 577NNNNr%T callDuringTry(prev) )r8r<r r)r rKrJs @r#match_previous_literalrOse ))C      0EEELLSYY&''' Jr%ct|}|zfd}||ddt |zS)aWHelper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example:: first = Word(nums) second = match_previous_expr(first) match_expr = first + ":" + second will match ``"1:1"``, but not ``"1:2"``. Because this matches by expressions, will *not* match the leading ``"1:1"`` in ``"1:10"``; the expressions are evaluated first, and then compared, so ``"1"`` is compared with ``"10"``. Do *not* use with packrat parsing enabled. ct|fd}|ddS)Nct|}|kr%t||d|dS)NzExpected {}, found{})rrGParseExceptionr)r,r-r. theseTokens matchTokenss r#must_match_these_tokenszTmatch_previous_expr..copy_token_to_repeater..must_match_these_tokenssU"199;;//Kk))$q077 [QQ*)r%TrL)rrGr;)r,r-r.rVrUrJs @r#rKz3match_previous_expr..copy_token_to_repeatersTqyy{{++       4DIIIIIr%TrLrN)r8rr<r r)r e2rKrJs @r#match_previous_exprrXs ))C BBJC J J J J J 0EEELLSYY&''' Jr%T)useRegex asKeywordstrscaseless use_regex as_keywordrYrZc |p|}|o|}t|tr(tjrtdd|rd}d}|rt ntnd}d}|rtntg}t|tr| }n4t|trt|}ntd|stStd |Drd } | t!|d z kr|| } t#|| d zd D]I\} } || | r || | zd z=n3|| | r!|| | zd z=|| | nJ| d z } | t!|d z k|r#|r t&jnd } t+d |Dr3ddd|D}ndd|D}|rd|}t1|| d|}|r$d|D|fd|S#t&j$rtddYnwxYwt9fd|Dd|S)a Helper to quickly define a set of alternative :class:`Literal` s, and makes sure to do longest-first testing when there is a conflict, regardless of the input order, but returns a :class:`MatchFirst` for best performance. Parameters: - ``strs`` - a string of space-delimited literals, or a collection of string literals - ``caseless`` - treat all literals as caseless - (default= ``False``) - ``use_regex`` - as an optimization, will generate a :class:`Regex` object; otherwise, will generate a :class:`MatchFirst` object (if ``caseless=True`` or ``asKeyword=True``, or if creating a :class:`Regex` raises an exception) - (default= ``True``) - ``as_keyword`` - enforce :class:`Keyword`-style matching on the generated expressions - (default= ``False``) - ``asKeyword`` and ``useRegex`` are retained for pre-PEP8 compatibility, but will be removed in a future release Example:: comp_oper = one_of("< = > <= >= !=") var = Word(alphas) number = Word(nums) term = var | number comparison_expr = term + comp_oper + term print(comparison_expr.search_string("B = 12 AA=23 B<=AA AA>12")) prints:: [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']] z`More than one string argument passed to one_of, pass choices as a list or space-delimited string) stacklevelcV||kSrA)upperabs r#r5zone_of..sqwwyyAGGII5r%ct||SrA)rc startswithrds r#r5zone_of..s$QWWYY11!''))<<r%c||kSrArds r#r5zone_of..s qAvr%c,||SrA)rhrds r#r5zone_of..sQ\\!__r%z7Invalid argument to one_of, expected string or iterablec3<K|]}t|dkVdSrNrFrCsyms r#rEzone_of..s, + +C3s88a< + + + + + +r%rrNc3<K|]}t|dkVdSrmrnros r#rEzone_of..&s,44S3s88q=444444r%z[{}]rc34K|]}t|VdSrA)rros r#rEzone_of..)s+NNs5c::NNNNNNr%|c3>K|]}tj|VdSrA)reescaperos r#rEzone_of..,s*BB3 #BBBBBBr%z \b(?:{})\b)flagsz | c8i|]}||Srjlowerros r# zone_of..7s"BBB3ciikk3BBBr%cD|dSr*ry)r,r-r. symbol_maps r#r5zone_of..8sZ! 5Mr%z8Exception creating Regex for one_of, building MatchFirstc3.K|]}|VdSrArj)rCrpparseElementClasss r#rEzone_of..Bs/@@'',,@@@@@@r%)rrr%warn_on_multiple_string_args_to_oneofwarningswarnCaselessKeywordCaselessLiteralKeywordrBsplitIterablelist TypeErrorNoMatchanyrF enumerateinsertru IGNORECASEallrjoinRegexr r<error MatchFirst)r[r\r]r^rYrZisequalmaskssymbolsicurjotherre_flagspattretrr}s @@r#one_ofrsR'ZI%IH 8X&&  :    ;    >55<</8MOOo%%,,'0=GGgG$!!S**,, D( # #St**QRRR yy + +7 + + +++  #g,,"""!*C%ga!egg&677  575#&&A *EU3&&A *NN1e,,,E Q#g,,""")18 q 44G44444 C}}GGNNgNNNNNxxBB'BBBBB 2$++D11H---66uzz'7J7JKKC OCB'BBB $$%M%M%M%MNNNJx    MMJWX        @@@@@@@ @ @ I I 7  s3C J+KKkeyvaluecZttt||zS)aHelper to easily and clearly define a dictionary by specifying the respective patterns for the key and value. Takes care of defining the :class:`Dict`, :class:`ZeroOrMore`, and :class:`Group` tokens in the proper order. The key pattern can include delimiting markers or punctuation, as long as they are suppressed, thereby leaving the significant key text. The value pattern can include named results, so that the :class:`Dict` results can include named token fields. Example:: text = "shape: SQUARE posn: upper left color: light blue texture: burlap" attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) print(attr_expr[1, ...].parse_string(text).dump()) attr_label = label attr_value = Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join) # similar to Dict, but simpler call format result = dict_of(attr_label, attr_value).parse_string(text) print(result.dump()) print(result['shape']) print(result.shape) # object attribute access works too print(result.as_dict()) prints:: [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']] - color: 'light blue' - posn: 'upper left' - shape: 'SQUARE' - texture: 'burlap' SQUARE SQUARE {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'} )Dict OneOrMoreGroup)rrs r#dict_ofrGs'J  %e ,,-- . ..r%)asString as_stringrcN|o|}td}|}d|_|d|z|dz}|rd}nd}|||j|_|t j|S)aHelper to return the original, untokenized text for a given expression. Useful to restore the parsed fields of an HTML start tag into the raw tag text itself, or to revert separate tokens with intervening whitespace back to the original matching input text. By default, returns astring containing the original parsed text. If the optional ``as_string`` argument is passed as ``False``, then the return value is a :class:`ParseResults` containing any results names that were originally matched, and a single token containing the original matched text from the input string. So if the expression passed to :class:`original_text_for` contains expressions with defined results names, you must set ``as_string`` to ``False`` if you want to preserve those results name values. The ``asString`` pre-PEP8 argument is retained for compatibility, but will be removed in a future release. Example:: src = "this is test bold text normal text " for tag in ("b", "i"): opener, closer = make_html_tags(tag) patt = original_text_for(opener + SkipTo(closer) + closer) print(patt.search_string(src)[0]) prints:: [' bold text '] ['text'] c|SrArj)r,locr.s r#r5z#original_text_for..s3r%F_original_start _original_endc*||j|jSrA)rrr,r-r.s r#r5z#original_text_for..sa(9AO(K&Lr%cr||d|dg|dd<dS)Nrrpoprs r# extractTextz&original_text_for..extractTexts9aee-..1G1GGHIAaaaDDDr%)r+r;r callPreparse ignoreExprssuppress_warning Diagnostics)warn_ungrouped_named_tokens_in_collection)r rr locMarker endlocMarker matchExprrs r#original_text_forrosD%IH(()>)>??I>>##L %L +,,t3ll?6S6SSIJLL  J J J{+++ ,I {TUUU r%cHt|dS)zkHelper to undo pyparsing's default grouping of And expressions, even if all but one are non-empty. c|dSr*rjr4s r#r5zungroup..s 1Q4r%)TokenConverterr<)r s r#ungrouprs" $   0 0 @ @@r%ctd}t|d|dz|dzS)a (DEPRECATED - future code should use the Located class) Helper to decorate a returned token with its starting and ending locations in the input string. This helper adds the following results names: - ``locn_start`` - location where matched expression begins - ``locn_end`` - location where matched expression ends - ``value`` - the actual parsed results Be careful if the input text contains ```` characters, you may want to call :class:`ParserElement.parseWithTabs` Example:: wd = Word(alphas) for match in locatedExpr(wd).searchString("ljsdf123lksdjjf123lkkjj1222"): print(match) prints:: [[0, 'ljsdf', 5]] [[8, 'lksdjjf', 15]] [[18, 'lkkjj', 23]] c|SrArj)ssllrDs r#r5zlocatedExpr..s"r% locn_startrlocn_end)r+r;rrleaveWhitespace)r locators r# locatedExprrst6gg&&'<'<==G   $w--  *',,.. ( ( * *: 6 6 7  r%()) ignoreExpropenerclosercontent ignore_exprrc ||kr|tkr|n|}||krtd|t|trt|trt |dkrt |dkr|Ut t |t||ztj zdz d}n;t t||ztj z dz}n|pt t |t|zt|zttj dz d}n{t t t|t|zttj dz d}ntd t}|F|tt!|t#||z|zzt!|zz}nB|tt!|t#||zzt!|zz}|d ||d |S) a& Helper method for defining nested lists enclosed in opening and closing delimiters (``"("`` and ``")"`` are the default). Parameters: - ``opener`` - opening character for a nested list (default= ``"("``); can also be a pyparsing expression - ``closer`` - closing character for a nested list (default= ``")"``); can also be a pyparsing expression - ``content`` - expression for items within the nested lists (default= ``None``) - ``ignore_expr`` - expression for ignoring opening and closing delimiters (default= :class:`quoted_string`) - ``ignoreExpr`` - this pre-PEP8 argument is retained for compatibility but will be removed in a future release If an expression is not provided for the content argument, the nested expression will capture all whitespace-delimited content between delimiters as a list of separate values. Use the ``ignore_expr`` argument to define expressions that may contain opening or closing characters that should not be treated as opening or closing characters for nesting, such as quoted_string or a comment expression. Specify multiple expressions using an :class:`Or` or :class:`MatchFirst`. The default is :class:`quoted_string`, but if no expressions are to be ignored, then pass ``None`` for this argument. Example:: data_type = one_of("void int short long char float double") decl_data_type = Combine(data_type + Opt(Word('*'))) ident = Word(alphas+'_', alphanums+'_') number = pyparsing_common.number arg = Group(decl_data_type + ident) LPAR, RPAR = map(Suppress, "()") code_body = nested_expr('{', '}', ignore_expr=(quoted_string | c_style_comment)) c_function = (decl_data_type("type") + ident("name") + LPAR + Opt(delimited_list(arg), [])("args") + RPAR + code_body("body")) c_function.ignore(c_style_comment) source_code = ''' int is_odd(int x) { return (x%2); } int dec_to_hex(char hchar) { if (hchar >= '0' && hchar <= '9') { return (ord(hchar)-ord('0')); } else { return (10+ord(hchar)-ord('A')); } } ''' for func in c_function.search_string(source_code): print("%(name)s (%(type)s) args: %(args)s" % func) prints:: is_odd (int) args: [['int', 'x']] dec_to_hex (int) args: [['char', 'hchar']] z.opening and closing strings cannot be the sameNr)exactc6|dSr*stripr4s r#r5znested_expr..(1r%c6|dSr*rr4s r#r5znested_expr..,rr%c6|dSr*rr4s r#r5znested_expr..6rr%c6|dSr*rr4s r#r5znested_expr..>rr%zOopening and closing arguments must be strings if no content expression is givenznested z expression) quoted_stringrrrrFrr CharsNotInrDEFAULT_WHITE_CHARSr;emptyrrBr8rr ZeroOrMorer )rrrrrrs r# nested_exprrsT[  $.-//$A$A[[z  IJJJ fh ' '% Jvx,H,H% 6{{aCKK1$4$4)%!'K( &-2S S&''&'='=>>G$jjllZ-*KK..&&'='=>>?GG)%!'K&v./&v./))JRSTTTU'&'='=>>G&!$V__,&v./()JRSTTTU '&'='=>> Ga  ))C  V  z*s*:W*DEE EQWHXHX X    hv&&C'M)B)BBXfEUEUUVVVLLLVVVVV<=== Jr%<>c t|tr|t|| }n|jt t t dz}|rt t}||dzttt|tdz|zztddgd d z|z}nt  tt t"d z}||dzttt| d ttd|zzztddgd d z|z}t%t'd|zd zd}|dz|fd|ddddzdz}|_|_t7||_||fS)zRInternal helper to construct opening and closing tag expressions, given a tag name)r\z_-:tag=/F)defaultrc|ddkSNrrrjrs r#r5z_makeTags..^! r%r) exclude_charsc6|dSr*ryr4s r#r5z_makeTags..lsqtzz||r%c|ddkSrrjrs r#r5z_makeTags..rrr%zc |ddddz|S)Nstartr: ) __setitem__rreplacetitlerr)r.resnames r#r5z_makeTags..{sY!-- bgggooc377==??EEGGHH H!&&((  r%rrrrz)rrrnamer9alphas alphanumsdbl_quoted_stringrr; remove_quotesrrrrrr printablesrrBr r<rrrrrSkipTotag_body) tagStrxml suppress_LT suppress_GT tagAttrName tagAttrValueopenTagcloseTagrs @r# _makeTagsrNs&(##c'222+vy5011K  (--//@@OO fUmm :eK(3--$?,$NOOPPQQ R(c#w'''00AA++     %))++<<]KKd cO O O   fUmm #445K5KLLhsmml:;;< (c#w'''00AA++    wt}}v-3eDDDH Vg%&&&      x S117799??AABBBhw !! GKHLhhjj))G H r%tag_strc"t|dS)aPHelper to construct opening and closing tag expressions for HTML, given a tag name. Matches tags in either upper or lower case, attributes with namespaces and with quoted or unquoted values. Example:: text = 'More info at the pyparsing wiki page' # make_html_tags returns pyparsing expressions for the opening and # closing tags as a 2-tuple a, a_end = make_html_tags("A") link_expr = a + SkipTo(a_end)("link_text") + a_end for link in link_expr.search_string(text): # attributes in the tag (like "href" shown here) are # also accessible as named results print(link.link_text, '->', link.href) prints:: pyparsing -> https://github.com/pyparsing/pyparsing/wiki Frrs r#make_html_tagsr s0 We $ $$r%c"t|dS)zHelper to construct opening and closing tag expressions for XML, given a tag name. Matches tags only in the given upper/lower case. Example: similar to :class:`make_html_tags` Trr s r# make_xml_tagsr s Wd # ##r% any_open_tag any_close_tagz_:zany tagc@i|]\}}|d|S);)rstrip)rCkvs r#r{r{s(KKKtq!!((3--KKKr%z &(?Prsz);zcommon HTML entityc@t|jS)zRHelper parser action to replace common HTML entities with their special characters)_htmlEntityMapgetentityr4s r#replace_html_entityrs   ah ' ''r%ceZdZdZdZdS)OpAssocrr`N)__name__ __module__ __qualname__LEFTRIGHTrjr%r#rrs D EEEr%r base_exprop_listlparrparc ZGddt}d|_t}t|trt |}t|trt |}t|t rt|t s|t ||z|zz}n |||z|zz}t|D]V\}}|dzdd\} } } } t| trt | } | dkrZt| ttfrt| dkrtd | \} }d | |}nd | }d | cxkrdksntd | t jt jfvrtdt|}| t jur| d kr)||| zt || dzz}n| dkrW| /||| z|zt || |zdzz}nc|||zt |dz}n=| dkr@||| z|z|z|zt |t)| |z|z|zzz}n| t jur| d krKt| t*st+| } || j|zt | |zz}n| dkrX| .||| z|zt || |zdzz}na|||zt ||dzz}n9| dkr3||| z|z|z|zt || z|z|z|zz}| r._FBTc@|j|||gfSrA)r try_parse)selfinstringr doActionss r# parseImplz%infix_notation.._FB.parseImpl(s# I  # . . .7Nr%NT)rrrr,rjr%r#_FBr&'s(      r%r.z FollowedBy>rANr`z@if numterms=3, opExpr must be a tuple or list of two expressionsz {}{} termz{} termrz6operator must be unary (1), binary (2), or ternary (3)z2operator must indicate right or left associativity)r.)r`.) FollowedByrr8rrrrrrrrtuplerrFrrrrrr rrr r;setName)r r!r"r#r.rlastExprroperDefopExprarityrightLeftAssocpaopExpr1opExpr2 term_namethisExprrs r#infix_notationr>sbj !CL ))C$~~$~~ tX & &3:dH+E+E3uTCZ$%6777s T 12((<< 7-4w->,C)~r fh ' ' ?"66v>>F A::fudm44 F q8H8H V & GW#**7G< > >QRR R#II..y99 W\ ) )zzC6 122U8fVn;T5U5UU !% #Hv$5$@ A AE FX$5v#>>EE!II!$Hx$7 8 85&AQ;R;R RII!Cw&1G;hF(Yw/AG/Kh/V%W%WWXXY w} , ,zz!&#..) [[FC h 677%@Q:R:RR !% #Hv$5$@ A AE FX$5v#>>EE!II!$Hx$7 8 85 8F#33<<!II!Cw&1G;hF(W,x7'AHLMMN   /"udm,, /* *B///**2...i(*33I>>>HC Jr%c  ddfd fd}fd}fd}ttd}t t |zd}t |d} t |d } |rStt||zt| t|zt|zz| z} n\tt|t| t|zt|zzt| z} | fd | fd | ttz| d S) a (DEPRECATED - use IndentedBlock class instead) Helper method for defining space-delimited indentation blocks, such as those used to define block statements in Python source code. Parameters: - ``blockStatementExpr`` - expression defining syntax of statement that is repeated within the indented block - ``indentStack`` - list created by caller to manage indentation stack (multiple ``statementWithIndentedBlock`` expressions within a single grammar should share a common ``indentStack``) - ``indent`` - boolean indicating whether block must be indented beyond the current level; set to ``False`` for block of left-most statements (default= ``True``) A valid block must contain at least one ``blockStatement``. (Note that indentedBlock uses internal parse actions which make it incompatible with packrat parsing.) Example:: data = ''' def A(z): A1 B = 100 G = A2 A2 A3 B def BB(a,b,c): BB1 def BBA(): bba1 bba2 bba3 C D def spam(x,y): def eggs(z): pass ''' indentStack = [1] stmt = Forward() identifier = Word(alphas, alphanums) funcDecl = ("def" + identifier + Group("(" + Opt(delimitedList(identifier)) + ")") + ":") func_body = indentedBlock(stmt, indentStack) funcDef = Group(funcDecl + func_body) rvalue = Forward() funcCall = Group(identifier + "(" + Opt(delimitedList(rvalue)) + ")") rvalue << (funcCall | identifier | Word(nums)) assignment = Group(identifier + "=" + rvalue) stmt << (funcDef | assignment | identifier) module_body = stmt[1, ...] parseTree = module_body.parseString(data) parseTree.pprint() prints:: [['def', 'A', ['(', 'z', ')'], ':', [['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]], 'B', ['def', 'BB', ['(', 'a', 'b', 'c', ')'], ':', [['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]], 'C', 'D', ['def', 'spam', ['(', 'x', 'y', ')'], ':', [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]] Nc"ddd<dSNrj) backup_stacks indentStacksr# reset_stackz"indentedBlock..reset_stacks&r* AAAr%c|t|krdSt||}|dkr.|dkrt||dt||ddS)NrBzillegal nestingznot a peer entry)rFcolrSr,r-r.curColrDs r#checkPeerIndentz&indentedBlock..checkPeerIndentsp A;; FQ [_ $ $ B''$Q+<=== A'9:: : % $r%ct||}|dkr|dSt||d)NrBznot a subentry)rGappendrSrHs r#checkSubIndentz%indentedBlock..checkSubIndentsLQ KO # #   v & & & & & A'788 8r%c|t|krdSt||}r|vst||d|dkrdSdS)Nznot an unindentrB)rFrGrSrrHs r# checkUnindentz$indentedBlock..checkUnindentsv A;; FQ :+ 5 5 A'899 9 KO # # OO      $ #r%z INDENTrUNINDENTc:rdodndSrAr)rCsr#r5zindentedBlock..s"-I !!"%%.$Tr%cSrArj)rerfcdrEs r#r5zindentedBlock..s kkmmr%zindented block)rLrLineEndset_whitespace_charssuppressr+r;r rrr<set_fail_actionignorer) blockStatementExprrDindentrCrJrMrONLrPPEERUNDENTsmExprrEs ` ` @r# indentedBlockra{sXlQQQ(((++++++;;;;;99999 79911%88AACC D DBgg00@@@ J J8 T TF 77 # #O 4 4 = =b A AD WW % %m 4 4 = =j I IF   GG u%78883r77BCC D    GGu%78883r77BCC D&kk    IIII ;;;;<<<g 1222 ??+ , ,,r%z/\*(?:[^*]|\*(?!/))*z*/zC style commentzz HTML commentz.*z rest of linez//(?:\\\n|[^\n])*z // commentzC++ style commentz#.*zPython style commentc<g|]}t|t|Srj)rr)rCrs r# rc%s7''' *Q ">">''''r%_builtin_exprs)r FNNrA)FTFr-)\ html.entitieshtmlrutypingrrcoreutilrrrUnionrrboolOptionalr3r$r=rOrXrrrrrrrrrrTupler r __annotations__r9rrr r rentitieshtml5itemsrrrcommon_html_entityrEnumrInfixNotationOperatorArgType ParseActionInfixNotationOperatorSpecListr>rarc_style_comment html_commentleave_whitespace rest_of_linedbl_slash_commentcpp_style_commentjava_style_commentpython_style_commentvarsvaluesrd delimitedList countedArraymatchPreviousLiteralmatchPreviousExproneOfdictOforiginalTextFor nestedExpr makeHTMLTags makeXMLTags anyOpenTag anyCloseTagcommonHTMLEntityreplaceHTMLEntityopAssoc infixNotation cStyleComment htmlComment restOfLinedblSlashCommentcppStyleCommentjavaStyleCommentpythonStyleCommentrjr%r#rs& >>>>>>>>>>(+ $ $ 64"'646464 ]" #64 m# $6464   64   646464646464v049I/3 9I9I9I 9Iom,9I_] + 9I  9I9I9I9Ix=B!m! !!!!L | ||| $c) *||| |  ||||||~%/%/}%/%/%/%/%/R,02EI222 2$(2>B22222jA-AMAAAA m     H),(+.2!. } !.  }}} #}$ %} #}$ %}_] +} }  }}}}}@(0x}}((3--7777t% 3 % &% =- '(%%%%6$ 3 % &$ =- '($$$$,nDT!""++I66 mLKt}/B/H/H/J/JKKKU>CHH^,D,DDtKLLUU ((( d %3eM3$67}c?Q9RRSS " $  $ &  $    $'/hsmm&.hsmm bbb + ,b ]" #b ]" # b  bbbbJ;?bL-L-L-L-`'%% 7884?@@II$u'((11.AA &uU||,,..77GG E.//88FF1G E !""T),== ( P&$uV}}--.DEE0 ''tvv}}''']#   -' #    &  K%'     ##%)r%PK{5Z6 t?#?#<Lib/site-packages/setuptools/_vendor/pyparsing/exceptions.pynuW+A# exceptions.py import re import sys import typing from .util import col, line, lineno, _collapse_string_to_ranges from .unicode import pyparsing_unicode as ppu class ExceptionWordUnicode(ppu.Latin1, ppu.LatinA, ppu.LatinB, ppu.Greek, ppu.Cyrillic): pass _extract_alphanums = _collapse_string_to_ranges(ExceptionWordUnicode.alphanums) _exception_word_extractor = re.compile("([" + _extract_alphanums + "]{1,16})|.") class ParseBaseException(Exception): """base exception class for all parsing runtime exceptions""" # Performance tuning: we construct a *lot* of these, so keep this # constructor as small and fast as possible def __init__( self, pstr: str, loc: int = 0, msg: typing.Optional[str] = None, elem=None, ): self.loc = loc if msg is None: self.msg = pstr self.pstr = "" else: self.msg = msg self.pstr = pstr self.parser_element = self.parserElement = elem self.args = (pstr, loc, msg) @staticmethod def explain_exception(exc, depth=16): """ Method to take an exception and translate the Python internal traceback into a list of the pyparsing expressions that caused the exception to be raised. Parameters: - exc - exception raised during parsing (need not be a ParseException, in support of Python exceptions that might be raised in a parse action) - depth (default=16) - number of levels back in the stack trace to list expression and function names; if None, the full stack trace names will be listed; if 0, only the failing input line, marker, and exception string will be shown Returns a multi-line string listing the ParserElements and/or function names in the exception's stack trace. """ import inspect from .core import ParserElement if depth is None: depth = sys.getrecursionlimit() ret = [] if isinstance(exc, ParseBaseException): ret.append(exc.line) ret.append(" " * (exc.column - 1) + "^") ret.append("{}: {}".format(type(exc).__name__, exc)) if depth > 0: callers = inspect.getinnerframes(exc.__traceback__, context=depth) seen = set() for i, ff in enumerate(callers[-depth:]): frm = ff[0] f_self = frm.f_locals.get("self", None) if isinstance(f_self, ParserElement): if frm.f_code.co_name not in ("parseImpl", "_parseNoCache"): continue if id(f_self) in seen: continue seen.add(id(f_self)) self_type = type(f_self) ret.append( "{}.{} - {}".format( self_type.__module__, self_type.__name__, f_self ) ) elif f_self is not None: self_type = type(f_self) ret.append("{}.{}".format(self_type.__module__, self_type.__name__)) else: code = frm.f_code if code.co_name in ("wrapper", ""): continue ret.append("{}".format(code.co_name)) depth -= 1 if not depth: break return "\n".join(ret) @classmethod def _from_exception(cls, pe): """ internal factory method to simplify creating one type of ParseException from another - avoids having __init__ signature conflicts among subclasses """ return cls(pe.pstr, pe.loc, pe.msg, pe.parserElement) @property def line(self) -> str: """ Return the line of text where the exception occurred. """ return line(self.loc, self.pstr) @property def lineno(self) -> int: """ Return the 1-based line number of text where the exception occurred. """ return lineno(self.loc, self.pstr) @property def col(self) -> int: """ Return the 1-based column on the line of text where the exception occurred. """ return col(self.loc, self.pstr) @property def column(self) -> int: """ Return the 1-based column on the line of text where the exception occurred. """ return col(self.loc, self.pstr) def __str__(self) -> str: if self.pstr: if self.loc >= len(self.pstr): foundstr = ", found end of text" else: # pull out next word at error location found_match = _exception_word_extractor.match(self.pstr, self.loc) if found_match is not None: found = found_match.group(0) else: found = self.pstr[self.loc : self.loc + 1] foundstr = (", found %r" % found).replace(r"\\", "\\") else: foundstr = "" return "{}{} (at char {}), (line:{}, col:{})".format( self.msg, foundstr, self.loc, self.lineno, self.column ) def __repr__(self): return str(self) def mark_input_line(self, marker_string: str = None, *, markerString=">!<") -> str: """ Extracts the exception line from the input string, and marks the location of the exception with a special symbol. """ markerString = marker_string if marker_string is not None else markerString line_str = self.line line_column = self.column - 1 if markerString: line_str = "".join( (line_str[:line_column], markerString, line_str[line_column:]) ) return line_str.strip() def explain(self, depth=16) -> str: """ Method to translate the Python internal traceback into a list of the pyparsing expressions that caused the exception to be raised. Parameters: - depth (default=16) - number of levels back in the stack trace to list expression and function names; if None, the full stack trace names will be listed; if 0, only the failing input line, marker, and exception string will be shown Returns a multi-line string listing the ParserElements and/or function names in the exception's stack trace. Example:: expr = pp.Word(pp.nums) * 3 try: expr.parse_string("123 456 A789") except pp.ParseException as pe: print(pe.explain(depth=0)) prints:: 123 456 A789 ^ ParseException: Expected W:(0-9), found 'A' (at char 8), (line:1, col:9) Note: the diagnostic output will include string representations of the expressions that failed to parse. These representations will be more helpful if you use `set_name` to give identifiable names to your expressions. Otherwise they will use the default string forms, which may be cryptic to read. Note: pyparsing's default truncation of exception tracebacks may also truncate the stack of expressions that are displayed in the ``explain`` output. To get the full listing of parser expressions, you may have to set ``ParserElement.verbose_stacktrace = True`` """ return self.explain_exception(self, depth) markInputline = mark_input_line class ParseException(ParseBaseException): """ Exception thrown when a parse expression doesn't match the input string Example:: try: Word(nums).set_name("integer").parse_string("ABC") except ParseException as pe: print(pe) print("column: {}".format(pe.column)) prints:: Expected integer (at char 0), (line:1, col:1) column: 1 """ class ParseFatalException(ParseBaseException): """ User-throwable exception thrown when inconsistent parse content is found; stops all parsing immediately """ class ParseSyntaxException(ParseFatalException): """ Just like :class:`ParseFatalException`, but thrown internally when an :class:`ErrorStop` ('-' operator) indicates that parsing is to stop immediately because an unbacktrackable syntax error has been found. """ class RecursiveGrammarException(Exception): """ Exception thrown by :class:`ParserElement.validate` if the grammar could be left-recursive; parser may need to enable left recursion using :class:`ParserElement.enable_left_recursion` """ def __init__(self, parseElementList): self.parseElementTrace = parseElementList def __str__(self) -> str: return "RecursiveGrammarException: {}".format(self.parseElementTrace) PK{5ZJ##:Lib/site-packages/setuptools/_vendor/pyparsing/__init__.pynuW+A# module pyparsing.py # # Copyright (c) 2003-2022 Paul T. McGuire # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # __doc__ = """ pyparsing module - Classes and methods to define and execute parsing grammars ============================================================================= The pyparsing module is an alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions. With pyparsing, you don't need to learn a new syntax for defining grammars or matching expressions - the parsing module provides a library of classes that you use to construct the grammar directly in Python. Here is a program to parse "Hello, World!" (or any greeting of the form ``", !"``), built up using :class:`Word`, :class:`Literal`, and :class:`And` elements (the :meth:`'+'` operators create :class:`And` expressions, and the strings are auto-converted to :class:`Literal` expressions):: from pyparsing import Word, alphas # define grammar of a greeting greet = Word(alphas) + "," + Word(alphas) + "!" hello = "Hello, World!" print(hello, "->", greet.parse_string(hello)) The program outputs the following:: Hello, World! -> ['Hello', ',', 'World', '!'] The Python representation of the grammar is quite readable, owing to the self-explanatory class names, and the use of :class:`'+'`, :class:`'|'`, :class:`'^'` and :class:`'&'` operators. The :class:`ParseResults` object returned from :class:`ParserElement.parseString` can be accessed as a nested list, a dictionary, or an object with named attributes. The pyparsing module handles some of the problems that are typically vexing when writing text parsers: - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello , World !", etc.) - quoted strings - embedded comments Getting Started - ----------------- Visit the classes :class:`ParserElement` and :class:`ParseResults` to see the base classes that most other pyparsing classes inherit from. Use the docstrings for examples of how to: - construct literal match expressions from :class:`Literal` and :class:`CaselessLiteral` classes - construct character word-group expressions using the :class:`Word` class - see how to create repetitive expressions using :class:`ZeroOrMore` and :class:`OneOrMore` classes - use :class:`'+'`, :class:`'|'`, :class:`'^'`, and :class:`'&'` operators to combine simple expressions into more complex ones - associate names with your parsed results using :class:`ParserElement.setResultsName` - access the parsed data, which is returned as a :class:`ParseResults` object - find some helpful expression short-cuts like :class:`delimitedList` and :class:`oneOf` - find more useful common expressions in the :class:`pyparsing_common` namespace class """ from typing import NamedTuple class version_info(NamedTuple): major: int minor: int micro: int releaselevel: str serial: int @property def __version__(self): return ( "{}.{}.{}".format(self.major, self.minor, self.micro) + ( "{}{}{}".format( "r" if self.releaselevel[0] == "c" else "", self.releaselevel[0], self.serial, ), "", )[self.releaselevel == "final"] ) def __str__(self): return "{} {} / {}".format(__name__, self.__version__, __version_time__) def __repr__(self): return "{}.{}({})".format( __name__, type(self).__name__, ", ".join("{}={!r}".format(*nv) for nv in zip(self._fields, self)), ) __version_info__ = version_info(3, 0, 9, "final", 0) __version_time__ = "05 May 2022 07:02 UTC" __version__ = __version_info__.__version__ __versionTime__ = __version_time__ __author__ = "Paul McGuire " from .util import * from .exceptions import * from .actions import * from .core import __diag__, __compat__ from .results import * from .core import * from .core import _builtin_exprs as core_builtin_exprs from .helpers import * from .helpers import _builtin_exprs as helper_builtin_exprs from .unicode import unicode_set, UnicodeRangeList, pyparsing_unicode as unicode from .testing import pyparsing_test as testing from .common import ( pyparsing_common as common, _builtin_exprs as common_builtin_exprs, ) # define backward compat synonyms if "pyparsing_unicode" not in globals(): pyparsing_unicode = unicode if "pyparsing_common" not in globals(): pyparsing_common = common if "pyparsing_test" not in globals(): pyparsing_test = testing core_builtin_exprs += common_builtin_exprs + helper_builtin_exprs __all__ = [ "__version__", "__version_time__", "__author__", "__compat__", "__diag__", "And", "AtLineStart", "AtStringStart", "CaselessKeyword", "CaselessLiteral", "CharsNotIn", "Combine", "Dict", "Each", "Empty", "FollowedBy", "Forward", "GoToColumn", "Group", "IndentedBlock", "Keyword", "LineEnd", "LineStart", "Literal", "Located", "PrecededBy", "MatchFirst", "NoMatch", "NotAny", "OneOrMore", "OnlyOnce", "OpAssoc", "Opt", "Optional", "Or", "ParseBaseException", "ParseElementEnhance", "ParseException", "ParseExpression", "ParseFatalException", "ParseResults", "ParseSyntaxException", "ParserElement", "PositionToken", "QuotedString", "RecursiveGrammarException", "Regex", "SkipTo", "StringEnd", "StringStart", "Suppress", "Token", "TokenConverter", "White", "Word", "WordEnd", "WordStart", "ZeroOrMore", "Char", "alphanums", "alphas", "alphas8bit", "any_close_tag", "any_open_tag", "c_style_comment", "col", "common_html_entity", "counted_array", "cpp_style_comment", "dbl_quoted_string", "dbl_slash_comment", "delimited_list", "dict_of", "empty", "hexnums", "html_comment", "identchars", "identbodychars", "java_style_comment", "line", "line_end", "line_start", "lineno", "make_html_tags", "make_xml_tags", "match_only_at_col", "match_previous_expr", "match_previous_literal", "nested_expr", "null_debug_action", "nums", "one_of", "printables", "punc8bit", "python_style_comment", "quoted_string", "remove_quotes", "replace_with", "replace_html_entity", "rest_of_line", "sgl_quoted_string", "srange", "string_end", "string_start", "trace_parse_action", "unicode_string", "with_attribute", "indentedBlock", "original_text_for", "ungroup", "infix_notation", "locatedExpr", "with_class", "CloseMatch", "token_map", "pyparsing_common", "pyparsing_unicode", "unicode_set", "condition_as_parse_action", "pyparsing_test", # pre-PEP8 compatibility names "__versionTime__", "anyCloseTag", "anyOpenTag", "cStyleComment", "commonHTMLEntity", "countedArray", "cppStyleComment", "dblQuotedString", "dblSlashComment", "delimitedList", "dictOf", "htmlComment", "javaStyleComment", "lineEnd", "lineStart", "makeHTMLTags", "makeXMLTags", "matchOnlyAtCol", "matchPreviousExpr", "matchPreviousLiteral", "nestedExpr", "nullDebugAction", "oneOf", "opAssoc", "pythonStyleComment", "quotedString", "removeQuotes", "replaceHTMLEntity", "replaceWith", "restOfLine", "sglQuotedString", "stringEnd", "stringStart", "traceParseAction", "unicodeString", "withAttribute", "indentedBlock", "originalTextFor", "infixNotation", "locatedExpr", "withClass", "tokenMap", "conditionAsParseAction", "autoname_elements", ] PK{5Zzx#*#*9Lib/site-packages/setuptools/_vendor/pyparsing/unicode.pynuW+A# unicode.py import sys from itertools import filterfalse from typing import List, Tuple, Union class _lazyclassproperty: def __init__(self, fn): self.fn = fn self.__doc__ = fn.__doc__ self.__name__ = fn.__name__ def __get__(self, obj, cls): if cls is None: cls = type(obj) if not hasattr(cls, "_intern") or any( cls._intern is getattr(superclass, "_intern", []) for superclass in cls.__mro__[1:] ): cls._intern = {} attrname = self.fn.__name__ if attrname not in cls._intern: cls._intern[attrname] = self.fn(cls) return cls._intern[attrname] UnicodeRangeList = List[Union[Tuple[int, int], Tuple[int]]] class unicode_set: """ A set of Unicode characters, for language-specific strings for ``alphas``, ``nums``, ``alphanums``, and ``printables``. A unicode_set is defined by a list of ranges in the Unicode character set, in a class attribute ``_ranges``. Ranges can be specified using 2-tuples or a 1-tuple, such as:: _ranges = [ (0x0020, 0x007e), (0x00a0, 0x00ff), (0x0100,), ] Ranges are left- and right-inclusive. A 1-tuple of (x,) is treated as (x, x). A unicode set can also be defined using multiple inheritance of other unicode sets:: class CJK(Chinese, Japanese, Korean): pass """ _ranges: UnicodeRangeList = [] @_lazyclassproperty def _chars_for_ranges(cls): ret = [] for cc in cls.__mro__: if cc is unicode_set: break for rr in getattr(cc, "_ranges", ()): ret.extend(range(rr[0], rr[-1] + 1)) return [chr(c) for c in sorted(set(ret))] @_lazyclassproperty def printables(cls): "all non-whitespace characters in this range" return "".join(filterfalse(str.isspace, cls._chars_for_ranges)) @_lazyclassproperty def alphas(cls): "all alphabetic characters in this range" return "".join(filter(str.isalpha, cls._chars_for_ranges)) @_lazyclassproperty def nums(cls): "all numeric digit characters in this range" return "".join(filter(str.isdigit, cls._chars_for_ranges)) @_lazyclassproperty def alphanums(cls): "all alphanumeric characters in this range" return cls.alphas + cls.nums @_lazyclassproperty def identchars(cls): "all characters in this range that are valid identifier characters, plus underscore '_'" return "".join( sorted( set( "".join(filter(str.isidentifier, cls._chars_for_ranges)) + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzªµº" + "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ" + "_" ) ) ) @_lazyclassproperty def identbodychars(cls): """ all characters in this range that are valid identifier body characters, plus the digits 0-9 """ return "".join( sorted( set( cls.identchars + "0123456789" + "".join( [c for c in cls._chars_for_ranges if ("_" + c).isidentifier()] ) ) ) ) class pyparsing_unicode(unicode_set): """ A namespace class for defining common language unicode_sets. """ # fmt: off # define ranges in language character sets _ranges: UnicodeRangeList = [ (0x0020, sys.maxunicode), ] class BasicMultilingualPlane(unicode_set): "Unicode set for the Basic Multilingual Plane" _ranges: UnicodeRangeList = [ (0x0020, 0xFFFF), ] class Latin1(unicode_set): "Unicode set for Latin-1 Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0020, 0x007E), (0x00A0, 0x00FF), ] class LatinA(unicode_set): "Unicode set for Latin-A Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0100, 0x017F), ] class LatinB(unicode_set): "Unicode set for Latin-B Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0180, 0x024F), ] class Greek(unicode_set): "Unicode set for Greek Unicode Character Ranges" _ranges: UnicodeRangeList = [ (0x0342, 0x0345), (0x0370, 0x0377), (0x037A, 0x037F), (0x0384, 0x038A), (0x038C,), (0x038E, 0x03A1), (0x03A3, 0x03E1), (0x03F0, 0x03FF), (0x1D26, 0x1D2A), (0x1D5E,), (0x1D60,), (0x1D66, 0x1D6A), (0x1F00, 0x1F15), (0x1F18, 0x1F1D), (0x1F20, 0x1F45), (0x1F48, 0x1F4D), (0x1F50, 0x1F57), (0x1F59,), (0x1F5B,), (0x1F5D,), (0x1F5F, 0x1F7D), (0x1F80, 0x1FB4), (0x1FB6, 0x1FC4), (0x1FC6, 0x1FD3), (0x1FD6, 0x1FDB), (0x1FDD, 0x1FEF), (0x1FF2, 0x1FF4), (0x1FF6, 0x1FFE), (0x2129,), (0x2719, 0x271A), (0xAB65,), (0x10140, 0x1018D), (0x101A0,), (0x1D200, 0x1D245), (0x1F7A1, 0x1F7A7), ] class Cyrillic(unicode_set): "Unicode set for Cyrillic Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0400, 0x052F), (0x1C80, 0x1C88), (0x1D2B,), (0x1D78,), (0x2DE0, 0x2DFF), (0xA640, 0xA672), (0xA674, 0xA69F), (0xFE2E, 0xFE2F), ] class Chinese(unicode_set): "Unicode set for Chinese Unicode Character Range" _ranges: UnicodeRangeList = [ (0x2E80, 0x2E99), (0x2E9B, 0x2EF3), (0x31C0, 0x31E3), (0x3400, 0x4DB5), (0x4E00, 0x9FEF), (0xA700, 0xA707), (0xF900, 0xFA6D), (0xFA70, 0xFAD9), (0x16FE2, 0x16FE3), (0x1F210, 0x1F212), (0x1F214, 0x1F23B), (0x1F240, 0x1F248), (0x20000, 0x2A6D6), (0x2A700, 0x2B734), (0x2B740, 0x2B81D), (0x2B820, 0x2CEA1), (0x2CEB0, 0x2EBE0), (0x2F800, 0x2FA1D), ] class Japanese(unicode_set): "Unicode set for Japanese Unicode Character Range, combining Kanji, Hiragana, and Katakana ranges" _ranges: UnicodeRangeList = [] class Kanji(unicode_set): "Unicode set for Kanji Unicode Character Range" _ranges: UnicodeRangeList = [ (0x4E00, 0x9FBF), (0x3000, 0x303F), ] class Hiragana(unicode_set): "Unicode set for Hiragana Unicode Character Range" _ranges: UnicodeRangeList = [ (0x3041, 0x3096), (0x3099, 0x30A0), (0x30FC,), (0xFF70,), (0x1B001,), (0x1B150, 0x1B152), (0x1F200,), ] class Katakana(unicode_set): "Unicode set for Katakana Unicode Character Range" _ranges: UnicodeRangeList = [ (0x3099, 0x309C), (0x30A0, 0x30FF), (0x31F0, 0x31FF), (0x32D0, 0x32FE), (0xFF65, 0xFF9F), (0x1B000,), (0x1B164, 0x1B167), (0x1F201, 0x1F202), (0x1F213,), ] class Hangul(unicode_set): "Unicode set for Hangul (Korean) Unicode Character Range" _ranges: UnicodeRangeList = [ (0x1100, 0x11FF), (0x302E, 0x302F), (0x3131, 0x318E), (0x3200, 0x321C), (0x3260, 0x327B), (0x327E,), (0xA960, 0xA97C), (0xAC00, 0xD7A3), (0xD7B0, 0xD7C6), (0xD7CB, 0xD7FB), (0xFFA0, 0xFFBE), (0xFFC2, 0xFFC7), (0xFFCA, 0xFFCF), (0xFFD2, 0xFFD7), (0xFFDA, 0xFFDC), ] Korean = Hangul class CJK(Chinese, Japanese, Hangul): "Unicode set for combined Chinese, Japanese, and Korean (CJK) Unicode Character Range" class Thai(unicode_set): "Unicode set for Thai Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0E01, 0x0E3A), (0x0E3F, 0x0E5B) ] class Arabic(unicode_set): "Unicode set for Arabic Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0600, 0x061B), (0x061E, 0x06FF), (0x0700, 0x077F), ] class Hebrew(unicode_set): "Unicode set for Hebrew Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0591, 0x05C7), (0x05D0, 0x05EA), (0x05EF, 0x05F4), (0xFB1D, 0xFB36), (0xFB38, 0xFB3C), (0xFB3E,), (0xFB40, 0xFB41), (0xFB43, 0xFB44), (0xFB46, 0xFB4F), ] class Devanagari(unicode_set): "Unicode set for Devanagari Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0900, 0x097F), (0xA8E0, 0xA8FF) ] # fmt: on pyparsing_unicode.Japanese._ranges = ( pyparsing_unicode.Japanese.Kanji._ranges + pyparsing_unicode.Japanese.Hiragana._ranges + pyparsing_unicode.Japanese.Katakana._ranges ) pyparsing_unicode.BMP = pyparsing_unicode.BasicMultilingualPlane # add language identifiers using language Unicode pyparsing_unicode.العربية = pyparsing_unicode.Arabic pyparsing_unicode.中文 = pyparsing_unicode.Chinese pyparsing_unicode.кириллица = pyparsing_unicode.Cyrillic pyparsing_unicode.Ελληνικά = pyparsing_unicode.Greek pyparsing_unicode.עִברִית = pyparsing_unicode.Hebrew pyparsing_unicode.日本語 = pyparsing_unicode.Japanese pyparsing_unicode.Japanese.漢字 = pyparsing_unicode.Japanese.Kanji pyparsing_unicode.Japanese.カタカナ = pyparsing_unicode.Japanese.Katakana pyparsing_unicode.Japanese.ひらがな = pyparsing_unicode.Japanese.Hiragana pyparsing_unicode.한국어 = pyparsing_unicode.Korean pyparsing_unicode.ไทย = pyparsing_unicode.Thai pyparsing_unicode.देवनागरी = pyparsing_unicode.Devanagari PK{5Z-Gl6Lib/site-packages/setuptools/_vendor/pyparsing/util.pynuW+A# util.py import warnings import types import collections import itertools from functools import lru_cache from typing import List, Union, Iterable _bslash = chr(92) class __config_flags: """Internal class for defining compatibility and debugging flags""" _all_names: List[str] = [] _fixed_names: List[str] = [] _type_desc = "configuration" @classmethod def _set(cls, dname, value): if dname in cls._fixed_names: warnings.warn( "{}.{} {} is {} and cannot be overridden".format( cls.__name__, dname, cls._type_desc, str(getattr(cls, dname)).upper(), ) ) return if dname in cls._all_names: setattr(cls, dname, value) else: raise ValueError("no such {} {!r}".format(cls._type_desc, dname)) enable = classmethod(lambda cls, name: cls._set(name, True)) disable = classmethod(lambda cls, name: cls._set(name, False)) @lru_cache(maxsize=128) def col(loc: int, strg: str) -> int: """ Returns current column within a string, counting newlines as line separators. The first column is number 1. Note: the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`ParserElement.parseString` for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. """ s = strg return 1 if 0 < loc < len(s) and s[loc - 1] == "\n" else loc - s.rfind("\n", 0, loc) @lru_cache(maxsize=128) def lineno(loc: int, strg: str) -> int: """Returns current line number within a string, counting newlines as line separators. The first line is number 1. Note - the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`ParserElement.parseString` for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. """ return strg.count("\n", 0, loc) + 1 @lru_cache(maxsize=128) def line(loc: int, strg: str) -> str: """ Returns the line of text containing loc within a string, counting newlines as line separators. """ last_cr = strg.rfind("\n", 0, loc) next_cr = strg.find("\n", loc) return strg[last_cr + 1 : next_cr] if next_cr >= 0 else strg[last_cr + 1 :] class _UnboundedCache: def __init__(self): cache = {} cache_get = cache.get self.not_in_cache = not_in_cache = object() def get(_, key): return cache_get(key, not_in_cache) def set_(_, key, value): cache[key] = value def clear(_): cache.clear() self.size = None self.get = types.MethodType(get, self) self.set = types.MethodType(set_, self) self.clear = types.MethodType(clear, self) class _FifoCache: def __init__(self, size): self.not_in_cache = not_in_cache = object() cache = collections.OrderedDict() cache_get = cache.get def get(_, key): return cache_get(key, not_in_cache) def set_(_, key, value): cache[key] = value while len(cache) > size: cache.popitem(last=False) def clear(_): cache.clear() self.size = size self.get = types.MethodType(get, self) self.set = types.MethodType(set_, self) self.clear = types.MethodType(clear, self) class LRUMemo: """ A memoizing mapping that retains `capacity` deleted items The memo tracks retained items by their access order; once `capacity` items are retained, the least recently used item is discarded. """ def __init__(self, capacity): self._capacity = capacity self._active = {} self._memory = collections.OrderedDict() def __getitem__(self, key): try: return self._active[key] except KeyError: self._memory.move_to_end(key) return self._memory[key] def __setitem__(self, key, value): self._memory.pop(key, None) self._active[key] = value def __delitem__(self, key): try: value = self._active.pop(key) except KeyError: pass else: while len(self._memory) >= self._capacity: self._memory.popitem(last=False) self._memory[key] = value def clear(self): self._active.clear() self._memory.clear() class UnboundedMemo(dict): """ A memoizing mapping that retains all deleted items """ def __delitem__(self, key): pass def _escape_regex_range_chars(s: str) -> str: # escape these chars: ^-[] for c in r"\^-[]": s = s.replace(c, _bslash + c) s = s.replace("\n", r"\n") s = s.replace("\t", r"\t") return str(s) def _collapse_string_to_ranges( s: Union[str, Iterable[str]], re_escape: bool = True ) -> str: def is_consecutive(c): c_int = ord(c) is_consecutive.prev, prev = c_int, is_consecutive.prev if c_int - prev > 1: is_consecutive.value = next(is_consecutive.counter) return is_consecutive.value is_consecutive.prev = 0 is_consecutive.counter = itertools.count() is_consecutive.value = -1 def escape_re_range_char(c): return "\\" + c if c in r"\^-][" else c def no_escape_re_range_char(c): return c if not re_escape: escape_re_range_char = no_escape_re_range_char ret = [] s = "".join(sorted(set(s))) if len(s) > 3: for _, chars in itertools.groupby(s, key=is_consecutive): first = last = next(chars) last = collections.deque( itertools.chain(iter([last]), chars), maxlen=1 ).pop() if first == last: ret.append(escape_re_range_char(first)) else: sep = "" if ord(last) == ord(first) + 1 else "-" ret.append( "{}{}{}".format( escape_re_range_char(first), sep, escape_re_range_char(last) ) ) else: ret = [escape_re_range_char(c) for c in s] return "".join(ret) def _flatten(ll: list) -> list: ret = [] for i in ll: if isinstance(i, list): ret.extend(_flatten(i)) else: ret.append(i) return ret PK{5Z/H9Lib/site-packages/setuptools/_vendor/pyparsing/actions.pynuW+A# actions.py from .exceptions import ParseException from .util import col class OnlyOnce: """ Wrapper for parse actions, to ensure they are only called once. """ def __init__(self, method_call): from .core import _trim_arity self.callable = _trim_arity(method_call) self.called = False def __call__(self, s, l, t): if not self.called: results = self.callable(s, l, t) self.called = True return results raise ParseException(s, l, "OnlyOnce obj called multiple times w/out reset") def reset(self): """ Allow the associated parse action to be called once more. """ self.called = False def match_only_at_col(n): """ Helper method for defining parse actions that require matching at a specific column in the input text. """ def verify_col(strg, locn, toks): if col(locn, strg) != n: raise ParseException(strg, locn, "matched token not at column {}".format(n)) return verify_col def replace_with(repl_str): """ Helper method for common parse actions that simply return a literal value. Especially useful when used with :class:`transform_string` (). Example:: num = Word(nums).set_parse_action(lambda toks: int(toks[0])) na = one_of("N/A NA").set_parse_action(replace_with(math.nan)) term = na | num term[1, ...].parse_string("324 234 N/A 234") # -> [324, 234, nan, 234] """ return lambda s, l, t: [repl_str] def remove_quotes(s, l, t): """ Helper parse action for removing quotation marks from parsed quoted strings. Example:: # by default, quotation marks are included in parsed results quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["'Now is the Winter of our Discontent'"] # use remove_quotes to strip quotation marks from parsed results quoted_string.set_parse_action(remove_quotes) quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["Now is the Winter of our Discontent"] """ return t[0][1:-1] def with_attribute(*args, **attr_dict): """ Helper to create a validating parse action to be used with start tags created with :class:`make_xml_tags` or :class:`make_html_tags`. Use ``with_attribute`` to qualify a starting tag with a required attribute value, to avoid false matches on common tags such as ```` or ``
``. Call ``with_attribute`` with a series of attribute names and values. Specify the list of filter attributes names and values as: - keyword arguments, as in ``(align="right")``, or - as an explicit dict with ``**`` operator, when an attribute name is also a Python reserved word, as in ``**{"class":"Customer", "align":"right"}`` - a list of name-value tuples, as in ``(("ns1:class", "Customer"), ("ns2:align", "right"))`` For attribute names with a namespace prefix, you must use the second form. Attribute names are matched insensitive to upper/lower case. If just testing for ``class`` (with or without a namespace), use :class:`with_class`. To verify that the attribute exists, but without specifying a value, pass ``with_attribute.ANY_VALUE`` as the value. Example:: html = '''
Some text
1 4 0 1 0
1,3 2,3 1,1
this has no type
''' div,div_end = make_html_tags("div") # only match div tag having a type attribute with value "grid" div_grid = div().set_parse_action(with_attribute(type="grid")) grid_expr = div_grid + SkipTo(div | div_end)("body") for grid_header in grid_expr.search_string(html): print(grid_header.body) # construct a match with any div tag having a type attribute, regardless of the value div_any_type = div().set_parse_action(with_attribute(type=with_attribute.ANY_VALUE)) div_expr = div_any_type + SkipTo(div | div_end)("body") for div_header in div_expr.search_string(html): print(div_header.body) prints:: 1 4 0 1 0 1 4 0 1 0 1,3 2,3 1,1 """ if args: attrs = args[:] else: attrs = attr_dict.items() attrs = [(k, v) for k, v in attrs] def pa(s, l, tokens): for attrName, attrValue in attrs: if attrName not in tokens: raise ParseException(s, l, "no matching attribute " + attrName) if attrValue != with_attribute.ANY_VALUE and tokens[attrName] != attrValue: raise ParseException( s, l, "attribute {!r} has value {!r}, must be {!r}".format( attrName, tokens[attrName], attrValue ), ) return pa with_attribute.ANY_VALUE = object() def with_class(classname, namespace=""): """ Simplified version of :class:`with_attribute` when matching on a div class - made difficult because ``class`` is a reserved word in Python. Example:: html = '''
Some text
1 4 0 1 0
1,3 2,3 1,1
this <div> has no class
''' div,div_end = make_html_tags("div") div_grid = div().set_parse_action(with_class("grid")) grid_expr = div_grid + SkipTo(div | div_end)("body") for grid_header in grid_expr.search_string(html): print(grid_header.body) div_any_type = div().set_parse_action(with_class(withAttribute.ANY_VALUE)) div_expr = div_any_type + SkipTo(div | div_end)("body") for div_header in div_expr.search_string(html): print(div_header.body) prints:: 1 4 0 1 0 1 4 0 1 0 1,3 2,3 1,1 """ classattr = "{}:class".format(namespace) if namespace else "class" return with_attribute(**{classattr: classname}) # pre-PEP8 compatibility symbols replaceWith = replace_with removeQuotes = remove_quotes withAttribute = with_attribute withClass = with_class matchOnlyAtCol = match_only_at_col PK{5Z5Z4Z49Lib/site-packages/setuptools/_vendor/pyparsing/testing.pynuW+A# testing.py from contextlib import contextmanager import typing from .core import ( ParserElement, ParseException, Keyword, __diag__, __compat__, ) class pyparsing_test: """ namespace class for classes useful in writing unit tests """ class reset_pyparsing_context: """ Context manager to be used when writing unit tests that modify pyparsing config values: - packrat parsing - bounded recursion parsing - default whitespace characters. - default keyword characters - literal string auto-conversion class - __diag__ settings Example:: with reset_pyparsing_context(): # test that literals used to construct a grammar are automatically suppressed ParserElement.inlineLiteralsUsing(Suppress) term = Word(alphas) | Word(nums) group = Group('(' + term[...] + ')') # assert that the '()' characters are not included in the parsed tokens self.assertParseAndCheckList(group, "(abc 123 def)", ['abc', '123', 'def']) # after exiting context manager, literals are converted to Literal expressions again """ def __init__(self): self._save_context = {} def save(self): self._save_context["default_whitespace"] = ParserElement.DEFAULT_WHITE_CHARS self._save_context["default_keyword_chars"] = Keyword.DEFAULT_KEYWORD_CHARS self._save_context[ "literal_string_class" ] = ParserElement._literalStringClass self._save_context["verbose_stacktrace"] = ParserElement.verbose_stacktrace self._save_context["packrat_enabled"] = ParserElement._packratEnabled if ParserElement._packratEnabled: self._save_context[ "packrat_cache_size" ] = ParserElement.packrat_cache.size else: self._save_context["packrat_cache_size"] = None self._save_context["packrat_parse"] = ParserElement._parse self._save_context[ "recursion_enabled" ] = ParserElement._left_recursion_enabled self._save_context["__diag__"] = { name: getattr(__diag__, name) for name in __diag__._all_names } self._save_context["__compat__"] = { "collect_all_And_tokens": __compat__.collect_all_And_tokens } return self def restore(self): # reset pyparsing global state if ( ParserElement.DEFAULT_WHITE_CHARS != self._save_context["default_whitespace"] ): ParserElement.set_default_whitespace_chars( self._save_context["default_whitespace"] ) ParserElement.verbose_stacktrace = self._save_context["verbose_stacktrace"] Keyword.DEFAULT_KEYWORD_CHARS = self._save_context["default_keyword_chars"] ParserElement.inlineLiteralsUsing( self._save_context["literal_string_class"] ) for name, value in self._save_context["__diag__"].items(): (__diag__.enable if value else __diag__.disable)(name) ParserElement._packratEnabled = False if self._save_context["packrat_enabled"]: ParserElement.enable_packrat(self._save_context["packrat_cache_size"]) else: ParserElement._parse = self._save_context["packrat_parse"] ParserElement._left_recursion_enabled = self._save_context[ "recursion_enabled" ] __compat__.collect_all_And_tokens = self._save_context["__compat__"] return self def copy(self): ret = type(self)() ret._save_context.update(self._save_context) return ret def __enter__(self): return self.save() def __exit__(self, *args): self.restore() class TestParseResultsAsserts: """ A mixin class to add parse results assertion methods to normal unittest.TestCase classes. """ def assertParseResultsEquals( self, result, expected_list=None, expected_dict=None, msg=None ): """ Unit test assertion to compare a :class:`ParseResults` object with an optional ``expected_list``, and compare any defined results names with an optional ``expected_dict``. """ if expected_list is not None: self.assertEqual(expected_list, result.as_list(), msg=msg) if expected_dict is not None: self.assertEqual(expected_dict, result.as_dict(), msg=msg) def assertParseAndCheckList( self, expr, test_string, expected_list, msg=None, verbose=True ): """ Convenience wrapper assert to test a parser element and input string, and assert that the resulting ``ParseResults.asList()`` is equal to the ``expected_list``. """ result = expr.parse_string(test_string, parse_all=True) if verbose: print(result.dump()) else: print(result.as_list()) self.assertParseResultsEquals(result, expected_list=expected_list, msg=msg) def assertParseAndCheckDict( self, expr, test_string, expected_dict, msg=None, verbose=True ): """ Convenience wrapper assert to test a parser element and input string, and assert that the resulting ``ParseResults.asDict()`` is equal to the ``expected_dict``. """ result = expr.parse_string(test_string, parseAll=True) if verbose: print(result.dump()) else: print(result.as_list()) self.assertParseResultsEquals(result, expected_dict=expected_dict, msg=msg) def assertRunTestResults( self, run_tests_report, expected_parse_results=None, msg=None ): """ Unit test assertion to evaluate output of ``ParserElement.runTests()``. If a list of list-dict tuples is given as the ``expected_parse_results`` argument, then these are zipped with the report tuples returned by ``runTests`` and evaluated using ``assertParseResultsEquals``. Finally, asserts that the overall ``runTests()`` success value is ``True``. :param run_tests_report: tuple(bool, [tuple(str, ParseResults or Exception)]) returned from runTests :param expected_parse_results (optional): [tuple(str, list, dict, Exception)] """ run_test_success, run_test_results = run_tests_report if expected_parse_results is not None: merged = [ (*rpt, expected) for rpt, expected in zip(run_test_results, expected_parse_results) ] for test_string, result, expected in merged: # expected should be a tuple containing a list and/or a dict or an exception, # and optional failure message string # an empty tuple will skip any result validation fail_msg = next( (exp for exp in expected if isinstance(exp, str)), None ) expected_exception = next( ( exp for exp in expected if isinstance(exp, type) and issubclass(exp, Exception) ), None, ) if expected_exception is not None: with self.assertRaises( expected_exception=expected_exception, msg=fail_msg or msg ): if isinstance(result, Exception): raise result else: expected_list = next( (exp for exp in expected if isinstance(exp, list)), None ) expected_dict = next( (exp for exp in expected if isinstance(exp, dict)), None ) if (expected_list, expected_dict) != (None, None): self.assertParseResultsEquals( result, expected_list=expected_list, expected_dict=expected_dict, msg=fail_msg or msg, ) else: # warning here maybe? print("no validation for {!r}".format(test_string)) # do this last, in case some specific test results can be reported instead self.assertTrue( run_test_success, msg=msg if msg is not None else "failed runTests" ) @contextmanager def assertRaisesParseException(self, exc_type=ParseException, msg=None): with self.assertRaises(exc_type, msg=msg): yield @staticmethod def with_line_numbers( s: str, start_line: typing.Optional[int] = None, end_line: typing.Optional[int] = None, expand_tabs: bool = True, eol_mark: str = "|", mark_spaces: typing.Optional[str] = None, mark_control: typing.Optional[str] = None, ) -> str: """ Helpful method for debugging a parser - prints a string with line and column numbers. (Line and column numbers are 1-based.) :param s: tuple(bool, str - string to be printed with line and column numbers :param start_line: int - (optional) starting line number in s to print (default=1) :param end_line: int - (optional) ending line number in s to print (default=len(s)) :param expand_tabs: bool - (optional) expand tabs to spaces, to match the pyparsing default :param eol_mark: str - (optional) string to mark the end of lines, helps visualize trailing spaces (default="|") :param mark_spaces: str - (optional) special character to display in place of spaces :param mark_control: str - (optional) convert non-printing control characters to a placeholding character; valid values: - "unicode" - replaces control chars with Unicode symbols, such as "␍" and "␊" - any single character string - replace control characters with given string - None (default) - string is displayed as-is :return: str - input string with leading line numbers and column number headers """ if expand_tabs: s = s.expandtabs() if mark_control is not None: if mark_control == "unicode": tbl = str.maketrans( {c: u for c, u in zip(range(0, 33), range(0x2400, 0x2433))} | {127: 0x2421} ) eol_mark = "" else: tbl = str.maketrans( {c: mark_control for c in list(range(0, 32)) + [127]} ) s = s.translate(tbl) if mark_spaces is not None and mark_spaces != " ": if mark_spaces == "unicode": tbl = str.maketrans({9: 0x2409, 32: 0x2423}) s = s.translate(tbl) else: s = s.replace(" ", mark_spaces) if start_line is None: start_line = 1 if end_line is None: end_line = len(s) end_line = min(end_line, len(s)) start_line = min(max(1, start_line), end_line) if mark_control != "unicode": s_lines = s.splitlines()[start_line - 1 : end_line] else: s_lines = [line + "␊" for line in s.split("␊")[start_line - 1 : end_line]] if not s_lines: return "" lineno_width = len(str(end_line)) max_line_len = max(len(line) for line in s_lines) lead = " " * (lineno_width + 1) if max_line_len >= 99: header0 = ( lead + "".join( "{}{}".format(" " * 99, (i + 1) % 100) for i in range(max(max_line_len // 100, 1)) ) + "\n" ) else: header0 = "" header1 = ( header0 + lead + "".join( " {}".format((i + 1) % 10) for i in range(-(-max_line_len // 10)) ) + "\n" ) header2 = lead + "1234567890" * (-(-max_line_len // 10)) + "\n" return ( header1 + header2 + "\n".join( "{:{}d}:{}{}".format(i, lineno_width, line, eol_mark) for i, line in enumerate(s_lines, start=start_line) ) + "\n" ) PK{5Z*٘٘9Lib/site-packages/setuptools/_vendor/pyparsing/helpers.pynuW+A# helpers.py import html.entities import re import typing from . import __diag__ from .core import * from .util import _bslash, _flatten, _escape_regex_range_chars # # global helpers # def delimited_list( expr: Union[str, ParserElement], delim: Union[str, ParserElement] = ",", combine: bool = False, min: typing.Optional[int] = None, max: typing.Optional[int] = None, *, allow_trailing_delim: bool = False, ) -> ParserElement: """Helper to define a delimited list of expressions - the delimiter defaults to ','. By default, the list elements and delimiters can have intervening whitespace, and comments, but this can be overridden by passing ``combine=True`` in the constructor. If ``combine`` is set to ``True``, the matching tokens are returned as a single token string, with the delimiters included; otherwise, the matching tokens are returned as a list of tokens, with the delimiters suppressed. If ``allow_trailing_delim`` is set to True, then the list may end with a delimiter. Example:: delimited_list(Word(alphas)).parse_string("aa,bb,cc") # -> ['aa', 'bb', 'cc'] delimited_list(Word(hexnums), delim=':', combine=True).parse_string("AA:BB:CC:DD:EE") # -> ['AA:BB:CC:DD:EE'] """ if isinstance(expr, str_type): expr = ParserElement._literalStringClass(expr) dlName = "{expr} [{delim} {expr}]...{end}".format( expr=str(expr.copy().streamline()), delim=str(delim), end=" [{}]".format(str(delim)) if allow_trailing_delim else "", ) if not combine: delim = Suppress(delim) if min is not None: if min < 1: raise ValueError("min must be greater than 0") min -= 1 if max is not None: if min is not None and max <= min: raise ValueError("max must be greater than, or equal to min") max -= 1 delimited_list_expr = expr + (delim + expr)[min, max] if allow_trailing_delim: delimited_list_expr += Opt(delim) if combine: return Combine(delimited_list_expr).set_name(dlName) else: return delimited_list_expr.set_name(dlName) def counted_array( expr: ParserElement, int_expr: typing.Optional[ParserElement] = None, *, intExpr: typing.Optional[ParserElement] = None, ) -> ParserElement: """Helper to define a counted list of expressions. This helper defines a pattern of the form:: integer expr expr expr... where the leading integer tells how many expr expressions follow. The matched tokens returns the array of expr tokens as a list - the leading count token is suppressed. If ``int_expr`` is specified, it should be a pyparsing expression that produces an integer value. Example:: counted_array(Word(alphas)).parse_string('2 ab cd ef') # -> ['ab', 'cd'] # in this parser, the leading integer value is given in binary, # '10' indicating that 2 values are in the array binary_constant = Word('01').set_parse_action(lambda t: int(t[0], 2)) counted_array(Word(alphas), int_expr=binary_constant).parse_string('10 ab cd ef') # -> ['ab', 'cd'] # if other fields must be parsed after the count but before the # list items, give the fields results names and they will # be preserved in the returned ParseResults: count_with_metadata = integer + Word(alphas)("type") typed_array = counted_array(Word(alphanums), int_expr=count_with_metadata)("items") result = typed_array.parse_string("3 bool True True False") print(result.dump()) # prints # ['True', 'True', 'False'] # - items: ['True', 'True', 'False'] # - type: 'bool' """ intExpr = intExpr or int_expr array_expr = Forward() def count_field_parse_action(s, l, t): nonlocal array_expr n = t[0] array_expr <<= (expr * n) if n else Empty() # clear list contents, but keep any named results del t[:] if intExpr is None: intExpr = Word(nums).set_parse_action(lambda t: int(t[0])) else: intExpr = intExpr.copy() intExpr.set_name("arrayLen") intExpr.add_parse_action(count_field_parse_action, call_during_try=True) return (intExpr + array_expr).set_name("(len) " + str(expr) + "...") def match_previous_literal(expr: ParserElement) -> ParserElement: """Helper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example:: first = Word(nums) second = match_previous_literal(first) match_expr = first + ":" + second will match ``"1:1"``, but not ``"1:2"``. Because this matches a previous literal, will also match the leading ``"1:1"`` in ``"1:10"``. If this is not desired, use :class:`match_previous_expr`. Do *not* use with packrat parsing enabled. """ rep = Forward() def copy_token_to_repeater(s, l, t): if t: if len(t) == 1: rep << t[0] else: # flatten t tokens tflat = _flatten(t.as_list()) rep << And(Literal(tt) for tt in tflat) else: rep << Empty() expr.add_parse_action(copy_token_to_repeater, callDuringTry=True) rep.set_name("(prev) " + str(expr)) return rep def match_previous_expr(expr: ParserElement) -> ParserElement: """Helper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example:: first = Word(nums) second = match_previous_expr(first) match_expr = first + ":" + second will match ``"1:1"``, but not ``"1:2"``. Because this matches by expressions, will *not* match the leading ``"1:1"`` in ``"1:10"``; the expressions are evaluated first, and then compared, so ``"1"`` is compared with ``"10"``. Do *not* use with packrat parsing enabled. """ rep = Forward() e2 = expr.copy() rep <<= e2 def copy_token_to_repeater(s, l, t): matchTokens = _flatten(t.as_list()) def must_match_these_tokens(s, l, t): theseTokens = _flatten(t.as_list()) if theseTokens != matchTokens: raise ParseException( s, l, "Expected {}, found{}".format(matchTokens, theseTokens) ) rep.set_parse_action(must_match_these_tokens, callDuringTry=True) expr.add_parse_action(copy_token_to_repeater, callDuringTry=True) rep.set_name("(prev) " + str(expr)) return rep def one_of( strs: Union[typing.Iterable[str], str], caseless: bool = False, use_regex: bool = True, as_keyword: bool = False, *, useRegex: bool = True, asKeyword: bool = False, ) -> ParserElement: """Helper to quickly define a set of alternative :class:`Literal` s, and makes sure to do longest-first testing when there is a conflict, regardless of the input order, but returns a :class:`MatchFirst` for best performance. Parameters: - ``strs`` - a string of space-delimited literals, or a collection of string literals - ``caseless`` - treat all literals as caseless - (default= ``False``) - ``use_regex`` - as an optimization, will generate a :class:`Regex` object; otherwise, will generate a :class:`MatchFirst` object (if ``caseless=True`` or ``asKeyword=True``, or if creating a :class:`Regex` raises an exception) - (default= ``True``) - ``as_keyword`` - enforce :class:`Keyword`-style matching on the generated expressions - (default= ``False``) - ``asKeyword`` and ``useRegex`` are retained for pre-PEP8 compatibility, but will be removed in a future release Example:: comp_oper = one_of("< = > <= >= !=") var = Word(alphas) number = Word(nums) term = var | number comparison_expr = term + comp_oper + term print(comparison_expr.search_string("B = 12 AA=23 B<=AA AA>12")) prints:: [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']] """ asKeyword = asKeyword or as_keyword useRegex = useRegex and use_regex if ( isinstance(caseless, str_type) and __diag__.warn_on_multiple_string_args_to_oneof ): warnings.warn( "More than one string argument passed to one_of, pass" " choices as a list or space-delimited string", stacklevel=2, ) if caseless: isequal = lambda a, b: a.upper() == b.upper() masks = lambda a, b: b.upper().startswith(a.upper()) parseElementClass = CaselessKeyword if asKeyword else CaselessLiteral else: isequal = lambda a, b: a == b masks = lambda a, b: b.startswith(a) parseElementClass = Keyword if asKeyword else Literal symbols: List[str] = [] if isinstance(strs, str_type): symbols = strs.split() elif isinstance(strs, Iterable): symbols = list(strs) else: raise TypeError("Invalid argument to one_of, expected string or iterable") if not symbols: return NoMatch() # reorder given symbols to take care to avoid masking longer choices with shorter ones # (but only if the given symbols are not just single characters) if any(len(sym) > 1 for sym in symbols): i = 0 while i < len(symbols) - 1: cur = symbols[i] for j, other in enumerate(symbols[i + 1 :]): if isequal(other, cur): del symbols[i + j + 1] break elif masks(cur, other): del symbols[i + j + 1] symbols.insert(i, other) break else: i += 1 if useRegex: re_flags: int = re.IGNORECASE if caseless else 0 try: if all(len(sym) == 1 for sym in symbols): # symbols are just single characters, create range regex pattern patt = "[{}]".format( "".join(_escape_regex_range_chars(sym) for sym in symbols) ) else: patt = "|".join(re.escape(sym) for sym in symbols) # wrap with \b word break markers if defining as keywords if asKeyword: patt = r"\b(?:{})\b".format(patt) ret = Regex(patt, flags=re_flags).set_name(" | ".join(symbols)) if caseless: # add parse action to return symbols as specified, not in random # casing as found in input string symbol_map = {sym.lower(): sym for sym in symbols} ret.add_parse_action(lambda s, l, t: symbol_map[t[0].lower()]) return ret except re.error: warnings.warn( "Exception creating Regex for one_of, building MatchFirst", stacklevel=2 ) # last resort, just use MatchFirst return MatchFirst(parseElementClass(sym) for sym in symbols).set_name( " | ".join(symbols) ) def dict_of(key: ParserElement, value: ParserElement) -> ParserElement: """Helper to easily and clearly define a dictionary by specifying the respective patterns for the key and value. Takes care of defining the :class:`Dict`, :class:`ZeroOrMore`, and :class:`Group` tokens in the proper order. The key pattern can include delimiting markers or punctuation, as long as they are suppressed, thereby leaving the significant key text. The value pattern can include named results, so that the :class:`Dict` results can include named token fields. Example:: text = "shape: SQUARE posn: upper left color: light blue texture: burlap" attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) print(attr_expr[1, ...].parse_string(text).dump()) attr_label = label attr_value = Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join) # similar to Dict, but simpler call format result = dict_of(attr_label, attr_value).parse_string(text) print(result.dump()) print(result['shape']) print(result.shape) # object attribute access works too print(result.as_dict()) prints:: [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']] - color: 'light blue' - posn: 'upper left' - shape: 'SQUARE' - texture: 'burlap' SQUARE SQUARE {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'} """ return Dict(OneOrMore(Group(key + value))) def original_text_for( expr: ParserElement, as_string: bool = True, *, asString: bool = True ) -> ParserElement: """Helper to return the original, untokenized text for a given expression. Useful to restore the parsed fields of an HTML start tag into the raw tag text itself, or to revert separate tokens with intervening whitespace back to the original matching input text. By default, returns astring containing the original parsed text. If the optional ``as_string`` argument is passed as ``False``, then the return value is a :class:`ParseResults` containing any results names that were originally matched, and a single token containing the original matched text from the input string. So if the expression passed to :class:`original_text_for` contains expressions with defined results names, you must set ``as_string`` to ``False`` if you want to preserve those results name values. The ``asString`` pre-PEP8 argument is retained for compatibility, but will be removed in a future release. Example:: src = "this is test bold text normal text " for tag in ("b", "i"): opener, closer = make_html_tags(tag) patt = original_text_for(opener + SkipTo(closer) + closer) print(patt.search_string(src)[0]) prints:: [' bold text '] ['text'] """ asString = asString and as_string locMarker = Empty().set_parse_action(lambda s, loc, t: loc) endlocMarker = locMarker.copy() endlocMarker.callPreparse = False matchExpr = locMarker("_original_start") + expr + endlocMarker("_original_end") if asString: extractText = lambda s, l, t: s[t._original_start : t._original_end] else: def extractText(s, l, t): t[:] = [s[t.pop("_original_start") : t.pop("_original_end")]] matchExpr.set_parse_action(extractText) matchExpr.ignoreExprs = expr.ignoreExprs matchExpr.suppress_warning(Diagnostics.warn_ungrouped_named_tokens_in_collection) return matchExpr def ungroup(expr: ParserElement) -> ParserElement: """Helper to undo pyparsing's default grouping of And expressions, even if all but one are non-empty. """ return TokenConverter(expr).add_parse_action(lambda t: t[0]) def locatedExpr(expr: ParserElement) -> ParserElement: """ (DEPRECATED - future code should use the Located class) Helper to decorate a returned token with its starting and ending locations in the input string. This helper adds the following results names: - ``locn_start`` - location where matched expression begins - ``locn_end`` - location where matched expression ends - ``value`` - the actual parsed results Be careful if the input text contains ```` characters, you may want to call :class:`ParserElement.parseWithTabs` Example:: wd = Word(alphas) for match in locatedExpr(wd).searchString("ljsdf123lksdjjf123lkkjj1222"): print(match) prints:: [[0, 'ljsdf', 5]] [[8, 'lksdjjf', 15]] [[18, 'lkkjj', 23]] """ locator = Empty().set_parse_action(lambda ss, ll, tt: ll) return Group( locator("locn_start") + expr("value") + locator.copy().leaveWhitespace()("locn_end") ) def nested_expr( opener: Union[str, ParserElement] = "(", closer: Union[str, ParserElement] = ")", content: typing.Optional[ParserElement] = None, ignore_expr: ParserElement = quoted_string(), *, ignoreExpr: ParserElement = quoted_string(), ) -> ParserElement: """Helper method for defining nested lists enclosed in opening and closing delimiters (``"("`` and ``")"`` are the default). Parameters: - ``opener`` - opening character for a nested list (default= ``"("``); can also be a pyparsing expression - ``closer`` - closing character for a nested list (default= ``")"``); can also be a pyparsing expression - ``content`` - expression for items within the nested lists (default= ``None``) - ``ignore_expr`` - expression for ignoring opening and closing delimiters (default= :class:`quoted_string`) - ``ignoreExpr`` - this pre-PEP8 argument is retained for compatibility but will be removed in a future release If an expression is not provided for the content argument, the nested expression will capture all whitespace-delimited content between delimiters as a list of separate values. Use the ``ignore_expr`` argument to define expressions that may contain opening or closing characters that should not be treated as opening or closing characters for nesting, such as quoted_string or a comment expression. Specify multiple expressions using an :class:`Or` or :class:`MatchFirst`. The default is :class:`quoted_string`, but if no expressions are to be ignored, then pass ``None`` for this argument. Example:: data_type = one_of("void int short long char float double") decl_data_type = Combine(data_type + Opt(Word('*'))) ident = Word(alphas+'_', alphanums+'_') number = pyparsing_common.number arg = Group(decl_data_type + ident) LPAR, RPAR = map(Suppress, "()") code_body = nested_expr('{', '}', ignore_expr=(quoted_string | c_style_comment)) c_function = (decl_data_type("type") + ident("name") + LPAR + Opt(delimited_list(arg), [])("args") + RPAR + code_body("body")) c_function.ignore(c_style_comment) source_code = ''' int is_odd(int x) { return (x%2); } int dec_to_hex(char hchar) { if (hchar >= '0' && hchar <= '9') { return (ord(hchar)-ord('0')); } else { return (10+ord(hchar)-ord('A')); } } ''' for func in c_function.search_string(source_code): print("%(name)s (%(type)s) args: %(args)s" % func) prints:: is_odd (int) args: [['int', 'x']] dec_to_hex (int) args: [['char', 'hchar']] """ if ignoreExpr != ignore_expr: ignoreExpr = ignore_expr if ignoreExpr == quoted_string() else ignoreExpr if opener == closer: raise ValueError("opening and closing strings cannot be the same") if content is None: if isinstance(opener, str_type) and isinstance(closer, str_type): if len(opener) == 1 and len(closer) == 1: if ignoreExpr is not None: content = Combine( OneOrMore( ~ignoreExpr + CharsNotIn( opener + closer + ParserElement.DEFAULT_WHITE_CHARS, exact=1, ) ) ).set_parse_action(lambda t: t[0].strip()) else: content = empty.copy() + CharsNotIn( opener + closer + ParserElement.DEFAULT_WHITE_CHARS ).set_parse_action(lambda t: t[0].strip()) else: if ignoreExpr is not None: content = Combine( OneOrMore( ~ignoreExpr + ~Literal(opener) + ~Literal(closer) + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS, exact=1) ) ).set_parse_action(lambda t: t[0].strip()) else: content = Combine( OneOrMore( ~Literal(opener) + ~Literal(closer) + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS, exact=1) ) ).set_parse_action(lambda t: t[0].strip()) else: raise ValueError( "opening and closing arguments must be strings if no content expression is given" ) ret = Forward() if ignoreExpr is not None: ret <<= Group( Suppress(opener) + ZeroOrMore(ignoreExpr | ret | content) + Suppress(closer) ) else: ret <<= Group(Suppress(opener) + ZeroOrMore(ret | content) + Suppress(closer)) ret.set_name("nested %s%s expression" % (opener, closer)) return ret def _makeTags(tagStr, xml, suppress_LT=Suppress("<"), suppress_GT=Suppress(">")): """Internal helper to construct opening and closing tag expressions, given a tag name""" if isinstance(tagStr, str_type): resname = tagStr tagStr = Keyword(tagStr, caseless=not xml) else: resname = tagStr.name tagAttrName = Word(alphas, alphanums + "_-:") if xml: tagAttrValue = dbl_quoted_string.copy().set_parse_action(remove_quotes) openTag = ( suppress_LT + tagStr("tag") + Dict(ZeroOrMore(Group(tagAttrName + Suppress("=") + tagAttrValue))) + Opt("/", default=[False])("empty").set_parse_action( lambda s, l, t: t[0] == "/" ) + suppress_GT ) else: tagAttrValue = quoted_string.copy().set_parse_action(remove_quotes) | Word( printables, exclude_chars=">" ) openTag = ( suppress_LT + tagStr("tag") + Dict( ZeroOrMore( Group( tagAttrName.set_parse_action(lambda t: t[0].lower()) + Opt(Suppress("=") + tagAttrValue) ) ) ) + Opt("/", default=[False])("empty").set_parse_action( lambda s, l, t: t[0] == "/" ) + suppress_GT ) closeTag = Combine(Literal("", adjacent=False) openTag.set_name("<%s>" % resname) # add start results name in parse action now that ungrouped names are not reported at two levels openTag.add_parse_action( lambda t: t.__setitem__( "start" + "".join(resname.replace(":", " ").title().split()), t.copy() ) ) closeTag = closeTag( "end" + "".join(resname.replace(":", " ").title().split()) ).set_name("" % resname) openTag.tag = resname closeTag.tag = resname openTag.tag_body = SkipTo(closeTag()) return openTag, closeTag def make_html_tags( tag_str: Union[str, ParserElement] ) -> Tuple[ParserElement, ParserElement]: """Helper to construct opening and closing tag expressions for HTML, given a tag name. Matches tags in either upper or lower case, attributes with namespaces and with quoted or unquoted values. Example:: text = 'More info at the
pyparsing wiki page' # make_html_tags returns pyparsing expressions for the opening and # closing tags as a 2-tuple a, a_end = make_html_tags("A") link_expr = a + SkipTo(a_end)("link_text") + a_end for link in link_expr.search_string(text): # attributes in the tag (like "href" shown here) are # also accessible as named results print(link.link_text, '->', link.href) prints:: pyparsing -> https://github.com/pyparsing/pyparsing/wiki """ return _makeTags(tag_str, False) def make_xml_tags( tag_str: Union[str, ParserElement] ) -> Tuple[ParserElement, ParserElement]: """Helper to construct opening and closing tag expressions for XML, given a tag name. Matches tags only in the given upper/lower case. Example: similar to :class:`make_html_tags` """ return _makeTags(tag_str, True) any_open_tag: ParserElement any_close_tag: ParserElement any_open_tag, any_close_tag = make_html_tags( Word(alphas, alphanums + "_:").set_name("any tag") ) _htmlEntityMap = {k.rstrip(";"): v for k, v in html.entities.html5.items()} common_html_entity = Regex("&(?P" + "|".join(_htmlEntityMap) + ");").set_name( "common HTML entity" ) def replace_html_entity(t): """Helper parser action to replace common HTML entities with their special characters""" return _htmlEntityMap.get(t.entity) class OpAssoc(Enum): LEFT = 1 RIGHT = 2 InfixNotationOperatorArgType = Union[ ParserElement, str, Tuple[Union[ParserElement, str], Union[ParserElement, str]] ] InfixNotationOperatorSpec = Union[ Tuple[ InfixNotationOperatorArgType, int, OpAssoc, typing.Optional[ParseAction], ], Tuple[ InfixNotationOperatorArgType, int, OpAssoc, ], ] def infix_notation( base_expr: ParserElement, op_list: List[InfixNotationOperatorSpec], lpar: Union[str, ParserElement] = Suppress("("), rpar: Union[str, ParserElement] = Suppress(")"), ) -> ParserElement: """Helper method for constructing grammars of expressions made up of operators working in a precedence hierarchy. Operators may be unary or binary, left- or right-associative. Parse actions can also be attached to operator expressions. The generated parser will also recognize the use of parentheses to override operator precedences (see example below). Note: if you define a deep operator list, you may see performance issues when using infix_notation. See :class:`ParserElement.enable_packrat` for a mechanism to potentially improve your parser performance. Parameters: - ``base_expr`` - expression representing the most basic operand to be used in the expression - ``op_list`` - list of tuples, one for each operator precedence level in the expression grammar; each tuple is of the form ``(op_expr, num_operands, right_left_assoc, (optional)parse_action)``, where: - ``op_expr`` is the pyparsing expression for the operator; may also be a string, which will be converted to a Literal; if ``num_operands`` is 3, ``op_expr`` is a tuple of two expressions, for the two operators separating the 3 terms - ``num_operands`` is the number of terms for this operator (must be 1, 2, or 3) - ``right_left_assoc`` is the indicator whether the operator is right or left associative, using the pyparsing-defined constants ``OpAssoc.RIGHT`` and ``OpAssoc.LEFT``. - ``parse_action`` is the parse action to be associated with expressions matching this operator expression (the parse action tuple member may be omitted); if the parse action is passed a tuple or list of functions, this is equivalent to calling ``set_parse_action(*fn)`` (:class:`ParserElement.set_parse_action`) - ``lpar`` - expression for matching left-parentheses; if passed as a str, then will be parsed as Suppress(lpar). If lpar is passed as an expression (such as ``Literal('(')``), then it will be kept in the parsed results, and grouped with them. (default= ``Suppress('(')``) - ``rpar`` - expression for matching right-parentheses; if passed as a str, then will be parsed as Suppress(rpar). If rpar is passed as an expression (such as ``Literal(')')``), then it will be kept in the parsed results, and grouped with them. (default= ``Suppress(')')``) Example:: # simple example of four-function arithmetic with ints and # variable names integer = pyparsing_common.signed_integer varname = pyparsing_common.identifier arith_expr = infix_notation(integer | varname, [ ('-', 1, OpAssoc.RIGHT), (one_of('* /'), 2, OpAssoc.LEFT), (one_of('+ -'), 2, OpAssoc.LEFT), ]) arith_expr.run_tests(''' 5+3*6 (5+3)*6 -2--11 ''', full_dump=False) prints:: 5+3*6 [[5, '+', [3, '*', 6]]] (5+3)*6 [[[5, '+', 3], '*', 6]] -2--11 [[['-', 2], '-', ['-', 11]]] """ # captive version of FollowedBy that does not do parse actions or capture results names class _FB(FollowedBy): def parseImpl(self, instring, loc, doActions=True): self.expr.try_parse(instring, loc) return loc, [] _FB.__name__ = "FollowedBy>" ret = Forward() if isinstance(lpar, str): lpar = Suppress(lpar) if isinstance(rpar, str): rpar = Suppress(rpar) # if lpar and rpar are not suppressed, wrap in group if not (isinstance(rpar, Suppress) and isinstance(rpar, Suppress)): lastExpr = base_expr | Group(lpar + ret + rpar) else: lastExpr = base_expr | (lpar + ret + rpar) for i, operDef in enumerate(op_list): opExpr, arity, rightLeftAssoc, pa = (operDef + (None,))[:4] if isinstance(opExpr, str_type): opExpr = ParserElement._literalStringClass(opExpr) if arity == 3: if not isinstance(opExpr, (tuple, list)) or len(opExpr) != 2: raise ValueError( "if numterms=3, opExpr must be a tuple or list of two expressions" ) opExpr1, opExpr2 = opExpr term_name = "{}{} term".format(opExpr1, opExpr2) else: term_name = "{} term".format(opExpr) if not 1 <= arity <= 3: raise ValueError("operator must be unary (1), binary (2), or ternary (3)") if rightLeftAssoc not in (OpAssoc.LEFT, OpAssoc.RIGHT): raise ValueError("operator must indicate right or left associativity") thisExpr: Forward = Forward().set_name(term_name) if rightLeftAssoc is OpAssoc.LEFT: if arity == 1: matchExpr = _FB(lastExpr + opExpr) + Group(lastExpr + opExpr[1, ...]) elif arity == 2: if opExpr is not None: matchExpr = _FB(lastExpr + opExpr + lastExpr) + Group( lastExpr + (opExpr + lastExpr)[1, ...] ) else: matchExpr = _FB(lastExpr + lastExpr) + Group(lastExpr[2, ...]) elif arity == 3: matchExpr = _FB( lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr ) + Group(lastExpr + OneOrMore(opExpr1 + lastExpr + opExpr2 + lastExpr)) elif rightLeftAssoc is OpAssoc.RIGHT: if arity == 1: # try to avoid LR with this extra test if not isinstance(opExpr, Opt): opExpr = Opt(opExpr) matchExpr = _FB(opExpr.expr + thisExpr) + Group(opExpr + thisExpr) elif arity == 2: if opExpr is not None: matchExpr = _FB(lastExpr + opExpr + thisExpr) + Group( lastExpr + (opExpr + thisExpr)[1, ...] ) else: matchExpr = _FB(lastExpr + thisExpr) + Group( lastExpr + thisExpr[1, ...] ) elif arity == 3: matchExpr = _FB( lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr ) + Group(lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr) if pa: if isinstance(pa, (tuple, list)): matchExpr.set_parse_action(*pa) else: matchExpr.set_parse_action(pa) thisExpr <<= (matchExpr | lastExpr).setName(term_name) lastExpr = thisExpr ret <<= lastExpr return ret def indentedBlock(blockStatementExpr, indentStack, indent=True, backup_stacks=[]): """ (DEPRECATED - use IndentedBlock class instead) Helper method for defining space-delimited indentation blocks, such as those used to define block statements in Python source code. Parameters: - ``blockStatementExpr`` - expression defining syntax of statement that is repeated within the indented block - ``indentStack`` - list created by caller to manage indentation stack (multiple ``statementWithIndentedBlock`` expressions within a single grammar should share a common ``indentStack``) - ``indent`` - boolean indicating whether block must be indented beyond the current level; set to ``False`` for block of left-most statements (default= ``True``) A valid block must contain at least one ``blockStatement``. (Note that indentedBlock uses internal parse actions which make it incompatible with packrat parsing.) Example:: data = ''' def A(z): A1 B = 100 G = A2 A2 A3 B def BB(a,b,c): BB1 def BBA(): bba1 bba2 bba3 C D def spam(x,y): def eggs(z): pass ''' indentStack = [1] stmt = Forward() identifier = Word(alphas, alphanums) funcDecl = ("def" + identifier + Group("(" + Opt(delimitedList(identifier)) + ")") + ":") func_body = indentedBlock(stmt, indentStack) funcDef = Group(funcDecl + func_body) rvalue = Forward() funcCall = Group(identifier + "(" + Opt(delimitedList(rvalue)) + ")") rvalue << (funcCall | identifier | Word(nums)) assignment = Group(identifier + "=" + rvalue) stmt << (funcDef | assignment | identifier) module_body = stmt[1, ...] parseTree = module_body.parseString(data) parseTree.pprint() prints:: [['def', 'A', ['(', 'z', ')'], ':', [['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]], 'B', ['def', 'BB', ['(', 'a', 'b', 'c', ')'], ':', [['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]], 'C', 'D', ['def', 'spam', ['(', 'x', 'y', ')'], ':', [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]] """ backup_stacks.append(indentStack[:]) def reset_stack(): indentStack[:] = backup_stacks[-1] def checkPeerIndent(s, l, t): if l >= len(s): return curCol = col(l, s) if curCol != indentStack[-1]: if curCol > indentStack[-1]: raise ParseException(s, l, "illegal nesting") raise ParseException(s, l, "not a peer entry") def checkSubIndent(s, l, t): curCol = col(l, s) if curCol > indentStack[-1]: indentStack.append(curCol) else: raise ParseException(s, l, "not a subentry") def checkUnindent(s, l, t): if l >= len(s): return curCol = col(l, s) if not (indentStack and curCol in indentStack): raise ParseException(s, l, "not an unindent") if curCol < indentStack[-1]: indentStack.pop() NL = OneOrMore(LineEnd().set_whitespace_chars("\t ").suppress()) INDENT = (Empty() + Empty().set_parse_action(checkSubIndent)).set_name("INDENT") PEER = Empty().set_parse_action(checkPeerIndent).set_name("") UNDENT = Empty().set_parse_action(checkUnindent).set_name("UNINDENT") if indent: smExpr = Group( Opt(NL) + INDENT + OneOrMore(PEER + Group(blockStatementExpr) + Opt(NL)) + UNDENT ) else: smExpr = Group( Opt(NL) + OneOrMore(PEER + Group(blockStatementExpr) + Opt(NL)) + Opt(UNDENT) ) # add a parse action to remove backup_stack from list of backups smExpr.add_parse_action( lambda: backup_stacks.pop(-1) and None if backup_stacks else None ) smExpr.set_fail_action(lambda a, b, c, d: reset_stack()) blockStatementExpr.ignore(_bslash + LineEnd()) return smExpr.set_name("indented block") # it's easy to get these comment structures wrong - they're very common, so may as well make them available c_style_comment = Combine(Regex(r"/\*(?:[^*]|\*(?!/))*") + "*/").set_name( "C style comment" ) "Comment of the form ``/* ... */``" html_comment = Regex(r"").set_name("HTML comment") "Comment of the form ````" rest_of_line = Regex(r".*").leave_whitespace().set_name("rest of line") dbl_slash_comment = Regex(r"//(?:\\\n|[^\n])*").set_name("// comment") "Comment of the form ``// ... (to end of line)``" cpp_style_comment = Combine( Regex(r"/\*(?:[^*]|\*(?!/))*") + "*/" | dbl_slash_comment ).set_name("C++ style comment") "Comment of either form :class:`c_style_comment` or :class:`dbl_slash_comment`" java_style_comment = cpp_style_comment "Same as :class:`cpp_style_comment`" python_style_comment = Regex(r"#.*").set_name("Python style comment") "Comment of the form ``# ... (to end of line)``" # build list of built-in expressions, for future reference if a global default value # gets updated _builtin_exprs: List[ParserElement] = [ v for v in vars().values() if isinstance(v, ParserElement) ] # pre-PEP8 compatible names delimitedList = delimited_list countedArray = counted_array matchPreviousLiteral = match_previous_literal matchPreviousExpr = match_previous_expr oneOf = one_of dictOf = dict_of originalTextFor = original_text_for nestedExpr = nested_expr makeHTMLTags = make_html_tags makeXMLTags = make_xml_tags anyOpenTag, anyCloseTag = any_open_tag, any_close_tag commonHTMLEntity = common_html_entity replaceHTMLEntity = replace_html_entity opAssoc = OpAssoc infixNotation = infix_notation cStyleComment = c_style_comment htmlComment = html_comment restOfLine = rest_of_line dblSlashComment = dbl_slash_comment cppStyleComment = cpp_style_comment javaStyleComment = java_style_comment pythonStyleComment = python_style_comment PK{5Zտ;;XLib/site-packages/setuptools/_vendor/more_itertools/__pycache__/__init__.cpython-311.pycnuW+A b;dRddlTddlTdZdS))*z8.8.0N)morerecipes __version__yE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/more_itertools/__init__.pyr s& rPK{5Z\\WLib/site-packages/setuptools/_vendor/more_itertools/__pycache__/recipes.cpython-311.pycnuW+A b;d?dZddlZddlmZddlmZmZmZmZm Z m Z m Z m Z m Z mZddlZddlmZmZmZgdZdZd'dZd Zd(d Zd(d Zd Zefd ZdZeZdZdZ dZ!d(dZ"dZ# ddlm$Z%dZ$e#je$_n #e&$re#Z$YnwxYwd(dZ'dZ(dZ)dZ*d(dZ+d(dZ,d(dZ-d)dZ.ddd Z/d(d!Z0d"Z1d#Z2d$Z3d%Z4d&Z5dS)*aImported from the recipes section of the itertools documentation. All functions taken from the recipes section of the itertools library docs [1]_. Some backward-compatible usability improvements have been made. .. [1] http://docs.python.org/library/itertools.html#recipes N)deque) chain combinationscountcyclegroupbyislicerepeatstarmaptee zip_longest) randrangesamplechoice) all_equalconsumeconvolve dotproduct first_trueflattengrouper iter_exceptncyclesnthnth_combinationpadnonepad_nonepairwise partitionpowersetprependquantify#random_combination_with_replacementrandom_combinationrandom_permutationrandom_product repeatfunc roundrobintabulatetailtakeunique_everseenunique_justseenc<tt||S)zReturn first *n* items of the iterable as a list. >>> take(3, range(10)) [0, 1, 2] If there are fewer than *n* items in the iterable, all of them are returned. >>> take(10, range(3)) [0, 1, 2] )listr niterables xE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/more_itertools/recipes.pyr+r+<s x## $ $$c<t|t|S)aReturn an iterator over the results of ``func(start)``, ``func(start + 1)``, ``func(start + 2)``... *func* should be a function that accepts one integer argument. If *start* is not specified it defaults to 0. It will be incremented each time the iterator is advanced. >>> square = lambda x: x ** 2 >>> iterator = tabulate(square, -3) >>> take(4, iterator) [9, 4, 1, 0] )mapr)functionstarts r3r)r)Ls xu & &&r4c>tt||S)zReturn an iterator over the last *n* items of *iterable*. >>> t = tail(3, 'ABCDEFG') >>> list(t) ['E', 'F', 'G'] maxlen)iterrr0s r3r*r*^s hq))) * **r4cn|t|ddStt|||ddS)aXAdvance *iterable* by *n* steps. If *n* is ``None``, consume it entirely. Efficiently exhausts an iterator without returning values. Defaults to consuming the whole iterator, but an optional second argument may be provided to limit consumption. >>> i = (x for x in range(10)) >>> next(i) 0 >>> consume(i, 3) >>> next(i) 4 >>> consume(i) >>> next(i) Traceback (most recent call last): File "", line 1, in StopIteration If the iterator has fewer items remaining than the provided limit, the whole iterator will be consumed. >>> i = (x for x in range(3)) >>> consume(i, 5) >>> next(i) Traceback (most recent call last): File "", line 1, in StopIteration Nrr:)rnextr )iteratorr1s r3rrisG@ y hq!!!!!! VHa # #T*****r4c@tt||d|S)zReturns the nth item or a default value. >>> l = range(10) >>> nth(l, 3) 3 >>> nth(l, 20, "zebra") 'zebra' N)r>r )r2r1defaults r3rrs  xD))7 3 33r4cbt|}t|dot|d S)z Returns ``True`` if all the elements are equal to each other. >>> all_equal('aaaa') True >>> all_equal('aaab') False TF)rr>)r2gs r3rrs/ A 4== /a//r4c<tt||S)zcReturn the how many times the predicate is true. >>> quantify([True, False, True]) 2 )sumr6)r2preds r3r"r"s s4"" # ##r4c<t|tdS)aReturns the sequence of elements and then returns ``None`` indefinitely. >>> take(5, pad_none(range(3))) [0, 1, 2, None, None] Useful for emulating the behavior of the built-in :func:`map` function. See also :func:`padded`. N)rr r2s r3rrs 6$<< ( ((r4c`tjtt||S)zvReturns the sequence elements *n* times >>> list(ncycles(["a", "b"], 3)) ['a', 'b', 'a', 'b', 'a', 'b'] )r from_iterabler tuple)r2r1s r3rrs%  veHooq99 : ::r4cRtttj||S)zcReturns the dot product of the two iterables. >>> dotproduct([10, 10], [20, 20]) 400 )rEr6operatormul)vec1vec2s r3rrs  s8<t,, - --r4c*tj|S)zReturn an iterator flattening one level of nesting in a list of lists. >>> list(flatten([[0, 1], [2, 3]])) [0, 1, 2, 3] See also :func:`collapse`, which can flatten multiple levels of nesting. )rrJ) listOfListss r3rrs  { + ++r4c||t|t|St|t||S)aGCall *func* with *args* repeatedly, returning an iterable over the results. If *times* is specified, the iterable will terminate after that many repetitions: >>> from operator import add >>> times = 4 >>> args = 3, 5 >>> list(repeatfunc(add, times, *args)) [8, 8, 8, 8] If *times* is ``None`` the iterable will not terminate: >>> from random import randrange >>> times = None >>> args = 1, 11 >>> take(6, repeatfunc(randrange, times, *args)) # doctest:+SKIP [2, 4, 8, 1, 8, 4] )r r )functimesargss r3r'r's9, }tVD\\*** 4e,, - --r4c#zKt|\}}t|dt||Ed{VdS)zReturns an iterator of paired items, overlapping, from the original >>> take(4, pairwise(count())) [(0, 1), (1, 2), (2, 3), (3, 4)] On Python 3.10 and above, this is an alias for :func:`itertools.pairwise`. N)r r>zip)r2abs r3 _pairwiser[sJ x==DAqDMMM1ayyr4)rc#4Kt|Ed{VdSN)itertools_pairwiserHs r3rrs,%h///////////r4ct|trtjdt||}}t |g|z}t |d|iS)zCollect data into fixed-length chunks or blocks. >>> list(grouper('ABCDEFG', 3, 'x')) [('A', 'B', 'C'), ('D', 'E', 'F'), ('G', 'x', 'x')] z+grouper expects iterable as first parameter fillvalue) isinstanceintwarningswarnDeprecationWarningr<r )r2r1r`rVs r3rrsa(C  " 9;M   8 NN a D T 2 2 22r4c'Kt|}td|D}|rI |D]}|Vn2#t$r%|dz}tt||}YnwxYw|GdSdS)aJYields an item from each iterable, alternating between them. >>> list(roundrobin('ABC', 'D', 'EF')) ['A', 'D', 'E', 'B', 'F', 'C'] This function produces the same output as :func:`interleave_longest`, but may perform better for some inputs (in particular when the number of iterables is small). c3>K|]}t|jVdSr])r<__next__).0its r3 zroundrobin..9s+88$r((#888888r4N)lenr StopIterationr ) iterablespendingnextsr>s r3r(r(,s)nnG 88i888 8 8E 2 2  dff   2 2 2 qLG&0011EEE 2 22222sA,A/.A/ctfd|D}t|\}}d|Dd|DfS)a Returns a 2-tuple of iterables derived from the input iterable. The first yields the items that have ``pred(item) == False``. The second yields the items that have ``pred(item) == True``. >>> is_odd = lambda x: x % 2 != 0 >>> iterable = range(10) >>> even_items, odd_items = partition(is_odd, iterable) >>> list(even_items), list(odd_items) ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9]) If *pred* is None, :func:`bool` is used. >>> iterable = [0, 1, False, True, '', ' '] >>> false_items, true_items = partition(None, iterable) >>> list(false_items), list(true_items) ([0, False, ''], [1, True, ' ']) Nc32K|]}||fVdSr])rixrFs r3rkzpartition..Zs/22ADDGGQ<222222r4c3$K|] \}}||V dSr]rtricondrus r3rkzpartition..]s+++yad+++++++r4c3$K|] \}}||V dSr]rtrws r3rkzpartition..^s+''ya$'''''''r4)boolr )rFr2 evaluationst1t2s` r3rrCse( |2222222K   FB++B+++''B''' r4ct|tjfdtt dzDS)aYields all possible subsets of the iterable. >>> list(powerset([1, 2, 3])) [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)] :func:`powerset` will operate on iterables that aren't :class:`set` instances, so repeated elements in the input will produce repeated elements in the output. Use :func:`unique_everseen` on the input to avoid generating duplicates: >>> seq = [1, 1, 0] >>> list(powerset(seq)) [(), (1,), (1,), (0,), (1, 1), (1, 0), (1, 0), (1, 1, 0)] >>> from more_itertools import unique_everseen >>> list(powerset(unique_everseen(seq))) [(), (1,), (0,), (1, 0)] c38K|]}t|VdSr])r)rirss r3rkzpowerset..vs-MMa|Aq11MMMMMMr4rl)r/rrJrangerm)r2rs @r3r r bsH& XA  MMMM5Q!;L;LMMM M MMr4c#Kt}|j}g}|j}|du}|D]H}|r ||n|} ||vr|||V&#t$r||vr|||VYEwxYwdS)a Yield unique elements, preserving order. >>> list(unique_everseen('AAAABBBCCDAABBB')) ['A', 'B', 'C', 'D'] >>> list(unique_everseen('ABBCcAD', str.lower)) ['A', 'B', 'C', 'D'] Sequences with a mix of hashable and unhashable items can be used. The function will be slower (i.e., `O(n^2)`) for unhashable items. Remember that ``list`` objects are unhashable - you can use the *key* parameter to transform the list to a tuple (which is hashable) to avoid a slowdown. >>> iterable = ([1, 2], [2, 3], [1, 2]) >>> list(unique_everseen(iterable)) # Slow [[1, 2], [2, 3]] >>> list(unique_everseen(iterable, key=tuple)) # Faster [[1, 2], [2, 3]] Similary, you may want to convert unhashable ``set`` objects with ``key=frozenset``. For ``dict`` objects, ``key=lambda x: frozenset(x.items())`` can be used. N)setaddappend TypeError) r2keyseenset seenset_addseenlist seenlist_adduse_keyelementks r3r,r,ys6eeG+KH?LoG  # 0CCLLL  A       Q    sA  A-,A-c ttttjdt ||S)zYields elements in order, ignoring serial duplicates >>> list(unique_justseen('AAAABBBCCDAABBB')) ['A', 'B', 'C', 'D', 'A', 'B'] >>> list(unique_justseen('ABBCcAD', str.lower)) ['A', 'B', 'C', 'A', 'D'] rl)r6r>rM itemgetterr)r2rs r3r-r-s3 tS,Q//31G1GHH I IIr4c#XK | |V |V #|$rYdSwxYw)aXYields results from a function repeatedly until an exception is raised. Converts a call-until-exception interface to an iterator interface. Like ``iter(func, sentinel)``, but uses an exception instead of a sentinel to end the loop. >>> l = [0, 1, 2] >>> list(iter_except(l.pop, IndexError)) [2, 1, 0] Nrt)rT exceptionfirsts r3rrs[  %''MMM $&&LLL       s  ))c>tt|||S)a Returns the first true value in the iterable. If no true value is found, returns *default* If *pred* is not None, returns the first item for which ``pred(item) == True`` . >>> first_true(range(10)) 1 >>> first_true(range(10), pred=lambda x: x > 5) 6 >>> first_true(range(10), default='missing', pred=lambda x: x > 9) 'missing' )r>filter)r2rArFs r3rrs" tX&& 0 00r4rl)r cRd|D|z}td|DS)aDraw an item at random from each of the input iterables. >>> random_product('abc', range(4), 'XYZ') # doctest:+SKIP ('c', 3, 'Z') If *repeat* is provided as a keyword argument, that many items will be drawn from each iterable. >>> random_product('abcd', range(4), repeat=2) # doctest:+SKIP ('a', 2, 'd', 3) This equivalent to taking a random selection from ``itertools.product(*args, **kwarg)``. c,g|]}t|SrtrKripools r3 z"random_product..s * * *TU4[[ * * *r4c34K|]}t|VdSr])rrs r3rkz!random_product..s(00$000000r4r)r rVpoolss r3r&r&s9 + *T * * *V 3E 00%000 0 00r4ct|}|t|n|}tt||S)abReturn a random *r* length permutation of the elements in *iterable*. If *r* is not specified or is ``None``, then *r* defaults to the length of *iterable*. >>> random_permutation(range(5)) # doctest:+SKIP (3, 4, 0, 1, 2) This equivalent to taking a random selection from ``itertools.permutations(iterable, r)``. )rKrmr)r2rrs r3r%r%s8 ??DYD AA a ! !!r4ct|t}ttt ||}tfd|DS)zReturn a random *r* length subsequence of the elements in *iterable*. >>> random_combination(range(5), 3) # doctest:+SKIP (2, 3, 4) This equivalent to taking a random selection from ``itertools.combinations(iterable, r)``. c3(K|] }|V dSr]rtriirs r3rkz%random_combination..'**Qa******r4)rKrmsortedrr)r2rr1indicesrs @r3r$r$s[ ??D D AVE!HHa(())G ****'*** * **r4ct|ttfdt|D}tfd|DS)aSReturn a random *r* length subsequence of elements in *iterable*, allowing individual elements to be repeated. >>> random_combination_with_replacement(range(3), 5) # doctest:+SKIP (0, 0, 1, 2, 2) This equivalent to taking a random selection from ``itertools.combinations_with_replacement(iterable, r)``. c36K|]}tVdSr])r)rirr1s r3rkz6random_combination_with_replacement..s)44aYq\\444444r4c3(K|] }|V dSr]rtrs r3rkz6random_combination_with_replacement..rr4)rKrmrr)r2rrr1rs @@r3r#r#sg ??D D A444458844444G ****'*** * **r4ct|}t|}|dks||krtd}t|||z }t d|dzD]}|||z |zz|z}|dkr||z }|dks||krt g}|rS||z|z|dz |dz }}}||kr||z}|||z z|z|dz }}||k||d|z |St|S)aEquivalent to ``list(combinations(iterable, r))[index]``. The subsequences of *iterable* that are of length *r* can be ordered lexicographically. :func:`nth_combination` computes the subsequence at sort position *index* directly, without computing the previous subsequences. >>> nth_combination(range(5), 3, 5) (0, 3, 4) ``ValueError`` will be raised If *r* is negative or greater than the length of *iterable*. ``IndexError`` will be raised if the given *index* is invalid. rrl)rKrm ValueErrorminr IndexErrorr) r2rindexrr1crrresults r3rr"s8 ??D D A A1q55 A Aq1u A 1a!e__!! QOq  qyy    uzz F $a%1*a!eQUa1qjj QJEA;!#QUqAqjj  d26l### $ ==r4c$t|g|S)aYield *value*, followed by the elements in *iterator*. >>> value = '0' >>> iterator = ['1', '2', '3'] >>> list(prepend(value, iterator)) ['0', '1', '2', '3'] To prepend multiple values, see :func:`itertools.chain` or :func:`value_chain`. )r)valuer?s r3r!r!Ls %( # ##r4c#HKt|ddd}t|}tdg||z}t|t d|dz D]A}||t ttj ||VBdS)aBConvolve the iterable *signal* with the iterable *kernel*. >>> signal = (1, 2, 3, 4, 5) >>> kernel = [3, 2, 1] >>> list(convolve(signal, kernel)) [3, 8, 14, 20, 26, 14, 5] Note: the input arguments are not interchangeable, as the *kernel* is immediately consumed and stored. Nrrr:rl) rKrmrrr rrEr6rMrN)signalkernelr1windowrus r3rr[s6]]44R4 F F A A3q ! ! !A %F 66!QU++ , ,55 a#hlFF3344444455r4)rr])NN)6__doc__rc collectionsr itertoolsrrrrrr r r r r rMrandomrrr__all__r+r)r*rrrrzr"rrrrrr'r[rr^ ImportErrorrr(rr r,r-rrr&r%r$r#rr!rrtr4r3rsE                        ,,,,,,,,,,   B % % % ''''$+++%+%+%+%+P 4 4 4 4 0 0 0!$$$$ ) ) ) ;;;... , , ,....6    )888888 000!(HHHH 3 3 3 3 222.>NNN.****Z J J J J    *1111("#11111(""""$ + + + +++"'''T $ $ $55555s'A==BBPK{5Z|`aFFTLib/site-packages/setuptools/_vendor/more_itertools/__pycache__/more.cpython-311.pycnuW+A b;dddlZddlmZmZmZmZddlmZddlm Z m Z m Z ddl m Z mZmZmZddlmZmZmZmZmZmZmZmZmZmZmZmZddlmZm Z m!Z!m"Z"ddl#m$Z$m%Z%dd l&m&Z&m'Z'm(Z(dd l)m*Z*m+Z+m,Z,m-Z-m.Z.dd l/m0Z0m1Z1dd l2m3Z3d dl4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:gdZ;e<Z=dzdZ>e=fdZ?e=fdZ@e=fdZAGddZBdZCdZDdZEdZFdZGd{dZHd|dZId}dZJdZKd~d ZLd!ZMdzd"ZNGd#d$ZOd}d%ZPd&ZQd'ZRd{d(ZSdd)ZTdzd*ZUdd,ZVdd-ZWdd.ZXdd/ZYd0ZZdd1Z[d|d2Z\d3Z]dd5Z^Gd6d7e_Z`d8Zad9Zbddd:d;Zcdd=Zdd>Zed?Zfegehffd@Zid}dAZjddBZkGdCdDejejlZmd|dEZndFZoepdfdGZqdHZrdIZsdJZtGdKdLZudMZvdNZwdOfdPZxe,fddQdRZyGdSdTeZzGdUdVZ{GdWdXZ|epfdYZ}dZZ~d>> list(chunked([1, 2, 3, 4, 5, 6], 3)) [[1, 2, 3], [4, 5, 6]] By the default, the last yielded list will have fewer than *n* elements if the length of *iterable* is not divisible by *n*: >>> list(chunked([1, 2, 3, 4, 5, 6, 7, 8], 3)) [[1, 2, 3], [4, 5, 6], [7, 8]] To use a fill-in value instead, see the :func:`grouper` recipe. If the length of *iterable* is not divisible by *n* and *strict* is ``True``, then ``ValueError`` will be raised before the last list is yielded. c3bKD](}t|krtd|V)dS)Nziterable is not divisible by n.len ValueError)chunkiteratorns uE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/more_itertools/more.pyretzchunked..retsI!  u::??$%FGGG   )iterrr1)iterablerstrictrrs ` @rr9r9~sf&GD!T(^^44b99H        CCEE{{rc tt|S#t$r%}|turt d||cYd}~Sd}~wwxYw)aReturn the first item of *iterable*, or *default* if *iterable* is empty. >>> first([0, 1, 2, 3]) 0 >>> first([], 'some default') 'some default' If *default* is not provided and there are no items in the iterable, raise ``ValueError``. :func:`first` is useful when you have a generator of expensive-to-retrieve values and want any arbitrary one. It is marginally shorter than ``next(iter(iterable), default)``. zKfirst() was called on an empty iterable, and no default value was provided.N)nextr StopIteration_markerr)rdefaultes rrIrIsr"DNN###  g  .  s A AA A cH t|tr|dSt|dr'tdkrt t |St |ddS#tttf$r|turtd|cYSwxYw)aReturn the last item of *iterable*, or *default* if *iterable* is empty. >>> last([0, 1, 2, 3]) 3 >>> last([], 'some default') 'some default' If *default* is not provided and there are no items in the iterable, raise ``ValueError``. __reversed__ir,maxlenzDlast() was called on an empty iterable, and no default was provided.) isinstancerhasattrr)rreversedr IndexError TypeErrorrrr)rrs rrSrSs h ) ) 1B<  X~ . . 1J*4L4L**++ +!,,,R0 0  = 1 g    sA-6A-A--1B! B!cFtt||dz|S)agReturn the nth or the last item of *iterable*, or *default* if *iterable* is empty. >>> nth_or_last([0, 1, 2, 3], 2) 2 >>> nth_or_last([0, 1], 2) 1 >>> nth_or_last([], 0, 'some default') 'some default' If *default* is not provided and there are no items in the iterable, raise ``ValueError``. r,r)rSr)rrrs rrYrYs% xQ'' 9 9 99rcFeZdZdZdZdZdZefdZdZ dZ dZ d Z d S) rbaWrap an iterator to allow lookahead and prepending elements. Call :meth:`peek` on the result to get the value that will be returned by :func:`next`. This won't advance the iterator: >>> p = peekable(['a', 'b']) >>> p.peek() 'a' >>> next(p) 'a' Pass :meth:`peek` a default value to return that instead of raising ``StopIteration`` when the iterator is exhausted. >>> p = peekable([]) >>> p.peek('hi') 'hi' peekables also offer a :meth:`prepend` method, which "inserts" items at the head of the iterable: >>> p = peekable([1, 2, 3]) >>> p.prepend(10, 11, 12) >>> next(p) 10 >>> p.peek() 11 >>> list(p) [11, 12, 1, 2, 3] peekables can be indexed. Index 0 is the item that will be returned by :func:`next`, index 1 is the item after that, and so on: The values up to the given index will be cached. >>> p = peekable(['a', 'b', 'c', 'd']) >>> p[0] 'a' >>> p[1] 'b' >>> next(p) 'a' Negative indexes are supported, but be aware that they will cache the remaining items in the source iterator, which may require significant storage. To check whether a peekable is exhausted, check its truth value: >>> p = peekable(['a', 'b']) >>> if p: # peekable has items ... list(p) ['a', 'b'] >>> if not p: # peekable is exhausted ... list(p) [] cTt||_t|_dSN)r_itr_cacheselfrs r__init__zpeekable.__init__$s>>gg rc|Srrs r__iter__zpeekable.__iter__( rcT |n#t$rYdSwxYwdSNFTpeekrrs r__bool__zpeekable.__bool__+=  IIKKKK   55 t  %%c|jsJ |jt|jn#t$r|t ur|cYSwxYw|jdS)zReturn the item that will be next returned from ``next()``. Return ``default`` if there are no items left. If ``default`` is not provided, raise ``StopIteration``. r)rappendrrrr)rrs rrz peekable.peek2st{   ""4>>2222    g%% {1~s,6AAcT|jt|dS)aStack up items to be the next ones returned from ``next()`` or ``self.peek()``. The items will be returned in first in, first out order:: >>> p = peekable([1, 2, 3]) >>> p.prepend(10, 11, 12) >>> next(p) 10 >>> list(p) [11, 12, 1, 2, 3] It is possible, by prepending items, to "resurrect" a peekable that previously raised ``StopIteration``. >>> p = peekable([]) >>> next(p) Traceback (most recent call last): ... StopIteration >>> p.prepend(1) >>> next(p) 1 >>> next(p) Traceback (most recent call last): ... StopIteration N)r extendleftr)ritemss rprependzpeekable.prependBs&: x/////rcj|jr|jSt|jSr)rpopleftrrrs r__next__zpeekable.__next__as. ; );&&(( (DH~~rcd|jdn|j}|dkr&|jdn|j}|jtn|j}n?|dkr*|jdn|j}|j t dz n|j}nt d|dks|dkr |j|jnptt||dzt}t|j}||kr0|jt|j||z t|j|S)Nr,rrzslice step cannot be zero) stepstartstopr*rrextendrminmaxrrlist)rindexrrrr cache_lens r _get_slicezpeekable._get_slicegs(Z'qqej !88+-AAEKE$z177 DD AXX ;.BBU[E&+j&8WHqLLuzDD899 9 AII4!88 K  tx ( ( ( (Ct$$q('22ADK((II~~ ""6$(A M#B#BCCCDK  ''rcVt|tr||St|j}|dkr |j|jn9||kr3|jt|j|dz|z |j|SNrr,)rslicerrrrrr)rrrs r __getitem__zpeekable.__getitem__s eU # # *??5)) ) $$ 199 K  tx ( ( ( ( i   K  vdh I0EFF G G G{5!!rN) __name__ __module__ __qualname____doc__rrrrrrrrrrrrrbrbs88t# 000> (((4 " " " " "rrbcNtjdtt|i|S)aReturn a sorted merge of the items from each of several already-sorted *iterables*. >>> list(collate('ACDZ', 'AZ', 'JKL')) ['A', 'A', 'C', 'D', 'J', 'K', 'L', 'Z', 'Z'] Works lazily, keeping only the next value from each iterable in memory. Use :func:`collate` to, for example, perform a n-way mergesort of items that don't fit in memory. If a *key* function is specified, the iterables will be sorted according to its result: >>> key = lambda s: int(s) # Sort by numeric value, not by string >>> list(collate(['1', '10'], ['2', '11'], key=key)) ['1', '2', '10', '11'] If the *iterables* are sorted in descending order, set *reverse* to ``True``: >>> list(collate([5, 3, 1], [4, 2, 0], reverse=True)) [5, 4, 3, 2, 1, 0] If the elements of the passed-in iterables are out of order, you might get unexpected results. On Python 3.5+, this function is an alias for :func:`heapq.merge`. z MF ) &v & &&rc<tfd}|S)abDecorator that automatically advances a PEP-342-style "reverse iterator" to its first yield point so you don't have to call ``next()`` on it manually. >>> @consumer ... def tally(): ... i = 0 ... while True: ... print('Thing number %s is %s.' % (i, (yield))) ... i += 1 ... >>> t = tally() >>> t.send('red') Thing number 0 is red. >>> t.send('fish') Thing number 1 is fish. Without the decorator, you would have to call ``next(t)`` before ``t.send()`` could be used. c6|i|}t||Sr)r)argsrgenfuncs rwrapperzconsumer..wrappers'dD#F## S  r)r )rrs` rr>r>s5. 4[[[ Nrczt}tt||dt|S)zReturn the number of items in *iterable*. >>> ilen(x for x in range(1000000) if x % 3 == 0) 333334 This consumes the iterable, so handle with care. rr)rrzipr)rcounters rrKrKs6ggG #h ++++ ==rc#(K |V||})zReturn ``start``, ``func(start)``, ``func(func(start))``, ... >>> from itertools import islice >>> list(islice(iterate(lambda x: 2*x, 1), 10)) [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] r)rrs rrPrPs& U rc#PK|5}|Ed{VddddS#1swxYwYdS)a:Wrap an iterable in a ``with`` statement, so it closes once exhausted. For example, this will close the file when the iterator is exhausted:: upper_lines = (line.upper() for line in with_iter(open('foo'))) Any context manager which returns an iterable is a candidate for ``with_iter``. Nr)context_managerrs rr|r|s Hs ct|} t|}n$#t$r}|ptd|d}~wwxYw t|}d||}|pt|#t$rYnwxYw|S)aReturn the first item from *iterable*, which is expected to contain only that item. Raise an exception if *iterable* is empty or has more than one item. :func:`one` is useful for ensuring that an iterable contains only one item. For example, it can be used to retrieve the result of a database query that is expected to return a single row. If *iterable* is empty, ``ValueError`` will be raised. You may specify a different exception with the *too_short* keyword: >>> it = [] >>> one(it) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: too many items in iterable (expected 1)' >>> too_short = IndexError('too few items') >>> one(it, too_short=too_short) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... IndexError: too few items Similarly, if *iterable* contains more than one item, ``ValueError`` will be raised. You may specify a different exception with the *too_long* keyword: >>> it = ['too', 'many'] >>> one(it) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: Expected exactly one item in iterable, but got 'too', 'many', and perhaps more. >>> too_long = RuntimeError >>> one(it, too_long=too_long) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... RuntimeError Note that :func:`one` attempts to advance *iterable* twice to ensure there is only one item. See :func:`spy` or :func:`peekable` to check iterable contents less destructively. z&too few items in iterable (expected 1)NLExpected exactly one item in iterable, but got {!r}, {!r}, and perhaps more.)rrrrformat)r too_shorttoo_longit first_valuer second_valuemsgs rr]r]sX hB2hh   M$LMM  *Bxx  &{L A A )*S//)       s$! A=AA<< B B cfd}d}t|}t||}d|cxkrkr nn|kr ||n |||St|rdndS)aYield successive distinct permutations of the elements in *iterable*. >>> sorted(distinct_permutations([1, 0, 1])) [(0, 1, 1), (1, 0, 1), (1, 1, 0)] Equivalent to ``set(permutations(iterable))``, except duplicates are not generated and thrown away. For larger input sequences this is much more efficient. Duplicate permutations arise when there are duplicated elements in the input iterable. The number of items returned is `n! / (x_1! * x_2! * ... * x_n!)`, where `n` is the total number of items input, and each `x_i` is the count of a distinct item in the input sequence. If *r* is given, only the *r*-length permutations are yielded. >>> sorted(distinct_permutations([1, 0, 1], r=2)) [(0, 1), (1, 0), (1, 1)] >>> sorted(distinct_permutations(range(3), r=2)) [(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)] c3>K t|Vtdz ddD]}||||dzkrndStdz |dD]}||||krn||||c||<||<|d|z d||dzd<)NTrr,)tuplerange)Aijsizes r_fullz$distinct_permutations.._full]s ,((NNN4!8R,,  Q4!AE(??E#4!8Q++  Q4!A$;;E 1qtJAaD!A$?QX?+Aa!eggJ) ,rc34K|d|||d}}t|dz dd}tt|} t|V|d}|D]}|||krn ||}dS|D]-}||||kr||||c||<||<n1.|D]-}||||kr||||c||<||<n.||d||z dz }|dz }|d||z |||z dc||d<|dd<)Nr,r)rrr) rrheadtailright_head_indexesleft_tail_indexespivotrrs r_partialz'distinct_permutations.._partialusrrUAabbEd"1q5"b11!#d)),, =++   HE'  7U??EQ'  7T!W$$'+AwQ$DGT!WE% ,AAwa((+/7DG(Qa) D1q52& &D FA $Wq1uW tAEGG} DHd111g? =rNrr)r)sortedrr)rrrrrrs @rrDrDDs2,,,,,0%=%=%=N 8  E u::Dy 1}}}}}}}}} !T uuU|||0B0BB a"U # ##rc(|dkrtd|dkr,ttt||ddSt|g}t ||}t tt||ddS)a6Intersperse filler element *e* among the items in *iterable*, leaving *n* items between each filler element. >>> list(intersperse('!', [1, 2, 3, 4, 5])) [1, '!', 2, '!', 3, '!', 4, '!', 5] >>> list(intersperse(None, [1, 2, 3, 4, 5], n=2)) [1, 2, None, 3, 4, None, 5] rz n must be > 0r,N)rrrMrr9r.)rrrfillerchunkss rrNrNs Avv))) ajH55q$??? 1%%vj88!TBBCCCrcd|D}ttjtt|fdDfd|DS)aReturn the elements from each of the input iterables that aren't in the other input iterables. For example, suppose you have a set of packages, each with a set of dependencies:: {'pkg_1': {'A', 'B'}, 'pkg_2': {'B', 'C'}, 'pkg_3': {'B', 'D'}} If you remove one package, which dependencies can also be removed? If ``pkg_1`` is removed, then ``A`` is no longer necessary - it is not associated with ``pkg_2`` or ``pkg_3``. Similarly, ``C`` is only needed for ``pkg_2``, and ``D`` is only needed for ``pkg_3``:: >>> unique_to_each({'A', 'B'}, {'B', 'C'}, {'B', 'D'}) [['A'], ['C'], ['D']] If there are duplicates in one input iterable that aren't in the others they will be duplicated in the output. Input order is preserved:: >>> unique_to_each("mississippi", "missouri") [['p', 'p'], ['o', 'u', 'r']] It is assumed that the elements of each iterable are hashable. c,g|]}t|Sr)r).0rs r z"unique_to_each..s ) ) )DHH ) ) )rc,h|]}|dk|Sr,r)r elementcountss r z!unique_to_each..s'EEE7w10D0Dw0D0D0DrcTg|]$}ttj|%Sr)rfilter __contains__)r runiquess rr z"unique_to_each..s. B B BrD,b11 2 2 B B Br)rr from_iterablemapset)rpoolrrs @@rryrysl6 * )y ) ) )D U(S$88 9 9FEEEEfEEEG B B B BT B B BBrc #K|dkrtd|dkrtVdS|dkrtdt|}|}t|j|D]}|dz}|s|}t|Vt |}||kr2tt |t|||z VdSd|cxkrt||kr ndS||f|zz }t|VdSdS)aMReturn a sliding window of width *n* over the given iterable. >>> all_windows = windowed([1, 2, 3, 4, 5], 3) >>> list(all_windows) [(1, 2, 3), (2, 3, 4), (3, 4, 5)] When the window is larger than the iterable, *fillvalue* is used in place of missing values: >>> list(windowed([1, 2, 3], 4)) [(1, 2, 3, None)] Each window will advance in increments of *step*: >>> list(windowed([1, 2, 3, 4, 5, 6], 3, fillvalue='!', step=2)) [(1, 2, 3), (3, 4, 5), (5, 6, '!')] To slide into the iterable's items, use :func:`chain` to add filler items to the left: >>> iterable = [1, 2, 3, 4] >>> n = 3 >>> padding = [None] * (n - 1) >>> list(windowed(chain(padding, iterable), 3)) [(None, None, 1), (None, 1, 2), (1, 2, 3), (2, 3, 4)] rn must be >= 0Nr,zstep must be >= 1r) rrrrrrrrr)seqr fillvaluerwindowr_rs rr{r{sM6 1uu)***Avvgg  axx,--- !___F A  $ $   Q A--    v;;D axxE&&AH"="=>>??????? Q    T1      9,""Fmm  rc#Kg}t|D]}|||fVt|}t|}t d|dzD])}t ||z dzD]}||||zV*dS)aFYield all of the substrings of *iterable*. >>> [''.join(s) for s in substrings('more')] ['m', 'o', 'r', 'e', 'mo', 'or', 're', 'mor', 'ore', 'more'] Note that non-string iterables can also be subdivided. >>> list(substrings([0, 1, 2])) [(0,), (1,), (2,), (0, 1), (1, 2), (0, 1, 2)] rr,N)rrrrr)rritem item_countrrs rrvrvs CX 4g **CSJ1j1n % %!!zA~)** ! !Aa!a%i.  !!!rctdtdz}|rt|}fd|DS)a@Yield all substrings and their positions in *seq* The items yielded will be a tuple of the form ``(substr, i, j)``, where ``substr == seq[i:j]``. This function only works for iterables that support slicing, such as ``str`` objects. >>> for item in substrings_indexes('more'): ... print(item) ('m', 0, 1) ('o', 1, 2) ('r', 2, 3) ('e', 3, 4) ('mo', 0, 2) ('or', 1, 3) ('re', 2, 4) ('mor', 0, 3) ('ore', 1, 4) ('more', 0, 4) Set *reverse* to ``True`` to yield the same items in the opposite order. r,c3K|]<}tt|z dzD]}|||z|||zfV=dSr,N)rr)r Lrrs r z%substrings_indexes..Msv  '(uSXX\A=M7N7N  23QQYAE"       r)rrr)rreversers` rrwrw0s\4 aSAA QKK    ,-   rc2eZdZdZddZdZdZdZdZdS) r7aWrap *iterable* and return an object that buckets it iterable into child iterables based on a *key* function. >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character >>> sorted(list(s)) # Get the keys ['a', 'b', 'c'] >>> a_iterable = s['a'] >>> next(a_iterable) 'a1' >>> next(a_iterable) 'a2' >>> list(s['b']) ['b1', 'b2', 'b3'] The original iterable will be advanced and its items will be cached until they are used by the child iterables. This may require significant storage. By default, attempting to select a bucket to which no items belong will exhaust the iterable and cache all values. If you specify a *validator* function, selected buckets will instead be checked against it. >>> from itertools import count >>> it = count(1, 2) # Infinite sequence of odd numbers >>> key = lambda x: x % 10 # Bucket by last digit >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only >>> s = bucket(it, key=key, validator=validator) >>> 2 in s False >>> list(s[2]) [] Nct||_||_tt|_|pd|_dS)NcdSNTrxs rz!bucket.__init__..zs$r)rr_keyrrr _validator)rrkey validators rrzbucket.__init__vs7>> !%(( #7rc||sdS t||}|j||n#t$rYdSwxYwdSr)r/rr appendleftr)rvaluers rrzbucket.__contains__|s|u%% 5 0U $$D K  ) )$ / / / /   55  tsA AAc#dK |j|r"|j|Vn~ t|j}n#t$rYdSwxYw||}||kr|Vn6||r |j||})z Helper to yield items from the parent iterator that match *value*. Items that don't match are stored in the local cache as they are encountered. TN)rrrrrr.r/r)rr4r item_values r _get_valueszbucket._get_valuess  ={5! =k%(00222222 =#DH~~(!%4J!U**" 44= J/66t<<< = =sA AAc#K|jD]L}||}||r |j||M|jEd{VdSr)rr.r/rrkeys)rrr6s rrzbucket.__iter__sH 5 5D4Jz** 5 J'..t444;##%%%%%%%%%%%rct||stdS||S)Nr)r/rr7rr4s rrzbucket.__getitem__s5u%% 88O&&&rr) rrrrrrr7rrrrrr7r7Rso!!F8888   ===4&&&'''''rr7ct|}t||}|t||fS)aReturn a 2-tuple with a list containing the first *n* elements of *iterable*, and an iterator with the same items as *iterable*. This allows you to "look ahead" at the items in the iterable without advancing it. There is one item in the list by default: >>> iterable = 'abcdefg' >>> head, iterable = spy(iterable) >>> head ['a'] >>> list(iterable) ['a', 'b', 'c', 'd', 'e', 'f', 'g'] You may use unpacking to retrieve items instead of lists: >>> (head,), iterable = spy('abcdefg') >>> head 'a' >>> (first, second), iterable = spy('abcdefg', 2) >>> first 'a' >>> second 'b' The number of items requested can be larger than the number of items in the iterable: >>> iterable = [1, 2, 3, 4, 5] >>> head, iterable = spy(iterable, 10) >>> head [1, 2, 3, 4, 5] >>> list(iterable) [1, 2, 3, 4, 5] )rr1copyr)rrrrs rrsrss8J hB 2;;D 99;;dB ''rc8tjt|S)a4Return a new iterable yielding from each iterable in turn, until the shortest is exhausted. >>> list(interleave([1, 2, 3], [4, 5], [6, 7, 8])) [1, 4, 6, 2, 5, 7] For a version that doesn't terminate after the shortest iterable is exhausted, see :func:`interleave_longest`. )rrr)rs rrMrMs  sI / //rc`tjt|dti}d|DS)asReturn a new iterable yielding from each iterable in turn, skipping any that are exhausted. >>> list(interleave_longest([1, 2, 3], [4, 5], [6, 7, 8])) [1, 4, 6, 2, 5, 7, 3, 8] This function produces the same output as :func:`roundrobin`, but may perform better for some inputs (in particular when the number of iterables is large). rc3,K|]}|tu |VdSr)r)r r,s rr%z%interleave_longest..s, - -!AW,,A,,,, - -r)rrrr)rrs rrLrLs5 KFgFFGGA - -q - - --rc#BKfd|dEd{VdS)a>Flatten an iterable with multiple levels of nesting (e.g., a list of lists of tuples) into non-iterable types. >>> iterable = [(1, 2), ([3, 4], [[5], [6]])] >>> list(collapse(iterable)) [1, 2, 3, 4, 5, 6] Binary and text strings are not considered iterable and will not be collapsed. To avoid collapsing other types, specify *base_type*: >>> iterable = ['ab', ('cd', 'ef'), ['gh', 'ij']] >>> list(collapse(iterable, base_type=tuple)) ['ab', ('cd', 'ef'), 'gh', 'ij'] Specify *levels* to stop flattening after a certain level: >>> iterable = [('a', ['b']), ('c', ['d'])] >>> list(collapse(iterable)) # Fully flattened ['a', 'b', 'c', 'd'] >>> list(collapse(iterable, levels=1)) # Only one level flattened ['a', ['b'], 'c', ['d']] c3K|ks.t|ttfst|r|VdS t|}|D]}||dzEd{VdS#t$r|VYdSwxYwNr,)rstrbytesrr)nodeleveltreechild base_typelevelswalks rrLzcollapse..walks uv~~$e --(6&JtY,G,G&JJJ F 2::D  2 24uqy1111111111 2 2    JJJ FF sA,,A>=A>rNr)rrJrKrLs ``@rr;r;sX62222222$tHa           rc#K | |||D]}|||Vn&t||D]}|||Ed{V| |dSdS#| |wwxYw)auInvoke *func* on each item in *iterable* (or on each *chunk_size* group of items) before yielding the item. `func` must be a function that takes a single argument. Its return value will be discarded. *before* and *after* are optional functions that take no arguments. They will be executed before iteration starts and after it ends, respectively. `side_effect` can be used for logging, updating progress bars, or anything that is not functionally "pure." Emitting a status message: >>> from more_itertools import consume >>> func = lambda item: print('Received {}'.format(item)) >>> consume(side_effect(func, range(2))) Received 0 Received 1 Operating on chunks of items: >>> pair_sums = [] >>> func = lambda chunk: pair_sums.append(sum(chunk)) >>> list(side_effect(func, [0, 1, 2, 3, 4, 5], 2)) [0, 1, 2, 3, 4, 5] >>> list(pair_sums) [1, 5, 9] Writing to a file-like object: >>> from io import StringIO >>> from more_itertools import consume >>> f = StringIO() >>> func = lambda x: print(x, file=f) >>> before = lambda: print(u'HEADER', file=f) >>> after = f.close >>> it = [u'a', u'b', u'c'] >>> consume(side_effect(func, it, before=before, after=after)) >>> f.closed True N)r9)rr chunk_sizebeforeafterrrs rrkrk+sX   FHHH     T   !:66 ! !U            EGGGGG  5  EGGGG s A AA,cttfdtdD|rfd}t|SS)apYield slices of length *n* from the sequence *seq*. >>> list(sliced((1, 2, 3, 4, 5, 6), 3)) [(1, 2, 3), (4, 5, 6)] By the default, the last yielded slice will have fewer than *n* elements if the length of *seq* is not divisible by *n*: >>> list(sliced((1, 2, 3, 4, 5, 6, 7, 8), 3)) [(1, 2, 3), (4, 5, 6), (7, 8)] If the length of *seq* is not divisible by *n* and *strict* is ``True``, then ``ValueError`` will be raised before the last slice is yielded. This function will only work for iterables that support slicing. For non-sliceable iterables, see :func:`chunked`. c32K|]}||zVdSrr)r rrrs rr%zsliced..|s/CC!s1q1u9~CCCCCCrrc3bKD](}t|krtd|V)dS)Nzseq is not divisible by n.r)_slicerrs rrzsliced..retsK"  v;;!##$%ABBB   r)rrrr)rrrrrs`` @rrlrlhsu(CCCCCuQ{{CCCDDH        CCEE{{rrc# K|dkrt|VdSg}t|}|D]O}||r-|V|r|gV|dkrt|VdSg}|dz}:||P|VdS)a<Yield lists of items from *iterable*, where each list is delimited by an item where callable *pred* returns ``True``. >>> list(split_at('abcdcba', lambda x: x == 'b')) [['a'], ['c', 'd', 'c'], ['a']] >>> list(split_at(range(10), lambda n: n % 2 == 1)) [[0], [2], [4], [6], [8], []] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_at(range(10), lambda n: n % 2 == 1, maxsplit=2)) [[0], [2], [4, 5, 6, 7, 8, 9]] By default, the delimiting items are not included in the output. The include them, set *keep_separator* to ``True``. >>> list(split_at('abcdcba', lambda x: x == 'b', keep_separator=True)) [['a'], ['b'], ['c', 'd', 'c'], ['b'], ['a']] rNr,rrr)rpredmaxsplitkeep_separatorbufrrs rrnrns.1}}8nn C hB   4:: III f 1}}2hhC MHH JJt     IIIIIrc#K|dkrt|VdSg}t|}|D]M}||r+|r)|V|dkr|gt|zVdSg}|dz}||N|r|VdSdS)a\Yield lists of items from *iterable*, where each list ends just before an item for which callable *pred* returns ``True``: >>> list(split_before('OneTwo', lambda s: s.isupper())) [['O', 'n', 'e'], ['T', 'w', 'o']] >>> list(split_before(range(10), lambda n: n % 3 == 0)) [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_before(range(10), lambda n: n % 3 == 0, maxsplit=2)) [[0, 1, 2], [3, 4, 5], [6, 7, 8, 9]] rNr,rVrrWrXrZrrs rrprps 1}}8nn C hB 4:: # III1}}ftBxx''''C MH 4  rc#K|dkrt|VdSg}t|}|D]I}||||r'|r%|V|dkrt|VdSg}|dz}J|r|VdSdS)a[Yield lists of items from *iterable*, where each list ends with an item where callable *pred* returns ``True``: >>> list(split_after('one1two2', lambda s: s.isdigit())) [['o', 'n', 'e', '1'], ['t', 'w', 'o', '2']] >>> list(split_after(range(10), lambda n: n % 3 == 0)) [[0], [1, 2, 3], [4, 5, 6], [7, 8, 9]] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_after(range(10), lambda n: n % 3 == 0, maxsplit=2)) [[0], [1, 2, 3], [4, 5, 6, 7, 8, 9]] rNr,rVr\s rroros"1}}8nn C hB 4 4:: # III1}}2hhC MH  rc#NK|dkrt|VdSt|} t|}n#t$rYdSwxYw|g}|D]N}|||r)|V|dkr|gt|zVdSg}|dz}|||}O|VdS)aSplit *iterable* into pieces based on the output of *pred*. *pred* should be a function that takes successive pairs of items and returns ``True`` if the iterable should be split in between them. For example, to find runs of increasing numbers, split the iterable when element ``i`` is larger than element ``i + 1``: >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], lambda x, y: x > y)) [[1, 2, 3, 3], [2, 5], [2, 4], [2]] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], ... lambda x, y: x > y, maxsplit=2)) [[1, 2, 3, 3], [2, 5], [2, 4, 2]] rNr,)rrrrr)rrWrXrcur_itemrZ next_items rrqrqs&1}}8nn hB88  *C   4) $ $ III1}} kDHH,,,,C MH 9 IIIIIs< A  A c#Kt|}|D]7}|t|VdStt||V8dS)aYield a list of sequential items from *iterable* of length 'n' for each integer 'n' in *sizes*. >>> list(split_into([1,2,3,4,5,6], [1,2,3])) [[1], [2, 3], [4, 5, 6]] If the sum of *sizes* is smaller than the length of *iterable*, then the remaining items of *iterable* will not be returned. >>> list(split_into([1,2,3,4,5,6], [2,3])) [[1, 2], [3, 4, 5]] If the sum of *sizes* is larger than the length of *iterable*, fewer items will be returned in the iteration that overruns *iterable* and further lists will be empty: >>> list(split_into([1,2,3,4], [1,2,3,4])) [[1], [2, 3], [4], []] When a ``None`` object is encountered in *sizes*, the returned list will contain items up to the end of *iterable* the same way that itertools.slice does: >>> list(split_into([1,2,3,4,5,6,7,8,9,0], [2,3,None])) [[1, 2], [3, 4, 5], [6, 7, 8, 9, 0]] :func:`split_into` can be useful for grouping a series of items where the sizes of the groups are not uniform. An example would be where in a row from a table, multiple columns represent elements of the same feature (e.g. a point represented by x,y,z) but, the format is not the same for all columns. N)rrr)rsizesrrs rrrrr*siF hB)) <r((NNN FFvb$''(( ( ( ( ( ))rc# Kt|}|%t|t|Ed{VdS|dkrtdd}|D] }|V|dz } |r||z |zn||z }t |D]}|VdS)aYield the elements from *iterable*, followed by *fillvalue*, such that at least *n* items are emitted. >>> list(padded([1, 2, 3], '?', 5)) [1, 2, 3, '?', '?'] If *next_multiple* is ``True``, *fillvalue* will be emitted until the number of items emitted is a multiple of *n*:: >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True)) [1, 2, 3, 4, None, None] If *n* is ``None``, *fillvalue* will be emitted indefinitely. Nr,n must be at least 1r)rrrrr) rrr next_multiplerr r remainingrs rr_r_Ws hByVI../////////// Q/000   DJJJ !OJJ,9MQ^q((q:~ y!!  AOOOO  rc#nKt}|D]}|V|tur|n|}t|Ed{VdS)a"After the *iterable* is exhausted, keep yielding its last element. >>> list(islice(repeat_last(range(3)), 5)) [0, 1, 2, 2, 2] If the iterable is empty, yield *default* forever:: >>> list(islice(repeat_last(range(0), 42), 5)) [42, 42, 42, 42, 42] N)rr)rrrfinals rrcrcws\ D wGGDEe}}rcdkrtdt|}fdt|DS)aDistribute the items from *iterable* among *n* smaller iterables. >>> group_1, group_2 = distribute(2, [1, 2, 3, 4, 5, 6]) >>> list(group_1) [1, 3, 5] >>> list(group_2) [2, 4, 6] If the length of *iterable* is not evenly divisible by *n*, then the length of the returned iterables will not be identical: >>> children = distribute(3, [1, 2, 3, 4, 5, 6, 7]) >>> [list(c) for c in children] [[1, 4, 7], [2, 5], [3, 6]] If the length of *iterable* is smaller than *n*, then the last returned iterables will be empty: >>> children = distribute(5, [1, 2, 3]) >>> [list(c) for c in children] [[1], [2], [3], [], []] This function uses :func:`itertools.tee` and may require significant storage. If you need the order items in the smaller iterables to match the original iterable, see :func:`divide`. r,rdc:g|]\}}t||dSr)r)r rrrs rr zdistribute..s+ L L L95"F2udA & & L L Lr)rr enumerate)rrchildrens` rrErEsN8 1uu/0008QH L L L L (8K8K L L LLrrrr,cXt|t|}t||||dS)a[Yield tuples whose elements are offset from *iterable*. The amount by which the `i`-th item in each tuple is offset is given by the `i`-th item in *offsets*. >>> list(stagger([0, 1, 2, 3])) [(None, 0, 1), (0, 1, 2), (1, 2, 3)] >>> list(stagger(range(8), offsets=(0, 2, 4))) [(0, 2, 4), (1, 3, 5), (2, 4, 6), (3, 5, 7)] By default, the sequence will end when the final element of a tuple is the last item in the iterable. To continue until the first element of a tuple is the last item in the iterable, set *longest* to ``True``:: >>> list(stagger([0, 1, 2, 3], longest=True)) [(None, 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, None), (3, None, None)] By default, ``None`` will be used to replace offsets beyond the end of the sequence. Specify *fillvalue* to use some other value. )offsetslongestr)rrr)rrorprrls rrtrts9*8S\\**H  7Gy   rc eZdZdfd ZxZS)r}Ncld}| |dj|z }t|dS)Nz Iterables have different lengthsz/: index 0 has length {}; index {} has length {})rsuperr)rdetailsr __class__s rrzUnequalIterablesError.__init__sI0   MEM C rr)rrrr __classcell__)rus@rr}r}s=rr}c#rKt|dtiD]"}|D]}|turt|V#dS)Nr)rrr})rcombovals r_zip_equal_generatorrzs`i;7;; . .Cg~~+--- rcXtdkrtjdt t |d}t |dddD]\}}t |}||krn t |St|||f#t$rt|cYSwxYw)a ``zip`` the input *iterables* together, but raise ``UnequalIterablesError`` if they aren't all the same length. >>> it_1 = range(3) >>> it_2 = iter('abc') >>> list(zip_equal(it_1, it_2)) [(0, 'a'), (1, 'b'), (2, 'c')] >>> it_1 = range(3) >>> it_2 = iter('abcd') >>> list(zip_equal(it_1, it_2)) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... more_itertools.more.UnequalIterablesError: Iterables have different lengths i zwzip_equal will be removed in a future version of more-itertools. Use the builtin zip function with strict=True instead.rr,N)rt) r)rrrrrkrr}rrz)r first_sizerrrs rr~r~s$Y '     /1&& y}a00 # #EArr77Dz!!" ? "$ZD,ABBBB ///#I...../sAB :B B)(B))rprc t|t|krtdg}t||D]~\}}|dkr3|t t || |>|dkr%|t ||di|||r t|d|iSt|S)aF``zip`` the input *iterables* together, but offset the `i`-th iterable by the `i`-th item in *offsets*. >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1))) [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e')] This can be used as a lightweight alternative to SciPy or pandas to analyze data sets in which some series have a lead or lag relationship. By default, the sequence will end when the shortest iterable is exhausted. To continue until the longest iterable is exhausted, set *longest* to ``True``. >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1), longest=True)) [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e'), (None, 'f')] By default, ``None`` will be used to replace offsets beyond the end of the sequence. Specify *fillvalue* to use some other value. z,Number of iterables and offsets didn't matchrNr)rrrrrrrr)rorprr staggeredrrs rrr s* 9~~W%%GHHHIY((!!A q55   U6)aR#8#8"== > > > > UU   VB400 1 1 1 1   R <I;;;;  ?rrc  t|}n@t|}t|dkr|dfd}nt|fd}ttt t|||S)aReturn the input iterables sorted together, with *key_list* as the priority for sorting. All iterables are trimmed to the length of the shortest one. This can be used like the sorting function in a spreadsheet. If each iterable represents a column of data, the key list determines which columns are used for sorting. By default, all iterables are sorted using the ``0``-th iterable:: >>> iterables = [(4, 3, 2, 1), ('a', 'b', 'c', 'd')] >>> sort_together(iterables) [(1, 2, 3, 4), ('d', 'c', 'b', 'a')] Set a different key list to sort according to another iterable. Specifying multiple keys dictates how ties are broken:: >>> iterables = [(3, 1, 2), (0, 1, 0), ('c', 'b', 'a')] >>> sort_together(iterables, key_list=(1, 2)) [(2, 3, 1), (0, 0, 1), ('a', 'c', 'b')] To sort by a function of the elements of the iterable, pass a *key* function. Its arguments are the elements of the iterables corresponding to the key list:: >>> names = ('a', 'b', 'c') >>> lengths = (1, 2, 3) >>> widths = (5, 2, 1) >>> def area(length, width): ... return length * width >>> sort_together([names, lengths, widths], key_list=(1, 2), key=area) [('c', 'b', 'a'), (3, 2, 1), (1, 2, 5)] Set *reverse* to ``True`` to sort in descending order. >>> sort_together([(1, 2, 3), ('c', 'b', 'a')], reverse=True) [(3, 2, 1), ('a', 'b', 'c')] Nr,rc&|Srr) zipped_itemsr0 key_offsets rr-zsort_together..esL4L0M0Mrc |Srr)r get_key_itemsr0s rr-zsort_together..js|,,1r)r0r&)r$rrrr)rkey_listr0r& key_argumentrrs ` @@rrmrm1sP {"8, >> x==A  "!JMMMMMLL'1ML  VCOw G G GH  rctt|\}}|sdS|d}t|t|}dt fdt |DS)aThe inverse of :func:`zip`, this function disaggregates the elements of the zipped *iterable*. The ``i``-th iterable contains the ``i``-th element from each element of the zipped iterable. The first element is used to to determine the length of the remaining elements. >>> iterable = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] >>> letters, numbers = unzip(iterable) >>> list(letters) ['a', 'b', 'c', 'd'] >>> list(numbers) [1, 2, 3, 4] This is similar to using ``zip(*iterable)``, but it avoids reading *iterable* into memory. Note, however, that this function uses :func:`itertools.tee` and thus may require significant storage. rrcfd}|S)Nc@ |S#t$rtwxYwr)rr)objrs rgetterz)unzip..itemgetter..getters4 $1v  $ $ $$# $s r)rrs` rr$zunzip..itemgetters# $ $ $ $ $ rc3PK|] \}}t||V!dSrr)r rrr$s rr%zunzip..s9JJEArZZ]]B''JJJJJJr)rsrrrrrk)rrrr$s @rrzrzss(h((ND( r 7DHc$ii((I$ JJJJYy5I5IJJJ J JJrcv|dkrtd |dd|}n#t$rt|}YnwxYwtt ||\}}g}d}t d|dzD]>}|}|||kr|dzn|z }|t|||?|S)aDivide the elements from *iterable* into *n* parts, maintaining order. >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6]) >>> list(group_1) [1, 2, 3] >>> list(group_2) [4, 5, 6] If the length of *iterable* is not evenly divisible by *n*, then the length of the returned iterables will not be identical: >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7]) >>> [list(c) for c in children] [[1, 2, 3], [4, 5], [6, 7]] If the length of the iterable is smaller than n, then the last returned iterables will be empty: >>> children = divide(5, [1, 2, 3]) >>> [list(c) for c in children] [[1], [2], [3], [], []] This function will exhaust the iterable before returning and may require significant storage. If order is not important, see :func:`distribute`, which does not first pull the iterable into memory. r,rdNr)rrrdivmodrrrr) rrrqrrrrrs rrFrFs: 1uu/000!  Hoo #c((A  DAq C D 1a!e__** aAQ& 4E$J(()))) Js $AAc|tdS| t||rt|fS t|S#t$rt|fcYSwxYw)axIf *obj* is iterable, return an iterator over its items:: >>> obj = (1, 2, 3) >>> list(always_iterable(obj)) [1, 2, 3] If *obj* is not iterable, return a one-item iterable containing *obj*:: >>> obj = 1 >>> list(always_iterable(obj)) [1] If *obj* is ``None``, return an empty iterable: >>> obj = None >>> list(always_iterable(None)) [] By default, binary and text strings are not considered iterable:: >>> obj = 'foo' >>> list(always_iterable(obj)) ['foo'] If *base_type* is set, objects for which ``isinstance(obj, base_type)`` returns ``True`` won't be considered iterable. >>> obj = {'a': 1} >>> list(always_iterable(obj)) # Iterate over the dict's keys ['a'] >>> list(always_iterable(obj, base_type=dict)) # Treat dicts as a unit [{'a': 1}] Set *base_type* to ``None`` to avoid any special handling and treat objects Python considers iterable as iterable: >>> obj = 'foo' >>> list(always_iterable(obj, base_type=None)) ['f', 'o', 'o'] Nr)rrr)rrJs rr5r5sxR {Bxx:c9#=#=SF||Cyy SF||sAA! A!c |dkrtdt|\}}dg|z}t|t|||}ttt |d|zdz}t ||S)asReturn an iterable over `(bool, item)` tuples where the `item` is drawn from *iterable* and the `bool` indicates whether that item satisfies the *predicate* or is adjacent to an item that does. For example, to find whether items are adjacent to a ``3``:: >>> list(adjacent(lambda x: x == 3, range(6))) [(False, 0), (False, 1), (True, 2), (True, 3), (True, 4), (False, 5)] Set *distance* to change what counts as adjacent. For example, to find whether items are two places away from a ``3``: >>> list(adjacent(lambda x: x == 3, range(6), distance=2)) [(False, 0), (True, 1), (True, 2), (True, 3), (True, 4), (True, 5)] This is useful for contextualizing the results of a search function. For example, a code comparison tool might want to identify lines that have changed, but also surrounding lines to give the viewer of the diff context. The predicate function will only be called once for each item in the iterable. See also :func:`groupby_transform`, which can be used with this function to group ranges of items with the same `bool` value. rzdistance must be at least 0Frr,)rrrranyr{r) predicaterdistancei1i2paddingselectedadjacent_to_selecteds rr4r4 s:!||6777 ]]FBg GWc)R00'::HsHXq8|a7G$H$HII #R ( ((rcjt||}rfd|D}rfd|D}|S)aAn extension of :func:`itertools.groupby` that can apply transformations to the grouped data. * *keyfunc* is a function computing a key value for each item in *iterable* * *valuefunc* is a function that transforms the individual items from *iterable* after grouping * *reducefunc* is a function that transforms each group of items >>> iterable = 'aAAbBBcCC' >>> keyfunc = lambda k: k.upper() >>> valuefunc = lambda v: v.lower() >>> reducefunc = lambda g: ''.join(g) >>> list(groupby_transform(iterable, keyfunc, valuefunc, reducefunc)) [('A', 'aaa'), ('B', 'bbb'), ('C', 'ccc')] Each optional argument defaults to an identity function if not specified. :func:`groupby_transform` is useful when grouping elements of an iterable using a separate iterable as the key. To do this, :func:`zip` the iterables and pass a *keyfunc* that extracts the first element and a *valuefunc* that extracts the second element:: >>> from operator import itemgetter >>> keys = [0, 0, 1, 1, 1, 2, 2, 2, 3] >>> values = 'abcdefghi' >>> iterable = zip(keys, values) >>> grouper = groupby_transform(iterable, itemgetter(0), itemgetter(1)) >>> [(k, ''.join(g)) for k, g in grouper] [(0, 'ab'), (1, 'cde'), (2, 'fgh'), (3, 'i')] Note that the order of items in the iterable is significant. Only adjacent items are grouped together, so if you don't want any duplicate groups, you should sort the iterable by the key function. c3BK|]\}}|t|fVdSrr)r kg valuefuncs rr%z$groupby_transform..Ys666$!Q3y!$$%666666rc38K|]\}}||fVdSrr)r rr reducefuncs rr%z$groupby_transform..[s422da::a==!222222rr)rkeyfuncrrrs `` rrJrJ3s]H (G $ $C76666#66632222c222 JrceZdZdZeeddZdZdZdZ dZ dZ dZ d Z d Zd Zd Zd ZdZdZdZdZdS)r\a<An extension of the built-in ``range()`` function whose arguments can be any orderable numeric type. With only *stop* specified, *start* defaults to ``0`` and *step* defaults to ``1``. The output items will match the type of *stop*: >>> list(numeric_range(3.5)) [0.0, 1.0, 2.0, 3.0] With only *start* and *stop* specified, *step* defaults to ``1``. The output items will match the type of *start*: >>> from decimal import Decimal >>> start = Decimal('2.1') >>> stop = Decimal('5.1') >>> list(numeric_range(start, stop)) [Decimal('2.1'), Decimal('3.1'), Decimal('4.1')] With *start*, *stop*, and *step* specified the output items will match the type of ``start + step``: >>> from fractions import Fraction >>> start = Fraction(1, 2) # Start at 1/2 >>> stop = Fraction(5, 2) # End at 5/2 >>> step = Fraction(1, 2) # Count by 1/2 >>> list(numeric_range(start, stop, step)) [Fraction(1, 2), Fraction(1, 1), Fraction(3, 2), Fraction(2, 1)] If *step* is zero, ``ValueError`` is raised. Negative steps are supported: >>> list(numeric_range(3, -1, -1.0)) [3.0, 2.0, 1.0, 0.0] Be aware of the limitations of floating point numbers; the representation of the yielded numbers may be surprising. ``datetime.datetime`` objects can be used for *start* and *stop*, if *step* is a ``datetime.timedelta`` object: >>> import datetime >>> start = datetime.datetime(2019, 1, 1) >>> stop = datetime.datetime(2019, 1, 3) >>> step = datetime.timedelta(days=1) >>> items = iter(numeric_range(start, stop, step)) >>> next(items) datetime.datetime(2019, 1, 1, 0, 0) >>> next(items) datetime.datetime(2019, 1, 2, 0, 0) rct|}|dkrV|\|_t|jd|_t|j|jz d|_n|dkr:|\|_|_t|j|jz d|_nf|dkr|\|_|_|_nJ|dkr"t d|t d|t|jd|_|j|jkrtd|j|jk|_ | dS)Nr,rrz2numeric_range expected at least 1 argument, got {}z2numeric_range expected at most 3 arguments, got {}z&numeric_range() arg 3 must not be zero) r_stoptype_start_steprr_zeror_growing _init_len)rrargcs rrznumeric_range.__init__sf4yy 199 MTZ*$tz**1--DK7dj4;677::DJJ QYY&* #DK7dj4;677::DJJ QYY26 /DKTZZ QYY%%+VD\\  &&,fTll  &T$*%%a(( : # #EFF F TZ/  rcP|jr|j|jkS|j|jkSr)rrrrs rrznumeric_range.__bool__s* = ,;+ +;+ +rc|jr6|j|cxkr |jkrnnR||jz |jz|jkSn6|j|cxkr |jkrnn|j|z |j z|jkSdSNF)rrrrr)relems rrznumeric_range.__contains__s = J{d////TZ/////t{*dj8DJFF0{d////TZ///// d* {;tzIIurct|trtt| }t| }|s|r|o|S|j|jko;|j|jko+|d|dkSdS)NrF)rr\boolrr _get_by_index)rother empty_self empty_others r__eq__znumeric_range.__eq__s e] + + !$ZZJ"5kk/K [ !1k1K5</J ek1J**2..%2E2Eb2I2II 5rct|tr||St|tr|j|jn|j|jz}|j|j|j kr|j}n2|j|jkr|j }n||j}|j |j |jkr|j }n3|j |j kr|j}n||j }t|||Std t|j)Nz8numeric range indices must be integers or slices, not {})rintrrrrr_lenrrrr\rrrr)rr0rrrs rrznumeric_range.__getitem__s0 c3   %%c** * U # # !$!14::sx$*7LDy CI$)$;$; di'' **3955x38ty#8#8zdiZ''{))#(33 d33 3--3VDII4F-G-G rcr|r/t|j|d|jfS|jSNr)hashrrr _EMPTY_HASHrs r__hash__znumeric_range.__hash__s:  $d&8&8&<&.s0BBQ$+TZ0BBBBBBr)rrrrr'rr()rvaluess` rrznumeric_range.__iter__sbBBBB%''BBB = >WR44f== =WR44f== =rc|jSr)rrs r__len__znumeric_range.__len__s yrc|jr|j}|j}|j}n|j}|j}|j }||z }||jkr d|_dSt ||\}}t|t||jkz|_dSNr)rrrrrrrr)rrrrrrrs rrznumeric_range._init_lens = KE:D:DDJE;DJ;D%< tz ! !DIII(D))DAqAQ$*_!5!55DIIIrc8t|j|j|jffSr)r\rrrrs r __reduce__znumeric_range.__reduce__ st{DJ CCCrc&|jdkr:dt|jt|jSdt|jt|jt|jS)Nr,znumeric_range({}, {})znumeric_range({}, {}, {}))rrreprrrrs r__repr__znumeric_range.__repr__s} :??*11T[!!4 #3#3 /55T[!!4 #3#3T$*5E5E rctt|d|j|jz |j Sr)rr\rrrrs rrznumeric_range.__reversed__sC ""2&& dj(@4:+     rc$t||vSr)rr;s rrznumeric_range.count s5D=!!!rc|jrU|j|cxkr |jkr=nnt||jz |j\}}||jkrt |SnU|j|cxkr |jkr>nn;t|j|z |j \}}||jkrt |Std|)Nz{} is not in numeric range) rrrrrrrrr)rr4rrs rrznumeric_range.index#s = "{e0000dj00000edk14:>>1 ??q66M{e0000dj00000dkE1DJ;??1 ??q66M5<>>666 DDD   """ E E E,,,,,rr\ctstdS|tnt|}fd|DS)aCycle through the items from *iterable* up to *n* times, yielding the number of completed cycles along with each item. If *n* is omitted the process repeats indefinitely. >>> list(count_cycle('AB', 3)) [(0, 'A'), (0, 'B'), (1, 'A'), (1, 'B'), (2, 'A'), (2, 'B')] rNc3*K|] }D]}||fV dSrr)r rrrs rr%zcount_cycle..Fs4 < >> list(mark_ends('ABC')) [(True, False, 'A'), (False, False, 'B'), (False, True, 'C')] Use this when looping over an iterable to take special action on its first and/or last items: >>> iterable = ['Header', 100, 200, 'Footer'] >>> total = 0 >>> for is_first, is_last, item in mark_ends(iterable): ... if is_first: ... continue # Skip the header ... if is_last: ... continue # Skip the footer ... total += item >>> print(total) 300 NrFT)rrrr)rrbras rrArAIs( hB HH  # #AARAq&%" " " " " # # 1fdAos# 11-A$$A=<A=c|*ttt||S|dkrtdt ||t }ttt ||S)aYield the index of each item in *iterable* for which *pred* returns ``True``. *pred* defaults to :func:`bool`, which will select truthy items: >>> list(locate([0, 1, 1, 0, 1, 0, 0])) [1, 2, 4] Set *pred* to a custom function to, e.g., find the indexes for a particular item. >>> list(locate(['a', 'b', 'c', 'b'], lambda x: x == 'b')) [1, 3] If *window_size* is given, then the *pred* function will be called with that many items. This enables searching for sub-sequences: >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3] >>> pred = lambda *args: args == (1, 2, 3) >>> list(locate(iterable, pred=pred, window_size=3)) [1, 5, 9] Use with :func:`seekable` to find indexes and then retrieve the associated items: >>> from itertools import count >>> from more_itertools import seekable >>> source = (3 * n + 1 if (n % 2) else n // 2 for n in count()) >>> it = seekable(source) >>> pred = lambda x: x > 100 >>> indexes = locate(it, pred=pred) >>> i = next(indexes) >>> it.seek(i) >>> next(it) 106 Nr,zwindow size must be at least 1r)rrrrr{rr)rrW window_sizers rrTrTnssLT8!4!4555Q9::: (K7 ; ; ;B EGGWT2.. / //rc"t||S)aYield the items from *iterable*, but strip any from the beginning for which *pred* returns ``True``. For example, to remove a set of items from the start of an iterable: >>> iterable = (None, False, None, 1, 2, None, 3, False, None) >>> pred = lambda x: x in {None, False, ''} >>> list(lstrip(iterable, pred)) [1, 2, None, 3, False, None] This function is analogous to to :func:`str.lstrip`, and is essentially an wrapper for :func:`itertools.dropwhile`. )rrrWs rrUrUs T8 $ $$rc#Kg}|j}|j}|D]/}||r |||Ed{V||V0dS)aYield the items from *iterable*, but strip any from the end for which *pred* returns ``True``. For example, to remove a set of items from the end of an iterable: >>> iterable = (None, False, None, 1, 2, None, 3, False, None) >>> pred = lambda x: x in {None, False, ''} >>> list(rstrip(iterable, pred)) [None, False, None, 1, 2, None, 3] This function is analogous to :func:`str.rstrip`. N)rclear)rrWcache cache_append cache_clearr,s rrfrfs Ett|||S)aYield the items from *iterable*, but strip any from the beginning and end for which *pred* returns ``True``. For example, to remove a set of items from both ends of an iterable: >>> iterable = (None, False, None, 1, 2, None, 3, False, None) >>> pred = lambda x: x in {None, False, ''} >>> list(strip(iterable, pred)) [1, 2, None, 3] This function is analogous to :func:`str.strip`. )rfrUrs rrurus &4(($ / //rc*eZdZdZdZdZdZdZdS)rOaAn extension of :func:`itertools.islice` that supports negative values for *stop*, *start*, and *step*. >>> iterable = iter('abcdefgh') >>> list(islice_extended(iterable, -4, -1)) ['e', 'f', 'g'] Slices with negative values require some caching of *iterable*, but this function takes care to minimize the amount of memory required. For example, you can use a negative step with an infinite iterator: >>> from itertools import count >>> list(islice_extended(count(), 110, 99, -2)) [110, 108, 106, 104, 102, 100] You can also use slice notation directly: >>> iterable = map(str, count()) >>> it = islice_extended(iterable)[10:20:2] >>> list(it) ['10', '12', '14', '16', '18'] crt|}|rt|t||_dS||_dSr)r_islice_helperr _iterable)rrrrs rrzislice_extended.__init__s9 (^^  +Bt ==DNNNDNNNrc|Srrrs rrzislice_extended.__iter__rrc*t|jSr)rrrs rrzislice_extended.__next__DN###rct|tr"tt|j|St d)Nz4islice_extended.__getitem__ argument must be a slice)rrrOrrr)rr0s rrzislice_extended.__getitem__ s> c5 ! ! H">$.##F#FGG GNOOOrN)rrrrrrrrrrrrOrOs_2   $$$PPPPPrrOc#0K|j}|j}|jdkrtd|jpd}|dkrZ|dn|}|dkrt t |d| }|r|ddnd}t ||zd}||}n*|dkrt||}nt ||zd}||z } | dkrdSt|d| |D] \} } | V dS||dkrtt|||dt t|| | }t |D];\} } | } | |zdkr| V| | >> print(*always_reversible(x for x in range(3))) 2 1 0 If the iterable is already reversible, this function returns the result of :func:`reversed()`. If the iterable is not reversible, this function will cache the remaining items in the iterable and yield them in reverse order, which may require significant storage. )rrrrs rr6r6i sJ(!!! (((X'''''(s &::c|Srrr+s rr-r-{ sArc#Ktt|fdD]$\}}ttd|V%dS)aYield groups of consecutive items using :func:`itertools.groupby`. The *ordering* function determines whether two items are adjacent by returning their position. By default, the ordering function is the identity function. This is suitable for finding runs of numbers: >>> iterable = [1, 10, 11, 12, 20, 30, 31, 32, 33, 40] >>> for group in consecutive_groups(iterable): ... print(list(group)) [1] [10, 11, 12] [20] [30, 31, 32, 33] [40] For finding runs of adjacent letters, try using the :meth:`index` method of a string of letters: >>> from string import ascii_lowercase >>> iterable = 'abcdfgilmnop' >>> ordering = ascii_lowercase.index >>> for group in consecutive_groups(iterable, ordering): ... print(list(group)) ['a', 'b', 'c', 'd'] ['f', 'g'] ['i'] ['l', 'm', 'n', 'o', 'p'] Each group of consecutive items is an iterator that shares it source with *iterable*. When an an output group is advanced, the previous group is no longer available unless its elements are copied (e.g., into a ``list``). >>> iterable = [1, 2, 11, 12, 21, 22] >>> saved_groups = [] >>> for group in consecutive_groups(iterable): ... saved_groups.append(list(group)) # Copy group elements >>> saved_groups [[1, 2], [11, 12], [21, 22]] c8|d|dz Srr)r,orderings rr-z$consecutive_groups.. s1Q4((1Q4..+@rr0r,N)rrkrr$)rrrrs ` rr=r={ snT(!@!@!@!@$$1*Q--######$$r)initialc t|\}} t|g}n#t$rtgcYSwxYw|g}t |t |t ||S)aThis function is the inverse of :func:`itertools.accumulate`. By default it will compute the first difference of *iterable* using :func:`operator.sub`: >>> from itertools import accumulate >>> iterable = accumulate([0, 1, 2, 3, 4]) # produces 0, 1, 3, 6, 10 >>> list(difference(iterable)) [0, 1, 2, 3, 4] *func* defaults to :func:`operator.sub`, but other functions can be specified. They will be applied as follows:: A, B, C, D, ... --> A, func(B, A), func(C, B), func(D, C), ... For example, to do progressive division: >>> iterable = [1, 2, 6, 24, 120] >>> func = lambda x, y: x // y >>> list(difference(iterable, func)) [1, 2, 3, 4, 5] If the *initial* keyword is set, the first element will be skipped when computing successive differences. >>> it = [10, 11, 13, 16] # from accumulate([1, 2, 3], initial=10) >>> list(difference(it, initial=10)) [1, 2, 3] )rrrrrrr)rrrrrrIs rrBrB s< x==DAqa  Bxx c!Qii00 1 11s%AAc*eZdZdZdZdZdZdZdS)rjaSReturn a read-only view of the sequence object *target*. :class:`SequenceView` objects are analogous to Python's built-in "dictionary view" types. They provide a dynamic view of a sequence's items, meaning that when the sequence updates, so does the view. >>> seq = ['0', '1', '2'] >>> view = SequenceView(seq) >>> view SequenceView(['0', '1', '2']) >>> seq.append('3') >>> view SequenceView(['0', '1', '2', '3']) Sequence views support indexing, slicing, and length queries. They act like the underlying sequence, except they don't allow assignment: >>> view[1] '1' >>> view[1:-1] ['1', '2'] >>> len(view) 4 Sequence views are useful as an alternative to copying, as they don't require (much) extra storage. cLt|tst||_dSr)rrr_target)rtargets rrzSequenceView.__init__ s$&(++ O rc|j|Sr)r)rrs rrzSequenceView.__getitem__ s|E""rc*t|jSr)rrrs rrzSequenceView.__len__ s4<   rcfd|jjt|jS)Nz{}({}))rrurrrrs rrzSequenceView.__repr__ s%t~6T\8J8JKKKrN)rrrrrrrrrrrrjrj s_: ###!!!LLLLLrrjcBeZdZdZd dZdZdZdZefdZ dZ d Z dS) ria Wrap an iterator to allow for seeking backward and forward. This progressively caches the items in the source iterable so they can be re-visited. Call :meth:`seek` with an index to seek to that position in the source iterable. To "reset" an iterator, seek to ``0``: >>> from itertools import count >>> it = seekable((str(n) for n in count())) >>> next(it), next(it), next(it) ('0', '1', '2') >>> it.seek(0) >>> next(it), next(it), next(it) ('0', '1', '2') >>> next(it) '3' You can also seek forward: >>> it = seekable((str(n) for n in range(20))) >>> it.seek(10) >>> next(it) '10' >>> it.seek(20) # Seeking past the end of the source isn't a problem >>> list(it) [] >>> it.seek(0) # Resetting works even after hitting the end >>> next(it), next(it), next(it) ('0', '1', '2') Call :meth:`peek` to look ahead one item without advancing the iterator: >>> it = seekable('1234') >>> it.peek() '1' >>> list(it) ['1', '2', '3', '4'] >>> it.peek(default='empty') 'empty' Before the iterator is at its end, calling :func:`bool` on it will return ``True``. After it will return ``False``: >>> it = seekable('5678') >>> bool(it) True >>> list(it) ['5', '6', '7', '8'] >>> bool(it) False You may view the contents of the cache with the :meth:`elements` method. That returns a :class:`SequenceView`, a view that updates automatically: >>> it = seekable((str(n) for n in range(10))) >>> next(it), next(it), next(it) ('0', '1', '2') >>> elements = it.elements() >>> elements SequenceView(['0', '1', '2']) >>> next(it) '3' >>> elements SequenceView(['0', '1', '2', '3']) By default, the cache grows as the source iterable progresses, so beware of wrapping very large or infinite iterables. Supply *maxlen* to limit the size of the cache (this of course limits how far back you can seek). >>> from itertools import count >>> it = seekable((str(n) for n in count()), maxlen=2) >>> next(it), next(it), next(it), next(it) ('0', '1', '2', '3') >>> list(it.elements()) ['2', '3'] >>> it.seek(0) >>> next(it), next(it), next(it), next(it) ('2', '3', '4', '5') >>> next(it) '6' Nczt||_|g|_ntg||_d|_dSr)r_sourcerr_index)rrrs rrzseekable.__init__X s9H~~ >DKKF++DK rc|Srrrs rrzseekable.__iter__` rrc|j< |j|j}|xjdz c_|S#t$r d|_YnwxYwt|j}|j||SrC)rrrrrrrrs rrzseekable.__next__c s ; " {4;/ q   # # #"  # DL!! 4    s-AAcT |n#t$rYdSwxYwdSrrrs rrzseekable.__bool__q rrc t|}n#t$r|tur|cYSwxYw|jt |j|_|xjdzc_|SrC)rrrrrr)rrpeekeds rrz seekable.peekx sv $ZZFF   '!!NNN  ; dk**DK q  s ++c*t|jSr)rjrrs relementszseekable.elements sDK(((rcr||_|t|jz }|dkrt||dSdSr)rrrr-)rr remainders rseekz seekable.seek sC C ,,, q== D) $ $ $ $ $ =rr) rrrrrrrrrrr rrrrriri sSSj   #    )))%%%%%rric>eZdZdZedZedZdS)rga :func:`run_length.encode` compresses an iterable with run-length encoding. It yields groups of repeated items with the count of how many times they were repeated: >>> uncompressed = 'abbcccdddd' >>> list(run_length.encode(uncompressed)) [('a', 1), ('b', 2), ('c', 3), ('d', 4)] :func:`run_length.decode` decompresses an iterable that was previously compressed with run-length encoding. It yields the items of the decompressed iterable: >>> compressed = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] >>> list(run_length.decode(compressed)) ['a', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd'] c4dt|DS)Nc3>K|]\}}|t|fVdSr)rK)r rrs rr%z$run_length.encode.. s0;;ADGG ;;;;;;rrrs rencodezrun_length.encode s;;):):;;;;rc>tjd|DS)Nc3<K|]\}}t||VdSr)r)r rrs rr%z$run_length.decode.. s."E"EDAq6!Q<<"E"E"E"E"E"Er)rrrs rdecodezrun_length.decode s"""E"EH"E"E"EEEErN)rrrr staticmethodrrrrrrgrg sY&<<\<FF\FFFrrgc ftt|dzt|||kS)aReturn ``True`` if exactly ``n`` items in the iterable are ``True`` according to the *predicate* function. >>> exactly_n([True, True, False], 2) True >>> exactly_n([True, True, False], 1) False >>> exactly_n([0, 1, 2, 3, 4, 5], 3, lambda x: x < 3) True The iterable will be advanced until ``n + 1`` truthy items are encountered, so avoid calling it on infinite iterables. r,)rr1r)rrrs rrGrG s/ tAE6)X6677 8 8A ==rc t|}tt|tt |t|S)zReturn a list of circular shifts of *iterable*. >>> circular_shifts(range(4)) [(0, 1, 2, 3), (1, 2, 3, 0), (2, 3, 0, 1), (3, 0, 1, 2)] )rr1rr{r)rlsts rr:r: s; x..C C(5::s3xx88 9 99rcfd}|S)aReturn a decorator version of *wrapping_func*, which is a function that modifies an iterable. *result_index* is the position in that function's signature where the iterable goes. This lets you use itertools on the "production end," i.e. at function definition. This can augment what the function returns without changing the function's code. For example, to produce a decorator version of :func:`chunked`: >>> from more_itertools import chunked >>> chunker = make_decorator(chunked, result_index=0) >>> @chunker(3) ... def iter_range(n): ... return iter(range(n)) ... >>> list(iter_range(9)) [[0, 1, 2], [3, 4, 5], [6, 7, 8]] To only allow truthy items to be returned: >>> truth_serum = make_decorator(filter, result_index=1) >>> @truth_serum(bool) ... def boolean_test(): ... return [0, 1, '', ' ', False, True] ... >>> list(boolean_test()) [1, ' ', True] The :func:`peekable` and :func:`seekable` wrappers make for practical decorators: >>> from more_itertools import peekable >>> peekable_function = make_decorator(peekable) >>> @peekable_function() ... def str_range(*args): ... return (str(x) for x in range(*args)) ... >>> it = str_range(1, 20, 2) >>> next(it), next(it), next(it) ('1', '3', '5') >>> it.peek() '7' >>> next(it) '7' cfd}|S)Ncfd}|S)Ncn|i|}t}|||iSr)rinsert) rrresultwrapping_args_f result_index wrapping_args wrapping_funcwrapping_kwargss r inner_wrapperzOmake_decorator..decorator..outer_wrapper..inner_wrapper sOD+F++!%m!4!4%%lF;;;$}nHHHHrr)r!r&r"r#r$r%s` r outer_wrapperz8make_decorator..decorator..outer_wrapper sB I I I I I I I I I ! rr)r#r%r'r"r$s`` r decoratorz!make_decorator..decorator s5 ! ! ! ! ! ! ! !rr)r$r"r(s`` rrVrV s+d       rc |dn|}tt}|D]3}||}||}|||4|(|D]\}}||||<d|_|S)aReturn a dictionary that maps the items in *iterable* to categories defined by *keyfunc*, transforms them with *valuefunc*, and then summarizes them by category with *reducefunc*. *valuefunc* defaults to the identity function if it is unspecified. If *reducefunc* is unspecified, no summarization takes place: >>> keyfunc = lambda x: x.upper() >>> result = map_reduce('abbccc', keyfunc) >>> sorted(result.items()) [('A', ['a']), ('B', ['b', 'b']), ('C', ['c', 'c', 'c'])] Specifying *valuefunc* transforms the categorized items: >>> keyfunc = lambda x: x.upper() >>> valuefunc = lambda x: 1 >>> result = map_reduce('abbccc', keyfunc, valuefunc) >>> sorted(result.items()) [('A', [1]), ('B', [1, 1]), ('C', [1, 1, 1])] Specifying *reducefunc* summarizes the categorized items: >>> keyfunc = lambda x: x.upper() >>> valuefunc = lambda x: 1 >>> reducefunc = sum >>> result = map_reduce('abbccc', keyfunc, valuefunc, reducefunc) >>> sorted(result.items()) [('A', 1), ('B', 2), ('C', 3)] You may want to filter the input iterable before applying the map/reduce procedure: >>> all_items = range(30) >>> items = [x for x in all_items if 10 <= x <= 20] # Filter >>> keyfunc = lambda x: x % 2 # Evens map to 0; odds to 1 >>> categories = map_reduce(items, keyfunc=keyfunc) >>> sorted(categories.items()) [(0, [10, 12, 14, 16, 18, 20]), (1, [11, 13, 15, 17, 19])] >>> summaries = map_reduce(items, keyfunc=keyfunc, reducefunc=sum) >>> sorted(summaries.items()) [(0, 90), (1, 75)] Note that all items in the iterable are gathered into a list before the summarization step, which may require significant storage. The returned object is a :obj:`collections.defaultdict` with the ``default_factory`` set to ``None``, such that it behaves like a normal dictionary. Nc|Srrr+s rr-zmap_reduce..; s1r)rrrrdefault_factory) rrrrrrr0r4 value_lists rrXrX sf#,"3)I d  Cgdmm $ C"yy{{ . .OC!z*--CHHC Jrc |I t|fdtt||DS#t$rYnwxYwtt t|||S)aYield the index of each item in *iterable* for which *pred* returns ``True``, starting from the right and moving left. *pred* defaults to :func:`bool`, which will select truthy items: >>> list(rlocate([0, 1, 1, 0, 1, 0, 0])) # Truthy at 1, 2, and 4 [4, 2, 1] Set *pred* to a custom function to, e.g., find the indexes for a particular item: >>> iterable = iter('abcb') >>> pred = lambda x: x == 'b' >>> list(rlocate(iterable, pred)) [3, 1] If *window_size* is given, then the *pred* function will be called with that many items. This enables searching for sub-sequences: >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3] >>> pred = lambda *args: args == (1, 2, 3) >>> list(rlocate(iterable, pred=pred, window_size=3)) [9, 5, 1] Beware, this function won't return anything for infinite iterables. If *iterable* is reversible, ``rlocate`` will reverse it and search from the right. Otherwise, it will search from the left and return the results in reverse order. See :func:`locate` to for other example applications. Nc3(K|] }|z dz V dSr#r)r rrs rr%zrlocate..o s,OOHqL1$OOOOOOr)rrTrrr)rrWrrs @rrereK sB 8}}HOOOOfXh5G5G.N.NOOO O    D  D$ <<== > >>s7= A  A c#JK|dkrtdt|}t|tg|dz z}t ||}d}|D]K}||r)|||kr!|dz }|Ed{Vt ||dz 0|r|dtur |dVLdS)aYYield the items from *iterable*, replacing the items for which *pred* returns ``True`` with the items from the iterable *substitutes*. >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1] >>> pred = lambda x: x == 0 >>> substitutes = (2, 3) >>> list(replace(iterable, pred, substitutes)) [1, 1, 2, 3, 1, 1, 2, 3, 1, 1] If *count* is given, the number of replacements will be limited: >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1, 0] >>> pred = lambda x: x == 0 >>> substitutes = [None] >>> list(replace(iterable, pred, substitutes, count=2)) [1, 1, None, 1, 1, None, 1, 1, 0] Use *window_size* to control the number of items passed as arguments to *pred*. This allows for locating and replacing subsequences. >>> iterable = [0, 1, 2, 5, 0, 1, 2, 5] >>> window_size = 3 >>> pred = lambda *args: args == (0, 1, 2) # 3 items passed to pred >>> substitutes = [3, 4] # Splice in these items >>> list(replace(iterable, pred, substitutes, window_size=window_size)) [3, 4, 5, 3, 4, 5] r,zwindow_size must be at least 1rN)rrrrr{r-) rrW substitutesrrrwindowsrws rrdrdv s:Q9::: $$K x'kAo6 7 7Br;''G A  48  1u99Q&&&&&&&&q111  !A$g%%A$JJJ#rc#Kt|t}ttd|D]'}fdt d|z||fzDV(dS)a"Yield all possible order-preserving partitions of *iterable*. >>> iterable = 'abc' >>> for part in partitions(iterable): ... print([''.join(p) for p in part]) ['abc'] ['a', 'bc'] ['ab', 'c'] ['a', 'b', 'c'] This is unrelated to :func:`partition`. r,c*g|]\}}||Srr)r rrsequences rr zpartitions.. s%AAAAx!}AAArrN)rrr0rr)rrrr5s @rr`r` sH~~H H A eAqkk " "BBAAAATAXqA4x)@)@AAAAAAABBrc# Kt|}t|}||dkrtd||krdSfd|*td|dzD]}||Ed{VdS||Ed{VdS)a Yield the set partitions of *iterable* into *k* parts. Set partitions are not order-preserving. >>> iterable = 'abc' >>> for part in set_partitions(iterable, 2): ... print([''.join(p) for p in part]) ['a', 'bc'] ['ab', 'c'] ['b', 'ac'] If *k* is not given, every set partition is generated. >>> iterable = 'abc' >>> for part in set_partitions(iterable): ... print([''.join(p) for p in part]) ['abc'] ['a', 'bc'] ['ab', 'c'] ['b', 'ac'] ['a', 'b', 'c'] Nr,z6Can't partition in a negative or zero number of groupsc3XKt|}|dkr|gVdS||krd|DVdS|^}}||dz D] }|gg|V ||D]I}tt|D]*}|d||g||zgz||dzdzV+JdS)Nr,cg|]}|gSrr)r rs rr zAset_partitions..set_partitions_helper.. s"""1A3"""r)rr)r$rrrMprset_partitions_helpers rr;z-set_partitions..set_partitions_helper s FF 66#IIIII !VV""""" " " " " "EA**1a!e44  siQi**1a00 < <s1vv<>> from time import sleep >>> def generator(): ... yield 1 ... yield 2 ... sleep(0.2) ... yield 3 >>> iterable = time_limited(0.1, generator()) >>> list(iterable) [1, 2] >>> iterable.timed_out True Note that the time is checked before each item is yielded, and iteration stops if the time elapsed is greater than *limit_seconds*. If your time limit is 1 second, but it takes 2 seconds to generate the first item from the iterable, the function will run for 2 seconds and not yield anything. c|dkrtd||_t||_t |_d|_dS)Nrzlimit_seconds must be positiveF)r limit_secondsrrr+ _start_time timed_out)rr>rs rrztime_limited.__init__ sH 1  =>> >*h$;;rc|Srrrs rrztime_limited.__iter__ rrct|j}t|jz |jkrd|_t |Sr*)rrr+r?r>r@rrs rrztime_limited.__next__# s=DN## ;;) )D,> > >!DN  rNrrrrrrrrrrrxrx sK0rrxct|}t||} t|}d||}|pt|#t$rYnwxYw|S)a*If *iterable* has only one item, return it. If it has zero items, return *default*. If it has more than one item, raise the exception given by *too_long*, which is ``ValueError`` by default. >>> only([], default='missing') 'missing' >>> only([1]) 1 >>> only([1, 2]) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: Expected exactly one item in iterable, but got 1, 2, and perhaps more.' >>> only([1, 2], too_long=TypeError) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... TypeError Note that :func:`only` attempts to advance *iterable* twice to ensure there is only one item. See :func:`spy` or :func:`peekable` to check iterable contents less destructively. r)rrrrr)rrrrrrrs rr^r^, s0 hBr7##K *Bxx  &{L A A )*S//)       sA A$#A$c#Kt|} t|t}|turdStt |g|\}}t ||Vt ||d)aBreak *iterable* into sub-iterables with *n* elements each. :func:`ichunked` is like :func:`chunked`, but it yields iterables instead of lists. If the sub-iterables are read in order, the elements of *iterable* won't be stored in memory. If they are read out of order, :func:`itertools.tee` is used to cache elements as necessary. >>> from itertools import count >>> all_chunks = ichunked(count(), 4) >>> c_1, c_2, c_3 = next(all_chunks), next(all_chunks), next(all_chunks) >>> list(c_2) # c_1's elements have been cached; c_3's haven't been [4, 5, 6, 7] >>> list(c_1) [0, 1, 2, 3] >>> list(c_3) [8, 9, 10, 11] TN)rrrrrrr-)rrsourcerrs rrQrQU s*(^^F FG$$ 7?? Fvv..// Rmm  rc #HK|dkrtd|dkrdVdSt|}tt|t dg}dg|z}d}|r t |d\}}n)#t $r||dz}YAwxYw|||<|dz|krt|VnR|tt||dzd|dzt d|dz }|dSdS)aBYield the distinct combinations of *r* items taken from *iterable*. >>> list(distinct_combinations([0, 0, 1], 2)) [(0, 0), (0, 1)] Equivalent to ``set(combinations(iterable))``, except duplicates are not generated and thrown away. For larger input sequences this is much more efficient. rzr must be non-negativerNr,rr) rrr2rkr$rrpopr)rrr generators current_comborGcur_idxr:s rrCrCz sz 1uu1222 a ??D!)D//z!}}EEEFJFQJM E  jn--JGQQ    NN    QJE H  ! e 19>> && & & & &   d7Q;==17Q;??"1     QJE# s*B#B)(B)c'JK|D]} |||V#|$rYwxYwdS)aYield the items from *iterable* for which the *validator* function does not raise one of the specified *exceptions*. *validator* is called for each item in *iterable*. It should be a function that accepts one argument and raises an exception if that item is not valid. >>> iterable = ['1', '2', 'three', '4', None] >>> list(filter_except(int, iterable, ValueError, TypeError)) ['1', '2', '4'] If an exception other than one given by *exceptions* is raised by *validator*, it is raised like normal. Nr)r1r exceptionsrs rrHrH sb  IdOOOJJJJ    D s   c'FK|D]} ||V#|$rYwxYwdS)aTransform each item from *iterable* with *function* and yield the result, unless *function* raises one of the specified *exceptions*. *function* is called to transform each item in *iterable*. It should be a accept one argument. >>> iterable = ['1', '2', 'three', '4', None] >>> list(map_except(int, iterable, ValueError, TypeError)) [1, 2, 4] If an exception other than one given by *exceptions* is raised by *function*, it is raised like normal. Nr)functionrrMrs rrWrW s] (4..     D s c 2t||}ttt|z }|t tttd|z z z}t ||D]\}}||kr||t |<|ttt|z z}|t tttd|z z dzz }|SrC)r1rrr!rrkr")rr reservoirW next_indexrr s r_sample_unweightedrT s Q!!I CMMA AU3vxx==3q1u::5666J#Ha00@@w J  &-Iill # S]]Q&'' 'A %FHH AE :;;a? ?J rc6 d|D}t|t|| t  d\}}tt |z }t||D]\}}||kr{ d\}}t ||z} t | d} t| |z } t | |f d\}}tt |z }||z} fdt|DS)Nc3RK|]"}tt|z V#dSr)rr!)r weights rr%z#_sample_weighted.. s1@@f3vxx==6)@@@@@@rrr,c:g|]}tdSr )r)r rrQs rr z$_sample_weighted.. s& 4 4 4aGI  q ! 4 4 4r) r1rr rr!rr#r r) rrweights weight_keyssmallest_weight_keyrweights_to_skiprWr t_wr_2 weight_keyrQs @r_sample_weightedr` s: A@@@@KQK2233I I'q\&((mm&99Ow11 & & _ $ $&/q\ " f2233C#q//CSF*J  J#8 9 9 9%.q\ " !&((mm.AAOO v %OO 5 4 4 4588 4 4 44rc|dkrgSt|}|t||St|}t|||S)afReturn a *k*-length list of elements chosen (without replacement) from the *iterable*. Like :func:`random.sample`, but works on iterables of unknown length. >>> iterable = range(100) >>> sample(iterable, 5) # doctest: +SKIP [81, 60, 96, 16, 4] An iterable with *weights* may also be given: >>> iterable = range(100) >>> weights = (i * i + 1 for i in range(100)) >>> sampled = sample(iterable, 5, weights=weights) # doctest: +SKIP [79, 67, 74, 66, 78] The algorithm can also be used to generate weighted random permutations. The relative weight of each item determines the probability that it appears late in the permutation. >>> data = "abcdefgh" >>> weights = range(1, len(data) + 1) >>> sample(data, k=len(data), weights=weights) # doctest: +SKIP ['c', 'a', 'b', 'e', 'g', 'd', 'h', 'f'] r)rrTr`)rrrYs rrhrh sO2 Avv H~~H!(A...w--!W555rc|rtnt}||nt||}tt |t | S)aReturns ``True`` if the items of iterable are in sorted order, and ``False`` otherwise. *key* and *reverse* have the same meaning that they do in the built-in :func:`sorted` function. >>> is_sorted(['1', '2', '3', '4', '5'], key=int) True >>> is_sorted([5, 4, 3, 1, 2], reverse=True) False The function returns ``False`` after encountering the first out-of-order item. If there are no out-of-order items, the iterable is exhausted. )r(r'rrrr/)rr0r&comparers rrRrR0 sJ#bbGkC(:(:B77HRLL1122 22rceZdZdS)r3N)rrrrrrr3r3C sDrr3cdeZdZdZd dZdZdZdZdZe d Z e d Z d Z d S)r8aConvert a function that uses callbacks to an iterator. Let *func* be a function that takes a `callback` keyword argument. For example: >>> def func(callback=None): ... for i, c in [(1, 'a'), (2, 'b'), (3, 'c')]: ... if callback: ... callback(i, c) ... return 4 Use ``with callback_iter(func)`` to get an iterator over the parameters that are delivered to the callback. >>> with callback_iter(func) as it: ... for args, kwargs in it: ... print(args) (1, 'a') (2, 'b') (3, 'c') The function will be called in a background thread. The ``done`` property indicates whether it has completed execution. >>> it.done True If it completes successfully, its return value will be available in the ``result`` property. >>> it.result 4 Notes: * If the function uses some keyword argument besides ``callback``, supply *callback_kwd*. * If it finished executing, but raised an exception, accessing the ``result`` property will raise the same exception. * If it hasn't finished executing, accessing the ``result`` property from within the ``with`` block will raise ``RuntimeError``. * If it hasn't finished executing, accessing the ``result`` property from outside the ``with`` block will raise a ``more_itertools.AbortThread`` exception. * Provide *wait_seconds* to adjust how frequently the it is polled for output. callback皙?c||_||_d|_d|_||_t djd|_| |_ dS)NFzconcurrent.futuresr,) max_workers) _func _callback_kwd_aborted_future _wait_seconds __import__futuresThreadPoolExecutor _executor_reader _iterator)rr callback_kwd wait_secondss rrzcallback_iter.__init__z s_ )  )#$899ATTabTccrc|Srrrs r __enter__zcallback_iter.__enter__ rrcFd|_|jdSr*)rlrrshutdown)rexc_type exc_value tracebacks r__exit__zcallback_iter.__exit__ s#  !!!!!rc|Srrrs rrzcallback_iter.__iter__ rrc*t|jSr)rrtrs rrzcallback_iter.__next__ rrcF|jdS|jSr)rmdoners rrzcallback_iter.done s# < 5|  """rc`|jstd|jS)NzFunction has not yet completed)r RuntimeErrorrmrrs rrzcallback_iter.result s0y A?@@ @|""$$$rc#Ktfd}jjjfij|i_ j}|Vn#t$rYnwxYwj rn`g}  }| |n#t$rYnwxYwP |Ed{VdS)Ncbjrtd||fdS)Nzcanceled by user)rlr3put)rrrrs rrfz'callback_iter._reader..callback s8} 6!"4555 EE4. ! ! ! ! !rT)timeout)r rrsubmitrjrkrmgetrn task_donerr get_nowaitrjoin)rrfrrfrs` @rrszcallback_iter._reader sw GG " " " " " " -t~, J  -x8     uuT%7u88       |  ""    ' '||~~   &&&&      ' s#A33 B?B"C C-,C-N)rfrg) rrrrrrxr~rrpropertyrrrsrrrr8r8G s00d(((("""$$$##X# %%X% #####rr8c# K|dkrtdt|}t|}||krtdt||z dzD]-}|d|}||||z}|||zd}|||fV.dS)a Yield ``(beginning, middle, end)`` tuples, where: * Each ``middle`` has *n* items from *iterable* * Each ``beginning`` has the items before the ones in ``middle`` * Each ``end`` has the items after the ones in ``middle`` >>> iterable = range(7) >>> n = 3 >>> for beginning, middle, end in windowed_complete(iterable, n): ... print(beginning, middle, end) () (0, 1, 2) (3, 4, 5, 6) (0,) (1, 2, 3) (4, 5, 6) (0, 1) (2, 3, 4) (5, 6) (0, 1, 2) (3, 4, 5) (6,) (0, 1, 2, 3) (4, 5, 6) () Note that *n* must be at least 0 and most equal to the length of *iterable*. This function will exhaust the iterable and may require significant storage. rrzn must be <= len(seq)r,N)rrrr)rrrrr beginningmiddleends rrr s0 1uu)*** //C s88D4xx0111 4!8a< %%G QQY!a%''l$$$$$ %%rct}|j}g}|j}|rt||n|D]8} ||vrdS||#t$r||vrYdS||Y5wxYwdS)a Returns ``True`` if all the elements of *iterable* are unique (no two elements are equal). >>> all_unique('ABCB') False If a *key* function is specified, it will be used to make comparisons. >>> all_unique('ABCb') True >>> all_unique('ABCb', str.lower) False The function returns as soon as the first non-unique element is encountered. Iterables with a mix of hashable and unhashable items can be used, but the function will be slower for unhashable items. FT)raddrrr)rr0seenset seenset_addseenlist seenlist_addr s rrr s&eeG+KH?L),:3sH%%%("" "'!!uu K  " " "(""uuu L ! ! ! ! ! " 4sA  A  A) A)(A)ctttt|}ttt|}t t |}|dkr||z }d|cxkr|ks ntg}t||D](\}}| |||z||z})tt|S)aEquivalent to ``list(product(*args))[index]``. The products of *args* can be ordered lexicographically. :func:`nth_product` computes the product at sort position *index* without computing the previous products. >>> nth_product(8, range(2), range(2), range(2), range(2)) (1, 0, 0, 0) ``IndexError`` will be raised if the given *index* is invalid. r) rrrrrr r%rrr)rrpoolsnscrrrs rr[r[s UHTNN++ , ,E c#uoo  BsBA qyy   >>>>>>>> Fub>>a d519o&&& !  &!! " ""rcnt|}t|}|||kr|t|}}n8d|cxkr|ks ntt|t||z z}|dkr||z }d|cxkr|ks nt|dkrt Sdg|z}||kr|t|z|zn|}t d|dzD]8}t||\}} d||z cxkr|kr nn| |||z <|dkrn9t t|j |S)a'Equivalent to ``list(permutations(iterable, r))[index]``` The subsequences of *iterable* that are of length *r* where order is important can be ordered lexicographically. :func:`nth_permutation` computes the subsequence at sort position *index* directly, without computing the previous subsequences. >>> nth_permutation('ghijk', 2, 5) ('h', 'i') ``ValueError`` will be raised If *r* is negative or greater than the length of *iterable*. ``IndexError`` will be raised if the given *index* is invalid. Nrr,) rrrrrrrrrrH) rrrrrrrrdrs rrZrZ-sd >>D D AyAFF)A,,1 !ZZZZaZZZZ aLLIa!e,, , qyy   >>>>>>>>AvvwwS1WF%&UU ! !!A 1a!e__a||1 A>>>>>>>>>F1q5M 66 E  TXv&& ' ''rc'K|D]@}t|ttfr|V# |Ed{V-#t$r|VY=wxYwdS)aYield all arguments passed to the function in the same order in which they were passed. If an argument itself is iterable then iterate over its values. >>> list(value_chain(1, 2, 3, [4, 5, 6])) [1, 2, 3, 4, 5, 6] Binary and text strings are not considered iterable and are emitted as-is: >>> list(value_chain('12', '34', ['56', '78'])) ['12', '34', '56', '78'] Multiple levels of nesting are not flattened. N)rrDrEr)rr4s rrr[s$ ec5\ * * KKK             KKKKK  s2AAcd}t||tD]]\}}|tus |turtdt|}|t |z||z}^|S)aEquivalent to ``list(product(*args)).index(element)`` The products of *args* can be ordered lexicographically. :func:`product_index` computes the first index of *element* without computing the previous products. >>> product_index([8, 2], range(10), range(5)) 42 ``ValueError`` will be raised if the given *element* isn't in the product of *args*. rrz element is not a product of args)rrrrrr)r rrr,rs rrrws| Ew@@@224 <<47???@@ @T{{D !DJJqMM1 Lrctt|}t|d\}}|dSg}t|}|D]9\}}||kr.||t|d\}}|n|}:tdt ||df\}} d} tt |dD]E\} } || z } | | kr5| t | t | t | | z zzz } Ft |dzt |dzt ||z zz| z S)aEquivalent to ``list(combinations(iterable, r)).index(element)`` The subsequences of *iterable* that are of length *r* can be ordered lexicographically. :func:`combination_index` computes the index of the first *element*, without computing the previous combinations. >>> combination_index('adf', 'abcdefg') 10 ``ValueError`` will be raised if the given *element* isn't one of the combinations of *iterable*. NNNrz(element is not a combination of iterablerr,)r)rkrrrrSrr) r rryindexesrrr,tmprrrrs rrrse  G  & &DAqyqG X  D E E1 66 NN1   '<00FC{CDDD q$i ( ( (DAq E(7++1555GG1 E 66 Yq\\illYq1u5E5E&EF FE QU   !a% 0 09QU3C3C C Du LLrcd}t|}ttt|dd|D]%\}}||}||z|z}||=&|S)aEquivalent to ``list(permutations(iterable, r)).index(element)``` The subsequences of *iterable* that are of length *r* where order is important can be ordered lexicographically. :func:`permutation_index` computes the index of the first *element* directly, without computing the previous permutations. >>> permutation_index([1, 3, 2], range(5)) 19 ``ValueError`` will be raised if the given *element* isn't one of the permutations of *iterable*. rr)rrrrr)r rrrrr,rs rrrsm E >>DE#d))R,,g661 JJqMM A  GG Lrc$eZdZdZdZdZdZdS)r?aWrap *iterable* and keep a count of how many items have been consumed. The ``items_seen`` attribute starts at ``0`` and increments as the iterable is consumed: >>> iterable = map(str, range(10)) >>> it = countable(iterable) >>> it.items_seen 0 >>> next(it), next(it) ('0', '1') >>> list(it) ['2', '3', '4', '5', '6', '7', '8', '9'] >>> it.items_seen 10 c<t||_d|_dSr)rr items_seenrs rrzcountable.__init__s>>rc|Srrrs rrzcountable.__iter__rrcNt|j}|xjdz c_|SrC)rrrrs rrzcountable.__next__s$DH~~ 1 rNrCrrrr?r?sK"rr?)Frrr rC)NNN)rF)r)NNF)rmFN)rNFr)r collectionsrrrrcollections.abcr functoolsrr r heapqr r r r itertoolsrrrrrrrrrrrrmathrrrrqueuerr r!r"r#operatorr$r%r&r'r(sysr)r*timer+recipesr-r.r/r0r1r2__all__objectrr9rIrSrYrbr<r>rKrPr|r]rDrNryr{rvrwr7rsrMrLr;rkrlrnrprorqrrr_rcrErtrr}rzr~rrmrzrFrDrEr5r4rJHashabler\r@rArrTrUrfrurOrr6r=rBrjrirgrGr:rVrXrerdr`rarxr^rQrCrHrWrTr`rhrR BaseExceptionr3r8rrr[rZrrrrr?rrrrs; 888888888888$$$$$$,,,,,,,,,,666666666666                            ,+++++++++++----------11111111111111########T T T l &((B$8#:&-::::"b"b"b"b"b"b"b"b"J#'#'#'L@"      @@@@Fa$a$a$a$HDDDD4CCCB0000f!!!4D]']']']']']']']'@((((((((V 0 0 0 . . . -!-!-!-!`::::zD))))X    F!!!!H****Z*)*)*)Z@& M M MF8J+/+/+/\-2T$$$$$N????D.K.K.Kb000f%(<2222j$)$)$)$)N****ZV,V,V,V,V,CL#,V,V,V,r = = = = """JD-0-0-0-0`%%%$4000"+P+P+P+P+P+P+P+P\]&]&]&@((($+6+-$-$-$-$`"'2d'2'2'2'2'2T*L*L*L*L*L8*L*L*LZI%I%I%I%I%I%I%I%XFFFFFFFF:&*>>>>$:::>>>>B@@@@F T(?(?(?(?V::::zBBB(5/5/5/5/p********Z&&&&R"""J%%%P0*4 5 5 5F!6!6!6!6H3333&     -   yyyyyyyyx%%%%%%P    F###>+(+(+(\82(M(M(MV0rPK{5Z!Q8RR?Lib/site-packages/setuptools/_vendor/more_itertools/__init__.pynuW+Afrom .more import * # noqa from .recipes import * # noqa __version__ = '8.8.0' PK{5ZP,x;Lib/site-packages/setuptools/_vendor/more_itertools/more.pynuW+Aimport warnings from collections import Counter, defaultdict, deque, abc from collections.abc import Sequence from functools import partial, reduce, wraps from heapq import merge, heapify, heapreplace, heappop from itertools import ( chain, compress, count, cycle, dropwhile, groupby, islice, repeat, starmap, takewhile, tee, zip_longest, ) from math import exp, factorial, floor, log from queue import Empty, Queue from random import random, randrange, uniform from operator import itemgetter, mul, sub, gt, lt from sys import hexversion, maxsize from time import monotonic from .recipes import ( consume, flatten, pairwise, powerset, take, unique_everseen, ) __all__ = [ 'AbortThread', 'adjacent', 'always_iterable', 'always_reversible', 'bucket', 'callback_iter', 'chunked', 'circular_shifts', 'collapse', 'collate', 'consecutive_groups', 'consumer', 'countable', 'count_cycle', 'mark_ends', 'difference', 'distinct_combinations', 'distinct_permutations', 'distribute', 'divide', 'exactly_n', 'filter_except', 'first', 'groupby_transform', 'ilen', 'interleave_longest', 'interleave', 'intersperse', 'islice_extended', 'iterate', 'ichunked', 'is_sorted', 'last', 'locate', 'lstrip', 'make_decorator', 'map_except', 'map_reduce', 'nth_or_last', 'nth_permutation', 'nth_product', 'numeric_range', 'one', 'only', 'padded', 'partitions', 'set_partitions', 'peekable', 'repeat_last', 'replace', 'rlocate', 'rstrip', 'run_length', 'sample', 'seekable', 'SequenceView', 'side_effect', 'sliced', 'sort_together', 'split_at', 'split_after', 'split_before', 'split_when', 'split_into', 'spy', 'stagger', 'strip', 'substrings', 'substrings_indexes', 'time_limited', 'unique_to_each', 'unzip', 'windowed', 'with_iter', 'UnequalIterablesError', 'zip_equal', 'zip_offset', 'windowed_complete', 'all_unique', 'value_chain', 'product_index', 'combination_index', 'permutation_index', ] _marker = object() def chunked(iterable, n, strict=False): """Break *iterable* into lists of length *n*: >>> list(chunked([1, 2, 3, 4, 5, 6], 3)) [[1, 2, 3], [4, 5, 6]] By the default, the last yielded list will have fewer than *n* elements if the length of *iterable* is not divisible by *n*: >>> list(chunked([1, 2, 3, 4, 5, 6, 7, 8], 3)) [[1, 2, 3], [4, 5, 6], [7, 8]] To use a fill-in value instead, see the :func:`grouper` recipe. If the length of *iterable* is not divisible by *n* and *strict* is ``True``, then ``ValueError`` will be raised before the last list is yielded. """ iterator = iter(partial(take, n, iter(iterable)), []) if strict: def ret(): for chunk in iterator: if len(chunk) != n: raise ValueError('iterable is not divisible by n.') yield chunk return iter(ret()) else: return iterator def first(iterable, default=_marker): """Return the first item of *iterable*, or *default* if *iterable* is empty. >>> first([0, 1, 2, 3]) 0 >>> first([], 'some default') 'some default' If *default* is not provided and there are no items in the iterable, raise ``ValueError``. :func:`first` is useful when you have a generator of expensive-to-retrieve values and want any arbitrary one. It is marginally shorter than ``next(iter(iterable), default)``. """ try: return next(iter(iterable)) except StopIteration as e: if default is _marker: raise ValueError( 'first() was called on an empty iterable, and no ' 'default value was provided.' ) from e return default def last(iterable, default=_marker): """Return the last item of *iterable*, or *default* if *iterable* is empty. >>> last([0, 1, 2, 3]) 3 >>> last([], 'some default') 'some default' If *default* is not provided and there are no items in the iterable, raise ``ValueError``. """ try: if isinstance(iterable, Sequence): return iterable[-1] # Work around https://bugs.python.org/issue38525 elif hasattr(iterable, '__reversed__') and (hexversion != 0x030800F0): return next(reversed(iterable)) else: return deque(iterable, maxlen=1)[-1] except (IndexError, TypeError, StopIteration): if default is _marker: raise ValueError( 'last() was called on an empty iterable, and no default was ' 'provided.' ) return default def nth_or_last(iterable, n, default=_marker): """Return the nth or the last item of *iterable*, or *default* if *iterable* is empty. >>> nth_or_last([0, 1, 2, 3], 2) 2 >>> nth_or_last([0, 1], 2) 1 >>> nth_or_last([], 0, 'some default') 'some default' If *default* is not provided and there are no items in the iterable, raise ``ValueError``. """ return last(islice(iterable, n + 1), default=default) class peekable: """Wrap an iterator to allow lookahead and prepending elements. Call :meth:`peek` on the result to get the value that will be returned by :func:`next`. This won't advance the iterator: >>> p = peekable(['a', 'b']) >>> p.peek() 'a' >>> next(p) 'a' Pass :meth:`peek` a default value to return that instead of raising ``StopIteration`` when the iterator is exhausted. >>> p = peekable([]) >>> p.peek('hi') 'hi' peekables also offer a :meth:`prepend` method, which "inserts" items at the head of the iterable: >>> p = peekable([1, 2, 3]) >>> p.prepend(10, 11, 12) >>> next(p) 10 >>> p.peek() 11 >>> list(p) [11, 12, 1, 2, 3] peekables can be indexed. Index 0 is the item that will be returned by :func:`next`, index 1 is the item after that, and so on: The values up to the given index will be cached. >>> p = peekable(['a', 'b', 'c', 'd']) >>> p[0] 'a' >>> p[1] 'b' >>> next(p) 'a' Negative indexes are supported, but be aware that they will cache the remaining items in the source iterator, which may require significant storage. To check whether a peekable is exhausted, check its truth value: >>> p = peekable(['a', 'b']) >>> if p: # peekable has items ... list(p) ['a', 'b'] >>> if not p: # peekable is exhausted ... list(p) [] """ def __init__(self, iterable): self._it = iter(iterable) self._cache = deque() def __iter__(self): return self def __bool__(self): try: self.peek() except StopIteration: return False return True def peek(self, default=_marker): """Return the item that will be next returned from ``next()``. Return ``default`` if there are no items left. If ``default`` is not provided, raise ``StopIteration``. """ if not self._cache: try: self._cache.append(next(self._it)) except StopIteration: if default is _marker: raise return default return self._cache[0] def prepend(self, *items): """Stack up items to be the next ones returned from ``next()`` or ``self.peek()``. The items will be returned in first in, first out order:: >>> p = peekable([1, 2, 3]) >>> p.prepend(10, 11, 12) >>> next(p) 10 >>> list(p) [11, 12, 1, 2, 3] It is possible, by prepending items, to "resurrect" a peekable that previously raised ``StopIteration``. >>> p = peekable([]) >>> next(p) Traceback (most recent call last): ... StopIteration >>> p.prepend(1) >>> next(p) 1 >>> next(p) Traceback (most recent call last): ... StopIteration """ self._cache.extendleft(reversed(items)) def __next__(self): if self._cache: return self._cache.popleft() return next(self._it) def _get_slice(self, index): # Normalize the slice's arguments step = 1 if (index.step is None) else index.step if step > 0: start = 0 if (index.start is None) else index.start stop = maxsize if (index.stop is None) else index.stop elif step < 0: start = -1 if (index.start is None) else index.start stop = (-maxsize - 1) if (index.stop is None) else index.stop else: raise ValueError('slice step cannot be zero') # If either the start or stop index is negative, we'll need to cache # the rest of the iterable in order to slice from the right side. if (start < 0) or (stop < 0): self._cache.extend(self._it) # Otherwise we'll need to find the rightmost index and cache to that # point. else: n = min(max(start, stop) + 1, maxsize) cache_len = len(self._cache) if n >= cache_len: self._cache.extend(islice(self._it, n - cache_len)) return list(self._cache)[index] def __getitem__(self, index): if isinstance(index, slice): return self._get_slice(index) cache_len = len(self._cache) if index < 0: self._cache.extend(self._it) elif index >= cache_len: self._cache.extend(islice(self._it, index + 1 - cache_len)) return self._cache[index] def collate(*iterables, **kwargs): """Return a sorted merge of the items from each of several already-sorted *iterables*. >>> list(collate('ACDZ', 'AZ', 'JKL')) ['A', 'A', 'C', 'D', 'J', 'K', 'L', 'Z', 'Z'] Works lazily, keeping only the next value from each iterable in memory. Use :func:`collate` to, for example, perform a n-way mergesort of items that don't fit in memory. If a *key* function is specified, the iterables will be sorted according to its result: >>> key = lambda s: int(s) # Sort by numeric value, not by string >>> list(collate(['1', '10'], ['2', '11'], key=key)) ['1', '2', '10', '11'] If the *iterables* are sorted in descending order, set *reverse* to ``True``: >>> list(collate([5, 3, 1], [4, 2, 0], reverse=True)) [5, 4, 3, 2, 1, 0] If the elements of the passed-in iterables are out of order, you might get unexpected results. On Python 3.5+, this function is an alias for :func:`heapq.merge`. """ warnings.warn( "collate is no longer part of more_itertools, use heapq.merge", DeprecationWarning, ) return merge(*iterables, **kwargs) def consumer(func): """Decorator that automatically advances a PEP-342-style "reverse iterator" to its first yield point so you don't have to call ``next()`` on it manually. >>> @consumer ... def tally(): ... i = 0 ... while True: ... print('Thing number %s is %s.' % (i, (yield))) ... i += 1 ... >>> t = tally() >>> t.send('red') Thing number 0 is red. >>> t.send('fish') Thing number 1 is fish. Without the decorator, you would have to call ``next(t)`` before ``t.send()`` could be used. """ @wraps(func) def wrapper(*args, **kwargs): gen = func(*args, **kwargs) next(gen) return gen return wrapper def ilen(iterable): """Return the number of items in *iterable*. >>> ilen(x for x in range(1000000) if x % 3 == 0) 333334 This consumes the iterable, so handle with care. """ # This approach was selected because benchmarks showed it's likely the # fastest of the known implementations at the time of writing. # See GitHub tracker: #236, #230. counter = count() deque(zip(iterable, counter), maxlen=0) return next(counter) def iterate(func, start): """Return ``start``, ``func(start)``, ``func(func(start))``, ... >>> from itertools import islice >>> list(islice(iterate(lambda x: 2*x, 1), 10)) [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] """ while True: yield start start = func(start) def with_iter(context_manager): """Wrap an iterable in a ``with`` statement, so it closes once exhausted. For example, this will close the file when the iterator is exhausted:: upper_lines = (line.upper() for line in with_iter(open('foo'))) Any context manager which returns an iterable is a candidate for ``with_iter``. """ with context_manager as iterable: yield from iterable def one(iterable, too_short=None, too_long=None): """Return the first item from *iterable*, which is expected to contain only that item. Raise an exception if *iterable* is empty or has more than one item. :func:`one` is useful for ensuring that an iterable contains only one item. For example, it can be used to retrieve the result of a database query that is expected to return a single row. If *iterable* is empty, ``ValueError`` will be raised. You may specify a different exception with the *too_short* keyword: >>> it = [] >>> one(it) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: too many items in iterable (expected 1)' >>> too_short = IndexError('too few items') >>> one(it, too_short=too_short) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... IndexError: too few items Similarly, if *iterable* contains more than one item, ``ValueError`` will be raised. You may specify a different exception with the *too_long* keyword: >>> it = ['too', 'many'] >>> one(it) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: Expected exactly one item in iterable, but got 'too', 'many', and perhaps more. >>> too_long = RuntimeError >>> one(it, too_long=too_long) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... RuntimeError Note that :func:`one` attempts to advance *iterable* twice to ensure there is only one item. See :func:`spy` or :func:`peekable` to check iterable contents less destructively. """ it = iter(iterable) try: first_value = next(it) except StopIteration as e: raise ( too_short or ValueError('too few items in iterable (expected 1)') ) from e try: second_value = next(it) except StopIteration: pass else: msg = ( 'Expected exactly one item in iterable, but got {!r}, {!r}, ' 'and perhaps more.'.format(first_value, second_value) ) raise too_long or ValueError(msg) return first_value def distinct_permutations(iterable, r=None): """Yield successive distinct permutations of the elements in *iterable*. >>> sorted(distinct_permutations([1, 0, 1])) [(0, 1, 1), (1, 0, 1), (1, 1, 0)] Equivalent to ``set(permutations(iterable))``, except duplicates are not generated and thrown away. For larger input sequences this is much more efficient. Duplicate permutations arise when there are duplicated elements in the input iterable. The number of items returned is `n! / (x_1! * x_2! * ... * x_n!)`, where `n` is the total number of items input, and each `x_i` is the count of a distinct item in the input sequence. If *r* is given, only the *r*-length permutations are yielded. >>> sorted(distinct_permutations([1, 0, 1], r=2)) [(0, 1), (1, 0), (1, 1)] >>> sorted(distinct_permutations(range(3), r=2)) [(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)] """ # Algorithm: https://w.wiki/Qai def _full(A): while True: # Yield the permutation we have yield tuple(A) # Find the largest index i such that A[i] < A[i + 1] for i in range(size - 2, -1, -1): if A[i] < A[i + 1]: break # If no such index exists, this permutation is the last one else: return # Find the largest index j greater than j such that A[i] < A[j] for j in range(size - 1, i, -1): if A[i] < A[j]: break # Swap the value of A[i] with that of A[j], then reverse the # sequence from A[i + 1] to form the new permutation A[i], A[j] = A[j], A[i] A[i + 1 :] = A[: i - size : -1] # A[i + 1:][::-1] # Algorithm: modified from the above def _partial(A, r): # Split A into the first r items and the last r items head, tail = A[:r], A[r:] right_head_indexes = range(r - 1, -1, -1) left_tail_indexes = range(len(tail)) while True: # Yield the permutation we have yield tuple(head) # Starting from the right, find the first index of the head with # value smaller than the maximum value of the tail - call it i. pivot = tail[-1] for i in right_head_indexes: if head[i] < pivot: break pivot = head[i] else: return # Starting from the left, find the first value of the tail # with a value greater than head[i] and swap. for j in left_tail_indexes: if tail[j] > head[i]: head[i], tail[j] = tail[j], head[i] break # If we didn't find one, start from the right and find the first # index of the head with a value greater than head[i] and swap. else: for j in right_head_indexes: if head[j] > head[i]: head[i], head[j] = head[j], head[i] break # Reverse head[i + 1:] and swap it with tail[:r - (i + 1)] tail += head[: i - r : -1] # head[i + 1:][::-1] i += 1 head[i:], tail[:] = tail[: r - i], tail[r - i :] items = sorted(iterable) size = len(items) if r is None: r = size if 0 < r <= size: return _full(items) if (r == size) else _partial(items, r) return iter(() if r else ((),)) def intersperse(e, iterable, n=1): """Intersperse filler element *e* among the items in *iterable*, leaving *n* items between each filler element. >>> list(intersperse('!', [1, 2, 3, 4, 5])) [1, '!', 2, '!', 3, '!', 4, '!', 5] >>> list(intersperse(None, [1, 2, 3, 4, 5], n=2)) [1, 2, None, 3, 4, None, 5] """ if n == 0: raise ValueError('n must be > 0') elif n == 1: # interleave(repeat(e), iterable) -> e, x_0, e, e, x_1, e, x_2... # islice(..., 1, None) -> x_0, e, e, x_1, e, x_2... return islice(interleave(repeat(e), iterable), 1, None) else: # interleave(filler, chunks) -> [e], [x_0, x_1], [e], [x_2, x_3]... # islice(..., 1, None) -> [x_0, x_1], [e], [x_2, x_3]... # flatten(...) -> x_0, x_1, e, x_2, x_3... filler = repeat([e]) chunks = chunked(iterable, n) return flatten(islice(interleave(filler, chunks), 1, None)) def unique_to_each(*iterables): """Return the elements from each of the input iterables that aren't in the other input iterables. For example, suppose you have a set of packages, each with a set of dependencies:: {'pkg_1': {'A', 'B'}, 'pkg_2': {'B', 'C'}, 'pkg_3': {'B', 'D'}} If you remove one package, which dependencies can also be removed? If ``pkg_1`` is removed, then ``A`` is no longer necessary - it is not associated with ``pkg_2`` or ``pkg_3``. Similarly, ``C`` is only needed for ``pkg_2``, and ``D`` is only needed for ``pkg_3``:: >>> unique_to_each({'A', 'B'}, {'B', 'C'}, {'B', 'D'}) [['A'], ['C'], ['D']] If there are duplicates in one input iterable that aren't in the others they will be duplicated in the output. Input order is preserved:: >>> unique_to_each("mississippi", "missouri") [['p', 'p'], ['o', 'u', 'r']] It is assumed that the elements of each iterable are hashable. """ pool = [list(it) for it in iterables] counts = Counter(chain.from_iterable(map(set, pool))) uniques = {element for element in counts if counts[element] == 1} return [list(filter(uniques.__contains__, it)) for it in pool] def windowed(seq, n, fillvalue=None, step=1): """Return a sliding window of width *n* over the given iterable. >>> all_windows = windowed([1, 2, 3, 4, 5], 3) >>> list(all_windows) [(1, 2, 3), (2, 3, 4), (3, 4, 5)] When the window is larger than the iterable, *fillvalue* is used in place of missing values: >>> list(windowed([1, 2, 3], 4)) [(1, 2, 3, None)] Each window will advance in increments of *step*: >>> list(windowed([1, 2, 3, 4, 5, 6], 3, fillvalue='!', step=2)) [(1, 2, 3), (3, 4, 5), (5, 6, '!')] To slide into the iterable's items, use :func:`chain` to add filler items to the left: >>> iterable = [1, 2, 3, 4] >>> n = 3 >>> padding = [None] * (n - 1) >>> list(windowed(chain(padding, iterable), 3)) [(None, None, 1), (None, 1, 2), (1, 2, 3), (2, 3, 4)] """ if n < 0: raise ValueError('n must be >= 0') if n == 0: yield tuple() return if step < 1: raise ValueError('step must be >= 1') window = deque(maxlen=n) i = n for _ in map(window.append, seq): i -= 1 if not i: i = step yield tuple(window) size = len(window) if size < n: yield tuple(chain(window, repeat(fillvalue, n - size))) elif 0 < i < min(step, n): window += (fillvalue,) * i yield tuple(window) def substrings(iterable): """Yield all of the substrings of *iterable*. >>> [''.join(s) for s in substrings('more')] ['m', 'o', 'r', 'e', 'mo', 'or', 're', 'mor', 'ore', 'more'] Note that non-string iterables can also be subdivided. >>> list(substrings([0, 1, 2])) [(0,), (1,), (2,), (0, 1), (1, 2), (0, 1, 2)] """ # The length-1 substrings seq = [] for item in iter(iterable): seq.append(item) yield (item,) seq = tuple(seq) item_count = len(seq) # And the rest for n in range(2, item_count + 1): for i in range(item_count - n + 1): yield seq[i : i + n] def substrings_indexes(seq, reverse=False): """Yield all substrings and their positions in *seq* The items yielded will be a tuple of the form ``(substr, i, j)``, where ``substr == seq[i:j]``. This function only works for iterables that support slicing, such as ``str`` objects. >>> for item in substrings_indexes('more'): ... print(item) ('m', 0, 1) ('o', 1, 2) ('r', 2, 3) ('e', 3, 4) ('mo', 0, 2) ('or', 1, 3) ('re', 2, 4) ('mor', 0, 3) ('ore', 1, 4) ('more', 0, 4) Set *reverse* to ``True`` to yield the same items in the opposite order. """ r = range(1, len(seq) + 1) if reverse: r = reversed(r) return ( (seq[i : i + L], i, i + L) for L in r for i in range(len(seq) - L + 1) ) class bucket: """Wrap *iterable* and return an object that buckets it iterable into child iterables based on a *key* function. >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character >>> sorted(list(s)) # Get the keys ['a', 'b', 'c'] >>> a_iterable = s['a'] >>> next(a_iterable) 'a1' >>> next(a_iterable) 'a2' >>> list(s['b']) ['b1', 'b2', 'b3'] The original iterable will be advanced and its items will be cached until they are used by the child iterables. This may require significant storage. By default, attempting to select a bucket to which no items belong will exhaust the iterable and cache all values. If you specify a *validator* function, selected buckets will instead be checked against it. >>> from itertools import count >>> it = count(1, 2) # Infinite sequence of odd numbers >>> key = lambda x: x % 10 # Bucket by last digit >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only >>> s = bucket(it, key=key, validator=validator) >>> 2 in s False >>> list(s[2]) [] """ def __init__(self, iterable, key, validator=None): self._it = iter(iterable) self._key = key self._cache = defaultdict(deque) self._validator = validator or (lambda x: True) def __contains__(self, value): if not self._validator(value): return False try: item = next(self[value]) except StopIteration: return False else: self._cache[value].appendleft(item) return True def _get_values(self, value): """ Helper to yield items from the parent iterator that match *value*. Items that don't match are stored in the local cache as they are encountered. """ while True: # If we've cached some items that match the target value, emit # the first one and evict it from the cache. if self._cache[value]: yield self._cache[value].popleft() # Otherwise we need to advance the parent iterator to search for # a matching item, caching the rest. else: while True: try: item = next(self._it) except StopIteration: return item_value = self._key(item) if item_value == value: yield item break elif self._validator(item_value): self._cache[item_value].append(item) def __iter__(self): for item in self._it: item_value = self._key(item) if self._validator(item_value): self._cache[item_value].append(item) yield from self._cache.keys() def __getitem__(self, value): if not self._validator(value): return iter(()) return self._get_values(value) def spy(iterable, n=1): """Return a 2-tuple with a list containing the first *n* elements of *iterable*, and an iterator with the same items as *iterable*. This allows you to "look ahead" at the items in the iterable without advancing it. There is one item in the list by default: >>> iterable = 'abcdefg' >>> head, iterable = spy(iterable) >>> head ['a'] >>> list(iterable) ['a', 'b', 'c', 'd', 'e', 'f', 'g'] You may use unpacking to retrieve items instead of lists: >>> (head,), iterable = spy('abcdefg') >>> head 'a' >>> (first, second), iterable = spy('abcdefg', 2) >>> first 'a' >>> second 'b' The number of items requested can be larger than the number of items in the iterable: >>> iterable = [1, 2, 3, 4, 5] >>> head, iterable = spy(iterable, 10) >>> head [1, 2, 3, 4, 5] >>> list(iterable) [1, 2, 3, 4, 5] """ it = iter(iterable) head = take(n, it) return head.copy(), chain(head, it) def interleave(*iterables): """Return a new iterable yielding from each iterable in turn, until the shortest is exhausted. >>> list(interleave([1, 2, 3], [4, 5], [6, 7, 8])) [1, 4, 6, 2, 5, 7] For a version that doesn't terminate after the shortest iterable is exhausted, see :func:`interleave_longest`. """ return chain.from_iterable(zip(*iterables)) def interleave_longest(*iterables): """Return a new iterable yielding from each iterable in turn, skipping any that are exhausted. >>> list(interleave_longest([1, 2, 3], [4, 5], [6, 7, 8])) [1, 4, 6, 2, 5, 7, 3, 8] This function produces the same output as :func:`roundrobin`, but may perform better for some inputs (in particular when the number of iterables is large). """ i = chain.from_iterable(zip_longest(*iterables, fillvalue=_marker)) return (x for x in i if x is not _marker) def collapse(iterable, base_type=None, levels=None): """Flatten an iterable with multiple levels of nesting (e.g., a list of lists of tuples) into non-iterable types. >>> iterable = [(1, 2), ([3, 4], [[5], [6]])] >>> list(collapse(iterable)) [1, 2, 3, 4, 5, 6] Binary and text strings are not considered iterable and will not be collapsed. To avoid collapsing other types, specify *base_type*: >>> iterable = ['ab', ('cd', 'ef'), ['gh', 'ij']] >>> list(collapse(iterable, base_type=tuple)) ['ab', ('cd', 'ef'), 'gh', 'ij'] Specify *levels* to stop flattening after a certain level: >>> iterable = [('a', ['b']), ('c', ['d'])] >>> list(collapse(iterable)) # Fully flattened ['a', 'b', 'c', 'd'] >>> list(collapse(iterable, levels=1)) # Only one level flattened ['a', ['b'], 'c', ['d']] """ def walk(node, level): if ( ((levels is not None) and (level > levels)) or isinstance(node, (str, bytes)) or ((base_type is not None) and isinstance(node, base_type)) ): yield node return try: tree = iter(node) except TypeError: yield node return else: for child in tree: yield from walk(child, level + 1) yield from walk(iterable, 0) def side_effect(func, iterable, chunk_size=None, before=None, after=None): """Invoke *func* on each item in *iterable* (or on each *chunk_size* group of items) before yielding the item. `func` must be a function that takes a single argument. Its return value will be discarded. *before* and *after* are optional functions that take no arguments. They will be executed before iteration starts and after it ends, respectively. `side_effect` can be used for logging, updating progress bars, or anything that is not functionally "pure." Emitting a status message: >>> from more_itertools import consume >>> func = lambda item: print('Received {}'.format(item)) >>> consume(side_effect(func, range(2))) Received 0 Received 1 Operating on chunks of items: >>> pair_sums = [] >>> func = lambda chunk: pair_sums.append(sum(chunk)) >>> list(side_effect(func, [0, 1, 2, 3, 4, 5], 2)) [0, 1, 2, 3, 4, 5] >>> list(pair_sums) [1, 5, 9] Writing to a file-like object: >>> from io import StringIO >>> from more_itertools import consume >>> f = StringIO() >>> func = lambda x: print(x, file=f) >>> before = lambda: print(u'HEADER', file=f) >>> after = f.close >>> it = [u'a', u'b', u'c'] >>> consume(side_effect(func, it, before=before, after=after)) >>> f.closed True """ try: if before is not None: before() if chunk_size is None: for item in iterable: func(item) yield item else: for chunk in chunked(iterable, chunk_size): func(chunk) yield from chunk finally: if after is not None: after() def sliced(seq, n, strict=False): """Yield slices of length *n* from the sequence *seq*. >>> list(sliced((1, 2, 3, 4, 5, 6), 3)) [(1, 2, 3), (4, 5, 6)] By the default, the last yielded slice will have fewer than *n* elements if the length of *seq* is not divisible by *n*: >>> list(sliced((1, 2, 3, 4, 5, 6, 7, 8), 3)) [(1, 2, 3), (4, 5, 6), (7, 8)] If the length of *seq* is not divisible by *n* and *strict* is ``True``, then ``ValueError`` will be raised before the last slice is yielded. This function will only work for iterables that support slicing. For non-sliceable iterables, see :func:`chunked`. """ iterator = takewhile(len, (seq[i : i + n] for i in count(0, n))) if strict: def ret(): for _slice in iterator: if len(_slice) != n: raise ValueError("seq is not divisible by n.") yield _slice return iter(ret()) else: return iterator def split_at(iterable, pred, maxsplit=-1, keep_separator=False): """Yield lists of items from *iterable*, where each list is delimited by an item where callable *pred* returns ``True``. >>> list(split_at('abcdcba', lambda x: x == 'b')) [['a'], ['c', 'd', 'c'], ['a']] >>> list(split_at(range(10), lambda n: n % 2 == 1)) [[0], [2], [4], [6], [8], []] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_at(range(10), lambda n: n % 2 == 1, maxsplit=2)) [[0], [2], [4, 5, 6, 7, 8, 9]] By default, the delimiting items are not included in the output. The include them, set *keep_separator* to ``True``. >>> list(split_at('abcdcba', lambda x: x == 'b', keep_separator=True)) [['a'], ['b'], ['c', 'd', 'c'], ['b'], ['a']] """ if maxsplit == 0: yield list(iterable) return buf = [] it = iter(iterable) for item in it: if pred(item): yield buf if keep_separator: yield [item] if maxsplit == 1: yield list(it) return buf = [] maxsplit -= 1 else: buf.append(item) yield buf def split_before(iterable, pred, maxsplit=-1): """Yield lists of items from *iterable*, where each list ends just before an item for which callable *pred* returns ``True``: >>> list(split_before('OneTwo', lambda s: s.isupper())) [['O', 'n', 'e'], ['T', 'w', 'o']] >>> list(split_before(range(10), lambda n: n % 3 == 0)) [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_before(range(10), lambda n: n % 3 == 0, maxsplit=2)) [[0, 1, 2], [3, 4, 5], [6, 7, 8, 9]] """ if maxsplit == 0: yield list(iterable) return buf = [] it = iter(iterable) for item in it: if pred(item) and buf: yield buf if maxsplit == 1: yield [item] + list(it) return buf = [] maxsplit -= 1 buf.append(item) if buf: yield buf def split_after(iterable, pred, maxsplit=-1): """Yield lists of items from *iterable*, where each list ends with an item where callable *pred* returns ``True``: >>> list(split_after('one1two2', lambda s: s.isdigit())) [['o', 'n', 'e', '1'], ['t', 'w', 'o', '2']] >>> list(split_after(range(10), lambda n: n % 3 == 0)) [[0], [1, 2, 3], [4, 5, 6], [7, 8, 9]] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_after(range(10), lambda n: n % 3 == 0, maxsplit=2)) [[0], [1, 2, 3], [4, 5, 6, 7, 8, 9]] """ if maxsplit == 0: yield list(iterable) return buf = [] it = iter(iterable) for item in it: buf.append(item) if pred(item) and buf: yield buf if maxsplit == 1: yield list(it) return buf = [] maxsplit -= 1 if buf: yield buf def split_when(iterable, pred, maxsplit=-1): """Split *iterable* into pieces based on the output of *pred*. *pred* should be a function that takes successive pairs of items and returns ``True`` if the iterable should be split in between them. For example, to find runs of increasing numbers, split the iterable when element ``i`` is larger than element ``i + 1``: >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], lambda x, y: x > y)) [[1, 2, 3, 3], [2, 5], [2, 4], [2]] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], ... lambda x, y: x > y, maxsplit=2)) [[1, 2, 3, 3], [2, 5], [2, 4, 2]] """ if maxsplit == 0: yield list(iterable) return it = iter(iterable) try: cur_item = next(it) except StopIteration: return buf = [cur_item] for next_item in it: if pred(cur_item, next_item): yield buf if maxsplit == 1: yield [next_item] + list(it) return buf = [] maxsplit -= 1 buf.append(next_item) cur_item = next_item yield buf def split_into(iterable, sizes): """Yield a list of sequential items from *iterable* of length 'n' for each integer 'n' in *sizes*. >>> list(split_into([1,2,3,4,5,6], [1,2,3])) [[1], [2, 3], [4, 5, 6]] If the sum of *sizes* is smaller than the length of *iterable*, then the remaining items of *iterable* will not be returned. >>> list(split_into([1,2,3,4,5,6], [2,3])) [[1, 2], [3, 4, 5]] If the sum of *sizes* is larger than the length of *iterable*, fewer items will be returned in the iteration that overruns *iterable* and further lists will be empty: >>> list(split_into([1,2,3,4], [1,2,3,4])) [[1], [2, 3], [4], []] When a ``None`` object is encountered in *sizes*, the returned list will contain items up to the end of *iterable* the same way that itertools.slice does: >>> list(split_into([1,2,3,4,5,6,7,8,9,0], [2,3,None])) [[1, 2], [3, 4, 5], [6, 7, 8, 9, 0]] :func:`split_into` can be useful for grouping a series of items where the sizes of the groups are not uniform. An example would be where in a row from a table, multiple columns represent elements of the same feature (e.g. a point represented by x,y,z) but, the format is not the same for all columns. """ # convert the iterable argument into an iterator so its contents can # be consumed by islice in case it is a generator it = iter(iterable) for size in sizes: if size is None: yield list(it) return else: yield list(islice(it, size)) def padded(iterable, fillvalue=None, n=None, next_multiple=False): """Yield the elements from *iterable*, followed by *fillvalue*, such that at least *n* items are emitted. >>> list(padded([1, 2, 3], '?', 5)) [1, 2, 3, '?', '?'] If *next_multiple* is ``True``, *fillvalue* will be emitted until the number of items emitted is a multiple of *n*:: >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True)) [1, 2, 3, 4, None, None] If *n* is ``None``, *fillvalue* will be emitted indefinitely. """ it = iter(iterable) if n is None: yield from chain(it, repeat(fillvalue)) elif n < 1: raise ValueError('n must be at least 1') else: item_count = 0 for item in it: yield item item_count += 1 remaining = (n - item_count) % n if next_multiple else n - item_count for _ in range(remaining): yield fillvalue def repeat_last(iterable, default=None): """After the *iterable* is exhausted, keep yielding its last element. >>> list(islice(repeat_last(range(3)), 5)) [0, 1, 2, 2, 2] If the iterable is empty, yield *default* forever:: >>> list(islice(repeat_last(range(0), 42), 5)) [42, 42, 42, 42, 42] """ item = _marker for item in iterable: yield item final = default if item is _marker else item yield from repeat(final) def distribute(n, iterable): """Distribute the items from *iterable* among *n* smaller iterables. >>> group_1, group_2 = distribute(2, [1, 2, 3, 4, 5, 6]) >>> list(group_1) [1, 3, 5] >>> list(group_2) [2, 4, 6] If the length of *iterable* is not evenly divisible by *n*, then the length of the returned iterables will not be identical: >>> children = distribute(3, [1, 2, 3, 4, 5, 6, 7]) >>> [list(c) for c in children] [[1, 4, 7], [2, 5], [3, 6]] If the length of *iterable* is smaller than *n*, then the last returned iterables will be empty: >>> children = distribute(5, [1, 2, 3]) >>> [list(c) for c in children] [[1], [2], [3], [], []] This function uses :func:`itertools.tee` and may require significant storage. If you need the order items in the smaller iterables to match the original iterable, see :func:`divide`. """ if n < 1: raise ValueError('n must be at least 1') children = tee(iterable, n) return [islice(it, index, None, n) for index, it in enumerate(children)] def stagger(iterable, offsets=(-1, 0, 1), longest=False, fillvalue=None): """Yield tuples whose elements are offset from *iterable*. The amount by which the `i`-th item in each tuple is offset is given by the `i`-th item in *offsets*. >>> list(stagger([0, 1, 2, 3])) [(None, 0, 1), (0, 1, 2), (1, 2, 3)] >>> list(stagger(range(8), offsets=(0, 2, 4))) [(0, 2, 4), (1, 3, 5), (2, 4, 6), (3, 5, 7)] By default, the sequence will end when the final element of a tuple is the last item in the iterable. To continue until the first element of a tuple is the last item in the iterable, set *longest* to ``True``:: >>> list(stagger([0, 1, 2, 3], longest=True)) [(None, 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, None), (3, None, None)] By default, ``None`` will be used to replace offsets beyond the end of the sequence. Specify *fillvalue* to use some other value. """ children = tee(iterable, len(offsets)) return zip_offset( *children, offsets=offsets, longest=longest, fillvalue=fillvalue ) class UnequalIterablesError(ValueError): def __init__(self, details=None): msg = 'Iterables have different lengths' if details is not None: msg += (': index 0 has length {}; index {} has length {}').format( *details ) super().__init__(msg) def _zip_equal_generator(iterables): for combo in zip_longest(*iterables, fillvalue=_marker): for val in combo: if val is _marker: raise UnequalIterablesError() yield combo def zip_equal(*iterables): """``zip`` the input *iterables* together, but raise ``UnequalIterablesError`` if they aren't all the same length. >>> it_1 = range(3) >>> it_2 = iter('abc') >>> list(zip_equal(it_1, it_2)) [(0, 'a'), (1, 'b'), (2, 'c')] >>> it_1 = range(3) >>> it_2 = iter('abcd') >>> list(zip_equal(it_1, it_2)) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... more_itertools.more.UnequalIterablesError: Iterables have different lengths """ if hexversion >= 0x30A00A6: warnings.warn( ( 'zip_equal will be removed in a future version of ' 'more-itertools. Use the builtin zip function with ' 'strict=True instead.' ), DeprecationWarning, ) # Check whether the iterables are all the same size. try: first_size = len(iterables[0]) for i, it in enumerate(iterables[1:], 1): size = len(it) if size != first_size: break else: # If we didn't break out, we can use the built-in zip. return zip(*iterables) # If we did break out, there was a mismatch. raise UnequalIterablesError(details=(first_size, i, size)) # If any one of the iterables didn't have a length, start reading # them until one runs out. except TypeError: return _zip_equal_generator(iterables) def zip_offset(*iterables, offsets, longest=False, fillvalue=None): """``zip`` the input *iterables* together, but offset the `i`-th iterable by the `i`-th item in *offsets*. >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1))) [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e')] This can be used as a lightweight alternative to SciPy or pandas to analyze data sets in which some series have a lead or lag relationship. By default, the sequence will end when the shortest iterable is exhausted. To continue until the longest iterable is exhausted, set *longest* to ``True``. >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1), longest=True)) [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e'), (None, 'f')] By default, ``None`` will be used to replace offsets beyond the end of the sequence. Specify *fillvalue* to use some other value. """ if len(iterables) != len(offsets): raise ValueError("Number of iterables and offsets didn't match") staggered = [] for it, n in zip(iterables, offsets): if n < 0: staggered.append(chain(repeat(fillvalue, -n), it)) elif n > 0: staggered.append(islice(it, n, None)) else: staggered.append(it) if longest: return zip_longest(*staggered, fillvalue=fillvalue) return zip(*staggered) def sort_together(iterables, key_list=(0,), key=None, reverse=False): """Return the input iterables sorted together, with *key_list* as the priority for sorting. All iterables are trimmed to the length of the shortest one. This can be used like the sorting function in a spreadsheet. If each iterable represents a column of data, the key list determines which columns are used for sorting. By default, all iterables are sorted using the ``0``-th iterable:: >>> iterables = [(4, 3, 2, 1), ('a', 'b', 'c', 'd')] >>> sort_together(iterables) [(1, 2, 3, 4), ('d', 'c', 'b', 'a')] Set a different key list to sort according to another iterable. Specifying multiple keys dictates how ties are broken:: >>> iterables = [(3, 1, 2), (0, 1, 0), ('c', 'b', 'a')] >>> sort_together(iterables, key_list=(1, 2)) [(2, 3, 1), (0, 0, 1), ('a', 'c', 'b')] To sort by a function of the elements of the iterable, pass a *key* function. Its arguments are the elements of the iterables corresponding to the key list:: >>> names = ('a', 'b', 'c') >>> lengths = (1, 2, 3) >>> widths = (5, 2, 1) >>> def area(length, width): ... return length * width >>> sort_together([names, lengths, widths], key_list=(1, 2), key=area) [('c', 'b', 'a'), (3, 2, 1), (1, 2, 5)] Set *reverse* to ``True`` to sort in descending order. >>> sort_together([(1, 2, 3), ('c', 'b', 'a')], reverse=True) [(3, 2, 1), ('a', 'b', 'c')] """ if key is None: # if there is no key function, the key argument to sorted is an # itemgetter key_argument = itemgetter(*key_list) else: # if there is a key function, call it with the items at the offsets # specified by the key function as arguments key_list = list(key_list) if len(key_list) == 1: # if key_list contains a single item, pass the item at that offset # as the only argument to the key function key_offset = key_list[0] key_argument = lambda zipped_items: key(zipped_items[key_offset]) else: # if key_list contains multiple items, use itemgetter to return a # tuple of items, which we pass as *args to the key function get_key_items = itemgetter(*key_list) key_argument = lambda zipped_items: key( *get_key_items(zipped_items) ) return list( zip(*sorted(zip(*iterables), key=key_argument, reverse=reverse)) ) def unzip(iterable): """The inverse of :func:`zip`, this function disaggregates the elements of the zipped *iterable*. The ``i``-th iterable contains the ``i``-th element from each element of the zipped iterable. The first element is used to to determine the length of the remaining elements. >>> iterable = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] >>> letters, numbers = unzip(iterable) >>> list(letters) ['a', 'b', 'c', 'd'] >>> list(numbers) [1, 2, 3, 4] This is similar to using ``zip(*iterable)``, but it avoids reading *iterable* into memory. Note, however, that this function uses :func:`itertools.tee` and thus may require significant storage. """ head, iterable = spy(iter(iterable)) if not head: # empty iterable, e.g. zip([], [], []) return () # spy returns a one-length iterable as head head = head[0] iterables = tee(iterable, len(head)) def itemgetter(i): def getter(obj): try: return obj[i] except IndexError: # basically if we have an iterable like # iter([(1, 2, 3), (4, 5), (6,)]) # the second unzipped iterable would fail at the third tuple # since it would try to access tup[1] # same with the third unzipped iterable and the second tuple # to support these "improperly zipped" iterables, # we create a custom itemgetter # which just stops the unzipped iterables # at first length mismatch raise StopIteration return getter return tuple(map(itemgetter(i), it) for i, it in enumerate(iterables)) def divide(n, iterable): """Divide the elements from *iterable* into *n* parts, maintaining order. >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6]) >>> list(group_1) [1, 2, 3] >>> list(group_2) [4, 5, 6] If the length of *iterable* is not evenly divisible by *n*, then the length of the returned iterables will not be identical: >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7]) >>> [list(c) for c in children] [[1, 2, 3], [4, 5], [6, 7]] If the length of the iterable is smaller than n, then the last returned iterables will be empty: >>> children = divide(5, [1, 2, 3]) >>> [list(c) for c in children] [[1], [2], [3], [], []] This function will exhaust the iterable before returning and may require significant storage. If order is not important, see :func:`distribute`, which does not first pull the iterable into memory. """ if n < 1: raise ValueError('n must be at least 1') try: iterable[:0] except TypeError: seq = tuple(iterable) else: seq = iterable q, r = divmod(len(seq), n) ret = [] stop = 0 for i in range(1, n + 1): start = stop stop += q + 1 if i <= r else q ret.append(iter(seq[start:stop])) return ret def always_iterable(obj, base_type=(str, bytes)): """If *obj* is iterable, return an iterator over its items:: >>> obj = (1, 2, 3) >>> list(always_iterable(obj)) [1, 2, 3] If *obj* is not iterable, return a one-item iterable containing *obj*:: >>> obj = 1 >>> list(always_iterable(obj)) [1] If *obj* is ``None``, return an empty iterable: >>> obj = None >>> list(always_iterable(None)) [] By default, binary and text strings are not considered iterable:: >>> obj = 'foo' >>> list(always_iterable(obj)) ['foo'] If *base_type* is set, objects for which ``isinstance(obj, base_type)`` returns ``True`` won't be considered iterable. >>> obj = {'a': 1} >>> list(always_iterable(obj)) # Iterate over the dict's keys ['a'] >>> list(always_iterable(obj, base_type=dict)) # Treat dicts as a unit [{'a': 1}] Set *base_type* to ``None`` to avoid any special handling and treat objects Python considers iterable as iterable: >>> obj = 'foo' >>> list(always_iterable(obj, base_type=None)) ['f', 'o', 'o'] """ if obj is None: return iter(()) if (base_type is not None) and isinstance(obj, base_type): return iter((obj,)) try: return iter(obj) except TypeError: return iter((obj,)) def adjacent(predicate, iterable, distance=1): """Return an iterable over `(bool, item)` tuples where the `item` is drawn from *iterable* and the `bool` indicates whether that item satisfies the *predicate* or is adjacent to an item that does. For example, to find whether items are adjacent to a ``3``:: >>> list(adjacent(lambda x: x == 3, range(6))) [(False, 0), (False, 1), (True, 2), (True, 3), (True, 4), (False, 5)] Set *distance* to change what counts as adjacent. For example, to find whether items are two places away from a ``3``: >>> list(adjacent(lambda x: x == 3, range(6), distance=2)) [(False, 0), (True, 1), (True, 2), (True, 3), (True, 4), (True, 5)] This is useful for contextualizing the results of a search function. For example, a code comparison tool might want to identify lines that have changed, but also surrounding lines to give the viewer of the diff context. The predicate function will only be called once for each item in the iterable. See also :func:`groupby_transform`, which can be used with this function to group ranges of items with the same `bool` value. """ # Allow distance=0 mainly for testing that it reproduces results with map() if distance < 0: raise ValueError('distance must be at least 0') i1, i2 = tee(iterable) padding = [False] * distance selected = chain(padding, map(predicate, i1), padding) adjacent_to_selected = map(any, windowed(selected, 2 * distance + 1)) return zip(adjacent_to_selected, i2) def groupby_transform(iterable, keyfunc=None, valuefunc=None, reducefunc=None): """An extension of :func:`itertools.groupby` that can apply transformations to the grouped data. * *keyfunc* is a function computing a key value for each item in *iterable* * *valuefunc* is a function that transforms the individual items from *iterable* after grouping * *reducefunc* is a function that transforms each group of items >>> iterable = 'aAAbBBcCC' >>> keyfunc = lambda k: k.upper() >>> valuefunc = lambda v: v.lower() >>> reducefunc = lambda g: ''.join(g) >>> list(groupby_transform(iterable, keyfunc, valuefunc, reducefunc)) [('A', 'aaa'), ('B', 'bbb'), ('C', 'ccc')] Each optional argument defaults to an identity function if not specified. :func:`groupby_transform` is useful when grouping elements of an iterable using a separate iterable as the key. To do this, :func:`zip` the iterables and pass a *keyfunc* that extracts the first element and a *valuefunc* that extracts the second element:: >>> from operator import itemgetter >>> keys = [0, 0, 1, 1, 1, 2, 2, 2, 3] >>> values = 'abcdefghi' >>> iterable = zip(keys, values) >>> grouper = groupby_transform(iterable, itemgetter(0), itemgetter(1)) >>> [(k, ''.join(g)) for k, g in grouper] [(0, 'ab'), (1, 'cde'), (2, 'fgh'), (3, 'i')] Note that the order of items in the iterable is significant. Only adjacent items are grouped together, so if you don't want any duplicate groups, you should sort the iterable by the key function. """ ret = groupby(iterable, keyfunc) if valuefunc: ret = ((k, map(valuefunc, g)) for k, g in ret) if reducefunc: ret = ((k, reducefunc(g)) for k, g in ret) return ret class numeric_range(abc.Sequence, abc.Hashable): """An extension of the built-in ``range()`` function whose arguments can be any orderable numeric type. With only *stop* specified, *start* defaults to ``0`` and *step* defaults to ``1``. The output items will match the type of *stop*: >>> list(numeric_range(3.5)) [0.0, 1.0, 2.0, 3.0] With only *start* and *stop* specified, *step* defaults to ``1``. The output items will match the type of *start*: >>> from decimal import Decimal >>> start = Decimal('2.1') >>> stop = Decimal('5.1') >>> list(numeric_range(start, stop)) [Decimal('2.1'), Decimal('3.1'), Decimal('4.1')] With *start*, *stop*, and *step* specified the output items will match the type of ``start + step``: >>> from fractions import Fraction >>> start = Fraction(1, 2) # Start at 1/2 >>> stop = Fraction(5, 2) # End at 5/2 >>> step = Fraction(1, 2) # Count by 1/2 >>> list(numeric_range(start, stop, step)) [Fraction(1, 2), Fraction(1, 1), Fraction(3, 2), Fraction(2, 1)] If *step* is zero, ``ValueError`` is raised. Negative steps are supported: >>> list(numeric_range(3, -1, -1.0)) [3.0, 2.0, 1.0, 0.0] Be aware of the limitations of floating point numbers; the representation of the yielded numbers may be surprising. ``datetime.datetime`` objects can be used for *start* and *stop*, if *step* is a ``datetime.timedelta`` object: >>> import datetime >>> start = datetime.datetime(2019, 1, 1) >>> stop = datetime.datetime(2019, 1, 3) >>> step = datetime.timedelta(days=1) >>> items = iter(numeric_range(start, stop, step)) >>> next(items) datetime.datetime(2019, 1, 1, 0, 0) >>> next(items) datetime.datetime(2019, 1, 2, 0, 0) """ _EMPTY_HASH = hash(range(0, 0)) def __init__(self, *args): argc = len(args) if argc == 1: (self._stop,) = args self._start = type(self._stop)(0) self._step = type(self._stop - self._start)(1) elif argc == 2: self._start, self._stop = args self._step = type(self._stop - self._start)(1) elif argc == 3: self._start, self._stop, self._step = args elif argc == 0: raise TypeError( 'numeric_range expected at least ' '1 argument, got {}'.format(argc) ) else: raise TypeError( 'numeric_range expected at most ' '3 arguments, got {}'.format(argc) ) self._zero = type(self._step)(0) if self._step == self._zero: raise ValueError('numeric_range() arg 3 must not be zero') self._growing = self._step > self._zero self._init_len() def __bool__(self): if self._growing: return self._start < self._stop else: return self._start > self._stop def __contains__(self, elem): if self._growing: if self._start <= elem < self._stop: return (elem - self._start) % self._step == self._zero else: if self._start >= elem > self._stop: return (self._start - elem) % (-self._step) == self._zero return False def __eq__(self, other): if isinstance(other, numeric_range): empty_self = not bool(self) empty_other = not bool(other) if empty_self or empty_other: return empty_self and empty_other # True if both empty else: return ( self._start == other._start and self._step == other._step and self._get_by_index(-1) == other._get_by_index(-1) ) else: return False def __getitem__(self, key): if isinstance(key, int): return self._get_by_index(key) elif isinstance(key, slice): step = self._step if key.step is None else key.step * self._step if key.start is None or key.start <= -self._len: start = self._start elif key.start >= self._len: start = self._stop else: # -self._len < key.start < self._len start = self._get_by_index(key.start) if key.stop is None or key.stop >= self._len: stop = self._stop elif key.stop <= -self._len: stop = self._start else: # -self._len < key.stop < self._len stop = self._get_by_index(key.stop) return numeric_range(start, stop, step) else: raise TypeError( 'numeric range indices must be ' 'integers or slices, not {}'.format(type(key).__name__) ) def __hash__(self): if self: return hash((self._start, self._get_by_index(-1), self._step)) else: return self._EMPTY_HASH def __iter__(self): values = (self._start + (n * self._step) for n in count()) if self._growing: return takewhile(partial(gt, self._stop), values) else: return takewhile(partial(lt, self._stop), values) def __len__(self): return self._len def _init_len(self): if self._growing: start = self._start stop = self._stop step = self._step else: start = self._stop stop = self._start step = -self._step distance = stop - start if distance <= self._zero: self._len = 0 else: # distance > 0 and step > 0: regular euclidean division q, r = divmod(distance, step) self._len = int(q) + int(r != self._zero) def __reduce__(self): return numeric_range, (self._start, self._stop, self._step) def __repr__(self): if self._step == 1: return "numeric_range({}, {})".format( repr(self._start), repr(self._stop) ) else: return "numeric_range({}, {}, {})".format( repr(self._start), repr(self._stop), repr(self._step) ) def __reversed__(self): return iter( numeric_range( self._get_by_index(-1), self._start - self._step, -self._step ) ) def count(self, value): return int(value in self) def index(self, value): if self._growing: if self._start <= value < self._stop: q, r = divmod(value - self._start, self._step) if r == self._zero: return int(q) else: if self._start >= value > self._stop: q, r = divmod(self._start - value, -self._step) if r == self._zero: return int(q) raise ValueError("{} is not in numeric range".format(value)) def _get_by_index(self, i): if i < 0: i += self._len if i < 0 or i >= self._len: raise IndexError("numeric range object index out of range") return self._start + i * self._step def count_cycle(iterable, n=None): """Cycle through the items from *iterable* up to *n* times, yielding the number of completed cycles along with each item. If *n* is omitted the process repeats indefinitely. >>> list(count_cycle('AB', 3)) [(0, 'A'), (0, 'B'), (1, 'A'), (1, 'B'), (2, 'A'), (2, 'B')] """ iterable = tuple(iterable) if not iterable: return iter(()) counter = count() if n is None else range(n) return ((i, item) for i in counter for item in iterable) def mark_ends(iterable): """Yield 3-tuples of the form ``(is_first, is_last, item)``. >>> list(mark_ends('ABC')) [(True, False, 'A'), (False, False, 'B'), (False, True, 'C')] Use this when looping over an iterable to take special action on its first and/or last items: >>> iterable = ['Header', 100, 200, 'Footer'] >>> total = 0 >>> for is_first, is_last, item in mark_ends(iterable): ... if is_first: ... continue # Skip the header ... if is_last: ... continue # Skip the footer ... total += item >>> print(total) 300 """ it = iter(iterable) try: b = next(it) except StopIteration: return try: for i in count(): a = b b = next(it) yield i == 0, False, a except StopIteration: yield i == 0, True, a def locate(iterable, pred=bool, window_size=None): """Yield the index of each item in *iterable* for which *pred* returns ``True``. *pred* defaults to :func:`bool`, which will select truthy items: >>> list(locate([0, 1, 1, 0, 1, 0, 0])) [1, 2, 4] Set *pred* to a custom function to, e.g., find the indexes for a particular item. >>> list(locate(['a', 'b', 'c', 'b'], lambda x: x == 'b')) [1, 3] If *window_size* is given, then the *pred* function will be called with that many items. This enables searching for sub-sequences: >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3] >>> pred = lambda *args: args == (1, 2, 3) >>> list(locate(iterable, pred=pred, window_size=3)) [1, 5, 9] Use with :func:`seekable` to find indexes and then retrieve the associated items: >>> from itertools import count >>> from more_itertools import seekable >>> source = (3 * n + 1 if (n % 2) else n // 2 for n in count()) >>> it = seekable(source) >>> pred = lambda x: x > 100 >>> indexes = locate(it, pred=pred) >>> i = next(indexes) >>> it.seek(i) >>> next(it) 106 """ if window_size is None: return compress(count(), map(pred, iterable)) if window_size < 1: raise ValueError('window size must be at least 1') it = windowed(iterable, window_size, fillvalue=_marker) return compress(count(), starmap(pred, it)) def lstrip(iterable, pred): """Yield the items from *iterable*, but strip any from the beginning for which *pred* returns ``True``. For example, to remove a set of items from the start of an iterable: >>> iterable = (None, False, None, 1, 2, None, 3, False, None) >>> pred = lambda x: x in {None, False, ''} >>> list(lstrip(iterable, pred)) [1, 2, None, 3, False, None] This function is analogous to to :func:`str.lstrip`, and is essentially an wrapper for :func:`itertools.dropwhile`. """ return dropwhile(pred, iterable) def rstrip(iterable, pred): """Yield the items from *iterable*, but strip any from the end for which *pred* returns ``True``. For example, to remove a set of items from the end of an iterable: >>> iterable = (None, False, None, 1, 2, None, 3, False, None) >>> pred = lambda x: x in {None, False, ''} >>> list(rstrip(iterable, pred)) [None, False, None, 1, 2, None, 3] This function is analogous to :func:`str.rstrip`. """ cache = [] cache_append = cache.append cache_clear = cache.clear for x in iterable: if pred(x): cache_append(x) else: yield from cache cache_clear() yield x def strip(iterable, pred): """Yield the items from *iterable*, but strip any from the beginning and end for which *pred* returns ``True``. For example, to remove a set of items from both ends of an iterable: >>> iterable = (None, False, None, 1, 2, None, 3, False, None) >>> pred = lambda x: x in {None, False, ''} >>> list(strip(iterable, pred)) [1, 2, None, 3] This function is analogous to :func:`str.strip`. """ return rstrip(lstrip(iterable, pred), pred) class islice_extended: """An extension of :func:`itertools.islice` that supports negative values for *stop*, *start*, and *step*. >>> iterable = iter('abcdefgh') >>> list(islice_extended(iterable, -4, -1)) ['e', 'f', 'g'] Slices with negative values require some caching of *iterable*, but this function takes care to minimize the amount of memory required. For example, you can use a negative step with an infinite iterator: >>> from itertools import count >>> list(islice_extended(count(), 110, 99, -2)) [110, 108, 106, 104, 102, 100] You can also use slice notation directly: >>> iterable = map(str, count()) >>> it = islice_extended(iterable)[10:20:2] >>> list(it) ['10', '12', '14', '16', '18'] """ def __init__(self, iterable, *args): it = iter(iterable) if args: self._iterable = _islice_helper(it, slice(*args)) else: self._iterable = it def __iter__(self): return self def __next__(self): return next(self._iterable) def __getitem__(self, key): if isinstance(key, slice): return islice_extended(_islice_helper(self._iterable, key)) raise TypeError('islice_extended.__getitem__ argument must be a slice') def _islice_helper(it, s): start = s.start stop = s.stop if s.step == 0: raise ValueError('step argument must be a non-zero integer or None.') step = s.step or 1 if step > 0: start = 0 if (start is None) else start if start < 0: # Consume all but the last -start items cache = deque(enumerate(it, 1), maxlen=-start) len_iter = cache[-1][0] if cache else 0 # Adjust start to be positive i = max(len_iter + start, 0) # Adjust stop to be positive if stop is None: j = len_iter elif stop >= 0: j = min(stop, len_iter) else: j = max(len_iter + stop, 0) # Slice the cache n = j - i if n <= 0: return for index, item in islice(cache, 0, n, step): yield item elif (stop is not None) and (stop < 0): # Advance to the start position next(islice(it, start, start), None) # When stop is negative, we have to carry -stop items while # iterating cache = deque(islice(it, -stop), maxlen=-stop) for index, item in enumerate(it): cached_item = cache.popleft() if index % step == 0: yield cached_item cache.append(item) else: # When both start and stop are positive we have the normal case yield from islice(it, start, stop, step) else: start = -1 if (start is None) else start if (stop is not None) and (stop < 0): # Consume all but the last items n = -stop - 1 cache = deque(enumerate(it, 1), maxlen=n) len_iter = cache[-1][0] if cache else 0 # If start and stop are both negative they are comparable and # we can just slice. Otherwise we can adjust start to be negative # and then slice. if start < 0: i, j = start, stop else: i, j = min(start - len_iter, -1), None for index, item in list(cache)[i:j:step]: yield item else: # Advance to the stop position if stop is not None: m = stop + 1 next(islice(it, m, m), None) # stop is positive, so if start is negative they are not comparable # and we need the rest of the items. if start < 0: i = start n = None # stop is None and start is positive, so we just need items up to # the start index. elif stop is None: i = None n = start + 1 # Both stop and start are positive, so they are comparable. else: i = None n = start - stop if n <= 0: return cache = list(islice(it, n)) yield from cache[i::step] def always_reversible(iterable): """An extension of :func:`reversed` that supports all iterables, not just those which implement the ``Reversible`` or ``Sequence`` protocols. >>> print(*always_reversible(x for x in range(3))) 2 1 0 If the iterable is already reversible, this function returns the result of :func:`reversed()`. If the iterable is not reversible, this function will cache the remaining items in the iterable and yield them in reverse order, which may require significant storage. """ try: return reversed(iterable) except TypeError: return reversed(list(iterable)) def consecutive_groups(iterable, ordering=lambda x: x): """Yield groups of consecutive items using :func:`itertools.groupby`. The *ordering* function determines whether two items are adjacent by returning their position. By default, the ordering function is the identity function. This is suitable for finding runs of numbers: >>> iterable = [1, 10, 11, 12, 20, 30, 31, 32, 33, 40] >>> for group in consecutive_groups(iterable): ... print(list(group)) [1] [10, 11, 12] [20] [30, 31, 32, 33] [40] For finding runs of adjacent letters, try using the :meth:`index` method of a string of letters: >>> from string import ascii_lowercase >>> iterable = 'abcdfgilmnop' >>> ordering = ascii_lowercase.index >>> for group in consecutive_groups(iterable, ordering): ... print(list(group)) ['a', 'b', 'c', 'd'] ['f', 'g'] ['i'] ['l', 'm', 'n', 'o', 'p'] Each group of consecutive items is an iterator that shares it source with *iterable*. When an an output group is advanced, the previous group is no longer available unless its elements are copied (e.g., into a ``list``). >>> iterable = [1, 2, 11, 12, 21, 22] >>> saved_groups = [] >>> for group in consecutive_groups(iterable): ... saved_groups.append(list(group)) # Copy group elements >>> saved_groups [[1, 2], [11, 12], [21, 22]] """ for k, g in groupby( enumerate(iterable), key=lambda x: x[0] - ordering(x[1]) ): yield map(itemgetter(1), g) def difference(iterable, func=sub, *, initial=None): """This function is the inverse of :func:`itertools.accumulate`. By default it will compute the first difference of *iterable* using :func:`operator.sub`: >>> from itertools import accumulate >>> iterable = accumulate([0, 1, 2, 3, 4]) # produces 0, 1, 3, 6, 10 >>> list(difference(iterable)) [0, 1, 2, 3, 4] *func* defaults to :func:`operator.sub`, but other functions can be specified. They will be applied as follows:: A, B, C, D, ... --> A, func(B, A), func(C, B), func(D, C), ... For example, to do progressive division: >>> iterable = [1, 2, 6, 24, 120] >>> func = lambda x, y: x // y >>> list(difference(iterable, func)) [1, 2, 3, 4, 5] If the *initial* keyword is set, the first element will be skipped when computing successive differences. >>> it = [10, 11, 13, 16] # from accumulate([1, 2, 3], initial=10) >>> list(difference(it, initial=10)) [1, 2, 3] """ a, b = tee(iterable) try: first = [next(b)] except StopIteration: return iter([]) if initial is not None: first = [] return chain(first, starmap(func, zip(b, a))) class SequenceView(Sequence): """Return a read-only view of the sequence object *target*. :class:`SequenceView` objects are analogous to Python's built-in "dictionary view" types. They provide a dynamic view of a sequence's items, meaning that when the sequence updates, so does the view. >>> seq = ['0', '1', '2'] >>> view = SequenceView(seq) >>> view SequenceView(['0', '1', '2']) >>> seq.append('3') >>> view SequenceView(['0', '1', '2', '3']) Sequence views support indexing, slicing, and length queries. They act like the underlying sequence, except they don't allow assignment: >>> view[1] '1' >>> view[1:-1] ['1', '2'] >>> len(view) 4 Sequence views are useful as an alternative to copying, as they don't require (much) extra storage. """ def __init__(self, target): if not isinstance(target, Sequence): raise TypeError self._target = target def __getitem__(self, index): return self._target[index] def __len__(self): return len(self._target) def __repr__(self): return '{}({})'.format(self.__class__.__name__, repr(self._target)) class seekable: """Wrap an iterator to allow for seeking backward and forward. This progressively caches the items in the source iterable so they can be re-visited. Call :meth:`seek` with an index to seek to that position in the source iterable. To "reset" an iterator, seek to ``0``: >>> from itertools import count >>> it = seekable((str(n) for n in count())) >>> next(it), next(it), next(it) ('0', '1', '2') >>> it.seek(0) >>> next(it), next(it), next(it) ('0', '1', '2') >>> next(it) '3' You can also seek forward: >>> it = seekable((str(n) for n in range(20))) >>> it.seek(10) >>> next(it) '10' >>> it.seek(20) # Seeking past the end of the source isn't a problem >>> list(it) [] >>> it.seek(0) # Resetting works even after hitting the end >>> next(it), next(it), next(it) ('0', '1', '2') Call :meth:`peek` to look ahead one item without advancing the iterator: >>> it = seekable('1234') >>> it.peek() '1' >>> list(it) ['1', '2', '3', '4'] >>> it.peek(default='empty') 'empty' Before the iterator is at its end, calling :func:`bool` on it will return ``True``. After it will return ``False``: >>> it = seekable('5678') >>> bool(it) True >>> list(it) ['5', '6', '7', '8'] >>> bool(it) False You may view the contents of the cache with the :meth:`elements` method. That returns a :class:`SequenceView`, a view that updates automatically: >>> it = seekable((str(n) for n in range(10))) >>> next(it), next(it), next(it) ('0', '1', '2') >>> elements = it.elements() >>> elements SequenceView(['0', '1', '2']) >>> next(it) '3' >>> elements SequenceView(['0', '1', '2', '3']) By default, the cache grows as the source iterable progresses, so beware of wrapping very large or infinite iterables. Supply *maxlen* to limit the size of the cache (this of course limits how far back you can seek). >>> from itertools import count >>> it = seekable((str(n) for n in count()), maxlen=2) >>> next(it), next(it), next(it), next(it) ('0', '1', '2', '3') >>> list(it.elements()) ['2', '3'] >>> it.seek(0) >>> next(it), next(it), next(it), next(it) ('2', '3', '4', '5') >>> next(it) '6' """ def __init__(self, iterable, maxlen=None): self._source = iter(iterable) if maxlen is None: self._cache = [] else: self._cache = deque([], maxlen) self._index = None def __iter__(self): return self def __next__(self): if self._index is not None: try: item = self._cache[self._index] except IndexError: self._index = None else: self._index += 1 return item item = next(self._source) self._cache.append(item) return item def __bool__(self): try: self.peek() except StopIteration: return False return True def peek(self, default=_marker): try: peeked = next(self) except StopIteration: if default is _marker: raise return default if self._index is None: self._index = len(self._cache) self._index -= 1 return peeked def elements(self): return SequenceView(self._cache) def seek(self, index): self._index = index remainder = index - len(self._cache) if remainder > 0: consume(self, remainder) class run_length: """ :func:`run_length.encode` compresses an iterable with run-length encoding. It yields groups of repeated items with the count of how many times they were repeated: >>> uncompressed = 'abbcccdddd' >>> list(run_length.encode(uncompressed)) [('a', 1), ('b', 2), ('c', 3), ('d', 4)] :func:`run_length.decode` decompresses an iterable that was previously compressed with run-length encoding. It yields the items of the decompressed iterable: >>> compressed = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] >>> list(run_length.decode(compressed)) ['a', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd'] """ @staticmethod def encode(iterable): return ((k, ilen(g)) for k, g in groupby(iterable)) @staticmethod def decode(iterable): return chain.from_iterable(repeat(k, n) for k, n in iterable) def exactly_n(iterable, n, predicate=bool): """Return ``True`` if exactly ``n`` items in the iterable are ``True`` according to the *predicate* function. >>> exactly_n([True, True, False], 2) True >>> exactly_n([True, True, False], 1) False >>> exactly_n([0, 1, 2, 3, 4, 5], 3, lambda x: x < 3) True The iterable will be advanced until ``n + 1`` truthy items are encountered, so avoid calling it on infinite iterables. """ return len(take(n + 1, filter(predicate, iterable))) == n def circular_shifts(iterable): """Return a list of circular shifts of *iterable*. >>> circular_shifts(range(4)) [(0, 1, 2, 3), (1, 2, 3, 0), (2, 3, 0, 1), (3, 0, 1, 2)] """ lst = list(iterable) return take(len(lst), windowed(cycle(lst), len(lst))) def make_decorator(wrapping_func, result_index=0): """Return a decorator version of *wrapping_func*, which is a function that modifies an iterable. *result_index* is the position in that function's signature where the iterable goes. This lets you use itertools on the "production end," i.e. at function definition. This can augment what the function returns without changing the function's code. For example, to produce a decorator version of :func:`chunked`: >>> from more_itertools import chunked >>> chunker = make_decorator(chunked, result_index=0) >>> @chunker(3) ... def iter_range(n): ... return iter(range(n)) ... >>> list(iter_range(9)) [[0, 1, 2], [3, 4, 5], [6, 7, 8]] To only allow truthy items to be returned: >>> truth_serum = make_decorator(filter, result_index=1) >>> @truth_serum(bool) ... def boolean_test(): ... return [0, 1, '', ' ', False, True] ... >>> list(boolean_test()) [1, ' ', True] The :func:`peekable` and :func:`seekable` wrappers make for practical decorators: >>> from more_itertools import peekable >>> peekable_function = make_decorator(peekable) >>> @peekable_function() ... def str_range(*args): ... return (str(x) for x in range(*args)) ... >>> it = str_range(1, 20, 2) >>> next(it), next(it), next(it) ('1', '3', '5') >>> it.peek() '7' >>> next(it) '7' """ # See https://sites.google.com/site/bbayles/index/decorator_factory for # notes on how this works. def decorator(*wrapping_args, **wrapping_kwargs): def outer_wrapper(f): def inner_wrapper(*args, **kwargs): result = f(*args, **kwargs) wrapping_args_ = list(wrapping_args) wrapping_args_.insert(result_index, result) return wrapping_func(*wrapping_args_, **wrapping_kwargs) return inner_wrapper return outer_wrapper return decorator def map_reduce(iterable, keyfunc, valuefunc=None, reducefunc=None): """Return a dictionary that maps the items in *iterable* to categories defined by *keyfunc*, transforms them with *valuefunc*, and then summarizes them by category with *reducefunc*. *valuefunc* defaults to the identity function if it is unspecified. If *reducefunc* is unspecified, no summarization takes place: >>> keyfunc = lambda x: x.upper() >>> result = map_reduce('abbccc', keyfunc) >>> sorted(result.items()) [('A', ['a']), ('B', ['b', 'b']), ('C', ['c', 'c', 'c'])] Specifying *valuefunc* transforms the categorized items: >>> keyfunc = lambda x: x.upper() >>> valuefunc = lambda x: 1 >>> result = map_reduce('abbccc', keyfunc, valuefunc) >>> sorted(result.items()) [('A', [1]), ('B', [1, 1]), ('C', [1, 1, 1])] Specifying *reducefunc* summarizes the categorized items: >>> keyfunc = lambda x: x.upper() >>> valuefunc = lambda x: 1 >>> reducefunc = sum >>> result = map_reduce('abbccc', keyfunc, valuefunc, reducefunc) >>> sorted(result.items()) [('A', 1), ('B', 2), ('C', 3)] You may want to filter the input iterable before applying the map/reduce procedure: >>> all_items = range(30) >>> items = [x for x in all_items if 10 <= x <= 20] # Filter >>> keyfunc = lambda x: x % 2 # Evens map to 0; odds to 1 >>> categories = map_reduce(items, keyfunc=keyfunc) >>> sorted(categories.items()) [(0, [10, 12, 14, 16, 18, 20]), (1, [11, 13, 15, 17, 19])] >>> summaries = map_reduce(items, keyfunc=keyfunc, reducefunc=sum) >>> sorted(summaries.items()) [(0, 90), (1, 75)] Note that all items in the iterable are gathered into a list before the summarization step, which may require significant storage. The returned object is a :obj:`collections.defaultdict` with the ``default_factory`` set to ``None``, such that it behaves like a normal dictionary. """ valuefunc = (lambda x: x) if (valuefunc is None) else valuefunc ret = defaultdict(list) for item in iterable: key = keyfunc(item) value = valuefunc(item) ret[key].append(value) if reducefunc is not None: for key, value_list in ret.items(): ret[key] = reducefunc(value_list) ret.default_factory = None return ret def rlocate(iterable, pred=bool, window_size=None): """Yield the index of each item in *iterable* for which *pred* returns ``True``, starting from the right and moving left. *pred* defaults to :func:`bool`, which will select truthy items: >>> list(rlocate([0, 1, 1, 0, 1, 0, 0])) # Truthy at 1, 2, and 4 [4, 2, 1] Set *pred* to a custom function to, e.g., find the indexes for a particular item: >>> iterable = iter('abcb') >>> pred = lambda x: x == 'b' >>> list(rlocate(iterable, pred)) [3, 1] If *window_size* is given, then the *pred* function will be called with that many items. This enables searching for sub-sequences: >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3] >>> pred = lambda *args: args == (1, 2, 3) >>> list(rlocate(iterable, pred=pred, window_size=3)) [9, 5, 1] Beware, this function won't return anything for infinite iterables. If *iterable* is reversible, ``rlocate`` will reverse it and search from the right. Otherwise, it will search from the left and return the results in reverse order. See :func:`locate` to for other example applications. """ if window_size is None: try: len_iter = len(iterable) return (len_iter - i - 1 for i in locate(reversed(iterable), pred)) except TypeError: pass return reversed(list(locate(iterable, pred, window_size))) def replace(iterable, pred, substitutes, count=None, window_size=1): """Yield the items from *iterable*, replacing the items for which *pred* returns ``True`` with the items from the iterable *substitutes*. >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1] >>> pred = lambda x: x == 0 >>> substitutes = (2, 3) >>> list(replace(iterable, pred, substitutes)) [1, 1, 2, 3, 1, 1, 2, 3, 1, 1] If *count* is given, the number of replacements will be limited: >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1, 0] >>> pred = lambda x: x == 0 >>> substitutes = [None] >>> list(replace(iterable, pred, substitutes, count=2)) [1, 1, None, 1, 1, None, 1, 1, 0] Use *window_size* to control the number of items passed as arguments to *pred*. This allows for locating and replacing subsequences. >>> iterable = [0, 1, 2, 5, 0, 1, 2, 5] >>> window_size = 3 >>> pred = lambda *args: args == (0, 1, 2) # 3 items passed to pred >>> substitutes = [3, 4] # Splice in these items >>> list(replace(iterable, pred, substitutes, window_size=window_size)) [3, 4, 5, 3, 4, 5] """ if window_size < 1: raise ValueError('window_size must be at least 1') # Save the substitutes iterable, since it's used more than once substitutes = tuple(substitutes) # Add padding such that the number of windows matches the length of the # iterable it = chain(iterable, [_marker] * (window_size - 1)) windows = windowed(it, window_size) n = 0 for w in windows: # If the current window matches our predicate (and we haven't hit # our maximum number of replacements), splice in the substitutes # and then consume the following windows that overlap with this one. # For example, if the iterable is (0, 1, 2, 3, 4...) # and the window size is 2, we have (0, 1), (1, 2), (2, 3)... # If the predicate matches on (0, 1), we need to zap (0, 1) and (1, 2) if pred(*w): if (count is None) or (n < count): n += 1 yield from substitutes consume(windows, window_size - 1) continue # If there was no match (or we've reached the replacement limit), # yield the first item from the window. if w and (w[0] is not _marker): yield w[0] def partitions(iterable): """Yield all possible order-preserving partitions of *iterable*. >>> iterable = 'abc' >>> for part in partitions(iterable): ... print([''.join(p) for p in part]) ['abc'] ['a', 'bc'] ['ab', 'c'] ['a', 'b', 'c'] This is unrelated to :func:`partition`. """ sequence = list(iterable) n = len(sequence) for i in powerset(range(1, n)): yield [sequence[i:j] for i, j in zip((0,) + i, i + (n,))] def set_partitions(iterable, k=None): """ Yield the set partitions of *iterable* into *k* parts. Set partitions are not order-preserving. >>> iterable = 'abc' >>> for part in set_partitions(iterable, 2): ... print([''.join(p) for p in part]) ['a', 'bc'] ['ab', 'c'] ['b', 'ac'] If *k* is not given, every set partition is generated. >>> iterable = 'abc' >>> for part in set_partitions(iterable): ... print([''.join(p) for p in part]) ['abc'] ['a', 'bc'] ['ab', 'c'] ['b', 'ac'] ['a', 'b', 'c'] """ L = list(iterable) n = len(L) if k is not None: if k < 1: raise ValueError( "Can't partition in a negative or zero number of groups" ) elif k > n: return def set_partitions_helper(L, k): n = len(L) if k == 1: yield [L] elif n == k: yield [[s] for s in L] else: e, *M = L for p in set_partitions_helper(M, k - 1): yield [[e], *p] for p in set_partitions_helper(M, k): for i in range(len(p)): yield p[:i] + [[e] + p[i]] + p[i + 1 :] if k is None: for k in range(1, n + 1): yield from set_partitions_helper(L, k) else: yield from set_partitions_helper(L, k) class time_limited: """ Yield items from *iterable* until *limit_seconds* have passed. If the time limit expires before all items have been yielded, the ``timed_out`` parameter will be set to ``True``. >>> from time import sleep >>> def generator(): ... yield 1 ... yield 2 ... sleep(0.2) ... yield 3 >>> iterable = time_limited(0.1, generator()) >>> list(iterable) [1, 2] >>> iterable.timed_out True Note that the time is checked before each item is yielded, and iteration stops if the time elapsed is greater than *limit_seconds*. If your time limit is 1 second, but it takes 2 seconds to generate the first item from the iterable, the function will run for 2 seconds and not yield anything. """ def __init__(self, limit_seconds, iterable): if limit_seconds < 0: raise ValueError('limit_seconds must be positive') self.limit_seconds = limit_seconds self._iterable = iter(iterable) self._start_time = monotonic() self.timed_out = False def __iter__(self): return self def __next__(self): item = next(self._iterable) if monotonic() - self._start_time > self.limit_seconds: self.timed_out = True raise StopIteration return item def only(iterable, default=None, too_long=None): """If *iterable* has only one item, return it. If it has zero items, return *default*. If it has more than one item, raise the exception given by *too_long*, which is ``ValueError`` by default. >>> only([], default='missing') 'missing' >>> only([1]) 1 >>> only([1, 2]) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: Expected exactly one item in iterable, but got 1, 2, and perhaps more.' >>> only([1, 2], too_long=TypeError) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... TypeError Note that :func:`only` attempts to advance *iterable* twice to ensure there is only one item. See :func:`spy` or :func:`peekable` to check iterable contents less destructively. """ it = iter(iterable) first_value = next(it, default) try: second_value = next(it) except StopIteration: pass else: msg = ( 'Expected exactly one item in iterable, but got {!r}, {!r}, ' 'and perhaps more.'.format(first_value, second_value) ) raise too_long or ValueError(msg) return first_value def ichunked(iterable, n): """Break *iterable* into sub-iterables with *n* elements each. :func:`ichunked` is like :func:`chunked`, but it yields iterables instead of lists. If the sub-iterables are read in order, the elements of *iterable* won't be stored in memory. If they are read out of order, :func:`itertools.tee` is used to cache elements as necessary. >>> from itertools import count >>> all_chunks = ichunked(count(), 4) >>> c_1, c_2, c_3 = next(all_chunks), next(all_chunks), next(all_chunks) >>> list(c_2) # c_1's elements have been cached; c_3's haven't been [4, 5, 6, 7] >>> list(c_1) [0, 1, 2, 3] >>> list(c_3) [8, 9, 10, 11] """ source = iter(iterable) while True: # Check to see whether we're at the end of the source iterable item = next(source, _marker) if item is _marker: return # Clone the source and yield an n-length slice source, it = tee(chain([item], source)) yield islice(it, n) # Advance the source iterable consume(source, n) def distinct_combinations(iterable, r): """Yield the distinct combinations of *r* items taken from *iterable*. >>> list(distinct_combinations([0, 0, 1], 2)) [(0, 0), (0, 1)] Equivalent to ``set(combinations(iterable))``, except duplicates are not generated and thrown away. For larger input sequences this is much more efficient. """ if r < 0: raise ValueError('r must be non-negative') elif r == 0: yield () return pool = tuple(iterable) generators = [unique_everseen(enumerate(pool), key=itemgetter(1))] current_combo = [None] * r level = 0 while generators: try: cur_idx, p = next(generators[-1]) except StopIteration: generators.pop() level -= 1 continue current_combo[level] = p if level + 1 == r: yield tuple(current_combo) else: generators.append( unique_everseen( enumerate(pool[cur_idx + 1 :], cur_idx + 1), key=itemgetter(1), ) ) level += 1 def filter_except(validator, iterable, *exceptions): """Yield the items from *iterable* for which the *validator* function does not raise one of the specified *exceptions*. *validator* is called for each item in *iterable*. It should be a function that accepts one argument and raises an exception if that item is not valid. >>> iterable = ['1', '2', 'three', '4', None] >>> list(filter_except(int, iterable, ValueError, TypeError)) ['1', '2', '4'] If an exception other than one given by *exceptions* is raised by *validator*, it is raised like normal. """ for item in iterable: try: validator(item) except exceptions: pass else: yield item def map_except(function, iterable, *exceptions): """Transform each item from *iterable* with *function* and yield the result, unless *function* raises one of the specified *exceptions*. *function* is called to transform each item in *iterable*. It should be a accept one argument. >>> iterable = ['1', '2', 'three', '4', None] >>> list(map_except(int, iterable, ValueError, TypeError)) [1, 2, 4] If an exception other than one given by *exceptions* is raised by *function*, it is raised like normal. """ for item in iterable: try: yield function(item) except exceptions: pass def _sample_unweighted(iterable, k): # Implementation of "Algorithm L" from the 1994 paper by Kim-Hung Li: # "Reservoir-Sampling Algorithms of Time Complexity O(n(1+log(N/n)))". # Fill up the reservoir (collection of samples) with the first `k` samples reservoir = take(k, iterable) # Generate random number that's the largest in a sample of k U(0,1) numbers # Largest order statistic: https://en.wikipedia.org/wiki/Order_statistic W = exp(log(random()) / k) # The number of elements to skip before changing the reservoir is a random # number with a geometric distribution. Sample it using random() and logs. next_index = k + floor(log(random()) / log(1 - W)) for index, element in enumerate(iterable, k): if index == next_index: reservoir[randrange(k)] = element # The new W is the largest in a sample of k U(0, `old_W`) numbers W *= exp(log(random()) / k) next_index += floor(log(random()) / log(1 - W)) + 1 return reservoir def _sample_weighted(iterable, k, weights): # Implementation of "A-ExpJ" from the 2006 paper by Efraimidis et al. : # "Weighted random sampling with a reservoir". # Log-transform for numerical stability for weights that are small/large weight_keys = (log(random()) / weight for weight in weights) # Fill up the reservoir (collection of samples) with the first `k` # weight-keys and elements, then heapify the list. reservoir = take(k, zip(weight_keys, iterable)) heapify(reservoir) # The number of jumps before changing the reservoir is a random variable # with an exponential distribution. Sample it using random() and logs. smallest_weight_key, _ = reservoir[0] weights_to_skip = log(random()) / smallest_weight_key for weight, element in zip(weights, iterable): if weight >= weights_to_skip: # The notation here is consistent with the paper, but we store # the weight-keys in log-space for better numerical stability. smallest_weight_key, _ = reservoir[0] t_w = exp(weight * smallest_weight_key) r_2 = uniform(t_w, 1) # generate U(t_w, 1) weight_key = log(r_2) / weight heapreplace(reservoir, (weight_key, element)) smallest_weight_key, _ = reservoir[0] weights_to_skip = log(random()) / smallest_weight_key else: weights_to_skip -= weight # Equivalent to [element for weight_key, element in sorted(reservoir)] return [heappop(reservoir)[1] for _ in range(k)] def sample(iterable, k, weights=None): """Return a *k*-length list of elements chosen (without replacement) from the *iterable*. Like :func:`random.sample`, but works on iterables of unknown length. >>> iterable = range(100) >>> sample(iterable, 5) # doctest: +SKIP [81, 60, 96, 16, 4] An iterable with *weights* may also be given: >>> iterable = range(100) >>> weights = (i * i + 1 for i in range(100)) >>> sampled = sample(iterable, 5, weights=weights) # doctest: +SKIP [79, 67, 74, 66, 78] The algorithm can also be used to generate weighted random permutations. The relative weight of each item determines the probability that it appears late in the permutation. >>> data = "abcdefgh" >>> weights = range(1, len(data) + 1) >>> sample(data, k=len(data), weights=weights) # doctest: +SKIP ['c', 'a', 'b', 'e', 'g', 'd', 'h', 'f'] """ if k == 0: return [] iterable = iter(iterable) if weights is None: return _sample_unweighted(iterable, k) else: weights = iter(weights) return _sample_weighted(iterable, k, weights) def is_sorted(iterable, key=None, reverse=False): """Returns ``True`` if the items of iterable are in sorted order, and ``False`` otherwise. *key* and *reverse* have the same meaning that they do in the built-in :func:`sorted` function. >>> is_sorted(['1', '2', '3', '4', '5'], key=int) True >>> is_sorted([5, 4, 3, 1, 2], reverse=True) False The function returns ``False`` after encountering the first out-of-order item. If there are no out-of-order items, the iterable is exhausted. """ compare = lt if reverse else gt it = iterable if (key is None) else map(key, iterable) return not any(starmap(compare, pairwise(it))) class AbortThread(BaseException): pass class callback_iter: """Convert a function that uses callbacks to an iterator. Let *func* be a function that takes a `callback` keyword argument. For example: >>> def func(callback=None): ... for i, c in [(1, 'a'), (2, 'b'), (3, 'c')]: ... if callback: ... callback(i, c) ... return 4 Use ``with callback_iter(func)`` to get an iterator over the parameters that are delivered to the callback. >>> with callback_iter(func) as it: ... for args, kwargs in it: ... print(args) (1, 'a') (2, 'b') (3, 'c') The function will be called in a background thread. The ``done`` property indicates whether it has completed execution. >>> it.done True If it completes successfully, its return value will be available in the ``result`` property. >>> it.result 4 Notes: * If the function uses some keyword argument besides ``callback``, supply *callback_kwd*. * If it finished executing, but raised an exception, accessing the ``result`` property will raise the same exception. * If it hasn't finished executing, accessing the ``result`` property from within the ``with`` block will raise ``RuntimeError``. * If it hasn't finished executing, accessing the ``result`` property from outside the ``with`` block will raise a ``more_itertools.AbortThread`` exception. * Provide *wait_seconds* to adjust how frequently the it is polled for output. """ def __init__(self, func, callback_kwd='callback', wait_seconds=0.1): self._func = func self._callback_kwd = callback_kwd self._aborted = False self._future = None self._wait_seconds = wait_seconds self._executor = __import__("concurrent.futures").futures.ThreadPoolExecutor(max_workers=1) self._iterator = self._reader() def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): self._aborted = True self._executor.shutdown() def __iter__(self): return self def __next__(self): return next(self._iterator) @property def done(self): if self._future is None: return False return self._future.done() @property def result(self): if not self.done: raise RuntimeError('Function has not yet completed') return self._future.result() def _reader(self): q = Queue() def callback(*args, **kwargs): if self._aborted: raise AbortThread('canceled by user') q.put((args, kwargs)) self._future = self._executor.submit( self._func, **{self._callback_kwd: callback} ) while True: try: item = q.get(timeout=self._wait_seconds) except Empty: pass else: q.task_done() yield item if self._future.done(): break remaining = [] while True: try: item = q.get_nowait() except Empty: break else: q.task_done() remaining.append(item) q.join() yield from remaining def windowed_complete(iterable, n): """ Yield ``(beginning, middle, end)`` tuples, where: * Each ``middle`` has *n* items from *iterable* * Each ``beginning`` has the items before the ones in ``middle`` * Each ``end`` has the items after the ones in ``middle`` >>> iterable = range(7) >>> n = 3 >>> for beginning, middle, end in windowed_complete(iterable, n): ... print(beginning, middle, end) () (0, 1, 2) (3, 4, 5, 6) (0,) (1, 2, 3) (4, 5, 6) (0, 1) (2, 3, 4) (5, 6) (0, 1, 2) (3, 4, 5) (6,) (0, 1, 2, 3) (4, 5, 6) () Note that *n* must be at least 0 and most equal to the length of *iterable*. This function will exhaust the iterable and may require significant storage. """ if n < 0: raise ValueError('n must be >= 0') seq = tuple(iterable) size = len(seq) if n > size: raise ValueError('n must be <= len(seq)') for i in range(size - n + 1): beginning = seq[:i] middle = seq[i : i + n] end = seq[i + n :] yield beginning, middle, end def all_unique(iterable, key=None): """ Returns ``True`` if all the elements of *iterable* are unique (no two elements are equal). >>> all_unique('ABCB') False If a *key* function is specified, it will be used to make comparisons. >>> all_unique('ABCb') True >>> all_unique('ABCb', str.lower) False The function returns as soon as the first non-unique element is encountered. Iterables with a mix of hashable and unhashable items can be used, but the function will be slower for unhashable items. """ seenset = set() seenset_add = seenset.add seenlist = [] seenlist_add = seenlist.append for element in map(key, iterable) if key else iterable: try: if element in seenset: return False seenset_add(element) except TypeError: if element in seenlist: return False seenlist_add(element) return True def nth_product(index, *args): """Equivalent to ``list(product(*args))[index]``. The products of *args* can be ordered lexicographically. :func:`nth_product` computes the product at sort position *index* without computing the previous products. >>> nth_product(8, range(2), range(2), range(2), range(2)) (1, 0, 0, 0) ``IndexError`` will be raised if the given *index* is invalid. """ pools = list(map(tuple, reversed(args))) ns = list(map(len, pools)) c = reduce(mul, ns) if index < 0: index += c if not 0 <= index < c: raise IndexError result = [] for pool, n in zip(pools, ns): result.append(pool[index % n]) index //= n return tuple(reversed(result)) def nth_permutation(iterable, r, index): """Equivalent to ``list(permutations(iterable, r))[index]``` The subsequences of *iterable* that are of length *r* where order is important can be ordered lexicographically. :func:`nth_permutation` computes the subsequence at sort position *index* directly, without computing the previous subsequences. >>> nth_permutation('ghijk', 2, 5) ('h', 'i') ``ValueError`` will be raised If *r* is negative or greater than the length of *iterable*. ``IndexError`` will be raised if the given *index* is invalid. """ pool = list(iterable) n = len(pool) if r is None or r == n: r, c = n, factorial(n) elif not 0 <= r < n: raise ValueError else: c = factorial(n) // factorial(n - r) if index < 0: index += c if not 0 <= index < c: raise IndexError if c == 0: return tuple() result = [0] * r q = index * factorial(n) // c if r < n else index for d in range(1, n + 1): q, i = divmod(q, d) if 0 <= n - d < r: result[n - d] = i if q == 0: break return tuple(map(pool.pop, result)) def value_chain(*args): """Yield all arguments passed to the function in the same order in which they were passed. If an argument itself is iterable then iterate over its values. >>> list(value_chain(1, 2, 3, [4, 5, 6])) [1, 2, 3, 4, 5, 6] Binary and text strings are not considered iterable and are emitted as-is: >>> list(value_chain('12', '34', ['56', '78'])) ['12', '34', '56', '78'] Multiple levels of nesting are not flattened. """ for value in args: if isinstance(value, (str, bytes)): yield value continue try: yield from value except TypeError: yield value def product_index(element, *args): """Equivalent to ``list(product(*args)).index(element)`` The products of *args* can be ordered lexicographically. :func:`product_index` computes the first index of *element* without computing the previous products. >>> product_index([8, 2], range(10), range(5)) 42 ``ValueError`` will be raised if the given *element* isn't in the product of *args*. """ index = 0 for x, pool in zip_longest(element, args, fillvalue=_marker): if x is _marker or pool is _marker: raise ValueError('element is not a product of args') pool = tuple(pool) index = index * len(pool) + pool.index(x) return index def combination_index(element, iterable): """Equivalent to ``list(combinations(iterable, r)).index(element)`` The subsequences of *iterable* that are of length *r* can be ordered lexicographically. :func:`combination_index` computes the index of the first *element*, without computing the previous combinations. >>> combination_index('adf', 'abcdefg') 10 ``ValueError`` will be raised if the given *element* isn't one of the combinations of *iterable*. """ element = enumerate(element) k, y = next(element, (None, None)) if k is None: return 0 indexes = [] pool = enumerate(iterable) for n, x in pool: if x == y: indexes.append(n) tmp, y = next(element, (None, None)) if tmp is None: break else: k = tmp else: raise ValueError('element is not a combination of iterable') n, _ = last(pool, default=(n, None)) # Python versiosn below 3.8 don't have math.comb index = 1 for i, j in enumerate(reversed(indexes), start=1): j = n - j if i <= j: index += factorial(j) // (factorial(i) * factorial(j - i)) return factorial(n + 1) // (factorial(k + 1) * factorial(n - k)) - index def permutation_index(element, iterable): """Equivalent to ``list(permutations(iterable, r)).index(element)``` The subsequences of *iterable* that are of length *r* where order is important can be ordered lexicographically. :func:`permutation_index` computes the index of the first *element* directly, without computing the previous permutations. >>> permutation_index([1, 3, 2], range(5)) 19 ``ValueError`` will be raised if the given *element* isn't one of the permutations of *iterable*. """ index = 0 pool = list(iterable) for i, x in zip(range(len(pool), -1, -1), element): r = pool.index(x) index = index * i + r del pool[r] return index class countable: """Wrap *iterable* and keep a count of how many items have been consumed. The ``items_seen`` attribute starts at ``0`` and increments as the iterable is consumed: >>> iterable = map(str, range(10)) >>> it = countable(iterable) >>> it.items_seen 0 >>> next(it), next(it) ('0', '1') >>> list(it) ['2', '3', '4', '5', '6', '7', '8', '9'] >>> it.items_seen 10 """ def __init__(self, iterable): self._it = iter(iterable) self.items_seen = 0 def __iter__(self): return self def __next__(self): item = next(self._it) self.items_seen += 1 return item PK{5Zʀ??>Lib/site-packages/setuptools/_vendor/more_itertools/recipes.pynuW+A"""Imported from the recipes section of the itertools documentation. All functions taken from the recipes section of the itertools library docs [1]_. Some backward-compatible usability improvements have been made. .. [1] http://docs.python.org/library/itertools.html#recipes """ import warnings from collections import deque from itertools import ( chain, combinations, count, cycle, groupby, islice, repeat, starmap, tee, zip_longest, ) import operator from random import randrange, sample, choice __all__ = [ 'all_equal', 'consume', 'convolve', 'dotproduct', 'first_true', 'flatten', 'grouper', 'iter_except', 'ncycles', 'nth', 'nth_combination', 'padnone', 'pad_none', 'pairwise', 'partition', 'powerset', 'prepend', 'quantify', 'random_combination_with_replacement', 'random_combination', 'random_permutation', 'random_product', 'repeatfunc', 'roundrobin', 'tabulate', 'tail', 'take', 'unique_everseen', 'unique_justseen', ] def take(n, iterable): """Return first *n* items of the iterable as a list. >>> take(3, range(10)) [0, 1, 2] If there are fewer than *n* items in the iterable, all of them are returned. >>> take(10, range(3)) [0, 1, 2] """ return list(islice(iterable, n)) def tabulate(function, start=0): """Return an iterator over the results of ``func(start)``, ``func(start + 1)``, ``func(start + 2)``... *func* should be a function that accepts one integer argument. If *start* is not specified it defaults to 0. It will be incremented each time the iterator is advanced. >>> square = lambda x: x ** 2 >>> iterator = tabulate(square, -3) >>> take(4, iterator) [9, 4, 1, 0] """ return map(function, count(start)) def tail(n, iterable): """Return an iterator over the last *n* items of *iterable*. >>> t = tail(3, 'ABCDEFG') >>> list(t) ['E', 'F', 'G'] """ return iter(deque(iterable, maxlen=n)) def consume(iterator, n=None): """Advance *iterable* by *n* steps. If *n* is ``None``, consume it entirely. Efficiently exhausts an iterator without returning values. Defaults to consuming the whole iterator, but an optional second argument may be provided to limit consumption. >>> i = (x for x in range(10)) >>> next(i) 0 >>> consume(i, 3) >>> next(i) 4 >>> consume(i) >>> next(i) Traceback (most recent call last): File "", line 1, in StopIteration If the iterator has fewer items remaining than the provided limit, the whole iterator will be consumed. >>> i = (x for x in range(3)) >>> consume(i, 5) >>> next(i) Traceback (most recent call last): File "", line 1, in StopIteration """ # Use functions that consume iterators at C speed. if n is None: # feed the entire iterator into a zero-length deque deque(iterator, maxlen=0) else: # advance to the empty slice starting at position n next(islice(iterator, n, n), None) def nth(iterable, n, default=None): """Returns the nth item or a default value. >>> l = range(10) >>> nth(l, 3) 3 >>> nth(l, 20, "zebra") 'zebra' """ return next(islice(iterable, n, None), default) def all_equal(iterable): """ Returns ``True`` if all the elements are equal to each other. >>> all_equal('aaaa') True >>> all_equal('aaab') False """ g = groupby(iterable) return next(g, True) and not next(g, False) def quantify(iterable, pred=bool): """Return the how many times the predicate is true. >>> quantify([True, False, True]) 2 """ return sum(map(pred, iterable)) def pad_none(iterable): """Returns the sequence of elements and then returns ``None`` indefinitely. >>> take(5, pad_none(range(3))) [0, 1, 2, None, None] Useful for emulating the behavior of the built-in :func:`map` function. See also :func:`padded`. """ return chain(iterable, repeat(None)) padnone = pad_none def ncycles(iterable, n): """Returns the sequence elements *n* times >>> list(ncycles(["a", "b"], 3)) ['a', 'b', 'a', 'b', 'a', 'b'] """ return chain.from_iterable(repeat(tuple(iterable), n)) def dotproduct(vec1, vec2): """Returns the dot product of the two iterables. >>> dotproduct([10, 10], [20, 20]) 400 """ return sum(map(operator.mul, vec1, vec2)) def flatten(listOfLists): """Return an iterator flattening one level of nesting in a list of lists. >>> list(flatten([[0, 1], [2, 3]])) [0, 1, 2, 3] See also :func:`collapse`, which can flatten multiple levels of nesting. """ return chain.from_iterable(listOfLists) def repeatfunc(func, times=None, *args): """Call *func* with *args* repeatedly, returning an iterable over the results. If *times* is specified, the iterable will terminate after that many repetitions: >>> from operator import add >>> times = 4 >>> args = 3, 5 >>> list(repeatfunc(add, times, *args)) [8, 8, 8, 8] If *times* is ``None`` the iterable will not terminate: >>> from random import randrange >>> times = None >>> args = 1, 11 >>> take(6, repeatfunc(randrange, times, *args)) # doctest:+SKIP [2, 4, 8, 1, 8, 4] """ if times is None: return starmap(func, repeat(args)) return starmap(func, repeat(args, times)) def _pairwise(iterable): """Returns an iterator of paired items, overlapping, from the original >>> take(4, pairwise(count())) [(0, 1), (1, 2), (2, 3), (3, 4)] On Python 3.10 and above, this is an alias for :func:`itertools.pairwise`. """ a, b = tee(iterable) next(b, None) yield from zip(a, b) try: from itertools import pairwise as itertools_pairwise except ImportError: pairwise = _pairwise else: def pairwise(iterable): yield from itertools_pairwise(iterable) pairwise.__doc__ = _pairwise.__doc__ def grouper(iterable, n, fillvalue=None): """Collect data into fixed-length chunks or blocks. >>> list(grouper('ABCDEFG', 3, 'x')) [('A', 'B', 'C'), ('D', 'E', 'F'), ('G', 'x', 'x')] """ if isinstance(iterable, int): warnings.warn( "grouper expects iterable as first parameter", DeprecationWarning ) n, iterable = iterable, n args = [iter(iterable)] * n return zip_longest(fillvalue=fillvalue, *args) def roundrobin(*iterables): """Yields an item from each iterable, alternating between them. >>> list(roundrobin('ABC', 'D', 'EF')) ['A', 'D', 'E', 'B', 'F', 'C'] This function produces the same output as :func:`interleave_longest`, but may perform better for some inputs (in particular when the number of iterables is small). """ # Recipe credited to George Sakkis pending = len(iterables) nexts = cycle(iter(it).__next__ for it in iterables) while pending: try: for next in nexts: yield next() except StopIteration: pending -= 1 nexts = cycle(islice(nexts, pending)) def partition(pred, iterable): """ Returns a 2-tuple of iterables derived from the input iterable. The first yields the items that have ``pred(item) == False``. The second yields the items that have ``pred(item) == True``. >>> is_odd = lambda x: x % 2 != 0 >>> iterable = range(10) >>> even_items, odd_items = partition(is_odd, iterable) >>> list(even_items), list(odd_items) ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9]) If *pred* is None, :func:`bool` is used. >>> iterable = [0, 1, False, True, '', ' '] >>> false_items, true_items = partition(None, iterable) >>> list(false_items), list(true_items) ([0, False, ''], [1, True, ' ']) """ if pred is None: pred = bool evaluations = ((pred(x), x) for x in iterable) t1, t2 = tee(evaluations) return ( (x for (cond, x) in t1 if not cond), (x for (cond, x) in t2 if cond), ) def powerset(iterable): """Yields all possible subsets of the iterable. >>> list(powerset([1, 2, 3])) [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)] :func:`powerset` will operate on iterables that aren't :class:`set` instances, so repeated elements in the input will produce repeated elements in the output. Use :func:`unique_everseen` on the input to avoid generating duplicates: >>> seq = [1, 1, 0] >>> list(powerset(seq)) [(), (1,), (1,), (0,), (1, 1), (1, 0), (1, 0), (1, 1, 0)] >>> from more_itertools import unique_everseen >>> list(powerset(unique_everseen(seq))) [(), (1,), (0,), (1, 0)] """ s = list(iterable) return chain.from_iterable(combinations(s, r) for r in range(len(s) + 1)) def unique_everseen(iterable, key=None): """ Yield unique elements, preserving order. >>> list(unique_everseen('AAAABBBCCDAABBB')) ['A', 'B', 'C', 'D'] >>> list(unique_everseen('ABBCcAD', str.lower)) ['A', 'B', 'C', 'D'] Sequences with a mix of hashable and unhashable items can be used. The function will be slower (i.e., `O(n^2)`) for unhashable items. Remember that ``list`` objects are unhashable - you can use the *key* parameter to transform the list to a tuple (which is hashable) to avoid a slowdown. >>> iterable = ([1, 2], [2, 3], [1, 2]) >>> list(unique_everseen(iterable)) # Slow [[1, 2], [2, 3]] >>> list(unique_everseen(iterable, key=tuple)) # Faster [[1, 2], [2, 3]] Similary, you may want to convert unhashable ``set`` objects with ``key=frozenset``. For ``dict`` objects, ``key=lambda x: frozenset(x.items())`` can be used. """ seenset = set() seenset_add = seenset.add seenlist = [] seenlist_add = seenlist.append use_key = key is not None for element in iterable: k = key(element) if use_key else element try: if k not in seenset: seenset_add(k) yield element except TypeError: if k not in seenlist: seenlist_add(k) yield element def unique_justseen(iterable, key=None): """Yields elements in order, ignoring serial duplicates >>> list(unique_justseen('AAAABBBCCDAABBB')) ['A', 'B', 'C', 'D', 'A', 'B'] >>> list(unique_justseen('ABBCcAD', str.lower)) ['A', 'B', 'C', 'A', 'D'] """ return map(next, map(operator.itemgetter(1), groupby(iterable, key))) def iter_except(func, exception, first=None): """Yields results from a function repeatedly until an exception is raised. Converts a call-until-exception interface to an iterator interface. Like ``iter(func, sentinel)``, but uses an exception instead of a sentinel to end the loop. >>> l = [0, 1, 2] >>> list(iter_except(l.pop, IndexError)) [2, 1, 0] """ try: if first is not None: yield first() while 1: yield func() except exception: pass def first_true(iterable, default=None, pred=None): """ Returns the first true value in the iterable. If no true value is found, returns *default* If *pred* is not None, returns the first item for which ``pred(item) == True`` . >>> first_true(range(10)) 1 >>> first_true(range(10), pred=lambda x: x > 5) 6 >>> first_true(range(10), default='missing', pred=lambda x: x > 9) 'missing' """ return next(filter(pred, iterable), default) def random_product(*args, repeat=1): """Draw an item at random from each of the input iterables. >>> random_product('abc', range(4), 'XYZ') # doctest:+SKIP ('c', 3, 'Z') If *repeat* is provided as a keyword argument, that many items will be drawn from each iterable. >>> random_product('abcd', range(4), repeat=2) # doctest:+SKIP ('a', 2, 'd', 3) This equivalent to taking a random selection from ``itertools.product(*args, **kwarg)``. """ pools = [tuple(pool) for pool in args] * repeat return tuple(choice(pool) for pool in pools) def random_permutation(iterable, r=None): """Return a random *r* length permutation of the elements in *iterable*. If *r* is not specified or is ``None``, then *r* defaults to the length of *iterable*. >>> random_permutation(range(5)) # doctest:+SKIP (3, 4, 0, 1, 2) This equivalent to taking a random selection from ``itertools.permutations(iterable, r)``. """ pool = tuple(iterable) r = len(pool) if r is None else r return tuple(sample(pool, r)) def random_combination(iterable, r): """Return a random *r* length subsequence of the elements in *iterable*. >>> random_combination(range(5), 3) # doctest:+SKIP (2, 3, 4) This equivalent to taking a random selection from ``itertools.combinations(iterable, r)``. """ pool = tuple(iterable) n = len(pool) indices = sorted(sample(range(n), r)) return tuple(pool[i] for i in indices) def random_combination_with_replacement(iterable, r): """Return a random *r* length subsequence of elements in *iterable*, allowing individual elements to be repeated. >>> random_combination_with_replacement(range(3), 5) # doctest:+SKIP (0, 0, 1, 2, 2) This equivalent to taking a random selection from ``itertools.combinations_with_replacement(iterable, r)``. """ pool = tuple(iterable) n = len(pool) indices = sorted(randrange(n) for i in range(r)) return tuple(pool[i] for i in indices) def nth_combination(iterable, r, index): """Equivalent to ``list(combinations(iterable, r))[index]``. The subsequences of *iterable* that are of length *r* can be ordered lexicographically. :func:`nth_combination` computes the subsequence at sort position *index* directly, without computing the previous subsequences. >>> nth_combination(range(5), 3, 5) (0, 3, 4) ``ValueError`` will be raised If *r* is negative or greater than the length of *iterable*. ``IndexError`` will be raised if the given *index* is invalid. """ pool = tuple(iterable) n = len(pool) if (r < 0) or (r > n): raise ValueError c = 1 k = min(r, n - r) for i in range(1, k + 1): c = c * (n - k + i) // i if index < 0: index += c if (index < 0) or (index >= c): raise IndexError result = [] while r: c, n, r = c * r // n, n - 1, r - 1 while index >= c: index -= c c, n = c * (n - r) // n, n - 1 result.append(pool[-1 - n]) return tuple(result) def prepend(value, iterator): """Yield *value*, followed by the elements in *iterator*. >>> value = '0' >>> iterator = ['1', '2', '3'] >>> list(prepend(value, iterator)) ['0', '1', '2', '3'] To prepend multiple values, see :func:`itertools.chain` or :func:`value_chain`. """ return chain([value], iterator) def convolve(signal, kernel): """Convolve the iterable *signal* with the iterable *kernel*. >>> signal = (1, 2, 3, 4, 5) >>> kernel = [3, 2, 1] >>> list(convolve(signal, kernel)) [3, 8, 14, 20, 26, 14, 5] Note: the input arguments are not interchangeable, as the *kernel* is immediately consumed and stored. """ kernel = tuple(kernel)[::-1] n = len(kernel) window = deque([0], maxlen=n) * n for x in chain(signal, repeat(0, n - 1)): window.append(x) yield sum(map(operator.mul, kernel, window)) PK{5Z2& ,,6Lib/site-packages/setuptools/_vendor/jaraco/context.pynuW+Aimport os import subprocess import contextlib import functools import tempfile import shutil import operator @contextlib.contextmanager def pushd(dir): orig = os.getcwd() os.chdir(dir) try: yield dir finally: os.chdir(orig) @contextlib.contextmanager def tarball_context(url, target_dir=None, runner=None, pushd=pushd): """ Get a tarball, extract it, change to that directory, yield, then clean up. `runner` is the function to invoke commands. `pushd` is a context manager for changing the directory. """ if target_dir is None: target_dir = os.path.basename(url).replace('.tar.gz', '').replace('.tgz', '') if runner is None: runner = functools.partial(subprocess.check_call, shell=True) # In the tar command, use --strip-components=1 to strip the first path and # then # use -C to cause the files to be extracted to {target_dir}. This ensures # that we always know where the files were extracted. runner('mkdir {target_dir}'.format(**vars())) try: getter = 'wget {url} -O -' extract = 'tar x{compression} --strip-components=1 -C {target_dir}' cmd = ' | '.join((getter, extract)) runner(cmd.format(compression=infer_compression(url), **vars())) with pushd(target_dir): yield target_dir finally: runner('rm -Rf {target_dir}'.format(**vars())) def infer_compression(url): """ Given a URL or filename, infer the compression code for tar. """ # cheat and just assume it's the last two characters compression_indicator = url[-2:] mapping = dict(gz='z', bz='j', xz='J') # Assume 'z' (gzip) if no match return mapping.get(compression_indicator, 'z') @contextlib.contextmanager def temp_dir(remover=shutil.rmtree): """ Create a temporary directory context. Pass a custom remover to override the removal behavior. """ temp_dir = tempfile.mkdtemp() try: yield temp_dir finally: remover(temp_dir) @contextlib.contextmanager def repo_context(url, branch=None, quiet=True, dest_ctx=temp_dir): """ Check out the repo indicated by url. If dest_ctx is supplied, it should be a context manager to yield the target directory for the check out. """ exe = 'git' if 'git' in url else 'hg' with dest_ctx() as repo_dir: cmd = [exe, 'clone', url, repo_dir] if branch: cmd.extend(['--branch', branch]) devnull = open(os.path.devnull, 'w') stdout = devnull if quiet else None subprocess.check_call(cmd, stdout=stdout) yield repo_dir @contextlib.contextmanager def null(): yield class ExceptionTrap: """ A context manager that will catch certain exceptions and provide an indication they occurred. >>> with ExceptionTrap() as trap: ... raise Exception() >>> bool(trap) True >>> with ExceptionTrap() as trap: ... pass >>> bool(trap) False >>> with ExceptionTrap(ValueError) as trap: ... raise ValueError("1 + 1 is not 3") >>> bool(trap) True >>> with ExceptionTrap(ValueError) as trap: ... raise Exception() Traceback (most recent call last): ... Exception >>> bool(trap) False """ exc_info = None, None, None def __init__(self, exceptions=(Exception,)): self.exceptions = exceptions def __enter__(self): return self @property def type(self): return self.exc_info[0] @property def value(self): return self.exc_info[1] @property def tb(self): return self.exc_info[2] def __exit__(self, *exc_info): type = exc_info[0] matches = type and issubclass(type, self.exceptions) if matches: self.exc_info = exc_info return matches def __bool__(self): return bool(self.type) def raises(self, func, *, _test=bool): """ Wrap func and replace the result with the truth value of the trap (True if an exception occurred). First, give the decorator an alias to support Python 3.8 Syntax. >>> raises = ExceptionTrap(ValueError).raises Now decorate a function that always fails. >>> @raises ... def fail(): ... raise ValueError('failed') >>> fail() True """ @functools.wraps(func) def wrapper(*args, **kwargs): with ExceptionTrap(self.exceptions) as trap: func(*args, **kwargs) return _test(trap) return wrapper def passes(self, func): """ Wrap func and replace the result with the truth value of the trap (True if no exception). First, give the decorator an alias to support Python 3.8 Syntax. >>> passes = ExceptionTrap(ValueError).passes Now decorate a function that always fails. >>> @passes ... def fail(): ... raise ValueError('failed') >>> fail() False """ return self.raises(func, _test=operator.not_) class suppress(contextlib.suppress, contextlib.ContextDecorator): """ A version of contextlib.suppress with decorator support. >>> @suppress(KeyError) ... def key_error(): ... {}[''] >>> key_error() """ PK{5ZK+PLib/site-packages/setuptools/_vendor/jaraco/__pycache__/__init__.cpython-311.pycnuW+A b;ddS)NrqE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/jaraco/__init__.pyrsrPK{5ZoNONOQLib/site-packages/setuptools/_vendor/jaraco/__pycache__/functools.cpython-311.pycnuW+A b;d4BddlZddlZddlZddlZddlZddlZddlZddlm Z m Z e de de fZ dZ dZdZejfd e d e e ge fd e fd Zd ZdZdZdZGddZdZdddfdZdZdZdZdZdZddddZdS)N)CallableTypeVar CallableT.)boundc2d}tj||S)a; Compose any number of unary functions into a single unary function. >>> import textwrap >>> expected = str.strip(textwrap.dedent(compose.__doc__)) >>> strip_and_dedent = compose(str.strip, textwrap.dedent) >>> strip_and_dedent(compose.__doc__) == expected True Compose also allows the innermost function to take arbitrary arguments. >>> round_three = lambda x: round(x, ndigits=3) >>> f = compose(round_three, int.__truediv__) >>> [f(3*x, x+1) for x in range(1,10)] [1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7] cfdS)Nc&|i|SN)argskwargsf1f2s rE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/jaraco/functools.pyz.compose..compose_two..#s rr""d*=f*=*='>'>r )rrs``r compose_twozcompose..compose_two"s>>>>>>r) functoolsreduce)funcsrs rcomposers&$???  K / //rcfd}|S)z Return a function that will call a named method on the target object with optional positional and keyword arguments. >>> lower = method_caller('lower') >>> lower('MyString') 'mystring' c4t|}|iSr )getattr)targetfuncr r method_names r call_methodz"method_caller..call_method3s'v{++tT$V$$$rr )rr r rs``` r method_callerr(s0%%%%%%% rc^tjfdfd_S)ad Decorate func so it's only ever called the first time. This decorator can ensure that an expensive or non-idempotent function will not be expensive on subsequent calls and is idempotent. >>> add_three = once(lambda a: a+3) >>> add_three(3) 6 >>> add_three(9) 6 >>> add_three('12') 6 To reset the stored value, simply clear the property ``saved_result``. >>> del add_three.saved_result >>> add_three(9) 12 >>> add_three(8) 12 Or invoke 'reset()' on it. >>> add_three.reset() >>> add_three(-3) 0 >>> add_three(0) 0 cLtds |i|_jSN saved_result)hasattrr#)r r rwrappers rr%zonce..wrapperZs5w// 9#'4#8#8#8G ##rcHtdSr")vars __delitem__)r%srrzonce..`sDMM55nEEr)rwrapsresetrr%s`@roncer,:sR@_T$$$$$$ FEEEGM Nrmethod cache_wrapperreturncdtdtdtdtffd }d|_tp|S)aV Wrap lru_cache to support storing the cache data in the object instances. Abstracts the common paradigm where the method explicitly saves an underscore-prefixed protected property on first call and returns that subsequently. >>> class MyClass: ... calls = 0 ... ... @method_cache ... def method(self, value): ... self.calls += 1 ... return value >>> a = MyClass() >>> a.method(3) 3 >>> for x in range(75): ... res = a.method(x) >>> a.calls 75 Note that the apparent behavior will be exactly like that of lru_cache except that the cache is stored on each instance, so values in one instance will not flush values from another, and when an instance is deleted, so are the cached values for that instance. >>> b = MyClass() >>> for x in range(35): ... res = b.method(x) >>> b.calls 35 >>> a.method(0) 0 >>> a.calls 75 Note that if method had been decorated with ``functools.lru_cache()``, a.calls would have been 76 (due to the cached value of 0 having been flushed by the 'b' instance). Clear the cache with ``.cache_clear()`` >>> a.method.cache_clear() Same for a method that hasn't yet been called. >>> c = MyClass() >>> c.method.cache_clear() Another cache wrapper may be supplied: >>> cache = functools.lru_cache(maxsize=2) >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache) >>> a = MyClass() >>> a.method2() 3 Caution - do not subsequently wrap the method with another decorator, such as ``@property``, which changes the semantics of the function. See also http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/ for another implementation and additional justification. selfr r r/ctj|}|}t|j|||i|Sr )types MethodTypesetattr__name__)r1r r bound_method cached_methodr.r-s rr%zmethod_cache..wrappersT"'"2 D# # & l33 fo}555}d-f---rcdSr r r rrrzmethod_cache..s$r)object cache_clear_special_method_cache)r-r.r%s`` r method_cacher=dsiR.f.V.v.&.......',G fm44?rcBj}d}||vrdSd|zfd}|S)a: Because Python treats special methods differently, it's not possible to use instance attributes to implement the cached methods. Instead, install the wrapper method under a different name and return a simple proxy to that wrapper. https://github.com/jaraco/jaraco.functools/issues/5 ) __getattr__ __getitem__N__cachedct|vr2tj|}|}t||nt |}||i|Sr )r'r3r4r5r)r1r r rcacher.r- wrapper_names rproxyz$_special_method_cache..proxysn tDzz ) )$VT22E!M%((E D, . . . .D,//Eud%f%%%r)r6)r-r.name special_namesrErDs`` @rr<r<sW ?D0M =  $L&&&&&&& Lrcfd}|S)ab Decorate a function with a transform function that is invoked on results returned from the decorated function. >>> @apply(reversed) ... def get_numbers(start): ... "doc for get_numbers" ... return range(start, start+3) >>> list(get_numbers(4)) [6, 5, 4] >>> get_numbers.__doc__ 'doc for get_numbers' cZtj|t|Sr )rr)r)r transforms rwrapzapply..wraps'$yt$$WY%=%=>>>rr )rJrKs` rapplyrLs#????? Krcfd}|S)a@ Decorate a function with an action function that is invoked on the results returned from the decorated function (for its side-effect), then return the original result. >>> @result_invoke(print) ... def add_two(a, b): ... return a + b >>> x = add_two(2, 3) 5 >>> x 5 cJtjfd}|S)Nc.|i|}||Sr r )r r resultactionrs rr%z,result_invoke..wrap..wrappers)T4*6**F F6NNNMrrr))rr%rQs` rrKzresult_invoke..wraps>            rr )rQrKs` r result_invokerSs#  Krc||i||S)ab Call a function for its side effect after initialization. >>> @call_aside ... def func(): print("called") called >>> func() called Use functools.partial to pass parameters to the initial call >>> @functools.partial(call_aside, name='bingo') ... def func(name): print("called with", name) called with bingo r )fr r s r call_asiderV s Atv HrcHeZdZdZedfdZdZdZdZd dZ dS) Throttlerz3 Rate-limit a function (or other callable) Infct|tr|j}||_||_|dSr ) isinstancerXrmax_rater*)r1rr\s r__init__zThrottler.__init__&s: dI & & 9D    rcd|_dS)Nr) last_called)r1s rr*zThrottler.reset-srcD||j|i|Sr )_waitr)r1r r s r__call__zThrottler.__call__0s& ty$)&)))rctj|jz }d|jz |z }tjt d|tj|_dS)z1ensure at least 1/max_rate seconds from last callrN)timer_r\sleepmax)r1elapsed must_waits rrazThrottler._wait4sT)++ 00 %/  3q)$$%%%9;;rNc\t|jtj|j|Sr ) first_invokerarpartialr)r1objtypes r__get__zThrottler.__get__;s#DJ (9$)S(I(IJJJrr ) r6 __module__ __qualname____doc__floatr]r*rbraror rrrXrX!s',eEll***'''KKKKKKrrXcfd}|S)z Return a function that when invoked will invoke func1 without any parameters (for its side-effect) and then invoke func2 with whatever parameters were passed, returning its result. c(|i|Sr r )r r func1func2s rr%zfirst_invoke..wrapperFs# ud%f%%%rr )rvrwr%s`` rrkrk?s)&&&&&& NrcdSr r r rrrrMsTrr c|tdkrtjnt|}|D]#} |cS#|$r |Y wxYw|S)z Given a callable func, trap the indicated exceptions for up to 'retries' times, invoking cleanup on the exception. On the final attempt, allow any exceptions to propagate. inf)rs itertoolscountrange)rcleanupretriestrapattemptsattempts r retry_callrMs%,uU||$;$;y   wH 466MMM    GIIIII  466Ms AAAcfd}|S)a7 Decorator wrapper for retry_call. Accepts arguments to retry_call except func and then returns a decorator for the decorated function. Ex: >>> @retry(retries=3) ... def my_func(a, b): ... "this is my funk" ... print(a, b) >>> my_func.__doc__ 'this is my funk' cLtjfd}|S)NcNtjg|Ri|}t|gRiSr )rrlr)f_argsf_kwargsrrr_argsr_kwargss rr%z(retry..decorate..wrappernsA%d@V@@@x@@Ee9f99999 9rrR)rr%rrs` rdecoratezretry..decoratemsC    : : : : : :   :rr )rrrs`` rretryr^s) Orctjtt}t t j||}tj||S)z Convert a generator into a function that prints all yielded elements >>> @print_yielded ... def x(): ... yield 3; yield None >>> x() 3 None )rrlmapprintrmore_itertoolsconsumer))r print_all print_resultss r print_yieldedrxsD!#u--IN2ItDDM 9?4  / //rcFtjfd}|S)z Wrap func so it's not called if its first param is None >>> print_text = pass_none(print) >>> print_text('text') text >>> print_text(None) c$| |g|Ri|SdSr r )paramr r rs rr%zpass_none..wrappers1  4////// /  rrRr+s` r pass_noners:_T00000 Nrctj|}|j}fd|D}t j|fi|S)a Assign parameters from namespace where func solicits. >>> def func(x, y=3): ... print(x, y) >>> assigned = assign_params(func, dict(x=2, z=4)) >>> assigned() 2 3 The usual errors are raised if a function doesn't receive its required parameters: >>> assigned = assign_params(func, dict(y=3, z=4)) >>> assigned() Traceback (most recent call last): TypeError: func() ...argument... It even works on methods: >>> class Handler: ... def meth(self, arg): ... print(arg) >>> assign_params(Handler().meth, dict(arg='crystal', foo='clear'))() crystal c*i|]}|v||Sr r ).0k namespaces r z!assign_params..s$AAA1!y..q)A,...r)inspect signature parameterskeysrrl)rrsigparamscall_nss ` r assign_paramsrsZ4  D ! !C ^ " "FAAAAAAAG  T - -W - --rcttjddtjfd}|S)a& Wrap a method such that when it is called, the args and kwargs are saved on the method. >>> class MyClass: ... @save_method_args ... def method(self, a, b): ... print(a, b) >>> my_ob = MyClass() >>> my_ob.method(1, 2) 1 2 >>> my_ob._saved_method.args (1, 2) >>> my_ob._saved_method.kwargs {} >>> my_ob.method(a=3, b='foo') 3 foo >>> my_ob._saved_method.args () >>> my_ob._saved_method.kwargs == dict(a=3, b='foo') True The arguments are stored on the instance, allowing for different instance to save different args. >>> your_ob = MyClass() >>> your_ob.method({str('x'): 3}, b=[4]) {'x': 3} [4] >>> your_ob._saved_method.args ({'x': 3},) >>> my_ob._saved_method.args () args_and_kwargsz args kwargscjdjz}||}t||||g|Ri|S)N_saved_)r6r5)r1r r attr_nameattrrr-s rr%z!save_method_args..wrappersR/ tV,,i&&&vd,T,,,V,,,r) collections namedtuplerr))r-r%rs` @rsave_method_argsrsTD",-> NNO_V------ Nr)replaceusecfd}|S)a- Replace the indicated exceptions, if raised, with the indicated literal replacement or evaluated expression (if present). >>> safe_int = except_(ValueError)(int) >>> safe_int('five') >>> safe_int('5') 5 Specify a literal replacement with ``replace``. >>> safe_int_r = except_(ValueError, replace=0)(int) >>> safe_int_r('five') 0 Provide an expression to ``use`` to pass through particular parameters. >>> safe_int_pt = except_(ValueError, use='args[0]')(int) >>> safe_int_pt('five') 'five' cNtjfd}|S)Nct |i|S#$r' tcYS#t$rcYcYSwxYwwxYwr )eval TypeError)r r exceptionsrrrs rr%z*except_..decorate..wrappersw #tT,V,,, # # ##99$$$ ###"NNNNN# #s  7"7 3737rR)rr%rrrs` rrzexcept_..decoratesH    # # # # # # #   #rr )rrrrs``` rexcept_rs/0        Or)rrerrr3r{ setuptools.extern.more_itertools setuptoolstypingrrr:rrrr, lru_cacher=r<rLrSrVrXrkrrrrrrrr rrrs!  ''''$$$$$$$$ GKxV '< = = = 0000$'''\   WW W  YW  WWWWt<*8   (KKKKKKKK<   *\12"4 0 0 0 $...@+++\"&4%%%%%%%rPK{5Z{E$$OLib/site-packages/setuptools/_vendor/jaraco/__pycache__/context.cpython-311.pycnuW+A b;d,NddlZddlZddlZddlZddlZddlZddlZejdZejddefdZ dZ ejej fdZ ejdde fdZ ejdZGd d ZGd d ejejZdS) Nc#Ktj}tj| |Vtj|dS#tj|wxYwN)osgetcwdchdir)dirorigs pE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/jaraco/context.pypushdr sO 9;;DHSMMM  s AAc #K|Gtj|dddd}| t jt jd}|djd it d}d }d ||f}||jd d t|it||5|Vdddn #1swxYwY|d jd itdS#|d jd itwxYw)z Get a tarball, extract it, change to that directory, yield, then clean up. `runner` is the function to invoke commands. `pushd` is a context manager for changing the directory. Nz.tar.gzz.tgzT)shellzmkdir {target_dir}zwget {url} -O -z7tar x{compression} --strip-components=1 -C {target_dir}z | compressionzrm -Rf {target_dir}) rpathbasenamereplace functoolspartial subprocess check_callformatvarsjoininfer_compression)url target_dirrunnerr getterextractcmds r tarball_contextr"sW%%c**229bAAII&RTUU  ~":#8EEE  F &  & 0 0 0 01117"Kjj&'*++zszGG&7&<&<GGGHHH U:                       +$+55dff5566666+$+55dff556666s1AD((C9- D(9C==D(C=D(($E cf|dd}tddd}||dS)zF Given a URL or filename, infer the compression code for tar. NzjJ)gzbzxz)dictget)rcompression_indicatormappings r rr0s;  Hccc***G ;;,c 2 22c#pKtj} |V||dS#||wxYw)zk Create a temporary directory context. Pass a custom remover to override the removal behavior. N)tempfilemkdtemp)removertemp_dirs r r4r4;sP !!Hs( 5Tc#Kd|vrdnd}|5}|d||g}|r|d|gttjjd}|r|nd}t j|||VddddS#1swxYwYdS)z Check out the repo indicated by url. If dest_ctx is supplied, it should be a context manager to yield the target directory for the check out. githgclonez--branchwN)stdout)extendopenrrdevnullrr) rbranchquietdest_ctxexerepo_dirr!r=r:s r repo_contextrCHsC<<%%TC xGS(+  - JJ F+ , , ,rw,,!+tc&1111sABBBc#KdVdSrrrr/r nullrE[s EEEEEr/ceZdZdZdZeffdZdZedZ edZ edZ dZ d Z ed d Zd Zd S) ExceptionTrapaG A context manager that will catch certain exceptions and provide an indication they occurred. >>> with ExceptionTrap() as trap: ... raise Exception() >>> bool(trap) True >>> with ExceptionTrap() as trap: ... pass >>> bool(trap) False >>> with ExceptionTrap(ValueError) as trap: ... raise ValueError("1 + 1 is not 3") >>> bool(trap) True >>> with ExceptionTrap(ValueError) as trap: ... raise Exception() Traceback (most recent call last): ... Exception >>> bool(trap) False )NNNc||_dSr) exceptions)selfrIs r __init__zExceptionTrap.__init__s $r/c|SrrrJs r __enter__zExceptionTrap.__enter__s r/c|jdSNrexc_inforMs r typezExceptionTrap.type}Qr/c|jdS)NrQrMs r valuezExceptionTrap.valuerTr/c|jdS)NrQrMs r tbzExceptionTrap.tbrTr/cV|d}|ot||j}|r||_|SrP) issubclassrIrR)rJrRrSmatchess r __exit__zExceptionTrap.__exit__s5{<:dDO<<  %$DMr/c*t|jSr)boolrSrMs r __bool__zExceptionTrap.__bool__sDIr/_testcNtjfd}|S)a Wrap func and replace the result with the truth value of the trap (True if an exception occurred). First, give the decorator an alias to support Python 3.8 Syntax. >>> raises = ExceptionTrap(ValueError).raises Now decorate a function that always fails. >>> @raises ... def fail(): ... raise ValueError('failed') >>> fail() True ctj5}|i|dddn #1swxYwY|Sr)rGrI)argskwargstraprcfuncrJs r wrapperz%ExceptionTrap.raises..wrapperst// &4d%f%%% & & & & & & & & & & & & & & &5;; s +//)rwraps)rJrircrjs``` r raiseszExceptionTrap.raisessF&             r/cD||tjS)a Wrap func and replace the result with the truth value of the trap (True if no exception). First, give the decorator an alias to support Python 3.8 Syntax. >>> passes = ExceptionTrap(ValueError).passes Now decorate a function that always fails. >>> @passes ... def fail(): ... raise ValueError('failed') >>> fail() False rb)rloperatornot_)rJris r passeszExceptionTrap.passess&{{4x}{555r/N)__name__ __module__ __qualname____doc__rR ExceptionrKrNpropertyrSrWrZr^rar`rlrprr/r rGrG`s: H#,,%%%%  X   X   X %)666666r/rGceZdZdZdS)suppressz A version of contextlib.suppress with decorator support. >>> @suppress(KeyError) ... def key_error(): ... {}[''] >>> key_error() N)rqrrrsrtrr/r rxrxsr/rx)rr contextlibrr1shutilrncontextmanagerr r"rrmtreer4rCrErGrxContextDecoratorrr/r r~s    $(U77776333 ]     !$    j6j6j6j6j6j6j6j6Zz"J$?r/PK{5ZLggULib/site-packages/setuptools/_vendor/jaraco/text/__pycache__/__init__.cpython-311.pycnuW+A b;d<ddlZddlZddlZddlZ ddlmZn#e$r ddlmZYnwxYwddlm Z m Z ddl m Z dZ dZGddeZe eZejd Zd Zd Zd Zd ZGddeZd!dZGddeZejZdZ GddeZ!GddZ"dZ#dZ$dZ%dZ&ej'dZ(e()edZ*dZ+d Z,dS)"N)files)compose method_cache) ExceptionTrapcfdS)zH Return a function that will perform a substitution on a string c0|SNreplace)snewolds vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/jaraco/text/__init__.pyzsubstitution..sQYYsC(()rr s``r substitutionrs ) ( ( ( ((rctjt|}tt |}t |S)z Take a sequence of pairs specifying substitutions, and create a function that performs those substitutions. >>> multi_substitution(('foo', 'bar'), ('bar', 'baz'))('foo') 'baz' ) itertoolsstarmaprreversedtupler) substitutionss rmulti_substitutionrs8%lMBBMU=1122M M ""rcneZdZdZdZdZdZdZdZfdZ dZ e fd Z d Z dd ZxZS) FoldedCasea A case insensitive string class; behaves just like str except compares equal when the only variation is case. >>> s = FoldedCase('hello world') >>> s == 'Hello World' True >>> 'Hello World' == s True >>> s != 'Hello World' False >>> s.index('O') 4 >>> s.split('O') ['hell', ' w', 'rld'] >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta'])) ['alpha', 'Beta', 'GAMMA'] Sequence membership is straightforward. >>> "Hello World" in [s] True >>> s in ["Hello World"] True You may test for set inclusion, but candidate and elements must both be folded. >>> FoldedCase("Hello World") in {s} True >>> s in {FoldedCase("Hello World")} True String inclusion works as long as the FoldedCase object is on the right. >>> "hello" in FoldedCase("Hello World") True But not if the FoldedCase object is on the left: >>> FoldedCase('hello') in 'Hello World' False In that case, use ``in_``: >>> FoldedCase('hello').in_('Hello World') True >>> FoldedCase('hello') > FoldedCase('Hello') False cV||kSr lowerselfothers r__lt__zFoldedCase.__lt__azz||ekkmm++rcV||kSr rr s r__gt__zFoldedCase.__gt__dr$rcV||kSr rr s r__eq__zFoldedCase.__eq__gzz||u{{}},,rcV||kSr rr s r__ne__zFoldedCase.__ne__jr)rcDt|Sr )hashrr!s r__hash__zFoldedCase.__hash__msDJJLL!!!rct|Sr )superr __contains__)r!r" __class__s rr2zFoldedCase.__contains__ps+ww}}++EKKMM:::rc$|t|vS)zDoes self appear in other?)rr s rin_zFoldedCase.in_ssz%((((rcDtSr )r1r)r!r3s rrzFoldedCase.lowerxsww}}rct||Sr )rindex)r!subs rr8zFoldedCase.index|s&zz||!!#))++...r rctjtj|tj}|||Sr )recompileescapeIsplit)r!splittermaxsplitpatterns rr@zFoldedCase.splits3*RYx00"$77}}T8,,,r)r:r)__name__ __module__ __qualname____doc__r#r&r(r+r/r2r5rrr8r@ __classcell__r3s@rrr%s99v,,,,,,------""";;;;;))) \///--------rrc.|dS)z Return True if the supplied value is decodable (using the default encoding). >>> is_decodable(b'\xff') False >>> is_decodable(b'\x32') True N)decodevalues r is_decodablerNs LLNNNNNrcLt|tot| S)z Return True if the value appears to be binary (that is, it's a byte string and isn't decodable). >>> is_binary(b'\xff') True >>> is_binary('\xff') False ) isinstancebytesrNrLs r is_binaryrRs$ eU # # ?L,?,?(??rcNtj|S)z Trim something like a docstring to remove the whitespace that is common due to indentation and formatting. >>> trim("\n\tfoo = bar\n\t\tbar = baz\n") 'foo = bar\n\tbar = baz' )textwrapdedentstrip)r s rtrimrWs  ?1   # # % %%rcl|}d|D}d|S)a  Wrap lines of text, retaining existing newlines as paragraph markers. >>> print(wrap(lorem_ipsum)) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst. c3dK|]+}dtj|V,dS) N)joinrTwrap.0paras r zwrap..s8EE$tyyt,,--EEEEEErz ) splitlinesr[)r paragraphswrappeds rr\r\s68JEE*EEEG ;;w  rcntjd|}d|D}d|S)ad Given a multi-line string, return an unwrapped version. >>> wrapped = wrap(lorem_ipsum) >>> wrapped.count('\n') 20 >>> unwrapped = unwrap(wrapped) >>> unwrapped.count('\n') 1 >>> print(unwrapped) Lorem ipsum dolor sit amet, consectetur adipiscing ... Curabitur pretium tincidunt lacus. Nulla gravida orci ... z\n\n+c3BK|]}|ddVdS)rZr:Nr r]s rr`zunwrap..s0>>4t||D#&&>>>>>>rrZ)r<r@r[)r rbcleaneds runwraprgs:(A&&J>>:>>>G 99W  rceZdZdZdZdZdS)Splitterzobject that will split a string with the given arguments for each call >>> s = Splitter(',') >>> s('hello, world, this is your, master calling') ['hello', ' world', ' this is your', ' master calling'] c||_dSr )args)r!rks r__init__zSplitter.__init__s  rc |j|jSr )r@rk)r!r s r__call__zSplitter.__call__sqw ""rN)rDrErFrGrlrnrrrriris<#####rri c ||zS)z) >>> indent('foo') ' foo' r)stringprefixs rindentrss F?rceZdZdZejdZdZdZdZ dZ dZ dZ d Z d Zd Zd Zfd ZedZedZxZS)WordSeta Given an identifier, return the words that identifier represents, whether in camel case, underscore-separated, etc. >>> WordSet.parse("camelCase") ('camel', 'Case') >>> WordSet.parse("under_sep") ('under', 'sep') Acronyms should be retained >>> WordSet.parse("firstSNL") ('first', 'SNL') >>> WordSet.parse("you_and_I") ('you', 'and', 'I') >>> WordSet.parse("A simple test") ('A', 'simple', 'test') Multiple caps should not interfere with the first cap of another word. >>> WordSet.parse("myABCClass") ('my', 'ABC', 'Class') The result is a WordSet, so you can get the form you need. >>> WordSet.parse("myABCClass").underscore_separated() 'my_ABC_Class' >>> WordSet.parse('a-command').camel_case() 'ACommand' >>> WordSet.parse('someIdentifier').lowered().space_separated() 'some identifier' Slices of the result should return another WordSet. >>> WordSet.parse('taken-out-of-context')[1:].underscore_separated() 'out_of_context' >>> WordSet.from_class_name(WordSet()).lowered().space_separated() 'word set' >>> example = WordSet.parse('figured it out') >>> example.headless_camel_case() 'figuredItOut' >>> example.dash_separated() 'figured-it-out' z ([A-Z]?[a-z]+)|([A-Z]+(?![a-z]))c4td|DS)Nc3>K|]}|VdSr ) capitalizer^words rr`z&WordSet.capitalized..5s,::Tt((::::::rrur.s r capitalizedzWordSet.capitalized4s::T::::::rc4td|DS)Nc3>K|]}|VdSr rrys rr`z"WordSet.lowered..8s*55tzz||555555rr{r.s rloweredzWordSet.lowered7s55555555rcPd|SN)r[r|r.s r camel_casezWordSet.camel_case:s wwt''))***rct|}t|}tj|ft |}d|Sr)iternextrrchainrurr[)r!wordsfirst new_wordss rheadless_camel_casezWordSet.headless_camel_case=s[T U !!##OUHgenn.G.G.I.IJJ wwy!!!rc,d|S)N_r[r.s runderscore_separatedzWordSet.underscore_separatedCxx~~rc,d|S)N-rr.s rdash_separatedzWordSet.dash_separatedFrrc,d|S)Nr:rr.s rspace_separatedzWordSet.space_separatedIrrc6|r|d|kr |ddn|S)a  Remove the item from the end of the set. >>> WordSet.parse('foo bar').trim_right('foo') ('foo', 'bar') >>> WordSet.parse('foo bar').trim_right('bar') ('foo',) >>> WordSet.parse('').trim_right('bar') () Nrr!items r trim_rightzWordSet.trim_rightLs)!?T"X%5%5tCRCyy4?rc6|r|d|kr |ddn|S)a Remove the item from the beginning of the set. >>> WordSet.parse('foo bar').trim_left('foo') ('bar',) >>> WordSet.parse('foo bar').trim_left('bar') ('foo', 'bar') >>> WordSet.parse('').trim_left('bar') () rNrrs r trim_leftzWordSet.trim_leftYs' =DGtOOtABBxx=rcR|||S)zK >>> WordSet.parse('foo bar').trim('foo') ('bar',) )rrrs rrWz WordSet.trimfs$ ~~d##..t444rctt||}t|trt|}|Sr )r1ru __getitem__rPslice)r!rresultr3s rrzWordSet.__getitem__msBw%%11$77 dE " " %V__F rch|j|}td|DS)Nc3@K|]}|dVdS)rNgroupr^matchs rr`z WordSet.parse..vs,;;%u{{1~~;;;;;;r)_patternfinditerru)cls identifiermatchess rparsez WordSet.parsess4,'' 33;;7;;;;;;rc@||jjSr )rr3rD)rsubjects rfrom_class_namezWordSet.from_class_namexsyy*3444r)rDrErFrGr<r=rr|rrrrrrrrrWr classmethodrrrHrIs@rrurus&33jrz<==H;;;666+++"""  @ @ @ > > >555 <<[<55[55555rructjdtj}d||D}d|S)a Remove HTML from the string `s`. >>> str(simple_html_strip('')) '' >>> print(simple_html_strip('A stormy day in paradise')) A stormy day in paradise >>> print(simple_html_strip('Somebody tell the truth.')) Somebody tell the truth. >>> print(simple_html_strip('What about
\nmultiple lines?')) What about multiple lines? z()|(<[^>]*>)|([^<]+)c3DK|]}|dpdVdS)rNrrs rr`z$simple_html_strip..s1 I IeU[[^^ !r I I I I I Irr)r<r=DOTALLrr[)r html_strippertextss rsimple_html_striprsI"J?KKM I I}/E/Ea/H/H I I IE 775>>rceZdZdZdZdZdS)SeparatedValuesa A string separated by a separator. Overrides __iter__ for getting the values. >>> list(SeparatedValues('a,b,c')) ['a', 'b', 'c'] Whitespace is stripped and empty values are discarded. >>> list(SeparatedValues(' a, b , c, ')) ['a', 'b', 'c'] ,cj||j}tdd|DS)Nc3>K|]}|VdSr )rV)r^parts rr`z+SeparatedValues.__iter__..s*<**d<>>>>rrcJeZdZdZdZedZdZedZ dS)Strippera& Given a series of lines, find the common prefix and strip it from them. >>> lines = [ ... 'abcdefg\n', ... 'abc\n', ... 'abcde\n', ... ] >>> res = Stripper.strip_prefix(lines) >>> res.prefix 'abc' >>> list(res.lines) ['defg\n', '\n', 'de\n'] If no prefix is common, nothing should be stripped. >>> lines = [ ... 'abcd\n', ... '1234\n', ... ] >>> res = Stripper.strip_prefix(lines) >>> res.prefix = '' >>> list(res.lines) ['abcd\n', '1234\n'] c>||_t|||_dSr )rrmaplines)r!rrrs rrlzStripper.__init__s u%% rc|tj|\}}tj|j|}|||Sr )rtee functoolsreduce common_prefix)rr prefix_linesrrs r strip_prefixzStripper.strip_prefixs='mE22 e!#"3\BBs65!!!rcT|js|S||j\}}}|Sr )rr partition)r!linenullrrrests rrnzStripper.__call__s0{ K!^^DK88fd rctt|t|}|d||d|kr|dz}|d||d|k|d|S)z8 Return the common prefix of two lines. Nr)minlen)s1s2r8s rrzStripper.common_prefixsn CGGSWW%%%jBvvJ&& QJE%jBvvJ&&&5&zrN) rDrErFrGrlrrrn staticmethodrrrrrrsr4&&&""["  \rrc8||\}}}|S)z Remove the prefix from the text if it exists. >>> remove_prefix('underwhelming performance', 'underwhelming ') 'performance' >>> remove_prefix('something special', 'sample') 'something special' ) rpartition)textrrrrs r remove_prefixrs!00D&$ Krc8||\}}}|S)z Remove the suffix from the text if it exists. >>> remove_suffix('name.git', '.git') 'name' >>> remove_suffix('something special', 'sample') 'something special' r)rsuffixrrs r remove_suffixrs!//D&$ Krc`gd}d|}tj|d|S)a  Replace alternate newlines with the canonical newline. >>> normalize_newlines('Lorem Ipsum\u2029') 'Lorem Ipsum\n' >>> normalize_newlines('Lorem Ipsum\r\n') 'Lorem Ipsum\n' >>> normalize_newlines('Lorem Ipsum\x85') 'Lorem Ipsum\n' )z  rZ…u
u
|rZ)r[r<r9)rnewlinesrCs rnormalize_newlinesrs5BAAHhhx  G 6'4 & &&rc2|o|d S)N#) startswith)strs r _nonblankrs  *s~~c****rcftjtt|S)a Yield valid lines of a string or iterable. >>> list(yield_lines('')) [] >>> list(yield_lines(['foo', 'bar'])) ['foo', 'bar'] >>> list(yield_lines('foo\nbar')) ['foo', 'bar'] >>> list(yield_lines('\nfoo\n#bar\nbaz #comment')) ['foo', 'baz #comment'] >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n'])) ['foo', 'bar', 'baz', 'bing'] )rr from_iterabler yield_lines)iterables rrrs$ ? ( ([()C)C D DDrcttttj|Sr )rrrrrVra)rs rrr%s( )SDOO,=,=>> ? ??rc8|ddS)z Drop comments. >>> drop_comment('foo # bar') 'foo' A hash without a space may be in a URL. >>> drop_comment('http://example.com/foo#bar') 'http://example.com/foo#bar' z #rr)rs r drop_commentr*s >>$   ""rc#Kt|}|D]p}|drU |ddt|z}n#t$rYdSwxYw|dU|VqdS)a_ Join lines continued by a trailing backslash. >>> list(join_continuation(['foo \\', 'bar', 'baz'])) ['foobar', 'baz'] >>> list(join_continuation(['foo \\', 'bar', 'baz'])) ['foobar', 'baz'] >>> list(join_continuation(['foo \\', 'bar \\', 'baz'])) ['foobarbaz'] Not sure why, but... The character preceeding the backslash is also elided. >>> list(join_continuation(['goo\\', 'dly'])) ['godly'] A terrible idea, but... If no line is available to continue, suppress the lines. >>> list(join_continuation(['foo', 'bar\\', 'baz\\'])) ['foo'] \N)rendswithrVr StopIteration)rrs rjoin_continuationr9s. KKEmmD!!  CRCy((4;;6     mmD!!   s,A A('A()ro)-r<rrTrimportlib.resourcesr ImportError%setuptools.extern.importlib_resources"setuptools.extern.jaraco.functoolsrr setuptools.extern.jaraco.contextrrrrrUnicodeDecodeError _unicode_trappassesrNrRrWr\rgobjectrirsrrurrrrrrrrrsingledispatchrregisterrrrrrrrs <)))))))<<<;;;;;;;;<EDDDDDDD::::::))) # # #\-\-\-\-\-\-\-\-@ 011     @ @ @&&&   B, # # # # #v # # #~5~5~5~5~5e~5~5~5D  ,>>>>>c>>>*33333333l       ' ' ' +++ EEE$ c@@@ # # #s  ''PK{5Z]"ʝ<<<Lib/site-packages/setuptools/_vendor/jaraco/text/__init__.pynuW+Aimport re import itertools import textwrap import functools try: from importlib.resources import files # type: ignore except ImportError: # pragma: nocover from setuptools.extern.importlib_resources import files # type: ignore from setuptools.extern.jaraco.functools import compose, method_cache from setuptools.extern.jaraco.context import ExceptionTrap def substitution(old, new): """ Return a function that will perform a substitution on a string """ return lambda s: s.replace(old, new) def multi_substitution(*substitutions): """ Take a sequence of pairs specifying substitutions, and create a function that performs those substitutions. >>> multi_substitution(('foo', 'bar'), ('bar', 'baz'))('foo') 'baz' """ substitutions = itertools.starmap(substitution, substitutions) # compose function applies last function first, so reverse the # substitutions to get the expected order. substitutions = reversed(tuple(substitutions)) return compose(*substitutions) class FoldedCase(str): """ A case insensitive string class; behaves just like str except compares equal when the only variation is case. >>> s = FoldedCase('hello world') >>> s == 'Hello World' True >>> 'Hello World' == s True >>> s != 'Hello World' False >>> s.index('O') 4 >>> s.split('O') ['hell', ' w', 'rld'] >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta'])) ['alpha', 'Beta', 'GAMMA'] Sequence membership is straightforward. >>> "Hello World" in [s] True >>> s in ["Hello World"] True You may test for set inclusion, but candidate and elements must both be folded. >>> FoldedCase("Hello World") in {s} True >>> s in {FoldedCase("Hello World")} True String inclusion works as long as the FoldedCase object is on the right. >>> "hello" in FoldedCase("Hello World") True But not if the FoldedCase object is on the left: >>> FoldedCase('hello') in 'Hello World' False In that case, use ``in_``: >>> FoldedCase('hello').in_('Hello World') True >>> FoldedCase('hello') > FoldedCase('Hello') False """ def __lt__(self, other): return self.lower() < other.lower() def __gt__(self, other): return self.lower() > other.lower() def __eq__(self, other): return self.lower() == other.lower() def __ne__(self, other): return self.lower() != other.lower() def __hash__(self): return hash(self.lower()) def __contains__(self, other): return super().lower().__contains__(other.lower()) def in_(self, other): "Does self appear in other?" return self in FoldedCase(other) # cache lower since it's likely to be called frequently. @method_cache def lower(self): return super().lower() def index(self, sub): return self.lower().index(sub.lower()) def split(self, splitter=' ', maxsplit=0): pattern = re.compile(re.escape(splitter), re.I) return pattern.split(self, maxsplit) # Python 3.8 compatibility _unicode_trap = ExceptionTrap(UnicodeDecodeError) @_unicode_trap.passes def is_decodable(value): r""" Return True if the supplied value is decodable (using the default encoding). >>> is_decodable(b'\xff') False >>> is_decodable(b'\x32') True """ value.decode() def is_binary(value): r""" Return True if the value appears to be binary (that is, it's a byte string and isn't decodable). >>> is_binary(b'\xff') True >>> is_binary('\xff') False """ return isinstance(value, bytes) and not is_decodable(value) def trim(s): r""" Trim something like a docstring to remove the whitespace that is common due to indentation and formatting. >>> trim("\n\tfoo = bar\n\t\tbar = baz\n") 'foo = bar\n\tbar = baz' """ return textwrap.dedent(s).strip() def wrap(s): """ Wrap lines of text, retaining existing newlines as paragraph markers. >>> print(wrap(lorem_ipsum)) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst. """ paragraphs = s.splitlines() wrapped = ('\n'.join(textwrap.wrap(para)) for para in paragraphs) return '\n\n'.join(wrapped) def unwrap(s): r""" Given a multi-line string, return an unwrapped version. >>> wrapped = wrap(lorem_ipsum) >>> wrapped.count('\n') 20 >>> unwrapped = unwrap(wrapped) >>> unwrapped.count('\n') 1 >>> print(unwrapped) Lorem ipsum dolor sit amet, consectetur adipiscing ... Curabitur pretium tincidunt lacus. Nulla gravida orci ... """ paragraphs = re.split(r'\n\n+', s) cleaned = (para.replace('\n', ' ') for para in paragraphs) return '\n'.join(cleaned) class Splitter(object): """object that will split a string with the given arguments for each call >>> s = Splitter(',') >>> s('hello, world, this is your, master calling') ['hello', ' world', ' this is your', ' master calling'] """ def __init__(self, *args): self.args = args def __call__(self, s): return s.split(*self.args) def indent(string, prefix=' ' * 4): """ >>> indent('foo') ' foo' """ return prefix + string class WordSet(tuple): """ Given an identifier, return the words that identifier represents, whether in camel case, underscore-separated, etc. >>> WordSet.parse("camelCase") ('camel', 'Case') >>> WordSet.parse("under_sep") ('under', 'sep') Acronyms should be retained >>> WordSet.parse("firstSNL") ('first', 'SNL') >>> WordSet.parse("you_and_I") ('you', 'and', 'I') >>> WordSet.parse("A simple test") ('A', 'simple', 'test') Multiple caps should not interfere with the first cap of another word. >>> WordSet.parse("myABCClass") ('my', 'ABC', 'Class') The result is a WordSet, so you can get the form you need. >>> WordSet.parse("myABCClass").underscore_separated() 'my_ABC_Class' >>> WordSet.parse('a-command').camel_case() 'ACommand' >>> WordSet.parse('someIdentifier').lowered().space_separated() 'some identifier' Slices of the result should return another WordSet. >>> WordSet.parse('taken-out-of-context')[1:].underscore_separated() 'out_of_context' >>> WordSet.from_class_name(WordSet()).lowered().space_separated() 'word set' >>> example = WordSet.parse('figured it out') >>> example.headless_camel_case() 'figuredItOut' >>> example.dash_separated() 'figured-it-out' """ _pattern = re.compile('([A-Z]?[a-z]+)|([A-Z]+(?![a-z]))') def capitalized(self): return WordSet(word.capitalize() for word in self) def lowered(self): return WordSet(word.lower() for word in self) def camel_case(self): return ''.join(self.capitalized()) def headless_camel_case(self): words = iter(self) first = next(words).lower() new_words = itertools.chain((first,), WordSet(words).camel_case()) return ''.join(new_words) def underscore_separated(self): return '_'.join(self) def dash_separated(self): return '-'.join(self) def space_separated(self): return ' '.join(self) def trim_right(self, item): """ Remove the item from the end of the set. >>> WordSet.parse('foo bar').trim_right('foo') ('foo', 'bar') >>> WordSet.parse('foo bar').trim_right('bar') ('foo',) >>> WordSet.parse('').trim_right('bar') () """ return self[:-1] if self and self[-1] == item else self def trim_left(self, item): """ Remove the item from the beginning of the set. >>> WordSet.parse('foo bar').trim_left('foo') ('bar',) >>> WordSet.parse('foo bar').trim_left('bar') ('foo', 'bar') >>> WordSet.parse('').trim_left('bar') () """ return self[1:] if self and self[0] == item else self def trim(self, item): """ >>> WordSet.parse('foo bar').trim('foo') ('bar',) """ return self.trim_left(item).trim_right(item) def __getitem__(self, item): result = super(WordSet, self).__getitem__(item) if isinstance(item, slice): result = WordSet(result) return result @classmethod def parse(cls, identifier): matches = cls._pattern.finditer(identifier) return WordSet(match.group(0) for match in matches) @classmethod def from_class_name(cls, subject): return cls.parse(subject.__class__.__name__) # for backward compatibility words = WordSet.parse def simple_html_strip(s): r""" Remove HTML from the string `s`. >>> str(simple_html_strip('')) '' >>> print(simple_html_strip('A stormy day in paradise')) A stormy day in paradise >>> print(simple_html_strip('Somebody tell the truth.')) Somebody tell the truth. >>> print(simple_html_strip('What about
\nmultiple lines?')) What about multiple lines? """ html_stripper = re.compile('()|(<[^>]*>)|([^<]+)', re.DOTALL) texts = (match.group(3) or '' for match in html_stripper.finditer(s)) return ''.join(texts) class SeparatedValues(str): """ A string separated by a separator. Overrides __iter__ for getting the values. >>> list(SeparatedValues('a,b,c')) ['a', 'b', 'c'] Whitespace is stripped and empty values are discarded. >>> list(SeparatedValues(' a, b , c, ')) ['a', 'b', 'c'] """ separator = ',' def __iter__(self): parts = self.split(self.separator) return filter(None, (part.strip() for part in parts)) class Stripper: r""" Given a series of lines, find the common prefix and strip it from them. >>> lines = [ ... 'abcdefg\n', ... 'abc\n', ... 'abcde\n', ... ] >>> res = Stripper.strip_prefix(lines) >>> res.prefix 'abc' >>> list(res.lines) ['defg\n', '\n', 'de\n'] If no prefix is common, nothing should be stripped. >>> lines = [ ... 'abcd\n', ... '1234\n', ... ] >>> res = Stripper.strip_prefix(lines) >>> res.prefix = '' >>> list(res.lines) ['abcd\n', '1234\n'] """ def __init__(self, prefix, lines): self.prefix = prefix self.lines = map(self, lines) @classmethod def strip_prefix(cls, lines): prefix_lines, lines = itertools.tee(lines) prefix = functools.reduce(cls.common_prefix, prefix_lines) return cls(prefix, lines) def __call__(self, line): if not self.prefix: return line null, prefix, rest = line.partition(self.prefix) return rest @staticmethod def common_prefix(s1, s2): """ Return the common prefix of two lines. """ index = min(len(s1), len(s2)) while s1[:index] != s2[:index]: index -= 1 return s1[:index] def remove_prefix(text, prefix): """ Remove the prefix from the text if it exists. >>> remove_prefix('underwhelming performance', 'underwhelming ') 'performance' >>> remove_prefix('something special', 'sample') 'something special' """ null, prefix, rest = text.rpartition(prefix) return rest def remove_suffix(text, suffix): """ Remove the suffix from the text if it exists. >>> remove_suffix('name.git', '.git') 'name' >>> remove_suffix('something special', 'sample') 'something special' """ rest, suffix, null = text.partition(suffix) return rest def normalize_newlines(text): r""" Replace alternate newlines with the canonical newline. >>> normalize_newlines('Lorem Ipsum\u2029') 'Lorem Ipsum\n' >>> normalize_newlines('Lorem Ipsum\r\n') 'Lorem Ipsum\n' >>> normalize_newlines('Lorem Ipsum\x85') 'Lorem Ipsum\n' """ newlines = ['\r\n', '\r', '\n', '\u0085', '\u2028', '\u2029'] pattern = '|'.join(newlines) return re.sub(pattern, '\n', text) def _nonblank(str): return str and not str.startswith('#') @functools.singledispatch def yield_lines(iterable): r""" Yield valid lines of a string or iterable. >>> list(yield_lines('')) [] >>> list(yield_lines(['foo', 'bar'])) ['foo', 'bar'] >>> list(yield_lines('foo\nbar')) ['foo', 'bar'] >>> list(yield_lines('\nfoo\n#bar\nbaz #comment')) ['foo', 'baz #comment'] >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n'])) ['foo', 'bar', 'baz', 'bing'] """ return itertools.chain.from_iterable(map(yield_lines, iterable)) @yield_lines.register(str) def _(text): return filter(_nonblank, map(str.strip, text.splitlines())) def drop_comment(line): """ Drop comments. >>> drop_comment('foo # bar') 'foo' A hash without a space may be in a URL. >>> drop_comment('http://example.com/foo#bar') 'http://example.com/foo#bar' """ return line.partition(' #')[0] def join_continuation(lines): r""" Join lines continued by a trailing backslash. >>> list(join_continuation(['foo \\', 'bar', 'baz'])) ['foobar', 'baz'] >>> list(join_continuation(['foo \\', 'bar', 'baz'])) ['foobar', 'baz'] >>> list(join_continuation(['foo \\', 'bar \\', 'baz'])) ['foobarbaz'] Not sure why, but... The character preceeding the backslash is also elided. >>> list(join_continuation(['goo\\', 'dly'])) ['godly'] A terrible idea, but... If no line is available to continue, suppress the lines. >>> list(join_continuation(['foo', 'bar\\', 'baz\\'])) ['foo'] """ lines = iter(lines) for item in lines: while item.endswith('\\'): try: item = item[:-2].strip() + next(lines) except StopIteration: return yield item PK{5Z7Lib/site-packages/setuptools/_vendor/jaraco/__init__.pynuW+APK{5Z448Lib/site-packages/setuptools/_vendor/jaraco/functools.pynuW+Aimport functools import time import inspect import collections import types import itertools import setuptools.extern.more_itertools from typing import Callable, TypeVar CallableT = TypeVar("CallableT", bound=Callable[..., object]) def compose(*funcs): """ Compose any number of unary functions into a single unary function. >>> import textwrap >>> expected = str.strip(textwrap.dedent(compose.__doc__)) >>> strip_and_dedent = compose(str.strip, textwrap.dedent) >>> strip_and_dedent(compose.__doc__) == expected True Compose also allows the innermost function to take arbitrary arguments. >>> round_three = lambda x: round(x, ndigits=3) >>> f = compose(round_three, int.__truediv__) >>> [f(3*x, x+1) for x in range(1,10)] [1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7] """ def compose_two(f1, f2): return lambda *args, **kwargs: f1(f2(*args, **kwargs)) return functools.reduce(compose_two, funcs) def method_caller(method_name, *args, **kwargs): """ Return a function that will call a named method on the target object with optional positional and keyword arguments. >>> lower = method_caller('lower') >>> lower('MyString') 'mystring' """ def call_method(target): func = getattr(target, method_name) return func(*args, **kwargs) return call_method def once(func): """ Decorate func so it's only ever called the first time. This decorator can ensure that an expensive or non-idempotent function will not be expensive on subsequent calls and is idempotent. >>> add_three = once(lambda a: a+3) >>> add_three(3) 6 >>> add_three(9) 6 >>> add_three('12') 6 To reset the stored value, simply clear the property ``saved_result``. >>> del add_three.saved_result >>> add_three(9) 12 >>> add_three(8) 12 Or invoke 'reset()' on it. >>> add_three.reset() >>> add_three(-3) 0 >>> add_three(0) 0 """ @functools.wraps(func) def wrapper(*args, **kwargs): if not hasattr(wrapper, 'saved_result'): wrapper.saved_result = func(*args, **kwargs) return wrapper.saved_result wrapper.reset = lambda: vars(wrapper).__delitem__('saved_result') return wrapper def method_cache( method: CallableT, cache_wrapper: Callable[ [CallableT], CallableT ] = functools.lru_cache(), # type: ignore[assignment] ) -> CallableT: """ Wrap lru_cache to support storing the cache data in the object instances. Abstracts the common paradigm where the method explicitly saves an underscore-prefixed protected property on first call and returns that subsequently. >>> class MyClass: ... calls = 0 ... ... @method_cache ... def method(self, value): ... self.calls += 1 ... return value >>> a = MyClass() >>> a.method(3) 3 >>> for x in range(75): ... res = a.method(x) >>> a.calls 75 Note that the apparent behavior will be exactly like that of lru_cache except that the cache is stored on each instance, so values in one instance will not flush values from another, and when an instance is deleted, so are the cached values for that instance. >>> b = MyClass() >>> for x in range(35): ... res = b.method(x) >>> b.calls 35 >>> a.method(0) 0 >>> a.calls 75 Note that if method had been decorated with ``functools.lru_cache()``, a.calls would have been 76 (due to the cached value of 0 having been flushed by the 'b' instance). Clear the cache with ``.cache_clear()`` >>> a.method.cache_clear() Same for a method that hasn't yet been called. >>> c = MyClass() >>> c.method.cache_clear() Another cache wrapper may be supplied: >>> cache = functools.lru_cache(maxsize=2) >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache) >>> a = MyClass() >>> a.method2() 3 Caution - do not subsequently wrap the method with another decorator, such as ``@property``, which changes the semantics of the function. See also http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/ for another implementation and additional justification. """ def wrapper(self: object, *args: object, **kwargs: object) -> object: # it's the first call, replace the method with a cached, bound method bound_method: CallableT = types.MethodType( # type: ignore[assignment] method, self ) cached_method = cache_wrapper(bound_method) setattr(self, method.__name__, cached_method) return cached_method(*args, **kwargs) # Support cache clear even before cache has been created. wrapper.cache_clear = lambda: None # type: ignore[attr-defined] return ( # type: ignore[return-value] _special_method_cache(method, cache_wrapper) or wrapper ) def _special_method_cache(method, cache_wrapper): """ Because Python treats special methods differently, it's not possible to use instance attributes to implement the cached methods. Instead, install the wrapper method under a different name and return a simple proxy to that wrapper. https://github.com/jaraco/jaraco.functools/issues/5 """ name = method.__name__ special_names = '__getattr__', '__getitem__' if name not in special_names: return wrapper_name = '__cached' + name def proxy(self, *args, **kwargs): if wrapper_name not in vars(self): bound = types.MethodType(method, self) cache = cache_wrapper(bound) setattr(self, wrapper_name, cache) else: cache = getattr(self, wrapper_name) return cache(*args, **kwargs) return proxy def apply(transform): """ Decorate a function with a transform function that is invoked on results returned from the decorated function. >>> @apply(reversed) ... def get_numbers(start): ... "doc for get_numbers" ... return range(start, start+3) >>> list(get_numbers(4)) [6, 5, 4] >>> get_numbers.__doc__ 'doc for get_numbers' """ def wrap(func): return functools.wraps(func)(compose(transform, func)) return wrap def result_invoke(action): r""" Decorate a function with an action function that is invoked on the results returned from the decorated function (for its side-effect), then return the original result. >>> @result_invoke(print) ... def add_two(a, b): ... return a + b >>> x = add_two(2, 3) 5 >>> x 5 """ def wrap(func): @functools.wraps(func) def wrapper(*args, **kwargs): result = func(*args, **kwargs) action(result) return result return wrapper return wrap def call_aside(f, *args, **kwargs): """ Call a function for its side effect after initialization. >>> @call_aside ... def func(): print("called") called >>> func() called Use functools.partial to pass parameters to the initial call >>> @functools.partial(call_aside, name='bingo') ... def func(name): print("called with", name) called with bingo """ f(*args, **kwargs) return f class Throttler: """ Rate-limit a function (or other callable) """ def __init__(self, func, max_rate=float('Inf')): if isinstance(func, Throttler): func = func.func self.func = func self.max_rate = max_rate self.reset() def reset(self): self.last_called = 0 def __call__(self, *args, **kwargs): self._wait() return self.func(*args, **kwargs) def _wait(self): "ensure at least 1/max_rate seconds from last call" elapsed = time.time() - self.last_called must_wait = 1 / self.max_rate - elapsed time.sleep(max(0, must_wait)) self.last_called = time.time() def __get__(self, obj, type=None): return first_invoke(self._wait, functools.partial(self.func, obj)) def first_invoke(func1, func2): """ Return a function that when invoked will invoke func1 without any parameters (for its side-effect) and then invoke func2 with whatever parameters were passed, returning its result. """ def wrapper(*args, **kwargs): func1() return func2(*args, **kwargs) return wrapper def retry_call(func, cleanup=lambda: None, retries=0, trap=()): """ Given a callable func, trap the indicated exceptions for up to 'retries' times, invoking cleanup on the exception. On the final attempt, allow any exceptions to propagate. """ attempts = itertools.count() if retries == float('inf') else range(retries) for attempt in attempts: try: return func() except trap: cleanup() return func() def retry(*r_args, **r_kwargs): """ Decorator wrapper for retry_call. Accepts arguments to retry_call except func and then returns a decorator for the decorated function. Ex: >>> @retry(retries=3) ... def my_func(a, b): ... "this is my funk" ... print(a, b) >>> my_func.__doc__ 'this is my funk' """ def decorate(func): @functools.wraps(func) def wrapper(*f_args, **f_kwargs): bound = functools.partial(func, *f_args, **f_kwargs) return retry_call(bound, *r_args, **r_kwargs) return wrapper return decorate def print_yielded(func): """ Convert a generator into a function that prints all yielded elements >>> @print_yielded ... def x(): ... yield 3; yield None >>> x() 3 None """ print_all = functools.partial(map, print) print_results = compose(more_itertools.consume, print_all, func) return functools.wraps(func)(print_results) def pass_none(func): """ Wrap func so it's not called if its first param is None >>> print_text = pass_none(print) >>> print_text('text') text >>> print_text(None) """ @functools.wraps(func) def wrapper(param, *args, **kwargs): if param is not None: return func(param, *args, **kwargs) return wrapper def assign_params(func, namespace): """ Assign parameters from namespace where func solicits. >>> def func(x, y=3): ... print(x, y) >>> assigned = assign_params(func, dict(x=2, z=4)) >>> assigned() 2 3 The usual errors are raised if a function doesn't receive its required parameters: >>> assigned = assign_params(func, dict(y=3, z=4)) >>> assigned() Traceback (most recent call last): TypeError: func() ...argument... It even works on methods: >>> class Handler: ... def meth(self, arg): ... print(arg) >>> assign_params(Handler().meth, dict(arg='crystal', foo='clear'))() crystal """ sig = inspect.signature(func) params = sig.parameters.keys() call_ns = {k: namespace[k] for k in params if k in namespace} return functools.partial(func, **call_ns) def save_method_args(method): """ Wrap a method such that when it is called, the args and kwargs are saved on the method. >>> class MyClass: ... @save_method_args ... def method(self, a, b): ... print(a, b) >>> my_ob = MyClass() >>> my_ob.method(1, 2) 1 2 >>> my_ob._saved_method.args (1, 2) >>> my_ob._saved_method.kwargs {} >>> my_ob.method(a=3, b='foo') 3 foo >>> my_ob._saved_method.args () >>> my_ob._saved_method.kwargs == dict(a=3, b='foo') True The arguments are stored on the instance, allowing for different instance to save different args. >>> your_ob = MyClass() >>> your_ob.method({str('x'): 3}, b=[4]) {'x': 3} [4] >>> your_ob._saved_method.args ({'x': 3},) >>> my_ob._saved_method.args () """ args_and_kwargs = collections.namedtuple('args_and_kwargs', 'args kwargs') @functools.wraps(method) def wrapper(self, *args, **kwargs): attr_name = '_saved_' + method.__name__ attr = args_and_kwargs(args, kwargs) setattr(self, attr_name, attr) return method(self, *args, **kwargs) return wrapper def except_(*exceptions, replace=None, use=None): """ Replace the indicated exceptions, if raised, with the indicated literal replacement or evaluated expression (if present). >>> safe_int = except_(ValueError)(int) >>> safe_int('five') >>> safe_int('5') 5 Specify a literal replacement with ``replace``. >>> safe_int_r = except_(ValueError, replace=0)(int) >>> safe_int_r('five') 0 Provide an expression to ``use`` to pass through particular parameters. >>> safe_int_pt = except_(ValueError, use='args[0]')(int) >>> safe_int_pt('five') 'five' """ def decorate(func): @functools.wraps(func) def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except exceptions: try: return eval(use) except TypeError: return replace return wrapper return decorate PK{5ZhILib/site-packages/setuptools/_vendor/__pycache__/__init__.cpython-311.pycnuW+A b;ddS)NrjE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/__init__.pyrsrPK{5ZCJppRLib/site-packages/setuptools/_vendor/__pycache__/typing_extensions.cpython-311.pycnuW+A b;dmTxddlZddlZddlZddlZddlZddlZejdddkZereZ nddlm Z m Z dZ dZ gdZ ere gdeed rejZn!Gd d ejd Zed ZejdZejdZejdZejdd Zejdd ZejZeedrejdddkrejZnWejdddkr#Gddejd ZeddZn!Gddejd Zed ZeedrejZndZd Zeed!rej Z nWejdddkr#Gd"d#ejd Z!e!d!d$Z n!Gd%d&ejd Z"e"d Z ej#Z#ej$Z$ej%Z%Gd'd(e Z&ej'Z'ej(Z(ej)Z)ej*Z*eed)rej+Z+n'Gd*d)ej,ej-ee&ej,+Z+ej.Z.eed,rej/Z/ndd-l0m1Z2Gd.d,ej3eZ/ej4Z4eed/rej5Z5n_dejddcxkrd0krnnej6ej5eefZ5n)Gd1d/ej5ej7eefe&ej5+Z5eed2rej8Z8n)Gd3d2ej8ej9ee:fe&ej8+Z8eed4rej;Z;n5eed4r)Gd5d4ej;ej7eefe&ej;+Z;eed6rej<ZZ>ej?Z?d8Z@gd9ZAd:ZBd;ZCeed<rejDZDnVer,dd=lmEZEd>ZFGd?d@ejGZHGdAd NoReturn: raise Exception('no way') This type is invalid in other positions, e.g., ``List[NoReturn]`` will fail in static type checkers. c td)Nz*NoReturn cannot be used with isinstance().rselfobjs r__instancecheck__z_NoReturn.__instancecheck__mHII Irc td)Nz*NoReturn cannot be used with issubclass().rErGrs r__subclasscheck__z_NoReturn.__subclasscheck__prJrN__name__ __module__ __qualname____doc__rrIrMrCrrrBrB_sK   J J J J J J J JrrBT_rootTKTVTT_co) covariantT_contra) contravariantr)rrceZdZdZdZdS) _FinalFormcd|jzSNztyping_extensions._namerGs r__repr__z_FinalForm.__repr__'$*4 4rchtj||jd}tj||fS)N accepts only single typetyping _type_checkrb _GenericAliasrGritems r __getitem__z_FinalForm.__getitem__s;%j)-&N&N&NPPD'tg66 6rNrOrPrQrdrnrCrrr^r^2 5 5 5 7 7 7 7 7rr^aWA special typing construct to indicate that a name cannot be re-assigned or overridden in a subclass. For example: MAX_SIZE: Final = 9000 MAX_SIZE += 1 # Error reported by type checker class Connection: TIMEOUT: Final[int] = 10 class FastConnector(Connection): TIMEOUT = 1 # Error reported by type checker There is no runtime checking of these properties.)doccFeZdZdZdZd dZdZdZfdZdZ d Z xZ S) _FinalaA special typing construct to indicate that a name cannot be re-assigned or overridden in a subclass. For example: MAX_SIZE: Final = 9000 MAX_SIZE += 1 # Error reported by type checker class Connection: TIMEOUT: Final[int] = 10 class FastConnector(Connection): TIMEOUT = 1 # Error reported by type checker There is no runtime checking of these properties. __type__Nc ||_dSNrtrGtpkwdss r__init__z_Final.__init__ DMMMrct|}|j0|tj||jddddSt |jddd)N accepts only single type.TrS cannot be further subscriptedtyperurirjrOrrGrmrs rrnz_Final.__getitem__st**C}$s6-d!l122.JJJLL!%''''s|ABB/OOOPP Prctj|j||}||jkr|St||dSNTrSri _eval_typerurrGglobalnslocalnsnew_tps rrz_Final._eval_typeE&t}hHHF&& 4::fD111 1rct}|j |dtj|jdz }|SN[]superrdruri _type_reprrGr __class__s rrdz_Final.__repr__H  ""A}(<*4=99<<<<HrcRtt|j|jfSrwhashrrOrurcs r__hash__z_Final.__hash__ d,dm<== =rcpt|tstS|j|j|jkS||uSrw) isinstancersNotImplementedrurGothers r__eq__z _Final.__eq__s;eV,, &%%}(}665= rrw rOrPrQrRrr{rnrrdrr __classcell__rs@rrsrss "      Q Q Q 2 2 2        > > > ! ! ! ! ! ! !rrsr1c|S)auThis decorator can be used to indicate to type checkers that the decorated method cannot be overridden, and decorated class cannot be subclassed. For example: class Base: @final def done(self) -> None: ... class Sub(Base): def done(self) -> None: # Error reported by type checker ... @final class Leaf: ... class Other(Leaf): # Error reported by type checker ... There is no runtime checking of these properties. rC)fs rr1r1s (rc*tj|Srw)riTypeVarnames rr2r2s >$  rr3ceZdZdZdZdS) _LiteralFormcd|jzSr`rarcs rrdz_LiteralForm.__repr__rerc,tj||Srw)rirkrGrs rrnz_LiteralForm.__getitem__s'j99 9rNrorCrrrrs2 5 5 5 : : : : :rraoA type that can be used to indicate to type checkers that the corresponding value has a value literally equivalent to the provided parameter. For example: var: Literal[4] = 4 The type checker understands that 'var' is literally equal to the value 4 and no other value. Literal[...] cannot be subclassed. There is no runtime checking verifying that the parameter is actually a value instead of a type.cFeZdZdZdZd dZdZdZfdZdZ d Z xZ S) _LiteralaA type that can be used to indicate to type checkers that the corresponding value has a value literally equivalent to the provided parameter. For example: var: Literal[4] = 4 The type checker understands that 'var' is literally equal to the value 4 and no other value. Literal[...] cannot be subclassed. There is no runtime checking verifying that the parameter is actually a value instead of a type.  __values__Nc ||_dSrwr)rGvaluesrzs rr{z_Literal.__init__! $DOOOrct|}|j%t|ts|f}||dSt |jddd)NTrSr~r)rrrtuplerrO)rGrrs rrnz_Literal.__getitem__$set**C&!&%00'$YFs6....s|ABB/OOOPP Prc|SrwrC)rGrrs rrz_Literal._eval_type,Krct}|j9|ddt t j|jdz }|S)Nr, r)rrdrjoinmaprirrs rrdz_Literal.__repr__/sV  ""A*N3v'8$/#J#JKKNNNNHrcRtt|j|jfSrw)rrrOrrcs rrz_Literal.__hash__5s d,do>?? ?rcpt|tstS|j|j|jkS||uSrw)rrrrrs rrz_Literal.__eq__8s<eX.. &%%*%*:::5= rrwrrs@rrrs $  % % % % Q Q Q          @ @ @ ! ! ! ! ! ! !rrceZdZfdZxZS)_ExtensionsGenericMetac|j2tjdjddvrt ddS|js!t |S|j|}|tur|S|j|j vrdS|j D]+}t|trt||rdS,dS)a*This mimics a more modern GenericMeta.__subclasscheck__() logic (that does not have problems with recursion) to work around interactions between collections, typing, and typing_extensions on older versions of Python, see https://github.com/python/typing/issues/501. Nr~rOabc functoolsCParameterized generics cannot be used with class or instance checksFT) __origin__sys _getframe f_globalsr __extra__rrM__subclasshook__r__mro____subclasses__rr issubclass)rGsubclassressclsrs rrMz(_ExtensionsGenericMeta.__subclasscheck__Ns ? &}Q)*5=QQQ!56665~ 777,,X66 6n--h77 n $ $J >X- - -4N1133  D$ ,, (D)) tt ur)rOrPrQrMrrs@rrrMs8rrr+ceZdZdZdZdS)r+rCc|jturtj|i|St jtj|g|Ri|Srw)_gorgr+ collectionsdequeri _generic_newrargsrzs r__new__z Deque.__new__wsKyE!!"($7$777&{'8#MMMMMM MrNrOrPrQrrrCrrr+r+rs/  N N N N Nr) metaclassextrar')_check_methodscNeZdZdZdZejdZedZ dS)r'rCc K|SrwrCrcs r __aenter__zAsyncContextManager.__aenter__s Krc KdSrwrC)rGexc_type exc_value tracebacks r __aexit__zAsyncContextManager.__aexit__s 4rcD|turt|ddStS)Nrr)r'_check_methods_in_mror)rCs rrz$AsyncContextManager.__subclasshook__s&))),Q kJJJ! !rN) rOrPrQrrrabstractmethodr classmethodrrCrrr'r'sb            " "  " " "rr-)rrr\ceZdZdZdZdS)r-rCc|jturtj|i|Stjtj|g|Ri|Srw)rr-rrirrs rrzOrderedDict.__new__sKyK''".====&{'>SdSSSdSS SrNrrCrrr-r-s/  T T T T Trr*ceZdZdZdZdS)r*rCc|jturtj|i|Stjtj|g|Ri|Srw)rr*rrirrs rrzCounter.__new__sKyG##"*D9D999&{':CO$OOO$OO OrNrrCrrr*r*s/  P P P P Prr(ceZdZdZdZdS)r(rCc|jturtj|i|Stjtj|g|Ri|Srw)rr(rrirrs rrzChainMap.__new__sKyH$$"+T:T:::&{';SP4PPP4PP PrNrrCrrr(r(s/  Q Q Q Q Qrr&ceZdZdZdS)r&rCN)rOrPrQrrCrrr&r&s rct|tsJt|dr|jS|j|j}|j|S)z@This function exists for compatibility with old typing versions.r)rrhasattrrrrs rrrsP c; ' ''''sGy . $n . $ Jr) Callabler"IterableIteratorr$r#HashableSized Container Collection Reversibler)r'cnt}|jddD]}|jdvr t|di}t |jt |zD]0}|ds|dvr||1|S)N)r6Generic__annotations___abc_)__abstractmethods__r __weakref__ _is_protocol_is_runtime_protocol__dict____args__r__next_in_mro__rr__orig_bases__r __tree_hash__rRrr{rrP_MutableMapping__markerr) setrrOgetattrlistr keys startswithadd)rattrsbase annotationsattrs r_get_protocol_attrsrs EEE CRC    =3 3 3 d$5r:: ++--..k6F6F6H6H1I1II DOOG,, >F2F2F $  LrcTtfdtDS)Nc3TK|]"}tt|dV#dSrw)callabler).0rrs r z,_is_callable_members_only..s7WWdxT40011WWWWWWr)allrrs`r_is_callable_members_onlyr!s0 WWWW>QRU>V>VWWW W WWrr6)_collect_type_varscLt|jrtddSNz Protocols cannot be instantiatedrrrrGrkwargss r_no_initr(/ :: " @>?? ? @ @rceZdZfdZxZS) _ProtocolMetactddrtrtjrdSjr+t fdt DrdStS)NrFTc3K|]E}t|o0tt|d pt|duVFdSrwrrr)rrrinstances rrz2_ProtocolMeta.__instancecheck__..sy== x..=$WS$%=%=>>><$//t;======r) rr!rrrr rrrI)rr/rs``rrIz_ProtocolMeta.__instancecheck__ sS.%88 *3// x1377 t =====$7s#;#;=====  477,,X66 6r)rOrPrQrIrrs@rr+r+ s8 7 7 7 7 7 7 7 7 7rr+cPeZdZdZdZdZfdZejdZ dZ xZ S)r6aBase class for protocol classes. Protocol classes are defined as:: class Proto(Protocol): def meth(self) -> int: ... Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example:: class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check See PEP 544 for details. Protocol classes decorated with @typing_extensions.runtime act as simple-minded runtime protocol that checks only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:: class GenProto(Protocol[T]): def meth(self) -> T: ... rCTcv|turtdt|S)NzIType Protocol cannot be instantiated; it can only be used as a base class)r6rrr)rrrzrs rrzProtocol.__new__>s=h!FGGG77??3'' 'rct|ts|f}|s&|tjurt d|jddtfd|D}|t urtd|Dsed}t||tjr%|dz }t||tj%t d|dzd ||tt|t|krt d nt||tj ||S) NParameter list to [...] cannot be empty*Parameters to generic types must be types.c3BK|]}tj|VdSrwrirjrpmsgs rrz-Protocol.__class_getitem__..Ls0FF!6-a55FFFFFFrc3JK|]}t|tjVdSrwrrirrr9s rrz-Protocol.__class_getitem__..O.IIQ:a88IIIIIIrrr~zBParameters to Protocol[...] must all be type variables. Parameter z is z.Parameters to Protocol[...] must all be unique) rrriTuplerrQr6r rrrrrk)rparamsir:s @r__class_getitem__zProtocol.__class_getitem__Dsfe,, #  Rc55P)9PPPRRR>CFFFFvFFFFFFhII&IIIII>A$VAY??Q%VAY??#=&'!e==17==>>>s6{{##s6{{22#HJJJ3 sF+++'V44 4rc x g}djvrtjjv}ntjjv}|rt ddjvrt j}d}jD]Z}t|tjr>|j tjtfvr$|j j }|t d|j }[||}nt|}t| | ksYd fd|D} dd|D} t d| d|d | d |}t|_ jd ds#t#d jD_fd } djvr| _jsdSjD]k}|t(tjfvsT|jdkr|j t,vs;t|t.r|jst dt1|lt2_dS)Nr !Cannot inherit from plain GenericzECannot inherit from Generic[...] and/or Protocol[...] multiple types.rc3>K|]}|vt|VdSrwstrrtgvarsets rrz-Protocol.__init_subclass__..~3*U*UaAWDTDT3q66DTDTDTDT*U*Urc34K|]}t|VdSrwrFrgs rrz-Protocol.__init_subclass__..(*A*Aa3q66*A*A*A*A*A*ArSome type variables () are not listed in rrrc3(K|] }|tuVdSrw)r6rbs rrz-Protocol.__init_subclass__..s&&L&LqH}&L&L&L&L&L&LrcjddstStdds7t jdjddvrtStdts7t jdjddvrtStdt|tstd tD]}|j D]r}||jvr|j| tccSnWt|d i}t|tjr"||vrt|tr |jrn stcSd S) Nrr Fr\rOrBInstance and class checks can only be used with @runtime protocols._proto_hooks|''==*))s$:EBB;}Q''1*=AUUU--#%:;;;055C}Q''1*=AUUU--#%BCCC!%..J#$HIII/44 . .D % . .4=00#}T2:'5 5 5 5 5 5!E&-d4Er&J&J &{FNCC" $ 3 3 *5- @ @!4 % 2!4"E----trrcollections.abc5Protocols can only inherit from other protocols, got )r rirr  __bases__rr"rrkrr6rOrrrrrYanyrrobjectrP_PROTO_WHITELISTr+reprr(r{) rrr'tvarserrorgvarsrthe_basetvarsets_varss_argsr\rJs ` @r__init_subclass__zProtocol.__init_subclass__^sE3<//#*<<#-7 E CDDD3<//*3+=>> . 4 4D"4)=>>4 O/III#'?#; ,"+!H#I#II!% 3=!EE!%jjG!%jjG"g--!%*U*U*U*U5*U*U*U!U!U!%*A*A5*A*A*A!A!A')O)O)O:B)O)OEK)O)O)OPPP!E!&uC <##ND99 M#&&L&Lcm&L&L&L#L#L      >"55'2$#   E E 888+<<< )999"477:<@.s.HHQ:a88HHHHHHrrDzACannot inherit from Generic[...] or Protocol[...] multiple times.rc3>K|]}|vt|VdSrwrFrHs rrz(_ProtocolMeta.__new__..rKrc34K|]}t|VdSrwrFrMs rrz(_ProtocolMeta.__new__..rOrc3<K|]}|jtjuVdSrw)rrirrSs rrz(_ProtocolMeta.__new__..sG4D4D8956LFN4R4D4D4D4D4D4Drrr6rPrQrrc3bK|]*}t|trt|n|V+dSrw)rrrrSs rrz(_ProtocolMeta.__new__..sO**'1K&@&@G%(((a******rc3\K|]'}t|to |tjuV(dSrw)rrrirrSs rrz(_ProtocolMeta.__new__..s8YYa:a--I!6>2IYYYYYYrc36K|]}|tju|VdSrw)rirrSs rrz(_ProtocolMeta.__new__..s.JJA!6>2I2Ia2I2I2I2IJJr)rrTrSrc3ZK|]&}|tjurdn|tjurdn|V'dS).rCN)ri_TypingEllipsis _TypingEmptyras rrz(_ProtocolMeta.__new__..sZ"3"3()*+f.D)D)D##()V-@(@(@"""#"3"3"3"3"3"3r _subs_tree)!r rrirrrrrr6rrrr`rrABCMetarupdaterr __setattr__rr rmr r  _abc_registry _abc_cacherrr}rr)rrbases namespacerdroriginr orig_basesrfrrhrirjcls_name initial_basesrGrJrs @rrz_ProtocolMeta.__new__s=== )))HH%HHHHHOO%OOOO"5))! 4 4Dv~--'(KLLL"4554 O/III ,"+!A#B#BB!% 3=!EE!%jjG!%jjG"g--!%*U*U*U*U5*U*U*U!U!U!%*A*A5*A*A*A!A!A034D4D=B4D4D4D1D1D$T99IS!')O)O)O:B)O)OEK)O)O)OPPP!E!M!d5kkS[&@&@&&5(**#(*****EYYSXYYYYY KJJJJJJJ   FGG H H Hc**223eY9=3??D +t $ $ 0 0=C2?16v @ @ @#(D 7;EE"3"3-1"3"3"3333@D M$0#5#5D !&3###%+%9""("3t\** KAG'Jd4??+<+<&=&=&=&+K&>&>&G&G&I&I"Krc\tj|i|jdds#t djD_jrjddD]}|ttj fvs|j dkr|j tvsht|tjr|jsGt|t r|jtj ust%dt'|t(_fd}djvr |_dSdS)Nrc3nK|]0}|tup"t|to |jtuV1dSrw)r6rr+rrSs rrz)_ProtocolMeta.__init__.. s_'?'?,-()H}(@'1!]'C'C(@'(|x'?'?'?'?'?'?'?rr~r]r^cjddstSt|tst dt D]}|jD]r}||jvr|j| tccSnWt|di}t|tj r"||vrt|tr |j rn stcSdS)NrrXrT) r rYrrrrrrrrirZr+rr[s rr\z+_ProtocolMeta.__init__.._proto_hooks|''==*))!%..J#$HIII/44 . .D % . .4=00#}T2:'5 5 5 5 5 5!E&-d4Er&J&J &{FNCC" $ 3 3 *5- @ @!4 % 2!4"E----trr)rr{r rYr`r_rrrarirrPrOrbr TypingMetarrrrcr(r)rrr'rr\rs` rr{z_ProtocolMeta.__init__s} EGG d -f - - -<##ND99 ?#&'?'?14 '?'?'?$?$?  (KOIID VV^$<<< O/@@@ M-===&tV->??>DHDU>&t[99>!Ov~==')H;?::)H)HIII (      *"55'2$$$65rc*tddrtrtjrdSjr+t fdt DrdStt S)NrFTc3K|]E}t|o0tt|d pt|duVFdSrwr.)rrr/rGs rrz2_ProtocolMeta.__instancecheck__..;sy??!x..>%gdD$&?&?@@@= 400<??????r) rr!rrrr rrrrI)rGr/rs``rrIz_ProtocolMeta.__instancecheck__3sT>599 -d33 x1488 t  ?????%8$=$=?????  4d++==hGG Grc|j2tjdjddvrt ddS|jddrM|jdds2tjdjddvrdSt d |jddrgt|sXtjdjddvr(tt| |St d tt| |S) Nr~rOrrFrr rrrirVrW) rrrrrr rYr!rrrM)rGrrs rrMz_ProtocolMeta.__subclasscheck__Bsf*=##-j9AUUU#%9:::u !!.$77 7 ))*@$GG 7=##-j9>HHH!5!6777 !!"8$?? ?1$77 ?=##-j9>HHH!d33EEcJJJ!>???d++==cBB Brc t|ts|f}|s3t|tjurt d|jddtfd|D}|tjtfvrtd|Ds t dt|dtt|t|kr t dt|d|}|}n|tjtj fvrt|}|}nZ|jtjtfvrt d t|t!||t|}|}|j|fnd }||j||jzt)|j||||j|j S) Nr3r4r5c38K|]}t|VdSrw)rjr8s rrz,_ProtocolMeta.__getitem__..ds-??1;q#..??????rc3JK|]}t|tjVdSrwr<r=s rrz,_ProtocolMeta.__getitem__..fr>rzParameters to z [...] must all be type variablesz[...] must all be uniquez%Cannot subscript already-subscripted rC)rdrrrr)rrrrir?rrQrr6r rcrrrrrrrrOr_rr rr )rGr@rdrprependr:s @rrnz_ProtocolMeta.__getitem__Zsfe,, #  SeDkk==Q):QQQSSS>C?????????F111II&IIIIIW#UdUUUWWWs6{{##s6{{22#MdMMMOOO&,888"6**V^X$>>> TT T TUUUtV,,,"6**!%!8tggbG>>$-")DN":"0"?"?(-'+)-(,-1-@"BB Br)NNNNN) rOrPrQrRrr{rIrMrirlrnrrs@rr+r+s  PT> > > > > > @* 3* 3* 3* 3* 3X H H H H H C C C C C0  % B% B  % B% B% B% B% Brc eZdZdZdZdZdZdS)r6aBase class for protocol classes. Protocol classes are defined as:: class Proto(Protocol): def meth(self) -> int: ... Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example:: class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check See PEP 544 for details. Protocol classes decorated with @typing_extensions.runtime act as simple-minded runtime protocol that checks only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:: class GenProto(Protocol[T]): def meth(self) -> T: ... rCTct|turtdtj|j|g|Ri|S)NzIType Protocol cannot be instantiated; it can be used only as a base class)rr6rrirr rs rrzProtocol.__new__sTSzzX%%!FGGG&s':CO$OOO$OO OrN)rOrPrQrRrrrrCrrr6r6s>  8   P P P P Prr8cpt|tr|jstd|d|_|S)a4Mark a protocol class as a runtime protocol, so that it can be used with isinstance() and issubclass(). Raise TypeError if applied to a non-protocol class. This allows a simple-minded structural check very similar to the one-offs in collections.abc such as Hashable. z@@runtime_checkable can be only applied to protocol classes, got T)rr+rrr rs rr8r8sQ#}-- -S5E -,$',,-- -#'  rr/c8eZdZdZejdefdZdS)r/rCreturncdSrwrCrcs r __index__zSupportsIndex.__index__s DrN)rOrPrQrrrintrrCrrr/r/sB  s        r)r r\c tjdjddvrtdn#tt f$rYnwxYwdS)Nr~rOrz4TypedDict does not support instance and class checksF)rrrrAttributeError ValueError)rrs r _check_failsrsq }Q)*5>HHH VWWW H  +    D us03AAc`|std|d|dd}}t|i|S)N)TypedDict.__new__(): not enough argumentsrr~)rr )rr'_s r _dict_newrsB IGHH Hq'484T$V$$$rz,($cls, _typename, _fields=None, /, **kwargs)totalc|std|d|dd}}|r|d|dd}}nJd|vr7|d}ddl}|dtdntd|r7 |\}n#t $r$td t |dzd wxYwd |vrJt |dkr7|d }ddl}|d tdnd}||}n|rtd dt|i} tj dj dd|d<n#tt f$rYnwxYwt|d||S)Nrrr~ _typenamez5Passing '_typename' as keyword argument is deprecatedr\) stacklevelzGTypedDict.__new__() missing 1 required positional argument: '_typename'z?TypedDict.__new__() takes from 2 to 3 positional arguments but z were given_fieldsz3Passing '_fields' as keyword argument is deprecatedz@TypedDict takes either a dict or keyword arguments, but not bothrrO__main__rPrCr)rr warningswarnDeprecationWarningrrr rrrrYr_TypedDictMeta)rrr'rtypenamerfieldsnss r_typeddict_newrs( IGHH Hq'484  5!!Wd122hdHH F " "zz+..H OOO MMQ,  < < < <455 5   . . . .!-FF  -,-- - f . "}Q//9==j*UUB|   +    D hBe<<<z*_TypedDictMeta.__new__..*s9381b6%b#..r__required_keys__rC__optional_keys__ __total__)rrrrr rYrritemsrr r frozensetrrrr)rrrrrtp_dictrown_annotationsown_annotation_keys required_keys optional_keysrr:rs @rrz_TypedDictMeta.__new__s/3k.A.ANNyByMggooc4$"==GK ff%6;;O"%o&:&:&<&<"="= SC?? ?rcdtj|jddd|jDdS)Nztyping_extensions.Annotated[rc34K|]}t|VdSrwrcr{s rrz+_AnnotatedAlias.__repr__..s( D DQa D D D D D Drr)rirrrrrcs rrdz_AnnotatedAlias.__repr__s\H63DT_3U3UHHyy D D$2C D D DDDHHH IrcHtjt|jf|jzffSrw)operatorgetitemr0rrrcs r __reduce__z_AnnotatedAlias.__reduce__s)#DO-0AA& rc~t|tstS|j|jkrdS|j|jkS)NF)rrrrrrs rrz_AnnotatedAlias.__eq__s@e_55 &%%%"222u$(:: :rc8t|j|jfSrw)rrrrcs rrz_AnnotatedAlias.__hash__s$*;<== =r) rOrPrQrRr{rrdrrrrrs@rrrns   ) ) ) ) ) @ @ @  I I I     ; ; ; > > > > > > >rrcBeZdZdZdZdZejdZdZ dS)r0aAdd context specific metadata to a type. Example: Annotated[int, runtime_check.Unsigned] indicates to the hypothetical runtime_check module that this type is an unsigned int. Every other consumer of this type can ignore this metadata and treat this type as int. The first argument to Annotated must be a valid type (and will be in the __origin__ field), the remaining arguments are kept as a tuple in the __extra__ field. Details: - It's an error to call `Annotated` with less than two arguments. - Nested Annotated are flattened:: Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3] - Instantiating an annotated type is equivalent to instantiating the underlying type:: Annotated[C, Ann1](5) == C(5) - Annotated can be used as a generic type alias:: Optimized = Annotated[T, runtime.Optimize()] Optimized[int] == Annotated[int, runtime.Optimize()] OptimizedList = Annotated[List[T], runtime.Optimize()] OptimizedList[int] == Annotated[List[int], runtime.Optimize()] rCc td)Nz&Type Annotated cannot be instantiated.rErrr's rrzAnnotated.__new__sDEE Erct|trt|dkrtdd}t j|d|}t|dd}t ||S)Nr\zUAnnotated[...] should be used with at least two arguments (a type and an annotation).$Annotated[t, ...]: t must be a type.rr~)rrrrrirjr)rr@r:rrs rrBzAnnotated.__class_getitem__s{fe,, 0F a!/0009C'q 377FVABBZ((H"6844 4rc2td|jd)NCannot subclass z .Annotated)rrPrs rrkzAnnotated.__init_subclass__s$=3>=== rN) rOrPrQrRrrrirlrBrkrCrrr0r0sf  @  F F F   5 5   5     rc(t|trt|jSt|tjrNt d|jD}||jkr|S||}|j |_ |S|S)z2Strips the annotations from a given type. c34K|]}t|VdSrw_strip_annotationsr{s rrz%_strip_annotations..s+!L!LA"4Q"7"7!L!L!L!L!L!Lr) rrrrrirkrr r_special)rI stripped_argsrs rrrs a ) ) 4%al33 3 a- . . !!L!L!L!L!LLLM **++m,,C:CLJrFcttj|||}|r|Sd|DS)a]Return type hints for an object. This is often the same as obj.__annotations__, but it handles forward references encoded as string literals, adds Optional[t] if a default value equal to None is set and recursively replaces all 'Annotated[T, ...]' with 'T' (unless 'include_extras=True'). The argument may be a module, class, method, or function. The annotations are returned as a dictionary. For classes, annotations include also inherited members. TypeError is raised if the argument is not of a type that can contain annotations, and an empty dictionary is returned if no annotations are present. BEWARE -- the behavior of globalns and localns is counterintuitive (unless you are familiar with how eval() and exec() work). The search order is locals first, then globals. - If no dict arguments are passed, an attempt is made to use the globals from obj (or the respective module's globals for classes), and these are also used as the locals. If the object does not appear to have globals, an empty dictionary is used. - If one dict argument is passed, it is used for both globals and locals. - If two dict arguments are passed, they specify globals and locals, respectively. )rrc4i|]\}}|t|SrCr)rkrIs rrz"get_type_hints..s'BBBTQ%a((BBBr)rir?r)rHrrinclude_extrashints rr?r?sD>$S8WMMM  KBBTZZ\\BBBBrc|t|dko)|do|dS)z3Returns True if name is a __dunder_variable_name__.__)rrendswithrs r _is_dunderrs44yy1}N!6!6N4==;N;NNrceZdZdZfdZedZdZdfd ZdZ e j fdZ d Z d Zfd Zd Zd ZxZS) AnnotatedMetazMetaclass for Annotatedc td|Dr$tdttzt j||||fi|S)Nc3(K|] }|tuVdSrw)rarSs rrz(AnnotatedMeta.__new__.. s&22q1F?222222rr)r`rrGr0rr)rrrrr'rs rrzAnnotatedMeta.__new__ sa22E22222 E 2S^^ CDDD"577?3eYII&II Irc6|dS)Nr\)r}rcs rrzAnnotatedMeta.__metadata__s??$$Q' 'rc|\}}}t|tstj|}n|d|}dd|D}|d|d|dS)Nrrc34K|]}t|VdSrwr)rargs rrz+AnnotatedMeta._tree_repr..s(&E&EStCyy&E&E&E&E&E&Errr)rrrir _tree_reprr)rGtreerrrtp_reprmetadata_reprss rrzAnnotatedMeta._tree_reprs$( !Cfe,, 7 +F33 )..v66!YY&E&EH&E&E&EEEN88G88~888 8rNc,|turtSt||}t|dtrD|ddtur/|dd}|dd}t|||dzfS|S)N)rdrr~rr\)r0rr}rr)rGrdrrsub_tp sub_annotrs rr}zAnnotatedMeta._subs_treesy    ''$$5t$<>Jrc4|jtd|}t|tr;|dt ur,|d}t|tr|dt u,t|tr|dS|S)z6Return the class used to create instance of this type.NzCCannot get the underlying type of a non-specialized Annotated type.rr~)rrr}rrr0)rGrs r _get_conszAnnotatedMeta._get_cons's&!BCCC??$$DT5)) d1g.B.BAwT5)) d1g.B.B$&& Aw rct|ts|f}|j!t|St|trt |dkrt dd}tj|d|}t|dd}| |j |j t|j t|f||f|S)Nr\z]Annotated[...] should be instantiated with at least two arguments (a type and an annotation).rrr~)rdrr)rrrrrnrrrirjrrOr_rr r)rGr@r:ryrrs rrnzAnnotatedMeta.__getitem__4sfe,, # *ww**6222.. -#f++//!/000='q 377 ,,>> t}-- "''(^" rcp|}||i|} ||_n#t$rYnwxYw|Srw)r__orig_class__r)rGrr'consresults r__call__zAnnotatedMeta.__call__LsZ>>##DT4*6**F (,%%!    Ms & 33c|j1t|s"t||St |rw)rrrrr)rGrs r __getattr__zAnnotatedMeta.__getattr__Us?*:d3C3C*t~~//666 && &rc t|s|dr$t||dS|jt |t |||dS)Nr)rrrrrrsetattrr)rGrvaluers rrzAnnotatedMeta.__setattr__[s~$ 74??7#;#; 7##D%00000($T***(($66666rc td)Nz+Annotated cannot be used with isinstance().rErFs rrIzAnnotatedMeta.__instancecheck__cIJJ Jrc td)Nz+Annotated cannot be used with issubclass().rErLs rrMzAnnotatedMeta.__subclasscheck__fr r)NN)rOrPrQrRrpropertyrrr}rrirlrnrrrrIrMrrs@rrrs"%% J J J J J  ( (  ( 9 9 9                  .    ' ' '  7 7 7 7 7 K K K K K K K K K KrrceZdZdZdS)r0avAdd context specific metadata to a type. Example: Annotated[int, runtime_check.Unsigned] indicates to the hypothetical runtime_check module that this type is an unsigned int. Every other consumer of this type can ignore this metadata and treat this type as int. The first argument to Annotated must be a valid type, the remaining arguments are kept as a tuple in the __metadata__ field. Details: - It's an error to call `Annotated` with less than two arguments. - Nested Annotated are flattened:: Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3] - Instantiating an annotated type is equivalent to instantiating the underlying type:: Annotated[C, Ann1](5) == C(5) - Annotated can be used as a generic type alias:: Optimized = Annotated[T, runtime.Optimize()] Optimized[int] == Annotated[int, runtime.Optimize()] OptimizedList = Annotated[List[T], runtime.Optimize()] OptimizedList[int] == Annotated[List[int], runtime.Optimize()] NrOrPrQrRrCrrr0r0is    r)r )_BaseGenericAlias) GenericAliasct|trtSt|tjt t ttfr|j S|tj ur tj SdS)a6Get the unsubscripted version of a type. This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar and Annotated. Return None for unsupported types. Examples:: get_origin(Literal[42]) is Literal get_origin(int) is None get_origin(ClassVar[int]) is ClassVar get_origin(Generic) is Generic get_origin(Generic[T]) is Generic get_origin(Union[T, int]) is Union get_origin(List[Tuple[T, T]][int]) == list get_origin(P.args) is P N) rrr0rirkrr ParamSpecArgsParamSpecKwargsrr)rys rr>r>sf b/ * *   b6/?P(/; < < !=   > !trcft|tr|jf|jzSt|tjt frjt|ddrdS|j}t|tj j ur.|dturt|dd|df}|SdS)aGet type arguments with all substitutions performed. For unions, basic simplifications used by Union constructor are performed. Examples:: get_args(Dict[str, int]) == (str, int) get_args(int) == () get_args(Union[int, Union[T, int], str][int]) == (int, str) get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int]) get_args(Callable[[], T][int]) == ([], int) rFrCrNr)rrrrrirkrrr r>rrrEllipsisr)ryrs rr=r=s b/ * * 6M#bo5 5 b6/> ? ? r:u-- r+C"~~!999c!fH>T>TCH~~s2w/Jrrr:)rrceZdZdZdS)_TypeAliasFormcd|jzSr`rarcs rrdz_TypeAliasForm.__repr__rerNrOrPrQrdrCrrrr# 5 5 5 5 5rrc&t|d)&Special marker indicating that an assignment should be recognized as a proper type alias definition by type checkers. For example:: Predicate: TypeAlias = Callable[..., bool] It's invalid when used anywhere except as in the example above.  is not subscriptablerErs rr:r:s4666777rceZdZdZdS)rcd|jzSr`rarcs rrdz_TypeAliasForm.__repr__rerNrrCrrrrrraSpecial marker indicating that an assignment should be recognized as a proper type alias definition by type checkers. For example:: Predicate: TypeAlias = Callable[..., bool] It's invalid when used anywhere except as in the example above.ceZdZdZdZdS)_TypeAliasMetazMetaclass for TypeAliascdSNztyping_extensions.TypeAliasrCrcs rrdz_TypeAliasMeta.__repr__00rNrOrPrQrRrdrCrrr"r"s)%% 1 1 1 1 1rr"c(eZdZdZdZdZdZdZdS)_TypeAliasBaserrCc td)Nz+TypeAlias cannot be used with isinstance().rErFs rrIz _TypeAliasBase.__instancecheck__r rc td)Nz+TypeAlias cannot be used with issubclass().rErLs rrMz _TypeAliasBase.__subclasscheck__ r rcdSr$rCrcs rrdz_TypeAliasBase.__repr__ r%rN)rOrPrQrRrrIrMrdrCrrr(r(sX   K K K K K K 1 1 1 1 1rr()rrTrc"eZdZdZdZdZdZdS) _Immutablez3Mixin to indicate that object should not be copied.rCc|SrwrCrcs r__copy__z_Immutable.__copy__rrc|SrwrC)rGmemos r __deepcopy__z_Immutable.__deepcopy__ rrN)rOrPrQrRrr/r2rCrrr-r-s=AA         rr-ceZdZdZdZdZdS)raQThe args for a ParamSpec object. Given a ParamSpec object P, P.args is an instance of ParamSpecArgs. ParamSpecArgs objects have a reference back to their ParamSpec: P.args.__origin__ is P This type is meant for runtime introspection and has no special meaning to static type checkers. c||_dSrwrrGrs rr{zParamSpecArgs.__init__/rrc |jjdS)Nz.argsrrOrcs rrdzParamSpecArgs.__repr__2so.555 5rNrOrPrQrRr{rdrCrrrr#s<  % % % 6 6 6 6 6rceZdZdZdZdZdS)ra[The kwargs for a ParamSpec object. Given a ParamSpec object P, P.kwargs is an instance of ParamSpecKwargs. ParamSpecKwargs objects have a reference back to their ParamSpec: P.kwargs.__origin__ is P This type is meant for runtime introspection and has no special meaning to static type checkers. c||_dSrwr5r6s rr{zParamSpecKwargs.__init__Arrc |jjdS)Nz.kwargsr8rcs rrdzParamSpecKwargs.__repr__Dso.777 7rNr9rCrrrr5s<  % % % 8 8 8 8 8rrrceZdZdZejZedZedZ ddddfd Z dZ d Z d Z d Zd Zesd ZxZSxZS)ra'Parameter specification variable. Usage:: P = ParamSpec('P') Parameter specification variables exist primarily for the benefit of static type checkers. They are used to forward the parameter types of one callable to another callable, a pattern commonly found in higher order functions and decorators. They are only valid when used in ``Concatenate``, or s the first argument to ``Callable``. In Python 3.10 and higher, they are also supported in user-defined Generics at runtime. See class Generic for more information on generic types. An example for annotating a decorator:: T = TypeVar('T') P = ParamSpec('P') def add_logging(f: Callable[P, T]) -> Callable[P, T]: '''A type-safe decorator to add logging to a function.''' def inner(*args: P.args, **kwargs: P.kwargs) -> T: logging.info(f'{f.__name__} was called') return f(*args, **kwargs) return inner @add_logging def add_two(x: float, y: float) -> float: '''Add two numbers together.''' return x + y Parameter specification variables defined with covariant=True or contravariant=True can be used to declare covariant or contravariant generic types. These keyword arguments are valid, but their actual semantics are yet to be decided. See PEP 612 for details. Parameter specification variables can be introspected. e.g.: P.__name__ == 'T' P.__bound__ == None P.__covariant__ == False P.__contravariant__ == False Note that only parameter specification variables defined in global scope can be pickled. c t|Srw)rrcs rrzParamSpec.argss && &rc t|Srw)rrcs rr'zParamSpec.kwargss"4(( (rNF)boundrYr[ct|g||_t||_t||_|rt j|d|_nd|_ tj dj dd}n#ttf$rd}YnwxYw|dkr ||_dSdS)NzBound must be a type.r~rOrtyping_extensions)rr{rObool __covariant____contravariant__rirj __bound__rrrrYrrrP)rGrr@rYr[def_modrs rr{zParamSpec.__init__s GG  dV $ $ $ DM!%iD %)-%8%8D " &!'!3E;R!S!S!% -**488ZPP"J/    ---").-s8-B&&B<;B<cB|jrd}n |jrd}nd}||jzS)N+-~)rDrErO)rGprefixs rrdzParamSpec.__repr__s8! ' DM) )rc6t|Srw)rarrcs rrzParamSpec.__hash__s??4(( (rc ||uSrwrCrs rrzParamSpec.__eq__s 5= rc|jSrw)rOrcs rrzParamSpec.__reduce__s = rcdSrwrCr&s rrzParamSpec.__call__ Drc<||vr||dSdSrw)appendrGrds r_get_type_varszParamSpec._get_type_varss-u$$LL&&&&&%$r)rOrPrQrRrirrr rr'r{rdrrrrPEP_560rUrrs@rrrNs , , ^N  ' '  '  ) )  )+/%u * * * * * * *$ * * * ) ) ) ! ! ! ! ! !    ' ' ' ' ' ' ' ' ' ' ' 'rrceZdZerejZnejZdZej Z fdZ dZ dZ dZedZesdZxZSxZS)_ConcatenateGenericAliasFcft|||_||_dSrw)rr{rr )rGrrrs rr{z!_ConcatenateGenericAlias.__init__s- GG  T " " "$DO DMMMrctj|jddfd|jDdS)Nrrc3.K|]}|VdSrwrC)rrrs rrz4_ConcatenateGenericAlias.__repr__..s+!K!Kc**S//!K!K!K!K!K!Krr)rirrrr )rGrs @rrdz!_ConcatenateGenericAlias.__repr__sd*J!z$/22OO !K!K!K!KT]!K!K!KKKOOO Prc8t|j|jfSrw)rrr rcs rrz!_ConcatenateGenericAlias.__hash__s$-899 9rcdSrwrCr&s rrz!_ConcatenateGenericAlias.__call__rQrc>td|jDS)Nc3\K|]'}t|tjtf#|V(dSrw)rrirr)rrys rrz:_ConcatenateGenericAlias.__parameters__..sLjfni=X.Y.Yr)rr rcs rrz'_ConcatenateGenericAlias.__parameters__s2!] rc^|jr#|jrtj|j|dSdSdSrw)rrrirUrTs rrUz'_ConcatenateGenericAlias._get_type_varssL?Ft':F)$*=uEEEEEFFFFr)rOrPrQrVrirkr _TypingBaserrrr{rdrrr rrUrrs@rrXrXs  +,II*I ! ! ! ! !  P P P  : : :          F F F F F F F F F F F FrrXc |dkrtdt|ts|f}t|dtstddtfd|D}t ||S)NrCz&Cannot take a Concatenate of no types.rzAThe last parameter to Concatenate should be a ParamSpec variable.z/Concatenate[arg, ...]: each arg must be a type.c3BK|]}tj|VdSrwr7r8s rrz'_concatenate_getitem..s0FFav)!S11FFFFFFr)rrrrrX)rGrr:s @r_concatenate_getitemrdsR@AAA j% ( (# ] jni 0 0/.// / ;CFFFF:FFFFFJ #D* 5 55rc"t||S)&Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a higher order function which adds, removes or transforms parameters of a callable. For example:: Callable[Concatenate[int, P], int] See PEP 612 for detailed information. rdrs rrrs$D*555rceZdZdZdZdS)_ConcatenateFormcd|jzSr`rarcs rrdz_ConcatenateForm.__repr__ rerc"t||Srwrgrs rrnz_ConcatenateForm.__getitem__ 'j99 9rNrorCrrriri s2 5 5 5 : : : : :rrirfceZdZdZdZdS)_ConcatenateAliasMetazMetaclass for Concatenate.cdSNztyping_extensions.ConcatenaterCrcs rrdz_ConcatenateAliasMeta.__repr__!22rNr&rCrrrnrns)(( 3 3 3 3 3rrnc.eZdZdZdZdZdZdZdZdS)_ConcatenateAliasBaserfrCc td)Nz-Concatenate cannot be used with isinstance().rErFs rrIz'_ConcatenateAliasBase.__instancecheck__3KLL Lrc td)Nz-Concatenate cannot be used with issubclass().rErLs rrMz'_ConcatenateAliasBase.__subclasscheck__6rurcdSrprCrcs rrdz_ConcatenateAliasBase.__repr__9rqrc"t||Srwrgrs rrnz!_ConcatenateAliasBase.__getitem__<rlrN) rOrPrQrRrrIrMrdrnrCrrrsrs$sg   M M M M M M 3 3 3 : : : : :rrsr;ceZdZdZdS)_TypeGuardFormcd|jzSr`rarcs rrdz_TypeGuardForm.__repr__GrerNrrCrrrzrzFrrrzc^tj||d}tj||fS) Special typing form used to annotate the return type of a user-defined type guard function. ``TypeGuard`` only accepts a single type argument. At runtime, functions marked this way should return a boolean. ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static type checkers to determine a more precise type of an expression within a program's code flow. Usually type narrowing is done by analyzing conditional code flow and applying the narrowing to a block of code. The conditional expression here is sometimes referred to as a "type guard". Sometimes it would be convenient to use a user-defined boolean function as a type guard. Such a function should use ``TypeGuard[...]`` as its return type to alert static type checkers to this intention. Using ``-> TypeGuard`` tells the static type checker that for a given function: 1. The return value is a boolean. 2. If the return value is ``True``, the type of its argument is the type inside ``TypeGuard``. For example:: def is_str(val: Union[str, float]): # "isinstance" type guard if isinstance(val, str): # Type of ``val`` is narrowed to ``str`` ... else: # Else, type of ``val`` is narrowed to ``float``. ... Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower form of ``TypeA`` (it can even be a wider form) and this may lead to type-unsafe results. The main reason is to allow for things like narrowing ``List[object]`` to ``List[str]`` even though the latter is not a subtype of the former, since ``List`` is invariant. The responsibility of writing type-safe type guards is left to the user. ``TypeGuard`` also works with type variables. For more information, see PEP 647 (User-Defined Type Guards). r)rirjrkrls rr;r;Js5X!*.Q.Q.QRR#D4'222rceZdZdZdZdS)rzcd|jzSr`rarcs rrdz_TypeGuardForm.__repr__|rerchtj||jd}tj||fS)Nz accepts only a single typerhrls rrnz_TypeGuardForm.__getitem__s;%j)-&P&P&PRRD'tg66 6rNrorCrrrzrzzrprr}cFeZdZdZdZd dZdZdZfdZdZ d Z xZ S) _TypeGuardr}rtNc ||_dSrwrtrxs rr{z_TypeGuard.__init__r|rct|}|j0|tj||jddddSt |jddd)Nr~z accepts only a single type.TrSrrrs rrnz_TypeGuard.__getitem__st**C}$s6-d!l122.LLLNN!%''''s|ABB/OOOPP Prctj|j||}||jkr|St||dSrrrs rrz_TypeGuard._eval_typerrct}|j |dtj|jdz }|Srrrs rrdz_TypeGuard.__repr__rrcRtt|j|jfSrwrrcs rrz_TypeGuard.__hash__rrcpt|tstS|j|j|jkS||uSrw)rrrrurs rrz_TypeGuard.__eq__s;eZ00 &%%}(}665= rrwrrs@rrrs) ) V"      Q Q Q 2 2 2        > > > ! ! ! ! ! ! !rrr cneZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z ejd Zd S) _SpecialForm)rbrR_getitemcD||_|j|_|j|_dSrw)rrOrbrR)rGrs rr{z_SpecialForm.__init__ s #DM )DJ"?DLLLrc6|dvr|jSt|)N>rOrQ)rbr)rGrms rrz_SpecialForm.__getattr__s$333z! && &rc&td|)NrrE)rGrs r__mro_entries__z_SpecialForm.__mro_entries__s7t7788 8rcd|jSr`rarcs rrdz_SpecialForm.__repr__s4 44 4rc|jSrwrarcs rrz_SpecialForm.__reduce__s : rc&td|)NzCannot instantiate rE)rGrrzs rrz_SpecialForm.__call__s:$::;; ;rc*tj||fSrwriUnionrs r__or__z_SpecialForm.__or__!s<e , ,rc*tj||fSrwrrs r__ror__z_SpecialForm.__ror__$s<t , ,rc&t|d)Nz! cannot be used with isinstance()rErFs rrIz_SpecialForm.__instancecheck__'tFFFGG Grc&t|d)Nz! cannot be used with issubclass()rErLs rrMz_SpecialForm.__subclasscheck__*rrc.|||Srw)rrs rrnz_SpecialForm.__getitem__-s==z22 2rN)rOrPrQrr{rrrdrrrrrIrMrirlrnrCrrrrs4  + + +  ' ' '  9 9 9 5 5 5    < < < - - - - - - H H H H H H   3 3   3 3 3rrc&t|d)Used to spell the type of "self" in classes. Example:: from typing import Self class ReturnsSelf: def parse(self, data: bytes) -> Self: ... return self rrE)rGr@s rr r 1s4666777rc"eZdZdZdZdZdZdS)_SelfrrCc&t|d)Nz" cannot be used with isinstance().rErFs rrIz_Self.__instancecheck__RtGGGHH Hrc&t|d)Nz" cannot be used with issubclass().rErLs rrMz_Self.__subclasscheck__UrrNrNrCrrrrBsK   I I I I I I I IrrRequiredceZdZdZdS)_ExtensionsSpecialFormcd|jzSr`rarcs rrdz_ExtensionsSpecialForm.__repr__`rerNrrCrrrr_rrrchtj||jd}tj||fS)A special typing construct to mark a key of a total=False TypedDict as required. For example: class Movie(TypedDict, total=False): title: Required[str] year: int m = Movie( title='The Matrix', # typechecker error if key is omitted year=1999, ) There is no runtime checking that a required key is actually provided when instantiating a related TypedDict. rgrhrls rrrcs6"!*.V.V.VWW#D4'222rchtj||jd}tj||fS)`A special typing construct to mark a key of a TypedDict as potentially missing. For example: class Movie(TypedDict): title: str year: NotRequired[int] m = Movie( title='The Matrix', # typechecker error if key is omitted year=1999, ) rgrhrls r NotRequiredrws6!*.V.V.VWW#D4'222rceZdZdZdZdS) _RequiredFormcd|jzSr`rarcs rrdz_RequiredForm.__repr__rerctj|d|j}tj||fS)Nz{} accepts only single type)rirjformatrbrkrls rrnz_RequiredForm.__getitem__s@%j&C&J&J4:&V&VXXD'tg66 6rNrorCrrrrs2 5 5 5 7 7 7 7 7rrrrrcBeZdZdZd dZdZdZfdZdZdZ xZ S) _MaybeRequiredrtNc ||_dSrwrtrxs rr{z_MaybeRequired.__init__r|rc  t|}|j@|tj|d|jdddSt d|jdd)Nz{} accepts only single type.r~TrSz {} cannot be further subscripted)rrurirjrrOrrs rrnz_MaybeRequired.__getitem__st**C}$s6-d9@@abbAQRRTT!%''''>#VCL$45577 7rctj|j||}||jkr|St||dSrrrs rrz_MaybeRequired._eval_typerrct}|j/|dt j|jz }|S)Nz[{}])rrdrurrirrs rrdz_MaybeRequired.__repr__sH  ""A}(V]]6#4T]#C#CDDDHrcRtt|j|jfSrwrrcs rrz_MaybeRequired.__hash__rrct|t|stS|j|j|jkS||uSrw)rrrrurs rrz_MaybeRequired.__eq__sAeT$ZZ00 &%%}(}665= rrw) rOrPrQrr{rnrrdrrrrs@rrrs!      7 7 7 2 2 2        > > > ! ! ! ! ! ! !rrceZdZdZdS) _RequiredrNrrCrrrrs    rrceZdZdZdS) _NotRequiredrNrrCrrrrs rr)NNF)rrcollections.abcrrri version_inforVrrrrr__all__extendrr@_FinalTypingBaserBrrUrVrWrXrZrrrr^rsr1r2r3rr_overload_dummyr5r!rr"r%r$r#r+rMutableSequencer)r'_collections_abcrrrr,r-_aliasMutableMappingr*Dictrr(r&r4r9r<rrbrr!r6r"r(r~r+rmrjr8r7r/r.rr__text_signature__rrr rOrPrRr0r?rrkrrrr>r=r ImportErrorrr:rrr"r(rrr-rrrXrlrdrrirnrsr;rzrr rrrrrrrrrCrrrs   2A2 ) + /KK/....... <<<+ + + Z A NN???@@@ 76:%HHJJJJJF+4JJJJ(yt$$$HFN3V^DV^Dv~f--- 6>*D 9 9 9 ? 767Q 0! 4 > > LEEbqbV##77777V(7777 Jw L M M MEE 1!1!1!1!1!(1!1!1!1!f F   E 767 LEE.    769I#nGGbqbV##:::::v*$::::l9 1 2 2 2GG,!,!,!,!,!6*$,!,!,!,!\hT"""G( ?{ [6     $ $  767 N LEENNNNN !6#9!#<0!'NNNN& 76())" 4IHHHHH"""""fnT2"""   76=!!T$KK#"2A2&222222222&- 7"bBBKK T T T T Tk-v/DRV/L 6'3 T T T T 769 PnGG P P P P P+%+af%2+:M P P P P 76: QHH W[*%% Q Q Q Q Q Q;')>r2v)F3$- Q Q Q Q 76#$$*NNt,fnT8^.L#9*= . {$ === &XXX  76:gPHH dP))))))@@@77777 777$]$]$]$]$]$]]$]$]$]$]$@10000000@@@BBBBB BBBB$P$P$P$P$P]$P$P$P$PP 76&''0     76?## (MMy   II   %%% $RI $(*=*=*=*=*=X*HN%*=*=*=*=*=*=*=*=X{TGR88I#I @ 76;a  I*N,OO Z %>%>%>%>%>&.d%>%>%>%>N44444444l   "C"C"C"C"CLOOO`K`K`K`K`K*`K`K`KD     m    FBQB7"""JHH 81,,,,,,, 111"01,''''''' ,,,+ ,00 76;D+ IIbqbV##55555,D5555 8 8^ 8 8 bqbV##55555,D5555{ $) * * *II11111*111 111110NRV1111,T***I 76?##18(M,OO66666 666$88888*888& 76;l' II f'f'f'f'f'Df'f'f'Twv}%%*F(F(F(F(F(F4(F(F(FX 6 6 6 76=!!J4$K%>bqbV## 6 6^ 6 6 bqbV##:::::6.d::::#"     KK33333 1333 ::::: 7*?&*::::6('d333K 76;' IIbqbV##55555,D5555,3,3^,3,3\ bqbV##77777,D7777) + + + II\M!M!M!M!M!V,DM!M!M!M!^ &&&I 766U ;DDbqbV##(3(3(3(3(3v}D(3(3(3(3T88\88 IIIII'tIIII, 5t   D 76:]+H$KKKbqbV##55555!4D5555333&33333  bqbV##77777+47777}    H" -     KKK #!#!#!#!#!0#!#!#!#!J     N$    "      ~T     yt$$$H,T***KKKs$$V++ V:9V:>W WWPK{5Z)O >>ELib/site-packages/setuptools/_vendor/__pycache__/zipp.cpython-311.pycnuW+A b;d ddlZddlZddlZddlZddlZddlZddlZejdkrddlm Z ne Z dgZ dZ dZ e jZ dZGdd ejZGd d eZd ZGd dZdS)N)) OrderedDictPathcHtjt|ddS)a2 Given a path with elements separated by posixpath.sep, generate all parents of that path. >>> list(_parents('b/d')) ['b'] >>> list(_parents('/b/d/')) ['/b'] >>> list(_parents('b/d/f/')) ['b/d', 'b'] >>> list(_parents('b')) [] >>> list(_parents('')) [] N) itertoolsislice _ancestrypaths fE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/zipp.py_parentsrs  IdOOQ 5 55c#K|tj}|r?|tjkr3|Vtj|\}}|r|tjk-dSdSdSdS)aR Given a path with elements separated by posixpath.sep, generate all elements of that path >>> list(_ancestry('b/d')) ['b/d', 'b'] >>> list(_ancestry('/b/d/')) ['/b/d', '/b'] >>> list(_ancestry('b/d/f/')) ['b/d/f', 'b/d', 'b'] >>> list(_ancestry('b')) ['b'] >>> list(_ancestry('')) [] N)rstrip posixpathsepsplit)r tails rr r %s ;;y} % %D +49=(( _T** d +49=((((++++((rcPtjt|j|S)zZ Return items in minuend not in subtrahend, retaining order with O(1) lookup. )r filterfalseset __contains__)minuend subtrahends r _differencer?s  Z!=w G GGrcZeZdZdZedZfdZdZdZe dZ xZ S) CompleteDirszk A ZipFile subclass that ensures that implied directories are always included in the namelist. ctjtt|}d|D}t t ||S)Nc34K|]}|tjzVdSN)rr).0ps r z-CompleteDirs._implied_dirs..Ps)661y}$666666r)r chain from_iterablemapr_deduper)namesparentsas_dirss r _implied_dirszCompleteDirs._implied_dirsMsL///He0D0DEE66g666{7E22333rctt|}|t||zSr")superrnamelistlistr-)selfr* __class__s rr0zCompleteDirs.namelistSs?lD))2244tD..u556666rcDt|Sr")rr0r2s r _name_setzCompleteDirs._name_setWs4==??###rcP|}|dz}||vo||v}|r|n|S)zx If the name represents a directory, return that name as a directory (with the trailing slash). /)r6)r2namer*dirname dir_matchs r resolve_dirzCompleteDirs.resolve_dirZs?   *%:'U*: #-ww-rct|tr|St|tjs|t |Sd|jvrt}||_|S)zl Given a source (filename or zipfile), return an appropriate CompleteDirs subclass. r) isinstancerzipfileZipFile_pathlib_compatmoder3)clssources rmakezCompleteDirs.makedsh fl + + M&'/22 03v..// / fk ! !C r) __name__ __module__ __qualname____doc__ staticmethodr-r0r6r< classmethodrF __classcell__r3s@rrrGs 44\4 77777$$$...[rrc,eZdZdZfdZfdZxZS) FastLookupzV ZipFile subclass to ensure implicit dirs exist and are resolved rapidly. ctjt5|jcdddS#1swxYwYt t ||_|jSr") contextlibsuppressAttributeError_FastLookup__namesr/rPr0r2r3s rr0zFastLookup.namelist~s   0 0  <                Z..7799 | /33ctjt5|jcdddS#1swxYwYt t ||_|jSr")rRrSrT_FastLookup__lookupr/rPr6rVs rr6zFastLookup._name_sets   0 0 ! != ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !j$//99;; }rW)rGrHrIrJr0r6rMrNs@rrPrPxs[  rrPcj |S#t$rt|cYSwxYw)zi For path-like objects, convert to a filename for compatibility on Python 3.6.1 and earlier. ) __fspath__rTstrr s rrBrBsD    4yys 22ceZdZdZdZddZddddZed Zed Z ed Z ed Z ed Z dZ dZdZdZdZdZdZdZdZdZdZeZedZdS)ru4 A pathlib-compatible interface for zip files. Consider a zip file with this structure:: . ├── a.txt └── b ├── c.txt └── d └── e.txt >>> data = io.BytesIO() >>> zf = zipfile.ZipFile(data, 'w') >>> zf.writestr('a.txt', 'content of a') >>> zf.writestr('b/c.txt', 'content of c') >>> zf.writestr('b/d/e.txt', 'content of e') >>> zf.filename = 'mem/abcde.zip' Path accepts the zipfile object itself or a filename >>> root = Path(zf) From there, several path operations are available. Directory iteration (including the zip file itself): >>> a, b = root.iterdir() >>> a Path('mem/abcde.zip', 'a.txt') >>> b Path('mem/abcde.zip', 'b/') name property: >>> b.name 'b' join with divide operator: >>> c = b / 'c.txt' >>> c Path('mem/abcde.zip', 'b/c.txt') >>> c.name 'c.txt' Read text: >>> c.read_text() 'content of c' existence: >>> c.exists() True >>> (b / 'missing.txt').exists() False Coercion to string: >>> import os >>> str(c).replace(os.sep, posixpath.sep) 'mem/abcde.zip/b/c.txt' At the root, ``name``, ``filename``, and ``parent`` resolve to the zipfile. Note these attributes are not valid and will raise a ``ValueError`` if the zipfile has no filename. >>> root.name 'abcde.zip' >>> str(root.filename).replace(os.sep, posixpath.sep) 'mem/abcde.zip' >>> str(root.parent) 'mem' z>{self.__class__.__name__}({self.root.filename!r}, {self.at!r})cRt||_||_dS)aX Construct a Path from a ZipFile or filename. Note: When the source is an existing ZipFile object, its type (__class__) will be mutated to a specialized type. If the caller wishes to retain the original type, the caller should either create a separate ZipFile object or pass a filename. N)rPrFrootat)r2r`ras r__init__z Path.__init__s"OOD)) rr>NpwdcJ|rt||d}|s|dkrt||j|j||}d|vr|s|rtd|Stj |g|Ri|S)z Open this entry as text or binary following the semantics of ``pathlib.Path.open()`` by passing arguments through to io.TextIOWrapper(). rr>rcbz*encoding args invalid for binary operation) is_dirIsADirectoryErrorexistsFileNotFoundErrorr`openra ValueErrorio TextIOWrapper)r2rCrdargskwargszip_modestreams rrkz Path.opens ;;== *#D)) )7{{}} *S#D)) )s;; $;; Ov O !MNNNM8888888rcVtj|jjp |jjSr")pathlibrrar9filenamer5s rr9z Path.name!|DG$$)?T]-??rcVtj|jjp |jjSr")rtrrasuffixrur5s rrxz Path.suffix s!|DG$$+Ct}/CCrcVtj|jjp |jjSr")rtrrasuffixesrur5s rrzz Path.suffixes s!|DG$$-G1GGrcVtj|jjp |jjSr")rtrrastemrur5s rr|z Path.stemrvrcntj|jj|jSr")rtrr`rujoinpathrar5s rruz Path.filenames'|DI.//88AAArc|jdg|Ri|5}|cdddS#1swxYwYdS)Nr>rkread)r2rorpstrms r read_textzPath.read_texts TYs ,T , , ,V , , 99;;                  s 377c|d5}|cdddS#1swxYwYdS)Nrbr)r2rs r read_byteszPath.read_bytess~ YYt__ 99;;                  s 7;;ctj|jd|jdkSNr8)rr:rar)r2r s r _is_childzPath._is_child!s4 !4!4559L9LLLrc8||j|Sr")r3r`)r2ras r_nextz Path._next$s~~di,,,rcF|j p|jdSr)raendswithr5s rrgz Path.is_dir's!7{3dg..s333rcT|o| Sr")rirgr5s ris_filez Path.is_file*s {{}}2T[[]]!22rcB|j|jvSr")rar`r6r5s rriz Path.exists-sw$)--////rc|stdt|j|j}t |j|S)NzCan't listdir a file)rgrlr(rr`r0filterr)r2subss riterdirz Path.iterdir0sR{{}} 5344 44:ty113344dnd+++rcJtj|jj|jSr")rjoinr`rurar5s r__str__z Path.__str__6s~di0$':::rc8|j|S)Nr5) _Path__reprformatr5s r__repr__z Path.__repr__9s{!!t!,,,rctj|jgtt|R}||j|Sr")rrrar(rBrr`r<)r2othernexts rr~z Path.joinpath<sG~dgDOU(C(CDDDzz$)//55666rc|js |jjStj|jd}|r|dz }||Sr)raruparentrr:rr)r2 parent_ats rrz Path.parentBsYw (=' '%dgnnS&9&9::    Izz)$$$r)r^)r>)rGrHrIrJrrbrkpropertyr9rxrzr|rurrrrrgrrirrrr~ __truediv__rrrrrsKKZNF    999999$@@X@DDXDHHXH@@X@BBXBMMM---444333000,,, ;;;---777K %%X%%%r)rmrr@r rRsysrt version_info collectionsrdict__all__rr fromkeysr)rrArrPrBrrrrrs]  f'''''''K (666&+++,  /HHH.....7?...b&s%s%s%s%s%s%s%s%s%s%rPK{5Z)U)ULLib/site-packages/setuptools/_vendor/__pycache__/ordered_set.cpython-311.pycnuW+A b;d;dZddlZddlmZ ddlmZmZn#e$r ddlmZmZYnwxYwe dZ dZ dZ GddeeZ dS) z An OrderedSet is a custom MutableSet that remembers its order, so that every entry has an index that can be looked up. Based on a recipe originally posted to ActiveState Recipes by Raymond Hettiger, and released under the MIT license. N)deque) MutableSetSequencez3.1czt|do+t|t ot|t S)a  Are we being asked to look up a list of things, instead of a single thing? We check for the `__iter__` attribute so that this can cover types that don't have to be known by this module, such as NumPy arrays. Strings, however, should be considered as atomic values to look up, not iterables. The same goes for tuples, since they are immutable and therefore valid entries. We don't need to check for the Python 2 `unicode` type, because it doesn't have an `__iter__` attribute anyway. __iter__)hasattr isinstancestrtuple)objs mE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/ordered_set.py is_iterablers@ Z   '3$$ $ '3&& &ceZdZdZddZdZdZdZdZdZ d Z d Z e Z d Z d ZeZeZd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dS) OrderedSetz An OrderedSet is a custom MutableSet that remembers its order, so that every entry has an index that can be looked up. Example: >>> OrderedSet([1, 1, 2, 3, 2]) OrderedSet([1, 2, 3]) Nc4g|_i|_|||z}dSdSN)itemsmap)selfiterables r __init__zOrderedSet.__init__4s,    H DDD rc*t|jS)z Returns the number of unique elements in the ordered set Example: >>> len(OrderedSet([])) 0 >>> len(OrderedSet([1, 2])) 2 )lenrrs r __len__zOrderedSet.__len__:s4:rct|tr|tkrSt |rfd|DSt |dst|tr9j|}t|tr|S|Std|z)aQ Get the item at a given index. If `index` is a slice, you will get back that slice of items, as a new OrderedSet. If `index` is a list or a similar iterable, you'll get a list of items corresponding to those indices. This is similar to NumPy's "fancy indexing". The result is not an OrderedSet because you may ask for duplicate indices, and the number of elements returned should be the number of elements asked for. Example: >>> oset = OrderedSet([1, 2, 3]) >>> oset[1] 2 c*g|]}j|S)r).0irs r z*OrderedSet.__getitem__..[s111aDJqM111r __index__z+Don't know how to index an OrderedSet by %r) r slice SLICE_ALLcopyrrrlist __class__ TypeError)rindexresults` r __getitem__zOrderedSet.__getitem__Fs$ eU # # S(:(:99;;     S11115111 1 UK ( ( SJue,D,D SZ&F&$'' ~~f--- IEQRR Rrc,||S)z Return a shallow copy of this object. Example: >>> this = OrderedSet([1, 2, 3]) >>> other = this.copy() >>> this == other True >>> this is other False )r(rs r r&zOrderedSet.copyes~~d###rcJt|dkrdSt|S)Nrr)rr'rs r __getstate__zOrderedSet.__getstate__ss$ t99>>7:: rcj|dkr|gdS||dS)Nr)r)rstates r __setstate__zOrderedSet.__setstate__s= G   MM"      MM% rc||jvS)z Test if the item is in this ordered set Example: >>> 1 in OrderedSet([1, 3, 2]) True >>> 5 in OrderedSet([1, 3, 2]) False )rrkeys r __contains__zOrderedSet.__contains__sdhrc||jvr6t|j|j|<|j||j|S)aE Add `key` as an item to this OrderedSet, then return its index. If `key` is already in the OrderedSet, return the index it already had. Example: >>> oset = OrderedSet() >>> oset.append(3) 0 >>> print(oset) OrderedSet([3]) )rrrappendr4s r addzOrderedSet.addsF dh   OODHSM J  c " " "x}rcd} |D]}||}n-#t$r tdt|zwxYw|S)a< Update the set with the given iterable sequence, then return the index of the last element inserted. Example: >>> oset = OrderedSet([1, 2, 3]) >>> oset.update([3, 1, 5, 1, 4]) 4 >>> print(oset) OrderedSet([1, 2, 3, 5, 4]) Nz(Argument needs to be an iterable, got %s)r9r) ValueErrortype)rsequence item_indexitems r updatezOrderedSet.updatesv    , ,!XXd^^  ,   :T(^^K  s *A cXt|rfd|DSj|S)aH Get the index of a given entry, raising an IndexError if it's not present. `key` can be an iterable of entries that is not a string, in which case this returns a list of indices. Example: >>> oset = OrderedSet([1, 2, 3]) >>> oset.index(2) 1 c:g|]}|Sr)r*)r subkeyrs r r"z$OrderedSet.index..s%9996DJJv&&999r)rrr4s` r r*zOrderedSet.indexs; s   :9999S999 9x}rcl|jstd|jd}|jd=|j|=|S)z Remove and return the last element from the set. Raises KeyError if the set is empty. Example: >>> oset = OrderedSet([1, 2, 3]) >>> oset.pop() 3 z Set is empty)rKeyErrorr)relems r popzOrderedSet.pops>z +>** *z"~ JrN HTN rc||vrO|j|}|j|=|j|=|jD]\}}||kr |dz |j|<dSdS)a Remove an element. Do not raise an exception if absent. The MutableSet mixin uses this to implement the .remove() method, which *does* raise an error when asked to remove a non-existent item. Example: >>> oset = OrderedSet([1, 2, 3]) >>> oset.discard(2) >>> print(oset) OrderedSet([1, 3]) >>> oset.discard(2) >>> print(oset) OrderedSet([1, 3]) N)rr)rr5r!kvs r discardzOrderedSet.discardss $;; A 1  (( ( (166"#a%DHQK ; ( (rcL|jdd=|jdS)z8 Remove all items from this OrderedSet. N)rrclearrs r rOzOrderedSet.clears) JqqqM rc*t|jS)zb Example: >>> list(iter(OrderedSet([1, 2, 3]))) [1, 2, 3] )iterrrs r rzOrderedSet.__iter__s DJrc*t|jS)zf Example: >>> list(reversed(OrderedSet([1, 2, 3]))) [3, 2, 1] )reversedrrs r __reversed__zOrderedSet.__reversed__ s  ###rcb|s|jjdS|jjdt|dS)Nz()())r(__name__r'rs r __repr__zOrderedSet.__repr__s> 7!^4446 6>222DJJJJ??rct|ttfr t|t|kS t |}t ||kS#t $rYdSwxYw)a Returns true if the containers have the same items. If `other` is a Sequence, then order is checked, otherwise it is ignored. Example: >>> oset = OrderedSet([1, 3, 2]) >>> oset == [1, 3, 2] True >>> oset == [1, 2, 3] False >>> oset == [2, 3] False >>> oset == OrderedSet([3, 2, 1]) False F)r rrr'setr))rother other_as_sets r __eq__zOrderedSet.__eq__s{$ eh. / / -::e, , -u::L t99 , ,    55 sA A.-A.ct|tr|jnt}ttt j|g|}t j|}||S)a Combines all unique items. Each items order is defined by its first appearance. Example: >>> oset = OrderedSet.union(OrderedSet([3, 1, 4, 1, 5]), [1, 3], [2, 0]) >>> print(oset) OrderedSet([3, 1, 4, 5, 2, 0]) >>> oset.union([8, 9]) OrderedSet([3, 1, 4, 5, 2, 0, 8, 9]) >>> oset | {10} OrderedSet([3, 1, 4, 5, 2, 0, 10]) )r rr(rr'itchain from_iterable)rsetscls containersrs r unionzOrderedSet.union6s^!+4 < <Ldnn*rx5566 &&z22s5zzrc,||Sr) intersectionrr\s r __and__zOrderedSet.__and__Is  '''rct|tr|jnt}|r0tjt t|fd|D}n|}||S)a Returns elements in common between all sets. Order is defined only by the first set. Example: >>> oset = OrderedSet.intersection(OrderedSet([0, 1, 2, 3]), [1, 2, 3]) >>> print(oset) OrderedSet([1, 2, 3]) >>> oset.intersection([2, 4, 5], [1, 2, 3, 4]) OrderedSet([2]) >>> oset.intersection() OrderedSet([1, 2, 3]) c3$K|] }|v|V dSrr)r r?commons r z*OrderedSet.intersection..^s'==ddfnnTnnnn==r)r rr(r[rhr)rrcrdrrms @r rhzOrderedSet.intersectionMsj!+4 < <Ldnn*  %s3~~6F====d===EEEs5zzrc|j}|r0tjtt|fd|D}n|}||S)a Returns all elements that are in this set but not the others. Example: >>> OrderedSet([1, 2, 3]).difference(OrderedSet([2])) OrderedSet([1, 3]) >>> OrderedSet([1, 2, 3]).difference(OrderedSet([2]), OrderedSet([3])) OrderedSet([1]) >>> OrderedSet([1, 2, 3]) - OrderedSet([2]) OrderedSet([1, 3]) >>> OrderedSet([1, 2, 3]).difference() OrderedSet([1, 2, 3]) c3$K|] }|v|V dSrrr r?r\s r rnz(OrderedSet.difference..ts-@@dd%.?.?T.?.?.?.?@@r)r(r[rfr)rrcrdrr\s @r differencezOrderedSet.differencecsVn  Is3~~.E@@@@d@@@EEEs5zzrc~t|tkrdStfd|DS)a7 Report whether another set contains this set. Example: >>> OrderedSet([1, 2, 3]).issubset({1, 2}) False >>> OrderedSet([1, 2, 3]).issubset({1, 2, 3, 4}) True >>> OrderedSet([1, 2, 3]).issubset({1, 4, 3, 5}) False Fc3 K|]}|vV dSrrrqs r rnz&OrderedSet.issubset..s'22T45=222222rrallris `r issubsetzOrderedSet.issubsetysD t99s5zz ! !52222T222222rc~tt|krdStfd|DS)a= Report whether this set contains another set. Example: >>> OrderedSet([1, 2]).issuperset([1, 2, 3]) False >>> OrderedSet([1, 2, 3, 4]).issuperset({1, 2, 3}) True >>> OrderedSet([1, 4, 3, 5]).issuperset({1, 2, 3}) False Fc3 K|]}|vV dSrrr r?rs r rnz(OrderedSet.issuperset..s'22D44<222222rruris` r issupersetzOrderedSet.issupersetsD t99s5zz ! !52222E222222rct|tr|jnt}|||}|||}||S)a Return the symmetric difference of two OrderedSets as a new set. That is, the new set will contain all elements that are in exactly one of the sets. Their order will be preserved, with elements from `self` preceding elements from `other`. Example: >>> this = OrderedSet([1, 4, 3, 5, 7]) >>> other = OrderedSet([9, 7, 1, 3, 2]) >>> this.symmetric_difference(other) OrderedSet([4, 5, 9, 2]) )r rr(rrrf)rr\rddiff1diff2s r symmetric_differencezOrderedSet.symmetric_differencesf!+4 < <Ldnn*D $$U++E %%d++{{5!!!rcP||_dt|D|_dS)zt Replace the 'items' list of this OrderedSet with a new one, updating self.map accordingly. ci|]\}}|| Srr)r idxr?s r z,OrderedSet._update_items..sBBB+3D#BBBrN)r enumerater)rrs r _update_itemszOrderedSet._update_itemss,  BB51A1ABBBrct|D]}t|z|fd|jDdS)a Update this OrderedSet to remove items from one or more other sets. Example: >>> this = OrderedSet([1, 2, 3]) >>> this.difference_update(OrderedSet([2, 4])) >>> print(this) OrderedSet([1, 3]) >>> this = OrderedSet([1, 2, 3, 4, 5]) >>> this.difference_update(OrderedSet([2, 4]), OrderedSet([1, 4, 6])) >>> print(this) OrderedSet([3, 5]) cg|]}|v| Srrr r?items_to_removes r r"z0OrderedSet.difference_update..s#WWWT4;V;VD;V;V;VrNr[rr)rrcr\rs @r difference_updatezOrderedSet.difference_updates`%% * *E s5zz )OO WWWWTZWWWXXXXXrcrt|fd|jDdS)a^ Update this OrderedSet to keep only items in another set, preserving their order in this set. Example: >>> this = OrderedSet([1, 4, 3, 5, 7]) >>> other = OrderedSet([9, 7, 1, 3, 2]) >>> this.intersection_update(other) >>> print(this) OrderedSet([1, 3, 7]) cg|]}|v| Srrrqs r r"z2OrderedSet.intersection_update..sIIIT45==D===rNrris `r intersection_updatezOrderedSet.intersection_updatesAE  IIIITZIIIJJJJJrcfd|D}t|fdjD|zdS)a Update this OrderedSet to remove items from another set, then add items from the other set that were not present in this set. Example: >>> this = OrderedSet([1, 4, 3, 5, 7]) >>> other = OrderedSet([9, 7, 1, 3, 2]) >>> this.symmetric_difference_update(other) >>> print(this) OrderedSet([4, 5, 9, 2]) cg|]}|v| Srrrzs r r"z:OrderedSet.symmetric_difference_update..s#CCC$d2B2B2B2B2Brcg|]}|v| Srrrs r r"z:OrderedSet.symmetric_difference_update..s# H H HdD,G,GT,G,G,GrNr)rr\ items_to_addrs` @r symmetric_difference_updatez&OrderedSet.symmetric_difference_updateskDCCCCCC e**  H H H Hdj H H H< W     rr)#rX __module__ __qualname____doc__rrr,r&r/r2r6r9r8r@r*get_loc get_indexerrHrMrOrrTrYr^rfrjrhrrrwr{rrrrrrrr rr*s   SSS> $ $ $   !!!   &F,$GK&(((0   $$$@@@ ---<&(((,,333 333 """(CCCYYY( K K K     rr)r itertoolsr` collectionsrcollections.abcrr ImportErrorr$r% __version__rrrrr rs144444444411100000000001 E$KK  (~ ~ ~ ~ ~ X~ ~ ~ ~ ~ s  ''PK{5Z0Lib/site-packages/setuptools/_vendor/__init__.pynuW+APK{5ZBq8 ,Lib/site-packages/setuptools/_vendor/zipp.pynuW+Aimport io import posixpath import zipfile import itertools import contextlib import sys import pathlib if sys.version_info < (3, 7): from collections import OrderedDict else: OrderedDict = dict __all__ = ['Path'] def _parents(path): """ Given a path with elements separated by posixpath.sep, generate all parents of that path. >>> list(_parents('b/d')) ['b'] >>> list(_parents('/b/d/')) ['/b'] >>> list(_parents('b/d/f/')) ['b/d', 'b'] >>> list(_parents('b')) [] >>> list(_parents('')) [] """ return itertools.islice(_ancestry(path), 1, None) def _ancestry(path): """ Given a path with elements separated by posixpath.sep, generate all elements of that path >>> list(_ancestry('b/d')) ['b/d', 'b'] >>> list(_ancestry('/b/d/')) ['/b/d', '/b'] >>> list(_ancestry('b/d/f/')) ['b/d/f', 'b/d', 'b'] >>> list(_ancestry('b')) ['b'] >>> list(_ancestry('')) [] """ path = path.rstrip(posixpath.sep) while path and path != posixpath.sep: yield path path, tail = posixpath.split(path) _dedupe = OrderedDict.fromkeys """Deduplicate an iterable in original order""" def _difference(minuend, subtrahend): """ Return items in minuend not in subtrahend, retaining order with O(1) lookup. """ return itertools.filterfalse(set(subtrahend).__contains__, minuend) class CompleteDirs(zipfile.ZipFile): """ A ZipFile subclass that ensures that implied directories are always included in the namelist. """ @staticmethod def _implied_dirs(names): parents = itertools.chain.from_iterable(map(_parents, names)) as_dirs = (p + posixpath.sep for p in parents) return _dedupe(_difference(as_dirs, names)) def namelist(self): names = super(CompleteDirs, self).namelist() return names + list(self._implied_dirs(names)) def _name_set(self): return set(self.namelist()) def resolve_dir(self, name): """ If the name represents a directory, return that name as a directory (with the trailing slash). """ names = self._name_set() dirname = name + '/' dir_match = name not in names and dirname in names return dirname if dir_match else name @classmethod def make(cls, source): """ Given a source (filename or zipfile), return an appropriate CompleteDirs subclass. """ if isinstance(source, CompleteDirs): return source if not isinstance(source, zipfile.ZipFile): return cls(_pathlib_compat(source)) # Only allow for FastLookup when supplied zipfile is read-only if 'r' not in source.mode: cls = CompleteDirs source.__class__ = cls return source class FastLookup(CompleteDirs): """ ZipFile subclass to ensure implicit dirs exist and are resolved rapidly. """ def namelist(self): with contextlib.suppress(AttributeError): return self.__names self.__names = super(FastLookup, self).namelist() return self.__names def _name_set(self): with contextlib.suppress(AttributeError): return self.__lookup self.__lookup = super(FastLookup, self)._name_set() return self.__lookup def _pathlib_compat(path): """ For path-like objects, convert to a filename for compatibility on Python 3.6.1 and earlier. """ try: return path.__fspath__() except AttributeError: return str(path) class Path: """ A pathlib-compatible interface for zip files. Consider a zip file with this structure:: . ├── a.txt └── b ├── c.txt └── d └── e.txt >>> data = io.BytesIO() >>> zf = zipfile.ZipFile(data, 'w') >>> zf.writestr('a.txt', 'content of a') >>> zf.writestr('b/c.txt', 'content of c') >>> zf.writestr('b/d/e.txt', 'content of e') >>> zf.filename = 'mem/abcde.zip' Path accepts the zipfile object itself or a filename >>> root = Path(zf) From there, several path operations are available. Directory iteration (including the zip file itself): >>> a, b = root.iterdir() >>> a Path('mem/abcde.zip', 'a.txt') >>> b Path('mem/abcde.zip', 'b/') name property: >>> b.name 'b' join with divide operator: >>> c = b / 'c.txt' >>> c Path('mem/abcde.zip', 'b/c.txt') >>> c.name 'c.txt' Read text: >>> c.read_text() 'content of c' existence: >>> c.exists() True >>> (b / 'missing.txt').exists() False Coercion to string: >>> import os >>> str(c).replace(os.sep, posixpath.sep) 'mem/abcde.zip/b/c.txt' At the root, ``name``, ``filename``, and ``parent`` resolve to the zipfile. Note these attributes are not valid and will raise a ``ValueError`` if the zipfile has no filename. >>> root.name 'abcde.zip' >>> str(root.filename).replace(os.sep, posixpath.sep) 'mem/abcde.zip' >>> str(root.parent) 'mem' """ __repr = "{self.__class__.__name__}({self.root.filename!r}, {self.at!r})" def __init__(self, root, at=""): """ Construct a Path from a ZipFile or filename. Note: When the source is an existing ZipFile object, its type (__class__) will be mutated to a specialized type. If the caller wishes to retain the original type, the caller should either create a separate ZipFile object or pass a filename. """ self.root = FastLookup.make(root) self.at = at def open(self, mode='r', *args, pwd=None, **kwargs): """ Open this entry as text or binary following the semantics of ``pathlib.Path.open()`` by passing arguments through to io.TextIOWrapper(). """ if self.is_dir(): raise IsADirectoryError(self) zip_mode = mode[0] if not self.exists() and zip_mode == 'r': raise FileNotFoundError(self) stream = self.root.open(self.at, zip_mode, pwd=pwd) if 'b' in mode: if args or kwargs: raise ValueError("encoding args invalid for binary operation") return stream return io.TextIOWrapper(stream, *args, **kwargs) @property def name(self): return pathlib.Path(self.at).name or self.filename.name @property def suffix(self): return pathlib.Path(self.at).suffix or self.filename.suffix @property def suffixes(self): return pathlib.Path(self.at).suffixes or self.filename.suffixes @property def stem(self): return pathlib.Path(self.at).stem or self.filename.stem @property def filename(self): return pathlib.Path(self.root.filename).joinpath(self.at) def read_text(self, *args, **kwargs): with self.open('r', *args, **kwargs) as strm: return strm.read() def read_bytes(self): with self.open('rb') as strm: return strm.read() def _is_child(self, path): return posixpath.dirname(path.at.rstrip("/")) == self.at.rstrip("/") def _next(self, at): return self.__class__(self.root, at) def is_dir(self): return not self.at or self.at.endswith("/") def is_file(self): return self.exists() and not self.is_dir() def exists(self): return self.at in self.root._name_set() def iterdir(self): if not self.is_dir(): raise ValueError("Can't listdir a file") subs = map(self._next, self.root.namelist()) return filter(self._is_child, subs) def __str__(self): return posixpath.join(self.root.filename, self.at) def __repr__(self): return self.__repr.format(self=self) def joinpath(self, *other): next = posixpath.join(self.at, *map(_pathlib_compat, other)) return self._next(self.root.resolve_dir(next)) __truediv__ = joinpath @property def parent(self): if not self.at: return self.filename.parent parent_at = posixpath.dirname(self.at.rstrip('/')) if parent_at: parent_at += '/' return self._next(parent_at) PK{5ZD*;;3Lib/site-packages/setuptools/_vendor/ordered_set.pynuW+A""" An OrderedSet is a custom MutableSet that remembers its order, so that every entry has an index that can be looked up. Based on a recipe originally posted to ActiveState Recipes by Raymond Hettiger, and released under the MIT license. """ import itertools as it from collections import deque try: # Python 3 from collections.abc import MutableSet, Sequence except ImportError: # Python 2.7 from collections import MutableSet, Sequence SLICE_ALL = slice(None) __version__ = "3.1" def is_iterable(obj): """ Are we being asked to look up a list of things, instead of a single thing? We check for the `__iter__` attribute so that this can cover types that don't have to be known by this module, such as NumPy arrays. Strings, however, should be considered as atomic values to look up, not iterables. The same goes for tuples, since they are immutable and therefore valid entries. We don't need to check for the Python 2 `unicode` type, because it doesn't have an `__iter__` attribute anyway. """ return ( hasattr(obj, "__iter__") and not isinstance(obj, str) and not isinstance(obj, tuple) ) class OrderedSet(MutableSet, Sequence): """ An OrderedSet is a custom MutableSet that remembers its order, so that every entry has an index that can be looked up. Example: >>> OrderedSet([1, 1, 2, 3, 2]) OrderedSet([1, 2, 3]) """ def __init__(self, iterable=None): self.items = [] self.map = {} if iterable is not None: self |= iterable def __len__(self): """ Returns the number of unique elements in the ordered set Example: >>> len(OrderedSet([])) 0 >>> len(OrderedSet([1, 2])) 2 """ return len(self.items) def __getitem__(self, index): """ Get the item at a given index. If `index` is a slice, you will get back that slice of items, as a new OrderedSet. If `index` is a list or a similar iterable, you'll get a list of items corresponding to those indices. This is similar to NumPy's "fancy indexing". The result is not an OrderedSet because you may ask for duplicate indices, and the number of elements returned should be the number of elements asked for. Example: >>> oset = OrderedSet([1, 2, 3]) >>> oset[1] 2 """ if isinstance(index, slice) and index == SLICE_ALL: return self.copy() elif is_iterable(index): return [self.items[i] for i in index] elif hasattr(index, "__index__") or isinstance(index, slice): result = self.items[index] if isinstance(result, list): return self.__class__(result) else: return result else: raise TypeError("Don't know how to index an OrderedSet by %r" % index) def copy(self): """ Return a shallow copy of this object. Example: >>> this = OrderedSet([1, 2, 3]) >>> other = this.copy() >>> this == other True >>> this is other False """ return self.__class__(self) def __getstate__(self): if len(self) == 0: # The state can't be an empty list. # We need to return a truthy value, or else __setstate__ won't be run. # # This could have been done more gracefully by always putting the state # in a tuple, but this way is backwards- and forwards- compatible with # previous versions of OrderedSet. return (None,) else: return list(self) def __setstate__(self, state): if state == (None,): self.__init__([]) else: self.__init__(state) def __contains__(self, key): """ Test if the item is in this ordered set Example: >>> 1 in OrderedSet([1, 3, 2]) True >>> 5 in OrderedSet([1, 3, 2]) False """ return key in self.map def add(self, key): """ Add `key` as an item to this OrderedSet, then return its index. If `key` is already in the OrderedSet, return the index it already had. Example: >>> oset = OrderedSet() >>> oset.append(3) 0 >>> print(oset) OrderedSet([3]) """ if key not in self.map: self.map[key] = len(self.items) self.items.append(key) return self.map[key] append = add def update(self, sequence): """ Update the set with the given iterable sequence, then return the index of the last element inserted. Example: >>> oset = OrderedSet([1, 2, 3]) >>> oset.update([3, 1, 5, 1, 4]) 4 >>> print(oset) OrderedSet([1, 2, 3, 5, 4]) """ item_index = None try: for item in sequence: item_index = self.add(item) except TypeError: raise ValueError( "Argument needs to be an iterable, got %s" % type(sequence) ) return item_index def index(self, key): """ Get the index of a given entry, raising an IndexError if it's not present. `key` can be an iterable of entries that is not a string, in which case this returns a list of indices. Example: >>> oset = OrderedSet([1, 2, 3]) >>> oset.index(2) 1 """ if is_iterable(key): return [self.index(subkey) for subkey in key] return self.map[key] # Provide some compatibility with pd.Index get_loc = index get_indexer = index def pop(self): """ Remove and return the last element from the set. Raises KeyError if the set is empty. Example: >>> oset = OrderedSet([1, 2, 3]) >>> oset.pop() 3 """ if not self.items: raise KeyError("Set is empty") elem = self.items[-1] del self.items[-1] del self.map[elem] return elem def discard(self, key): """ Remove an element. Do not raise an exception if absent. The MutableSet mixin uses this to implement the .remove() method, which *does* raise an error when asked to remove a non-existent item. Example: >>> oset = OrderedSet([1, 2, 3]) >>> oset.discard(2) >>> print(oset) OrderedSet([1, 3]) >>> oset.discard(2) >>> print(oset) OrderedSet([1, 3]) """ if key in self: i = self.map[key] del self.items[i] del self.map[key] for k, v in self.map.items(): if v >= i: self.map[k] = v - 1 def clear(self): """ Remove all items from this OrderedSet. """ del self.items[:] self.map.clear() def __iter__(self): """ Example: >>> list(iter(OrderedSet([1, 2, 3]))) [1, 2, 3] """ return iter(self.items) def __reversed__(self): """ Example: >>> list(reversed(OrderedSet([1, 2, 3]))) [3, 2, 1] """ return reversed(self.items) def __repr__(self): if not self: return "%s()" % (self.__class__.__name__,) return "%s(%r)" % (self.__class__.__name__, list(self)) def __eq__(self, other): """ Returns true if the containers have the same items. If `other` is a Sequence, then order is checked, otherwise it is ignored. Example: >>> oset = OrderedSet([1, 3, 2]) >>> oset == [1, 3, 2] True >>> oset == [1, 2, 3] False >>> oset == [2, 3] False >>> oset == OrderedSet([3, 2, 1]) False """ # In Python 2 deque is not a Sequence, so treat it as one for # consistent behavior with Python 3. if isinstance(other, (Sequence, deque)): # Check that this OrderedSet contains the same elements, in the # same order, as the other object. return list(self) == list(other) try: other_as_set = set(other) except TypeError: # If `other` can't be converted into a set, it's not equal. return False else: return set(self) == other_as_set def union(self, *sets): """ Combines all unique items. Each items order is defined by its first appearance. Example: >>> oset = OrderedSet.union(OrderedSet([3, 1, 4, 1, 5]), [1, 3], [2, 0]) >>> print(oset) OrderedSet([3, 1, 4, 5, 2, 0]) >>> oset.union([8, 9]) OrderedSet([3, 1, 4, 5, 2, 0, 8, 9]) >>> oset | {10} OrderedSet([3, 1, 4, 5, 2, 0, 10]) """ cls = self.__class__ if isinstance(self, OrderedSet) else OrderedSet containers = map(list, it.chain([self], sets)) items = it.chain.from_iterable(containers) return cls(items) def __and__(self, other): # the parent implementation of this is backwards return self.intersection(other) def intersection(self, *sets): """ Returns elements in common between all sets. Order is defined only by the first set. Example: >>> oset = OrderedSet.intersection(OrderedSet([0, 1, 2, 3]), [1, 2, 3]) >>> print(oset) OrderedSet([1, 2, 3]) >>> oset.intersection([2, 4, 5], [1, 2, 3, 4]) OrderedSet([2]) >>> oset.intersection() OrderedSet([1, 2, 3]) """ cls = self.__class__ if isinstance(self, OrderedSet) else OrderedSet if sets: common = set.intersection(*map(set, sets)) items = (item for item in self if item in common) else: items = self return cls(items) def difference(self, *sets): """ Returns all elements that are in this set but not the others. Example: >>> OrderedSet([1, 2, 3]).difference(OrderedSet([2])) OrderedSet([1, 3]) >>> OrderedSet([1, 2, 3]).difference(OrderedSet([2]), OrderedSet([3])) OrderedSet([1]) >>> OrderedSet([1, 2, 3]) - OrderedSet([2]) OrderedSet([1, 3]) >>> OrderedSet([1, 2, 3]).difference() OrderedSet([1, 2, 3]) """ cls = self.__class__ if sets: other = set.union(*map(set, sets)) items = (item for item in self if item not in other) else: items = self return cls(items) def issubset(self, other): """ Report whether another set contains this set. Example: >>> OrderedSet([1, 2, 3]).issubset({1, 2}) False >>> OrderedSet([1, 2, 3]).issubset({1, 2, 3, 4}) True >>> OrderedSet([1, 2, 3]).issubset({1, 4, 3, 5}) False """ if len(self) > len(other): # Fast check for obvious cases return False return all(item in other for item in self) def issuperset(self, other): """ Report whether this set contains another set. Example: >>> OrderedSet([1, 2]).issuperset([1, 2, 3]) False >>> OrderedSet([1, 2, 3, 4]).issuperset({1, 2, 3}) True >>> OrderedSet([1, 4, 3, 5]).issuperset({1, 2, 3}) False """ if len(self) < len(other): # Fast check for obvious cases return False return all(item in self for item in other) def symmetric_difference(self, other): """ Return the symmetric difference of two OrderedSets as a new set. That is, the new set will contain all elements that are in exactly one of the sets. Their order will be preserved, with elements from `self` preceding elements from `other`. Example: >>> this = OrderedSet([1, 4, 3, 5, 7]) >>> other = OrderedSet([9, 7, 1, 3, 2]) >>> this.symmetric_difference(other) OrderedSet([4, 5, 9, 2]) """ cls = self.__class__ if isinstance(self, OrderedSet) else OrderedSet diff1 = cls(self).difference(other) diff2 = cls(other).difference(self) return diff1.union(diff2) def _update_items(self, items): """ Replace the 'items' list of this OrderedSet with a new one, updating self.map accordingly. """ self.items = items self.map = {item: idx for (idx, item) in enumerate(items)} def difference_update(self, *sets): """ Update this OrderedSet to remove items from one or more other sets. Example: >>> this = OrderedSet([1, 2, 3]) >>> this.difference_update(OrderedSet([2, 4])) >>> print(this) OrderedSet([1, 3]) >>> this = OrderedSet([1, 2, 3, 4, 5]) >>> this.difference_update(OrderedSet([2, 4]), OrderedSet([1, 4, 6])) >>> print(this) OrderedSet([3, 5]) """ items_to_remove = set() for other in sets: items_to_remove |= set(other) self._update_items([item for item in self.items if item not in items_to_remove]) def intersection_update(self, other): """ Update this OrderedSet to keep only items in another set, preserving their order in this set. Example: >>> this = OrderedSet([1, 4, 3, 5, 7]) >>> other = OrderedSet([9, 7, 1, 3, 2]) >>> this.intersection_update(other) >>> print(this) OrderedSet([1, 3, 7]) """ other = set(other) self._update_items([item for item in self.items if item in other]) def symmetric_difference_update(self, other): """ Update this OrderedSet to remove items from another set, then add items from the other set that were not present in this set. Example: >>> this = OrderedSet([1, 4, 3, 5, 7]) >>> other = OrderedSet([9, 7, 1, 3, 2]) >>> this.symmetric_difference_update(other) >>> print(this) OrderedSet([4, 5, 9, 2]) """ items_to_add = [item for item in other if item not in self] items_to_remove = set(other) self._update_items( [item for item in self.items if item not in items_to_remove] + items_to_add ) PK{5Z:ELib/site-packages/setuptools/_vendor/importlib_metadata/_itertools.pynuW+Afrom itertools import filterfalse def unique_everseen(iterable, key=None): "List unique elements, preserving order. Remember all elements ever seen." # unique_everseen('AAAABBBCCDAABBB') --> A B C D # unique_everseen('ABBCcAD', str.lower) --> A B C D seen = set() seen_add = seen.add if key is None: for element in filterfalse(seen.__contains__, iterable): seen_add(element) yield element else: for element in iterable: k = key(element) if k not in seen: seen_add(k) yield element # copied from more_itertools 8.8 def always_iterable(obj, base_type=(str, bytes)): """If *obj* is iterable, return an iterator over its items:: >>> obj = (1, 2, 3) >>> list(always_iterable(obj)) [1, 2, 3] If *obj* is not iterable, return a one-item iterable containing *obj*:: >>> obj = 1 >>> list(always_iterable(obj)) [1] If *obj* is ``None``, return an empty iterable: >>> obj = None >>> list(always_iterable(None)) [] By default, binary and text strings are not considered iterable:: >>> obj = 'foo' >>> list(always_iterable(obj)) ['foo'] If *base_type* is set, objects for which ``isinstance(obj, base_type)`` returns ``True`` won't be considered iterable. >>> obj = {'a': 1} >>> list(always_iterable(obj)) # Iterate over the dict's keys ['a'] >>> list(always_iterable(obj, base_type=dict)) # Treat dicts as a unit [{'a': 1}] Set *base_type* to ``None`` to avoid any special handling and treat objects Python considers iterable as iterable: >>> obj = 'foo' >>> list(always_iterable(obj, base_type=None)) ['f', 'o', 'o'] """ if obj is None: return iter(()) if (base_type is not None) and isinstance(obj, base_type): return iter((obj,)) try: return iter(obj) except TypeError: return iter((obj,)) PK{5Z{$$BLib/site-packages/setuptools/_vendor/importlib_metadata/_compat.pynuW+Aimport sys import platform __all__ = ['install', 'NullFinder', 'Protocol'] try: from typing import Protocol except ImportError: # pragma: no cover from ..typing_extensions import Protocol # type: ignore def install(cls): """ Class decorator for installation on sys.meta_path. Adds the backport DistributionFinder to sys.meta_path and attempts to disable the finder functionality of the stdlib DistributionFinder. """ sys.meta_path.append(cls()) disable_stdlib_finder() return cls def disable_stdlib_finder(): """ Give the backport primacy for discovering path-based distributions by monkey-patching the stdlib O_O. See #91 for more background for rationale on this sketchy behavior. """ def matches(finder): return getattr( finder, '__module__', None ) == '_frozen_importlib_external' and hasattr(finder, 'find_distributions') for finder in filter(matches, sys.meta_path): # pragma: nocover del finder.find_distributions class NullFinder: """ A "Finder" (aka "MetaClassFinder") that never finds any modules, but may find distributions. """ @staticmethod def find_spec(*args, **kwargs): return None # In Python 2, the import system requires finders # to have a find_module() method, but this usage # is deprecated in Python 3 in favor of find_spec(). # For the purposes of this finder (i.e. being present # on sys.meta_path but having no other import # system functionality), the two methods are identical. find_module = find_spec def pypy_partial(val): """ Adjust for variable stacklevel on partial under PyPy. Workaround for #327. """ is_pypy = platform.python_implementation() == 'PyPy' return val + is_pypy PK{5Z:oiO O ELib/site-packages/setuptools/_vendor/importlib_metadata/_functools.pynuW+Aimport types import functools # from jaraco.functools 3.3 def method_cache(method, cache_wrapper=None): """ Wrap lru_cache to support storing the cache data in the object instances. Abstracts the common paradigm where the method explicitly saves an underscore-prefixed protected property on first call and returns that subsequently. >>> class MyClass: ... calls = 0 ... ... @method_cache ... def method(self, value): ... self.calls += 1 ... return value >>> a = MyClass() >>> a.method(3) 3 >>> for x in range(75): ... res = a.method(x) >>> a.calls 75 Note that the apparent behavior will be exactly like that of lru_cache except that the cache is stored on each instance, so values in one instance will not flush values from another, and when an instance is deleted, so are the cached values for that instance. >>> b = MyClass() >>> for x in range(35): ... res = b.method(x) >>> b.calls 35 >>> a.method(0) 0 >>> a.calls 75 Note that if method had been decorated with ``functools.lru_cache()``, a.calls would have been 76 (due to the cached value of 0 having been flushed by the 'b' instance). Clear the cache with ``.cache_clear()`` >>> a.method.cache_clear() Same for a method that hasn't yet been called. >>> c = MyClass() >>> c.method.cache_clear() Another cache wrapper may be supplied: >>> cache = functools.lru_cache(maxsize=2) >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache) >>> a = MyClass() >>> a.method2() 3 Caution - do not subsequently wrap the method with another decorator, such as ``@property``, which changes the semantics of the function. See also http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/ for another implementation and additional justification. """ cache_wrapper = cache_wrapper or functools.lru_cache() def wrapper(self, *args, **kwargs): # it's the first call, replace the method with a cached, bound method bound_method = types.MethodType(method, self) cached_method = cache_wrapper(bound_method) setattr(self, method.__name__, cached_method) return cached_method(*args, **kwargs) # Support cache clear even before cache has been created. wrapper.cache_clear = lambda: None return wrapper # From jaraco.functools 3.3 def pass_none(func): """ Wrap func so it's not called if its first param is None >>> print_text = pass_none(print) >>> print_text('text') text >>> print_text(None) """ @functools.wraps(func) def wrapper(param, *args, **kwargs): if param is not None: return func(param, *args, **kwargs) return wrapper PK{5ZJ\Lib/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/__init__.cpython-311.pycnuW+A b;duddlZddlZddlZddlZddlZddlmZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlmZmZddlmZmZddlmZmZmZddlmZmZdd lmZmZdd lmZm Z dd l!m"Z"dd l#m$Z$dd l%m&Z&ddl m'Z'ddl(m)Z)m*Z*m+Z+m,Z,gdZ-Gdde.Z/GddZ0GddZ1Gdde1Z2Gdde3Z4Gdde4Z5GddZ6Gdd e6e7Z8Gd!d"ej9Z:Gd#d$Z;Gd%d&Z<Gd'd(e&Z=Gd)d*Z>Gd+d,Z?Gd-d.Z@eGd/d0ee=ZAGd1d2e<ZBd3ZCd4ZDd5ejfd6ZEd7ZFd5e,e5e8ffd8ZGd9ZHd:ZId5e*eJe)eJffd;ZKd<ZLd=ZMdS)>N)zipp) _adapters_meta)FreezableDefaultDictPair) NullFinderinstall pypy_partial) method_cache pass_none)always_iterableunique_everseen)PackageMetadata SimplePath)suppress) import_module)MetaPathFinder)starmap)ListMappingOptionalUnion) DistributionDistributionFinderrPackageNotFoundError distribution distributions entry_pointsfilesmetadatapackages_distributionsrequiresversionc.eZdZdZdZedZdS)rzThe package was not found.cd|jS)Nz"No package metadata was found for nameselfs }E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_metadata/__init__.py__str__zPackageNotFoundError.__str__6s?DI???c|j\}|SN)argsr+r)s r,r)zPackageNotFoundError.name9s) r.N)__name__ __module__ __qualname____doc__r-propertyr)r.r,rr3sG$$@@@Xr.rceZdZdZejdZedZ e ddZ e dZ dS) Sectioneda A simple entry point config parser for performance >>> for item in Sectioned.read(Sectioned._sample): ... print(item) Pair(name='sec1', value='# comments ignored') Pair(name='sec1', value='a = 1') Pair(name='sec1', value='b = 2') Pair(name='sec2', value='a = 2') >>> res = Sectioned.section_pairs(Sectioned._sample) >>> item = next(res) >>> item.name 'sec1' >>> item.value Pair(name='a', value='1') >>> item = next(res) >>> item.value Pair(name='b', value='2') >>> item = next(res) >>> item.name 'sec2' >>> item.value Pair(name='a', value='2') >>> list(res) [] zm [sec1] # comments ignored a = 1 b = 2 [sec2] a = 2 cNd|||jDS)Nc3~K|]8}|j |tj|jV9dS)N)value)r)_replacer parser=).0sections r, z*Sectioned.section_pairs..jsS  |'   4:gm#<#<  = =''''  r.)filter_)readvalid)clstexts r, section_pairszSectioned.section_pairshs5  88D#)8<<    r.Nc#4Kt|ttj|}d}|D]V}|do|d}|r|d}Dt||VWdS)N[]z[])filtermapstrstrip splitlines startswithendswithr )rGrClinesr)r= section_matchs r,rDzSectioned.readpswCIt/@/@ A ABB $ $E!,,S11IennS6I6IM {{4((tU## # # # #  $ $r.c2|o|d S)N#)rQ)lines r,rEzSectioned.valid{s0DOOC0000r.r0) r3r4r5r6textwrapdedentlstrip_sample classmethodrH staticmethodrDrEr8r.r,r:r:?s8ho    fhh   [ $$$\$11\111r.r:c\eZdZdZejejdee dZ dZ dS)DeprecatedTuplea Provide subscript item access for backward compatibility. >>> recwarn = getfixture('recwarn') >>> ep = EntryPoint(name='name', value='value', group='group') >>> ep[:] ('name', 'value', 'group') >>> ep[0] 'name' >>> len(recwarn) 1 zAEntryPoint tuple interface is deprecated. Access members by name.r stacklevelc^|||Sr0)_warn_key)r+items r, __getitem__zDeprecatedTuple.__getitem__s" yy{{4  r.N) r3r4r5r6 functoolspartialwarningswarnDeprecationWarningr rcrfr8r.r,r_r_s^   I  K<??    E!!!!!r.r_ceZdZUdZejdZ dZede d<dZ dZ e dZ e d Ze d Zd Zd Zd ZdZdZdZdZdZdZdS) EntryPointzAn entry point as defined by Python packaging conventions. See `the packaging docs on entry points `_ for more information. zH(?P[\w.]+)\s*(:\s*(?P[\w.]+)\s*)?((?P\[.*\])\s*)?$NrdistcPt||||dS)Nr)r=groupvarsupdate)r+r)r=rqs r,__init__zEntryPoint.__init__s) T t5>>>>>r.c*|j|j}t|d}t d|dpdd}tjt||S)zLoad the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. moduleNattr.) patternmatchr=rrqrLsplitrgreducegetattr)r+r|rwattrss r,loadzEntryPoint.loadsw  ""4:..u{{84455tekk&117R>>sCCDD777r.cj|j|j}|dS)Nrwr{r|r=rqr+r|s r,rwzEntryPoint.modules+ ""4:..{{8$$$r.cj|j|j}|dS)Nrxrrs r,rxzEntryPoint.attrs+ ""4:..{{6"""r.c|j|j}tt jd|dpdS)Nz\w+extrasry)r{r|r=listrefinditerrqrs r,rzEntryPoint.extrassD ""4:..BK H(=(=(CDDEEEr.cLt|||S)Nrnrr)r+rns r,_forzEntryPoint._fors$ T t$$$ r.cfd}tj|tt|j|fS)zP Supply iter so one may construct dicts of EntryPoints by name. zJConstruction of dict of EntryPoints is deprecated in favor of EntryPoints.)rirjrkiterr))r+msgs r,__iter__zEntryPoint.__iter__s6  $   c-...TY%&&&r.c fd|D}tttj||S)Nc38K|]}t|VdSr0r)r@paramr+s r,rBz%EntryPoint.matches..s-::%u%%::::::r.)allrMoperatoreqvalues)r+paramsrs` r,matcheszEntryPoint.matchess@::::6:::3x{FMMOOU;;<< ")))???888%%X%##X#FFXF ' ' '===111***+++BBB   !!!!!r.rmceZdZdZdZejejde e dZ de ffd Z eee dd Zd ZxZS) DeprecatedLista> Allow an otherwise immutable object to implement mutability for compatibility. >>> recwarn = getfixture('recwarn') >>> dl = DeprecatedList(range(3)) >>> dl[0] = 1 >>> dl.append(3) >>> del dl[3] >>> dl.reverse() >>> dl.sort() >>> dl.extend([4]) >>> dl.pop(-1) 4 >>> dl.remove(1) >>> dl += [5] >>> dl + [6] [1, 2, 5, 6] >>> dl + (6,) [1, 2, 5, 6] >>> dl.insert(0, 0) >>> dl [0, 1, 2, 5] >>> dl == [0, 1, 2, 5] True >>> dl == (0, 1, 2, 5) True >>> len(recwarn) 1 r8zAEntryPoints list interface is deprecated. Cast to list if needed.rr` method_namecfd}|fS)Ncp|tt|i|Sr0)rcrsuper)r+r1kwargs __class__rs r,wrappedz7DeprecatedList._wrap_deprecated_method..wrapped(s3 JJLLL07577K00$A&AA Ar.r8)rrrs` r,_wrap_deprecated_methodz&DeprecatedList._wrap_deprecated_method's5 B B B B B BG##r.zM__setitem__ __delitem__ append reverse extend pop remove __iadd__ insert sortct|ts#|t|}|t||zSr0) isinstancetuplercrrs r,__add__zDeprecatedList.__add__6sI%'' ! JJLLL%LLE~~eDkkE1222r.ct|ts#|t|}t||Sr0)rrrcrrs r,rzDeprecatedList.__eq__<sF%'' ! JJLLL%LLET{{!!%(((r.)r3r4r5r6 __slots__rgrhrirjrkr rcrNrlocalsrtrMr}rr __classcell__rs@r,rrs>I I  K<??    E$S$$$$$$ FHHOO  # ##(577  333 )))))))r.rceZdZdZdZfdZdZedZedZ e dZ e dZ xZS) EntryPointszC An immutable collection of selectable EntryPoint objects. r8cDt|tr=tjdtdt |S tt| |S#t$rt|wxYw)z; Get the EntryPoint in self matching name. zGAccessing entry points by index is deprecated. Cast to tuple if needed.rr`r() rintrirjrkrrfnextrselect StopIterationKeyErrorr+r)rs r,rfzEntryPoints.__getitem__Ks dC  - M+"      77&&t,, , !T[[d[334455 5 ! ! !4..  !s /BBc :tfd|DS)zv Select entry points from self that match the given parameters (typically group and/or name). c36K|]}|jdi|VdSNr8)r)r@eprs r,rBz%EntryPoints.select..as:EE"  0D0DV0D0DE2EEEEEEr.rr+rs `r,rzEntryPoints.select\s( EEEEEEEEEEr.cd|DS)zB Return the set of all names of all entry points. ch|] }|j Sr8r(r@rs r, z$EntryPoints.names..hs'''B'''r.r8r*s r,nameszEntryPoints.namescs ('$''''r.cd|DS)z Return the set of all groups of all entry points. For coverage while SelectableGroups is present. >>> EntryPoints().groups set() ch|] }|j Sr8)rqrs r,rz%EntryPoints.groups..ss(((R(((r.r8r*s r,groupszEntryPoints.groupsjs)(4((((r.cX|fd||DS)Nc3BK|]}|VdSr0)r)r@rrns r,rBz-EntryPoints._from_text_for..ws-@@R2774==@@@@@@r.) _from_text)rFrGrns `r,_from_text_forzEntryPoints._from_text_forus4s@@@@3>>$+?+?@@@@@@r.cNdt|pdDS)Nc3lK|]/}t|jj|jj|jV0dS)rpN)rmr=r))r@res r,rBz)EntryPoints._from_text..{sP   DJO4:3C49 U U U      r.ry)r:rH)rGs r,rzEntryPoints._from_textys5  !// ;;    r.)r3r4r5r6rrfrr7rrr\rr]rrrs@r,rrDsI!!!!!"FFF((X( ))X)AA[A  \     r.rceZdZdZejejdee dZ fdZ d fd Z fdZ fd Zfd Zfd ZxZS) Deprecateda Compatibility add-in for mapping to indicate that mapping behavior is deprecated. >>> recwarn = getfixture('recwarn') >>> class DeprecatedDict(Deprecated, dict): pass >>> dd = DeprecatedDict(foo='bar') >>> dd.get('baz', None) >>> dd['foo'] 'bar' >>> list(dd) ['foo'] >>> list(dd.keys()) ['foo'] >>> 'foo' in dd True >>> list(dd.values()) ['bar'] >>> len(recwarn) 1 z:SelectableGroups dict interface is deprecated. Use select.rr`cn|t|Sr0)rcrrfrs r,rfzDeprecated.__getitem__s( ww""4(((r.Ncp|t||Sr0)rcrget)r+r)defaultrs r,rzDeprecated.gets( ww{{4)))r.cl|tSr0)rcrrr+rs r,rzDeprecated.__iter__s& ww!!!r.cX|tj|Sr0)rcr __contains__)r+r1rs r,rzDeprecated.__contains__s$ #uww#T**r.cl|tSr0)rcrkeysrs r,rzDeprecated.keyss" ww||~~r.cl|tSr0)rcrrrs r,rzDeprecated.valuess$ ww~~r.r0)r3r4r5r6rgrhrirjrkr rcrfrrrrrrrs@r,rrs, I  D<??    E)))))******"""""+++++         r.rczeZdZdZedZefdZedZedZ dZ xZ S)SelectableGroupszs A backward- and forward-compatible result from entry_points that fully implements the dict interface. ctjd}t||}tj||}|d|DS)Nrqkeyc3>K|]\}}|t|fVdSr0r)r@rqepss r,rBz(SelectableGroups.load..s3GGE;s++,GGGGGGr.)r attrgettersorted itertoolsgroupby)rFrby_grouporderedgroupeds r,rzSelectableGroups.loadsU&w//(+++#GX66sGGwGGGGGGr.ctt|}ttj|S)zH Reconstruct a list of all entrypoints from the groups. )rrrrrchain from_iterable)r+rrs r,_allzSelectableGroups._alls> z4((//119?88@@AAAr.c|jjSr0)rrr*s r,rzSelectableGroups.groupss yr.c|jjS)zR for coverage: >>> SelectableGroups().names set() )rrr*s r,rzSelectableGroups.namessyr.c .|s|S|jjdi|Sr)rrrs r,rzSelectableGroups.selects* Kty))&)))r.) r3r4r5r6r\rr7rrrrrrs@r,rrs HH[H BBBBXB  X X*******r.rc&eZdZdZddZdZdZdS) PackagePathz"A reference to a path in a packageutf-8c||5}|cdddS#1swxYwYdS)NencodinglocateopenrD)r+rstreams r, read_textzPackagePath.read_texts [[]]    2 2 !f;;== ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !sA  AAc|d5}|cdddS#1swxYwYdS)Nrbr)r+r s r, read_binaryzPackagePath.read_binarys [[]]   % % !;;== ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !sA  A A c6|j|S)z'Return a path-like object for this path)rn locate_filer*s r,rzPackagePath.locatesy$$T***r.N)r)r3r4r5r6r rrr8r.r,rrsL,,!!!!!!!+++++r.rceZdZdZdZdS)FileHashcL|d\|_}|_dS)N=) partitionmoder=)r+spec_s r,ruzFileHash.__init__s"#'>>##6#6  1djjjr.c(d|jd|jdS)Nz)rr=r*s r,rzFileHash.__repr__sB$)BBTZBBBBr.N)r3r4r5rurr8r.r,rrs7777CCCCCr.rceZdZdZejdZejdZedZ edZ e dZ e dZ edejfd Zed Zed Zed Zed ZedZdZdZedZdZdZedZe dZdS)rzA Python distribution package.cdS)zAttempt to load metadata file given by the name. :param filename: The name of the file in the distribution info. :return: The text if found, otherwise None. Nr8r+filenames r,r zDistribution.read_textr.cdS)z[ Given a path to a file in this distribution, return a path to it. Nr8r+paths r,rzDistribution.locate_filerr.c|D]I}|t|}tt |d}||cSJt |)afReturn the Distribution for the given package name. :param name: The name of the distribution package to search for. :return: The Distribution instance (or subclass thereof) for the named package, if found. :raises PackageNotFoundError: When the named package's distribution metadata cannot be found. r(N)_discover_resolversrContextrrr)rFr)resolverdistsrns r, from_namezDistribution.from_name sy//11 - -HH/77T7BBCCEU T**D  't,, ,r.c |ddr|rtdptjdi|tjfd|DS)aReturn an iterable of Distribution objects for all packages. Pass a ``context`` or pass keyword arguments for constructing a context. :context: A ``DistributionFinder.Context`` object. :return: Iterable of Distribution objects for all packages. contextNz cannot accept context and kwargsc3.K|]}|VdSr0r8)r@r&r*s r,rBz(Distribution.discover..*s>- - "*HHW  - - - - - - r.r8)pop ValueErrorrr%rrrr$)rFrr*s @r,discoverzDistribution.discovers**Y--  Av A?@@ @A/7AA&AA,,- - - - .1.E.E.G.G- - -    r.cDttj|S)zReturn a Distribution for the indicated metadata path :param path: a string or path-like object :return: a concrete Distribution instance for the path )PathDistributionpathlibPath)r"s r,atzDistribution.at.s  T 2 2333r.cNdtjD}td|S)z#Search the meta_path for resolvers.c38K|]}t|ddVdS)find_distributionsNr)r@finders r,rBz3Distribution._discover_resolvers..:s@  .make_fileosH &&F,0:(4...dFK+3=#h---FKFKMr.cbtttj|Sr0)rrcsvreader)rSrQs r, make_filesz&Distribution.files..make_filesvs% 3:e+<+<==>> >r.)NN)r_read_files_distinfo_read_files_egginfo)r+rUrQs` @r,r!zDistribution.filescsv        ? ? ? ?  ?z$3355S9Q9Q9S9STTTr.cX|d}|o|S)z* Read the lines of RECORD RECORD)r rPrAs r,rVz!Distribution._read_files_distinfo|s*~~h''))))r.c~|d}|o&tdj|S)z` SOURCES.txt might contain literal commas, so wrap each line in quotes. z SOURCES.txtz"{}")r rMformatrPrAs r,rWz Distribution._read_files_egginfos6 ~~m,,=FM4??+<+<===r.ct|p|}|ot|S)z6Generated requirements specified for this Distribution)_read_dist_info_reqs_read_egg_info_reqsr)r+reqss r,r$zDistribution.requiress7((**Hd.F.F.H.H"T "r.c6|jdS)Nz Requires-Dist)r"get_allr*s r,r]z!Distribution._read_dist_info_reqss}$$_555r.cf|d}t|j|S)Nz requires.txt)r r_deps_from_requires_text)r+sources r,r^z Distribution._read_egg_info_reqss.//7y677???r.c\|t|Sr0)%_convert_egg_info_reqs_to_simple_reqsr:rD)rFrds r,rcz%Distribution._deps_from_requires_texts"889O9OPPPr.c#Kdfd}d}|D]/}||j}|j|z||jzV0dS)a Historically, setuptools would solicit and store 'extra' requirements, including those with environment markers, in separate sections. More modern tools expect each dependency to be defined separately, with any relevant extras and environment markers attached directly to that requirement. This method converts the former to the latter. See _test_deps_from_requires_text for an example. c|od|dS)Nz extra == ""r8r(s r,make_conditionzJDistribution._convert_egg_info_reqs_to_simple_reqs..make_conditions00000 0r.c |pd}|d\}}}|r|rd|d}ttd||g}|rdd|zndS)Nry:(rz; z and )rrrLjoin)rAextrasepmarkers conditionsrjs r, quoted_markerzIDistribution._convert_egg_info_reqs_to_simple_reqs..quoted_markersmG")"3"3C"8"8 E3 ) )(g...fTG^^E5J5J+KLLMMJ6@H4',,z2222b Hr.cdd|vzS)z PEP 508 requires a space between the url_spec and the quoted_marker. Ref python/importlib_metadata#357.  @r8)reqs r, url_req_spacezIDistribution._convert_egg_info_reqs_to_simple_reqs..url_req_spaces #*% %r.N)r=r))sectionsrsrxrAspacerjs @r,rfz2Distribution._convert_egg_info_reqs_to_simple_reqss 1 1 1 I I I I I & & &  F FG!M'-00E-%'-- *E*EE E E E E F Fr.N)r3r4r5r6abcabstractmethodr rr\r(r.r]r3r$r7rrr"r)rHr%r r!rVrWr$r]r^rcrfr8r.r,rrs((       --[-"  [ "44\4&&\&B%/BBBXB %%X%--X-((X(TTXTUUXU0***>>>##X# 666@@@QQ[Q F F\ F F Fr.rc`eZdZdZGddZejefdZdS)rzJ A MetaPathFinder capable of discovering installed distributions. c4eZdZdZdZ dZedZdS)DistributionFinder.Contextaw Keyword arguments presented by the caller to ``distributions()`` or ``Distribution.discover()`` to narrow the scope of a search for distributions in all DistributionFinders. Each DistributionFinder may expect any parameters and should attempt to honor the canonical parameters defined below when appropriate. Nc Jt||dSr0rr)r+rs r,ruz#DistributionFinder.Context.__init__s" JJ  f % % % % %r.c\t|dtjS)z The sequence of directory path that a distribution finder should search. Typically refers to Python installed package paths such as "site-packages" directories and defaults to ``sys.path``. r")rsrr8r"r*s r,r"zDistributionFinder.Context.paths ::>>&#(33 3r.)r3r4r5r6r)rur7r"r8r.r,r%rsT   & & &  4 4  4 4 4r.r%cdS)z Find distributions. Return an iterable of all Distribution instances capable of loading the metadata for packages matching the ``context``, a DistributionFinder.Context instance. Nr8)r+r*s r,r6z%DistributionFinder.find_distributionsrr.N)r3r4r5r6r%r{r|r6r8r.r,rrst44444444@ )0      r.rceZdZdZejfdZdZdZdZ dZ dZ e dZ ed ZxZS) FastPathzs Micro-optimized class for searching a path for children. >>> FastPath('').children() ['...'] cFt|Sr0)r__new__)rFrootrs r,rzFastPath.__new__swws###r.c.t||_dSr0)rNr)r+rs r,ruzFastPath.__init__sII r.c6tj|j|Sr0)r1r2r)r+childs r,joinpathzFastPath.joinpaths|DIu---r.ctt5tj|jpdcdddS#1swxYwYtt5|cdddS#1swxYwYgS)Nrz)r Exceptionoslistdirr zip_childrenr*s r,childrenzFastPath.childrens i  0 0:di.3// 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 i  ' '$$&& ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' s!=AAA==BBctj|j}|j}|j|_t d|DS)Nc3bK|]*}|tjddV+dS)rrN)r} posixpathrp)r@rs r,rBz(FastPath.zip_children..s7QQ%U[[::1=QQQQQQr.)rr2rnamelistrdictfromkeys)r+zip_pathrs r,rzFastPath.zip_children sQ9TY'' &&(( ) }}QQ5QQQQQQr.c\||j|Sr0)lookupmtimesearchr2s r,rzFastPath.searchs${{4:&&--d333r.ctt5tj|jjcdddS#1swxYwY|jdSr0)rOSErrorrstatrst_mtimer cache_clearr*s r,rzFastPath.mtimes g   / /749%%. / / / / / / / / / / / / / / / / !!!!!sAAAc t|Sr0)Lookup)r+rs r,rzFastPath.lookupsd||r.)r3r4r5r6rg lru_cacherrurrrrr7rr rrrs@r,rrsY$$$$$...RRR444""X" \r.rc eZdZdefdZdZdS)rr"ctj|j}|d}t t|_t t|_ | D]7}|}|dr| dd dd}t|}|j||||r|dkr| dd dd}t|}|j |||9|j|j dS)Nz.eggz .dist-infoz .egg-inforzr-zegg-info)rr"basenamerlowerrRrrinfoseggsr rpartitionrrFrGappendrlegacy_normalizefreeze) r+r"base base_is_eggrlowr) normalizedlegacy_normalizeds r,ruzLookup.__init__ sw **0022mmF++ )$// (.. ]]__ J JE++--C||788 J~~c**1-77<X* , , , , ,r.rcReZdZdZdZdZdZedZedZ dZ dS)rFzE A prepared search for metadata on a possibly-named package. Nc||_|dS|||_|||_dSr0)r)rGrrrr2s r,ruzPrepared.__init__KsB < F....!%!6!6t!>#U+++r.ct|tjfdt t |DS)z1Find metadata directories in paths heuristically.c3BK|]}|VdSr0)r)r@r"rs r,rBz3MetadataPathFinder._search_paths..}s@- - &*DKK ! !- - - - - - r.)rFrrrrMr)rFr)pathsrs @r,rz MetadataPathFinder._search_pathsysZD>>,,- - - - .1(E.B.B- - -    r.cBtjdSr0)rrr)rFs r,invalidate_cachesz$MetadataPathFinder.invalidate_cachess$$&&&&&r.N) r3r4r5r6rr%r6r\rrr8r.r,rresm *<)C)C)E)E , , , ,  [ '''''r.rcneZdZdefdZdZejje_dZe fdZ dZ xZ S)r0r"c||_dS)zfConstruct a distribution. :param path: SimplePath indicating the metadata directory. N)_pathr!s r,ruzPathDistribution.__init__s  r.ctttttt 5|j|dcdddS#1swxYwYdS)Nrr) rFileNotFoundErrorIsADirectoryErrorrNotADirectoryErrorPermissionErrorrrr rs r,r zPathDistribution.read_texts          M M:&&x00::G:LL M M M M M M M M M M M M M M M M M Ms.A((A,/A,c |jj|z Sr0)rparentr!s r,rzPathDistribution.locate_filesz 4''r.ctjt|j}||pt jS)zz Performance optimization: where possible, resolve the normalized name from the file system path. )rr"rrNr_name_from_stemrrH)r+stemrs r,rHz!PathDistribution._normalized_namesB wDJ00##D))EUWW-EEr.ctj|\}}|dvrdS|d\}}}|S)Nrr)rr"splitextr)r+rr)extrprests r,rz PathDistribution._name_from_stemsHG$$T** c 1 1 1 F..--c4 r.) r3r4r5rrur rr6rr7rHrrrs@r,r0r0sZMMM%.6I(((FFFFXFr.r0c6t|S)zGet the ``Distribution`` instance for the named package. :param distribution_name: The name of the distribution package as a string. :return: A ``Distribution`` instance (or subclass thereof). )rr(distribution_names r,rrs  ! !"3 4 44r.c $tjdi|S)z|Get all ``Distribution`` instances in the current environment. :return: An iterable of ``Distribution`` instances. r8)rr.)rs r,rrs  * *6 * **r.r;c@t|jS)zGet the metadata for the named package. :param distribution_name: The name of the distribution package to query. :return: A PackageMetadata containing the parsed metadata. )rr(r"rs r,r"r"s  ! !"3 4 4 ==r.c*t|jS)zGet the version string for the named package. :param distribution_name: The name of the distribution package to query. :return: The version string for the package as defined in the package's "Version" metadata key. )rr%rs r,r%r%s ) * * 22r.c $tjd}tjt|}t jd|tD}t |j di|S)aReturn EntryPoint objects for all installed packages. Pass selection parameters (group or name) to filter the result to entry points matching those properties (see EntryPoints.select()). For compatibility, returns ``SelectableGroups`` object unless selection parameters are supplied. In the future, this function will return ``EntryPoints`` instead of ``SelectableGroups`` even when no selection parameters are supplied. For maximum future compatibility, pass selection parameters or invoke ``.select`` with parameters on the result. :return: EntryPoints or SelectableGroups for all installed packages. rHrc3$K|] }|jV dSr0)r )r@rns r,rBzentry_points..s6(("((((((r.r8) rrrgrhrrrrrrrr)r norm_nameuniquers r,r r s"#$677I  I > > >F / ' '((&,f]__&=&=(((  C   % % , 6 6v 6 66r.c*t|jS)zReturn a list of files for the named package. :param distribution_name: The name of the distribution package to query. :return: List of files composing the distribution. )rr!rs r,r!r!s ) * * 00r.c*t|jS)z Return a list of requirements for the named package. :return: An iterator of requirements, suitable for packaging.requirement.Requirement. )rr$rs r,r$r$s ) * * 33r.ctjt}tD]I}t |pt |D](}|||jd)Jt|S)z Return a mapping of top-level packages to their distributions. >>> import collections.abc >>> pkgs = packages_distributions() >>> all(isinstance(dist, collections.abc.Sequence) for dist in pkgs.values()) True rC) collections defaultdictrr_top_level_declared_top_level_inferredrr"r) pkg_to_distrnpkgs r,r#r#s)$//K;;&t,,I0CD0I0I ; ;C   # #DM&$9 : : : : ;   r.cT|dpdS)Nz top_level.txtry)r r}rs r,rrs% NN? + + 1r 8 8 : ::r.c>dt|jDS)Nch|]L}|jdk t|jdkr |jdn|djMS)z.pyrrry)suffixlenparts with_suffixr))r@fs r,rz&_top_level_inferred..sZ    8u  !'llQ&& AMM",=,=,B   r.)rr!rs r,rrs-   ,,   r.)Nrrr{rSr8ryrr?r1rrXrirgrrrrr _collectionsrr _compatr r r _functoolsr r _itertoolsrrrr contextlibr importlibr importlib.abcrrtypingrrrr__all__ModuleNotFoundErrorrr:r_rmrrrrrr PurePosixPathrrrrrrrFrr0rrr"r%r r!r$rNr#rrr8r.r,rs  44444444 0///////88888888........######((((((111111111111        .   >1>1>1>1>1>1>1>1B!!!!!!!!4a!a!a!a!a!a!a!a!HC)C)C)C)C)TC)C)C)L: : : : : .: : : z4 4 4 4 4 4 4 4 n%*%*%*%*%*z4%*%*%*P + + + + +'' + + + CCCCCCCCEFEFEFEFEFEFEFEFP- - - - - - - - `,,,,,,,,^!,!,!,!,!,!,!,!,HD '''''%7'' '>%%%%%|%%%P555+++>5#8>>>>3337eK1A$AB77772111444T#Y 7";;;r.PK{5ZU YLib/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_meta.cpython-311.pycnuW+A b;dddlmZddlmZmZmZmZmZmZedZ GddeZ GddeZ d S) )Protocol)AnyDictIteratorListTypeVarUnion_Tc eZdZdefdZdedefdZdedefdZde efdZ dd ed e de e ee ffd Zedeee ee efffd Zd S)PackageMetadatareturncdSNselfs zE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_metadata/_meta.py__len__zPackageMetadata.__len__  itemcdSrr)rrs r __contains__zPackageMetadata.__contains__ rrkeycdSrr)rrs r __getitem__zPackageMetadata.__getitem__rrcdSrrrs r__iter__zPackageMetadata.__iter__rr.namefailobjcdS)zP Return all values associated with a possibly multi-valued key. Nr)rr r!s rget_allzPackageMetadata.get_allrcdS)z9 A JSON-compatible form of the metadata. Nrrs rjsonzPackageMetadata.jsonr$rN).)__name__ __module__ __qualname__intrstrboolrrrrr r rrr#propertyrr&rrrr r s             s s     (3-      C " uT#Y]7K     d3c49n 556   X   rr c6eZdZdZddZddZddZdefdZdS) SimplePathzH A minimal subset of pathlib.Path required by PathDistribution. rcdSrrrs rjoinpathzSimplePath.joinpath&rrcdSrrrs r __truediv__zSimplePath.__truediv__)rrcdSrrrs rparentzSimplePath.parent,rrcdSrrrs r read_textzSimplePath.read_text/rrN)rr/) r'r(r)__doc__r1r3r5r+r7rrrr/r/!su             3      rr/N) _compatrtypingrrrrr r r r r/rrrr;s<<<<<<<<<<<<<<<< WT]]     h   2          rPK{5Z! [Lib/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_compat.cpython-311.pycnuW+A b;d$|ddlZddlZgdZ ddlmZn#e$r ddlmZYnwxYwdZdZGddZ d Z dS) N)install NullFinderProtocol)rcptj|t|S)z Class decorator for installation on sys.meta_path. Adds the backport DistributionFinder to sys.meta_path and attempts to disable the finder functionality of the stdlib DistributionFinder. )sys meta_pathappenddisable_stdlib_finder)clss |E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_metadata/_compat.pyrrs1M JcJd}t|tjD]}|`dS)z Give the backport primacy for discovering path-based distributions by monkey-patching the stdlib O_O. See #91 for more background for rationale on this sketchy behavior. cLt|dddkot|dS)N __module___frozen_importlib_externalfind_distributions)getattrhasattr)finders r matchesz&disable_stdlib_finder..matches$s8 L$  )*T.5f>R.S.S TrN)filterrr r)rrs r r r sDTTT #-00&&  % %&&rc,eZdZdZedZeZdS)rzj A "Finder" (aka "MetaClassFinder") that never finds any modules, but may find distributions. cdS)N)argskwargss r find_speczNullFinder.find_spec3strN)__name__r __qualname____doc__ staticmethodr find_modulerrr rr-s: \KKKrrc:tjdk}||zS)zY Adjust for variable stacklevel on partial under PyPy. Workaround for #327. PyPy)platformpython_implementation)valis_pypys r pypy_partialr*@s! ,..&8G =r) rr&__all__typingr ImportErrortyping_extensionsrr rr*rrr r/s  0 / /----,,,,,,,,-   &&&$&s  ##PK{5Z*FF^Lib/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_functools.cpython-311.pycnuW+A b;dO $ddlZddlZddZdZdS)NcPptjfd}d|_|S)aV Wrap lru_cache to support storing the cache data in the object instances. Abstracts the common paradigm where the method explicitly saves an underscore-prefixed protected property on first call and returns that subsequently. >>> class MyClass: ... calls = 0 ... ... @method_cache ... def method(self, value): ... self.calls += 1 ... return value >>> a = MyClass() >>> a.method(3) 3 >>> for x in range(75): ... res = a.method(x) >>> a.calls 75 Note that the apparent behavior will be exactly like that of lru_cache except that the cache is stored on each instance, so values in one instance will not flush values from another, and when an instance is deleted, so are the cached values for that instance. >>> b = MyClass() >>> for x in range(35): ... res = b.method(x) >>> b.calls 35 >>> a.method(0) 0 >>> a.calls 75 Note that if method had been decorated with ``functools.lru_cache()``, a.calls would have been 76 (due to the cached value of 0 having been flushed by the 'b' instance). Clear the cache with ``.cache_clear()`` >>> a.method.cache_clear() Same for a method that hasn't yet been called. >>> c = MyClass() >>> c.method.cache_clear() Another cache wrapper may be supplied: >>> cache = functools.lru_cache(maxsize=2) >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache) >>> a = MyClass() >>> a.method2() 3 Caution - do not subsequently wrap the method with another decorator, such as ``@property``, which changes the semantics of the function. See also http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/ for another implementation and additional justification. ctj|}|}t|j|||i|SN)types MethodTypesetattr__name__)selfargskwargs bound_method cached_method cache_wrappermethods E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_metadata/_functools.pywrapperzmethod_cache..wrapperKsM'55 % l33 fo}555}d-f---cdSrrrrzmethod_cache..Ss$r) functools lru_cache cache_clear)rrrs`` r method_cachersIF":Y%8%:%:M......',G NrcFtjfd}|S)z Wrap func so it's not called if its first param is None >>> print_text = pass_none(print) >>> print_text('text') text >>> print_text(None) c$| |g|Ri|SdSrr)paramr r funcs rrzpass_none..wrappercs1  4////// /  r)rwraps)rrs` r pass_noner Ys:_T00000 Nrr)rrrr rrrr!sL OOOOfrPK{5ZG9 9 ^Lib/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_itertools.cpython-311.pycnuW+A b;d(ddlmZddZeeffdZdS)) filterfalseNc#Kt}|j}|)t|j|D]}|||VdS|D] }||}||vr|||V!dS)zHList unique elements, preserving order. Remember all elements ever seen.N)setaddr __contains__)iterablekeyseenseen_addelementks E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_metadata/_itertools.pyunique_everseenrs 55DxH {"4#4h??  G HW   MMMM     GG A}}    c|tdS| t||rt|fS t|S#t$rt|fcYSwxYw)axIf *obj* is iterable, return an iterator over its items:: >>> obj = (1, 2, 3) >>> list(always_iterable(obj)) [1, 2, 3] If *obj* is not iterable, return a one-item iterable containing *obj*:: >>> obj = 1 >>> list(always_iterable(obj)) [1] If *obj* is ``None``, return an empty iterable: >>> obj = None >>> list(always_iterable(None)) [] By default, binary and text strings are not considered iterable:: >>> obj = 'foo' >>> list(always_iterable(obj)) ['foo'] If *base_type* is set, objects for which ``isinstance(obj, base_type)`` returns ``True`` won't be considered iterable. >>> obj = {'a': 1} >>> list(always_iterable(obj)) # Iterate over the dict's keys ['a'] >>> list(always_iterable(obj, base_type=dict)) # Treat dicts as a unit [{'a': 1}] Set *base_type* to ``None`` to avoid any special handling and treat objects Python considers iterable as iterable: >>> obj = 'foo' >>> list(always_iterable(obj, base_type=None)) ['f', 'o', 'o'] N)iter isinstance TypeError)obj base_types ralways_iterablersxR {Bxx:c9#=#=SF||Cyy SF||sAA! A!)N) itertoolsrrstrbytesrrrrrsR!!!!!!&%(<222222rPK{5Z!(]Lib/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_adapters.cpython-311.pycnuW+A b;dFZddlZddlZddlZddlmZGddejjZdS)N) FoldedCaseceZdZeeegdZ dejj ffd Z dZ fdZ dZ edZxZS)Message) ClassifierzObsoletes-DistPlatformz Project-URLz Provides-DistzProvides-Extraz Requires-DistzRequires-ExternalzSupported-PlatformDynamicorigct|}t|t||SN)super__new__varsupdate)clsr res __class__s ~E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_metadata/_adapters.pyrzMessage.__new__s=ggooc"" S d$$$ c8||_dSr )_repair_headers_headers)selfargskwargss r__init__zMessage.__init__#s,,.. rcDtSr )r __iter__)rrs rrzMessage.__iter__'sww!!!rcdfdt|dD}|jr)|d|f|S)Nc@|rd|vr|Stjd|zS)zCorrect for RFC822 indentation z )textwrapdedent)values rredentz'Message._repair_headers..redent+s- D-- ?7U?33 3rc0g|]\}}||fSr').0keyr$r%s r z+Message._repair_headers..1s*QQQJCC'QQQrr Description)r_payloadappend get_payload)rheadersr%s @rrzMessage._repair_headers*sl 4 4 4 RQQQ$t**Z:PQQQ = @ NNM4+;+;+=+=> ? ? ?rc nfd}tt|ttS)z[ Convert PackageMetadata to a JSON-compatible format per PEP 0566. c|jvr|n|}|dkrtjd|}|dd}||fS)NKeywordsz\s+-_)multiple_use_keysget_allresplitlowerreplace)r)r$tkrs r transformzMessage.json..transform=sn),0F)F)FDLL%%%DQTIEj  //$$S#..Bu9 r)dictmapr)rr<s` rjsonz Message.json6s@     C 3z4#8#899:::r)__name__ __module__ __qualname__setr>rr5emailmessagerrrrrpropertyr? __classcell__)rs@rrrs       "5=0 ///"""""    ; ;X ; ; ; ; ;rr)r7r" email.messagerD_textrrErr'rrrJsn <;<;<;<;<;em#<;<;<;<;<;rPK{5Z _<<YLib/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_text.cpython-311.pycnuW+A b;dv6ddlZddlmZGddeZdS)N) method_cachecneZdZdZdZdZdZdZdZfdZ dZ e fd Z d Z dd ZxZS) FoldedCasea{ A case insensitive string class; behaves just like str except compares equal when the only variation is case. >>> s = FoldedCase('hello world') >>> s == 'Hello World' True >>> 'Hello World' == s True >>> s != 'Hello World' False >>> s.index('O') 4 >>> s.split('O') ['hell', ' w', 'rld'] >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta'])) ['alpha', 'Beta', 'GAMMA'] Sequence membership is straightforward. >>> "Hello World" in [s] True >>> s in ["Hello World"] True You may test for set inclusion, but candidate and elements must both be folded. >>> FoldedCase("Hello World") in {s} True >>> s in {FoldedCase("Hello World")} True String inclusion works as long as the FoldedCase object is on the right. >>> "hello" in FoldedCase("Hello World") True But not if the FoldedCase object is on the left: >>> FoldedCase('hello') in 'Hello World' False In that case, use in_: >>> FoldedCase('hello').in_('Hello World') True >>> FoldedCase('hello') > FoldedCase('Hello') False cV||kSNlowerselfothers zE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_metadata/_text.py__lt__zFoldedCase.__lt__Czz||ekkmm++cV||kSrr r s r__gt__zFoldedCase.__gt__FrrcV||kSrr r s r__eq__zFoldedCase.__eq__Izz||u{{}},,rcV||kSrr r s r__ne__zFoldedCase.__ne__LrrcDt|Sr)hashr )r s r__hash__zFoldedCase.__hash__OsDJJLL!!!rct|Sr)superr __contains__)r r __class__s rrzFoldedCase.__contains__Rs+ww}}++EKKMM:::rc$|t|vS)zDoes self appear in other?)rr s rin_zFoldedCase.in_Usz%((((rcDtSr)rr )r rs rr zFoldedCase.lowerZsww}}rct||Sr)r index)r subs rr$zFoldedCase.index^s&zz||!!#))++...r rctjtj|tj}|||Sr)recompileescapeIsplit)r splittermaxsplitpatterns rr,zFoldedCase.splitas3*RYx00"$77}}T8,,,r)r&r)__name__ __module__ __qualname____doc__rrrrrrr!rr r$r, __classcell__)rs@rrrs99v,,,,,,------""";;;;;))) \///--------rr)r( _functoolsrstrrrrr8s^ $$$$$$\-\-\-\-\-\-\-\-\-\-rPK{5Z]!`Lib/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_collections.cpython-311.pycnuW+A b;dnddlZGddejZGddejddZdS)Nc(eZdZdZfdZdZxZS)FreezableDefaultDicta! Often it is desirable to prevent the mutation of a default dict after its initial construction, such as to prevent mutation during iteration. >>> dd = FreezableDefaultDict(list) >>> dd[0].append('1') >>> dd.freeze() >>> dd[1] [] >>> len(dd) 1 cZt|dtj|S)N_frozen)getattrsuper __missing__)selfkey __class__s E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_metadata/_collections.pyr z FreezableDefaultDict.__missing__s&z-FreezableDefaultDict.freeze..s4#7#7#9#9r)r)r s`r freezezFreezableDefaultDict.freezes9999 r)__name__ __module__ __qualname____doc__r r __classcell__)r s@r rrsV  BBBBB:::::::rrc$eZdZedZdS)Pairc d|ttj|ddS)N=)mapstrstripsplit)clstexts r parsez Pair.parses)sC 4::c1#5#56677rN)rrr classmethodr$rr rrs-88[888rrz name value) collections defaultdictr namedtuplerr&rr r*s:::::;2:::,88888 !; !&, 7 788888rPK{5ZsuuCLib/site-packages/setuptools/_vendor/importlib_metadata/__init__.pynuW+Aimport os import re import abc import csv import sys from .. import zipp import email import pathlib import operator import textwrap import warnings import functools import itertools import posixpath import collections from . import _adapters, _meta from ._collections import FreezableDefaultDict, Pair from ._compat import ( NullFinder, install, pypy_partial, ) from ._functools import method_cache, pass_none from ._itertools import always_iterable, unique_everseen from ._meta import PackageMetadata, SimplePath from contextlib import suppress from importlib import import_module from importlib.abc import MetaPathFinder from itertools import starmap from typing import List, Mapping, Optional, Union __all__ = [ 'Distribution', 'DistributionFinder', 'PackageMetadata', 'PackageNotFoundError', 'distribution', 'distributions', 'entry_points', 'files', 'metadata', 'packages_distributions', 'requires', 'version', ] class PackageNotFoundError(ModuleNotFoundError): """The package was not found.""" def __str__(self): return f"No package metadata was found for {self.name}" @property def name(self): (name,) = self.args return name class Sectioned: """ A simple entry point config parser for performance >>> for item in Sectioned.read(Sectioned._sample): ... print(item) Pair(name='sec1', value='# comments ignored') Pair(name='sec1', value='a = 1') Pair(name='sec1', value='b = 2') Pair(name='sec2', value='a = 2') >>> res = Sectioned.section_pairs(Sectioned._sample) >>> item = next(res) >>> item.name 'sec1' >>> item.value Pair(name='a', value='1') >>> item = next(res) >>> item.value Pair(name='b', value='2') >>> item = next(res) >>> item.name 'sec2' >>> item.value Pair(name='a', value='2') >>> list(res) [] """ _sample = textwrap.dedent( """ [sec1] # comments ignored a = 1 b = 2 [sec2] a = 2 """ ).lstrip() @classmethod def section_pairs(cls, text): return ( section._replace(value=Pair.parse(section.value)) for section in cls.read(text, filter_=cls.valid) if section.name is not None ) @staticmethod def read(text, filter_=None): lines = filter(filter_, map(str.strip, text.splitlines())) name = None for value in lines: section_match = value.startswith('[') and value.endswith(']') if section_match: name = value.strip('[]') continue yield Pair(name, value) @staticmethod def valid(line): return line and not line.startswith('#') class DeprecatedTuple: """ Provide subscript item access for backward compatibility. >>> recwarn = getfixture('recwarn') >>> ep = EntryPoint(name='name', value='value', group='group') >>> ep[:] ('name', 'value', 'group') >>> ep[0] 'name' >>> len(recwarn) 1 """ _warn = functools.partial( warnings.warn, "EntryPoint tuple interface is deprecated. Access members by name.", DeprecationWarning, stacklevel=pypy_partial(2), ) def __getitem__(self, item): self._warn() return self._key()[item] class EntryPoint(DeprecatedTuple): """An entry point as defined by Python packaging conventions. See `the packaging docs on entry points `_ for more information. """ pattern = re.compile( r'(?P[\w.]+)\s*' r'(:\s*(?P[\w.]+)\s*)?' r'((?P\[.*\])\s*)?$' ) """ A regular expression describing the syntax for an entry point, which might look like: - module - package.module - package.module:attribute - package.module:object.attribute - package.module:attr [extra1, extra2] Other combinations are possible as well. The expression is lenient about whitespace around the ':', following the attr, and following any extras. """ dist: Optional['Distribution'] = None def __init__(self, name, value, group): vars(self).update(name=name, value=value, group=group) def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) module = import_module(match.group('module')) attrs = filter(None, (match.group('attr') or '').split('.')) return functools.reduce(getattr, attrs, module) @property def module(self): match = self.pattern.match(self.value) return match.group('module') @property def attr(self): match = self.pattern.match(self.value) return match.group('attr') @property def extras(self): match = self.pattern.match(self.value) return list(re.finditer(r'\w+', match.group('extras') or '')) def _for(self, dist): vars(self).update(dist=dist) return self def __iter__(self): """ Supply iter so one may construct dicts of EntryPoints by name. """ msg = ( "Construction of dict of EntryPoints is deprecated in " "favor of EntryPoints." ) warnings.warn(msg, DeprecationWarning) return iter((self.name, self)) def matches(self, **params): attrs = (getattr(self, param) for param in params) return all(map(operator.eq, params.values(), attrs)) def _key(self): return self.name, self.value, self.group def __lt__(self, other): return self._key() < other._key() def __eq__(self, other): return self._key() == other._key() def __setattr__(self, name, value): raise AttributeError("EntryPoint objects are immutable.") def __repr__(self): return ( f'EntryPoint(name={self.name!r}, value={self.value!r}, ' f'group={self.group!r})' ) def __hash__(self): return hash(self._key()) class DeprecatedList(list): """ Allow an otherwise immutable object to implement mutability for compatibility. >>> recwarn = getfixture('recwarn') >>> dl = DeprecatedList(range(3)) >>> dl[0] = 1 >>> dl.append(3) >>> del dl[3] >>> dl.reverse() >>> dl.sort() >>> dl.extend([4]) >>> dl.pop(-1) 4 >>> dl.remove(1) >>> dl += [5] >>> dl + [6] [1, 2, 5, 6] >>> dl + (6,) [1, 2, 5, 6] >>> dl.insert(0, 0) >>> dl [0, 1, 2, 5] >>> dl == [0, 1, 2, 5] True >>> dl == (0, 1, 2, 5) True >>> len(recwarn) 1 """ __slots__ = () _warn = functools.partial( warnings.warn, "EntryPoints list interface is deprecated. Cast to list if needed.", DeprecationWarning, stacklevel=pypy_partial(2), ) def _wrap_deprecated_method(method_name: str): # type: ignore def wrapped(self, *args, **kwargs): self._warn() return getattr(super(), method_name)(*args, **kwargs) return method_name, wrapped locals().update( map( _wrap_deprecated_method, '__setitem__ __delitem__ append reverse extend pop remove ' '__iadd__ insert sort'.split(), ) ) def __add__(self, other): if not isinstance(other, tuple): self._warn() other = tuple(other) return self.__class__(tuple(self) + other) def __eq__(self, other): if not isinstance(other, tuple): self._warn() other = tuple(other) return tuple(self).__eq__(other) class EntryPoints(DeprecatedList): """ An immutable collection of selectable EntryPoint objects. """ __slots__ = () def __getitem__(self, name): # -> EntryPoint: """ Get the EntryPoint in self matching name. """ if isinstance(name, int): warnings.warn( "Accessing entry points by index is deprecated. " "Cast to tuple if needed.", DeprecationWarning, stacklevel=2, ) return super().__getitem__(name) try: return next(iter(self.select(name=name))) except StopIteration: raise KeyError(name) def select(self, **params): """ Select entry points from self that match the given parameters (typically group and/or name). """ return EntryPoints(ep for ep in self if ep.matches(**params)) @property def names(self): """ Return the set of all names of all entry points. """ return {ep.name for ep in self} @property def groups(self): """ Return the set of all groups of all entry points. For coverage while SelectableGroups is present. >>> EntryPoints().groups set() """ return {ep.group for ep in self} @classmethod def _from_text_for(cls, text, dist): return cls(ep._for(dist) for ep in cls._from_text(text)) @staticmethod def _from_text(text): return ( EntryPoint(name=item.value.name, value=item.value.value, group=item.name) for item in Sectioned.section_pairs(text or '') ) class Deprecated: """ Compatibility add-in for mapping to indicate that mapping behavior is deprecated. >>> recwarn = getfixture('recwarn') >>> class DeprecatedDict(Deprecated, dict): pass >>> dd = DeprecatedDict(foo='bar') >>> dd.get('baz', None) >>> dd['foo'] 'bar' >>> list(dd) ['foo'] >>> list(dd.keys()) ['foo'] >>> 'foo' in dd True >>> list(dd.values()) ['bar'] >>> len(recwarn) 1 """ _warn = functools.partial( warnings.warn, "SelectableGroups dict interface is deprecated. Use select.", DeprecationWarning, stacklevel=pypy_partial(2), ) def __getitem__(self, name): self._warn() return super().__getitem__(name) def get(self, name, default=None): self._warn() return super().get(name, default) def __iter__(self): self._warn() return super().__iter__() def __contains__(self, *args): self._warn() return super().__contains__(*args) def keys(self): self._warn() return super().keys() def values(self): self._warn() return super().values() class SelectableGroups(Deprecated, dict): """ A backward- and forward-compatible result from entry_points that fully implements the dict interface. """ @classmethod def load(cls, eps): by_group = operator.attrgetter('group') ordered = sorted(eps, key=by_group) grouped = itertools.groupby(ordered, by_group) return cls((group, EntryPoints(eps)) for group, eps in grouped) @property def _all(self): """ Reconstruct a list of all entrypoints from the groups. """ groups = super(Deprecated, self).values() return EntryPoints(itertools.chain.from_iterable(groups)) @property def groups(self): return self._all.groups @property def names(self): """ for coverage: >>> SelectableGroups().names set() """ return self._all.names def select(self, **params): if not params: return self return self._all.select(**params) class PackagePath(pathlib.PurePosixPath): """A reference to a path in a package""" def read_text(self, encoding='utf-8'): with self.locate().open(encoding=encoding) as stream: return stream.read() def read_binary(self): with self.locate().open('rb') as stream: return stream.read() def locate(self): """Return a path-like object for this path""" return self.dist.locate_file(self) class FileHash: def __init__(self, spec): self.mode, _, self.value = spec.partition('=') def __repr__(self): return f'' class Distribution: """A Python distribution package.""" @abc.abstractmethod def read_text(self, filename): """Attempt to load metadata file given by the name. :param filename: The name of the file in the distribution info. :return: The text if found, otherwise None. """ @abc.abstractmethod def locate_file(self, path): """ Given a path to a file in this distribution, return a path to it. """ @classmethod def from_name(cls, name): """Return the Distribution for the given package name. :param name: The name of the distribution package to search for. :return: The Distribution instance (or subclass thereof) for the named package, if found. :raises PackageNotFoundError: When the named package's distribution metadata cannot be found. """ for resolver in cls._discover_resolvers(): dists = resolver(DistributionFinder.Context(name=name)) dist = next(iter(dists), None) if dist is not None: return dist else: raise PackageNotFoundError(name) @classmethod def discover(cls, **kwargs): """Return an iterable of Distribution objects for all packages. Pass a ``context`` or pass keyword arguments for constructing a context. :context: A ``DistributionFinder.Context`` object. :return: Iterable of Distribution objects for all packages. """ context = kwargs.pop('context', None) if context and kwargs: raise ValueError("cannot accept context and kwargs") context = context or DistributionFinder.Context(**kwargs) return itertools.chain.from_iterable( resolver(context) for resolver in cls._discover_resolvers() ) @staticmethod def at(path): """Return a Distribution for the indicated metadata path :param path: a string or path-like object :return: a concrete Distribution instance for the path """ return PathDistribution(pathlib.Path(path)) @staticmethod def _discover_resolvers(): """Search the meta_path for resolvers.""" declared = ( getattr(finder, 'find_distributions', None) for finder in sys.meta_path ) return filter(None, declared) @property def metadata(self) -> _meta.PackageMetadata: """Return the parsed metadata for this Distribution. The returned object will have keys that name the various bits of metadata. See PEP 566 for details. """ text = ( self.read_text('METADATA') or self.read_text('PKG-INFO') # This last clause is here to support old egg-info files. Its # effect is to just end up using the PathDistribution's self._path # (which points to the egg-info file) attribute unchanged. or self.read_text('') ) return _adapters.Message(email.message_from_string(text)) @property def name(self): """Return the 'Name' metadata for the distribution package.""" return self.metadata['Name'] @property def _normalized_name(self): """Return a normalized version of the name.""" return Prepared.normalize(self.name) @property def version(self): """Return the 'Version' metadata for the distribution package.""" return self.metadata['Version'] @property def entry_points(self): return EntryPoints._from_text_for(self.read_text('entry_points.txt'), self) @property def files(self): """Files in this distribution. :return: List of PackagePath for this distribution or None Result is `None` if the metadata file that enumerates files (i.e. RECORD for dist-info or SOURCES.txt for egg-info) is missing. Result may be empty if the metadata exists but is empty. """ def make_file(name, hash=None, size_str=None): result = PackagePath(name) result.hash = FileHash(hash) if hash else None result.size = int(size_str) if size_str else None result.dist = self return result @pass_none def make_files(lines): return list(starmap(make_file, csv.reader(lines))) return make_files(self._read_files_distinfo() or self._read_files_egginfo()) def _read_files_distinfo(self): """ Read the lines of RECORD """ text = self.read_text('RECORD') return text and text.splitlines() def _read_files_egginfo(self): """ SOURCES.txt might contain literal commas, so wrap each line in quotes. """ text = self.read_text('SOURCES.txt') return text and map('"{}"'.format, text.splitlines()) @property def requires(self): """Generated requirements specified for this Distribution""" reqs = self._read_dist_info_reqs() or self._read_egg_info_reqs() return reqs and list(reqs) def _read_dist_info_reqs(self): return self.metadata.get_all('Requires-Dist') def _read_egg_info_reqs(self): source = self.read_text('requires.txt') return pass_none(self._deps_from_requires_text)(source) @classmethod def _deps_from_requires_text(cls, source): return cls._convert_egg_info_reqs_to_simple_reqs(Sectioned.read(source)) @staticmethod def _convert_egg_info_reqs_to_simple_reqs(sections): """ Historically, setuptools would solicit and store 'extra' requirements, including those with environment markers, in separate sections. More modern tools expect each dependency to be defined separately, with any relevant extras and environment markers attached directly to that requirement. This method converts the former to the latter. See _test_deps_from_requires_text for an example. """ def make_condition(name): return name and f'extra == "{name}"' def quoted_marker(section): section = section or '' extra, sep, markers = section.partition(':') if extra and markers: markers = f'({markers})' conditions = list(filter(None, [markers, make_condition(extra)])) return '; ' + ' and '.join(conditions) if conditions else '' def url_req_space(req): """ PEP 508 requires a space between the url_spec and the quoted_marker. Ref python/importlib_metadata#357. """ # '@' is uniquely indicative of a url_req. return ' ' * ('@' in req) for section in sections: space = url_req_space(section.value) yield section.value + space + quoted_marker(section.name) class DistributionFinder(MetaPathFinder): """ A MetaPathFinder capable of discovering installed distributions. """ class Context: """ Keyword arguments presented by the caller to ``distributions()`` or ``Distribution.discover()`` to narrow the scope of a search for distributions in all DistributionFinders. Each DistributionFinder may expect any parameters and should attempt to honor the canonical parameters defined below when appropriate. """ name = None """ Specific name for which a distribution finder should match. A name of ``None`` matches all distributions. """ def __init__(self, **kwargs): vars(self).update(kwargs) @property def path(self): """ The sequence of directory path that a distribution finder should search. Typically refers to Python installed package paths such as "site-packages" directories and defaults to ``sys.path``. """ return vars(self).get('path', sys.path) @abc.abstractmethod def find_distributions(self, context=Context()): """ Find distributions. Return an iterable of all Distribution instances capable of loading the metadata for packages matching the ``context``, a DistributionFinder.Context instance. """ class FastPath: """ Micro-optimized class for searching a path for children. >>> FastPath('').children() ['...'] """ @functools.lru_cache() # type: ignore def __new__(cls, root): return super().__new__(cls) def __init__(self, root): self.root = str(root) def joinpath(self, child): return pathlib.Path(self.root, child) def children(self): with suppress(Exception): return os.listdir(self.root or '.') with suppress(Exception): return self.zip_children() return [] def zip_children(self): zip_path = zipp.Path(self.root) names = zip_path.root.namelist() self.joinpath = zip_path.joinpath return dict.fromkeys(child.split(posixpath.sep, 1)[0] for child in names) def search(self, name): return self.lookup(self.mtime).search(name) @property def mtime(self): with suppress(OSError): return os.stat(self.root).st_mtime self.lookup.cache_clear() @method_cache def lookup(self, mtime): return Lookup(self) class Lookup: def __init__(self, path: FastPath): base = os.path.basename(path.root).lower() base_is_egg = base.endswith(".egg") self.infos = FreezableDefaultDict(list) self.eggs = FreezableDefaultDict(list) for child in path.children(): low = child.lower() if low.endswith((".dist-info", ".egg-info")): # rpartition is faster than splitext and suitable for this purpose. name = low.rpartition(".")[0].partition("-")[0] normalized = Prepared.normalize(name) self.infos[normalized].append(path.joinpath(child)) elif base_is_egg and low == "egg-info": name = base.rpartition(".")[0].partition("-")[0] legacy_normalized = Prepared.legacy_normalize(name) self.eggs[legacy_normalized].append(path.joinpath(child)) self.infos.freeze() self.eggs.freeze() def search(self, prepared): infos = ( self.infos[prepared.normalized] if prepared else itertools.chain.from_iterable(self.infos.values()) ) eggs = ( self.eggs[prepared.legacy_normalized] if prepared else itertools.chain.from_iterable(self.eggs.values()) ) return itertools.chain(infos, eggs) class Prepared: """ A prepared search for metadata on a possibly-named package. """ normalized = None legacy_normalized = None def __init__(self, name): self.name = name if name is None: return self.normalized = self.normalize(name) self.legacy_normalized = self.legacy_normalize(name) @staticmethod def normalize(name): """ PEP 503 normalization plus dashes as underscores. """ return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_') @staticmethod def legacy_normalize(name): """ Normalize the package name as found in the convention in older packaging tools versions and specs. """ return name.lower().replace('-', '_') def __bool__(self): return bool(self.name) @install class MetadataPathFinder(NullFinder, DistributionFinder): """A degenerate finder for distribution packages on the file system. This finder supplies only a find_distributions() method for versions of Python that do not have a PathFinder find_distributions(). """ def find_distributions(self, context=DistributionFinder.Context()): """ Find distributions. Return an iterable of all Distribution instances capable of loading the metadata for packages matching ``context.name`` (or all names if ``None`` indicated) along the paths in the list of directories ``context.path``. """ found = self._search_paths(context.name, context.path) return map(PathDistribution, found) @classmethod def _search_paths(cls, name, paths): """Find metadata directories in paths heuristically.""" prepared = Prepared(name) return itertools.chain.from_iterable( path.search(prepared) for path in map(FastPath, paths) ) def invalidate_caches(cls): FastPath.__new__.cache_clear() class PathDistribution(Distribution): def __init__(self, path: SimplePath): """Construct a distribution. :param path: SimplePath indicating the metadata directory. """ self._path = path def read_text(self, filename): with suppress( FileNotFoundError, IsADirectoryError, KeyError, NotADirectoryError, PermissionError, ): return self._path.joinpath(filename).read_text(encoding='utf-8') read_text.__doc__ = Distribution.read_text.__doc__ def locate_file(self, path): return self._path.parent / path @property def _normalized_name(self): """ Performance optimization: where possible, resolve the normalized name from the file system path. """ stem = os.path.basename(str(self._path)) return self._name_from_stem(stem) or super()._normalized_name def _name_from_stem(self, stem): name, ext = os.path.splitext(stem) if ext not in ('.dist-info', '.egg-info'): return name, sep, rest = stem.partition('-') return name def distribution(distribution_name): """Get the ``Distribution`` instance for the named package. :param distribution_name: The name of the distribution package as a string. :return: A ``Distribution`` instance (or subclass thereof). """ return Distribution.from_name(distribution_name) def distributions(**kwargs): """Get all ``Distribution`` instances in the current environment. :return: An iterable of ``Distribution`` instances. """ return Distribution.discover(**kwargs) def metadata(distribution_name) -> _meta.PackageMetadata: """Get the metadata for the named package. :param distribution_name: The name of the distribution package to query. :return: A PackageMetadata containing the parsed metadata. """ return Distribution.from_name(distribution_name).metadata def version(distribution_name): """Get the version string for the named package. :param distribution_name: The name of the distribution package to query. :return: The version string for the package as defined in the package's "Version" metadata key. """ return distribution(distribution_name).version def entry_points(**params) -> Union[EntryPoints, SelectableGroups]: """Return EntryPoint objects for all installed packages. Pass selection parameters (group or name) to filter the result to entry points matching those properties (see EntryPoints.select()). For compatibility, returns ``SelectableGroups`` object unless selection parameters are supplied. In the future, this function will return ``EntryPoints`` instead of ``SelectableGroups`` even when no selection parameters are supplied. For maximum future compatibility, pass selection parameters or invoke ``.select`` with parameters on the result. :return: EntryPoints or SelectableGroups for all installed packages. """ norm_name = operator.attrgetter('_normalized_name') unique = functools.partial(unique_everseen, key=norm_name) eps = itertools.chain.from_iterable( dist.entry_points for dist in unique(distributions()) ) return SelectableGroups.load(eps).select(**params) def files(distribution_name): """Return a list of files for the named package. :param distribution_name: The name of the distribution package to query. :return: List of files composing the distribution. """ return distribution(distribution_name).files def requires(distribution_name): """ Return a list of requirements for the named package. :return: An iterator of requirements, suitable for packaging.requirement.Requirement. """ return distribution(distribution_name).requires def packages_distributions() -> Mapping[str, List[str]]: """ Return a mapping of top-level packages to their distributions. >>> import collections.abc >>> pkgs = packages_distributions() >>> all(isinstance(dist, collections.abc.Sequence) for dist in pkgs.values()) True """ pkg_to_dist = collections.defaultdict(list) for dist in distributions(): for pkg in _top_level_declared(dist) or _top_level_inferred(dist): pkg_to_dist[pkg].append(dist.metadata['Name']) return dict(pkg_to_dist) def _top_level_declared(dist): return (dist.read_text('top_level.txt') or '').split() def _top_level_inferred(dist): return { f.parts[0] if len(f.parts) > 1 else f.with_suffix('').name for f in always_iterable(dist.files) if f.suffix == ".py" } PK{5Zxvv@Lib/site-packages/setuptools/_vendor/importlib_metadata/_text.pynuW+Aimport re from ._functools import method_cache # from jaraco.text 3.5 class FoldedCase(str): """ A case insensitive string class; behaves just like str except compares equal when the only variation is case. >>> s = FoldedCase('hello world') >>> s == 'Hello World' True >>> 'Hello World' == s True >>> s != 'Hello World' False >>> s.index('O') 4 >>> s.split('O') ['hell', ' w', 'rld'] >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta'])) ['alpha', 'Beta', 'GAMMA'] Sequence membership is straightforward. >>> "Hello World" in [s] True >>> s in ["Hello World"] True You may test for set inclusion, but candidate and elements must both be folded. >>> FoldedCase("Hello World") in {s} True >>> s in {FoldedCase("Hello World")} True String inclusion works as long as the FoldedCase object is on the right. >>> "hello" in FoldedCase("Hello World") True But not if the FoldedCase object is on the left: >>> FoldedCase('hello') in 'Hello World' False In that case, use in_: >>> FoldedCase('hello').in_('Hello World') True >>> FoldedCase('hello') > FoldedCase('Hello') False """ def __lt__(self, other): return self.lower() < other.lower() def __gt__(self, other): return self.lower() > other.lower() def __eq__(self, other): return self.lower() == other.lower() def __ne__(self, other): return self.lower() != other.lower() def __hash__(self): return hash(self.lower()) def __contains__(self, other): return super().lower().__contains__(other.lower()) def in_(self, other): "Does self appear in other?" return self in FoldedCase(other) # cache lower since it's likely to be called frequently. @method_cache def lower(self): return super().lower() def index(self, sub): return self.lower().index(sub.lower()) def split(self, splitter=' ', maxsplit=0): pattern = re.compile(re.escape(splitter), re.I) return pattern.split(self, maxsplit) PK{5ZmFFDLib/site-packages/setuptools/_vendor/importlib_metadata/_adapters.pynuW+Aimport re import textwrap import email.message from ._text import FoldedCase class Message(email.message.Message): multiple_use_keys = set( map( FoldedCase, [ 'Classifier', 'Obsoletes-Dist', 'Platform', 'Project-URL', 'Provides-Dist', 'Provides-Extra', 'Requires-Dist', 'Requires-External', 'Supported-Platform', 'Dynamic', ], ) ) """ Keys that may be indicated multiple times per PEP 566. """ def __new__(cls, orig: email.message.Message): res = super().__new__(cls) vars(res).update(vars(orig)) return res def __init__(self, *args, **kwargs): self._headers = self._repair_headers() # suppress spurious error from mypy def __iter__(self): return super().__iter__() def _repair_headers(self): def redent(value): "Correct for RFC822 indentation" if not value or '\n' not in value: return value return textwrap.dedent(' ' * 8 + value) headers = [(key, redent(value)) for key, value in vars(self)['_headers']] if self._payload: headers.append(('Description', self.get_payload())) return headers @property def json(self): """ Convert PackageMetadata to a JSON-compatible format per PEP 0566. """ def transform(key): value = self.get_all(key) if key in self.multiple_use_keys else self[key] if key == 'Keywords': value = re.split(r'\s+', value) tk = key.lower().replace('-', '_') return tk, value return dict(map(transform, map(FoldedCase, self))) PK{5Z.@Lib/site-packages/setuptools/_vendor/importlib_metadata/_meta.pynuW+Afrom ._compat import Protocol from typing import Any, Dict, Iterator, List, TypeVar, Union _T = TypeVar("_T") class PackageMetadata(Protocol): def __len__(self) -> int: ... # pragma: no cover def __contains__(self, item: str) -> bool: ... # pragma: no cover def __getitem__(self, key: str) -> str: ... # pragma: no cover def __iter__(self) -> Iterator[str]: ... # pragma: no cover def get_all(self, name: str, failobj: _T = ...) -> Union[List[Any], _T]: """ Return all values associated with a possibly multi-valued key. """ @property def json(self) -> Dict[str, Union[str, List[str]]]: """ A JSON-compatible form of the metadata. """ class SimplePath(Protocol): """ A minimal subset of pathlib.Path required by PathDistribution. """ def joinpath(self) -> 'SimplePath': ... # pragma: no cover def __truediv__(self) -> 'SimplePath': ... # pragma: no cover def parent(self) -> 'SimplePath': ... # pragma: no cover def read_text(self) -> str: ... # pragma: no cover PK{5ZGLib/site-packages/setuptools/_vendor/importlib_metadata/_collections.pynuW+Aimport collections # from jaraco.collections 3.3 class FreezableDefaultDict(collections.defaultdict): """ Often it is desirable to prevent the mutation of a default dict after its initial construction, such as to prevent mutation during iteration. >>> dd = FreezableDefaultDict(list) >>> dd[0].append('1') >>> dd.freeze() >>> dd[1] [] >>> len(dd) 1 """ def __missing__(self, key): return getattr(self, '_frozen', super().__missing__)(key) def freeze(self): self._frozen = lambda key: self.default_factory() class Pair(collections.namedtuple('Pair', 'name value')): @classmethod def parse(cls, text): return cls(*map(str.strip, text.split("=", 1))) PK{5ZhttFLib/site-packages/setuptools/_vendor/importlib_resources/_itertools.pynuW+Afrom itertools import filterfalse from typing import ( Callable, Iterable, Iterator, Optional, Set, TypeVar, Union, ) # Type and type variable definitions _T = TypeVar('_T') _U = TypeVar('_U') def unique_everseen( iterable: Iterable[_T], key: Optional[Callable[[_T], _U]] = None ) -> Iterator[_T]: "List unique elements, preserving order. Remember all elements ever seen." # unique_everseen('AAAABBBCCDAABBB') --> A B C D # unique_everseen('ABBCcAD', str.lower) --> A B C D seen: Set[Union[_T, _U]] = set() seen_add = seen.add if key is None: for element in filterfalse(seen.__contains__, iterable): seen_add(element) yield element else: for element in iterable: k = key(element) if k not in seen: seen_add(k) yield element PK{5Zkh CLib/site-packages/setuptools/_vendor/importlib_resources/_compat.pynuW+A# flake8: noqa import abc import sys import pathlib from contextlib import suppress if sys.version_info >= (3, 10): from zipfile import Path as ZipPath # type: ignore else: from ..zipp import Path as ZipPath # type: ignore try: from typing import runtime_checkable # type: ignore except ImportError: def runtime_checkable(cls): # type: ignore return cls try: from typing import Protocol # type: ignore except ImportError: Protocol = abc.ABC # type: ignore class TraversableResourcesLoader: """ Adapt loaders to provide TraversableResources and other compatibility. Used primarily for Python 3.9 and earlier where the native loaders do not yet implement TraversableResources. """ def __init__(self, spec): self.spec = spec @property def path(self): return self.spec.origin def get_resource_reader(self, name): from . import readers, _adapters def _zip_reader(spec): with suppress(AttributeError): return readers.ZipReader(spec.loader, spec.name) def _namespace_reader(spec): with suppress(AttributeError, ValueError): return readers.NamespaceReader(spec.submodule_search_locations) def _available_reader(spec): with suppress(AttributeError): return spec.loader.get_resource_reader(spec.name) def _native_reader(spec): reader = _available_reader(spec) return reader if hasattr(reader, 'files') else None def _file_reader(spec): try: path = pathlib.Path(self.path) except TypeError: return None if path.exists(): return readers.FileReader(self) return ( # native reader if it supplies 'files' _native_reader(self.spec) or # local ZipReader if a zip module _zip_reader(self.spec) or # local NamespaceReader if a namespace module _namespace_reader(self.spec) or # local FileReader _file_reader(self.spec) # fallback - adapt the spec ResourceReader to TraversableReader or _adapters.CompatibilityFiles(self.spec) ) def wrap_spec(package): """ Construct a package spec with traversable compatibility on the spec/loader/reader. Supersedes _adapters.wrap_spec to use TraversableResourcesLoader from above for older Python compatibility (<3.10). """ from . import _adapters return _adapters.SpecLoaderAdapter(package.__spec__, TraversableResourcesLoader) PK{5Z.1 CLib/site-packages/setuptools/_vendor/importlib_resources/_legacy.pynuW+Aimport functools import os import pathlib import types import warnings from typing import Union, Iterable, ContextManager, BinaryIO, TextIO, Any from . import _common Package = Union[types.ModuleType, str] Resource = str def deprecated(func): @functools.wraps(func) def wrapper(*args, **kwargs): warnings.warn( f"{func.__name__} is deprecated. Use files() instead. " "Refer to https://importlib-resources.readthedocs.io" "/en/latest/using.html#migrating-from-legacy for migration advice.", DeprecationWarning, stacklevel=2, ) return func(*args, **kwargs) return wrapper def normalize_path(path): # type: (Any) -> str """Normalize a path by ensuring it is a string. If the resulting string contains path separators, an exception is raised. """ str_path = str(path) parent, file_name = os.path.split(str_path) if parent: raise ValueError(f'{path!r} must be only a file name') return file_name @deprecated def open_binary(package: Package, resource: Resource) -> BinaryIO: """Return a file-like object opened for binary reading of the resource.""" return (_common.files(package) / normalize_path(resource)).open('rb') @deprecated def read_binary(package: Package, resource: Resource) -> bytes: """Return the binary contents of the resource.""" return (_common.files(package) / normalize_path(resource)).read_bytes() @deprecated def open_text( package: Package, resource: Resource, encoding: str = 'utf-8', errors: str = 'strict', ) -> TextIO: """Return a file-like object opened for text reading of the resource.""" return (_common.files(package) / normalize_path(resource)).open( 'r', encoding=encoding, errors=errors ) @deprecated def read_text( package: Package, resource: Resource, encoding: str = 'utf-8', errors: str = 'strict', ) -> str: """Return the decoded string of the resource. The decoding-related arguments have the same semantics as those of bytes.decode(). """ with open_text(package, resource, encoding, errors) as fp: return fp.read() @deprecated def contents(package: Package) -> Iterable[str]: """Return an iterable of entries in `package`. Note that not all entries are resources. Specifically, directories are not considered resources. Use `is_resource()` on each entry returned here to check if it is a resource or not. """ return [path.name for path in _common.files(package).iterdir()] @deprecated def is_resource(package: Package, name: str) -> bool: """True if `name` is a resource inside `package`. Directories are *not* resources. """ resource = normalize_path(name) return any( traversable.name == resource and traversable.is_file() for traversable in _common.files(package).iterdir() ) @deprecated def path( package: Package, resource: Resource, ) -> ContextManager[pathlib.Path]: """A context manager providing a file path object to the resource. If the resource does not already exist on its own on the file system, a temporary file will be created. If the file was created, the file will be deleted upon exiting the context manager (no exception is raised if the file was deleted prior to the context manager exiting). """ return _common.as_file(_common.files(package) / normalize_path(resource)) PK{5ZUt-QQ]Lib/site-packages/setuptools/_vendor/importlib_resources/__pycache__/__init__.cpython-311.pycnuW+A b;dZdZddlmZmZmZddlmZmZmZm Z m Z m Z m Z m Z ddlmZgdZdS)z*Read resources contained within a package.)as_filefilesPackage)contents open_binary read_binary open_text read_text is_resourcepathResource)ResourceReader) rr rrrrr rr r rr N)__doc___commonrrr_legacyrrrr r r r r abcr__all__~E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_resources/__init__.pyrs00                        rPK{5ZE5VVXLib/site-packages/setuptools/_vendor/importlib_resources/__pycache__/abc.cpython-311.pycnuW+A b;d.ddlZddlmZmZmZddlmZmZGddejZ eGdd eZ Gd d e Z dS) N)BinaryIOIterableText)runtime_checkableProtocolceZdZdZejdedefdZejdedefdZ ejdede fdZ ejde e fdZd S) ResourceReaderzDAbstract base class for loaders to provide resource reading support.resourcereturnct)zReturn an opened, file-like object for binary reading. The 'resource' argument is expected to represent only a file name. If the resource cannot be found, FileNotFoundError is raised. FileNotFoundErrorselfr s yE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_resources/abc.py open_resourcezResourceReader.open_resource s  ct)zReturn the file system path to the specified resource. The 'resource' argument is expected to represent only a file name. If the resource does not exist on the file system, raise FileNotFoundError. rrs r resource_pathzResourceReader.resource_paths  rpathct)zjReturn True if the named 'path' is a resource. Files are resources, directories are not. rrrs r is_resourcezResourceReader.is_resource#s  rct)z+Return an iterable of entries in `package`.rrs rcontentszResourceReader.contents+s  rN)__name__ __module__ __qualname____doc__abcabstractmethodrrrrboolrrstrrrrr r sNN  d  x         d  t               (3-      rr ) metaclassceZdZdZejdZdZddZejde fdZ ejde fdZ ejd Z d Z ejdd Zejdefd ZdS) Traversablezt An object with a subset of pathlib.Path methods suitable for traversing directories and opening files. cdS)z3 Yield Traversable objects in self Nr&rs riterdirzTraversable.iterdir8rc|d5}|cdddS#1swxYwYdS)z0 Read contents of self as bytes rbNopenread)rstrms r read_byteszTraversable.read_bytes>sYYt__ 99;;                  s 7;;Nc||5}|cdddS#1swxYwYdS)z/ Read contents of self as text )encodingNr/)rr5r2s r read_textzTraversable.read_textEsYYY ) ) T99;;                  s 8<<r cdS)z4 Return True if self is a directory Nr&rs ris_dirzTraversable.is_dirLr,rcdS)z/ Return True if self is a file Nr&rs ris_filezTraversable.is_fileRr,rcdS)2 Return Traversable child in self Nr&rchilds rjoinpathzTraversable.joinpathXr,rc,||S)r<)r?r=s r __truediv__zTraversable.__truediv__^s}}U###rrcdS)z mode may be 'r' or 'rb' to open as text or binary. Return a handle suitable for reading (same as pathlib.Path.open). When opening as text, accepts encoding parameters such as those accepted by io.TextIOWrapper. Nr&)rmodeargskwargss rr0zTraversable.opendr,rcdS)zM The base name of this object without any parent references. Nr&rs rnamezTraversable.namenr,rN)rB)rrr r!r"r#r+r3r6r$r8r:r?rAr0abstractpropertyr%rHr&rrr)r)1s3                     $$$        c      rr)cJeZdZdZejdZdZdZdZ dZ dS)TraversableResourceszI The required interface for providing traversable resources. cdS)z3Return a Traversable object for the loaded package.Nr&rs rfileszTraversableResources.files{r,rcv||dS)Nr.)rNr?r0rs rrz"TraversableResources.open_resources,zz||$$X..33D999rc t|rIrrs rrz"TraversableResources.resource_paths)))rct||SrI)rNr?r:rs rrz TraversableResources.is_resources*zz||$$T**22444rcbd|DS)Nc3$K|] }|jV dSrI)rH).0items r z0TraversableResources.contents..s$==d ======r)rNr+rs rrzTraversableResources.contentss*==djjll&:&:&<&<====rN) rrr r!r"r#rNrrrrr&rrrLrLus|  BBB:::***555>>>>>rrL) r"typingrrr_compatrrABCMetar r)rLr&rrrZs ++++++++++00000000' ' ' ' ' s{' ' ' ' T@ @ @ @ @ (@ @ @ F>>>>>>>>>>>rPK{5Z] mm\Lib/site-packages/setuptools/_vendor/importlib_resources/__pycache__/_legacy.cpython-311.pycnuW+A b;d ddlZddlZddlZddlZddlZddlmZmZmZm Z m Z m Z ddl m Z eejefZeZdZdZededed e fd Zededed efd Ze ddedededed e f dZe ddedededed ef dZeded eefdZededed efdZededed eejfdZdS)N)UnionIterableContextManagerBinaryIOTextIOAny)_commoncFtjfd}|S)Nc\tjjdtd|i|S)Nz is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.) stacklevel)warningswarn__name__DeprecationWarning)argskwargsfuncs }E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_resources/_legacy.pywrapperzdeprecated..wrappersR } P P P      tT$V$$$) functoolswraps)rrs` r deprecatedrs8_T%%%%% Nrct|}tj|\}}|rt |d|S)zNormalize a path by ensuring it is a string. If the resulting string contains path separators, an exception is raised. z must be only a file name)strospathsplit ValueError)rstr_pathparent file_names rnormalize_pathr%sL 4yyH h//FI ?D===>>> rpackageresourcereturncptj|t|z dS)zDReturn a file-like object opened for binary reading of the resource.rbr filesr%openr&r's r open_binaryr/+s/ M' " "^H%=%= = C CD I IIrcntj|t|z S)z+Return the binary contents of the resource.)r r,r% read_bytesr.s r read_binaryr21s- M' " "^H%=%= = I I K KKrutf-8strictencodingerrorscvtj|t|z d||S)zBReturn a file-like object opened for text reading of the resource.r)r5r6r+)r&r'r5r6s r open_textr97s@ M' " "^H%=%= = C C hv D  rct||||5}|cdddS#1swxYwYdS)zReturn the decoded string of the resource. The decoding-related arguments have the same semantics as those of bytes.decode(). N)r9read)r&r'r5r6fps r read_textr=Ds 7Hh 7 72wwyys 488cbdtj|DS)zReturn an iterable of entries in `package`. Note that not all entries are resources. Specifically, directories are not considered resources. Use `is_resource()` on each entry returned here to check if it is a resource or not. cg|] }|j S)name).0rs r zcontents..\s C C C$DI C C Cr)r r,iterdir)r&s rcontentsrETs/ D C'-"8"8"@"@"B"B C C CCrrAct|tfdtj|DS)zYTrue if `name` is a resource inside `package`. Directories are *not* resources. c3VK|]#}|jko|V$dS)N)rAis_file)rB traversabler's r zis_resource..fsP  H$>)<)<)>)>r)r%anyr r,rD)r&rAr's @r is_resourcerL_s` d##H "=1199;;  rcntjtj|t|z S)akA context manager providing a file path object to the resource. If the resource does not already exist on its own on the file system, a temporary file will be created. If the file was created, the file will be deleted upon exiting the context manager (no exception is raised if the file was deleted prior to the context manager exiting). )r as_filer,r%r.s rrrls+ ?7=11N84L4LL M MMr)r3r4)rrpathlibtypesrtypingrrrrrrr ModuleTyperPackageResourcerr%r/bytesr2r9r=rEboolrLPathrr@rrrYs  IIIIIIIIIIIIIIII  #% &        JJHJJJJ J  LLHLLLL L                                DgD(3-DDD D           N  N NGL! N N N  N N NrPK{5ZL[Lib/site-packages/setuptools/_vendor/importlib_resources/__pycache__/simple.cpython-311.pycnuW+A b;d dZddlZddlZddlZddlmZmZddlmZmZGddej Z Gdd eZ Gd d eZ Gd d ee Z dS)z+ Interface adapters for low-level readers. N)BinaryIOList) TraversableTraversableResourcesceZdZdZejdZejdZejdZ ejdZ e dZ dS) SimpleReaderzQ The minimum, low-level interface required from a resource provider. cdS)zP The name of the package for which this reader loads resources. Nselfs |E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_resources/simple.pypackagezSimpleReader.packagecdS)zo Obtain an iterable of SimpleReader for available child containers (e.g. directories). Nr r s rchildrenzSimpleReader.childrenrrcdS)zL Obtain available named resources for this virtual package. Nr r s r resourceszSimpleReader.resources"rrcdS)z: Obtain a File-like for a named resource. Nr )r resources r open_binaryzSimpleReader.open_binary)rrcB|jddS)N.)rsplitr s rnamezSimpleReader.name0s|!!#&&r**rN) __name__ __module__ __qualname____doc__abcabstractpropertyrabstractmethodrrrpropertyrr rrr r s                 ++X+++rr c2eZdZdZdZdZdZd dZdZdS) ResourceHandlez9 Handle to a named resource in a ResourceReader. c"||_||_dSN)parentr)r r*rs r__init__zResourceHandle.__init__:s  rcdSNTr r s ris_filezResourceHandle.is_file?trcdSNFr r s ris_dirzResourceHandle.is_dirBurrcx|jj|j}d|vrt j|i|}|S)Nb)r*readerrrio TextIOWrapper)r modeargskwargsstreams ropenzResourceHandle.openEs?#// :: d??%t6v66F rc td)NzCannot traverse into a resource) RuntimeErrorr rs rjoinpathzResourceHandle.joinpathKs<===rN)r4) rrr r!r+r.r2r>rBr rrr'r'5sn  >>>>>rr'c6eZdZdZdZdZdZdZdZdZ dS) ResourceContainerzI Traversable container for a package's resources via its reader. c||_dSr))r7)r r7s rr+zResourceContainer.__init__Ts  rcdSr-r r s rr2zResourceContainer.is_dirXr/rcdSr1r r s rr.zResourceContainer.is_file[r3rcfdjjD}ttj}t j||S)Nc38K|]}t|VdSr))r').0rr s r z,ResourceContainer.iterdir.._s-NNd++NNNNNNr)r7rmaprDr itertoolschain)r filesdirss` riterdirzResourceContainer.iterdir^sQNNNN 8MNNN$dk&:&:&<&<==ud+++rctr))IsADirectoryError)r r;r<s rr>zResourceContainer.opencs!!!rc^tfd|DS)Nc32K|]}|jk |VdSr))r)rJ traversablers rrKz-ResourceContainer.joinpath..gs:  '[=MQU=U=UK=U=U=U=U  r)nextrQrAs `rrBzResourceContainer.joinpathfsC    +/<<>>      rN) rrr r!r+r2r.rQr>rBr rrrDrDOsx,,, """     rrDceZdZdZdZdS)TraversableReaderz A TraversableResources based on SimpleReader. Resource providers may derive from this class to provide the TraversableResources interface by supplying the SimpleReader interface. c t|Sr))rDr s rrOzTraversableReader.filesss &&&rN)rrr r!rOr rrrYrYls- '''''rrY)r!r"r8rMtypingrrrrABCr r'rDrYr rrr]s !!!!!!!!22222222%+%+%+%+%+37%+%+%+P>>>>>[>>>4        :''''',l'''''rPK{5Z:6\Lib/site-packages/setuptools/_vendor/importlib_resources/__pycache__/_compat.cpython-311.pycnuW+A b;d ddlZddlZddlZddlmZejdkrddlmZnddl mZ ddl m Z n#e $rdZ YnwxYw ddl m Z n#e $r ejZ YnwxYwGd d Zd ZdS) N)suppress) )Path)runtime_checkablec|SN)clss }E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_resources/_compat.pyrrs )Protocolc4eZdZdZdZedZdZdS)TraversableResourcesLoaderz Adapt loaders to provide TraversableResources and other compatibility. Used primarily for Python 3.9 and earlier where the native loaders do not yet implement TraversableResources. c||_dSr spec)selfrs r __init__z#TraversableResourcesLoader.__init__%s  rc|jjSr )rorigin)rs r pathzTraversableResourcesLoader.path(s yrcddlmm}fd}fd}dfd}fd}|jpI|jp9|jp)|jp|jS)N)readers _adaptersctt5|j|jcdddS#1swxYwYdSr )rAttributeError ZipReaderloadernamerrs r _zip_readerzCTraversableResourcesLoader.get_resource_reader.._zip_reader/s.)) A A((di@@ A A A A A A A A A A A A A A A A A As AA Acttt5|jcdddS#1swxYwYdSr )rr ValueErrorNamespaceReadersubmodule_search_locationsr#s r _namespace_readerzITraversableResourcesLoader.get_resource_reader.._namespace_reader3s.*55 P P..t/NOO P P P P P P P P P P P P P P P P P PsAA Actt5|j|jcdddS#1swxYwYdSr )rrr!get_resource_readerr"rs r _available_readerzITraversableResourcesLoader.get_resource_reader.._available_reader7s.)) B B{66tyAA B B B B B B B B B B B B B B B B B BsAAAcB|}t|dr|ndS)Nfiles)hasattr)rreaderr,s r _native_readerzFTraversableResourcesLoader.get_resource_reader.._native_reader;s,&&t,,F$VW55?664 ?rc tjj}n#t$rYdSwxYw|rSdSr )pathlibrr TypeErrorexists FileReader)rrrrs r _file_readerzDTraversableResourcesLoader.get_resource_reader.._file_reader?sk |DI..   tt {{}} 0))$/// 0 0s  ++)rrrCompatibilityFiles) rr"rr$r)r1r7r,rs ` @@r r+z.TraversableResourcesLoader.get_resource_reader,s(((((((( A A A A A P P P P P B B B @ @ @ @ @ 0 0 0 0 0 0 N49 % % 7 K " " 7  di ( ( 7 L # # 7++DI66 rN)__name__ __module__ __qualname____doc__rpropertyrr+r rr rrsW  X ) ) ) ) ) rrcNddlm}||jtS)z Construct a package spec with traversable compatibility on the spec/loader/reader. Supersedes _adapters.wrap_spec to use TraversableResourcesLoader from above for older Python compatibility (<3.10). r)r)r8rSpecLoaderAdapter__spec__r)packagers r wrap_specrCXs0  & &w'79S T TTr)abcsysr3 contextlibr version_infozipfilerZipPathzipptypingr ImportErrorrABCrrCr rr rNs> w'''''''&&&&&&((((((( wHHH9 9 9 9 9 9 9 9 x U U U U Us3>>A AAPK{5ZF3_Lib/site-packages/setuptools/_vendor/importlib_resources/__pycache__/_itertools.cpython-311.pycnuW+A b;dtddlmZddlmZmZmZmZmZmZm Z edZ edZ d dee deee ge fdee fd Z dS) ) filterfalse)CallableIterableIteratorOptionalSetTypeVarUnion_T_UNiterablekeyreturnc#Kt}|j}|)t|j|D]}|||VdS|D] }||}||vr|||V!dS)zHList unique elements, preserving order. Remember all elements ever seen.N)setaddr __contains__)r rseenseen_addelementks E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_resources/_itertools.pyunique_everseenrs #uuDxH {"4#4h??  G HW   MMMM     GG A}}    )N) itertoolsrtypingrrrrrr r r r rrrrs!!!!!! WT]] WT]]AErl!)(B48* >F ~t 6$)  rcbt|tjr|ntj|S)N) isinstancetypes ModuleType importlib import_module)cands r resolver *s*dE$455 X449;RSW;X;XXrcpt|}t|jt|d|S)zTake a package name or module object and return the module. Raise an exception if the resolved module is not a package. Nz is not a package)r rsubmodule_search_locations TypeError)r resolveds r r r /s> wH5=7777888 Orct|}|j|j}|S)z= Return a Traversable object for the given package. )rrrrrrs r r r ;s6 W  D [ , ,TY 7 7F <<>>rc#Ktj|\}} tj||tj|n#tj|wxYw~t j|V tj|dS#t$rYdSwxYw# tj|w#t$rYwwxYwxYw)Nsuffix) tempfilemkstemposwriteclosepathlibPathremoveFileNotFoundError)rr)fdraw_paths r _tempfiler5Es #6222LB   HR " " " HRLLLLBHRLLLL l8$$$$$  Ih          DD   Ih         D sRAB'A%%B'B B$#B$'C)B>=C> C C C  Cc8t|j|jS)zu Given a Traversable object, return that object as a path on the local file system in a context manager. r()r5 read_bytesrpaths r as_filer:Ys T_TY 7 7 77rc#K|VdS)z7 Degenerate behavior for pathlib.Path objects. Nr8s r _r=bs JJJJJr)r&)r,r/r* functools contextlibrrtypingrrabcrr_compatrrstrPackagerrr r r contextmanagerr5singledispatchr:registerr0r=r<rr rHsv  """""""",,,,,,,,  #% &..."YYY    & 888 ',  rPK{5Z**^Lib/site-packages/setuptools/_vendor/importlib_resources/__pycache__/_adapters.cpython-311.pycnuW+A b;dddlmZddlmZddlmZGddZGddZdd ZGd d Z d Z dS))suppress) TextIOWrapper)abcc$eZdZdZdfdZdZdS)SpecLoaderAdapterz> Adapt a package spec to adapt the underlying loader. c|jSN)loaderspecs E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_resources/_adapters.pyzSpecLoaderAdapter. s$+c4||_|||_dSr )r r )selfr adapters r__init__zSpecLoaderAdapter.__init__ s gdmm rc,t|j|Sr )getattrr rnames r __getattr__zSpecLoaderAdapter.__getattr__sty$'''rN)__name__ __module__ __qualname____doc__rrrrrrsI&>%=$$$$(((((rrceZdZdZdZdZdS)TraversableResourcesLoaderz9 Adapt a loader to provide TraversableResources. c||_dSr r rr s rrz#TraversableResourcesLoader.__init__  rcNt|jSr )CompatibilityFilesr _nativers rget_resource_readerz.TraversableResourcesLoader.get_resource_readers!$),,44666rN)rrrrrr'rrrr r s<77777rr rc|dkrt|g|Ri|S|dkr|Std|)Nr(rbz8Invalid mode value '{}', only 'r' and 'rb' are supported)r ValueErrorformat)filemodeargskwargss r _io_wrapperr1 sZ s{{T3D333F333  BII$OO  rceZdZdZGddejZGddejZGddejZdZ e d Z d Z d Z d Zd S)r%zj Adapter for an existing or non-existent resource reader to provide a compatibility .files(). cLeZdZdZdZdZdZeZdZe dZ d dZ d S) CompatibilityFiles.SpecPathzk Path tied to a module spec. Can be read and exposes the resource reader children. c"||_||_dSr )_spec_reader)rr readers rrz$CompatibilityFiles.SpecPath.__init__6sDJ!DLLLrcjstdStfdjDS)Nrc3XK|]$}tj|V%dSr )r% ChildPathr7).0pathrs r z6CompatibilityFiles.SpecPath.iterdir..=sI#,,T\4@@r)r7itercontentsrs`riterdirz#CompatibilityFiles.SpecPath.iterdir:s^< Bxx L1133 rcdSNFrrAs ris_filez#CompatibilityFiles.SpecPath.is_fileB5rc|jst|St|j|Sr )r7r% OrphanPathr;rothers rjoinpathz$CompatibilityFiles.SpecPath.joinpathGs8< <)44U;;;%// eDD Drc|jjSr )r6rrAs rrz CompatibilityFiles.SpecPath.nameLs :? "rr(cTt|jd|g|Ri|Sr )r1r7 open_resourcerr.r/r0s ropenz CompatibilityFiles.SpecPath.openPs3t|99$??WWWWPVWW WrNr( rrrrrrBrEis_dirrKpropertyrrPrrrSpecPathr40s   " " "       E E E  # #  # X X X X X XrrUcNeZdZdZdZdZdZdZdZe dZ d d Z d S) CompatibilityFiles.ChildPathzw Path tied to a resource reader child. Can be read but doesn't expose any meaningful children. c"||_||_dSr )r7_name)rr8rs rrz%CompatibilityFiles.ChildPath.__init__Ys!DLDJJJrc tdSNrr?rAs rrBz$CompatibilityFiles.ChildPath.iterdir] 88Orc@|j|jSr )r7 is_resourcerrAs rrEz$CompatibilityFiles.ChildPath.is_file`s<++DI66 6rc,| Sr )rErAs rrSz#CompatibilityFiles.ChildPath.is_dircs||~~% %rcBt|j|Sr )r%rHrrIs rrKz%CompatibilityFiles.ChildPath.joinpathfs%00EBB Brc|jSr )rYrAs rrz!CompatibilityFiles.ChildPath.nameis : rr(c^t|j|j|g|Ri|Sr )r1r7rNrrOs rrPz!CompatibilityFiles.ChildPath.openmsE **4955t>BFL rNrQrRrrrr;rWSs         7 7 7 & & & C C C           rr;cLeZdZdZdZdZdZeZdZe dZ d dZ d S) CompatibilityFiles.OrphanPathz Orphan path, not tied to a module spec or resource reader. Can't be read and doesn't expose any meaningful children. cXt|dkrtd||_dS)Nrz/Need at least one path part to construct a path)lenr+_path)r path_partss rrz&CompatibilityFiles.OrphanPath.__init__xs-:"" !RSSS#DJJJrc tdSr[r\rAs rrBz%CompatibilityFiles.OrphanPath.iterdir}r]rcdSrDrrAs rrEz%CompatibilityFiles.OrphanPath.is_filerFrc2tjg|j|RSr )r%rHrhrIs rrKz&CompatibilityFiles.OrphanPath.joinpaths %0D$*DeDDD Drc|jdS)N)rhrAs rrz"CompatibilityFiles.OrphanPath.names:b> !rr(c td)NzCan't open orphan path)FileNotFoundErrorrOs rrPz"CompatibilityFiles.OrphanPath.opens#$<== =rNrQrRrrrrHrers   $ $ $        E E E  " "  " > > > > > >rrHc||_dSr r r"s rrzCompatibilityFiles.__init__r#rctt5|jj|jjcdddS#1swxYwYdSr )rAttributeErrorr r r'rrAs rr7zCompatibilityFiles._readers n % % H H9#77 GG H H H H H H H H H H H H H H H H H Hs)A  AAc8|j}t|dr|n|S)zB Return the native reader if it supports files(). files)r7hasattr)rr8s rr&zCompatibilityFiles._natives$ 11;vvt;rc,t|j|Sr )rr7)rattrs rrzCompatibilityFiles.__getattr__st|T***rcLt|j|jSr )r%rUr r7rAs rruzCompatibilityFiles.filess!**49dlCCCrN)rrrrr TraversablerUr;rHrrTr7r&rrurrrr%r%*s  !X!X!X!X!X3?!X!X!XFCO>>>>>>S_>>>:HHXH<<<+++DDDDDrr%c6t|jtS)z` Construct a package spec with traversable compatibility on the spec/loader/reader. )r__spec__r )packages r wrap_specr~s W-/I J JJrNrQ) contextlibriorrrr r1r%r~rrrrs ( ( ( ( ( ( ( ( 7 7 7 7 7 7 7 7xDxDxDxDxDxDxDxDvKKKKKrPK{5ZX@ \Lib/site-packages/setuptools/_vendor/importlib_resources/__pycache__/readers.cpython-311.pycnuW+A b;d ddlZddlZddlZddlmZddlmZddlmZdZ Gddej Z Gd d ej Z Gd d ej ZGd dej ZdS)N)abc)unique_everseen)ZipPathcZttj|SN)iter collections OrderedDictfromkeys)itemss }E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_vendor/importlib_resources/readers.pyremove_duplicatesr s!  '0077 8 88c eZdZdZdZdZdS) FileReadercLtj|jj|_dSr)pathlibPathpathparent)selfloaders r__init__zFileReader.__init__sL--4 rcPt|j|Sz{ Return the file system path to prevent `resources.path()` from creating a temporary copy. strrjoinpathrresources r resource_pathzFileReader.resource_path" 49%%h//000rc|jSrrrs rfileszFileReader.files yrN__name__ __module__ __qualname__rr"r'rrrrsA555111rrc0eZdZdZfdZdZdZxZS) ZipReaderc|d\}}}|jdd|zdz|_|j|_dS)N.\/) rpartitionprefixreplacearchive)rrmodule_names rrzZipReader.__init__ sK&&s++ 1dm++D#66=C ~ rc t|S#t$r}t|jdd}~wwxYwNr)super open_resourceKeyErrorFileNotFoundErrorargs)rr!exc __class__s rr>zZipReader.open_resource%sS 177((22 2 1 1 1#CHQK00 0 1s $ A AA c||}|o|Sr)r'ris_fileexists)rrtargets r is_resourcezZipReader.is_resource+s<&&t,,~~3FMMOO3rc6t|j|jSr)rr7r5r&s rr'zZipReader.files1st|T[111r)r*r+r,rr>rHr' __classcell__)rCs@rr/r/se&&& 11111 444 2222222rr/cbeZdZdZdZdZdZdZdZdZ dZ e Z d Z e d Zd Zd S) MultiplexedPathz Given a series of Traversable objects, implement a merged version of the interface across all objects. Useful for namespace packages which may be multihomed at a single name. ctttjt ||_|jsd}t |td|jDstddS)Nz.MultiplexedPath must contain at least one pathc3>K|]}|VdSr)is_dir.0rs r z+MultiplexedPath.__init__..Bs*99T4;;==999999rz)MultiplexedPath only supports directories) listmaprrr_pathsr@allNotADirectoryError)rpathsmessages rrzMultiplexedPath.__init__=s3w|->u-E-EFFGG { -FG#G,, ,99T[99999 R$%PQQ Q R Rrcjd|jD}t|tjdS)Nc3HK|]}|D]}|VdSr)iterdir)rQrfiles rrRz*MultiplexedPath.iterdir..Fs7II$$,,..II$IIIIIIIrr:)key)rUroperator attrgetter)rr's rr\zMultiplexedPath.iterdirEs5II$+IIIu(*=f*E*EFFFFrc&t|dNz is not a filer@r&s r read_byteszMultiplexedPath.read_bytesI4 7 7 7888rc&t|drbrcrrAkwargss r read_textzMultiplexedPath.read_textLrercdS)NTr-r&s rrOzMultiplexedPath.is_dirOstrcdS)NFr-r&s rrEzMultiplexedPath.is_fileRsurcn|D]}|j|kr|cS|jd|z Sr<)r\r:rU)rchildr]s rrzMultiplexedPath.joinpathUsGLLNN  DyE!! "{1~%%rc&t|drbrcrgs ropenzMultiplexedPath.open_rerc&|jdjSr<)rUr:r&s rr:zMultiplexedPath.namebs{1~""rcVdd|jD}d|dS)Nz, c3"K|] }d|dV dS)'Nr-rPs rrRz+MultiplexedPath.__repr__..gs*>>$+d+++>>>>>>rzMultiplexedPath())joinrU)rrXs r__repr__zMultiplexedPath.__repr__fs5 >>$+>>>>>*%****rN)r*r+r,__doc__rr\rdrirOrEr __truediv__ropropertyr:rvr-rrrLrL5sRRRGGG999999&&&K999##X#+++++rrLc eZdZdZdZdZdS)NamespaceReaderc|dt|vrtdtt||_dS)N NamespacePathz Invalid path)r ValueErrorrLrSr)rnamespace_paths rrzNamespaceReader.__init__ls; #n"5"5 5 5^,, ,#T.%9%9: rcPt|j|Srrr s rr"zNamespaceReader.resource_pathqr#rc|jSrr%r&s rr'zNamespaceReader.filesyr(rNr)r-rrr{r{ksA;;; 111rr{)r rr_r _itertoolsr_compatrrTraversableResourcesrr/ TraversablerLr{r-rrrs&''''''999     )    22222(222,3+3+3+3+3+co3+3+3+lc.rPK{5ZoqDLib/site-packages/setuptools/_vendor/importlib_resources/__init__.pynuW+A"""Read resources contained within a package.""" from ._common import ( as_file, files, Package, ) from ._legacy import ( contents, open_binary, read_binary, open_text, read_text, is_resource, path, Resource, ) from .abc import ResourceReader __all__ = [ 'Package', 'Resource', 'ResourceReader', 'as_file', 'contents', 'files', 'is_resource', 'open_binary', 'open_text', 'path', 'read_binary', 'read_text', ] PK{5Z}>..?Lib/site-packages/setuptools/_vendor/importlib_resources/abc.pynuW+Aimport abc from typing import BinaryIO, Iterable, Text from ._compat import runtime_checkable, Protocol class ResourceReader(metaclass=abc.ABCMeta): """Abstract base class for loaders to provide resource reading support.""" @abc.abstractmethod def open_resource(self, resource: Text) -> BinaryIO: """Return an opened, file-like object for binary reading. The 'resource' argument is expected to represent only a file name. If the resource cannot be found, FileNotFoundError is raised. """ # This deliberately raises FileNotFoundError instead of # NotImplementedError so that if this method is accidentally called, # it'll still do the right thing. raise FileNotFoundError @abc.abstractmethod def resource_path(self, resource: Text) -> Text: """Return the file system path to the specified resource. The 'resource' argument is expected to represent only a file name. If the resource does not exist on the file system, raise FileNotFoundError. """ # This deliberately raises FileNotFoundError instead of # NotImplementedError so that if this method is accidentally called, # it'll still do the right thing. raise FileNotFoundError @abc.abstractmethod def is_resource(self, path: Text) -> bool: """Return True if the named 'path' is a resource. Files are resources, directories are not. """ raise FileNotFoundError @abc.abstractmethod def contents(self) -> Iterable[str]: """Return an iterable of entries in `package`.""" raise FileNotFoundError @runtime_checkable class Traversable(Protocol): """ An object with a subset of pathlib.Path methods suitable for traversing directories and opening files. """ @abc.abstractmethod def iterdir(self): """ Yield Traversable objects in self """ def read_bytes(self): """ Read contents of self as bytes """ with self.open('rb') as strm: return strm.read() def read_text(self, encoding=None): """ Read contents of self as text """ with self.open(encoding=encoding) as strm: return strm.read() @abc.abstractmethod def is_dir(self) -> bool: """ Return True if self is a directory """ @abc.abstractmethod def is_file(self) -> bool: """ Return True if self is a file """ @abc.abstractmethod def joinpath(self, child): """ Return Traversable child in self """ def __truediv__(self, child): """ Return Traversable child in self """ return self.joinpath(child) @abc.abstractmethod def open(self, mode='r', *args, **kwargs): """ mode may be 'r' or 'rb' to open as text or binary. Return a handle suitable for reading (same as pathlib.Path.open). When opening as text, accepts encoding parameters such as those accepted by io.TextIOWrapper. """ @abc.abstractproperty def name(self) -> str: """ The base name of this object without any parent references. """ class TraversableResources(ResourceReader): """ The required interface for providing traversable resources. """ @abc.abstractmethod def files(self): """Return a Traversable object for the loaded package.""" def open_resource(self, resource): return self.files().joinpath(resource).open('rb') def resource_path(self, resource): raise FileNotFoundError(resource) def is_resource(self, path): return self.files().joinpath(path).is_file() def contents(self): return (item.name for item in self.files().iterdir()) PK{5Zc  BLib/site-packages/setuptools/_vendor/importlib_resources/simple.pynuW+A""" Interface adapters for low-level readers. """ import abc import io import itertools from typing import BinaryIO, List from .abc import Traversable, TraversableResources class SimpleReader(abc.ABC): """ The minimum, low-level interface required from a resource provider. """ @abc.abstractproperty def package(self): # type: () -> str """ The name of the package for which this reader loads resources. """ @abc.abstractmethod def children(self): # type: () -> List['SimpleReader'] """ Obtain an iterable of SimpleReader for available child containers (e.g. directories). """ @abc.abstractmethod def resources(self): # type: () -> List[str] """ Obtain available named resources for this virtual package. """ @abc.abstractmethod def open_binary(self, resource): # type: (str) -> BinaryIO """ Obtain a File-like for a named resource. """ @property def name(self): return self.package.split('.')[-1] class ResourceHandle(Traversable): """ Handle to a named resource in a ResourceReader. """ def __init__(self, parent, name): # type: (ResourceContainer, str) -> None self.parent = parent self.name = name # type: ignore def is_file(self): return True def is_dir(self): return False def open(self, mode='r', *args, **kwargs): stream = self.parent.reader.open_binary(self.name) if 'b' not in mode: stream = io.TextIOWrapper(*args, **kwargs) return stream def joinpath(self, name): raise RuntimeError("Cannot traverse into a resource") class ResourceContainer(Traversable): """ Traversable container for a package's resources via its reader. """ def __init__(self, reader): # type: (SimpleReader) -> None self.reader = reader def is_dir(self): return True def is_file(self): return False def iterdir(self): files = (ResourceHandle(self, name) for name in self.reader.resources) dirs = map(ResourceContainer, self.reader.children()) return itertools.chain(files, dirs) def open(self, *args, **kwargs): raise IsADirectoryError() def joinpath(self, name): return next( traversable for traversable in self.iterdir() if traversable.name == name ) class TraversableReader(TraversableResources, SimpleReader): """ A TraversableResources based on SimpleReader. Resource providers may derive from this class to provide the TraversableResources interface by supplying the SimpleReader interface. """ def files(self): return ResourceContainer(self) PK{5ZD CLib/site-packages/setuptools/_vendor/importlib_resources/readers.pynuW+Aimport collections import pathlib import operator from . import abc from ._itertools import unique_everseen from ._compat import ZipPath def remove_duplicates(items): return iter(collections.OrderedDict.fromkeys(items)) class FileReader(abc.TraversableResources): def __init__(self, loader): self.path = pathlib.Path(loader.path).parent def resource_path(self, resource): """ Return the file system path to prevent `resources.path()` from creating a temporary copy. """ return str(self.path.joinpath(resource)) def files(self): return self.path class ZipReader(abc.TraversableResources): def __init__(self, loader, module): _, _, name = module.rpartition('.') self.prefix = loader.prefix.replace('\\', '/') + name + '/' self.archive = loader.archive def open_resource(self, resource): try: return super().open_resource(resource) except KeyError as exc: raise FileNotFoundError(exc.args[0]) def is_resource(self, path): # workaround for `zipfile.Path.is_file` returning true # for non-existent paths. target = self.files().joinpath(path) return target.is_file() and target.exists() def files(self): return ZipPath(self.archive, self.prefix) class MultiplexedPath(abc.Traversable): """ Given a series of Traversable objects, implement a merged version of the interface across all objects. Useful for namespace packages which may be multihomed at a single name. """ def __init__(self, *paths): self._paths = list(map(pathlib.Path, remove_duplicates(paths))) if not self._paths: message = 'MultiplexedPath must contain at least one path' raise FileNotFoundError(message) if not all(path.is_dir() for path in self._paths): raise NotADirectoryError('MultiplexedPath only supports directories') def iterdir(self): files = (file for path in self._paths for file in path.iterdir()) return unique_everseen(files, key=operator.attrgetter('name')) def read_bytes(self): raise FileNotFoundError(f'{self} is not a file') def read_text(self, *args, **kwargs): raise FileNotFoundError(f'{self} is not a file') def is_dir(self): return True def is_file(self): return False def joinpath(self, child): # first try to find child in current paths for file in self.iterdir(): if file.name == child: return file # if it does not exist, construct it with the first path return self._paths[0] / child __truediv__ = joinpath def open(self, *args, **kwargs): raise FileNotFoundError(f'{self} is not a file') @property def name(self): return self._paths[0].name def __repr__(self): paths = ', '.join(f"'{path}'" for path in self._paths) return f'MultiplexedPath({paths})' class NamespaceReader(abc.TraversableResources): def __init__(self, namespace_path): if 'NamespacePath' not in str(namespace_path): raise ValueError('Invalid path') self.path = MultiplexedPath(*list(namespace_path)) def resource_path(self, resource): """ Return the file system path to prevent `resources.path()` from creating a temporary copy. """ return str(self.path.joinpath(resource)) def files(self): return self.path PK{5Z'ELib/site-packages/setuptools/_vendor/importlib_resources/_adapters.pynuW+Afrom contextlib import suppress from io import TextIOWrapper from . import abc class SpecLoaderAdapter: """ Adapt a package spec to adapt the underlying loader. """ def __init__(self, spec, adapter=lambda spec: spec.loader): self.spec = spec self.loader = adapter(spec) def __getattr__(self, name): return getattr(self.spec, name) class TraversableResourcesLoader: """ Adapt a loader to provide TraversableResources. """ def __init__(self, spec): self.spec = spec def get_resource_reader(self, name): return CompatibilityFiles(self.spec)._native() def _io_wrapper(file, mode='r', *args, **kwargs): if mode == 'r': return TextIOWrapper(file, *args, **kwargs) elif mode == 'rb': return file raise ValueError( "Invalid mode value '{}', only 'r' and 'rb' are supported".format(mode) ) class CompatibilityFiles: """ Adapter for an existing or non-existent resource reader to provide a compatibility .files(). """ class SpecPath(abc.Traversable): """ Path tied to a module spec. Can be read and exposes the resource reader children. """ def __init__(self, spec, reader): self._spec = spec self._reader = reader def iterdir(self): if not self._reader: return iter(()) return iter( CompatibilityFiles.ChildPath(self._reader, path) for path in self._reader.contents() ) def is_file(self): return False is_dir = is_file def joinpath(self, other): if not self._reader: return CompatibilityFiles.OrphanPath(other) return CompatibilityFiles.ChildPath(self._reader, other) @property def name(self): return self._spec.name def open(self, mode='r', *args, **kwargs): return _io_wrapper(self._reader.open_resource(None), mode, *args, **kwargs) class ChildPath(abc.Traversable): """ Path tied to a resource reader child. Can be read but doesn't expose any meaningful children. """ def __init__(self, reader, name): self._reader = reader self._name = name def iterdir(self): return iter(()) def is_file(self): return self._reader.is_resource(self.name) def is_dir(self): return not self.is_file() def joinpath(self, other): return CompatibilityFiles.OrphanPath(self.name, other) @property def name(self): return self._name def open(self, mode='r', *args, **kwargs): return _io_wrapper( self._reader.open_resource(self.name), mode, *args, **kwargs ) class OrphanPath(abc.Traversable): """ Orphan path, not tied to a module spec or resource reader. Can't be read and doesn't expose any meaningful children. """ def __init__(self, *path_parts): if len(path_parts) < 1: raise ValueError('Need at least one path part to construct a path') self._path = path_parts def iterdir(self): return iter(()) def is_file(self): return False is_dir = is_file def joinpath(self, other): return CompatibilityFiles.OrphanPath(*self._path, other) @property def name(self): return self._path[-1] def open(self, mode='r', *args, **kwargs): raise FileNotFoundError("Can't open orphan path") def __init__(self, spec): self.spec = spec @property def _reader(self): with suppress(AttributeError): return self.spec.loader.get_resource_reader(self.spec.name) def _native(self): """ Return the native reader if it supports files(). """ reader = self._reader return reader if hasattr(reader, 'files') else self def __getattr__(self, attr): return getattr(self._reader, attr) def files(self): return CompatibilityFiles.SpecPath(self.spec, self._reader) def wrap_spec(package): """ Construct a package spec with traversable compatibility on the spec/loader/reader. """ return SpecLoaderAdapter(package.__spec__, TraversableResourcesLoader) PK{5Z0Q} CLib/site-packages/setuptools/_vendor/importlib_resources/_common.pynuW+Aimport os import pathlib import tempfile import functools import contextlib import types import importlib from typing import Union, Optional from .abc import ResourceReader, Traversable from ._compat import wrap_spec Package = Union[types.ModuleType, str] def files(package): # type: (Package) -> Traversable """ Get a Traversable resource from a package """ return from_package(get_package(package)) def get_resource_reader(package): # type: (types.ModuleType) -> Optional[ResourceReader] """ Return the package's loader if it's a ResourceReader. """ # We can't use # a issubclass() check here because apparently abc.'s __subclasscheck__() # hook wants to create a weak reference to the object, but # zipimport.zipimporter does not support weak references, resulting in a # TypeError. That seems terrible. spec = package.__spec__ reader = getattr(spec.loader, 'get_resource_reader', None) # type: ignore if reader is None: return None return reader(spec.name) # type: ignore def resolve(cand): # type: (Package) -> types.ModuleType return cand if isinstance(cand, types.ModuleType) else importlib.import_module(cand) def get_package(package): # type: (Package) -> types.ModuleType """Take a package name or module object and return the module. Raise an exception if the resolved module is not a package. """ resolved = resolve(package) if wrap_spec(resolved).submodule_search_locations is None: raise TypeError(f'{package!r} is not a package') return resolved def from_package(package): """ Return a Traversable object for the given package. """ spec = wrap_spec(package) reader = spec.loader.get_resource_reader(spec.name) return reader.files() @contextlib.contextmanager def _tempfile(reader, suffix=''): # Not using tempfile.NamedTemporaryFile as it leads to deeper 'try' # blocks due to the need to close the temporary file to work on Windows # properly. fd, raw_path = tempfile.mkstemp(suffix=suffix) try: try: os.write(fd, reader()) finally: os.close(fd) del reader yield pathlib.Path(raw_path) finally: try: os.remove(raw_path) except FileNotFoundError: pass @functools.singledispatch def as_file(path): """ Given a Traversable object, return that object as a path on the local file system in a context manager. """ return _tempfile(path.read_bytes, suffix=path.name) @as_file.register(pathlib.Path) @contextlib.contextmanager def _(path): """ Degenerate behavior for pathlib.Path objects. """ yield path PK{5ZaLmTmT9Lib/site-packages/setuptools/_vendor/typing_extensions.pynuW+Aimport abc import collections import collections.abc import operator import sys import typing # After PEP 560, internal typing API was substantially reworked. # This is especially important for Protocol class which uses internal APIs # quite extensively. PEP_560 = sys.version_info[:3] >= (3, 7, 0) if PEP_560: GenericMeta = type else: # 3.6 from typing import GenericMeta, _type_vars # noqa # The two functions below are copies of typing internal helpers. # They are needed by _ProtocolMeta def _no_slots_copy(dct): dict_copy = dict(dct) if '__slots__' in dict_copy: for slot in dict_copy['__slots__']: dict_copy.pop(slot, None) return dict_copy def _check_generic(cls, parameters): if not cls.__parameters__: raise TypeError(f"{cls} is not a generic class") alen = len(parameters) elen = len(cls.__parameters__) if alen != elen: raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments for {cls};" f" actual {alen}, expected {elen}") # Please keep __all__ alphabetized within each category. __all__ = [ # Super-special typing primitives. 'ClassVar', 'Concatenate', 'Final', 'ParamSpec', 'Self', 'Type', # ABCs (from collections.abc). 'Awaitable', 'AsyncIterator', 'AsyncIterable', 'Coroutine', 'AsyncGenerator', 'AsyncContextManager', 'ChainMap', # Concrete collection types. 'ContextManager', 'Counter', 'Deque', 'DefaultDict', 'OrderedDict', 'TypedDict', # Structural checks, a.k.a. protocols. 'SupportsIndex', # One-off things. 'Annotated', 'final', 'IntVar', 'Literal', 'NewType', 'overload', 'Protocol', 'runtime', 'runtime_checkable', 'Text', 'TypeAlias', 'TypeGuard', 'TYPE_CHECKING', ] if PEP_560: __all__.extend(["get_args", "get_origin", "get_type_hints"]) # 3.6.2+ if hasattr(typing, 'NoReturn'): NoReturn = typing.NoReturn # 3.6.0-3.6.1 else: class _NoReturn(typing._FinalTypingBase, _root=True): """Special type indicating functions that never return. Example:: from typing import NoReturn def stop() -> NoReturn: raise Exception('no way') This type is invalid in other positions, e.g., ``List[NoReturn]`` will fail in static type checkers. """ __slots__ = () def __instancecheck__(self, obj): raise TypeError("NoReturn cannot be used with isinstance().") def __subclasscheck__(self, cls): raise TypeError("NoReturn cannot be used with issubclass().") NoReturn = _NoReturn(_root=True) # Some unconstrained type variables. These are used by the container types. # (These are not for export.) T = typing.TypeVar('T') # Any type. KT = typing.TypeVar('KT') # Key type. VT = typing.TypeVar('VT') # Value type. T_co = typing.TypeVar('T_co', covariant=True) # Any type covariant containers. T_contra = typing.TypeVar('T_contra', contravariant=True) # Ditto contravariant. ClassVar = typing.ClassVar # On older versions of typing there is an internal class named "Final". # 3.8+ if hasattr(typing, 'Final') and sys.version_info[:2] >= (3, 7): Final = typing.Final # 3.7 elif sys.version_info[:2] >= (3, 7): class _FinalForm(typing._SpecialForm, _root=True): def __repr__(self): return 'typing_extensions.' + self._name def __getitem__(self, parameters): item = typing._type_check(parameters, f'{self._name} accepts only single type') return typing._GenericAlias(self, (item,)) Final = _FinalForm('Final', doc="""A special typing construct to indicate that a name cannot be re-assigned or overridden in a subclass. For example: MAX_SIZE: Final = 9000 MAX_SIZE += 1 # Error reported by type checker class Connection: TIMEOUT: Final[int] = 10 class FastConnector(Connection): TIMEOUT = 1 # Error reported by type checker There is no runtime checking of these properties.""") # 3.6 else: class _Final(typing._FinalTypingBase, _root=True): """A special typing construct to indicate that a name cannot be re-assigned or overridden in a subclass. For example: MAX_SIZE: Final = 9000 MAX_SIZE += 1 # Error reported by type checker class Connection: TIMEOUT: Final[int] = 10 class FastConnector(Connection): TIMEOUT = 1 # Error reported by type checker There is no runtime checking of these properties. """ __slots__ = ('__type__',) def __init__(self, tp=None, **kwds): self.__type__ = tp def __getitem__(self, item): cls = type(self) if self.__type__ is None: return cls(typing._type_check(item, f'{cls.__name__[1:]} accepts only single type.'), _root=True) raise TypeError(f'{cls.__name__[1:]} cannot be further subscripted') def _eval_type(self, globalns, localns): new_tp = typing._eval_type(self.__type__, globalns, localns) if new_tp == self.__type__: return self return type(self)(new_tp, _root=True) def __repr__(self): r = super().__repr__() if self.__type__ is not None: r += f'[{typing._type_repr(self.__type__)}]' return r def __hash__(self): return hash((type(self).__name__, self.__type__)) def __eq__(self, other): if not isinstance(other, _Final): return NotImplemented if self.__type__ is not None: return self.__type__ == other.__type__ return self is other Final = _Final(_root=True) # 3.8+ if hasattr(typing, 'final'): final = typing.final # 3.6-3.7 else: def final(f): """This decorator can be used to indicate to type checkers that the decorated method cannot be overridden, and decorated class cannot be subclassed. For example: class Base: @final def done(self) -> None: ... class Sub(Base): def done(self) -> None: # Error reported by type checker ... @final class Leaf: ... class Other(Leaf): # Error reported by type checker ... There is no runtime checking of these properties. """ return f def IntVar(name): return typing.TypeVar(name) # 3.8+: if hasattr(typing, 'Literal'): Literal = typing.Literal # 3.7: elif sys.version_info[:2] >= (3, 7): class _LiteralForm(typing._SpecialForm, _root=True): def __repr__(self): return 'typing_extensions.' + self._name def __getitem__(self, parameters): return typing._GenericAlias(self, parameters) Literal = _LiteralForm('Literal', doc="""A type that can be used to indicate to type checkers that the corresponding value has a value literally equivalent to the provided parameter. For example: var: Literal[4] = 4 The type checker understands that 'var' is literally equal to the value 4 and no other value. Literal[...] cannot be subclassed. There is no runtime checking verifying that the parameter is actually a value instead of a type.""") # 3.6: else: class _Literal(typing._FinalTypingBase, _root=True): """A type that can be used to indicate to type checkers that the corresponding value has a value literally equivalent to the provided parameter. For example: var: Literal[4] = 4 The type checker understands that 'var' is literally equal to the value 4 and no other value. Literal[...] cannot be subclassed. There is no runtime checking verifying that the parameter is actually a value instead of a type. """ __slots__ = ('__values__',) def __init__(self, values=None, **kwds): self.__values__ = values def __getitem__(self, values): cls = type(self) if self.__values__ is None: if not isinstance(values, tuple): values = (values,) return cls(values, _root=True) raise TypeError(f'{cls.__name__[1:]} cannot be further subscripted') def _eval_type(self, globalns, localns): return self def __repr__(self): r = super().__repr__() if self.__values__ is not None: r += f'[{", ".join(map(typing._type_repr, self.__values__))}]' return r def __hash__(self): return hash((type(self).__name__, self.__values__)) def __eq__(self, other): if not isinstance(other, _Literal): return NotImplemented if self.__values__ is not None: return self.__values__ == other.__values__ return self is other Literal = _Literal(_root=True) _overload_dummy = typing._overload_dummy # noqa overload = typing.overload # This is not a real generic class. Don't use outside annotations. Type = typing.Type # Various ABCs mimicking those in collections.abc. # A few are simply re-exported for completeness. class _ExtensionsGenericMeta(GenericMeta): def __subclasscheck__(self, subclass): """This mimics a more modern GenericMeta.__subclasscheck__() logic (that does not have problems with recursion) to work around interactions between collections, typing, and typing_extensions on older versions of Python, see https://github.com/python/typing/issues/501. """ if self.__origin__ is not None: if sys._getframe(1).f_globals['__name__'] not in ['abc', 'functools']: raise TypeError("Parameterized generics cannot be used with class " "or instance checks") return False if not self.__extra__: return super().__subclasscheck__(subclass) res = self.__extra__.__subclasshook__(subclass) if res is not NotImplemented: return res if self.__extra__ in subclass.__mro__: return True for scls in self.__extra__.__subclasses__(): if isinstance(scls, GenericMeta): continue if issubclass(subclass, scls): return True return False Awaitable = typing.Awaitable Coroutine = typing.Coroutine AsyncIterable = typing.AsyncIterable AsyncIterator = typing.AsyncIterator # 3.6.1+ if hasattr(typing, 'Deque'): Deque = typing.Deque # 3.6.0 else: class Deque(collections.deque, typing.MutableSequence[T], metaclass=_ExtensionsGenericMeta, extra=collections.deque): __slots__ = () def __new__(cls, *args, **kwds): if cls._gorg is Deque: return collections.deque(*args, **kwds) return typing._generic_new(collections.deque, cls, *args, **kwds) ContextManager = typing.ContextManager # 3.6.2+ if hasattr(typing, 'AsyncContextManager'): AsyncContextManager = typing.AsyncContextManager # 3.6.0-3.6.1 else: from _collections_abc import _check_methods as _check_methods_in_mro # noqa class AsyncContextManager(typing.Generic[T_co]): __slots__ = () async def __aenter__(self): return self @abc.abstractmethod async def __aexit__(self, exc_type, exc_value, traceback): return None @classmethod def __subclasshook__(cls, C): if cls is AsyncContextManager: return _check_methods_in_mro(C, "__aenter__", "__aexit__") return NotImplemented DefaultDict = typing.DefaultDict # 3.7.2+ if hasattr(typing, 'OrderedDict'): OrderedDict = typing.OrderedDict # 3.7.0-3.7.2 elif (3, 7, 0) <= sys.version_info[:3] < (3, 7, 2): OrderedDict = typing._alias(collections.OrderedDict, (KT, VT)) # 3.6 else: class OrderedDict(collections.OrderedDict, typing.MutableMapping[KT, VT], metaclass=_ExtensionsGenericMeta, extra=collections.OrderedDict): __slots__ = () def __new__(cls, *args, **kwds): if cls._gorg is OrderedDict: return collections.OrderedDict(*args, **kwds) return typing._generic_new(collections.OrderedDict, cls, *args, **kwds) # 3.6.2+ if hasattr(typing, 'Counter'): Counter = typing.Counter # 3.6.0-3.6.1 else: class Counter(collections.Counter, typing.Dict[T, int], metaclass=_ExtensionsGenericMeta, extra=collections.Counter): __slots__ = () def __new__(cls, *args, **kwds): if cls._gorg is Counter: return collections.Counter(*args, **kwds) return typing._generic_new(collections.Counter, cls, *args, **kwds) # 3.6.1+ if hasattr(typing, 'ChainMap'): ChainMap = typing.ChainMap elif hasattr(collections, 'ChainMap'): class ChainMap(collections.ChainMap, typing.MutableMapping[KT, VT], metaclass=_ExtensionsGenericMeta, extra=collections.ChainMap): __slots__ = () def __new__(cls, *args, **kwds): if cls._gorg is ChainMap: return collections.ChainMap(*args, **kwds) return typing._generic_new(collections.ChainMap, cls, *args, **kwds) # 3.6.1+ if hasattr(typing, 'AsyncGenerator'): AsyncGenerator = typing.AsyncGenerator # 3.6.0 else: class AsyncGenerator(AsyncIterator[T_co], typing.Generic[T_co, T_contra], metaclass=_ExtensionsGenericMeta, extra=collections.abc.AsyncGenerator): __slots__ = () NewType = typing.NewType Text = typing.Text TYPE_CHECKING = typing.TYPE_CHECKING def _gorg(cls): """This function exists for compatibility with old typing versions.""" assert isinstance(cls, GenericMeta) if hasattr(cls, '_gorg'): return cls._gorg while cls.__origin__ is not None: cls = cls.__origin__ return cls _PROTO_WHITELIST = ['Callable', 'Awaitable', 'Iterable', 'Iterator', 'AsyncIterable', 'AsyncIterator', 'Hashable', 'Sized', 'Container', 'Collection', 'Reversible', 'ContextManager', 'AsyncContextManager'] def _get_protocol_attrs(cls): attrs = set() for base in cls.__mro__[:-1]: # without object if base.__name__ in ('Protocol', 'Generic'): continue annotations = getattr(base, '__annotations__', {}) for attr in list(base.__dict__.keys()) + list(annotations.keys()): if (not attr.startswith('_abc_') and attr not in ( '__abstractmethods__', '__annotations__', '__weakref__', '_is_protocol', '_is_runtime_protocol', '__dict__', '__args__', '__slots__', '__next_in_mro__', '__parameters__', '__origin__', '__orig_bases__', '__extra__', '__tree_hash__', '__doc__', '__subclasshook__', '__init__', '__new__', '__module__', '_MutableMapping__marker', '_gorg')): attrs.add(attr) return attrs def _is_callable_members_only(cls): return all(callable(getattr(cls, attr, None)) for attr in _get_protocol_attrs(cls)) # 3.8+ if hasattr(typing, 'Protocol'): Protocol = typing.Protocol # 3.7 elif PEP_560: from typing import _collect_type_vars # noqa def _no_init(self, *args, **kwargs): if type(self)._is_protocol: raise TypeError('Protocols cannot be instantiated') class _ProtocolMeta(abc.ABCMeta): # This metaclass is a bit unfortunate and exists only because of the lack # of __instancehook__. def __instancecheck__(cls, instance): # We need this method for situations where attributes are # assigned in __init__. if ((not getattr(cls, '_is_protocol', False) or _is_callable_members_only(cls)) and issubclass(instance.__class__, cls)): return True if cls._is_protocol: if all(hasattr(instance, attr) and (not callable(getattr(cls, attr, None)) or getattr(instance, attr) is not None) for attr in _get_protocol_attrs(cls)): return True return super().__instancecheck__(instance) class Protocol(metaclass=_ProtocolMeta): # There is quite a lot of overlapping code with typing.Generic. # Unfortunately it is hard to avoid this while these live in two different # modules. The duplicated code will be removed when Protocol is moved to typing. """Base class for protocol classes. Protocol classes are defined as:: class Proto(Protocol): def meth(self) -> int: ... Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example:: class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check See PEP 544 for details. Protocol classes decorated with @typing_extensions.runtime act as simple-minded runtime protocol that checks only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:: class GenProto(Protocol[T]): def meth(self) -> T: ... """ __slots__ = () _is_protocol = True def __new__(cls, *args, **kwds): if cls is Protocol: raise TypeError("Type Protocol cannot be instantiated; " "it can only be used as a base class") return super().__new__(cls) @typing._tp_cache def __class_getitem__(cls, params): if not isinstance(params, tuple): params = (params,) if not params and cls is not typing.Tuple: raise TypeError( f"Parameter list to {cls.__qualname__}[...] cannot be empty") msg = "Parameters to generic types must be types." params = tuple(typing._type_check(p, msg) for p in params) # noqa if cls is Protocol: # Generic can only be subscripted with unique type variables. if not all(isinstance(p, typing.TypeVar) for p in params): i = 0 while isinstance(params[i], typing.TypeVar): i += 1 raise TypeError( "Parameters to Protocol[...] must all be type variables." f" Parameter {i + 1} is {params[i]}") if len(set(params)) != len(params): raise TypeError( "Parameters to Protocol[...] must all be unique") else: # Subscripting a regular Generic subclass. _check_generic(cls, params) return typing._GenericAlias(cls, params) def __init_subclass__(cls, *args, **kwargs): tvars = [] if '__orig_bases__' in cls.__dict__: error = typing.Generic in cls.__orig_bases__ else: error = typing.Generic in cls.__bases__ if error: raise TypeError("Cannot inherit from plain Generic") if '__orig_bases__' in cls.__dict__: tvars = _collect_type_vars(cls.__orig_bases__) # Look for Generic[T1, ..., Tn] or Protocol[T1, ..., Tn]. # If found, tvars must be a subset of it. # If not found, tvars is it. # Also check for and reject plain Generic, # and reject multiple Generic[...] and/or Protocol[...]. gvars = None for base in cls.__orig_bases__: if (isinstance(base, typing._GenericAlias) and base.__origin__ in (typing.Generic, Protocol)): # for error messages the_base = base.__origin__.__name__ if gvars is not None: raise TypeError( "Cannot inherit from Generic[...]" " and/or Protocol[...] multiple types.") gvars = base.__parameters__ if gvars is None: gvars = tvars else: tvarset = set(tvars) gvarset = set(gvars) if not tvarset <= gvarset: s_vars = ', '.join(str(t) for t in tvars if t not in gvarset) s_args = ', '.join(str(g) for g in gvars) raise TypeError(f"Some type variables ({s_vars}) are" f" not listed in {the_base}[{s_args}]") tvars = gvars cls.__parameters__ = tuple(tvars) # Determine if this is a protocol or a concrete subclass. if not cls.__dict__.get('_is_protocol', None): cls._is_protocol = any(b is Protocol for b in cls.__bases__) # Set (or override) the protocol subclass hook. def _proto_hook(other): if not cls.__dict__.get('_is_protocol', None): return NotImplemented if not getattr(cls, '_is_runtime_protocol', False): if sys._getframe(2).f_globals['__name__'] in ['abc', 'functools']: return NotImplemented raise TypeError("Instance and class checks can only be used with" " @runtime protocols") if not _is_callable_members_only(cls): if sys._getframe(2).f_globals['__name__'] in ['abc', 'functools']: return NotImplemented raise TypeError("Protocols with non-method members" " don't support issubclass()") if not isinstance(other, type): # Same error as for issubclass(1, int) raise TypeError('issubclass() arg 1 must be a class') for attr in _get_protocol_attrs(cls): for base in other.__mro__: if attr in base.__dict__: if base.__dict__[attr] is None: return NotImplemented break annotations = getattr(base, '__annotations__', {}) if (isinstance(annotations, typing.Mapping) and attr in annotations and isinstance(other, _ProtocolMeta) and other._is_protocol): break else: return NotImplemented return True if '__subclasshook__' not in cls.__dict__: cls.__subclasshook__ = _proto_hook # We have nothing more to do for non-protocols. if not cls._is_protocol: return # Check consistency of bases. for base in cls.__bases__: if not (base in (object, typing.Generic) or base.__module__ == 'collections.abc' and base.__name__ in _PROTO_WHITELIST or isinstance(base, _ProtocolMeta) and base._is_protocol): raise TypeError('Protocols can only inherit from other' f' protocols, got {repr(base)}') cls.__init__ = _no_init # 3.6 else: from typing import _next_in_mro, _type_check # noqa def _no_init(self, *args, **kwargs): if type(self)._is_protocol: raise TypeError('Protocols cannot be instantiated') class _ProtocolMeta(GenericMeta): """Internal metaclass for Protocol. This exists so Protocol classes can be generic without deriving from Generic. """ def __new__(cls, name, bases, namespace, tvars=None, args=None, origin=None, extra=None, orig_bases=None): # This is just a version copied from GenericMeta.__new__ that # includes "Protocol" special treatment. (Comments removed for brevity.) assert extra is None # Protocols should not have extra if tvars is not None: assert origin is not None assert all(isinstance(t, typing.TypeVar) for t in tvars), tvars else: tvars = _type_vars(bases) gvars = None for base in bases: if base is typing.Generic: raise TypeError("Cannot inherit from plain Generic") if (isinstance(base, GenericMeta) and base.__origin__ in (typing.Generic, Protocol)): if gvars is not None: raise TypeError( "Cannot inherit from Generic[...] or" " Protocol[...] multiple times.") gvars = base.__parameters__ if gvars is None: gvars = tvars else: tvarset = set(tvars) gvarset = set(gvars) if not tvarset <= gvarset: s_vars = ", ".join(str(t) for t in tvars if t not in gvarset) s_args = ", ".join(str(g) for g in gvars) cls_name = "Generic" if any(b.__origin__ is typing.Generic for b in bases) else "Protocol" raise TypeError(f"Some type variables ({s_vars}) are" f" not listed in {cls_name}[{s_args}]") tvars = gvars initial_bases = bases if (extra is not None and type(extra) is abc.ABCMeta and extra not in bases): bases = (extra,) + bases bases = tuple(_gorg(b) if isinstance(b, GenericMeta) else b for b in bases) if any(isinstance(b, GenericMeta) and b is not typing.Generic for b in bases): bases = tuple(b for b in bases if b is not typing.Generic) namespace.update({'__origin__': origin, '__extra__': extra}) self = super(GenericMeta, cls).__new__(cls, name, bases, namespace, _root=True) super(GenericMeta, self).__setattr__('_gorg', self if not origin else _gorg(origin)) self.__parameters__ = tvars self.__args__ = tuple(... if a is typing._TypingEllipsis else () if a is typing._TypingEmpty else a for a in args) if args else None self.__next_in_mro__ = _next_in_mro(self) if orig_bases is None: self.__orig_bases__ = initial_bases elif origin is not None: self._abc_registry = origin._abc_registry self._abc_cache = origin._abc_cache if hasattr(self, '_subs_tree'): self.__tree_hash__ = (hash(self._subs_tree()) if origin else super(GenericMeta, self).__hash__()) return self def __init__(cls, *args, **kwargs): super().__init__(*args, **kwargs) if not cls.__dict__.get('_is_protocol', None): cls._is_protocol = any(b is Protocol or isinstance(b, _ProtocolMeta) and b.__origin__ is Protocol for b in cls.__bases__) if cls._is_protocol: for base in cls.__mro__[1:]: if not (base in (object, typing.Generic) or base.__module__ == 'collections.abc' and base.__name__ in _PROTO_WHITELIST or isinstance(base, typing.TypingMeta) and base._is_protocol or isinstance(base, GenericMeta) and base.__origin__ is typing.Generic): raise TypeError(f'Protocols can only inherit from other' f' protocols, got {repr(base)}') cls.__init__ = _no_init def _proto_hook(other): if not cls.__dict__.get('_is_protocol', None): return NotImplemented if not isinstance(other, type): # Same error as for issubclass(1, int) raise TypeError('issubclass() arg 1 must be a class') for attr in _get_protocol_attrs(cls): for base in other.__mro__: if attr in base.__dict__: if base.__dict__[attr] is None: return NotImplemented break annotations = getattr(base, '__annotations__', {}) if (isinstance(annotations, typing.Mapping) and attr in annotations and isinstance(other, _ProtocolMeta) and other._is_protocol): break else: return NotImplemented return True if '__subclasshook__' not in cls.__dict__: cls.__subclasshook__ = _proto_hook def __instancecheck__(self, instance): # We need this method for situations where attributes are # assigned in __init__. if ((not getattr(self, '_is_protocol', False) or _is_callable_members_only(self)) and issubclass(instance.__class__, self)): return True if self._is_protocol: if all(hasattr(instance, attr) and (not callable(getattr(self, attr, None)) or getattr(instance, attr) is not None) for attr in _get_protocol_attrs(self)): return True return super(GenericMeta, self).__instancecheck__(instance) def __subclasscheck__(self, cls): if self.__origin__ is not None: if sys._getframe(1).f_globals['__name__'] not in ['abc', 'functools']: raise TypeError("Parameterized generics cannot be used with class " "or instance checks") return False if (self.__dict__.get('_is_protocol', None) and not self.__dict__.get('_is_runtime_protocol', None)): if sys._getframe(1).f_globals['__name__'] in ['abc', 'functools', 'typing']: return False raise TypeError("Instance and class checks can only be used with" " @runtime protocols") if (self.__dict__.get('_is_runtime_protocol', None) and not _is_callable_members_only(self)): if sys._getframe(1).f_globals['__name__'] in ['abc', 'functools', 'typing']: return super(GenericMeta, self).__subclasscheck__(cls) raise TypeError("Protocols with non-method members" " don't support issubclass()") return super(GenericMeta, self).__subclasscheck__(cls) @typing._tp_cache def __getitem__(self, params): # We also need to copy this from GenericMeta.__getitem__ to get # special treatment of "Protocol". (Comments removed for brevity.) if not isinstance(params, tuple): params = (params,) if not params and _gorg(self) is not typing.Tuple: raise TypeError( f"Parameter list to {self.__qualname__}[...] cannot be empty") msg = "Parameters to generic types must be types." params = tuple(_type_check(p, msg) for p in params) if self in (typing.Generic, Protocol): if not all(isinstance(p, typing.TypeVar) for p in params): raise TypeError( f"Parameters to {repr(self)}[...] must all be type variables") if len(set(params)) != len(params): raise TypeError( f"Parameters to {repr(self)}[...] must all be unique") tvars = params args = params elif self in (typing.Tuple, typing.Callable): tvars = _type_vars(params) args = params elif self.__origin__ in (typing.Generic, Protocol): raise TypeError(f"Cannot subscript already-subscripted {repr(self)}") else: _check_generic(self, params) tvars = _type_vars(params) args = params prepend = (self,) if self.__origin__ is None else () return self.__class__(self.__name__, prepend + self.__bases__, _no_slots_copy(self.__dict__), tvars=tvars, args=args, origin=self, extra=self.__extra__, orig_bases=self.__orig_bases__) class Protocol(metaclass=_ProtocolMeta): """Base class for protocol classes. Protocol classes are defined as:: class Proto(Protocol): def meth(self) -> int: ... Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example:: class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check See PEP 544 for details. Protocol classes decorated with @typing_extensions.runtime act as simple-minded runtime protocol that checks only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:: class GenProto(Protocol[T]): def meth(self) -> T: ... """ __slots__ = () _is_protocol = True def __new__(cls, *args, **kwds): if _gorg(cls) is Protocol: raise TypeError("Type Protocol cannot be instantiated; " "it can be used only as a base class") return typing._generic_new(cls.__next_in_mro__, cls, *args, **kwds) # 3.8+ if hasattr(typing, 'runtime_checkable'): runtime_checkable = typing.runtime_checkable # 3.6-3.7 else: def runtime_checkable(cls): """Mark a protocol class as a runtime protocol, so that it can be used with isinstance() and issubclass(). Raise TypeError if applied to a non-protocol class. This allows a simple-minded structural check very similar to the one-offs in collections.abc such as Hashable. """ if not isinstance(cls, _ProtocolMeta) or not cls._is_protocol: raise TypeError('@runtime_checkable can be only applied to protocol classes,' f' got {cls!r}') cls._is_runtime_protocol = True return cls # Exists for backwards compatibility. runtime = runtime_checkable # 3.8+ if hasattr(typing, 'SupportsIndex'): SupportsIndex = typing.SupportsIndex # 3.6-3.7 else: @runtime_checkable class SupportsIndex(Protocol): __slots__ = () @abc.abstractmethod def __index__(self) -> int: pass if sys.version_info >= (3, 9, 2): # The standard library TypedDict in Python 3.8 does not store runtime information # about which (if any) keys are optional. See https://bugs.python.org/issue38834 # The standard library TypedDict in Python 3.9.0/1 does not honour the "total" # keyword with old-style TypedDict(). See https://bugs.python.org/issue42059 TypedDict = typing.TypedDict else: def _check_fails(cls, other): try: if sys._getframe(1).f_globals['__name__'] not in ['abc', 'functools', 'typing']: # Typed dicts are only for static structural subtyping. raise TypeError('TypedDict does not support instance and class checks') except (AttributeError, ValueError): pass return False def _dict_new(*args, **kwargs): if not args: raise TypeError('TypedDict.__new__(): not enough arguments') _, args = args[0], args[1:] # allow the "cls" keyword be passed return dict(*args, **kwargs) _dict_new.__text_signature__ = '($cls, _typename, _fields=None, /, **kwargs)' def _typeddict_new(*args, total=True, **kwargs): if not args: raise TypeError('TypedDict.__new__(): not enough arguments') _, args = args[0], args[1:] # allow the "cls" keyword be passed if args: typename, args = args[0], args[1:] # allow the "_typename" keyword be passed elif '_typename' in kwargs: typename = kwargs.pop('_typename') import warnings warnings.warn("Passing '_typename' as keyword argument is deprecated", DeprecationWarning, stacklevel=2) else: raise TypeError("TypedDict.__new__() missing 1 required positional " "argument: '_typename'") if args: try: fields, = args # allow the "_fields" keyword be passed except ValueError: raise TypeError('TypedDict.__new__() takes from 2 to 3 ' f'positional arguments but {len(args) + 2} ' 'were given') elif '_fields' in kwargs and len(kwargs) == 1: fields = kwargs.pop('_fields') import warnings warnings.warn("Passing '_fields' as keyword argument is deprecated", DeprecationWarning, stacklevel=2) else: fields = None if fields is None: fields = kwargs elif kwargs: raise TypeError("TypedDict takes either a dict or keyword arguments," " but not both") ns = {'__annotations__': dict(fields)} try: # Setting correct module is necessary to make typed dict classes pickleable. ns['__module__'] = sys._getframe(1).f_globals.get('__name__', '__main__') except (AttributeError, ValueError): pass return _TypedDictMeta(typename, (), ns, total=total) _typeddict_new.__text_signature__ = ('($cls, _typename, _fields=None,' ' /, *, total=True, **kwargs)') class _TypedDictMeta(type): def __init__(cls, name, bases, ns, total=True): super().__init__(name, bases, ns) def __new__(cls, name, bases, ns, total=True): # Create new typed dict class object. # This method is called directly when TypedDict is subclassed, # or via _typeddict_new when TypedDict is instantiated. This way # TypedDict supports all three syntaxes described in its docstring. # Subclasses and instances of TypedDict return actual dictionaries # via _dict_new. ns['__new__'] = _typeddict_new if name == 'TypedDict' else _dict_new tp_dict = super().__new__(cls, name, (dict,), ns) annotations = {} own_annotations = ns.get('__annotations__', {}) own_annotation_keys = set(own_annotations.keys()) msg = "TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a type" own_annotations = { n: typing._type_check(tp, msg) for n, tp in own_annotations.items() } required_keys = set() optional_keys = set() for base in bases: annotations.update(base.__dict__.get('__annotations__', {})) required_keys.update(base.__dict__.get('__required_keys__', ())) optional_keys.update(base.__dict__.get('__optional_keys__', ())) annotations.update(own_annotations) if total: required_keys.update(own_annotation_keys) else: optional_keys.update(own_annotation_keys) tp_dict.__annotations__ = annotations tp_dict.__required_keys__ = frozenset(required_keys) tp_dict.__optional_keys__ = frozenset(optional_keys) if not hasattr(tp_dict, '__total__'): tp_dict.__total__ = total return tp_dict __instancecheck__ = __subclasscheck__ = _check_fails TypedDict = _TypedDictMeta('TypedDict', (dict,), {}) TypedDict.__module__ = __name__ TypedDict.__doc__ = \ """A simple typed name space. At runtime it is equivalent to a plain dict. TypedDict creates a dictionary type that expects all of its instances to have a certain set of keys, with each key associated with a value of a consistent type. This expectation is not checked at runtime but is only enforced by type checkers. Usage:: class Point2D(TypedDict): x: int y: int label: str a: Point2D = {'x': 1, 'y': 2, 'label': 'good'} # OK b: Point2D = {'z': 3, 'label': 'bad'} # Fails type check assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first') The type info can be accessed via the Point2D.__annotations__ dict, and the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets. TypedDict supports two additional equivalent forms:: Point2D = TypedDict('Point2D', x=int, y=int, label=str) Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str}) The class syntax is only supported in Python 3.6+, while two other syntax forms work for Python 2.7 and 3.2+ """ # Python 3.9+ has PEP 593 (Annotated and modified get_type_hints) if hasattr(typing, 'Annotated'): Annotated = typing.Annotated get_type_hints = typing.get_type_hints # Not exported and not a public API, but needed for get_origin() and get_args() # to work. _AnnotatedAlias = typing._AnnotatedAlias # 3.7-3.8 elif PEP_560: class _AnnotatedAlias(typing._GenericAlias, _root=True): """Runtime representation of an annotated type. At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't' with extra annotations. The alias behaves like a normal typing alias, instantiating is the same as instantiating the underlying type, binding it to types is also the same. """ def __init__(self, origin, metadata): if isinstance(origin, _AnnotatedAlias): metadata = origin.__metadata__ + metadata origin = origin.__origin__ super().__init__(origin, origin) self.__metadata__ = metadata def copy_with(self, params): assert len(params) == 1 new_type = params[0] return _AnnotatedAlias(new_type, self.__metadata__) def __repr__(self): return (f"typing_extensions.Annotated[{typing._type_repr(self.__origin__)}, " f"{', '.join(repr(a) for a in self.__metadata__)}]") def __reduce__(self): return operator.getitem, ( Annotated, (self.__origin__,) + self.__metadata__ ) def __eq__(self, other): if not isinstance(other, _AnnotatedAlias): return NotImplemented if self.__origin__ != other.__origin__: return False return self.__metadata__ == other.__metadata__ def __hash__(self): return hash((self.__origin__, self.__metadata__)) class Annotated: """Add context specific metadata to a type. Example: Annotated[int, runtime_check.Unsigned] indicates to the hypothetical runtime_check module that this type is an unsigned int. Every other consumer of this type can ignore this metadata and treat this type as int. The first argument to Annotated must be a valid type (and will be in the __origin__ field), the remaining arguments are kept as a tuple in the __extra__ field. Details: - It's an error to call `Annotated` with less than two arguments. - Nested Annotated are flattened:: Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3] - Instantiating an annotated type is equivalent to instantiating the underlying type:: Annotated[C, Ann1](5) == C(5) - Annotated can be used as a generic type alias:: Optimized = Annotated[T, runtime.Optimize()] Optimized[int] == Annotated[int, runtime.Optimize()] OptimizedList = Annotated[List[T], runtime.Optimize()] OptimizedList[int] == Annotated[List[int], runtime.Optimize()] """ __slots__ = () def __new__(cls, *args, **kwargs): raise TypeError("Type Annotated cannot be instantiated.") @typing._tp_cache def __class_getitem__(cls, params): if not isinstance(params, tuple) or len(params) < 2: raise TypeError("Annotated[...] should be used " "with at least two arguments (a type and an " "annotation).") msg = "Annotated[t, ...]: t must be a type." origin = typing._type_check(params[0], msg) metadata = tuple(params[1:]) return _AnnotatedAlias(origin, metadata) def __init_subclass__(cls, *args, **kwargs): raise TypeError( f"Cannot subclass {cls.__module__}.Annotated" ) def _strip_annotations(t): """Strips the annotations from a given type. """ if isinstance(t, _AnnotatedAlias): return _strip_annotations(t.__origin__) if isinstance(t, typing._GenericAlias): stripped_args = tuple(_strip_annotations(a) for a in t.__args__) if stripped_args == t.__args__: return t res = t.copy_with(stripped_args) res._special = t._special return res return t def get_type_hints(obj, globalns=None, localns=None, include_extras=False): """Return type hints for an object. This is often the same as obj.__annotations__, but it handles forward references encoded as string literals, adds Optional[t] if a default value equal to None is set and recursively replaces all 'Annotated[T, ...]' with 'T' (unless 'include_extras=True'). The argument may be a module, class, method, or function. The annotations are returned as a dictionary. For classes, annotations include also inherited members. TypeError is raised if the argument is not of a type that can contain annotations, and an empty dictionary is returned if no annotations are present. BEWARE -- the behavior of globalns and localns is counterintuitive (unless you are familiar with how eval() and exec() work). The search order is locals first, then globals. - If no dict arguments are passed, an attempt is made to use the globals from obj (or the respective module's globals for classes), and these are also used as the locals. If the object does not appear to have globals, an empty dictionary is used. - If one dict argument is passed, it is used for both globals and locals. - If two dict arguments are passed, they specify globals and locals, respectively. """ hint = typing.get_type_hints(obj, globalns=globalns, localns=localns) if include_extras: return hint return {k: _strip_annotations(t) for k, t in hint.items()} # 3.6 else: def _is_dunder(name): """Returns True if name is a __dunder_variable_name__.""" return len(name) > 4 and name.startswith('__') and name.endswith('__') # Prior to Python 3.7 types did not have `copy_with`. A lot of the equality # checks, argument expansion etc. are done on the _subs_tre. As a result we # can't provide a get_type_hints function that strips out annotations. class AnnotatedMeta(typing.GenericMeta): """Metaclass for Annotated""" def __new__(cls, name, bases, namespace, **kwargs): if any(b is not object for b in bases): raise TypeError("Cannot subclass " + str(Annotated)) return super().__new__(cls, name, bases, namespace, **kwargs) @property def __metadata__(self): return self._subs_tree()[2] def _tree_repr(self, tree): cls, origin, metadata = tree if not isinstance(origin, tuple): tp_repr = typing._type_repr(origin) else: tp_repr = origin[0]._tree_repr(origin) metadata_reprs = ", ".join(repr(arg) for arg in metadata) return f'{cls}[{tp_repr}, {metadata_reprs}]' def _subs_tree(self, tvars=None, args=None): # noqa if self is Annotated: return Annotated res = super()._subs_tree(tvars=tvars, args=args) # Flatten nested Annotated if isinstance(res[1], tuple) and res[1][0] is Annotated: sub_tp = res[1][1] sub_annot = res[1][2] return (Annotated, sub_tp, sub_annot + res[2]) return res def _get_cons(self): """Return the class used to create instance of this type.""" if self.__origin__ is None: raise TypeError("Cannot get the underlying type of a " "non-specialized Annotated type.") tree = self._subs_tree() while isinstance(tree, tuple) and tree[0] is Annotated: tree = tree[1] if isinstance(tree, tuple): return tree[0] else: return tree @typing._tp_cache def __getitem__(self, params): if not isinstance(params, tuple): params = (params,) if self.__origin__ is not None: # specializing an instantiated type return super().__getitem__(params) elif not isinstance(params, tuple) or len(params) < 2: raise TypeError("Annotated[...] should be instantiated " "with at least two arguments (a type and an " "annotation).") else: msg = "Annotated[t, ...]: t must be a type." tp = typing._type_check(params[0], msg) metadata = tuple(params[1:]) return self.__class__( self.__name__, self.__bases__, _no_slots_copy(self.__dict__), tvars=_type_vars((tp,)), # Metadata is a tuple so it won't be touched by _replace_args et al. args=(tp, metadata), origin=self, ) def __call__(self, *args, **kwargs): cons = self._get_cons() result = cons(*args, **kwargs) try: result.__orig_class__ = self except AttributeError: pass return result def __getattr__(self, attr): # For simplicity we just don't relay all dunder names if self.__origin__ is not None and not _is_dunder(attr): return getattr(self._get_cons(), attr) raise AttributeError(attr) def __setattr__(self, attr, value): if _is_dunder(attr) or attr.startswith('_abc_'): super().__setattr__(attr, value) elif self.__origin__ is None: raise AttributeError(attr) else: setattr(self._get_cons(), attr, value) def __instancecheck__(self, obj): raise TypeError("Annotated cannot be used with isinstance().") def __subclasscheck__(self, cls): raise TypeError("Annotated cannot be used with issubclass().") class Annotated(metaclass=AnnotatedMeta): """Add context specific metadata to a type. Example: Annotated[int, runtime_check.Unsigned] indicates to the hypothetical runtime_check module that this type is an unsigned int. Every other consumer of this type can ignore this metadata and treat this type as int. The first argument to Annotated must be a valid type, the remaining arguments are kept as a tuple in the __metadata__ field. Details: - It's an error to call `Annotated` with less than two arguments. - Nested Annotated are flattened:: Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3] - Instantiating an annotated type is equivalent to instantiating the underlying type:: Annotated[C, Ann1](5) == C(5) - Annotated can be used as a generic type alias:: Optimized = Annotated[T, runtime.Optimize()] Optimized[int] == Annotated[int, runtime.Optimize()] OptimizedList = Annotated[List[T], runtime.Optimize()] OptimizedList[int] == Annotated[List[int], runtime.Optimize()] """ # Python 3.8 has get_origin() and get_args() but those implementations aren't # Annotated-aware, so we can't use those. Python 3.9's versions don't support # ParamSpecArgs and ParamSpecKwargs, so only Python 3.10's versions will do. if sys.version_info[:2] >= (3, 10): get_origin = typing.get_origin get_args = typing.get_args # 3.7-3.9 elif PEP_560: try: # 3.9+ from typing import _BaseGenericAlias except ImportError: _BaseGenericAlias = typing._GenericAlias try: # 3.9+ from typing import GenericAlias except ImportError: GenericAlias = typing._GenericAlias def get_origin(tp): """Get the unsubscripted version of a type. This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar and Annotated. Return None for unsupported types. Examples:: get_origin(Literal[42]) is Literal get_origin(int) is None get_origin(ClassVar[int]) is ClassVar get_origin(Generic) is Generic get_origin(Generic[T]) is Generic get_origin(Union[T, int]) is Union get_origin(List[Tuple[T, T]][int]) == list get_origin(P.args) is P """ if isinstance(tp, _AnnotatedAlias): return Annotated if isinstance(tp, (typing._GenericAlias, GenericAlias, _BaseGenericAlias, ParamSpecArgs, ParamSpecKwargs)): return tp.__origin__ if tp is typing.Generic: return typing.Generic return None def get_args(tp): """Get type arguments with all substitutions performed. For unions, basic simplifications used by Union constructor are performed. Examples:: get_args(Dict[str, int]) == (str, int) get_args(int) == () get_args(Union[int, Union[T, int], str][int]) == (int, str) get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int]) get_args(Callable[[], T][int]) == ([], int) """ if isinstance(tp, _AnnotatedAlias): return (tp.__origin__,) + tp.__metadata__ if isinstance(tp, (typing._GenericAlias, GenericAlias)): if getattr(tp, "_special", False): return () res = tp.__args__ if get_origin(tp) is collections.abc.Callable and res[0] is not Ellipsis: res = (list(res[:-1]), res[-1]) return res return () # 3.10+ if hasattr(typing, 'TypeAlias'): TypeAlias = typing.TypeAlias # 3.9 elif sys.version_info[:2] >= (3, 9): class _TypeAliasForm(typing._SpecialForm, _root=True): def __repr__(self): return 'typing_extensions.' + self._name @_TypeAliasForm def TypeAlias(self, parameters): """Special marker indicating that an assignment should be recognized as a proper type alias definition by type checkers. For example:: Predicate: TypeAlias = Callable[..., bool] It's invalid when used anywhere except as in the example above. """ raise TypeError(f"{self} is not subscriptable") # 3.7-3.8 elif sys.version_info[:2] >= (3, 7): class _TypeAliasForm(typing._SpecialForm, _root=True): def __repr__(self): return 'typing_extensions.' + self._name TypeAlias = _TypeAliasForm('TypeAlias', doc="""Special marker indicating that an assignment should be recognized as a proper type alias definition by type checkers. For example:: Predicate: TypeAlias = Callable[..., bool] It's invalid when used anywhere except as in the example above.""") # 3.6 else: class _TypeAliasMeta(typing.TypingMeta): """Metaclass for TypeAlias""" def __repr__(self): return 'typing_extensions.TypeAlias' class _TypeAliasBase(typing._FinalTypingBase, metaclass=_TypeAliasMeta, _root=True): """Special marker indicating that an assignment should be recognized as a proper type alias definition by type checkers. For example:: Predicate: TypeAlias = Callable[..., bool] It's invalid when used anywhere except as in the example above. """ __slots__ = () def __instancecheck__(self, obj): raise TypeError("TypeAlias cannot be used with isinstance().") def __subclasscheck__(self, cls): raise TypeError("TypeAlias cannot be used with issubclass().") def __repr__(self): return 'typing_extensions.TypeAlias' TypeAlias = _TypeAliasBase(_root=True) # Python 3.10+ has PEP 612 if hasattr(typing, 'ParamSpecArgs'): ParamSpecArgs = typing.ParamSpecArgs ParamSpecKwargs = typing.ParamSpecKwargs # 3.6-3.9 else: class _Immutable: """Mixin to indicate that object should not be copied.""" __slots__ = () def __copy__(self): return self def __deepcopy__(self, memo): return self class ParamSpecArgs(_Immutable): """The args for a ParamSpec object. Given a ParamSpec object P, P.args is an instance of ParamSpecArgs. ParamSpecArgs objects have a reference back to their ParamSpec: P.args.__origin__ is P This type is meant for runtime introspection and has no special meaning to static type checkers. """ def __init__(self, origin): self.__origin__ = origin def __repr__(self): return f"{self.__origin__.__name__}.args" class ParamSpecKwargs(_Immutable): """The kwargs for a ParamSpec object. Given a ParamSpec object P, P.kwargs is an instance of ParamSpecKwargs. ParamSpecKwargs objects have a reference back to their ParamSpec: P.kwargs.__origin__ is P This type is meant for runtime introspection and has no special meaning to static type checkers. """ def __init__(self, origin): self.__origin__ = origin def __repr__(self): return f"{self.__origin__.__name__}.kwargs" # 3.10+ if hasattr(typing, 'ParamSpec'): ParamSpec = typing.ParamSpec # 3.6-3.9 else: # Inherits from list as a workaround for Callable checks in Python < 3.9.2. class ParamSpec(list): """Parameter specification variable. Usage:: P = ParamSpec('P') Parameter specification variables exist primarily for the benefit of static type checkers. They are used to forward the parameter types of one callable to another callable, a pattern commonly found in higher order functions and decorators. They are only valid when used in ``Concatenate``, or s the first argument to ``Callable``. In Python 3.10 and higher, they are also supported in user-defined Generics at runtime. See class Generic for more information on generic types. An example for annotating a decorator:: T = TypeVar('T') P = ParamSpec('P') def add_logging(f: Callable[P, T]) -> Callable[P, T]: '''A type-safe decorator to add logging to a function.''' def inner(*args: P.args, **kwargs: P.kwargs) -> T: logging.info(f'{f.__name__} was called') return f(*args, **kwargs) return inner @add_logging def add_two(x: float, y: float) -> float: '''Add two numbers together.''' return x + y Parameter specification variables defined with covariant=True or contravariant=True can be used to declare covariant or contravariant generic types. These keyword arguments are valid, but their actual semantics are yet to be decided. See PEP 612 for details. Parameter specification variables can be introspected. e.g.: P.__name__ == 'T' P.__bound__ == None P.__covariant__ == False P.__contravariant__ == False Note that only parameter specification variables defined in global scope can be pickled. """ # Trick Generic __parameters__. __class__ = typing.TypeVar @property def args(self): return ParamSpecArgs(self) @property def kwargs(self): return ParamSpecKwargs(self) def __init__(self, name, *, bound=None, covariant=False, contravariant=False): super().__init__([self]) self.__name__ = name self.__covariant__ = bool(covariant) self.__contravariant__ = bool(contravariant) if bound: self.__bound__ = typing._type_check(bound, 'Bound must be a type.') else: self.__bound__ = None # for pickling: try: def_mod = sys._getframe(1).f_globals.get('__name__', '__main__') except (AttributeError, ValueError): def_mod = None if def_mod != 'typing_extensions': self.__module__ = def_mod def __repr__(self): if self.__covariant__: prefix = '+' elif self.__contravariant__: prefix = '-' else: prefix = '~' return prefix + self.__name__ def __hash__(self): return object.__hash__(self) def __eq__(self, other): return self is other def __reduce__(self): return self.__name__ # Hack to get typing._type_check to pass. def __call__(self, *args, **kwargs): pass if not PEP_560: # Only needed in 3.6. def _get_type_vars(self, tvars): if self not in tvars: tvars.append(self) # 3.6-3.9 if not hasattr(typing, 'Concatenate'): # Inherits from list as a workaround for Callable checks in Python < 3.9.2. class _ConcatenateGenericAlias(list): # Trick Generic into looking into this for __parameters__. if PEP_560: __class__ = typing._GenericAlias else: __class__ = typing._TypingBase # Flag in 3.8. _special = False # Attribute in 3.6 and earlier. _gorg = typing.Generic def __init__(self, origin, args): super().__init__(args) self.__origin__ = origin self.__args__ = args def __repr__(self): _type_repr = typing._type_repr return (f'{_type_repr(self.__origin__)}' f'[{", ".join(_type_repr(arg) for arg in self.__args__)}]') def __hash__(self): return hash((self.__origin__, self.__args__)) # Hack to get typing._type_check to pass in Generic. def __call__(self, *args, **kwargs): pass @property def __parameters__(self): return tuple( tp for tp in self.__args__ if isinstance(tp, (typing.TypeVar, ParamSpec)) ) if not PEP_560: # Only required in 3.6. def _get_type_vars(self, tvars): if self.__origin__ and self.__parameters__: typing._get_type_vars(self.__parameters__, tvars) # 3.6-3.9 @typing._tp_cache def _concatenate_getitem(self, parameters): if parameters == (): raise TypeError("Cannot take a Concatenate of no types.") if not isinstance(parameters, tuple): parameters = (parameters,) if not isinstance(parameters[-1], ParamSpec): raise TypeError("The last parameter to Concatenate should be a " "ParamSpec variable.") msg = "Concatenate[arg, ...]: each arg must be a type." parameters = tuple(typing._type_check(p, msg) for p in parameters) return _ConcatenateGenericAlias(self, parameters) # 3.10+ if hasattr(typing, 'Concatenate'): Concatenate = typing.Concatenate _ConcatenateGenericAlias = typing._ConcatenateGenericAlias # noqa # 3.9 elif sys.version_info[:2] >= (3, 9): @_TypeAliasForm def Concatenate(self, parameters): """Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a higher order function which adds, removes or transforms parameters of a callable. For example:: Callable[Concatenate[int, P], int] See PEP 612 for detailed information. """ return _concatenate_getitem(self, parameters) # 3.7-8 elif sys.version_info[:2] >= (3, 7): class _ConcatenateForm(typing._SpecialForm, _root=True): def __repr__(self): return 'typing_extensions.' + self._name def __getitem__(self, parameters): return _concatenate_getitem(self, parameters) Concatenate = _ConcatenateForm( 'Concatenate', doc="""Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a higher order function which adds, removes or transforms parameters of a callable. For example:: Callable[Concatenate[int, P], int] See PEP 612 for detailed information. """) # 3.6 else: class _ConcatenateAliasMeta(typing.TypingMeta): """Metaclass for Concatenate.""" def __repr__(self): return 'typing_extensions.Concatenate' class _ConcatenateAliasBase(typing._FinalTypingBase, metaclass=_ConcatenateAliasMeta, _root=True): """Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a higher order function which adds, removes or transforms parameters of a callable. For example:: Callable[Concatenate[int, P], int] See PEP 612 for detailed information. """ __slots__ = () def __instancecheck__(self, obj): raise TypeError("Concatenate cannot be used with isinstance().") def __subclasscheck__(self, cls): raise TypeError("Concatenate cannot be used with issubclass().") def __repr__(self): return 'typing_extensions.Concatenate' def __getitem__(self, parameters): return _concatenate_getitem(self, parameters) Concatenate = _ConcatenateAliasBase(_root=True) # 3.10+ if hasattr(typing, 'TypeGuard'): TypeGuard = typing.TypeGuard # 3.9 elif sys.version_info[:2] >= (3, 9): class _TypeGuardForm(typing._SpecialForm, _root=True): def __repr__(self): return 'typing_extensions.' + self._name @_TypeGuardForm def TypeGuard(self, parameters): """Special typing form used to annotate the return type of a user-defined type guard function. ``TypeGuard`` only accepts a single type argument. At runtime, functions marked this way should return a boolean. ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static type checkers to determine a more precise type of an expression within a program's code flow. Usually type narrowing is done by analyzing conditional code flow and applying the narrowing to a block of code. The conditional expression here is sometimes referred to as a "type guard". Sometimes it would be convenient to use a user-defined boolean function as a type guard. Such a function should use ``TypeGuard[...]`` as its return type to alert static type checkers to this intention. Using ``-> TypeGuard`` tells the static type checker that for a given function: 1. The return value is a boolean. 2. If the return value is ``True``, the type of its argument is the type inside ``TypeGuard``. For example:: def is_str(val: Union[str, float]): # "isinstance" type guard if isinstance(val, str): # Type of ``val`` is narrowed to ``str`` ... else: # Else, type of ``val`` is narrowed to ``float``. ... Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower form of ``TypeA`` (it can even be a wider form) and this may lead to type-unsafe results. The main reason is to allow for things like narrowing ``List[object]`` to ``List[str]`` even though the latter is not a subtype of the former, since ``List`` is invariant. The responsibility of writing type-safe type guards is left to the user. ``TypeGuard`` also works with type variables. For more information, see PEP 647 (User-Defined Type Guards). """ item = typing._type_check(parameters, f'{self} accepts only single type.') return typing._GenericAlias(self, (item,)) # 3.7-3.8 elif sys.version_info[:2] >= (3, 7): class _TypeGuardForm(typing._SpecialForm, _root=True): def __repr__(self): return 'typing_extensions.' + self._name def __getitem__(self, parameters): item = typing._type_check(parameters, f'{self._name} accepts only a single type') return typing._GenericAlias(self, (item,)) TypeGuard = _TypeGuardForm( 'TypeGuard', doc="""Special typing form used to annotate the return type of a user-defined type guard function. ``TypeGuard`` only accepts a single type argument. At runtime, functions marked this way should return a boolean. ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static type checkers to determine a more precise type of an expression within a program's code flow. Usually type narrowing is done by analyzing conditional code flow and applying the narrowing to a block of code. The conditional expression here is sometimes referred to as a "type guard". Sometimes it would be convenient to use a user-defined boolean function as a type guard. Such a function should use ``TypeGuard[...]`` as its return type to alert static type checkers to this intention. Using ``-> TypeGuard`` tells the static type checker that for a given function: 1. The return value is a boolean. 2. If the return value is ``True``, the type of its argument is the type inside ``TypeGuard``. For example:: def is_str(val: Union[str, float]): # "isinstance" type guard if isinstance(val, str): # Type of ``val`` is narrowed to ``str`` ... else: # Else, type of ``val`` is narrowed to ``float``. ... Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower form of ``TypeA`` (it can even be a wider form) and this may lead to type-unsafe results. The main reason is to allow for things like narrowing ``List[object]`` to ``List[str]`` even though the latter is not a subtype of the former, since ``List`` is invariant. The responsibility of writing type-safe type guards is left to the user. ``TypeGuard`` also works with type variables. For more information, see PEP 647 (User-Defined Type Guards). """) # 3.6 else: class _TypeGuard(typing._FinalTypingBase, _root=True): """Special typing form used to annotate the return type of a user-defined type guard function. ``TypeGuard`` only accepts a single type argument. At runtime, functions marked this way should return a boolean. ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static type checkers to determine a more precise type of an expression within a program's code flow. Usually type narrowing is done by analyzing conditional code flow and applying the narrowing to a block of code. The conditional expression here is sometimes referred to as a "type guard". Sometimes it would be convenient to use a user-defined boolean function as a type guard. Such a function should use ``TypeGuard[...]`` as its return type to alert static type checkers to this intention. Using ``-> TypeGuard`` tells the static type checker that for a given function: 1. The return value is a boolean. 2. If the return value is ``True``, the type of its argument is the type inside ``TypeGuard``. For example:: def is_str(val: Union[str, float]): # "isinstance" type guard if isinstance(val, str): # Type of ``val`` is narrowed to ``str`` ... else: # Else, type of ``val`` is narrowed to ``float``. ... Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower form of ``TypeA`` (it can even be a wider form) and this may lead to type-unsafe results. The main reason is to allow for things like narrowing ``List[object]`` to ``List[str]`` even though the latter is not a subtype of the former, since ``List`` is invariant. The responsibility of writing type-safe type guards is left to the user. ``TypeGuard`` also works with type variables. For more information, see PEP 647 (User-Defined Type Guards). """ __slots__ = ('__type__',) def __init__(self, tp=None, **kwds): self.__type__ = tp def __getitem__(self, item): cls = type(self) if self.__type__ is None: return cls(typing._type_check(item, f'{cls.__name__[1:]} accepts only a single type.'), _root=True) raise TypeError(f'{cls.__name__[1:]} cannot be further subscripted') def _eval_type(self, globalns, localns): new_tp = typing._eval_type(self.__type__, globalns, localns) if new_tp == self.__type__: return self return type(self)(new_tp, _root=True) def __repr__(self): r = super().__repr__() if self.__type__ is not None: r += f'[{typing._type_repr(self.__type__)}]' return r def __hash__(self): return hash((type(self).__name__, self.__type__)) def __eq__(self, other): if not isinstance(other, _TypeGuard): return NotImplemented if self.__type__ is not None: return self.__type__ == other.__type__ return self is other TypeGuard = _TypeGuard(_root=True) if hasattr(typing, "Self"): Self = typing.Self elif sys.version_info[:2] >= (3, 7): # Vendored from cpython typing._SpecialFrom class _SpecialForm(typing._Final, _root=True): __slots__ = ('_name', '__doc__', '_getitem') def __init__(self, getitem): self._getitem = getitem self._name = getitem.__name__ self.__doc__ = getitem.__doc__ def __getattr__(self, item): if item in {'__name__', '__qualname__'}: return self._name raise AttributeError(item) def __mro_entries__(self, bases): raise TypeError(f"Cannot subclass {self!r}") def __repr__(self): return f'typing_extensions.{self._name}' def __reduce__(self): return self._name def __call__(self, *args, **kwds): raise TypeError(f"Cannot instantiate {self!r}") def __or__(self, other): return typing.Union[self, other] def __ror__(self, other): return typing.Union[other, self] def __instancecheck__(self, obj): raise TypeError(f"{self} cannot be used with isinstance()") def __subclasscheck__(self, cls): raise TypeError(f"{self} cannot be used with issubclass()") @typing._tp_cache def __getitem__(self, parameters): return self._getitem(self, parameters) @_SpecialForm def Self(self, params): """Used to spell the type of "self" in classes. Example:: from typing import Self class ReturnsSelf: def parse(self, data: bytes) -> Self: ... return self """ raise TypeError(f"{self} is not subscriptable") else: class _Self(typing._FinalTypingBase, _root=True): """Used to spell the type of "self" in classes. Example:: from typing import Self class ReturnsSelf: def parse(self, data: bytes) -> Self: ... return self """ __slots__ = () def __instancecheck__(self, obj): raise TypeError(f"{self} cannot be used with isinstance().") def __subclasscheck__(self, cls): raise TypeError(f"{self} cannot be used with issubclass().") Self = _Self(_root=True) if hasattr(typing, 'Required'): Required = typing.Required NotRequired = typing.NotRequired elif sys.version_info[:2] >= (3, 9): class _ExtensionsSpecialForm(typing._SpecialForm, _root=True): def __repr__(self): return 'typing_extensions.' + self._name @_ExtensionsSpecialForm def Required(self, parameters): """A special typing construct to mark a key of a total=False TypedDict as required. For example: class Movie(TypedDict, total=False): title: Required[str] year: int m = Movie( title='The Matrix', # typechecker error if key is omitted year=1999, ) There is no runtime checking that a required key is actually provided when instantiating a related TypedDict. """ item = typing._type_check(parameters, f'{self._name} accepts only single type') return typing._GenericAlias(self, (item,)) @_ExtensionsSpecialForm def NotRequired(self, parameters): """A special typing construct to mark a key of a TypedDict as potentially missing. For example: class Movie(TypedDict): title: str year: NotRequired[int] m = Movie( title='The Matrix', # typechecker error if key is omitted year=1999, ) """ item = typing._type_check(parameters, f'{self._name} accepts only single type') return typing._GenericAlias(self, (item,)) elif sys.version_info[:2] >= (3, 7): class _RequiredForm(typing._SpecialForm, _root=True): def __repr__(self): return 'typing_extensions.' + self._name def __getitem__(self, parameters): item = typing._type_check(parameters, '{} accepts only single type'.format(self._name)) return typing._GenericAlias(self, (item,)) Required = _RequiredForm( 'Required', doc="""A special typing construct to mark a key of a total=False TypedDict as required. For example: class Movie(TypedDict, total=False): title: Required[str] year: int m = Movie( title='The Matrix', # typechecker error if key is omitted year=1999, ) There is no runtime checking that a required key is actually provided when instantiating a related TypedDict. """) NotRequired = _RequiredForm( 'NotRequired', doc="""A special typing construct to mark a key of a TypedDict as potentially missing. For example: class Movie(TypedDict): title: str year: NotRequired[int] m = Movie( title='The Matrix', # typechecker error if key is omitted year=1999, ) """) else: # NOTE: Modeled after _Final's implementation when _FinalTypingBase available class _MaybeRequired(typing._FinalTypingBase, _root=True): __slots__ = ('__type__',) def __init__(self, tp=None, **kwds): self.__type__ = tp def __getitem__(self, item): cls = type(self) if self.__type__ is None: return cls(typing._type_check(item, '{} accepts only single type.'.format(cls.__name__[1:])), _root=True) raise TypeError('{} cannot be further subscripted' .format(cls.__name__[1:])) def _eval_type(self, globalns, localns): new_tp = typing._eval_type(self.__type__, globalns, localns) if new_tp == self.__type__: return self return type(self)(new_tp, _root=True) def __repr__(self): r = super().__repr__() if self.__type__ is not None: r += '[{}]'.format(typing._type_repr(self.__type__)) return r def __hash__(self): return hash((type(self).__name__, self.__type__)) def __eq__(self, other): if not isinstance(other, type(self)): return NotImplemented if self.__type__ is not None: return self.__type__ == other.__type__ return self is other class _Required(_MaybeRequired, _root=True): """A special typing construct to mark a key of a total=False TypedDict as required. For example: class Movie(TypedDict, total=False): title: Required[str] year: int m = Movie( title='The Matrix', # typechecker error if key is omitted year=1999, ) There is no runtime checking that a required key is actually provided when instantiating a related TypedDict. """ class _NotRequired(_MaybeRequired, _root=True): """A special typing construct to mark a key of a TypedDict as potentially missing. For example: class Movie(TypedDict): title: str year: NotRequired[int] m = Movie( title='The Matrix', # typechecker error if key is omitted year=1999, ) """ Required = _Required(_root=True) NotRequired = _NotRequired(_root=True) PK{5Zl??HLib/site-packages/setuptools/extern/__pycache__/__init__.cpython-311.pycnuW+A b;d rddlZddlZGddZdZeeeddS)NcVeZdZdZd dZedZdZdZdZ d Z d d Z d Z dS)VendorImporterz A PEP 302 meta path importer for finding optionally-vendored or otherwise naturally-installed packages from root_name. Ncv||_t||_|p|dd|_dS)Nextern_vendor) root_namesetvendored_namesreplace vendor_pkg)selfr r r s iE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/extern/__init__.py__init__zVendorImporter.__init__ s9"!.11$N (9(9(I(N(Nc#*K|jdzVdVdS)zL Search first the vendor package then as a natural package. .N)r rs r search_pathzVendorImporter.search_paths( o####rc||jdz\}}}| o&tt|j|jS)z,Figure out if the target module is vendored.r) partitionr anymap startswithr )rfullnamerootbasetargets r_module_matches_namespacez(VendorImporter._module_matches_namespacesH%//0DEEdFxLCF$5t7J K KLLLrc6||jdz\}}}|jD]K} ||z}t|tj|}|tj|<|cS#t $rYHwxYwt djdit)zK Iterate over the search path to locate and load fullname. rzThe '{target}' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.Nr) rr r __import__sysmodules ImportErrorformatlocals)rrrrrprefixextantmods r load_modulezVendorImporter.load_modules&//0DEEdF&  F &6"""k&)(+ H%     ' !'33*033 s6A%% A21A2c6||jSN)r+name)rspecs r create_modulezVendorImporter.create_module3s ***rcdSr-r)rmodules r exec_modulezVendorImporter.exec_module6s rcp||r tj||ndS)z(Return a module spec for vendored names.N)r importlibutilspec_from_loader)rrpathrs r find_speczVendorImporter.find_spec9s:--h77 BIN + +Hd ; ; ;=A rcd|tjvr!tj|dSdS)zR Install this importer into sys.meta_path if not already present. N)r# meta_pathappendrs rinstallzVendorImporter.install@s5 s} $ $ M  & & & & & % $r)rN)NN) __name__ __module__ __qualname____doc__rpropertyrr r+r0r3r9r=rrrrrs OOOO XMMM ,+++       '''''rr) packaging pyparsing ordered_setmore_itertoolsimportlib_metadatazippimportlib_resourcesjaracotyping_extensionstomlizsetuptools._vendor)importlib.utilr5r#rnamesr>r=rrrrOs{ @'@'@'@'@'@'@'@'F x 455==?????rPK{5ZM8 /Lib/site-packages/setuptools/extern/__init__.pynuW+Aimport importlib.util import sys class VendorImporter: """ A PEP 302 meta path importer for finding optionally-vendored or otherwise naturally-installed packages from root_name. """ def __init__(self, root_name, vendored_names=(), vendor_pkg=None): self.root_name = root_name self.vendored_names = set(vendored_names) self.vendor_pkg = vendor_pkg or root_name.replace('extern', '_vendor') @property def search_path(self): """ Search first the vendor package then as a natural package. """ yield self.vendor_pkg + '.' yield '' def _module_matches_namespace(self, fullname): """Figure out if the target module is vendored.""" root, base, target = fullname.partition(self.root_name + '.') return not root and any(map(target.startswith, self.vendored_names)) def load_module(self, fullname): """ Iterate over the search path to locate and load fullname. """ root, base, target = fullname.partition(self.root_name + '.') for prefix in self.search_path: try: extant = prefix + target __import__(extant) mod = sys.modules[extant] sys.modules[fullname] = mod return mod except ImportError: pass else: raise ImportError( "The '{target}' package is required; " "normally this is bundled with this package so if you get " "this warning, consult the packager of your " "distribution.".format(**locals()) ) def create_module(self, spec): return self.load_module(spec.name) def exec_module(self, module): pass def find_spec(self, fullname, path=None, target=None): """Return a module spec for vendored names.""" return ( importlib.util.spec_from_loader(fullname, self) if self._module_matches_namespace(fullname) else None ) def install(self): """ Install this importer into sys.meta_path if not already present. """ if self not in sys.meta_path: sys.meta_path.append(self) names = ( 'packaging', 'pyparsing', 'ordered_set', 'more_itertools', 'importlib_metadata', 'zipp', 'importlib_resources', 'jaraco', 'typing_extensions', 'tomli', ) VendorImporter(__name__, names, 'setuptools._vendor').install() PK{5Z&&'Lib/site-packages/setuptools/gui-64.exenuW+AMZ@ !L!This program cannot be run in DOS mode. $#^g?g?g?@d?g?:?p\c?ymNC?ym_m?ymI ?ym[f?Richg?PEdQ#  l+@p(` .text `.rdata)*@@.data5 @.pdata ` @@H\$Hl$Ht$H|$ ATAUAVH LH3IHэD HyHcP 33Lc"HXL~eA ,\u'"u ~DƲ\Hˋj H+\H3A,HHI;C|~DƲ\Hˋ5 HHl$HHt$PH|$X"CH\$@IH A^A]A\H\$WH`HH3H$PHH HtH/u@\uH$@L$@LD$@HT$0HHD$ O|$0|$@\H$@L$@LD$@HT$0HHD$ H3H|$@HD$@HHHHȀ9\uHɀ9\tHD$@H;r Hɀ9\uLD$@HT$0H$@LHD$  H$@s HAHH HH$PH3H$H`_H\$Hl$Ht$H|$ ATAUAVH HH3LHPHH 3HA} LE3HetDKHPu+H@t[@8tEtI@\u@"u@u3E@2DtLDz\H H3@t@.H뚅tLDz\H H3AEIcEHI4@t& tKHu;GH\$@Hl$HHt$PH|$XIH A^A]A\H(u !t36H(H\$WH33HHL$pDGh3҉$HD$PHD$XHD$`WH D$phL\$PHD$pL\$HHD$@H|$8H|$0E3E3H3ɉ|$(D$ u(HHH`r3H$H_ËD$`HL$P _HL$PH$Du(H,HH`3H$H_Ë$H$H_H\$Hl$Ht$WATAUH LH3IIcH;HHLLQ}J+H^ CL;CL;{;tHL$0HIЅ~sA}csmu(H=tH 5tIKAHIBIF@SMcMHD$(IF(IMHHD$ BH;>sj>3fIy 3I+9.vTH^KL;r>CL;s6H;r H;sAE u/;t H;t#HT$xIDZIDCMAH;.rL\$@I[0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pDuuHxAh Du3L}xLE;<3LMpЋω\$(H\$ HH;tDMpULAΉ\$(H\$ jLcDMD;uD;A~bIIwYHHw4HYH;w HHHYH+H\$@Ht%HHtD0HDMHu3Mc3H{D]DMpUMD\$(LH\$ JiEu3.LMLÉD$(AL|$ }L3L;DHKD91u(g!DMpUD$(AL|$ h3H;tH5L;t M;tI#HMH3!H]PHuXH}`He A_A^A]A\]H\$Ht$WHpHHL$PIA$D$HL$PD\$@D$8$D$0H$LHD$($DNj։D$ O|$ht HL$`L\$pI[IsI_DL$ UATAUAVAWH@Hl$0H]@HuHH}PHH3HED L3MDLwD;u=LMHqDNjg;t=6|fD xDDD D;&D;D;Cuh;uIEp]xDMXMҋΉ\$(H\$ ,gLcD;A~hHL;wYKL$Hw5HAH;w HHVH+H|$0H;HH;t D(HHH;M3HM蜑DMXMƺDd$(H|$ vf;tLM`DHAwfHOD9)u諶DepHD;uIED`uh;uIEpA"u3U;t$LMXMƋЋΉ\$(H\$ PHH;tLHE`DMXMAAHD$ eH;tHHMH3H]@HuHH}PHeA_A^A]A\]H\$Ht$WH`HHL$@AI$D$HL$@D\$8D$0$D$(H$DLNjHD$ .|$Xt HL$PH\$pHt$xH`_ffLH+Irat6t  IȈHtf IfHt  IHMIuQMItH HHIuIMuI@ HIuIffffffffffffI sBH LT H HALQHD LT IHALQuIqffffHr  D @HuH@L LT L LQLL LT LILQLL LT (H@LILQLL LT LILQuIIq $fffffffffffIIrat6t HɊ IȈtHf Ift H IMIuPMItHH IHuIMuIHɊ IȈuIffffffffffffI sBHD LT H HALQHD L IHALuIsfffffHw H D @uH@LL LT LILQLL LT LILQLL LT H@LILQLL L LILuIIq $HSH HHIHKHKHK HK(HK0ٱH ѱHK@ȱHKH迱HKP趱HKX譱HK`褱HKh蛱HK8蒱HKp艱HKx耱HtHhH\HPHDH8H,H HHHHHHذH̰HH贰H訰H蜰H萰H 脰H(xH0lH8`H@THHHHPH iH;t2?Ht(HHtH QH;tHtHHH #HtDMIH3H\$p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 A;PD$D E3H;t E33nH| HT$DAbaA;t uk|$DuD@D$D$D=u %`r=u# E3AD$ E33p;;vqA; E3H; E33Hu8D$DA HcEHTDD+NmD;AHc @$H@HHkXIDd8@l8HcHƒHHkXILƀd8D8@8|$Lu!@tHc HHHkXIDL A%=AHL$X^#D$PDD$HH$H|$0D$(ALL$`D$ AQ#Hu6!pLcIAHMkXIDBd BHcHʃHHkXILH H$HĀA_A^A]A\_^]HĉPL@LH VWHXH`E3HAEu( pHd$ E3E3335oH$HD@d$0DD$(D$ @DLHT$@HL$DvD$H|$Dt9t(Hc|$@HHHLcsHkXId|$@n|$@t so0HX_^@SH0MHHHu&GoHd$ E3E333\nHUHtHL$ LL$XLD$@IHtLL$XLD$@HӹHL$@HfqHL$X\qHH0[H\$LD$UVWATAUAVAWH0E3MLHHI;u(nE3E333Lt$ mHD81tI;tHI;tD80t\v/HHfAI;I;AW9HRHI;H.IHXHnHI;sLl4HHuA;tE3E333Lt$ kLHHA;tE3E333Lt$ kH~ I;tH;vHHHύS/ HI;t&3 A;MIHHlIL`I-nHI;LIHA;tE3E333Lt$ kH"L4lM+D8I?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~=runtime error TLOSS error SING error DOMAIN error R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information. R6033 - Attempt to use MSIL code from this assembly during native code initialization This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain. R6032 - not enough space for locale information R6031 - Attempt to initialize the CRT more than once. This indicates a bug in your application. R6030 - CRT not initialized R6028 - unable to initialize heap R6027 - not enough space for lowio initialization R6026 - not enough space for stdio initialization R6025 - pure virtual function call R6024 - not enough space for _onexit/atexit table R6019 - unable to open console device R6018 - unexpected heap error R6017 - unexpected multithread lock error R6016 - not enough space for thread data This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. R6009 - not enough space for environment R6008 - not enough space for arguments R6002 - floating point support not loaded Microsoft Visual C++ Runtime Library ...Runtime Error! Program:  EEE00P('8PW700PP (`h`hhhxppwpp ((((( H h(((( H H  !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLLSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$.com.exe.bat.cmd.\SystemRoot t d T 42 4 pP  4 p!$!!HI!HIdJ!TR$ Kp00bp`0+Y@ 4R p ` Pr0042 p  4 2p d4rp+'(X2P d4 p+**+*+z+ d T 4 rpt42   20dT42pdT42p) 4dZ p`P  t d 4 +::\=  0 t dT42 d T 42p  20d 4R +BC  t d R+[DD"DDtd42td42+FFd T 4Rpd 4 r p  $d4 pp  4 2p+NkN4r p`P8  t d 4R+R;S20+ W!W-  4 2p+WWFW%Xf42p+YYFYYfdT pd T42p t 4R t d 42+``B B+Gbzbzb B+bbb d4r p+@ff b+Tgcgcg t d T 42d 4 R p t d T 4 rB  4 2p4p ` Pd 4R p  4 RpRP4 R p+vv/ 4qf p`P  d4 Rp+ =.4 R p `+c  4 p dT4p- Etd4C PXd4 p1 5#td43r P8d4 p2 0 d4 Rp+. T4r p ` tdT4d 4 Rp+20PT42 p  td42+KkE t 4 r+m^ŧ~b(' EC p`0Ppbt d 4R+ѭ  T pdT4pT 4 r p$ 53 p`0PX 4R p ` Pd 4  p  p ` P 0 d4 Rp+.! !4!p`PrPp`+R0 t d T 42d42 p4  p P 0#  p`P0xdT 4 p0f2H`x.BVr$0BRbp~0J`z(<Lbr (:LtSGenerateConsoleCtrlEventGetExitCodeProcessrWaitForSingleObjectCreateProcessASetConsoleCtrlHandlerGetModuleFileNameAEnterCriticalSectionLeaveCriticalSectionGetModuleHandleW/Sleep"GetProcAddressExitProcessqGetCommandLineA<GetStartupInfoARtlUnwindExSetHandleCount>GetStdHandleGetFileTypeDeleteCriticalSection;TerminateProcessGetCurrentProcessLUnhandledExceptionFilter#SetUnhandledExceptionFilterIsDebuggerPresentRtlVirtualUnwindRtlLookupFunctionEntryRtlCaptureContextGetLastErrorHeapFreeHeapAlloc]GetCPInfoTGetACPGetOEMCPIsValidCodePageEncodePointerDecodePointer@FlsGetValueAFlsSetValue?FlsFreeSetLastErrorGetCurrentThreadId>FlsAllocWriteFileLoadLibraryAInitializeCriticalSectionAndSpinCountLFreeEnvironmentStringsAGetEnvironmentStringsMFreeEnvironmentStringsWWideCharToMultiByteGetEnvironmentStringsWHeapSetInformationHeapCreateSQueryPerformanceCounterjGetTickCountGetCurrentProcessIdSGetSystemTimeAsFileTimeHeapReAllocGetConsoleCPGetConsoleModeCFlushFileBuffersLCMapStringAMultiByteToWideCharLCMapStringW@GetStringTypeACGetStringTypeWGetLocaleInfoASetFilePointerHeapSizeDCloseHandleWriteConsoleAGetConsoleOutputCPWriteConsoleW SetStdHandlezCreateFileASCompareStringAVCompareStringWSetEnvironmentVariableAKERNEL32.dllhReadFileSetEndOfFile&GetProcessHeapGetFileAttributesAE@E@2-+] f\)@@@         ! 5A CPR S WY l m pr   )     abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(@`y!@~ڣ @ڣ AϢ[@~QQ^ _j21~@C@-@@-@@-@@-@@-@P2@@@@0@P-@P-@(@X@(@ @ `@(@@@@h@@@@@@@ @ @!@"P@x@@y0@z @@@@@@@@@@@@@ @@P@L@H@D@@@<@8@0@(@ @@@@@@@@@@@@@@@@@@@@@@@|@t@h@`@P@@@8@4@(@@@ 0@.@2@lB@lB@lB@lB@lB@lB@lB@lB@lB@P2@.pPSTPDT2@ 3@;Zx0Nm:Yw/Ml8@0@(@ @xY`xd $__m<xZh\d hhjd ld hThd < "d"6#p#$h$$|$5%&5&h8&q&ht&&h&&&''''N)))h)+++d +--U.4X..D..h.)/L,//`/:t:===<=>>q? ??d ??d ?B@hD@@`@3A4AAADBDBB B4C 4CCCChCD< DE| EF` FG GLGLGG GRI TII IJ<JZK \KK`KM MN N O| OQ( QSD SSd S2UtVVhVAWt `WWd W:X @X Xzz--FF_f  . .E E^^w~ PPK{5Z6*Lib/site-packages/setuptools/_importlib.pynuW+Aimport sys def disable_importlib_metadata_finder(metadata): """ Ensure importlib_metadata doesn't provide older, incompatible Distributions. Workaround for #3102. """ try: import importlib_metadata except ImportError: return except AttributeError: import warnings msg = ( "`importlib-metadata` version is incompatible with `setuptools`.\n" "This problem is likely to be solved by installing an updated version of " "`importlib-metadata`." ) warnings.warn(msg) # Ensure a descriptive message is shown. raise # This exception can be suppressed by _distutils_hack if importlib_metadata is metadata: return to_remove = [ ob for ob in sys.meta_path if isinstance(ob, importlib_metadata.MetadataPathFinder) ] for item in to_remove: sys.meta_path.remove(item) if sys.version_info < (3, 10): from setuptools.extern import importlib_metadata as metadata disable_importlib_metadata_finder(metadata) else: import importlib.metadata as metadata # noqa: F401 if sys.version_info < (3, 9): from setuptools.extern import importlib_resources as resources else: import importlib.resources as resources # noqa: F401 PK{5Z,Lib/site-packages/setuptools/archive_util.pynuW+A"""Utilities for extracting common archive formats""" import zipfile import tarfile import os import shutil import posixpath import contextlib from distutils.errors import DistutilsError from ._path import ensure_directory __all__ = [ "unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter", "UnrecognizedFormat", "extraction_drivers", "unpack_directory", ] class UnrecognizedFormat(DistutilsError): """Couldn't recognize the archive type""" def default_filter(src, dst): """The default progress/filter callback; returns True for all files""" return dst def unpack_archive( filename, extract_dir, progress_filter=default_filter, drivers=None): """Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat`` `progress_filter` is a function taking two arguments: a source path internal to the archive ('/'-separated), and a filesystem path where it will be extracted. The callback must return the desired extract path (which may be the same as the one passed in), or else ``None`` to skip that file or directory. The callback can thus be used to report on the progress of the extraction, as well as to filter the items extracted or alter their extraction paths. `drivers`, if supplied, must be a non-empty sequence of functions with the same signature as this function (minus the `drivers` argument), that raise ``UnrecognizedFormat`` if they do not support extracting the designated archive type. The `drivers` are tried in sequence until one is found that does not raise an error, or until all are exhausted (in which case ``UnrecognizedFormat`` is raised). If you do not supply a sequence of drivers, the module's ``extraction_drivers`` constant will be used, which means that ``unpack_zipfile`` and ``unpack_tarfile`` will be tried, in that order. """ for driver in drivers or extraction_drivers: try: driver(filename, extract_dir, progress_filter) except UnrecognizedFormat: continue else: return else: raise UnrecognizedFormat( "Not a recognized archive type: %s" % filename ) def unpack_directory(filename, extract_dir, progress_filter=default_filter): """"Unpack" a directory, using the same interface as for archives Raises ``UnrecognizedFormat`` if `filename` is not a directory """ if not os.path.isdir(filename): raise UnrecognizedFormat("%s is not a directory" % filename) paths = { filename: ('', extract_dir), } for base, dirs, files in os.walk(filename): src, dst = paths[base] for d in dirs: paths[os.path.join(base, d)] = src + d + '/', os.path.join(dst, d) for f in files: target = os.path.join(dst, f) target = progress_filter(src + f, target) if not target: # skip non-files continue ensure_directory(target) f = os.path.join(base, f) shutil.copyfile(f, target) shutil.copystat(f, target) def unpack_zipfile(filename, extract_dir, progress_filter=default_filter): """Unpack zip `filename` to `extract_dir` Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined by ``zipfile.is_zipfile()``). See ``unpack_archive()`` for an explanation of the `progress_filter` argument. """ if not zipfile.is_zipfile(filename): raise UnrecognizedFormat("%s is not a zip file" % (filename,)) with zipfile.ZipFile(filename) as z: _unpack_zipfile_obj(z, extract_dir, progress_filter) def _unpack_zipfile_obj(zipfile_obj, extract_dir, progress_filter=default_filter): """Internal/private API used by other parts of setuptools. Similar to ``unpack_zipfile``, but receives an already opened :obj:`zipfile.ZipFile` object instead of a filename. """ for info in zipfile_obj.infolist(): name = info.filename # don't extract absolute paths or ones with .. in them if name.startswith('/') or '..' in name.split('/'): continue target = os.path.join(extract_dir, *name.split('/')) target = progress_filter(name, target) if not target: continue if name.endswith('/'): # directory ensure_directory(target) else: # file ensure_directory(target) data = zipfile_obj.read(info.filename) with open(target, 'wb') as f: f.write(data) unix_attributes = info.external_attr >> 16 if unix_attributes: os.chmod(target, unix_attributes) def _resolve_tar_file_or_dir(tar_obj, tar_member_obj): """Resolve any links and extract link targets as normal files.""" while tar_member_obj is not None and ( tar_member_obj.islnk() or tar_member_obj.issym()): linkpath = tar_member_obj.linkname if tar_member_obj.issym(): base = posixpath.dirname(tar_member_obj.name) linkpath = posixpath.join(base, linkpath) linkpath = posixpath.normpath(linkpath) tar_member_obj = tar_obj._getmember(linkpath) is_file_or_dir = ( tar_member_obj is not None and (tar_member_obj.isfile() or tar_member_obj.isdir()) ) if is_file_or_dir: return tar_member_obj raise LookupError('Got unknown file type') def _iter_open_tar(tar_obj, extract_dir, progress_filter): """Emit member-destination pairs from a tar archive.""" # don't do any chowning! tar_obj.chown = lambda *args: None with contextlib.closing(tar_obj): for member in tar_obj: name = member.name # don't extract absolute paths or ones with .. in them if name.startswith('/') or '..' in name.split('/'): continue prelim_dst = os.path.join(extract_dir, *name.split('/')) try: member = _resolve_tar_file_or_dir(tar_obj, member) except LookupError: continue final_dst = progress_filter(name, prelim_dst) if not final_dst: continue if final_dst.endswith(os.sep): final_dst = final_dst[:-1] yield member, final_dst def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): """Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir` Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined by ``tarfile.open()``). See ``unpack_archive()`` for an explanation of the `progress_filter` argument. """ try: tarobj = tarfile.open(filename) except tarfile.TarError as e: raise UnrecognizedFormat( "%s is not a compressed or uncompressed tar file" % (filename,) ) from e for member, final_dst in _iter_open_tar( tarobj, extract_dir, progress_filter, ): try: # XXX Ugh tarobj._extract_member(member, final_dst) except tarfile.ExtractError: # chown/chmod/mkfifo/mknode/makedev failed pass return True extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile PK{5ZHXCLib/site-packages/setuptools/__pycache__/py34compat.cpython-311.pycnuW+A `;dhddlZ ddlZn #e$rYnwxYw ejjZdS#e$rdZYdSwxYw)Nc@|j|jS)N)loader load_modulename)specs dE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/py34compat.pymodule_from_specr s{&&ty111) importlibimportlib.util ImportErrorutilr AttributeErrorr rrs    D 2 ~62222222222s  %11PK{5Zb22ALib/site-packages/setuptools/__pycache__/__init__.cpython-311.pycnuW+A `;d dZddlZddlZddlZddlZddlZddlZddl m Z ddl m Z ddlmZddlZddlmZddlmZdd lmZdd lmZmZdd lmZdd lmZgd Zejj Z dZ!ej"Z#ej"Z$dZ%dZ&ej'j&je&_ej(ej'j)Z*Gdde*Z)dZ+ej,fdZ-ej.e dZ Gdde/Z0ej1dS)z@Extensions to the 'distutils' for large or complex distributionsN)DistutilsOptionError) convert_path)SetuptoolsDeprecationWarning) Extension) Distribution)Require) PackageFinderPEP420PackageFinder)monkey)logging)setuprCommandrr r find_packagesfind_namespace_packagescGddtjj}||}|d|jr||jdSdS)Nc4eZdZdZfdZdfd ZdZxZS)4_install_setup_requires..MinimalDistributionzl A minimal version of a distribution for supporting the fetch_build_eggs interface. cd}fdt|tzD}t||jdS)N)dependency_linkssetup_requiresc"i|] }|| Sr).0kattrss bE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/__init__.py zQ_install_setup_requires..MinimalDistribution.__init__..8sEEE58EEE)setsuper__init__ set_defaults_disable)selfr_inclfiltered __class__s ` rr"z=_install_setup_requires..MinimalDistribution.__init__6sf8EEEEESZZ#e**-DEEEH GG  X & & &   & & ( ( ( ( (rNc~ t|\}}|dfS#t$r|dfcYSwxYw)zAIgnore ``pyproject.toml``, they are not related to setup_requiresr)r! _split_standard_project_metadata Exception)r% filenamescfgtomlr(s r_get_project_config_fileszN_install_setup_requires..MinimalDistribution._get_project_config_files=sW %!GGDDYOO TBw % % % "}$$$ %s '+<<cdS)zl Disable finalize_options to avoid building the working set. Ref #2158. Nr)r%s rfinalize_optionszE_install_setup_requires..MinimalDistribution.finalize_optionsEsrN)__name__ __module__ __qualname____doc__r"r/r1 __classcell__r(s@rMinimalDistributionr0so   ) ) ) ) ) % % % % % %       rr9T)ignore_option_errors) distutilscorerparse_config_filesrfetch_build_eggs)rr9dists r_install_setup_requiresr@-sin96  u % %D 666 3 d12222233rc rtjt|tjjdi|S)Nr)r configurer@r;r<r)rs rrrSs8 E""" >  ( (% ( ((rc<eZdZdZdZfdZd dZdZd dZxZ S) ra Setuptools internal actions are organized using a *command design pattern*. This means that each action (or group of closely related actions) executed during the build should be implemented as a ``Command`` subclass. These commands are abstractions and do not necessarily correspond to a command that can (or should) be executed via a terminal, in a CLI fashion (although historically they would). When creating a new command from scratch, custom defined classes **SHOULD** inherit from ``setuptools.Command`` and implement a few mandatory methods. Between these mandatory methods, are listed: .. method:: initialize_options(self) Set or (reset) all options/attributes/caches used by the command to their default values. Note that these values may be overwritten during the build. .. method:: finalize_options(self) Set final values for all options/attributes used by the command. Most of the time, each option/attribute/cache should only be set if it does not have any value yet (e.g. ``if self.attr is None: self.attr = val``). .. method:: run(self) Execute the actions intended by the command. (Side effects **SHOULD** only take place when ``run`` is executed, for example, creating new files or writing to the terminal output). A useful analogy for command classes is to think of them as subroutines with local variables called "options". The options are "declared" in ``initialize_options()`` and "defined" (given their final values, aka "finalized") in ``finalize_options()``, both of which must be defined by every command class. The "body" of the subroutine, (where it does all the work) is the ``run()`` method. Between ``initialize_options()`` and ``finalize_options()``, ``setuptools`` may set the values for options/attributes based on user's input (or circumstance), which means that the implementation should be careful to not overwrite values in ``finalize_options`` unless necessary. Please note that other commands (or other parts of setuptools) may also overwrite the values of the command's options/attributes multiple times during the build process. Therefore it is important to consistently implement ``initialize_options()`` and ``finalize_options()``. For example, all derived attributes (or attributes that depend on the value of other attributes) **SHOULD** be recomputed in ``finalize_options``. When overwriting existing commands, custom defined classes **MUST** abide by the same APIs implemented by the original class. They also **SHOULD** inherit from the original class. Fc t|t||dS)zj Construct the command for dist, updating vars(self) with any keyword parameters. N)r!r"varsupdate)r%r?kwr(s rr"zCommand.__init__s=  T "rNc t||}|t||||St|tst d|d|d|d|S)N'z ' must be a z (got `z`))getattrsetattr isinstancestrr)r%optionwhatdefaultvals r_ensure_stringlikezCommand._ensure_stringlikesqdF## ; D&' * * *NC%% &&28&&$$$D  rc6t||}|dSt|tr&t||t jd|dSt|t rtd|D}nd}|std|d|ddS)aEnsure that 'option' is a list of strings. If 'option' is currently a string, we split it either on /,\s*/ or /\s+/, so "foo bar baz", "foo,bar,baz", and "foo, bar baz" all become ["foo", "bar", "baz"]. .. TODO: This method seems to be similar to the one in ``distutils.cmd`` Probably it is just here for backward compatibility with old Python versions? :meta private: Nz,\s*|\s+c3@K|]}t|tVdSr2)rLrM)rvs r z-Command.ensure_string_list..s,99As++999999rFrIz!' must be a list of strings (got )) rJrLrMrKresplitlistallr)r%rNrQoks rensure_string_listzCommand.ensure_string_listsdF## ; F S ! !  D&"(;"<"< = = = = =#t$$ 99S99999 **AGM  rrc t|||}t|||Sr2)_Commandreinitialize_commandrErF)r%commandreinit_subcommandsrGcmds rr`zCommand.reinitialize_commands9++D';MNN S  rr2)r) r3r4r5r6command_consumes_argumentsr"rRr]r`r7r8s@rrr`s44l"'    6rrcdtj|dD}ttjj|S)z% Find all files under 'path' c3hK|]-\}}}|D]$}tj||V%.dSr2)ospathjoin)rbasedirsfilesfiles rrVz#_find_all_simple..sc D$   T4  rT) followlinks)rgwalkfilterrhisfile)rhresultss r_find_all_simplerssE!#4!@!@!@G "'.' * **rct|}|tjkr5tjtjj|}t||}t|S)z Find all files under 'dir' and return the list of full filenames. Unless dir is '.', return full filenames with dir prepended. )start) rsrgcurdir functoolspartialrhrelpathmaprZ)dirrlmake_rels rfindallr}sR S ! !E bi$RW_C@@@He$$ ;;rcvddlm}d}tj||tt |S)Nr)cleandocz The function `convert_path` is considered internal and not part of the public API. Its direct usage by 3rd-party packages is considered deprecated and the function may be removed in the future. )inspectrwarningswarnr _convert_path)pathnamermsgs rrrsF       C  M((3--!=>>>  " ""rceZdZdZdS)sicz;Treat this string as-is (https://en.wikipedia.org/wiki/Sic)N)r3r4r5r6rrrrrsEEEErr)2r6rwrgrXr_distutils_hack.override_distutils_hackdistutils.corer;distutils.errorsrdistutils.utilrr_deprecation_warningrsetuptools.version setuptoolssetuptools.extensionrsetuptools.distrsetuptools.dependsr setuptools.discoveryr r r r __all__version __version__bootstrap_install_fromfindrrr@rr< get_unpatchedrr_rsrvr}wrapsrMr patch_allrrrrsNFF 111111888888>>>>>>******((((((&&&&&&CCCCCCCC    , " -2#3#3#3L)))$,  6   6 7 7jjjjjhjjjZ + + +     # #  #FFFFF#FFF rPK{5ZoMLib/site-packages/setuptools/__pycache__/_deprecation_warning.cpython-311.pycnuW+A `;d"GddeZdS)ceZdZdZdS)SetuptoolsDeprecationWarningz Base class for warning deprecations in ``setuptools`` This class is not derived from ``DeprecationWarning``, and as such is visible by default. N)__name__ __module__ __qualname____doc__nE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_deprecation_warning.pyrrsr rN)Warningrrr r r s97r PK{5Zejj@Lib/site-packages/setuptools/__pycache__/sandbox.cpython-311.pycnuW+A `;d 8HddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl m Z ddl mZejdrddlmcmcmcmZnejejZ eZn #e$rdZYnwxYweZgdZd dZejd dZ ejdZ!ejd Z"ejd Z#Gd d e$Z%Gd dZ&ejdZ'dZ(ejdZ)ejdZ*hdZ+dZ,dZ-dZ.GddZ/e0edr ej1gZ2ngZ2Gdde/Z3ej4ej5dd6DZ7Gdde Z8dS)!N)DistutilsError) working_setjava)AbstractSandboxDirectorySandboxSandboxViolation run_setupcd}t||5}|}dddn #1swxYwY||}t||d}t|||dS)z. Python 3 implementation of execfile. rbNexec)openreadcompiler )filenameglobalslocalsmodestreamscriptcodes aE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/sandbox.py _execfiler$s D h   ~ 68V , ,Dws 488c#Ktjdd}||tjdd< |V|tjdd<dS#|tjdd<wxYwN)sysargv)replsaveds r save_argvr1sf HQQQKE    e s AAc#Ktjdd} |V|tjdd<dS#|tjdd<wxYwr)rpathrs r save_pathr#<sQ HQQQKE  e s /Ac#Ktj|dtj}|t_ dV|t_dS#|t_wxYw)zL Monkey-patch tempfile.tempdir with replacement, ensuring it exists T)exist_okN)osmakedirstempfiletempdir) replacementrs r override_tempr+Es] K d++++  E"H!  5    s AAc#Ktj}tj| |Vtj|dS#tj|wxYwr)r&getcwdchdir)targetrs rpushdr0VsR IKKEHV  s AAc(eZdZdZedZdS)UnpickleableExceptionzP An exception representing another Exception that could not be pickled. c  tj|tj|fS#t$r5ddlm}|||t |cYSwxYw)z Always return a dumped (pickled) type and exc. If exc can't be pickled, wrap it in UnpickleableException first. r)r2)pickledumps Exceptionsetuptools.sandboxr2dumprepr)typeexcclss rr8zUnpickleableException.dumpes{  1<%%v|C'8'88 8 1 1 1 G G G G G G88CT#YY00 0 0 0  1s'*r?r@rIrOrUrBrCrrErEtsK    +++++rCrEc#PKtjt5}Vdddn #1swxYwYtjfdtjD}t ||dS)z Context in which imported modules are saved. Translates exceptions internal to the context into the equivalent exception outside the context. Nc3NK|]}|v|d|V dS)z encodings.N startswith).0mod_namers r zsave_modules..sP  5 ##L11 !  rC)rmodulescopyrEupdate_clear_modulesrU) saved_exc del_modulesrs @r save_modulesrcs K    E   Y Ku K; sAAAcDt|D]}tj|=dSr)listrr]) module_namesr[s rr`r`s0&&"" K ! !""rCc#Ktj} |Vtj|dS#tj|wxYwr) pkg_resources __getstate__ __setstate__r"s rsave_pkg_resources_staterksP  & ( (E* "5))))) "5))))s 1Ac #ZKtj|d}t5t 5t 5t t5t|5t|5tddVdddn #1swxYwYdddn #1swxYwYdddn #1swxYwYdddn #1swxYwYdddn #1swxYwYddddS#1swxYwYdS)Ntemp setuptools) r&r!joinrkrcr#hide_setuptoolsrr+r0 __import__) setup_dirtemp_dirs r setup_contextrtsw||Iv..H ! # # " " ^^ " " " "!!![[""&x00"""9--""&|444!EEE""""""""""""""""""""""""""""""""""""""""""""" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "sD DC1,C <C B, C ,B00C 3B04C 7 C CC C C  C1C C1!C "C1% D1C5 5D8C5 9D< D D D D D  D$'D$>Cython distutilsrnrh_distutils_hackcL|ddd}|tvS)aH >>> _needs_hiding('setuptools') True >>> _needs_hiding('pkg_resources') True >>> _needs_hiding('setuptools_plugin') False >>> _needs_hiding('setuptools.__init__') True >>> _needs_hiding('distutils') True >>> _needs_hiding('os') False >>> _needs_hiding('Cython') True .r)split_MODULES_TO_HIDE)r[ base_modules r _needs_hidingr~s("..a((+K * **rCctjdd}||t t tj}t |dS)a% Remove references to setuptools' modules from sys.modules to allow the invocation to import the most appropriate setuptools. This technique is necessary to avoid issues such as #315 where setuptools upgrading itself would fail to find a function declared in the metadata. rwN)rr]get remove_shimfilterr~r`)rwr]s rrprpsWkoo&7>>O"##%%%]CK00G7rCctjtj|}t |5 |gt |zt jdd<t jd|tj tj dt|5t|d}t||dddn #1swxYwYn,#t $r}|jr|jdrYd}~nd}~wwxYwddddS#1swxYwYdS)z8Run a distutils setup script, sandboxed in its directoryNrc*|Sr)activate)dists rzrun_setup..sdmmoorC__main__)__file__r=)r&r!abspathdirnamertrerrinsertr__init__ callbacksappendrdictr SystemExitargs) setup_scriptrrrnsvs rr r s = =>>I y ! !   '.4::5CHQQQK HOOAy ) ) )  " " "  ! ( ()E)E F F F!),, , ,<*EEE,+++ , , , , , , , , , , , , , , ,   v !&)                    sa EBD "D4 D D D D D  E D5D0+E0D55EE  E ceZdZdZdZdZdZdZdZdZ dZ d D]$Z e e e re e ee <%dd Zer ed eZed eZdD]$Z e e e ree ee <%dZdD]$Z e e e ree ee <%dZdD]$Z e e e ree ee <%dZdZdZdZd S)rzDWrap 'os' module and 'open()' builtin for virtualizing setup scriptsFcRfdttD_dS)Nc^g|])}|dt|'|*S)_)rYhasattr)rZnamerHs r z,AbstractSandbox.__init__..sO   ??3'' -4D$,?,?    rC)dir_os_attrsrGs`rrzAbstractSandbox.__init__s7    C    rCc b|jD]&}tt|t||'dSr)rsetattrr&getattr)rHsourcers r_copyzAbstractSandbox._copys<K 5 5D Bgfd33 4 4 4 4 5 5rCc||tr|jt_|jt_d|_dSrK)r_filebuiltinsfile_openr _activerGs rrIzAbstractSandbox.__enter__s9 4  ' JHM   rCcd|_trtt_tt_|tdSNF)rrrrrr rr)rHexc_type exc_value tracebacks rrOzAbstractSandbox.__exit__!s2  "!HM  3rCcN|5|cdddS#1swxYwYdS)zRun 'func' under os sandboxingNrB)rHfuncs rrunzAbstractSandbox.run(su   466                  s c@ttfd}|S)NcX|jr|j||g|Ri|\}}||g|Ri|Sr)r _remap_pair)rHsrcdstrkwroriginals rwrapz3AbstractSandbox._mk_dual_path_wrapper..wrap0sZ| I+4+D#sHTHHHRHHS8C2t222r22 2rCrrrrrs` @r_mk_dual_path_wrapperz%AbstractSandbox._mk_dual_path_wrapper-s83%% 3 3 3 3 3 3  rC)renamelinksymlinkNcDpttfd}|S)NcN|jr|j|g|Ri|}|g|Ri|Sr)r _remap_inputrHr!rrrrs rrz5AbstractSandbox._mk_single_path_wrapper..wrap>sR| B(t(tAdAAAbAA8D.4...2.. .rCr)rrrs`` r_mk_single_path_wrapperz'AbstractSandbox._mk_single_path_wrapper;s=1wsD11 / / / / / /  rCrr )statlistdirr.r chmodchownmkdirremoveunlinkrmdirutimelchownchrootlstat startfilemkfifomknodpathconfaccessc@ttfd}|S)Nc|jr2|j|g|Ri|}||g|Ri|S|g|Ri|Sr)rr _remap_outputrs rrz4AbstractSandbox._mk_single_with_return..wrapcs| M(t(tAdAAAbAA))$0K0K0K0K0K0KLLL8D.4...2.. .rCrrs` @r_mk_single_with_returnz&AbstractSandbox._mk_single_with_return`s83%% / / / / / /  rC)readlinktempnamc@ttfd}|S)NcR|i|}|jr||S|Sr)rr)rHrrretvalrrs rrz'AbstractSandbox._mk_query..wraprs<Xt*r**F| 8))$777MrCrrs` @r _mk_queryzAbstractSandbox._mk_queryos83%%        rC)r-tmpnamc|S)z=Called to remap or validate any path, whether input or outputrB)rHr!s r_validate_pathzAbstractSandbox._validate_path~s rCc,||SzCalled for path inputsrrH operationr!rrs rrzAbstractSandbox._remap_input""4(((rCc,||S)zCalled for path outputsr)rHrr!s rrzAbstractSandbox._remap_outputrrCcV|j|dz|g|Ri||j|dz|g|Ri|fS)?Called for path pairs like rename, link, and symlink operationsz-fromz-to)rrHrrrrrs rrzAbstractSandbox._remap_pairs\ D i'13 D D D D D D D i%/ Bt B B Br B B  rCr)r=r>r?r@rrrrIrOrrrrrrrrrrrrrrrrBrCrrr sNNG   555 .99 73   922488FFHHTN 7''66 # #FE 2 2E;;* 73   ;44T::FFHHTN   (:: 73   :33D99FFHHTN   %-- 73   -&Yt__FFHHTN))))))     rCrdevnullceZdZdZegdZgZ efdZ dZ e rddZ ddZ dZ d Zd Zd Zd ZddZdS)rz}tjtj|?SrB)r&r!normcaserealpath)rZr!s rrz-DirectorySandbox.__init__..sE   9=BG  RW--d33 4 4   rC) r&r!rr_sandboxro_prefix _exceptionsrr)rHsandbox exceptionss rrzDirectorySandbox.__init__s(()9)9')B)BCC w||DM266   AK      &&&&&rCc(ddlm}||||)Nr)r)r7r)rHrrrrs r _violationzDirectorySandbox._violations)777777y$333rCrc||dvr(||s|jd||g|Ri|t||g|Ri|S)Nrrtr rUUr)_okrrrHr!rrrs rrzDirectorySandbox._filesc7777d@T@@@R@@@t1d111b11 1rCc||dvr(||s|jd||g|Ri|t||g|Ri|S)Nrr )rrrrs rrzDirectorySandbox._opensc 3 3 3DHHTNN 3 DOFD$ < < < < < < <T4-$---"---rCc0|ddS)Nr)rrGs rrzDirectorySandbox.tmpnams !!!!!rCc4|j} d|_tjtj|}||p$||jkp||j ||_S#||_wxYwr) rr&r!rr _exemptedrrYr)rHr!activers rrzDirectorySandbox._oks " DLw''(8(8(>(>??Hx((5t},5&&t|44  "DLL6DL ! ! ! !s A.sB  /8H   * *      rCc3BK|]}tj|VdSr)rematch)rZpatternr s rr\z-DirectorySandbox._exempted..s@  ,3BHWh ' '      rC)r_exception_patterns itertoolschainany)rHr  start_matchespattern_matches candidatess ` rrzDirectorySandbox._exemptedsx    <@r?r@textwrapdedentlstripr%r)rBrCrrrsOOO 8?    fhh ,,,,,rCrr)9r&rr(operator functoolsrr contextlibr4r*rrhdistutils.errorsrrplatformrY$org.python.modules.posix.PosixModulepythonr]posix PosixModulerrrr NameErrorr r__all__rcontextmanagerrr#r+r0r6r2rErcr`rkrtr|r~rpr rrrr rreduceor_r{rrrBrCrr;s   ++++++%%%%%%<6""6666666666666666 +bg C EE EEE             ! ! !  11111I111(++++++++< 2"""  ***  " " "+++*   (E E E E E E E E P 72y:,KKK[8[8[8[8[8[8[8[8|i LGMMOO ,,,,,~,,,,,s:A==BBPK{5ZN%?Lib/site-packages/setuptools/__pycache__/launch.cpython-311.pycnuW+A `;d,DdZddlZddlZdZedkr edSdS)z[ Launch the Python script on the command line after setuptools is bootstrapped via import. Ncttjd}t|dd}tjddtjdd<t t dt }||5}|}dddn #1swxYwY|dd}t||d}t||dS) zP Run the script in sys.argv[1] as if it had been invoked naturally. __main__N)__file____name____doc__openz\r\nz\nexec) __builtins__sysargvdictgetattrtokenizer readreplacecompiler ) script_name namespaceopen_fidscript norm_scriptcodes `E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/launch.pyrunr s L(1+KI (122,CHQQQK Hfd + +E {  s..511K ; V 4 4Dys5BBBr)rrr rrrrsV , zCEEEEErPK{5ZB ?Lib/site-packages/setuptools/__pycache__/errors.cpython-311.pycnuW+A `;d @dZddlmZejZejZejZej Z ej Z ej Z ejZejZejZejZejZejZejZejZejZejZejZGddee Z!Gddee Z"dS)zCsetuptools.errors Provides exceptions used by setuptools modules. )errorsceZdZdZdS)RemovedCommandErroraOError used for commands that have been removed in setuptools. Since ``setuptools`` is built on ``distutils``, simply removing a command from ``setuptools`` will make the behavior fall back to ``distutils``; this error is raised if a command exists in ``distutils`` but has been actively removed in ``setuptools``. N__name__ __module__ __qualname____doc__`E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/errors.pyrr sr rceZdZdZdS)PackageDiscoveryErrora{Impossible to perform automatic discovery of packages and/or modules. The current project layout or given discovery options can lead to problems when scanning the project directory. Setuptools might also refuse to complete auto-discovery if an error prone condition is detected (e.g. when a project is organised as a flat-layout but contains multiple directories that can be taken as top-level packages inside a single distribution [*]_). In these situations the users are encouraged to be explicit about which packages to include or to make the discovery parameters more specific. .. [*] Since multi-package distributions are uncommon it is very likely that the developers did not intend for all the directories to be packaged, and are just leaving auxiliary code in the repository top-level, such as maintenance-related scripts. Nrr r r rr*sr rN)#r distutilsr_distutils_errorsDistutilsByteCompileErrorByteCompileErrorCCompilerErrorDistutilsClassError ClassError CompileErrorDistutilsExecError ExecErrorDistutilsFileError FileErrorDistutilsInternalError InternalErrorLibError LinkErrorDistutilsModuleError ModuleErrorDistutilsOptionError OptionErrorDistutilsPlatformError PlatformErrorPreprocessErrorDistutilsSetupError SetupErrorDistutilsTemplateError TemplateErrorUnknownFileErrorDistutilsError BaseError RuntimeErrorrrr r r r/s 211111 %>"1  2  -  0  0 !8  %  ' 4 4 !8 #3  2 !8 $5  , )\I|r PK{5Z22CLib/site-packages/setuptools/__pycache__/namespaces.cpython-311.pycnuW+A `;d pddlZddlmZddlZejjZGddZGddeZdS)N)logcXeZdZdZdZdZdZdZ dZ dZ dZ d Z e d Z d S) Installerz -nspkg.pthc|}|sdStj|\}}||jz }|j|tj d|t|j |}|j rt|dSt|d5}||ddddS#1swxYwYdS)Nz Installing %swt)_get_all_ns_packagesospathsplitext _get_target nspkg_extoutputsappendrinfomap_gen_nspkg_linedry_runlistopen writelines)selfnspfilenameextlinesfs dE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/namespaces.pyinstall_namespaceszInstaller.install_namespaces s(''))  F(()9)9););<< #DN" H%%% (+++D(#.. <  KKK F (D ! ! Q LL                     sC&&C*-C*ctj|\}}||jz }tj|sdSt jd|tj|dS)Nz Removing %s) r r r r r existsrrremove)rrrs runinstall_namespaceszInstaller.uninstall_namespacessv(()9)9););<< #DN"w~~h''  F ))) (c|jSN)targetrs rr zInstaller._get_target's {r#) zimport sys, types, osz#has_mfs = sys.version_info > (3, 5)z$p = os.path.join(%(root)s, *%(pth)r)z4importlib = has_mfs and __import__('importlib.util')z-has_mfs and __import__('importlib.machinery')zm = has_mfs and sys.modules.setdefault(%(pkg)r, importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec(%(pkg)r, [os.path.dirname(p)])))zCm = m or sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))z7mp = (m or []) and m.__dict__.setdefault('__path__',[])z(p not in mp) and mp.append(p))z4m and setattr(sys.modules[%(parent)r], %(child)r, m)cdS)Nz$sys._getframe(1).f_locals['sitedir']r's r _get_rootzInstaller._get_rootEs55r#ct|d}|}|j}|d\}}}|r ||jz }d|tzdzS)N.; )tuplesplitr* _nspkg_tmpl rpartition_nspkg_tmpl_multijoinlocals)rpkgpthroot tmpl_linesparentsepchilds rrzInstaller._gen_nspkg_lineHs}CIIcNN##~~%  ^^C00U  1 $0 0Jxx ##fhh.55r#c||jjpg}ttt |j|S)z,Return sorted list of all package namespaces) distributionnamespace_packagessortedflattenr _pkg_names)rpkgss rrzInstaller._get_all_ns_packagesQs4 39rgc$/48899:::r#c#K|d}|r/d|V||-dSdS)z Given a namespace package, yield the components of that package. >>> names = Installer._pkg_names('a.b.c') >>> set(names) == set(['a', 'a.b', 'a.b.c']) True r,N)r0r4pop)r6partss rrBzInstaller._pkg_namesVs` # ((5// ! ! ! IIKKK     r#N)__name__ __module__ __qualname__r rr"r r1r3r*rr staticmethodrBr)r#rrr sI   $K((<666666;;;   \   r#rceZdZdZdZdS)DevelopInstallercDtt|jSr%)reprstregg_pathr's rr*zDevelopInstaller._get_rootgsC &&'''r#c|jSr%)egg_linkr's rr zDevelopInstaller._get_targetjs }r#N)rGrHrIr*r r)r#rrLrLfs2(((r#rL) r distutilsr itertoolschain from_iterablerArrLr)r#rrWs  / 'ZZZZZZZZzyr#PK{5ZMǖ=Lib/site-packages/setuptools/__pycache__/glob.cpython-311.pycnuW+A `;d dZddlZddlZddlZgdZddZddZdZdZd Z d Z d Z ej d Z ej d ZdZdZdZdS)z Filename globbing utility. Mostly a copy of `glob` from Python 3.5. Changes include: * `yield from` and PEP3102 `*` removed. * Hidden files are not ignored. N)globiglobescapeFc>tt||S)ayReturn a list of paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. However, unlike fnmatch, filenames starting with a dot are special cases that are not matched by '*' and '?' patterns. If recursive is true, the pattern '**' will match any files and zero or more directories and subdirectories. ) recursive)listr)pathnamers ^E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/glob.pyrrs h)444 5 55cnt||}|r"t|rt|}|rJ|S)aReturn an iterator which yields the paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. However, unlike fnmatch, filenames starting with a dot are special cases that are not matched by '*' and '?' patterns. If recursive is true, the pattern '**' will match any files and zero or more directories and subdirectories. )_iglob _isrecursivenext)r ritss r rrsC ) $ $B\(++ HH Ir c#VKtj|\}}|rt|rtnt }t |sK|r$tj|r|Vn#tj|r|VdS|s|||Ed{VdS||kr t |rt||}n|g}t |st}|D]3}|||D]$}tj ||V%4dSN) ospathsplitrglob2glob1 has_magiclexistsisdirr glob0join)r rdirnamebasename glob_in_dirdirsnames r r r 0sg h//GX$Jh)?)?J%%UK X    wx(( w}}W%%  ;w111111111(y11gy))y X   ..K22 . .D',,w-- - - - - ...r c|sAt|tr tjd}n tj} tj|}n#t $rgcYSwxYwtj||SNASCII) isinstancebytesrcurdirencodelistdirOSErrorfnmatchfilter)rpatternnamess r rrTs  gu % % i&&w//GGiG 7##   >% ) ))sA A)(A)c|s#tj|r|gSn@tjtj||r|gSgSr)rrrrr)rrs r rrasd  7== ! ! :   7??27<<:: ; ; :  Ir c#pKt|sJ|ddVt|D]}|VdS)Nr)r _rlistdir)rr.xs r rrqsZ     "1"+ w  r c#K|sAt|tr tjd}n tj} tj|}n#tj$rYdSwxYw|D]^}|V|r tj||n|}t|D]$}tj||V%_dSr$) r&r'rr(r)r*errorrrr2)rr/r3rys r r2r2ys  gu % % i&&w//GGiG 7## 8 %%+29rw||GQ'''4 % %A',,q!$$ $ $ $ $ %%%sAA/.A/z([*?[])s([*?[])ct|trt|}nt|}|duSr)r&r'magic_check_bytessearch magic_check)rmatchs r rrsG!U&!((++""1%%  r cDt|tr|dkS|dkS)Ns**z**)r&r')r.s r rrs)'5!!%$r ctj|\}}t|trt d|}ntd|}||zS)z#Escape all special characters. s[\1]z[\1])rr splitdriver&r'r8subr:)r drives r rrsd g((22OE8(E""6$((8<<??7H55 8 r )F)__doc__rrer,__all__rrr rrrr2compiler:r8rrrr r rFs  % % % 6 6 6 6$...H * * *    %%%"bj## BJz**     r PK{5Z̮HLib/site-packages/setuptools/__pycache__/windows_support.cpython-311.pycnuW+A `;d*ddlZdZedZdS)Nc:tjdkrdS|S)NWindowscdS)N)argskwargss iE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/windows_support.pyzwindows_only..st)platformsystem)funcs r windows_onlyrs#I%%+++ Kr cddl}td|jjj}|jj|jjf|_|jj |_ d}|||}|s| dS)z Set the hidden attribute on a file or directory. From http://stackoverflow.com/questions/19622133/ `path` must be text. rNzctypes.wintypes) ctypes __import__windllkernel32SetFileAttributesWwintypesLPWSTRDWORDargtypesBOOLrestypeWinError)pathrSetFileAttributesFILE_ATTRIBUTE_HIDDENrets r hide_filer" sMMM !!! .A!'!79N!N & 4   D"7 8 8C  oo  r )r rr"rr r r#sB      r PK{5Z~9yyBLib/site-packages/setuptools/__pycache__/discovery.cpython-311.pycnuW+A `;d?Q dZddlZddlZddlmZddlmZddlmZddlm Z m Z m Z m Z m Z mZmZmZmZmZddlZddlmZddlmZeeejfZe egefZe eZejj Z!e rdd l"m#Z#d ed efd Z$Gd dZ%Gdde%Z&Gdde&Z'Gdde%Z(Gdde'Z)Gdde(Z*deded eefdZ+GddZ,deed eefdZ-deed eefd Z.deed!eeefd"ed eefd#Z/d$ed!eeefd"ed efd%Z0deed&ed e eeffd'Z1dS)(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 N fnmatchcase)glob)Path) TYPE_CHECKINGCallableDictIterableIteratorListMappingOptionalTupleUnion)log) convert_path) Distributionpathreturncdtj|SN)osrbasename isidentifier)rs cE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/discovery.py _valid_namerIs$ 7  D ! ! . . 0 00c eZdZUdZdZeedfed<dZeedfed<e dde d e ed e ed e efd Z e de d ed ed efd Zeded efdZdS)_Finderz@Base class that exposes functionality for module/package finders.ALWAYS_EXCLUDEDEFAULT_EXCLUDE.*whereexcludeincluderc |p|j}t|tt ||jg|j|R|j|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_iterrstr _build_filterr!clsr&r'r(s rfindz _Finder.findTsp40S0 NNSZZ((!!@3#5@@@@!!7+     rctr)NotImplementedErrorr.s rr+z_Finder._find_iterws!!rpatternscfdS)z Given a list of patterns, return a callable that will be true only if the input matches at least one of the patterns. c<tfdDS)Nc38K|]}t|VdSrr).0patnames r z:_Finder._build_filter....s-KK3 D# 6 6KKKKKKr)any)r9r3s`rz'_Finder._build_filter..s%CKKKK(KKKKKrr )r3s`rr-z_Finder._build_filter{s LKKKKrN)r#r r$)__name__ __module__ __qualname____doc__r!rr,__annotations__r" classmethod_Pathr r r0_FilterStrIterr+ staticmethodr-r rrrrNsJJ&(NE#s(O(((')OU38_)))!#!'     #  #  c    [  D"u"w""W"""["LLLLL\LLLrrc beZdZdZdZededededefdZ e ded e de fd Z d S) PackageFinderzI Generate a list of all Python packages found within a directory )ez_setupz *__pycache__r&r'r(rc#Ktjt|dD]\}}}|dd}g|dd<|D]}tj||} tj| |} | tjjd} d|vs|| | s|| r|| s| V| |dS)zy All the packages found in 'where' that pass the 'include' filter, but not the 'exclude' filter. T) followlinksNr#) rwalkr,rjoinrelpathreplacesep_looks_like_packageappend) r/r&r'r(rootdirsfilesall_dirsdir full_pathrel_pathpackages rr+zPackageFinder._find_iters "$U!F!F!F ! ! D$AAAwHDG ! !GLLs33 7??9e<<"**27;<<#::S%<%r?r@r!rBrCrDrEr+rFr,boolrQr rrrHrHs2N!u!w!!W!!![!6A%AAAAA\AAArrHc2eZdZedededefdZdS)PEP420PackageFinder_pathr[rcdS)NTr )rbr[s rrQz'PEP420PackageFinder._looks_like_packagestrN)r=r>r?rFrCr,r_rQr rrrarasG5\rrac PeZdZdZededededefdZe e Z dS) ModuleFinderzYFind isolated Python modules. This function will **not** recurse subdirectories. r&r'r(rc#HKttj|dD]q}tjtj|\}}||sW||r||s|VrdS)Nz*.py)rrrrMsplitextr_looks_like_module)r/r&r'r(filemodule_exts rr+zModuleFinder._find_iterseV4455  D7++BG,<,r?r@rBrCrDrEr+rFrrhr rrrereshuwW[&k22rrecteZdZdZeedeDZ edede de fdZ dS)FlatLayoutPackageFinder) cibindocdocs documentationmanpagesnews changelogtesttests unit_test unit_testsexampleexamplesscriptstoolsutilutilspythonbuilddistvenvenv requirementstasksfabfile site_scons benchmark benchmarksexercise exercises[._]*c#$K|] }||dfV dS)z.*Nr )r7ps rr:z!FlatLayoutPackageFinder.s,&G&Ga888}&G&G&G&G&G&Grrb package_namerc|d}|dp|dd}|o td|ddDS)Nr#r-stubsc3>K|]}|VdSr)r)r7r9s rr:z>FlatLayoutPackageFinder._looks_like_package..s.(S(S):):)<)<(S(S(S(S(S(Sr)splitrendswithall)rbrnamesroot_pkg_is_valids rrQz+FlatLayoutPackageFinder._looks_like_packagesl""3''!!H1133RuQx7H7H7R7R SS(S(Sqrr(S(S(S%S%SSrN) r=r>r?_EXCLUDEtuple chain_iterr"rFrCr,r_rQr rrrmrms$HLeJJ&G&Gh&G&G&GGGHHO T5TTTTT\TTTrrmceZdZdZdS)FlatLayoutModuleFinder)setupconftestrvrwrzr{rtoxfilenoxfilepavementdodorrz[Ss][Cc]onstruct conanfilemanagerrrrrN)r=r>r?r"r rrrrsO4*)rrroot_pkgpkg_dirc\t|}gfd|DzS)Nc>g|]}d|fS)r#)rM)r7nrs r z)_find_packages_within..s)AAAQ8Q-00AAAr)rar0)rrnesteds` r_find_packages_withinrs8 % %g . .F :AAAA&AAA AArc$eZdZdZddZdZdZedefdZ ede e e ffd Z dd Z d edefdZd edefdZdefdZdefdZdefdZdefdZdefdZdee de fdZdZdee fdZdee fdZdS)ConfigDiscoveryzFill-in metadata and options that can be automatically derived (from other metadata/options, the file system or conventions) distributionrc>||_d|_d|_d|_dS)NF)r_called _disabled_skip_ext_modules)selfrs r__init__zConfigDiscovery.__init__$s%   !&rcd|_dS)z+Internal API to disable automatic discoveryTN)rrs r_disablezConfigDiscovery._disable*s rcd|_dS)aInternal 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)rrs r_ignore_ext_modulesz#ConfigDiscovery._ignore_ext_modules.s"&rrc2|jjp tjSr)rsrc_rootrcurdirrs r _root_dirzConfigDiscovery._root_dir:sy!.RY.rc6|jjiS|jjSr)r package_dirrs r _package_dirzConfigDiscovery._package_dir?s 9 (Iy$$rFTc|dur|js|jrdS|||r|d|_dS)aAutomatically 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)rr_analyse_package_layout analyse_name)rforcer9ignore_ext_moduless r__call__zConfigDiscovery.__call__EsX E>>t|>t~> F $$%7888        rrc|p|j}|jjdup| }|jjdup0|jjdup"|p t |jdo |jjS)zF``True`` if the user has specified some form of package/module listingN configuration)rr ext_modulespackages py_moduleshasattrr)rrrs r_explicitly_specifiedz%ConfigDiscovery._explicitly_specifiedZsw/I43I90D8N.sU  Z "#rw||Hj'I'I J J      rdiscovered packages -- T) rcopypoprrrritemsr*rr)rrpkgsrs @rrz(ConfigDiscovery._analyse_explicit_layoutxs',,.. D!!!> 5 J[JJKKK    #.#4#4#6#6     "$ZZ  @DI,>@@AAAtrc|j}tj|j|dd}tj|sdStjd|| dtj |||j _ t||j _t ||j _tjd|j jtjd|j jdS)aTry 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"``. rsrcFz#`src-layout` detected -- analysing rdiscovered py_modules -- T)rrrrMrgetisdirrr setdefaultrrrrar0rrer)rrsrc_dirs rrz#ConfigDiscovery._analyse_src_layouts' ',,t~{r5/I/IJJw}}W%% 5 AAABBBr27#3#3G#<#<=== + 055g>> +0099  @DI,>@@AAA Ddi.BDDEEEtrctjd|j|p|S)aTry 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 )rrr_analyse_flat_packages_analyse_flat_modulesrs rrz$ConfigDiscovery._analyse_flat_layoutsB IIIJJJ**,,L0J0J0L0LLrc,t|j|j_t t |jj}tjd|jj| |dt|S)Nrr) rmr0rrrremove_nested_packages remove_stubsrr_ensure_no_accidental_inclusionr_)r top_levels rrz&ConfigDiscovery._analyse_flat_packagessv499$.II *< 8J+K+KLL  @DI,>@@AAA ,,Y CCCIrct|j|j_t jd|jj||jjdt|jjS)Nrmodules) rr0rrrrrrr_rs rrz%ConfigDiscovery._analyse_flat_modulessh5::4>JJ  Ddi.BDDEEE ,,TY-A9MMMDI()))rdetectedkindct|dkr,ddlm}ddlm}d|d|d|d}|||dS) Nrr)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. )leninspectrsetuptools.errorsr)rrrrrmsgs rrz/ConfigDiscovery._ensure_no_accidental_inclusions x==1   ( ( ( ( ( ( ? ? ? ? ? ?$h NR C(' 66 6)  rc|jjjs |jjrdStjd|p|}|r||jj_dSdS)zThe 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)rmetadatar9rr#_find_name_single_package_or_module_find_name_from_packages)rr9s rrzConfigDiscovery.analyse_names 9  " din 4 KLLL  4 4 6 6 /,,..   +&*DI  # # # + +rcdD]V}t|j|dpg}|r:t|dkr'tjd|d|dcSWdS)zExactly one module or package)rrNrz&Single module/package detected, name: r)getattrrrrr)rfieldrs rrz3ConfigDiscovery._find_name_single_package_or_moduleso/  EDIud339rE Uq M58MMNNNQxtrc"|jjsdStt|jjt}|jjpi}t |||j}|rtj d||Stj ddS)zr?r@rrrpropertyrCrr r,rrr_rrrrrrrr rrrrrr rrrrs''''  & & &/5///X/%d38n%%%X% *          $ 4    $$$T2 Md M M M M*t**** 7S 77777.+++"Xc](3-rrrct|t}|dd}t|}tt|D];\}t fd|Dr|||z dz <|S)zRemove 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'] rNc3HK|]}|dVdSr#N startswith)r7otherr9s rr:z)remove_nested_packages.. s5CCt%{{{++CCCCCCrr)rr enumeratereversedr;r)rrrsizeir9s @rrrs ( $ $ $DQQQI t99DXd^^,,((4 CCCCCCC C C ( MM$(Q, ' ' ' rcd|DS)zRemove 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'] cng|]2}|ddd0|3S)r#rr)rr)r7rs rrz remove_stubs..s: P P PC399S>>!+<+E+Eh+O+O PC P P Prr )rs rrrs Q P8 P P PPrrrct|t}g}t|D]B\}tfd||dzdDsn|C|D]Vt ||}t j|d}t j |rcSWdS)z0Find the parent package that is not a namespace.rc3HK|]}|dVdSr r )r7rr9s rr:z&find_parent_package.."s5DD1<<4 ++DDDDDDrrNr]) rrrrrRfind_package_pathrrrMr^)rrrcommon_ancestorsrpkg_pathinitr9s @rrrshC(((HX&&&&4DDDDXacdd^DDDDD  E%%%% $T;AAw||Hm44 7>>$   KKK  4rr9c|d}tt|ddD]M}d|d|}||vr*||}t jj||g||dRcSN|dpd}t jj|g|d|RS)aGiven 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' r#rNr/)rrangerrMrrr)r9rrpartsr partial_nameparents rrr3s, JJsOOE 3u::q" % %>>xxbqb ** ; & & .F7<&=59=== = = = '__R &BF 7< =6<<#4#4 =u = = ==r package_pathcft|}t|jfd|DS)Nc ji|]/}|dg|d0S)rr#)rMr)r7rprefixs r z)construct_package_dir..Xs< M M M#C4F4SYYs^^455 M M Mr)rrr )rr# parent_pkgsr&s @rconstruct_package_dirr)Us:(22K ,   %F M M M M M M MMr)2r@ itertoolsrfnmatchrrpathlibrtypingrrr r r r r rrr_distutils_hack.override_distutils_hack distutilsrdistutils.utilrr,PathLikerCr_rDrEchain from_iterabler setuptoolsrrrrHrarermrrrrrrrr)r rrr6s%%N                          '''''' c2; C5$;  3- _ * (''''''1e11111 3L3L3L3L3L3L3L3Ll&A&A&A&A&AG&A&A&AR- 333337333./T/T/T/T/T1/T/T/Td*****\***<BCB%BDIBBBB ^^^^^^^^BT#Y49$Q49QcQQQQ3i&-c3h&7CH c]0> >#CH->9>>>>>>DNDINUNtCQTH~NNNNNNrPK{5Z iiFLib/site-packages/setuptools/__pycache__/package_index.cpython-311.pycnuW+A `;dTdZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl ZddlZddlZddlZddlmZddlZddlmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,dd l-m.Z.ej/d Z0ej/d ej1Z2ej/d Z3ej/d ej1j4Z5d6Z7gdZ8dZ9dZ:e:;dj;ej<eZ=dZ>dZ?dZ@d1dZAd1dZBd1dZCdedfdZDdZEej/dej1ZFeEdZGGddZHGd d!eHZIGd"d#eZJej/d$jKZLd%ZMd&ZNd2d'ZOd(ZPGd)d*ZQGd+d,e jRZSejTjUfd-ZVd.ZWeOe9eVZVd/ZXd0ZYdS)3z#PyPI and direct package downloadingNwraps) CHECKOUT_DIST Distribution BINARY_DISTnormalize_path SOURCE_DIST Environmentfind_distributions safe_name safe_version to_filename Requirement DEVELOP_DISTEGG_DIST parse_version)log)DistutilsError) translate)Wheelunique_everseenz^egg=([-A-Za-z0-9_.+!]+)$zhref\s*=\s*['"]?([^'"> ]+)z
([^<]+)\n\s+\(md5\)z([-+.a-z0-9]{2,}):z.tar.gz .tar.bz2 .tar .zip .tgz) PackageIndexdistros_for_urlparse_bdist_wininstinterpret_distro_namez>, ' ' :DDD   k3 / / "R%[F:DDD ^^, - - :DDD   os 3 3 "R%[F:DD  ctj|}|\}}}}}}tj|dd}|dkr>|dkr8tj|dd}d|vr|dd\}}||fS)N/zsourceforge.netdownload#)urllibr!urlparseunquotesplit) urlpartsschemeserverpath parametersqueryfragmentr/s r%egg_info_for_urlrFWs L ! !# & &E8=5FFD*eX <   3 3 4 4D """tz'9'9|##DJJsOOB$788 d{{C++h >r2c#Kt|\}}t|||D]}|V|rNt|}|r4t ||d|t D] }|VdSdSdS)zEYield egg or source distribution objects that might be found at a URLr9) precedenceN)rFdistros_for_location EGG_FRAGMENTmatchrgroupr)r>metadatar/rEdistrKs r%rrbs%c**ND($S$99 ""8,,  -U[[^^X-       r2c|dr |dd}|drd|vrtj|||gS|drOd|vrKt|}|sgSt||j|jtdzgS|d r.t|\}}}|t||||t|StD]B}||r+|dt| }t|||cSCgS) z:Yield egg or source distribution objects based on basename.egg.zipNr*z.egg-z.whlr9)location project_nameversionrHr() r,r from_locationr is_compatiblerSrTrrrr EXTENSIONSlen)rRbasenamerMwheelwin_baser0platformexts r%rIrIps$$!CRC=  JSH__*8XxHHII   SH__h""$$ I+M!|        %8%B%B"&(  ((Hfk8  GG   S ! ! G #c(( +H(8XFF F F F G Ir2cxtt|tj||S)zEYield possible egg or source distribution objects based on a filename)rIrosrBrY)filenamerMs r%distros_for_filenameras3 x  "'"2"28"<"z(interpret_distro_name..s.KKAbh|Q77KKKKKKr2Nr9) py_versionrHr\)r=anyrangerXrjoin)rRrYrMrirHr\r?rfs r%rrs, NN3  E #KKqrrKKKKK 1c%jj1n % %   hrr 3 3SXXeABBi5H5H!j         r2c<tfd}|S)zs Wrap a function returning an iterable such that the resulting iterable only ever yields unique items. c.t|i|SNr)argskwargsfuncs r%wrapperzunique_values..wrappers ttT4V44555r2r)rrrss` r% unique_valuesrts5  4[[6666[6 Nr2z(<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>c #Kt|D]}|\}}tt t j|d}d|vsd|vr_t|D]D}tj |t|dVEdD]|}||}|dkr_t||}|rBtj |t|dV}dS)zEFind rel="homepage" and rel="download" links in `page`, yielding URLs,homepager6r9)z Home PagezDownload URLr5N)RELfinditergroupssetmapstrstripr+r=HREFr:r!urljoin htmldecoderLfindsearch)r>pagerKtagrelrelsposs r%find_external_linksrsMd##LL<<>>S3sy#))++"3"3C"8"899::   t!3!3s++ L Ll**3 5;;q>>0J0JKKKKKK4LLiinn "99KKc**E Ll**3 5;;q>>0J0JKKKKK LLr2c$eZdZdZdZdZdZdS)ContentCheckerzP A null content checker that defines the interface for checking content cdS)z3 Feed a block of data to the hash. Nselfblocks r%feedzContentChecker.feeds  r2cdS)zC Check the hash. Return False if validation fails. Trrs r%is_validzContentChecker.is_valids tr2cdS)zu Call reporter with information about the checker (hash name) substituted into the template. Nr)rreportertemplates r%reportzContentChecker.reports r2N)__name__ __module__ __qualname____doc__rrrrr2r%rrsK  r2rc\eZdZejdZdZedZdZ dZ dZ dS) HashCheckerzK(?Psha1|sha224|sha384|sha256|sha512|md5)=(?P[a-f0-9]+)cT||_tj||_||_dSro) hash_namehashlibnewhashexpected)rrrs r%__init__zHashChecker.__init__s%"K **   r2ctj|d}|stS|j|}|stS|di|S)z5Construct a (possibly null) ContentChecker from a URLr5r)r:r!r;rpatternr groupdict)clsr>rErKs r%from_urlzHashChecker.from_urls{<((--b1 $!## # ""8,, $!## #s''U__&&'''r2c:|j|dSro)rupdaters r%rzHashChecker.feeds r2cF|j|jkSro)r hexdigestrrs r%rzHashChecker.is_validsy""$$ 55r2c,||jz}||Sro)r)rrrmsgs r%rzHashChecker.reports'x}}r2N) rrrrdcompilerr classmethodrrrrrr2r%rrsbj #G !!! (([(   666r2rc&eZdZdZ d+fd ZfdZd,d Zd,d Zd,d Zd Z d Z dZ dZ dZ d-dZdZd-fd ZdZdZdZdZdZ d.dZd/dZdZdZdZdZd-dZd Zd!Zd"Zd#Z d$Z!e"d,d%Z#d&Z$d'Z%d(Z&d)Z'd*Z(xZ)S)0rz;A distribution index that scans web pages for download URLshttps://pypi.org/simple/*NTcrtj|i||dd|d z|_i|_i|_i|_tjd tt|j |_ g|_tjj|_dS)Nr4|)superrr, index_url scanned_urls fetched_urls package_pagesrdrrlr|rrKallowsto_scanr:requesturlopenopener)rrhosts ca_bundle verify_sslrpkw __class__s r%rzPackageIndex.__init__s $%"%%%"S*Fy/A/A#/F/F+F*F%GGj#i*?*?!@!@AAG  n, r2c t|jn#t$rYdSwxYwt|Sro)rrT Exceptionradd)rrNrs r%rzPackageIndex.add)sS  $, ' ' ' '    FF ww{{4   s  &&Fc ||jvr|sdSd|j|<t|s||dStt |}|r-||sdS|d||s |r ||jvr$tt|j |dS||s d|j|<dS| d|d|j|<d}| |||z}|dSt|tjjr(|jdkr| d|jzd|j|j<d|jd d vr|dS|j}|}t|t0sTt|tjjrd }n|jd pd }||d }|t6|D]W} tj|t?| d} |!| X|"|j#r-tI|dddkr|%||}dSdSdS)zheadersgetr+closereadr} get_paramdecoderryr!rrrL process_urlr-rgetattr process_index) rr>retrievediststmplfr/rrrKlinks r%rzPackageIndex.process_url2s $# # #H # F!%## 2  ! !# & & & F--..E 2{{3''F +S111   C4+<$<$< TXu%% & & & F{{3 %)D c " F ,$$$!%#M MM#tcz * * 9 F a/ 0 0 :QVs]] II0158 9 9 9#'!% ~r::@@BB B B GGIII Fuvvxx$$$ 2!V\344 F#)--i88EI;;w11D  ]]4(( # #E<''jQ.H.HIID   T " " " " >>$. ) ) 1ga.F.F#.M.M%%c400DDD 1 1.M.Mr2c tj|s|d|dStj|rl|sjtj|}tj|D]6}|tj||d7t|}|r:| d|tt|j |dSdS)Nz Not found: %sTz Found: %s)r_rBexistswarnisdirrealpathlistdirrrlrarrr|r)rfnnestedrBitemrs r%rzPackageIndex.process_filenamegsw~~b!!  IIor * * * F 7==   FV F7##B''D 4(( F F%%bgll4&>&>EEEE$R((  ' JJ{B ' ' ' TXu%% & & & & & ' 'r2cNt|}|o*|ddk}|s8|tj|drdSd}|rt||z|||dS)Nr9fileTzN Note: Bypassing %s (disallowed host; see http://bit.ly/2hrImnY for details). ) rrLr+rr:r!r;rr)rr>fatalsis_filers r%rzPackageIndex.url_okws sOO4 ((**f4  dkk&,"7"7"<".sm  D))  ~~k**  5M       r2)filterr_rBrr itertoolsstarmap scan_egg_link)r search_pathdirs egg_linkss r%scan_egg_linkszPackageIndex.scan_egg_linkssYbgm[11     Y t19 = =>>>>>r2c ttj||5}t t dt tj|}dddn #1swxYwYt|dkrdS|\}}ttj||D]?}tjj|g|R|_ t|_ ||@dS)Nrh)openr_rBrlrrr|r}r~rXr rRr rHr)rrBr raw_lineslinesegg_path setup_pathrNs r%rzPackageIndex.scan_egg_links) "',,tU++ , , B c#)Y&?&?@@AAE B B B B B B B B B B B B B B B u::?? F$*&rw||D('C'CDD  DGL6666DM)DO HHTNNNN  s6A00A47A4c d}||js|Stttjj|t|jdd}t|dks d|dvr|St|d}t|d}d|j | i|<t|t|fS)N)NNr4rhr8r9rT)r-rrr|r:r!r<rXr=r r r setdefaultr+r)rrNO_MATCH_SENTINELr?pkgvers r%_scanzPackageIndex._scans&t~.. %$ $S L $s4>':':';';"<"B"B3"G"G     u::??cU1Xoo$ $a!!58$$?C%%ciikk266t<3S!1!111r2c \t|D]f} |tj|t |dW#t$rYcwxYw||\}}|sdSt||D]c}t|\}}| dr%|s#|r |d|d|z }n| || |dtd|S)z#Process the contents of a PyPI pager9r.pyz#egg=rQc6d|dddzS)Nz%sr9rh)rL)ms r%z,PackageIndex.process_index..s2QWWQ15E5EEr2)rryrr:r!rrrLr"rrFr,need_version_infoscan_urlPYPI_MD5sub) rr>rrKr rnew_urlr/frags r%rzPackageIndex.process_indexsN]]4((  E  6<//Z A5O5OPPQQQQ    ::c??S 2+355 # #G)'22JD$}}U## 0D 00GsssCC88GG**3/// MM' " " " "|| E Et   sAA22 A?>A?c2|d|dS)NzPPage at %s links to .py file(s) without version info; an index scan is required.)scan_allrr>s r%rzPackageIndex.need_version_infos*  !$     r2c|j|jvr%|r|j|g|R|d||jdS)Nz6Scanning index of all packages (this may take a while))rrrrrrrrps r%rzPackageIndex.scan_allsi >!2 2 2 & #%%%%% IIH    dn%%%%%r2c||j|jzdz|j|js%||j|jzdz|j|js||t|j|jdD]}||dS)Nr4r) rr unsafe_namerrkeyrSnot_found_in_indexr)r requirementr>s r% find_packageszPackageIndex.find_packagess dn{'>>DEEE!%%ko66 K MM$.;+CCcI J J J!%%ko66 1  # #K 0 0 0*..{CCDD  C MM#      r2c|||||jD]!}||vr|cS|d||"t t |||S)Nz%s does not match %s)prescanr&r#rrrobtain)rr% installerrNrs r%r)zPackageIndex.obtains  ;''') B BD{"" JJ-{D A A A A\4((// YGGGr2c2||jd|z|sd|t j|t |jjdtj |ddS)z- checker is a ContentChecker zValidating %%s checksum for %sz validation failed for z; possible download problem?N) rrrrr_unlinkrrr.rBrY)rcheckerr`tfps r% check_hashzPackageIndex.check_hashs  J ,x 7 9 9 9!!  IIKKK Ih    <$$$bg&6&6x&@&@&@&@B   r2c|D]y}|j@t|r1|dstt |r||_|j|zdS)z;Add `urls` to the list that will be prescanned for searchesNfile:)rrr-rrrappend)rurlsr>s r%add_find_linkszPackageIndex.add_find_linkss ) )C $!#%>>'**%,,--%  c"""" ##C(((( ) )r2cp|jr'tt|j|jd|_dS)z7Scan urls scheduled for prescanning (e.g. --find-links)N)rrr|rrs r%r(zPackageIndex.prescans3 < 3 T]DL11 2 2 2 r2c||jr |jd}}n |jd}}|||j|dS)Nz#Couldn't retrieve index page for %rz3Couldn't find index page for %r (maybe misspelled?))r#rrr"r)rr%methrs r%r$zPackageIndex.not_found_in_indexsY    G #H#DD ED S+)*** r2ct|tst|}|rj||d||}t |\}}|dr||||}|Stj |r|St|}t| ||ddS)aLocate and/or download `spec` to `tmpdir`, returning a local path `spec` may be a ``Requirement`` object, or a string containing a URL, an existing local filename, or a project/version requirement spec (i.e. the string form of a ``Requirement`` object). If it is the URL of a .py file with an unambiguous ``#egg=name-version`` tag (i.e., one that escapes ``-`` as ``_`` throughout), a trivial ``setup.py`` is automatically created alongside the downloaded file. If `spec` is a ``Requirement`` object or a string containing a project/version requirement spec, this method returns the location of a matching distribution (possibly after downloading it to `tmpdir`). If `spec` is a locally existing file or directory name, it is simply returned unchanged. If `spec` is a URL, it is downloaded to a subpath of `tmpdir`, and the local filename is returned. Various errors may be raised if a problem occurs during downloading. r9rrRN)rrr _download_urlrLrFr, gen_setupr_rBrr&rfetch_distribution)rr#tmpdirr@foundr/rEs r%r6zPackageIndex.download#s$$ ,, 3%%F 3**6<<??D&II!1$!7!7h==''D NN5(FCCE %% 3 ,T22t..tV<.find]s{CG  $ $?l22:27** Dd)* CKGK7Ev:$-- v>>C-0D*w~~d&<==$# % $ $r2z:No local packages or working download links found for %s%sza source distribution of rzBest match: %s)rRro)rr(r&rrcloner@) rr%r< force_scanrGrE local_indexrNrrFs ` ` `` @r%r;zPackageIndex.fetch_distributionEsn( $k222 $ $ $ $ $ $ $ $ $ $2  % LLNNN   { + + +4 $$D 2 /4 [11D <|' 4 $$D < <   { + + +4 $$D < IIL77=2      II& - - -::t'=:>> >r2cH|||||}||jSdS)a3Obtain a file suitable for fulfilling `requirement` DEPRECATED; use the ``fetch_distribution()`` method now instead. For backward compatibility, this routine is identical but returns the ``location`` of the downloaded distribution instead of a distribution object. N)r;rR)rr%r<rIrGrNs r%fetchzPackageIndex.fetchs0&&{FJOO  = tr2c t|}|r.dt||ddDpg}t |dkrXt j|}t j||krvt j ||}t j |r t j ||stj |||}tt j |dd5}|d|djd|djdt j|dd dddn #1swxYwY|S|rt'd |d |t'd ) Nc g|] }|j | Sr)rT)reds r% z*PackageIndex.gen_setup..s0   EFY    r2r9zsetup.pywz(from setuptools import setup setup(name=rz , version=z, py_modules=[z]) z9Can't unambiguously interpret project/version identifier zI; any dashes in the name or version should be escaped using underscores. zpCan't process plain .py files without an '#egg=name-version' suffix to enable automatic setup script generation.)rJrKrrLrXr_rBrYdirnamerlrsamefileshutilcopy2rwriterSrTsplitextr) rr`rEr<rKrrYdstrs r%r:zPackageIndex.gen_setups""8,,   !(EKKNND A A     u::??w''11Hwx((F22gll6844s++#0@0@30O0O#L3///"Hbgll6:66<<  a---uQx/?/?/?((221555                O   .&.XXuu6  !G sAF,,F03F0i c|d|d} t|}||}t |t jjr"td|d|j d|j |}d}|j }d}d|vrP| d} ttt| }||||||t#|d 5} ||} | rI|| | | |d z }||||||nnb|||| dddn #1swxYwY||r|SS#|r|wwxYw) NzDownloading %szCan't download :  rr5zcontent-lengthzContent-LengthwbTr9)rrrrrr:rrrrr dl_blocksizeget_allmaxr|int reporthookrrrrVr/r) rr>r`fpr-rblocknumbssizesizesr.rs r% _download_tozPackageIndex._download_tos "C(((  !**3//Gs##B"fl455 $n25##rwwwGggiiGH"BD7**(8993sE??++XxTBBBh%% 8GGBKKE U+++ %((( A XxTJJJJ3777 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8   r   s1C3F8 A;F F8FF8FF88GcdSror)rr>r`rcblksizeres r%razPackageIndex.reporthooks r2c|drt|S t||jS#tt jjf$r]}dd|j D}|r| ||nt|d||Yd}~dSd}~wtj j$r }|cYd}~Sd}~wtj j$rD}|r| ||jntd|d|j|Yd}~dSd}~wt jj$rC}|r| ||jnt|d|j|Yd}~dSd}~wt jjt(j f$r:}|r| ||ntd|d||Yd}~dSd}~wwxYw)Nr1r[c,g|]}t|Sr)r})reargs r%rPz)PackageIndex.open_url..s777CHH777r2zDownload error for rZz7 returned a bad status line. The server might be down, )r- local_openopen_with_authrr"httpclient InvalidURLrlrprrr:rrURLErrorreason BadStatusLineline HTTPExceptionsocket)rr>warningvrs r%rzPackageIndex.open_urlsv >>' " " #c?? " 8!#t{33 3DK23 B B B((7777788C B '3''''$SS%9::A('''''|%   HHHHHH|$ ? ? ? ? '18,,,,$n(+QXX&788=>?-,,,,,{(     '16****$SS!&&" +***** )6<8 8 8 8 8 '1%%%%$n(+QQ&011678&%%%%% 8sL;GAB..GC G G#9D""G98E77#G/GGct|\}}|r3d|vr.|dddd}d|v.nd}|dr |dd}tj||}|dks|d r|||S|d ks|d r|||S|d r| ||S|d krBtj tj |dS||d|||S)Nz...\___downloaded__rPr*svnzsvn+gitzgit+zhg+rrhT)rFreplacer,r_rBrlr- _download_svn _download_git _download_hgr:r url2pathnamer!r;r_attempt_download)rr@r>r<r.rEr`s r%r9zPackageIndex._download_urls*#..h  $$,,||D#..66tSAA$,,$D == $ $ 9D7<<-- U??f//77?%%c844 4 u__ 1 1& 9 9_%%c844 4   u % % 9$$S(33 3 v  >..v|/D/DS/I/I!/LMM M KKT " " "))#x88 8r2c2||ddS)NT)rrs r%rzPackageIndex.scan_url0s d#####r2c|||}d|ddvr||||S|S)Nrrr)rgrr+_download_html)rr>r`rs r%rzPackageIndex._attempt_download3sY##C22 W[[44::<< < <&&sGX>> >Or2ctt|}|D]m}|rWtjd|r@|t j||||cSnn|t j|td|z)Nz ([^- ]+ - )?Revision \d+:zUnexpected HTML page found at ) r��r~���rd���r���r���r_���r,��r��r���)r���r>���r���r`���r���ru��s��� r%���r��zPackageIndex._download_html:��s����H~~� � Dzz||� 9@$GG�=JJLLLIh'''--c8<<<<< �  (=CDDDr2���c��������������������t����������j��������dt���������������������|��������������������dd����������d���������}d}|����������������������������������������������������d����������rd|v�rt ����������j����������������������������|����������\��}}}}}} |s|��������������������d����������rd |d d����������v�r|d d������������������������������d d����������\��}}t����������|����������\��} } | rTd | v�r"| ��������������������d d����������\��} } d | d | }nd | z���}| }|||||| f}t ����������j�������� ��������������������|����������}|� ��������������������d||�����������t����������j ��������d|d|d|�����������|S�)Nz"SVN download support is deprecatedr8���r9���r���r���zsvn:@z//r4���rh���:z --username=z --password=z'Doing subversion checkout from %s to %sz svn checkoutz -q r[��)warningsr��� UserWarningr=���r+���r-���r:���r!���r;��� _splituser urlunparser���r_���system)r���r>���r`���credsr@���netlocrB���rf���qr���authhostuserpwr?���s��� r%���r��zPackageIndex._download_svnI��s��� :KHHHiiQ" 99;; ! !& ) )� 9cSjj,2L,A,A#,F,F )FFD!Q� 9dood33� 9tABBx#ABBx~~c155 '// d�9d{{#'::c1#5#5bbBF$$ K . 5!F"FCAq8E ,11%88C ;S(KKK uuuccc88DEEEr2���c�����������������J���t�����������j����������������������������|�����������\��}}}}}|��������������������dd����������d���������}|��������������������dd����������d���������}d�}d|v�r|��������������������dd����������\��}}t�����������j����������������������������||||df����������}�|�|fS�)N+r9���r5���r8���r���r��r���)r:���r!���urlsplitr=���rsplit urlunsplit)r>��� pop_prefixr@���r��rB���rD���r��revs��� r%���_vcs_split_rev_from_urlz$PackageIndex._vcs_split_rev_from_url_��s����,2L,A,A#,F,F)eTc1%%b)�zz#q!!!$ $;; C++ID#�l%%vvtUB&GHHCxr2���c�����������������8���|���������������������dd����������d���������}|���������������������|d����������\��}}|���������������������d||�����������t����������j��������d|d|�����������|0|���������������������d |�����������t����������j��������d |d |�����������|S�) Nr8���r9���r���Tr��zDoing git clone from %s to %szgit clone --quiet r[��zChecking out %szgit -C z checkout --quiet r=���r��r���r_���r��r���r>���r`���r��s��� r%���r��zPackageIndex._download_gitq��s����>>#q))!,///EES 13AAA sssHH=>>> ? II' - - - II� � �  �r2���c�����������������:���|���������������������dd����������d���������}|���������������������|d����������\��}}|���������������������d||�����������t����������j��������d|d|�����������|1|���������������������d |�����������t����������j��������d |d |d �����������|S�) Nr8���r9���r���Tr��zDoing hg clone from %s to %szhg clone --quiet r[��zUpdating to %sz hg --cwd z up -C -r z -qr��r��s��� r%���r��zPackageIndex._download_hg��s����>>#q))!,///EES 0#x@@@ ccc88<=== ? II& , , , II� � �  �r2���c�����������������*����t����������j��������|g|R���d�S�ro���)r���r���r ��s��� r%���r���zPackageIndex.debug��s ���� #r2���c�����������������*����t����������j��������|g|R���d�S�ro���)r���r���r ��s��� r%���r���zPackageIndex.info�� ���� tr2���c�����������������*����t����������j��������|g|R���d�S�ro���)r���r���r ��s��� r%���r���zPackageIndex.warn��r��r2���)r���r���NT)Fro���)FFFN)FF)*r���r���r���r���r���r���r���r���r���r��r���r��r���r��r��r&��r)��r/��r4��r(��r$��r6���r;��rL��r:��r]��rg��ra��r���r9��r��r��r��r�� staticmethodr��r��r��r���r���r��� __classcell__r���s���@r%���r���r�����s�������EE�?E'+ -� -� -� -� -� -!�!�!�!�!31�31�31�31j'�'�'�'  �  �  �  ?�?�?�� 2�2�2$ � � : � � &�&�&�& � � H�H�H�H�H�H�� )� )� )�� �� P� P� PF�AF*.J?�J?�J?�J?X � � � &�&�&P�L"�"�"H � � !8�!8�!8�!8F9�9�9:$�$�$�� E� E� E��,����\"�� �� ����������r2���r���z!&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?c�����������������T����|����������������������d����������}t����������j��������|����������S�)Nr���)rL���r���unescape)rK���whats��� r%��� decode_entityr����s!���� ;;q>>D =  r2���c�����������������,����t����������t����������|�����������S�)a�� Decode HTML entities in the given text. >>> htmldecode( ... 'https://../package_name-0.1.2.tar.gz' ... '?tokena=A&tokenb=B">package_name-0.1.2.tar.gz') 'https://../package_name-0.1.2.tar.gz?tokena=A&tokenb=B">package_name-0.1.2.tar.gz' ) entity_subr��)texts��� r%���r���r�����s����� mT * **r2���c�����������������������fd}|S�)Nc�����������������������fd}|S�)Nc����������������������t����������j��������������������}t����������j������������������� ��|�i�|t����������j��������|�����������S�#�t����������j��������|�����������w�xY�wro���)rw��getdefaulttimeoutsetdefaulttimeout)rp���rq��� old_timeoutrr���timeouts��� r%���_socket_timeoutz@socket_timeout.<locals>._socket_timeout.<locals>._socket_timeout��sd���� 244K  $W - - - 6tT,V,,(5555(5555s ���A�Ar���)rr���r��r��s���` r%���r��z'socket_timeout.<locals>._socket_timeout��s*���� 6� 6� 6� 6� 6� 6�r2���r���)r��r��s���` r%���socket_timeoutr����s$���� � � � � � r2���c���������������������t�����������j����������������������������|�����������}|��������������������������������}t ����������j��������|����������}|��������������������������������}|��������������������dd����������S�)a9�� Encode auth from a URL suitable for an HTTP header. >>> str(_encode_auth('username%3Apassword')) 'dXNlcm5hbWU6cGFzc3dvcmQ=' Long auth strings should not cause a newline to be inserted. >>> long_auth = 'username:' + 'password'*10 >>> chr(10) in str(_encode_auth(long_auth)) False  r���)r:���r!���r<���encodebase64 b64encoder���r��)r��auth_s auth_bytes encoded_bytesencodeds��� r%��� _encode_authr����s[�����\ ! !$ ' 'FJ$Z00M""$$G ??4 $ $$r2���c�������������������$����e�Zd�ZdZd�Zd�Zd�ZdS�) Credentialz: A username/password pair. Use like a namedtuple. c�����������������"����||�_���������||�_��������d�S�ro���usernamepassword)r���r��r��s��� r%���r���zCredential.__init__��s����    r2���c��������������#���.���K���|�j���������V��|�j��������V��d�S�ro���r��r���s��� r%���__iter__zCredential.__iter__��s(������mmr2���c�����������������&����dt����������|�����������z��S�)Nz%(username)s:%(password)s)varsr���s��� r%���__str__zCredential.__str__��s����*T$ZZ77r2���N)r���r���r���r���r���r��r��r���r2���r%���r��r����sK���������!�!�!��8�8�8�8�8r2���r��c�������������������@�����e�Zd�Z�fdZed�������������Zd�Zd�Z�xZS�) PyPIConfigc�����������������j���t�������������������������������g�dd����������}t������������������������������������������|�����������t����������j����������������������������t����������j����������������������������d����������d����������}t����������j����������������������������|����������r|� ��������������������|�����������dS�dS�)z% Load from ~/.pypirc )r��r�� repositoryr���~z.pypircN) dictfromkeysr���r���r_���rB���rl��� expanduserr���r���)r���defaultsrcr���s��� r%���r���zPyPIConfig.__init__��s�����==!G!G!GLL """ W\\"',,S119 = = 7>>"  �  IIbMMMMM � r2���c�����������������������fd����������������������������������D�������������}t����������t�����������j��������|��������������������S�)Nc�����������������d����g�|�],}���������������������|d�������������������������������������������*|-S�)r��)r���r~���)re���sectionr���s��� r%���rP��z2PyPIConfig.creds_by_repository.<locals>.<listcomp>��sI�����& �& �& xx..4466& & �& �& r2���)sectionsr��r|���_get_repo_cred)r���sections_with_repositoriess���` r%���creds_by_repositoryzPyPIConfig.creds_by_repository��sR����& �& �& �& #'==??& �& �& " �C+-GHHIIIr2���c��������������������|����������������������|d������������������������������������������}|t����������|����������������������|d������������������������������������������|����������������������|d����������������������������������������������������fS�)Nr��r��r��)r���r~���r��)r���r��repos��� r%���r��zPyPIConfig._get_repo_cred��st����xx..4466Z HHWj ) ) / / 1 1 HHWj ) ) / / 1 1 � � � r2���c�����������������v����|�j�����������������������������������������D�]\��}}|��������������������|����������r|c�S�dS�)z If the URL indicated appears to be a repository defined in this config, return the credential for that repository. N)r��itemsr-���)r���r>���r��creds��� r%���find_credentialzPyPIConfig.find_credential��sS���� �!% 8 > > @ @� �  J~~j))�    � r2���) r���r���r���r���propertyr��r��r��r��r��s���@r%���r��r����st�������� � � � � �J�J�XJ � � ������r2���r��c��������������������t�����������j����������������������������|�����������}|\��}}}}}}|��������������������d����������rt����������j����������������������������d����������|dv�rt����������|����������\��} } nd} | sMt���������������������� ��������������������|�����������} | r*t����������| ����������} | j ��������|�f} t����������j ��������dg| R���| rodt����������| ����������z���} || ||||f} t�����������j����������������������������| ����������}t�����������j����������������������������|����������}|��������������������d| �����������nt�����������j����������������������������|�����������}|��������������������dt&����������������������||����������}| rct�����������j����������������������������|j������������������\��}}}}}}||k����r2|| k����r,||||||f} t�����������j����������������������������| ����������|_��������|S�) z4Open a urllib2 request, handling HTTP authenticationr��znonnumeric port: '')ro��httpsNz*Authenticating as %s for %s (from .pypirc)zBasic Authorizationz User-Agent)r:���r!���r;���r,���ro��rp��rq��r��r��r��r}���r��r���r���r��r��r���Request add_header user_agentr>���)r>���r���parsedr@���r��rB���paramsrD���r��r��addressr��r���r?���r��r���rb��s2h2path2param2query2frag2s��� r%���rn��rn�� ��s����\ " "3 ' 'F06-FFD&%�s�<k$$%:;;; """"6** gg �J||++C00 � Jt99D=#%D HA ID I I I I �.,t,,,vud:,))%00.((11?D1111.((-- |Z000 B �4�06|/D/DRV/L/L,Bvvu <<B'MMvvu<E\,,U33BF Ir2���c�����������������D����|����������������������d����������\��}}}�|r|nd|�fS�)zNsplituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.r��N) rpartition)r��r��delims��� r%���r��r��;��s0�����,,D% #DDtd **r2���c���������������������|�S�ro���r���)r>���s��� r%��� fix_sf_urlr��F��s���� Jr2���c��������������������t�����������j����������������������������|�����������\��}}}}}}t�����������j����������������������������|����������}t ����������j����������������������������|����������rt�����������j����������������������������|�����������S�| ��������������������d����������rt ����������j�������� ��������������������|����������rg�}t ����������j ��������|����������D�]} t ����������j�������� ��������������������|| ����������} | dk����r>t����������| d����������5�} | ��������������������������������} ddd�����������n #�1�swxY�w�Y����nzt ����������j�������� ��������������������| ����������r| dz ��} |��������������������d��������������������| ���������������������d} | ��������������������|�d ��������������������|���������� ����������} d \��}}nd \��}}} d d i}t#����������j��������| ����������}t�����������j����������������������������|�||||����������S�)z7Read a local path, with special support for directoriesr4���z index.htmlrNz<a href="{name}">{name}</a>)r.���zB<html><head><title>{url}{files}r)r>files)OK)rzPath not foundz Not foundrz text/html)r:r!r;rrr_rBisfilerr,rrrlrrr2formatioStringIOrr)r>r@rArBparamrDrr`rrfilepathrbbodyrstatusmessager body_streams r%rmrmJs/5|/D/DS/I/I,FFD%~**400H w~~hC~%%c*** s  C h 7 7CH%% @ @Aw||Ha00HL  (C((%B7799D%%%%%%%%%%%%%%%x(( S LL6==1=EE F F F F5 ;;3dii.>.>;??D# B{+G+d##K < ! !#vw M MMsD((D, /D, ro)r)Zrsysr_rdrrTrwrrrr configparserr http.clientro urllib.parser:urllib.request urllib.error functoolsrr pkg_resourcesrrrrr r r r r rrrrr distutilsrdistutils.errorsrfnmatchrsetuptools.wheelr setuptools.extern.more_itertoolsrrrJIrrrKrr=rW__all___SOCKET_TIMEOUT_tmplr version_inforr&rrFrrIrarrtrxrrrrrrrrrrrRawConfigParserrrrrnrrrmrr2r%r!s))   ++++++""""""<<<<<<rz677 rz3RT:: 2:J  RZ,bd 3 3 9 . 4 4 6 6     F \\ W^S- .:GG 0    B26+     F   bj@"$GGLLL$2.B     ;   HRZ< = = A  + + +    %%%*88888888"#####-###L &~5++++^+++100@@NNNNNr2PK{5Z$6BLib/site-packages/setuptools/__pycache__/installer.cpython-311.pycnuW+A `;dddlZddlZddlZddlZddlZddlZddlmZddlm Z ddl Z ddl m Z ddl mZdZdZd ZdS) N)log)DistutilsError)Wheel)SetuptoolsDeprecationWarningct|tr|St|ttfsJ|S)z8Ensure find-links option end-up being a list of strings.) isinstancestrsplittuplelist) find_linkss cE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/installer.py_fixup_find_linksrsF*c"""!!! j5$- 0 0000 c  tjdt tjdn5#tj$r#|dtjYnwxYwt|}| d}d|vrtddtj vo dtj v}d tj vrd }nd |vr|d d }nd }d |vr#t|d d d d ng}|jr||jtj|}tj}tj|D]}||vr||r|cS t/j5} t2jdddddd| g} |r| d|| d|f|pgD]} | d| f| |jpt;| t=j| n4#t<j $r"} tt;| | d } ~ wwxYwtCtEj"tj#| dd} tj#|| $}| %|tj&|tj#|d}tj'(||}|cd d d S#1swxYwYd S)zLFetch an egg needed for building. Use pip/wheel to fetch/build a wheel.z\setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.wheelz,WARNING: The wheel package is not available. easy_install allow_hostszQthe `allow-hosts` option is not supported when using pip to install requirements. PIP_QUIET PIP_VERBOSE PIP_INDEX_URLN index_urlrrz-mpipz--disable-pip-version-checkz --no-depsz-wz--quietz --index-urlz --find-linksz*.whlrzEGG-INFO)metadata))warningswarnr pkg_resourcesget_distributionDistributionNotFoundannouncerWARN strip_markerget_option_dictrosenvironrdependency_linksextendpathrealpathget_egg_cache_dir Environmentfind_distributionscan_addtempfileTemporaryDirectorysys executableappendurlr subprocess check_callCalledProcessErrorrglobjoinegg_nameinstall_as_egg PathMetadata Distribution from_filename)distreqoptsquietrreggs_dir environmentegg_disttmpdircmdlinker dist_location dist_metadatas rfetch_build_eggrLs M /$ P&w////  -PPP DchOOOOOP s  C    / /DGHH H rz ) Mm2:.ME"*$$   %a(  7Ct7K7K$|,Q/0033  1$/000w 6 6 8 899H+--K!4X>> s??{228<>qABB Xu~~/?/?@@  ]+++%2 27<< zBBDD )77 M8339sG1/A#"A#4B M8IM8J%JJC$M88M<?M<cltjt|}d|_|S)z Return a new requirement without the environment marker to avoid calling pip with something like `babel; extra == "i18n"`, which would always be ignored. N)r Requirementparser marker)r@s rr#r#_s,  # ) )#c(( 3 3CCJ Jr)r8r%r5r1r/r distutilsrdistutils.errorsrrsetuptools.wheelr_deprecation_warningrrrLr#rrrVs  ++++++"""""">>>>>>EEEP     rPK{5Zi|mmCLib/site-packages/setuptools/__pycache__/build_meta.cpython-311.pycnuW+A `;dSLdZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z ddl m Z mZmZmZmZddlZddlZddlmZddlmZddlmZdd lmZdd lmZgd Zejd d  Z!de!"ddvZ#Gdde$Z%Gddej&j'Z'ej(dZ)dZ*dZ+dZ,ej(dZ-ee e.ee.ee.dffZ/ GddZ0Gdde0Z1Gdde1Z2e1Z3e3j4Z4e3j5Z5e3j6Z6e3j7Z7e3j8Z8e#se3j9Z9e3j:Z:e3j;Z;e2Zz+no_install_setup_requires..estr$N) setuptools_install_setup_requires)r3s r"no_install_setup_requiresr>\sK  -D););J&2 -1 ***T *1111s/=cDfdtjDS)Ncg|]A}tjtj|?|BSr()ospathisdirjoin).0namea_dirs r" z1_get_immediate_subdirectories..msK 9 9 9Tw}}RW\\%6677 9D 9 9 9r$)rAlistdir)rGs`r"_get_immediate_subdirectoriesrJls7 9 9 9 9RZ.. 9 9 99r$cfdtj|D} |\}n#t$rtdwxYw|S)Nc3FK|]}||VdSrendswith)rEf extensions r" z'_file_with_extension..rsI ::i  r$z[No distribution was found. Ensure that `setup.py` is not empty and that it calls `setup()`.)rArI ValueError) directoryrPmatchingfiles ` r"_file_with_extensionrVqs|:i((H9 999 899 99 Ks (Actj|stjdSt t dt|S)Nz%from setuptools import setup; setup()open)rArBexistsioStringIOgetattrtokenizerX setup_scripts r"_open_setup_scriptr`sF 7>>, ' 'E{CDDD *78VT * *< 8 88r$c#Ktj5tjdddVddddS#1swxYwYdS)Nignorezsetup.py install is deprecated)warningscatch_warningsfilterwarningsr(r$r"suppress_known_deprecationrfs  " "*JKKK s=AAceZdZdZdededeefdZdZdede efdZ dede efdZ dede efd Z dede efd Z d S) _ConfigSettingsTranslatorzTranslate ``config_settings`` into distutils-style command arguments. Only a limited number of options is currently supported. keyconfig_settingsreturnc|pi}||pg}t|trtj|n|S)aA Get the value of a specific key in ``config_settings`` as a list of strings. >>> fn = _ConfigSettingsTranslator()._get_config >>> fn("--global-option", None) [] >>> fn("--global-option", {}) [] >>> fn("--global-option", {'--global-option': 'foo'}) ['foo'] >>> fn("--global-option", {'--global-option': ['foo']}) ['foo'] >>> fn("--global-option", {'--global-option': 'foo'}) ['foo'] >>> fn("--global-option", {'--global-option': 'foo bar'}) ['foo', 'bar'] )get isinstancestrshlexsplit)r!rirjcfgoptss r" _get_configz%_ConfigSettingsTranslator._get_configsF$#wws||!r$.tS$9$9Cu{4   tCr$cZdtjjjD}d|DS)z>Global options accepted by setuptools (e.g. quiet or verbose).c3*K|]}|ddVdS)Nr()rEopts r"rQzB_ConfigSettingsTranslator._valid_global_options..s*RRs3rr7RRRRRRr$c h|] }|D]}|| Sr(r()rElong_and_shortflags r" zB_ConfigSettingsTranslator._valid_global_options..s+VVV~VVtQUVVVVVr$)r<distr*global_options)r!optionss r"_valid_global_optionsz/_ConfigSettingsTranslator._valid_global_optionss1RRjo&B&QRRRVV7VVVVr$c# K|pi}hd}d|vsd|vrUt|dp|dpd}||vrdndVd|vsd|vrUt|dp|dpd}||vrdndV||d |}fd |DEd {Vd S) a Let the user specify ``verbose`` or ``quiet`` + escape hatch via ``--global-option``. Note: ``-v``, ``-vv``, ``-vvv`` have similar effects in setuptools, so we just have to cover the basic scenario ``-v``. >>> fn = _ConfigSettingsTranslator()._global_args >>> list(fn(None)) [] >>> list(fn({"verbose": "False"})) ['-q'] >>> list(fn({"verbose": "1"})) ['-v'] >>> list(fn({"--verbose": None})) ['-v'] >>> list(fn({"verbose": "true", "--global-option": "-q --no-user-cfg"})) ['-v', '-q', '--no-user-cfg'] >>> list(fn({"--quiet": None})) ['-q'] >0noofffalseverbosez --verbose1z-qz-vquietz--quiet--global-optionc3JK|]}|dv|VdS)rN)strip)rEargvalids r"rQz9_ConfigSettingsTranslator._global_args..s7CCC399S>>U+B+BC+B+B+B+BCCr$N)rormlowerrrt)r!rjrrfalseylevelargsrs @r" _global_argsz&_ConfigSettingsTranslator._global_argssA*#,,,   {c11 **Icggk.B.BIcJJE ;;==F2244 = = = c>>Y#--((ECGGI,>,>E#FFE ;;==F2244 = = =**,, 1?CCCCCC4CCCCCCCCCCCCr$c#K|pi}d|vr,tt|dpd}|rdndVd|vrdt|dgEd{VdSdS)a The ``dist_info`` command accepts ``tag-date`` and ``tag-build``. .. warning:: We cannot use this yet as it requires the ``sdist`` and ``bdist_wheel`` commands run in ``build_sdist`` and ``build_wheel`` to re-use the egg-info directory created in ``prepare_metadata_for_build_wheel``. >>> fn = _ConfigSettingsTranslator()._ConfigSettingsTranslator__dist_info_args >>> list(fn(None)) [] >>> list(fn({"tag-date": "False"})) ['--no-date'] >>> list(fn({"tag-date": None})) ['--no-date'] >>> list(fn({"tag-date": "true", "tag-build": ".a"})) ['--tag-date', '--tag-build', '.a'] ztag-daterz --tag-datez --no-datez tag-buildz --tag-buildN)rro)r!rjrrvals r"__dist_info_argsz*_ConfigSettingsTranslator.__dist_info_argss&#   CJ :7;;<>> fn = _ConfigSettingsTranslator()._editable_args >>> list(fn(None)) [] >>> list(fn({"editable-mode": "strict"})) ['--mode', 'strict'] z editable-mode editable_modeNz--mode)rmro)r!rjrrmodes r"_editable_argsz(_ConfigSettingsTranslator._editable_argssj#ww''C377?+C+C  Fc$ii((((((((((r$c#LK|d|}|}g}|D]2}|d|vr|||V3|d|Ed{V|r"d|d}t j|t dSdS)aV Users may expect to pass arbitrary lists of arguments to a command via "--global-option" (example provided in PEP 517 of a "escape hatch"). >>> fn = _ConfigSettingsTranslator()._arbitrary_args >>> list(fn(None)) [] >>> list(fn({})) [] >>> list(fn({'--build-option': 'foo'})) ['foo'] >>> list(fn({'--build-option': ['foo']})) ['foo'] >>> list(fn({'--build-option': 'foo'})) ['foo'] >>> list(fn({'--build-option': 'foo bar'})) ['foo', 'bar'] >>> warnings.simplefilter('error', SetuptoolsDeprecationWarning) >>> list(fn({'--global-option': 'foo'})) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): SetuptoolsDeprecationWarning: ...arguments given via `--global-option`... rrz--build-optionNz The arguments z were given via `--global-option`. Please use `--build-option` instead, `--global-option` is reserved to flags like `--verbose` or `--quiet`. )rtrrappendrcwarnr )r!rjr global_optsbad_argsrmsgs r"_arbitrary_argsz)_ConfigSettingsTranslator._arbitrary_args s. 1?CC0022   Cyy~~[00$$$ ##$4oFFFFFFFFF  =#C M#; < < < < <  = =r$N)r%r&r'__doc__ro_ConfigSettingsrrtrrr)_ConfigSettingsTranslator__dist_info_argsrrr(r$r"rhrhs DsD_DcDDDD,WWW DO D D D D DD>>HSM>>>>4)o)(3-)))) (=(=8C=(=(=(=(=(=(=r$rhceZdZdZddZddZddZdeded efd Zdeded e fd Z dd Z d Z ddZ ddZdeed eefdZes ddZddZ ddZdSdS)_BuildMetaBackendcngtjdd||d||t_ t5|dddn #1swxYwYn!#t$r}||jz }Yd}~nd}~wwxYw|S)Nr egg_info) sysargvrrr*r4 run_setuprr )r!rj requirementses r"_get_build_requiresz%_BuildMetaBackend._get_build_requires7s Xbqb\    / /    ! !/ 2 2    )##%% ! !    ! ! ! ! ! ! ! ! ! ! ! ! ! ! !% ) ) ) AL (LLLLLL )s<B'B< BB  BB B B2 B--B2setup.pyc|}d}t|5}|dd}dddn #1swxYwYt|t dS)N__main__z\r\nz\n)r`readreplaceexeclocals)r!r___file__r%rOcodes r"rz_BuildMetaBackend.run_setupFs   ) ) 4Q6688##GU33D 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 T688s)A  A A Nc2||dgS)Nwheelrrr!rjs r"rz._BuildMetaBackend.get_requires_for_build_wheelQs''wi'PPPr$c0||gS)Nrrrs r"rz._BuildMetaBackend.get_requires_for_build_sdistTs''b'IIIr$metadata_directorysuffixrkc|||}t|j|s"tjt |||jS)z PEP 517 requires that the .dist-info directory be placed in the metadata_directory. To comply, we MUST copy the directory to the root. Returns the basename of the info directory, e.g. `proj-0.0.0.dist-info`. )_find_info_directoryr parentshutilmoverorF)r!rrinfo_dirs r"_bubble_up_info_directoryz+_BuildMetaBackend._bubble_up_info_directoryWsP,,-?HH*<== ; KH '9 : : :}r$cLtj|D]s\}}}fd|D}t|dkst|dkr9t|dksJddt||dcStdd|}t j|)Nc>g|]}||Sr(rM)rErOrs r"rHz:_BuildMetaBackend._find_info_directory..fs*@@@QZZ-?-?@!@@@r$rr z Multiple z directories foundzNo z directory found in )rAwalklenrr InternalError)r!rrrdirsr candidatesrs ` r"rz&_BuildMetaBackend._find_info_directoryds!w'9:: 3 3OFD!@@@@T@@@J:!##s4yyA~~:!+++-S-S-S-S+++FJqM22222(6EFDD0BDD"3'''r$cHgtjdd||dd|dt_t5|dddn #1swxYwY||d||dS)Nr dist_infoz --output-dirz--keep-egg-infoz .egg-infoz .dist-info)rrrr>rrr!rrjs r"rz2_BuildMetaBackend.prepare_metadata_for_build_wheelos Xbqb\    / /      /    ' ( (   NN                   &&'9;GGG--.@,OOOs A--A14A1c tj|}tj|dt j|5}gt jdd|||d|| |t _t5| dddn #1swxYwYt||}tj ||}tj|rtj|tjtj |||dddn #1swxYwY|S)NT)exist_ok)dirr z --dist-dir)rArBabspathmakedirstempfileTemporaryDirectoryrrrrr>rrVrDrYremoverename)r! setup_commandresult_extensionresult_directoryrj tmp_dist_dirresult_basename result_paths r"_build_with_temp_dirz&_BuildMetaBackend._build_with_temp_dir~s7??+;<< $t4444  (-= > > > P,"1"""?33 +  %%o66 CH+,, ! !    ! ! ! ! ! ! ! ! ! ! ! ! ! ! !3.00O',,'7IIKw~~k** ' +&&& Ibgll<AA; O O O# P P P P P P P P P P P P P P P&s8 AE8*C ? E8 C E8C BE88E<?E<ct5|dgd||cdddS#1swxYwYdS)N bdist_wheel.whl)rfr)r!wheel_directoryrjrs r"rz_BuildMetaBackend.build_wheels ' ) ) O O,,m_f- P P P P6<@'+OOOO :::: NXc]NxPS}NNNN MQ     F F F FAE      +r$rc$eZdZdZdfd ZxZS)_BuildMetaLegacyBackendaOCompatibility backend for setuptools This is a version of setuptools.build_meta that endeavors to maintain backwards compatibility with pre-PEP 517 modes of invocation. It exists as a temporary bridge between the old packaging mechanism and the new packaging mechanism, and will eventually be removed. rc.ttj}tjtj|}|tjvr tjd|tjd}|tjd< tt| ||tjdd<|tjd<dS#|tjdd<|tjd<wxYw)Nrr^) r,rrBrAdirnamerinsertrsuperrr)r!r_sys_path script_dir sys_argv_0 __class__s r"rz!_BuildMetaLegacyBackend.run_setups>>W__RW__\%B%BCC SX % % HOOAz * * * Xa[ "  % )  ! | <<<#CHQQQK$CHQKKK#CHQQQK$CHQK $ $ $ $s ')C22"Dr)r%r&r'rr __classcell__)rs@r"rrsG  %%%%%%%%%%r$r)=rrZrArprr]rr6rrcpathlibrtypingrrrrrr<r0rr _pathr _reqsr _deprecation_warningr distutils.utilr__all__getenvrrrr BaseExceptionrr}r*r7r>rJrVr`rfrorrhrr_BACKENDrrrrrrrrrr(r$r"rsS8  88888888888888 >>>>>>$$$$$$ % % %'RY'CRHHNNPP#'A'I'I#s'S'SS%%%%%]%%% /////:?////,  2 2 2999   999  4U3S 4+?%@ @AB U=U=U=U=U=U=U=U=pNNNNN1NNNb%%%%%%%%%%/%%%%%%R    'D'D#+#L " " -&.&N#*2*V',N% $ & & r$PK{5Z6Ť@Lib/site-packages/setuptools/__pycache__/version.cpython-311.pycnuW+A `;dVddlZ ejdjZdS#e$rdZYdSwxYw)N setuptoolsunknown) pkg_resourcesget_distributionversion __version__ ExceptionaE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/version.pyr sU0-0>>FKKKKKKKs ((PK{5Zt>Lib/site-packages/setuptools/__pycache__/_reqs.cpython-311.pycnuW+A `;d6ddlmcmcmZddlmZdZdZdS)N) Requirementc~tjttjtj|S)z Yield requirement strings for each specification in `strs`. `strs` must be a string, or a (possibly-nested) iterable thereof. )textjoin_continuationmap drop_comment yield_linesstrss _E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_reqs.py parse_stringsr s-  !#d&79I$9O9O"P"P Q QQcFttt|S)zN Deprecated drop-in replacement for pkg_resources.parse_requirements. )rrr r s r parsers {M$// 0 00r)setuptools.extern.jaraco.textexternjaracor pkg_resourcesrr rrr rsf,,,,,,,,,,,,%%%%%%RRR11111rPK{5Z=uFLib/site-packages/setuptools/__pycache__/_entry_points.cpython-311.pycnuW+A `;dJddlZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z dZ d Zd Zd ejfd Zejd ZeedZeedded ejfdZdZdS)N) yield_lines) pass_none)metadata) ensure_unique)consumec|jdS)zR Exercise one of the dynamic properties to trigger the pattern match. N)extraseps gE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_entry_points.py ensure_validr s IIIIct|}d|dd|z}tj|S)zf Given a value of an entry point or series of entry points, return each as an EntryPoint. []  )rjoinr EntryPoints _from_text)valuegrouplinestexts r load_grouprsF   E u>>>DIIe,, ,D   * *4 0 00rc|j|jfSN)rnamer s r by_group_and_namers 8RW repsc rtttt|t|S)zM Ensure entry points are unique by group and name and validate each. key)rmaprrrr s r validater&#s/ C mC5FGGG H HIII Jrctjd|D}t t j|S)zA Given a Distribution.entry_points, produce EntryPoints. c3<K|]\}}t||VdSr)r).0rrs r zload..0sD+)+) E5 5%  +)+)+)+)+)+)r) itertoolschain from_iterableitemsr&rr)r groupss r loadr0+sZ _ * *+)+)IIKK+)+)+)))F H(00 1 11rc~ttjtj|S)z >>> ep, = load('[console_scripts]\nfoo=bar') >>> ep.group 'console_scripts' >>> ep.name 'foo' >>> ep.value 'bar' )r&rrrr%s r _r26s. H()=)H)H)M)MNN O OOrc|Sr)xs r r6DsArctjd}tjt |||}dd|DS)Nrr"rc3HK|]\}}d|dt|dVdS)rrrN) render_items)r)rr.s r r*zrender..LsU E5 .E--l5))---r)operator attrgetterr+groupbysortedr)r by_groupr/s r renderr?Gsc"7++H  vcx888( C CF 99"  rcZddt|DS)Nrc38K|]}|jd|jVdS)z = N)rr)r)r s r r*zrender_items..SsH  7!!rx!!r)rr=r%s r r9r9Rs: 99++  r) functoolsr:r+extern.jaraco.textrextern.jaraco.functoolsr _importlibr _itertoolsrextern.more_itertoolsrrrrrr&singledispatchr0registerstrr2typer?r9r4rr rLsx++++++...... %%%%%%******111(& 222s P P P dd4jj++&&& $ rPK{5Z oCLib/site-packages/setuptools/__pycache__/_importlib.cpython-311.pycnuW+A `;dddlZdZejdkrddlmZeenddlmZejdkrddlmZdSddl mZdS)Nc ddln6#t$rYdSt$rddl}d}||wxYw|urdSfdt jD}|D]!}t j|"dS)zu Ensure importlib_metadata doesn't provide older, incompatible Distributions. Workaround for #3102. rNz`importlib-metadata` version is incompatible with `setuptools`. This problem is likely to be solved by installing an updated version of `importlib-metadata`.c>g|]}t|j|S) isinstanceMetadataPathFinder).0obimportlib_metadatas dE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_importlib.py z5disable_importlib_metadata_finder..s=  b,? @ @ )r ImportErrorAttributeErrorwarningswarnsys meta_pathremove)metadatarmsg to_removeitemr s @r !disable_importlib_metadata_finderrs !!!!!      $  c  X%%-I ## T""""##s  ;&;) )r )r )importlib_resources) rr version_infosetuptools.externr rimportlib.metadatar resourcesimportlib.resourcesrr r r#s ###Bg@@@@@@%%h////))))))fBBBBBBBB++++++++r PK{5ZX=Lib/site-packages/setuptools/__pycache__/msvc.cpython-311.pycnuW+A `;dldZddlZddlmZddlmZmZddlmZm Z m Z m Z ddl Z ddl Z ddlZddlZddlZddlZddlmZddlmZdd lmZejd kr ddlZdd lmZnGd d ZeZdZdZdddddZdZ dZ!dZ"dZ#d#dZ$GddZ%GddZ&Gdd Z'Gd!d"Z(dS)$a Improved support for Microsoft Visual C++ compilers. Known supported compilers: -------------------------- Microsoft Visual C++ 14.X: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) Microsoft Visual Studio Build Tools 2019 (x86, x64, arm, arm64) This may also support compilers shipped with compatible Visual Studio versions. N)open)listdirpathsep)joinisfileisdirdirname) LegacyVersion)unique_everseen) get_unpatchedWindows)environceZdZdZdZdZdZdS)winregN)__name__ __module__ __qualname__ HKEY_USERSHKEY_CURRENT_USERHKEY_LOCAL_MACHINEHKEY_CLASSES_ROOT^E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/msvc.pyrr#s'  ! rrc, tjtjddtjtjz}n#t $rYdSwxYwd}d}|5t jD]} tj||\}}}n#t $rYnkwxYw|rd|tj krTt|rE tt|}n#ttf$rYwxYw|dkr ||kr||}}dddn #1swxYwY||fS)0Python 3.8 "distutils/_msvccompiler.py" backportz'Software\Microsoft\VisualStudio\SxS\VC7rNNN)rOpenKeyrKEY_READKEY_WOW64_32KEYOSError itertoolscount EnumValueREG_SZrintfloat ValueError TypeError)key best_versionbest_dirivvc_dirvtversions r_msvc14_find_vc2015r4,sn  % 6 Of4 4    zzLH = ="" = =A  & 0a 8 8 622     =R6=((U6]](!%((mmGG"I.Hb==W|%;%;-4f(L = = = = = = = = = = = = = = =  !!si8; A A D)BD B DB$D6CDC'$D&C''DD D ctjdptjd}|sdS tjt |dddddd d d d d d dddg dd}n##tjttf$rYdSwxYwt |ddd}t|rd|fSdS)aPython 3.8 "distutils/_msvccompiler.py" backport Returns "15, path" based on the result of invoking vswhere.exe If no install is found, returns "None, None" The version is returned to avoid unnecessarily changing the function result. It may be ignored when the path is not None. If vswhere.exe is not available, by definition, VS 2017 is not installed. ProgramFiles(x86) ProgramFilesrzMicrosoft Visual Studio Installerz vswhere.exez-latestz -prereleasez -requiresAnyz -requiresz1Microsoft.VisualStudio.Component.VC.Tools.x86.x64z)Microsoft.VisualStudio.Workload.WDExpressz -propertyinstallationPathz -products*mbcsstrict)encodingerrorsVC AuxiliaryBuild) rget subprocess check_outputrdecodestripCalledProcessErrorr#UnicodeDecodeErrorr)rootpaths r_msvc14_find_vc2017rLJs ;* + + Jw{>/J/JD z & 0+} M M    L D +  (    66(6 3 3EEGG   )74F Gzz dK 1 1D T{{4x :sABB&%B&x86x64armarm64)rM x86_amd64x86_arm x86_arm64c t\}}d}|tvrt|}nd|vrdnd}|rYt|ddddd|d d } d dl}||d d}n#tt t f$rd}YnwxYw|s&t\}}|rt|d|dd }|sdSt|d}t|sdS|rt|sd}||fS)rNamd64rNrMz..redistMSVCz**zMicrosoft.VC14*.CRTzvcruntime140.dllrT) recursivezMicrosoft.VC140.CRTrz vcvarsall.bat) rLPLAT_SPEC_TO_RUNTIMErglob ImportErrorr# LookupErrorr4r) plat_spec_r. vcruntimevcruntime_platvcredistr[r- vcvarsalls r_msvc14_find_vcvarsallrdws]%''KAxI(((-i8")Y"6"6E$h&(=*,,  KKK (d ;;B?IIWk2   III  H!4!6!6 h  HXx24FHHI zX//I )  z F9-- i s !A//B  B cJdtvrdtjDSt|\}}|stjd t jd||t j  dd}nO#t j $r=}tjd |j |d }~wwxYwd d | DD}|r||d <|S)rDISTUTILS_USE_SDKc>i|]\}}||Srlower).0r,values r z&_msvc14_get_vc_env..s6   U IIKK   rzUnable to find vcvarsall.batzcmd /u /c "{}" {} && set)stderrzutf-16lereplace)r>zError executing {}NcHi|]\}}}|| || Srrh)rjr,r_rks rrlz&_msvc14_get_vc_env..sH    CE      U   rc3@K|]}|dVdS)=N) partition)rjlines r z%_msvc14_get_vc_env..s.::  ::::::rpy_vcruntime_redist)ritemsrd distutilsr>DistutilsPlatformErrorrDrEformatSTDOUTrFrHcmd splitlines)r^rcr`outexcenvs r_msvc14_get_vc_envrsbg%%  %moo    2)<<Iy  55 *   % & - -i C C$    &I& . .   (55 ' ' 0 0       ;:)9)9:::   C/%. !" JsA B%%C148C,,C1c| t|S#tjj$r}t |dd}~wwxYw)a* Patched "distutils._msvccompiler._get_vc_env" for support extra Microsoft Visual C++ 14.X compilers. Set environment without use of "vcvarsall.bat". Parameters ---------- plat_spec: str Target architecture. Return ------ dict environment ,@N)rrwr>rx_augment_exception)r^r~s rmsvc14_get_vc_envrsM&!),,,   23%%% s;6;cdtjvr@ddl}t|jtdkr|jjj|i|Stt|i|S)z Patched "distutils._msvccompiler.gen_lib_options" for fix compatibility between "numpy.distutils" and "distutils._msvccompiler" (for Numpy < 1.11.2) znumpy.distutilsrNz1.11.2) sysmodulesnumpyr __version__rw ccompilergen_lib_optionsr msvc14_gen_lib_options)argskwargsnps rrrsu CK''  ( (=+B+B B B92<)94J6JJ J 0=/ 0 0$ A& A AArcz|jd}d|vsd|vryd}|jdit}d}|dkr7|ddkr|d z }n%|d z }n|d kr|d z }||d zz }n |dkr|dz }|f|_dS)zl Add details to the exception message to help guide the user as to what action will resolve it. rrczvisual cz;Microsoft Visual C++ {version:0.1f} or greater is required.z-www.microsoft.com/download/details.aspx?id=%d"@ia64rYz( Get it with "Microsoft Windows SDK 7.0"z% Get it from http://aka.ms/vcpython27$@z* Get it with "Microsoft Windows SDK 7.1": iW rzd Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/Nr)rrirylocalsfind)r~r3archmessagetmpl msdownloads rrrs hqkGgmmoo%%w}})F)FL$+))))D c>>zz||  ((2--EE BB __ C CG zD( (GG __ 4 5G{CHHHrceZdZdZejddZdZe dZ dZ dZ d d Z d d Zdd Zd S) PlatformInfoz Current and Target Architectures information. Parameters ---------- arch: str Target architecture. processor_architecturerc`|dd|_dS)NrNrU)rirnr)selfrs r__init__zPlatformInfo.__init__s%JJLL((88 rcV|j|jddzdS)zs Return Target CPU architecture. Return ------ str Target CPU r_r N)rrrs r target_cpuzPlatformInfo.target_cpus*y,,q01122rc|jdkS)z Return True if target CPU is x86 32 bits.. Return ------ bool CPU is x86 32 bits rMrrs r target_is_x86zPlatformInfo.target_is_x86(s%''rc|jdkS)z Return True if current CPU is x86 32 bits.. Return ------ bool CPU is x86 32 bits rM current_cpurs rcurrent_is_x86zPlatformInfo.current_is_x863s5((rFcR|jdkr|rdn|jdkr|rdn d|jzS)uk Current platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '†' if architecture is x86. x64: bool return 'd' and not 'md64' if architecture is amd64. Return ------ str subfolder: ' arget', or '' (see hidex86 parameter) rMrrU\x64\%srrhidex86rNs r current_dirzPlatformInfo.current_dir>sB"#u,,,BB(G333GG T% % rcR|jdkr|rdn|jdkr|rdn d|jzS)ar Target platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. Return ------ str subfolder: '\current', or '' (see hidex86 parameter) rMrrUrrrrs r target_dirzPlatformInfo.target_dirTs?"?e+++BB722s2GG T_ $ rc|rdn|j}|j|krdn*|dd|zS)ap Cross platform specific subfolder. Parameters ---------- forcex86: bool Use 'x86' as current architecture even if current architecture is not x86. Return ------ str subfolder: '' if target architecture is current architecture, '\current_target' if not. rMr\z\%s_)rrrrn)rforcex86currents r cross_dirzPlatformInfo.cross_dirjsM $9%%)9/W,,BB OO   % %dGg,= > > rN)FFF)rrr__doc__rrCrirrpropertyrrrrrrrrrrrs'+6;;AACCK999 3 3X 3 ( ( ( ) ) )    ,    ,      rrc eZdZdZejejejejfZ dZ e dZ e dZ e dZe dZe dZe dZe d Ze d Ze d Zdd ZdZdS) RegistryInfoz Microsoft Visual Studio related registry information. Parameters ---------- platform_info: PlatformInfo "PlatformInfo" instance. c||_dSN)pi)r platform_infos rrzRegistryInfo.__init__s rcdS)z Microsoft Visual Studio root registry key. Return ------ str Registry key VisualStudiorrs r visualstudiozRegistryInfo.visualstudios ~rc,t|jdS)z Microsoft Visual Studio SxS registry key. Return ------ str Registry key SxS)rrrs rsxszRegistryInfo.sxssD%u---rc,t|jdS)z| Microsoft Visual C++ VC7 registry key. Return ------ str Registry key VC7rrrs rvczRegistryInfo.vcDHe$$$rc,t|jdS)z Microsoft Visual Studio VS7 registry key. Return ------ str Registry key VS7rrs rvszRegistryInfo.vsrrcdS)z Microsoft Visual C++ for Python registry key. Return ------ str Registry key zDevDiv\VCForPythonrrs r vc_for_pythonzRegistryInfo.vc_for_pythons %$rcdS)zq Microsoft SDK registry key. Return ------ str Registry key zMicrosoft SDKsrrs r microsoft_sdkzRegistryInfo.microsoft_sdks  rc,t|jdS)z Microsoft Windows/Platform SDK registry key. Return ------ str Registry key rrrrs r windows_sdkzRegistryInfo.windows_sdksD& 222rc,t|jdS)z Microsoft .NET Framework SDK registry key. Return ------ str Registry key NETFXSDKrrs r netfx_sdkzRegistryInfo.netfx_sdksD& 333rcdS)z Microsoft Windows Kits Roots registry key. Return ------ str Registry key zWindows Kits\Installed Rootsrrs rwindows_kits_rootszRegistryInfo.windows_kits_rootss /.rFcd|js|rdnd}td|d|S)a Return key in Microsoft software registry. Parameters ---------- key: str Registry key path where look. x86: str Force x86 software registry. Return ------ str Registry key r Wow6432NodeSoftware Microsoft)rrr)rr,rMnode64s r microsoftzRegistryInfo.microsofts9 w--//I3IMJ S999rc :tj}tj}tj}|j}|jD]}d} ||||d|}nd#t tf$rP|j s2 ||||dd|}n#t tf$rYYuwxYwY{YnwxYw tj ||d|r||cScS#t tf$rYnwxYw |r ||#|r ||wwxYwdS)a Look for values in registry in Microsoft software registry. Parameters ---------- key: str Registry key path where look. name: str Value name to find. Return ------ str value NrT) rr!r CloseKeyrHKEYSr#IOErrorrr QueryValueEx) rr,namekey_readopenkeyclosekeymshkeybkeys rlookupzRegistryInfo.lookups ?.? ^J # #DD wtRRWWa::W%   w--//!&wtRRT]]AxHH#W-!!! !H   #*466q9#HTNNNNNN###W%    #HTNNN#HTNNNN## # #sYA*B1;BB1B)%B1(B))B10B15C""C63D5C66DDNr)rrrrrrrrrrrrrrrrrrrrrrrrrrrrsd   %  &  % 'E      X  . .X . % %X % % %X % % %X %   X   3 3X 3 4 4X 4 / /X /::::&&#&#&#&#&#rrceZdZdZejddZejddZejdeZddZ dZ d Z d Z e d Zed Zed ZdZdZedZedZedZedZedZedZedZedZedZedZedZedZedZ dZ!e d dZ"dS)! SystemInfoz Microsoft Windows and Visual Studio related system information. Parameters ---------- registry_info: RegistryInfo "RegistryInfo" instance. vc_ver: float Required Microsoft Visual C++ version. WinDirrr7r6Nc||_|jj|_||_|p|x|_|_dSr)rirfind_programdata_vs_versknown_vs_paths_find_latest_available_vs_vervs_vervc_ver)r registry_infors rrzSystemInfo.__init__LsO'*";;==  :d88:: < dkkkrc|}|s&|jstjdt |}||jt|dS)zm Find the latest VC version Return ------ float version z%No Microsoft Visual C++ version foundrY)find_reg_vs_versrrwr>rxsetupdatesorted)r reg_vc_versvc_verss rrz(SystemInfo._find_latest_available_vs_verVsz++--  9t2 9"99799 9k""t*+++gr""rc |jj}|jj|jj|jjf}g}t j|jj|D]~\}} tj |||dtj }n#ttf$rYEwxYw|5tj |\}}} t|D]t} tjt"5t%tj|| d} | |vr|| dddn #1swxYwYut|D]n} tjt"5t%tj|| } | |vr|| dddn #1swxYwYo dddn #1swxYwYt-|S)z Find Microsoft Visual Studio versions available in registry. Return ------ list of float Versions rN)rrrrrr$productrrr r!r#r QueryInfoKeyrange contextlibsuppressr*r)r&appendEnumKeyr) rrvckeysvs_versrr,rsubkeysvaluesr_r/vers rrzSystemInfo.find_reg_vs_versisW '*dg3TWZ@"*47=&AA 0 0ID# ~dBBsGGQHHW%     0 0%+%8%>%>"v00A#,Z8800#F$4T1$=$=a$@AAg--#NN3///000000000000000w00A#,Z8800#FN4$;$;<<g--#NN3///0000000000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0gsn*BBBAGAD- ! G-D1 1G4D1 5.G#rx)rrKmsgs r VCInstallDirzSystemInfo.VCInstallDirsS~~:4#8#8#:#:T{{ ?> > rcN|jdkrdS |j|j}n#t$r |j}YnwxYwt |d} t |d}|||_t ||S#tttf$rYdSwxYw)zl Locate Visual C++ for VS2017+. Return ------ str path rrrrY) rrrr$rrrrr#r IndexError)rvs_dirguess_vcrs rr&zSystemInfo._guess_vcs ;$  2 '(5FF ' ' '&FFF ' 011 X&&r*F0088DK&)) )*-   22 s"66 >B B$#B$c<t|jd|jz}t|jjd|jz}|j|d}|rt|dn|}|j|jjd|jzp|S)z{ Locate Visual C++ for versions prior to 2017. Return ------ str path z Microsoft Visual Studio %0.1f\VCr! installdirr?)rr"rrrrr)rr#reg_path python_vc default_vcs rr'zSystemInfo._guess_vc_legacyst+:T[HJJ-w/DEEGNN8\:: .7DT)T***W w~~dgj'DK*?@@NJNrc|jdkrdS|jdkrdS|jdkrdS|jdkrdS|jd krd Sd S) z Microsoft Windows SDK versions for specified MSVC++ version. Return ------ tuple of str versions r)z7.0z6.1z6.0ar)z7.1z7.0a&@)z8.0z8.0a(@)8.1z8.1ar)z10.0r6Nrrs rWindowsSdkVersionzSystemInfo.WindowsSdkVersionsg ;#  '' [D  = [D  = [D  = [D  =! rcR|t|jdS)zt Microsoft Windows SDK last version. Return ------ str version lib)_use_last_dir_namer WindowsSdkDirrs rWindowsSdkLastVersionz SystemInfo.WindowsSdkLastVersion-s%&&tD,>'F'FGGGrcd}|jD]>}t|jjd|z}|j|d}|rn?|rt |sOt|jjd|jz}|j|d}|rt|d}|rt |sR|jD]J}|d|d}d |z}t|j |}t |r|}K|rt |s5|jD]-}d |z}t|j |}t |r|}.|st|j d }|S) zn Microsoft Windows SDK directory. Return ------ str path rzv%sinstallationfolderr!r/WinSDKNrzMicrosoft SDKs\Windows Kits\%szMicrosoft SDKs\Windows\v%s PlatformSDK) r8rrrrrrrrfindr7r))rsdkdirr locrK install_baseintverds rr<zSystemInfo.WindowsSdkDir9s)  Ctw*ECK88CW^^C)=>>F   6U6]] 6-w/DEED7>>$ ==L 6lH55 U6]] -  _ciinn_-86A*D1188F U6]] -  4s:*D1188F <$+];;F rc|jdkrd}d}n-d}|jdkrdnd}|jd|}d ||d d fz}g}|jd kr)|jD]!}|t |jj||gz }"|jD]$}|t |jj d |z|gz }%|D]#}|j |d}|r|cS$dS)zy Microsoft Windows SDK executable directory. Return ------ str path r4#r(r5TF)rNrzWinSDK-NetFx%dTools%sr-rzv%sAr?N) rrrrnNetFxSdkVersionrrrr8rr) rnetfxverrrfxregpathsr rKexecpaths rWindowsSDKExecutablePathz#SystemInfo.WindowsSDKExecutablePathds3 ;$  HDDH"kT11dduG7&&4&AAD $$,,tS2I2I'J J ;$  + ? ?T$'"3S"==>>) F FC dg16C<DDE EHH  Dw~~d,@AAH    rct|jjd|jz}|j|dpdS)zl Microsoft Visual F# directory. Return ------ str path z%0.1f\Setup\F# productdirr)rrrrr)rrKs rFSharpInstallDirzSystemInfo.FSharpInstallDirs;DG(*;dk*IJJw~~dL117R7rc|jdkrdnd}|D]2}|j|jjd|z}|r|pdcS3dS)zt Microsoft Universal CRT SDK directory. Return ------ str path r)1081rz kitsroot%srN)rrrr)rversr rCs rUniversalCRTSdkDirzSystemInfo.UniversalCRTSdkDirsu ${d22|| $ $CW^^DG$>$03$688F $|### $ $ $rcR|t|jdS)z Microsoft Universal C Runtime SDK last version. Return ------ str version r:)r;rrYrs rUniversalCRTSdkLastVersionz%SystemInfo.UniversalCRTSdkLastVersions%&&tD,CU'K'KLLLrc |jdkrdndS)z Microsoft .NET Framework SDK versions. Return ------ tuple of str versions r) z4.7.2z4.7.1z4.7z4.6.2z4.6.1z4.6z4.5.2z4.5.1z4.5rr7rs rrLzSystemInfo.NetFxSdkVersions%;$&&**-/ 0rcd}|jD];}t|jj|}|j|d}|rn<|S)zu Microsoft .NET Framework SDK directory. Return ------ str path rkitsinstallationfolder)rLrrrr)rrCr rDs r NetFxSdkDirzSystemInfo.NetFxSdkDirs\'  Ctw(#..CW^^C)ABBF   rczt|jd}|j|jjdp|S)zw Microsoft .NET Framework 32bit directory. Return ------ str path zMicrosoft.NET\Frameworkframeworkdir32rrrrrrguess_fws rFrameworkDir32zSystemInfo.FrameworkDir32s8 %?@@w~~dgj*:;;GxGrczt|jd}|j|jjdp|S)zw Microsoft .NET Framework 64bit directory. Return ------ str path zMicrosoft.NET\Framework64frameworkdir64rbrcs rFrameworkDir64zSystemInfo.FrameworkDir64s8 %ABBw~~dgj*:;;GxGrc,|dS)z Microsoft .NET Framework 32bit versions. Return ------ tuple of str versions _find_dot_net_versionsrs rFrameworkVersion32zSystemInfo.FrameworkVersion32**2...rc,|dS)z Microsoft .NET Framework 64bit versions. Return ------ tuple of str versions @rkrs rFrameworkVersion64zSystemInfo.FrameworkVersion64rnrcd|j|jjd|z}t|d|z}|p||dpd}|jdkr|dfS|jdkr&|dd d krd n|d fS|jd krdS|jdkrdSdS)z Find Microsoft .NET Framework versions. Parameters ---------- bits: int Platform number of bits: 32 or 64. Return ------ tuple of str versions zframeworkver%dzFrameworkDir%dr0rr5zv4.0rNrv4z v4.0.30319v3.5r)rt v2.0.50727g @)zv3.0ru)rrrgetattrr;rri)rbitsreg_ver dot_net_dirr s rrlz!SystemInfo._find_dot_net_versionss'..-=-DEEd$4t$;<< H00cBBHb ;$  ;  [D #&99;;rr?d#:#:<<VK K [C  '' [C  '' rc|fdttD}t|dpdS)a) Return name of the last dir in path or '' if no dir found. Parameters ---------- path: str Use dirs in this path prefix: str Use only dirs starting by this prefix Return ------ str name c3K|]8}tt||4|V9dSr)rr startswith)rjdir_namerKprefixs rrtz0SystemInfo._use_last_dir_name..<sg  T$))**     ' '        rNr)reversedrnext)rKr~ matching_dirss`` rr;zSystemInfo._use_last_dir_name+sV"     $WT]]33   M4((.B.rrr)#rrrrrrCrr7r"rrrr staticmethodrrr$r)r&r'r8r=r<rQrTrYr[rLr_rerhrmrqrlr;rrrrr:s  W[2 & &F7;~r22L!gk"5|DDO<<<<###&>(((T77\7 LLXL X"<OOO(!!X!( H HX H((X(T   X  D 8 8X 8$$X$& M MX M 0 0X 0X" H HX H H HX H / /X / / /X /(((:///\///rrc>eZdZdZd!dZedZedZedZedZ ed Z ed Z ed Z ed Z ed ZedZedZdZedZedZedZedZedZedZedZedZedZedZedZedZedZd"dZd Z dS)#EnvironmentInfoaY Return environment variables for specified Microsoft Visual C++ version and platform : Lib, Include, Path and libpath. This function is compatible with Microsoft Visual C++ 9.0 to 14.X. Script created by analysing Microsoft environment configuration files like "vcvars[...].bat", "SetEnv.Cmd", "vcbuildtools.bat", ... Parameters ---------- arch: str Target architecture. vc_ver: float Required Microsoft Visual C++ version. If not set, autodetect the last version. vc_min_ver: float Minimum Microsoft Visual C++ version. Nrct||_t|j|_t |j||_|j|kr!d}tj |dS)Nz.No suitable Microsoft Visual C++ version found) rrrrrsirrwr>rx)rrr vc_min_vererrs rrzEnvironmentInfo.__init__]sft$$tw''TWf-- ; # #BC"99#>> > $ #rc|jjS)zk Microsoft Visual Studio. Return ------ float version )rrrs rrzEnvironmentInfo.vs_verfw~rc|jjS)zp Microsoft Visual C++ version. Return ------ float version )rrrs rrzEnvironmentInfo.vc_verrrrcddg}jdkr1jdd}|dgz }|dgz }|d|zgz }fd |DS) zu Microsoft Visual Studio Tools. Return ------ list of str paths z Common7\IDEz Common7\ToolsrTrrNz1Common7\IDE\CommonExtensions\Microsoft\TestWindowzTeam Tools\Performance ToolszTeam Tools\Performance Tools%scDg|]}tjj|Srrrr$rjrKrs r z+EnvironmentInfo.VSTools..(CCCTTW)400CCCr)rrr)rpaths arch_subdirs` rVSToolszEnvironmentInfo.VSTools~s !12 ;$  '--d-EEK JK KE 56 6E 7+EF FECCCCUCCCCrcjt|jjdt|jjdgS)z Microsoft Visual C++ & Microsoft Foundation Class Includes. Return ------ list of str paths IncludezATLMFC\Includerrr)rs r VCIncludeszEnvironmentInfo.VCIncludess3TW)955TW)+<==? ?rcjdkrjd}njd}d|zd|zg}jdkr |d|zgz }fd |DS) z Microsoft Visual C++ & Microsoft Foundation Class Libraries. Return ------ list of str paths .@TrNrLib%sz ATLMFC\Lib%srz Lib\store%scDg|]}tjj|Srrrs rrz/EnvironmentInfo.VCLibraries..rr)rrr)rrrs` r VCLibrarieszEnvironmentInfo.VCLibrariess ;$  ',,,66KK',,T,::K;&+(EF ;$   n{23 3ECCCCUCCCCrcR|jdkrgSt|jjdgS)z Microsoft Visual C++ store references Libraries. Return ------ list of str paths rzLib\store\references)rrrr)rs r VCStoreRefszEnvironmentInfo.VCStoreRefss/ ;  ITW)+BCCDDrc|j}t|jdg}|jdkrdnd}|j|}|r|t|jd|zgz }|jdkr8d|jdz}|t|j|gz }n|jdkr|jrd nd }|t|j||jd zgz }|jj |jj kr5|t|j||jd zgz }n|t|jd gz }|S) zr Microsoft Visual C++ Tools. Return ------ list of str paths VCPackagesrTFBin%srrrz bin\HostX86%sz bin\HostX64%srBin) rrr)rrrrrrrr)rrtoolsrrrKhost_dirs rVCToolszEnvironmentInfo.VCToolssWbo|445;$..44Eg''11  D d2?Gk,ABBC CE ;$  TW000>>>D d2?D112 2EE [D ,0G,B,B,D,D)(((  dDG,>,>4,>,H,H!HJJK KEw"dg&888$OX0C0C0C0M0M%MOOPP d2?E223 3E rc0|jdkr:|jdd}t|jjd|zgS|jd}t|jjd}|j}t||d|gS)zw Microsoft Windows SDK Libraries. Return ------ list of str paths rTrrrr:um)rrrrrr< _sdk_subdir)rrr:libvers r OSLibrarieszEnvironmentInfo.OSLibrariess ;$  ',,Tt,DDK.+0EFFG G',,,66Ktw,e44C%F&&&++>??@ @rc t|jjd}|jdkr|t|dgS|jdkr|j}nd}t|d|zt|d|zt|d|zgS) zu Microsoft Windows SDK Include. Return ------ list of str paths includerglrrz%ssharedz%sumz%swinrt)rrr<rr)rrsdkvers r OSIncludeszEnvironmentInfo.OSIncludesstw,i88 ;$  T'4001 1{d"")*v"566&6/22)f"4557 7rct|jjd}g}|jdkr ||jz }|jdkr|t|dgz }|jdkru||t|jjdt|ddt|d dt|d dt|jjd d d |jzdddgz }|S)z} Microsoft Windows SDK Libraries Paths. Return ------ list of str paths Referencesrr4zCommonConfiguration\Neutralr UnionMetadataz'Windows.Foundation.UniversalApiContractz1.0.0.0z%Windows.Foundation.FoundationContractz,Windows.Networking.Connectivity.WwanContract ExtensionSDKszMicrosoft.VCLibsr!CommonConfigurationneutral)rrr<rr)rreflibpaths r OSLibpathzEnvironmentInfo.OSLibpaths47(,77 ;#   t' 'G ;$   S"@AAB BG ;$   TW*O<<BIOOSA9MMGG)?|p|}|jdkp |jdk}g}|r|fdjDz }|r|fdjDz }|S)zv Microsoft .NET Framework Tools. Return ------ list of str paths rTrUc:g|]}tj|Sr)rrerjr rs rrz+EnvironmentInfo.FxTools..68882,c22888rc:g|]}tj|Sr)rrhrs rrz+EnvironmentInfo.FxTools..rr) rrrrrrrrmrq)rr include32 include64rrs @rFxToolszEnvironmentInfo.FxToolss W W ;$  I,,...Jr7H7H7J7J3JII((**Ab.?.?.A.AI'1MR]g5MI  8 8888!#!6888 8E  8 8888!#!6888 8E rc|jdks |jjsgS|jd}t |jjd|zgS)z~ Microsoft .Net Framework SDK Libraries. Return ------ list of str paths rTrzlib\um%s)rrr_rrr)rrs rNetFxSDKLibrariesz!EnvironmentInfo.NetFxSDKLibrariessU ;  TW%8 Ig((T(22 TW(+ *CDDEErcj|jdks |jjsgSt|jjdgS)z} Microsoft .Net Framework SDK Includes. Return ------ list of str paths rz include\um)rrr_rrs rNetFxSDKIncludesz EnvironmentInfo.NetFxSDKIncludess8 ;  TW%8 ITW(-8899rc8t|jjdgS)z Microsoft Visual Studio Team System Database. Return ------ list of str paths z VSTSDB\Deployrrs rVsTDbzEnvironmentInfo.VsTDbsTW)+;<<==rc|jdkrgS|jdkr(|jj}|jd}n|jj}d}d|j|fz}t ||g}|jdkr|t ||dgz }|S)zn Microsoft Build Engine. Return ------ list of str paths r5rTrrzMSBuild\%0.1f\bin%sRoslyn)rrr"rrr$r)r base_pathrrKbuilds rMSBuildzEnvironmentInfo.MSBuilds ;  I [4  /I'--d-;;KK,IK%k(BBi&&' ;$   d9dH556 6E rcR|jdkrgSt|jjdgS)zt Microsoft HTML Help Workshop. Return ------ list of str paths r4zHTML Help Workshop)rrrr"rs rHTMLHelpWorkshopz EnvironmentInfo.HTMLHelpWorkshops/ ;  ITW,.BCCDDrc|jdkrgS|jd}t|jjd}|j}t||d|gS)z Microsoft Universal C Runtime SDK Libraries. Return ------ list of str paths rTrr:ucrt)rrrrrrY _ucrt_subdir)rrr:rs r UCRTLibrarieszEnvironmentInfo.UCRTLibrariessh ;  Ig((T(22 47-u55#S=>>??rc|jdkrgSt|jjd}t|d|jzgS)z Microsoft Universal C Runtime SDK Include. Return ------ list of str paths rrz%sucrt)rrrrYr)rrs r UCRTIncludeszEnvironmentInfo.UCRTIncludessE ;  Itw19==Wh)::;;<> W) j00JGGHH    D{GK,@,@,DEEK d; &B&BC CHT*h//00)DK",<=(C ,<,'- .. !!%#'#3#'#3#'<#'#5#'#9 #; #) **%%i'+'7'+|'+'7'+~'7'- .. ""6$(L$(L$(J$(M$(M$(L$(L$($9$(K$1$* + +)   @ ;"  (rxr r) rrspec_path_listsr spec_paths env_pathsr extant_pathsr( unique_pathss rrzEnvironmentInfo._build_pathss._22?CC Kb))//88  I665;FtF5%00111  ?4tzz||CC"99#>> >&|44 |L)))r)Nr)T)!rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrEs.????  X   X DDXD& ? ?X ?DDXD( E EX E""X"HAAXA&77X7.!!X!F ' 'X '!3!3!3F 5 5X 5 6 6X 6X8 F FX F : :X : > >X >X6 E EX E@@X@" = =X = 5 5X 5 * *X *  X D0000d*****rrr))rriorosrros.pathrrrr rrplatformr$rDdistutils.errorsrw#setuptools.extern.packaging.versionr setuptools.extern.more_itertoolsr monkeyr systemrrrr4rLrZrdrrrrrrrrrrrr s   000000000000 ======<<<<<<!!!!!!8? !!MMM!!!!!!!! dffG"""<"""L  $ $ $ N!!!H4 B B B""""Jp p p p p p p p fv#v#v#v#v#v#v#v#rH/H/H/H/H/H/H/H/Vb *b *b *b *b *b *b *b *b *b *rPK{5Z-SH@Lib/site-packages/setuptools/__pycache__/logging.cpython-311.pycnuW+A `;d<ddlZddlZddlZddlmZdZdZdZdS)N)monkeyc,|jtjkS)N)levelnologgingWARNING)records aE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/logging.py _not_warningr s >GO ++ctj}|tjtjtj}|t||f}tjdd|tj ttj drBtjttj dtj tj_ dSdS)z Configure logging to emit warning and above to stderr and everything else to stdout. This behavior is provided for compatibility with distutils.log but may change in the future. z {message}{)formatstylehandlerslevelLog set_thresholdN)r StreamHandlersetLevelrsysstdout addFilterr basicConfigDEBUGhasattr distutilslogr patch_funcrdist) err_handler out_handlerrs r configurer# s'))K)))' 33K,'''K'H # OOOOy}e$$+-HHH ']  ++r cztj|dzt|S)N )rrootrr unpatched)rs r rr"s0 L%(###  " "5 ) ))r ) rr distutils.logrrr r#rr r r+sl ,,,+++.*****r PK{5ZCLib/site-packages/setuptools/__pycache__/_itertools.cpython-311.pycnuW+A `;dddlmZdfdZdS))consumec|S)N)xs dE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_itertools.pyrs!c#Kt}|j}|D]3}||}||vrtd|d|||V4dS)a Wrap an iterable to raise a ValueError if non-unique values are encountered. >>> list(ensure_unique('abc')) ['a', 'b', 'c'] >>> consume(ensure_unique('abca')) Traceback (most recent call last): ... ValueError: Duplicate element 'a' encountered. zDuplicate element z encountered.N)setadd ValueError)iterablekeyseenseen_addelementks r ensure_uniquersy 55DxH CLL 99J'JJJKK K  r N) setuptools.extern.more_itertoolsrrrr rrs<444444!, r PK{5ZXKxMM=Lib/site-packages/setuptools/__pycache__/dist.cpython-311.pycnuW+A `;d RdgZddlZddlZddlZddlZddlZddlZddlZddl Zddl Zddl Zddl Zddl mZddlmZddlmZddlmZddlZddlZddlmZmZmZddlmZdd lmZdd lm Z dd l!m"Z"m#Z#dd l m$Z$dd l%m&Z&ddl%m'Z'ddl(m)Z)m*Z*ddl+m,Z,ddl-m.Z.ddl/Z/ddl0Z/ddl/m1Z1ddl2m3Z3ddl4m5Z5m6Z6ddl7m8Z8ddl9Z9ddl:m;Z;ddl-mm?Z?e@de@ddZAdZBdeCd eCfd!ZDd"d#d$eCd eeCfd%ZEd"d#d$eCd eeCfd&ZFd"d#d$eCd eeeCfd'ZGd"d#d eeCfd(ZHd)ZId*ZJd+ZKeLeMfZNd,ZOd-ZPd.ZQd/ZRd0ZSd1ZTd2ZUd3ZVd4ZWd5ZXd6ZYd7ZZd8Z[e3ej\j]Z^Gd9de^Z]Gd:d;e.Z_dS)< DistributionN) strtobool)DEBUGtranslate_longopt)iglob)ListOptional TYPE_CHECKING)Path) defaultdict)message_from_file)DistutilsOptionErrorDistutilsSetupError) rfc822_escape) packaging) ordered_set)unique_everseen partition)metadata)SetuptoolsDeprecationWarning)windows_support) get_unpatched)setupcfg pyprojecttoml)ConfigDiscoveryversion)_reqs) _entry_points)Messagez&setuptools.extern.packaging.specifiersz#setuptools.extern.packaging.versioncTtjdtt|S)NzDo not call this function)warningswarnDistDeprecationWarningr)clss ^E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/dist.py_get_unpatchedr)9s$ M-/EFFF   cbt|dd}|tjd}||_|S)Nmetadata_version2.1)getattrrVersionr,)selfmvs r(get_metadata_versionr2>s5 )4 0 0B z _U # # " Ir*contentreturnc <|}t|dkr|dSd|dt jd|ddfS)zFReverse RFC-822 escaping by removing leading whitespaces from content.rr N) splitlineslenlstripjointextwrapdedent)r3liness r(rfc822_unescaper>Fsy    E 5zzQQx   99eAhoo''599M9M)N)NO P PPr*msgr"fieldc&||}|dkrdS|S)zRead Message header field.UNKNOWNNr?r@values r(_read_field_from_msgrFNs JE t Lr*cHt||}||St|S)z4Read Message header field and apply rfc822_unescape.)rFr>rDs r(_read_field_unescaped_from_msgrHVs) e , ,E } 5 ! !!r*cB||d}|gkrdS|S)z9Read Message header field and return all results as list.N)get_all)r?r@valuess r(_read_list_from_msgrL^s( [[ % %F ||t Mr*cf|}|dks|sdS|S)NrB) get_payloadstrip)r?rEs r(_read_payload_from_msgrPfs7 OO   # # % %E t Lr*cLt|}tj|d|_t |d|_t |d|_t |d|_t |d|_d|_t |d|_ d|_ t |d|_ t |d |_ t|d |_t|d |_|j1|jtjd krt!||_t |d|_d |vr(t |d d|_t'|d|_t'|d|_|jtjdkr@t'|d|_t'|d|_t'|d|_nd|_d|_d|_t'|d|_dS)z-Reads the metadata values from a file object.zmetadata-versionnamersummaryauthorNz author-emailz home-pagez download-urllicense descriptionr-keywords,platform classifierz1.1requiresprovides obsoletesz license-file)rrr/r,rFrRrVrT maintainer author_emailmaintainer_emailurl download_urlrHrUlong_descriptionrPsplitrWrL platforms classifiersr[r\r] license_files)r0filer?s r( read_pkg_filerims D ! !C#OC0B,CDDD$S&11DI'Y77DL+C;;D&sH55DKDO,S.AAD D#C55DH,S.AAD1#yAADL:3 NND % !7!777 6s ; ;+C;;DS,S*==CCCHH (j99DN*3 ==D  6 666+C<< +C<< ,S+>>  ,S.AADr*cd|vrAtjd|dd}|S)zF Quick and dirty validation for Summary pypa/setuptools#1390. r6z1newlines not allowed and will break in the futurer)r$r%rOrd)vals r( single_linerlsE s{{  IJJJiikk%%a( Jr*c|}fd}|dt||d||d||}|r|dt |d}|D]$\}}t ||d}| |||%|} | r|dt| |j D]} |d d | zd | } | r |d | | pg} | D]} |d | |d||d||d||d|t'|dr|d|j|jr|d|j|jr|jD]}|d||d|jpg|}|rDd|z|dsddSdSdS)z0Write the PKG-INFO format data to a file object.c>|d|ddS)Nz: r6)write)keyrErhs r( write_fieldz#write_pkg_file..write_fields( eee,-----r*zMetadata-VersionNamer/Summary))z Home-pagera)z Download-URLrb)AuthorrT)z Author-emailr_) Maintainerr^)zMaintainer-emailr`NLicensez Project-URLz%s, %srXKeywordsPlatform ClassifierRequiresProvides Obsoletespython_requireszRequires-PythonzDescription-Content-TypezProvides-Extraz License-Filez %sr6)r2strget_name get_versionget_descriptionrlr. get_licenser project_urlsitemsr: get_keywords get_platforms _write_listget_classifiers get_requires get_provides get_obsoleteshasattrr}long_description_content_typeprovides_extrasrgget_long_descriptionroendswith)r0rhrrqrSoptional_fieldsr@attrattr_valrU project_urlrWrerYextrarcs ` r(write_pkg_filers}''))G.....K"CLL111K (((K 4++--...""$$G5 I{733444O')) t4t,,   Kx ( ( (  G7 I}W55666(..00;;  M8k#9::::xx))++,,H* J)))""$$*I** J))))T<)=)=)?)?@@@ T:t'8'8':':;;;T:t'8'8':':;;;T;(:(:(<(<===t&''= %t';<<< )T .0RSSS 1) 1 1E K(% 0 0 0 0T>4+=+CDDD0022 6,,---((..  JJt       r*c tj|dd}|jrJdS#ttt t f$r}t|d|d|d}~wwxYw)N)rErRgroupz/ must be importable 'module:attrs' string (got ))r EntryPointextras TypeError ValueErrorAttributeErrorAssertionErrorr)distrrEepes r(check_importablers  u4t D D D9 z>> B!FJddEEE R   s $AAAc t|ttfsJd||ksJdS#tt t tf$r}t|d|d|d}~wwxYw)z"Verify that value is a string listz must be a list of strings (got rN) isinstancelisttupler:rrrrrrrrErs r(assert_string_listrs %$/////wwu~~&&&&&& z>> B!7;ttUUU C   s9=A5A00A5cB|}t||||D]}||stdd|zz|d\}}}|r%||vr!tjd||d}tj|tdS)z(Verify that namespace packages are validz1Distribution contains no modules or packages for znamespace package %r.z^WARNING: %r is declared as a package namespace, but %r is not: please correct this in setup.pyzeThe namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).N) rhas_contents_forr rpartition distutilslogr%r$r) rrrE ns_packagesnspparentsepchildr?s r( check_nsprsKtT;///99$$S)) %C(3./ !^^C00U  fK// M  ;     D   c78888%99r*c ttjt|dS#t t tf$r}td|d}~wwxYw)z+Verify that extras_require mapping is validz'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.N) r itertoolsstarmap _check_extrarrrrrrs r( check_extrasr!sr Y |U[[]] ; ;<<<<< z> 2! &    s9=A)A$$A)c|d\}}}|r&tj|rtd|zt t j|dS)N:zInvalid environment marker: )r pkg_resourcesinvalid_markerrrr parse)rreqsrRrmarkers r(rr-sh,,D#v K-.v66K!"@6"IJJJT  r*cxt||kr&d}t|||dS)z)Verify that value is True, False, 0, or 1z0{attr!r} must be a boolean value (got {value!r}))rrEN)boolrformat)rrrEtmpls r( assert_boolr4s> E{{eA!$++4u+"E"EFFFr*ch|stj|dtdSt|d)Nz is ignored.z is invalid.)r$r%r&rrrrEs r(invalid_unless_falser;sB  +++-CDDD 333 4 44r*c  ttj|t|tt frt ddS#t tf$r,}d}t| |||d}~wwxYw)z9Verify that install_requires is a valid requirements listzUnordered types are not allowedzm{attr!r} must be a string or list of strings containing valid project/version requirement specifiers; {error}rerrorN) rr rrdictsetrrrrrrrErrs r(check_requirementsrBs R U[     edC[ ) ) ?=>> > ? ? z "RRR O "$++4u+"E"EFFEQ RsA AB !'BB c tj|dS#tjjtf$r,}d}t ||||d}~wwxYw)z.Verify that value is a valid version specifierzF{attr!r} must be a string containing valid version specifiers; {error}rN)r specifiers SpecifierSetInvalidSpecifierrrrrs r(check_specifierrPs}R))%00000  1> BRRR W "$++4u+"E"EFFEQ Rs#A*'A%%A*ct tj|dS#t$r}t||d}~wwxYw)z)Verify that entry_points map is parseableN)r!load Exceptionrrs r(check_entry_pointsr[sM,5!!!!! ,,,!!$$!+,s 727cNt|tstddS)Nztest_suite must be a string)rr~rrs r(check_test_suitercs0 eS ! !A!"?@@@AAr*c`t|ts"td||D]a\}}t|t s#td||t |d||bdS)z@Verify that value is a dictionary of package names to glob listszT{!r} must be a dictionary mapping package names to lists of string wildcard patternsz,keys of {!r} dict must be strings (got {!r})zvalues of {!r} dictN)rrrrrr~r)rrrEkvs r(check_package_datarhs eT " " ! ''-vd||    HH1!S!! %>EEdANN  4!6!=!=d!C!CQGGGG HHr*cz|D]7}tjd|s tjd|8dS)Nz \w+(\.\w+)*z[WARNING: %r not a valid package name; please use only .-separated package names in setup.py)rematchrrr%)rrrEpkgnames r(check_packagesrwsRx00  M  8   r*ceZdZdZdeejdddZdZdZ d1dZ d Z d Z e d Ze d Zd ZdZe dZdZdZdZe dZd1dZdZdZdZd1dZdZd2dZdZdZe dZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1fd0Z2xZ3S)3raG Distribution with support for tests and package data This is an enhanced version of 'distutils.dist.Distribution' that effectively adds the following new optional keyword arguments to 'setup()': 'install_requires' -- a string or sequence of strings specifying project versions that the distribution requires when installed, in the format used by 'pkg_resources.require()'. They will be installed automatically when the package is installed. If you wish to use packages that are not available in PyPI, or want to give your users an alternate download location, you can add a 'find_links' option to the '[easy_install]' section of your project's 'setup.cfg' file, and then setuptools will scan the listed web pages for links that satisfy the requirements. 'extras_require' -- a dictionary mapping names of optional "extras" to the additional requirement(s) that using those extras incurs. For example, this:: extras_require = dict(reST = ["docutils>=0.3", "reSTedit"]) indicates that the distribution can optionally provide an extra capability called "reST", but it can only be used if docutils and reSTedit are installed. If the user installs your package using EasyInstall and requests one of your extras, the corresponding additional requirements will be installed if needed. 'test_suite' -- the name of a test suite to run for the 'test' command. If the user runs 'python setup.py test', the package will be installed, and the named test suite will be run. The format is the same as would be used on a 'unittest.py' command line. That is, it is the dotted name of an object to import and call to generate a test suite. 'package_data' -- a dictionary mapping package names to lists of filenames or globs to use to find data files contained in the named packages. If the dictionary has filenames or globs listed under '""' (the empty string), those names will be searched for in every package, in addition to any names for the specific package. Data files found using these names/globs will be installed along with the package, in the same location as the package. Note that globs are allowed to reference the contents of non-package subdirectories, as long as you use '/' as a path separator. (Globs are automatically converted to platform-specific paths at runtime.) In addition to these new keywords, this class also has several new methods for manipulating the distribution's contents. For example, the 'include()' and 'exclude()' methods can be thought of as in-place add and subtract commands that add or remove packages, modules, extensions, and so on from the distribution. cdSNrCrCr*r(zDistribution.sr*cdSrrCrCr*r(rzDistribution.sr*cdSrrCrCr*r(rzDistribution.sr*)rrr license_filergNct|rd|vsd|vrdStjt|d}tjj|}|J|ds7tjt|d|_ ||_ dSdSdS)NrRrzPKG-INFO) r safe_namer~lower working_setby_keyget has_metadata safe_version_version _patched_dist)r0attrsrprs r(patch_missing_pkg_infoz#Distribution.patch_missing_pkg_infos  e++y/E/E F%c%-&8&899??AA(/33C88  D$5$5j$A$A )6s5;K7L7LMMDM!%D       r*cXtd}|si_|pi}g_|dd_||dg_|dg_tj dD]*}t |j d+tfd|Di_g_t%t&j_t-_|jjj_dS)N package_datasrc_rootdependency_linkssetup_requiresdistutils.setup_keywordsrc.i|]\}}|jv||SrC)_DISTUTILS_UNSUPPORTED_METADATA.0rrr0s r( z)Distribution.__init__..s7   AqD@@@1@@@r*)rr dist_filespoprrrrr entry_pointsvars setdefaultrR _Distribution__init__r_orig_extras_require_orig_install_requiresr r OrderedSet_tmp_extras_requirer set_defaults_set_metadata_defaults_normalize_version_validate_versionr_finalize_requires)r0rhave_package_datars` r(r zDistribution.__init__s#D.99  # "D   *d33  ##E*** % *z2Distribution._validate_metadata..s7   t}c400< <<D M+$+1111 2 2 2 r*c6t|tjrt|}|m tj|nL#tjjtf$r.tj d|ztj |cYSwxYw|S)NzThe version specified (%r) is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.) rnumbersNumberr~rrr/InvalidVersionrr$r%r!r"rs r(rzDistribution._validate_versions gw~ . . #'llG   /!))'2222%4i@ / / / ")) "~g..... /sA ABBct|ddr|j|j_t|ddrk|jp|j|_|jD]>}|dd}|r|jj|?t|ddr|j s |j |_ | | dS)z Set `metadata.python_requires` and fix environment markers in `install_requires` and `extras_require`. r}Nextras_requirerrinstall_requires) r.r}rr r*keysrdraddr r+_convert_extras_requirements"_move_install_requirements_markers)r0rs r(rzDistribution._finalize_requires)s 4*D 1 1 A,0,@DM ) 4)4 0 0 =(,(A(XTEXD %,1133 = = C((+=M155e<<< 4+T 2 2 @4;V @*.*?D ' ))+++ //11111r*cvt|ddpi}ttj}t|d||_|D]a\}}|j|t j|D]:}||}|j||z |;bdS)z Convert requirements in `extras_require` of the form `"extra": ["barbazquux; {marker}"]` to `"extra:{marker}": ["barbazquux"]`. r*Nr) r.r rrrrr r _suffix_forappend)r0 spec_ext_reqstmpsectionrrsuffixs r(r.z)Distribution._convert_extras_requirementsCs  &6==C +011#*41F#L#L '--// E EJGQ  $W - -[^^ E E))!,,(6)9:AA!DDDD E E Er*cB|jrdt|jzndS)ze For a requirement, return the 'extras_require' suffix for that requirement. rr)rr~reqs r(r1zDistribution._suffix_forSs# ), :sS__$$:r*cd}tddpd}ttj|}t ||}t j||}ttt|_ |D]7}j dt|j z |8tfdj D_dS)zv Move requirements in `install_requires` that are using environment markers `extras_require`. c|j Srrr9s r( is_simple_reqzFDistribution._move_install_requirements_markers..is_simple_reqes z> !r*r+NrCrc 3K|]M\}}|ttdtj|DfVNdS)c34K|]}t|VdSr)r~)rr6s r( zLDistribution._move_install_requirements_markers...rs("K"Ka3q66"K"K"K"K"K"Kr*N)rrfromkeysmap _clean_reqrs r(rAzBDistribution._move_install_requirements_markers..psq# # 1T]]"K"K3t3J3J"K"K"KKKLL M# # # # # # r*)r.rr rfilterr filterfalserCr~r+rrr2rrr*)r0r>spec_inst_reqs inst_reqs simple_reqs complex_reqsr6s` r(r/z/Distribution._move_install_requirements_markers[s  " " "!'94@@FB^4455 ]I66  ,]IFF $Sk%:%: ; ; D DA  $S3qx==%8 9 @ @ C C C C"# # # # 06688# # #   r*cd|_|S)zP Given a Requirement, remove environment markers and return it. Nr=)r0r:s r(rDzDistribution._clean_reqvs  r*c|jj}|r|ng}|jj}|r||vr||||d}t t |||j_dS)z>> list(Distribution._expand_patterns(['LICENSE'])) ['LICENSE'] >>> list(Distribution._expand_patterns(['setup.cfg', 'LIC*'])) ['setup.cfg', 'LICENSE'] c3K|]Y}tt|D]:}|dtj|6|V;ZdS)~N)sortedrrospathisfile)rpatternrUs r(rAz0Distribution._expand_patterns..s  uW~~..  ==%%  +-'..*>*>         r*rC)rNs r(rMzDistribution._expand_patternss#  #    r*c ddlm}tjtjkrgngd}t |}||}tr|d|}t|_ |D]'}tj |d5}tr,|dj d it||dddn #1swxYwY|D]}||}||} |D]V} | d ks| |vr ||| } || |} || |} || f| | <W|)d |jvrdS|jd D]~\} \} } |j| } | rt5|  } n| d vrt5| } t7|| p| | ]#t8$r}t;||d}~wwxYwdS) z Adapted from distutils.dist.Distribution.parse_config_files, this method provides the same functionality in subtly-improved ways. r) ConfigParser) z install-basezinstall-platbasez install-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptsz install-dataprefixz exec-prefixhomeuserrootNz"Distribution.parse_config_files():utf-8)encodingz reading {filename}__name__global)verbosedry_runrC) configparserrYsysrZ base_prefix frozensetfind_config_filesrannouncer~ optionxformioopenrr# read_filesectionsoptionsget_option_dictrwarn_dash_deprecationmake_option_lowercaser command_optionsr negative_optrsetattrrr)r0 filenamesrYignore_optionsparserfilenamereaderr5roopt_dictoptrksrcaliasrs r(_parse_config_filesz Distribution._parse_config_filess .----- zS_,, B (#>22  ..00I  @ MM> ? ? ? !  HG444 )MMM"?"8"?"K"K&(("K"KLLL  ((( ) ) ) ) ) ) ) ) ) ) ) ) ) ) )"??,, 4 4 ..11//88"44Cj((C>,A,A  **Wc22C44S'BBC44S'BBC%-sOHSMM4 OO     4/ / / F "&!5h!?!E!E!G!G 5 5 S*3%))#..E %#C..(...nn 5elsC0000 5 5 5*1--14 5 5 5s+A C..C2 5C2 H00 I:I  IcD|dvr|S|dd}ttjtjj|}|ds |dkr||vr|Sd|vrtj d|d|d|S) N)zoptions.extras_requirezoptions.data_files-_rorzUsage of dash-separated 'zL' will not be supported in future versions. Please use the underscore name ' ' instead) replacerrchainrcommand__all___setuptools_commands startswithr$r%)r0r|r5underscore_optcommandss r(rqz"Distribution.warn_dash_deprecations    JS#..    %  % % ' '     ""9-- ":%%x''! ! #:: MM33(    r*cn tjdjjS#tj$rgcYSwxYw)Nr!)r distributionrnamesPackageNotFoundError)r0s r(rz!Distribution._setuptools_commands sE (66CI I,   III s  44c |dks|r|S|}tjd|d|d|d|S)NrzUsage of uppercase key 'z' in 'z?' will be deprecated in future versions. Please use lowercase 'r)islowerrr$r%)r0r|r5 lowercase_opts r(rrz"Distribution.make_option_lowercasesd j CKKMM J  ssGGG]]] ,   r*c ,|}|||}tr|d|z|D]3\}\}}tr|d|d|d|d d|jD}n#t $rg}YnwxYw |j}n#t $ri}YnwxYw t|t} ||vr(| r&t|||t| n`||vr!| rt||t|n;t||rt|||ntd|d |d |d #t$r} t| | d} ~ wwxYwdS) a Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command'). 'command_obj' must be a Command instance. If 'option_dict' is not supplied, uses the standard option dictionary for this command (from 'self.command_options'). (Adopted from distutils.dist.Distribution._set_command_options) Nz# setting options for '%s' command:z z = z (from rc,g|]}t|SrCr)ros r( z5Distribution._set_command_options..4s!WWWa.q11WWWr*z error in z : command 'z' has no such option '')get_command_namerprrirboolean_optionsrrtrr~rurrrr) r0 command_obj option_dict command_namersourcerE bool_optsneg_opt is_stringrs r(_set_command_optionsz!Distribution._set_command_optionss#3355  ..|<N>N:NOOOOy((Y(K51A1ABBBB[&11K7777..!66<<<9 5 5 5*1--14 53 5 5s=B!! B0/B04B<< C  C B!E22 F<F  Fcg}t|jp tjd}|.QsQ'(Ar*rr)r rrTcurdirrrexists)r0rv tomlfilesstandard_project_metadatapartss r(_get_project_config_filesz&Distribution._get_project_config_filesLs $()C")EU$V$V!  AA9MMEU1XIU1XII & - - / / 423I)##r*Fc ||\}}||tj||j||D]}t j|||||dS)zXParses configuration files from various levels and loads configuration. )rv)ignore_option_errorsN) rrrparse_configurationrsrapply_configurationrrO)r0rvrinifilesrrys r(parse_config_fileszDistribution.parse_config_filesXs#<R S S S S !!! $$&&&&&r*ctjtj||jd}|D]#}tj|d$|S)zResolve pre-setup requirementsT) installerreplace_conflicting)r)rrresolver rfetch_build_eggr-)r0r[resolved_distsrs r(fetch_build_eggszDistribution.fetch_build_eggsisk&2:: K ! !* $;   # > >D  % ) )$ ) = = = =r*cd}d}tj|}tj|j|}t d|}t ||D] }||dS)z Allow plugins to apply arbitrary operations to the distribution. Each hook may optionally define a 'order' to influence the order of execution. Smaller numbers go first and the default is 0. z(setuptools.finalize_distribution_optionsc$t|ddS)Norderr)r.)hooks r(by_orderz/Distribution.finalize_options..by_order}s4!,, ,r*rc*|Sr)r)rs r(rz/Distribution.finalize_options..sqvvxxr*)rpN)rrrrF_removedrCrS)r0rrdefinedfilteredloadedrs r(finalize_optionszDistribution.finalize_optionsts; - - -'e444(@@''22X...  B BtHHHH  r*cdh}|j|vS)z When removing an entry point, if metadata is loaded from an older version of Setuptools, that removed entry point will attempt to be loaded and will fail. See #2765 for more details. 2to3_doctests)rR)rremoveds r(rzDistribution._removeds  w'!!r*ctjdD]>}t||jd}|$|||j|?dS)Nrr)rrr.rRr)r0rrEs r(_finalize_setup_keywordsz%Distribution._finalize_setup_keywordssb'.HIII 0 0BD"'400E  $/// 0 0r*ctjtjd}tj|stj|t j|tj|d}t|d5}| d| d| ddddn #1swxYwY|S)Nz.eggsz README.txtwzcThis directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins. zAThis directory caches those eggs to prevent repeated downloads. z/However, it is safe to delete this directory. ) rTrUr:rrmkdirr hide_filerlro)r0 egg_cache_dirreadme_txt_filenamers r(get_egg_cache_dirzDistribution.get_egg_cache_dirs0 RY88 w~~m,, M H] # # #  %m 4 4 4"$',,}l"K"K )3// M1J.KLLL M M M M M M M M M M M M M M Ms"AC..C25C2c&ddlm}|||S)z Fetch an egg needed for buildingr)r)setuptools.installerr)r0r:rs r(rzDistribution.fetch_build_eggs&888888tS)))r*c||jvr |j|Stjd|}|D]#}|x|j|<}|cSt||S)z(Pluggable version of get_command_class()distutils.commands)rrR)cmdclassrrrr get_command_class)r0repsrrs r(rzDistribution.get_command_classs{ dm # #=) )#*>WMMM B BB02 9DM' "XOOO 224AA Ar*ctjdD]3}|j|jvr#|}||j|j<4t |SNrr)rrrRrrr print_commandsr0rrs r(rzDistribution.print_commandss_'.BCCC 2 2Bwdm++7799)1 bg&++D111r*ctjdD]3}|j|jvr#|}||j|j<4t |Sr)rrrRrrr get_command_listrs r(rzDistribution.get_command_lists_'.BCCC 2 2Bwdm++7799)1 bg&--d333r*c |D]=\}}t|d|zd}|r ||'|||>dS)aAdd items to distribution that are named in keyword arguments For example, 'dist.include(py_modules=["x"])' would add 'x' to the distribution's 'py_modules' attribute, if it was not already there. Currently, this method only supports inclusion for attributes that are lists or tuples. If you need to add support for adding to other attributes in this or a subclass, you can add an '_include_X' method, where 'X' is the name of the attribute. The method will be called with the value passed to 'include()'. So, 'dist.include(foo={"bar":"baz"})' will try to call 'dist._include_foo({"bar":"baz"})', which can then handle whatever special inclusion logic is needed. _include_N)rr. _include_misc)r0rrrincludes r(rzDistribution.includesnKKMM ) )DAqdK!OT::G ) ""1a((((  ) )r*cdz|jrfd|jD|_|jrfd|jD|_|jrfd|jD|_dSdS)z9Remove packages, modules, and extensions in named packagercJg|]}|k|| SrCrrppackagepfxs r(rz0Distribution.exclude_package..s5ALLcARARLLLLr*cJg|]}|k|| SrCrrs r(rz0Distribution.exclude_package..s6a7ll1<.sE   6W$$QV->->s-C-C$$$$r*N)packages py_modules ext_modules)r0rrs `@r(exclude_packagezDistribution.exclude_packagesm = =DM ? ?DO        )   D     r*cz|dz}|D] }||ks||rdS!dS)z.s# K K K$U9J9J9J9J9Jr*rsequencerr.rru)r0rRrEoldrs ` r( _exclude_misczDistribution._exclude_miscs%** %>BddEEEJ  X$%%CC X X X%&H4&OPPVW W X ?:c8#<# A AA ct|tst|d|d t||n%#t$r}td|z|d}~wwxYwt |||dSttst|dzfd|D}t |||zdS)zAHandle 'include()' for list/tuple attrs without a special handlerz: setting must be a list (rrNrcg|]}|v| SrCrC)rrrs r(rz.Distribution._include_misc.."s===DT__4___r*r)r0rRrErnewrs @r(rzDistribution._include_miscs%** Y%444QVQVQV&WXX X X$%%CC X X X%&H4&OPPVW W X ; D$ & & & & &C** +%MM >===E===C D$c * * * * *rc |D]=\}}t|d|zd}|r ||'|||>dS)aRemove items from distribution that are named in keyword arguments For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from the distribution's 'py_modules' attribute. Excluding packages uses the 'exclude_package()' method, so all of the package's contained packages, modules, and extensions are also excluded. Currently, this method only supports exclusion from attributes that are lists or tuples. If you need to add support for excluding from other attributes in this or a subclass, you can add an '_exclude_X' method, where 'X' is the name of the attribute. The method will be called with the value passed to 'exclude()'. So, 'dist.exclude(foo={"bar":"baz"})' will try to call 'dist._exclude_foo({"bar":"baz"})', which can then handle whatever special exclusion logic is needed. _exclude_N)rr.r)r0rrrexcludes r(rzDistribution.exclude%sn KKMM ) )DAqdK!OT::G ) ""1a((((  ) )r*ct|tstd|dtt |j|dS)Nz+packages: setting must be a list or tuple (r)rrrrrCr)r0rs r(_exclude_packageszDistribution._exclude_packages<sV(H-- %%DLHHN  S%x 0 011111r*c|jj|_|jj|_|d}|d}||vr9||\}}||=ddl}||d|dd<|d}||v9t |||}||} t| ddrd|f||d<|gS|S)NraliasesTrcommand_consumes_arguments command lineargs) __class__global_optionsrtrpshlexrdr _parse_command_optsrr.) r0rxrrrr}r~rnargs cmd_classs r(r z Distribution._parse_command_optsCs"n; N7q'&&y11   )JC LLL{{5$//D!H1gG   11$EE**733 9:D A A 5CU4KD  ) )& 1   r*c i}|jD]\}}|D]\}\}}|dkr|dd}|dkr||}|j}|t|di|D]\} } | |kr| }d}ntdn|dkrd}|| |i|<Ռ|S) ahReturn a '{cmd: {opt:val}}' map of all command-line options Option names are all long, but do not include the leading '--', and contain dashes rather than underscores. If the option doesn't take an argument (e.g. '--quiet'), the 'val' is 'None'. Note that options provided by config files are intentionally excluded. rrrrrtNzShouldn't be able to get herer) rsrrget_command_objrtcopyupdater.rr ) r0dcmdoptsr|r}rkcmdobjrnegposs r(get_cmdline_optionsz Distribution.get_cmdline_options^s@ -3355 1 1IC#'::<< 1 1Zc3.((kk#s++!88!11#66F"/4466GNN76>2#F#FGGG$+MMOONNS#::"%C"&C!E& --LMMM"AXXC-0 S"%%c**- 10r*c#K|jpdD]}|V|jpdD]}|V|jpdD]G}t|tr|\}}n|j}|dr |dd}|VHdS)z@Yield all packages, modules, and extension names in distributionrCmoduleNi)rrrrrrRr)r0pkgrextrR buildinfos r(rz$Distribution.iter_distribution_namess=&B  CIIIIo+  FLLLL#)r  C#u%% "%iix}}X&& !CRCyJJJJ  r*c ddl}|jrt||St |jt jst||S|jj dvrt||S|jj}|jj }|j dkrdpd}|jj }t j|j d||||_ t||t j|j |||||_S#t j|j |||||_wxYw)zIf there were any non-global "display-only" options (--help-commands or the metadata display options) on the command line, display the requested info and return true; else return false. rN)r^utf8win32r6r^)re help_commandsr handle_display_optionsrstdoutrk TextIOWrapperr_rerrorsrYline_bufferingdetach)r0 option_orderrer_r#newliner$s r(r z#Distribution.handle_display_optionss    L 77lKK K#*b&677 L 77lKK K :  $ $ & &*; ; ; 77lKK K:&",')2d:d2% J    &'>     77lKK) !!##XvwCJJ) !!##XvwCJ    s E6F cr|t|dSr)rsuper run_command)r0rrs r(r*zDistribution.run_commands5  G$$$$$r*r)NF)4r` __module__ __qualname____doc__rrrrrrr rr staticmethodrrrr.r1r/rDrOrMrrqrrrrrrrrrrrrrrrrrrrrrrr rrr r* __classcell__)rs@r(rrs.11h*6&1$ % ''#M & & &""""""""H + + +QQQ  \ \$2224EEE ;;\;   6   &   \  M5M5M5M5^6   ,5,5,5,5\ $ $ $''''"   $ " "\ "000 &*** B B B222444))),*MMM"+++&))).2226&&&P$"""H%%%%%%%%%r*ceZdZdZdS)r&zrClass for warning about deprecations in dist in setuptools. Not ignored by default, unlike DeprecationWarning.N)r`r+r,r-rCr*r(r&r&s"FFFFr*r&)`rrkrerrTr$r& distutils.logrdistutils.core distutils.cmddistutils.distdistutils.commanddistutils.utilrdistutils.debugrdistutils.fancy_getoptrglobrrr;typingr r r pathlibr collectionsr emailrdistutils.errorsrrrsetuptools.externrr setuptools.extern.more_itertoolsrr _importlibrrrr!setuptools.commandrsetuptools.monkeyrsetuptools.configrrsetuptools.discoveryrrsetuptools.extern.packagingrr r! email.messager" __import__r)r2r~r>rFrHrLrPrirlrrrrrrrrrrrrrrrrrcorerr r&rCr*r(rJs0   $$$$$$!!!!!!4444440000000000############FFFFFFFF((((((''''''))))))GGGGGGGG ******&&&&&&++++++55555555000000//////&%%%%%% 3444 0111 QSQSQQQQi " "#"(3-""""YsxS 7J hsm)B)B)BX   DDDN $;   9992   GGG555 R R RRRR,,,AAA H H H in9:: } %} %} %} %} %=} %} %} %@FFFFF9FFFFFr*PK{5ZALib/site-packages/setuptools/__pycache__/dep_util.cpython-311.pycnuW+A `;dddlmZdZdS)) newer_groupcRt|t|krtdg}g}tt|D]T}t||||r6||||||U||fS)zWalk both arguments in parallel, testing if each source group is newer than its corresponding target. Returns a pair of lists (sources_groups, targets) where sources is newer than target, according to the semantics of 'newer_group()'. z5'sources_group' and 'targets' must be the same length)len ValueErrorrangerappend)sources_groupstargets n_sources n_targetsis bE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/dep_util.pynewer_pairwise_grouprs  >c'll** CEE EII 3~&& ' ')) ~a('!* 5 5 )   ^A. / / /   WQZ ( ( ( i N)distutils.dep_utilrrrrrs0******      rPK{5Zfss?Lib/site-packages/setuptools/__pycache__/monkey.cpython-311.pycnuW+A `;ddZddlZddlZddlZddlZddlZddlmZddl Z ddl Z gZ dZ dZ dZdZdZd Zd Zd ZdS) z Monkey patching of distutils. N) import_modulecntjdkr |f|jzStj|S)am Returns the bases classes for cls sorted by the MRO. Works around an issue on Jython where inspect.getmro will not return all base classes if multiple classes share the same name. Instead, this function will return a tuple containing the class itself, and the contents of cls.__bases__. See https://github.com/pypa/setuptools/issues/1024. Jython)platformpython_implementation __bases__inspectgetmro)clss `E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/monkey.py_get_mror s7%''833v %% >#  ct|trtn#t|tjrt nd}||S)NcdS)N)items r zget_unpatched..(sTr) isinstancetypeget_unpatched_classtypes FunctionTypeget_unpatched_function)rlookups r get_unpatchedr$sP)$55 ",T53E"F"F  6$<<rcdt|D}t|}|jdsd|z}t ||S)zProtect against re-patching the distutils if reloaded Also ensures that no other distutils extension monkeypatched the distutils first. c3NK|] }|jd|V!dS) setuptoolsN) __module__ startswith).0r s r z&get_unpatched_class..3sL ~((66 r distutilsz(distutils has already been patched by %r)r nextrr AssertionError)r external_basesbasemsgs r rr-sj C==N   D ? % %k 2 2"83>S!!! Krctjtj_tjdk}|rtjtj_dtjcxkodkncpdtjcxkodknc}|rd}|tjj _ ttj tjtj fD]}tj j|_tjjtj_tjjtj_dtjvr&tjjtjd_t%dS)N)r*)r*)r*r,)r*r+zhttps://upload.pypi.org/legacy/zdistutils.command.build_ext)rCommandr#coresys version_infofindallfilelistconfig PyPIRCCommandDEFAULT_REPOSITORY_patch_distribution_metadatadistcmd Distribution extension Extensionmodules#patch_for_msvc_specialized_compiler)has_issue_12885needs_warehouse warehousemodules r patch_allrC?s7'/IN&)3O8%/%7 " !----I---- /!....Y.... F5 .patch_paramssk )"2"23"7"77 tY''H%%sI&& )i(( (S)##rzdistutils._msvccompiler _get_vc_envgen_lib_options)rrsystem functoolspartialrUr_)rfmsvc14res @r r>r>s * + +DI%% $ $ $ $ $ |-F G GF FF=))***       FF,--....      s$A A%$A%)A== B  B )__doc__r0distutils.filelistr#rrrj importlibrr r__all__r rrrCr7rUrr>rrr rqs  ######    $"*"*"*JDDD000"+++% % % % % rPK{5Z[[=Lib/site-packages/setuptools/__pycache__/_imp.cpython-311.pycnuW+A `;dX ^dZddlZddlZddlZddlmZdZdZdZ dZ dZ d Z d d Z d d Zd ZdS)zX Re-implementation of find_module and get_frozen_object from the deprecated imp module. N)module_from_specct|tr#tjjntjj}|||SN) isinstancelist importlib machinery PathFinder find_specutil)modulepathsfinders ^E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_imp.pyrrsN eT " " ! &&((22  6&%  ct||}|td|z|js5t|dr%tjd|j}d}d}t|jt}|j dks&|r3t|jtj j rt}d}dx}}n|j dks&|r2t|jtj jrt }d}dx}}n|jr|j }t"j|d }|tj jvrd nd }|tj jvrt*}n5|tj jvrt.}n|tj jvrt2}|t*t.hvrt5||}nd}dx}}|||||ffS) z7Just like 'imp.find_module()', but with package supportN Can't find %ssubmodule_search_locationsz __init__.pyfrozenzbuilt-inrrrb)r ImportError has_locationhasattrr rspec_from_loaderloaderr typeorigin issubclassrFrozenImporter PY_FROZENBuiltinImporter C_BUILTINospathsplitextSOURCE_SUFFIXES PY_SOURCEBYTECODE_SUFFIXES PY_COMPILEDEXTENSION_SUFFIXES C_EXTENSIONopen) rrspeckindfilestaticr,suffixmodes r find_moduler;s VU # #D |/F2333  K/K!L!LK~..}dkJJ D D  T * *F {h&Z K,;.=.=  " "f " K,<2>2> " {!!$''* 3 CCCss Y(8 8 8DD y*< < <DD y*= = =D I{+ + +d##D d+ ++rc~t||}|std|z|j|SNr)rrr#get_code)rrr5s rget_frozen_objectr?GsB VU # #D 4/F2333 ;   ' ''rcht||}|std|zt|Sr=)rrr)rrinfor5s r get_modulerBNs: VU # #D 4/F2333 D ! !!rr )__doc__r+importlib.utilr importlib.machinery py34compatrr/r1r3r*r(rr;r?rBrrrHs  ((((((    !!!',',',',T(((("""""rPK{5ZX3>Lib/site-packages/setuptools/__pycache__/_path.cpython-311.pycnuW+A `;dRddlZddlmZeeejfZdZdededefdZdS)N)Unioncptj|}tj|ddS)z1Ensure that the parent directory of `path` existsT)exist_okN)ospathdirnamemakedirs)rrs _E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_path.pyensure_directoryr s0good##GK$''''''p1p2returnctj|tj|kS)aDiffers from os.path.samefile because it does not require paths to exist. Purely string based (no comparison between i-nodes). >>> same_path("a/b", "./a/b") True >>> same_path("a/b", "a/./b") True >>> same_path("a/b", "././a/b") True >>> same_path("a/b", "./a/b/c/..") True >>> same_path("a/b", "../a/b/c") False >>> same_path("a", "a/b") False )rrnormpath)r rs r same_pathr s/ 7  B  27#3#3B#7#7 77r ) rtypingrstrPathLike_Pathr boolrr r rss  c2;((( 8%8U8t888888r PK{5Z>,4;;@Lib/site-packages/setuptools/__pycache__/depends.cpython-311.pycnuW+A `;d{ddlZddlZddlZddlZddlmZddlmZmZm Z m Z ddl mZgdZ GddZ d Zdd Zdd Zd ZedS)N)version) find_module PY_COMPILED PY_FROZEN PY_SOURCE)_imp)Requirerget_module_constantextract_constantcBeZdZdZ d dZdZdZd dZd d Zd d Z dS)r z7A prerequisite to building or installing a distributionNc|| tj}|||}|d}|jt |`dS)N __version__)rVersion__dict__updatelocalsself)rnamerequested_versionmodulehomepage attributeformats aE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/depends.py__init__zRequire.__init__s[ >/;_F   &'8 9 9  )  VXX&&& IIIc@|j|jd|jS|jS)z0Return full package/distribution name, w/versionN-)rr)rs r full_namezRequire.full_name#s*  ! -"iii)?)?@ @yrc|jdup9|jdup0t|dko|||jkS)z%Is 'version' sufficiently up-to-date?Nunknown)rrstrr)rrs r version_okzRequire.version_ok)sN~%Y)<Y LLI % X$++g*>*>$BX*X Yrr#c|jC t|j|\}}}|r||S#t$rYdSwxYwt |j|j||}| ||ur|j||S|S)aGet version number of installed module, 'None', or 'default' Search 'paths' for module. If not found, return 'None'. If found, return the extracted version attribute, or 'default' if no version attribute was specified, or the value cannot be determined without importing the module. The version is formatted according to the requirement's version format (if any), unless it is 'None' or the supplied 'default'. N)rrrclose ImportErrorr r)rpathsdefaultfpivs r get_versionzRequire.get_version.s > ! %dk5991aGGIII   tt   T^We L L =Qg--$+2I;;q>> !s0: AAc0||duS)z/Return true if dependency is present on 'paths'N)r/)rr)s r is_presentzRequire.is_presentIs&&d22rcx||}|dS|t|S)z>Return true if dependency is present and up-to-date on 'paths'NF)r/r%r$)rr)rs r is_currentzRequire.is_currentMs7""5)) ?5s7||,,,r)rNN)Nr#N) __name__ __module__ __qualname____doc__rr!r%r/r1r3rrr r sAA=?#'     YYY 63333------rr cltjd}|s |Stj|S)Nc3KdVdSr4r9r9rremptyzmaybe_close..emptyVs r) contextlibcontextmanagerclosing)r+r<s r maybe_closer@UsE uww  a  rc< t||x\}}\}}}} n#t$rYdSwxYwt|5|tkr*|dt j|} n|tkrtj ||} nb|tkr$t||d} n3tj ||| } t| |dcdddSdddn #1swxYwYt| ||S)zFind 'module' by searching 'paths', and extract 'symbol' Return 'None' if 'module' does not exist on 'paths', or it does not define 'symbol'. If the module defines 'symbol' as a constant, return the constant. Otherwise, return 'default'.Nexec)rr(r@rreadmarshalloadrr get_frozen_objectrcompile get_modulegetattrr ) rsymbolr*r)r+pathsuffixmodekindinfocodeimporteds rr r `s~/:65/I/II%4%&$ tt Q 3 3 ;   FF1III<??DD Y  )&%88DD Y  16688T622DDvud;;H8VT22 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 D&' 2 22s ++B,DD Dc||jvrdSt|j|}d}d}d}|}tj|D]<}|j} |j} | |kr|j| }$| |kr| |ks| |kr|cS|}=dS)aExtract the constant value of 'symbol' from 'code' If the name 'symbol' is bound to a constant value by the Python code object 'code', return that value. If 'symbol' is bound to an expression, return 'default'. Otherwise, return 'None'. Return value is based on the first assignment to 'symbol'. 'symbol' must be a global, or at least a non-"fast" local in the code block. That is, only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol' must be present in 'code.co_names'. NZad)co_nameslistindexdisBytecodeopcodearg co_consts) rRrLr*name_idx STORE_NAME STORE_GLOBAL LOAD_CONSTconst byte_codeopr^s rr r }sT]""tDM""((00HJLJ E\$''    m   N3'EE H__" "2"2bL6H6HLLLEE  rctjdstjdkrdSd}|D]+}t|=t|,dS)z Patch the globals to remove the objects not available on some platforms. XXX it'd be better to test assertions about bytecode instead. javacliN)r r )sysplatform startswithglobals__all__remove) incompatiblers r_update_globalsrqsk < " "6 * *s|u/D/Drss  //////@@@@@@@@@@@@    A-A-A-A-A-A-A-A-H!!!3333:!!!!H   rPK{5Zcb <<>Lib/site-packages/setuptools/__pycache__/wheel.cpython-311.pycnuW+A `;d dZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl Z ddl Z ddl m Z ddl mZddlmZddlmZddlmZejd ejjZd Zd Zejd ZGd dZdS)zWheels support.N) get_platform) parse_version)sys_tags)canonicalize_name)write_requirements)_unpack_zipfile_objz^(?P.+?)-(?P\d.*?) ((-(?P\d.*?))?-(?P.+?)-(?P.+?)-(?P.+?) )\.whl$z8__import__('pkg_resources').declare_namespace(__name__) ctj|D])\}}}tj||}|D]X}tj||}tj|||}tj||Yt tt|D]}\} } tj|| }tj||| }tj |stj|||| =~+tj|dD]\}}}|rJtj |dS)zDMove everything under `src_dir` to `dst_dir`, and delete the former.T)topdownN) oswalkpathrelpathjoinrenamesreversedlist enumerateexistsrmdir) src_dirdst_dirdirpathdirnames filenamessubdirfsrcdstnds _E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/wheel.pyunpackr" se(*(8(8   $9'22 ! !A',,w**C',,w22C JsC T)H"5"56677  DAq',,w**C',,w22C7>>#&&  3$$$QK )+(F(F(F$9 c#Kddlm}||j} dV||dS#||wxYw)z* Temporarily disable info traces. r)logN) distutilsr% set_thresholdWARN)r%saveds r!disable_info_tracesr*6sq    ch ' 'E!  %     %    s ?AczeZdZdZdZdZdZdZdZdZ e dZ e d Z e d Z d S) Wheelcttj|}|t d|z||_|D]\}}t|||dS)Nzinvalid wheel name: %r) WHEEL_NAMEr r basename ValueErrorfilename groupdictitemssetattr)selfr1matchkvs r!__init__zWheel.__init__Es27++H5566 =5@AA A  OO%%++--  DAq D!Q      r#ctj|jd|jd|jdS)z>List tags (py_version, abi, platform) supported by this wheel..) itertoolsproduct py_versionsplitabiplatformr5s r!tagsz Wheel.tagsMsN O ! !# & & HNN3   M   $ $   r#ctdtDtfd|DdS)z5Is the wheel is compatible with the current platform?c3>K|]}|j|j|jfVdSN) interpreterr@rA).0ts r! z&Wheel.is_compatible..WsHDD34Q]AE1: .DDDDDDr#c3$K|] }|vdV dS)TN)rHrIsupported_tagss r!rJz&Wheel.is_compatible..Ys-FFa!~2E2ET2E2E2E2EFFr#F)setrnextrC)r5rMs @r! is_compatiblezWheel.is_compatibleUsfDD8@ DDDDDFFFF499;;FFFNNNr#ctj|j|j|jdkrdn t dzS)Nany) project_nameversionrAz.egg) pkg_resources DistributionrSrTrAregg_namerBs r!rWzWheel.egg_name[sO)*DL"mu44dd,..    (**v r#c|D]c}tj|}|dr8t |t |jr|cSdtd)Nz .dist-infoz.unsupported wheel format. .dist-info not found)namelist posixpathdirnameendswithr startswithrSr0)r5zfmemberr[s r! get_dist_infozWheel.get_dist_infoaskkmm  F'//G  .. %g..99)$*;<<>> IJJJr#ctj|j5}|||ddddS#1swxYwYdS)z"Install wheel as an egg directory.N)zipfileZipFiler1_install_as_egg)r5destination_eggdirr^s r!install_as_eggzWheel.install_as_eggks _T] + + 9r  !3R 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9s>AAc$|jd|j}||}d|z}tj|d}|||||||||||dS)N-z%s.dataEGG-INFO) rSrTr`r r r_convert_metadata_move_data_entries_fix_namespace_packages)r5rer^ dist_basename dist_info dist_dataegg_infos r!rdzWheel._install_as_eggps#'#4#4#4dllC &&r**  - 7<< 2J?? r#5y(KKK  2I>>> $$X/ABBBBBr#c 0 fd}|d}t|d}td|cxkotdknc}|std|zt|tj|tj |tj | d tt  fd  jD}t j|t jtj|d tj|d t!jt# |  } t%5t'| ddtj|dddddS#1swxYwYdS)Nc8tj|5}|d}t j|cdddS#1swxYwYdS)Nzutf-8) openrZrreaddecodeemailparserParserparsestr)namefpvaluernr^s r! get_metadataz-Wheel._convert_metadata..get_metadata|s 48899 =R ((11|**,,55e<< = = = = = = = = = = = = = = = = = =sABBBWHEELz Wheel-Versionz1.0z2.0dev0z$unsupported wheel format version: %s)metadatac.d|_t|SrF)markerstr)reqs r!raw_reqz(Wheel._convert_metadata..raw_reqsCJs88Or#c ri|]3}|fdt|fD4S)cg|]}|v| SrLrL)rHrinstall_requiress r! z6Wheel._convert_metadata...s/......r#)maprequires)rHextradistrrs r! z+Wheel._convert_metadata..si    w uh(?(?@@   r#METADATAzPKG-INFO)rextras_require)attrsrpz requires.txt)rgetr0rr r rrUrV from_location PathMetadatarrrextrasrename setuptoolsdictr*rget_command_obj) r^rernrpr}wheel_metadata wheel_versionwheel_v1r setup_distrrrs ` ` @@@r!rjzWheel._convert_metadatazs = = = = = = &g..%n&8&8&I&IJJ % M L L L LM)4L4L L L L L  H6FHH H B 2333GLL!3Y?? )77  "/0BINN8      GT]]__ = =>>           )X&&& GLL: . . GLL: . .    ,!1-   ! " "   **:66 X~66                     s;AH  HHctj|tjd}tj|rtj|dd}tj|tj|D]}|dr3tjtj||Jtjtj||tj||tj |ttjjfddDD]}t||tjrtj dSdS)z,Move data entries to their correct location.scriptsriz.pycc3XK|]$}tj|V%dSrF)r r r)rHr ros r!rJz+Wheel._move_data_entries..sG. .  GLLA & &. . . . . . r#)dataheaderspurelibplatlibN) r r rrmkdirlistdirr\unlinkrrfilterr")rerodist_data_scriptsegg_info_scriptsentryrs ` r!rkzWheel._move_data_entriessGLL!3Y?? GLLI>> 7>>+ , , (!w||"J  ; ;  H% & & &$566  >>&))Ibgll+> %5u== H& ' ' 'RW^. . . . >. . .    / /F 6- . . . . 7>>) $ $ HY       r#ctj|d}tj|r0t |5}|}dddn #1swxYwY|D]}tjj|g|dR}tj|d}tj|stj|tj|sBt |d5}|tdddn #1swxYwYdSdS)Nznamespace_packages.txtr;z __init__.pyw) r r rrrsrtr?rwriteNAMESPACE_PACKAGE_INIT)rprenamespace_packagesr{modmod_dirmod_inits r!rlzWheel._fix_namespace_packagessW\\ .00 7>>, - - 9()) 7R%'WWYY__%6%6" 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7) 9 9','9KCIIcNNKKK7<<??w~~g..&HW%%%w~~h//9h,,9!7888999999999999999 9 9 9 9s$'BB B>E%%E) ,E) N)__name__ __module__ __qualname__r9rCrPrWr`rfrd staticmethodrjrkrlrLr#r!r,r,Cs      OOO  KKK999 CCC77\7r  \ 6 9 9\ 9 9 9r#r,)__doc__rvr<r rZrerb contextlibdistutils.utilrrUrr setuptools.extern.packaging.tagsr!setuptools.extern.packaging.utilsrsetuptools.command.egg_inforsetuptools.archive_utilrcompileVERBOSEr6r.rr"contextmanagerr*r,rLr#r!rsu   ''''''''''''555555??????::::::777777RZJ   @,  ! ! ![9[9[9[9[9[9[9[9[9[9r#PK{5Z_c//FLib/site-packages/setuptools/__pycache__/unicode_utils.cpython-311.pycnuW+A `;d(ddlZddlZdZdZdZdS)Nct|trtjd|S |d}tjd|}|d}n#t $rYnwxYw|S)NNFDutf-8) isinstancestr unicodedata normalizedecodeencode UnicodeError)paths gE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/unicode_utils.py decomposers$2$UD111 {{7##$UD11{{7##      Ks?A,, A98A9ct|tr|Stjpd}|df}|D])} ||cS#t $rY&wxYwdS)zY Ensure that the given path is decoded, NONE when no expected encoding works rN)rrsysgetfilesystemencodingr UnicodeDecodeError)r fs_enc candidatesencs rfilesys_decoders $  & ( ( 3GFJ ;;s## # # #!    H sA  AAcP ||S#t$rYdSwxYw)z/turn unicode encoding into a functional routineN)r UnicodeEncodeError)stringrs r try_encoder%s;}}S!!! tts  %%)rrrrrrrsQ    &rPK{5Z.Lxr''ELib/site-packages/setuptools/__pycache__/archive_util.cpython-311.pycnuW+A `;ddZddlZddlZddlZddlZddlZddlZddlmZddl m Z gdZ GddeZ d Z e dfd Ze fd Ze fd Ze fd ZdZdZe fdZeeefZdS)z/Utilities for extracting common archive formatsN)DistutilsError)ensure_directory)unpack_archiveunpack_zipfileunpack_tarfiledefault_filterUnrecognizedFormatextraction_driversunpack_directoryceZdZdZdS)r z#Couldn't recognize the archive typeN)__name__ __module__ __qualname____doc__fE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/archive_util.pyr r s----rr c|S)z@The default progress/filter callback; returns True for all filesr)srcdsts rr r s Jrc~|ptD]"} ||||dS#t$rYwxYwtd|z)aUnpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat`` `progress_filter` is a function taking two arguments: a source path internal to the archive ('/'-separated), and a filesystem path where it will be extracted. The callback must return the desired extract path (which may be the same as the one passed in), or else ``None`` to skip that file or directory. The callback can thus be used to report on the progress of the extraction, as well as to filter the items extracted or alter their extraction paths. `drivers`, if supplied, must be a non-empty sequence of functions with the same signature as this function (minus the `drivers` argument), that raise ``UnrecognizedFormat`` if they do not support extracting the designated archive type. The `drivers` are tried in sequence until one is found that does not raise an error, or until all are exhausted (in which case ``UnrecognizedFormat`` is raised). If you do not supply a sequence of drivers, the module's ``extraction_drivers`` constant will be used, which means that ``unpack_zipfile`` and ``unpack_tarfile`` will be tried, in that order. Nz!Not a recognized archive type: %s)r r )filename extract_dirprogress_filterdriversdrivers rrrsy.//     F8[/ : : : FF"    H  ! /( :   s  **c|tj|std|z|d|fi}tj|D]\}}}||\}}|D]K} || zdztj|| f|tj|| <L|D]} tj|| } ||| z| } | s4t | tj|| } tj| | tj | | dS)z"Unpack" a directory, using the same interface as for archives Raises ``UnrecognizedFormat`` if `filename` is not a directory z%s is not a directory/N) ospathisdirr walkjoinrshutilcopyfilecopystat) rrrpathsbasedirsfilesrrdftargets rr r @sY 7== " "E !88!CDDD 2{# E WX.. ' 'dE;S O OA+.7S="',,sA:N:N+NE"',,tQ'' ( ( ' 'AW\\#q))F$_S1Wf55F  V $ $ $ T1%%A OAv & & & OAv & & & & ' ' 'rctj|st|dtj|5}t |||ddddS#1swxYwYdS)zUnpack zip `filename` to `extract_dir` Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined by ``zipfile.is_zipfile()``). See ``unpack_archive()`` for an explanation of the `progress_filter` argument. z is not a zip fileN)zipfile is_zipfiler ZipFile_unpack_zipfile_obj)rrrzs rrr[s  h ' 'G 888!EFFF  " "=aA{O<<<==================sAA!Acj|D]}|j}|dsd|dvr7t jj|g|dR}|||}|sp|drt|nft|| |j}t|d5}| |dddn #1swxYwY|j dz }|rt j ||dS)zInternal/private API used by other parts of setuptools. Similar to ``unpack_zipfile``, but receives an already opened :obj:`zipfile.ZipFile` object instead of a filename. r ..wbN)infolistr startswithsplitr!r"r%endswithrreadopenwrite external_attrchmod) zipfile_objrrinfonamer/datar.unix_attributess rr4r4js $$&&..} ??3   44::c??#:#: kz _iter_open_tar..s$rr r7N) chown contextlibclosingrEr;r<r!r"r%rVrQr=sep)rRrrmemberrE prelim_dst final_dsts r_iter_open_tarrcs}'&GM  G $ $$$ $ $F;Ds## ttzz#'>'>kDDJJsOODDDJ 1'6BB    (j99I !!"&)) +%crcN )# # # # #) $$$$$$$$$$$$$$$$$$$s7A#C1BC1 B!C1 B!!AC11C58C5c  tj|}n*#tj$r}t|d|d}~wwxYwt |||D]1\}} |||#tj$rY.wxYwdS)zUnpack tar/tar.gz/tar.bz2 `filename` to `extract_dir` Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined by ``tarfile.open()``). See ``unpack_archive()`` for an explanation of the `progress_filter` argument. z- is not a compressed or uncompressed tar fileNT)tarfiler?TarErrorr rc_extract_member ExtractError)rrrtarobjer`rbs rrrsh''   AI K    , K    " "69 5 5 5 5#    D  4s">9>A//BB)rr1rer!r&rLr]distutils.errorsr_pathr__all__r r rr rr4rVrcrr rrrrnsn55 ++++++######    ........ 0>! ! ! ! H=K''''6;I = = = =CQ....<///*$$$:;I6&~~ErPK{5ZD̫BLib/site-packages/setuptools/__pycache__/extension.cpython-311.pycnuW+A `;dddlZddlZddlZddlZddlZddlmZdZeZ eej j Z Gdde Z Gdde Z dS) N) get_unpatchedc^d} t|dgjdS#t$rYnwxYwdS)z0 Return True if Cython can be imported. zCython.Distutils.build_ext build_ext)fromlistTF) __import__r Exception) cython_impls cE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/extension.py _have_cythonr sP/K ;+777AAt      5s  **c(eZdZdZfdZdZxZS) Extensiona Describes a single extension module. This means that all source files will be compiled into a single binary file ``.`` (with ```` derived from ``name`` and ```` defined by one of the values in ``importlib.machinery.EXTENSION_SUFFIXES``). In the case ``.pyx`` files are passed as ``sources and`` ``Cython`` is **not** installed in the build environment, ``setuptools`` may also try to look for the equivalent ``.cpp`` or ``.c`` files. :arg str name: the full name of the extension, including any packages -- ie. *not* a filename or pathname, but Python dotted name :arg list[str] sources: list of source filenames, relative to the distribution root (where the setup script lives), in Unix form (slash-separated) for portability. Source files may be C, C++, SWIG (.i), platform-specific resource files, or whatever else is recognized by the "build_ext" command as source for a Python extension. :keyword list[str] include_dirs: list of directories to search for C/C++ header files (in Unix form for portability) :keyword list[tuple[str, str|None]] define_macros: list of macros to define; each macro is defined using a 2-tuple: the first item corresponding to the name of the macro and the second item either a string with its value or None to define it without a particular value (equivalent of "#define FOO" in source or -DFOO on Unix C compiler command line) :keyword list[str] undef_macros: list of macros to undefine explicitly :keyword list[str] library_dirs: list of directories to search for C/C++ libraries at link time :keyword list[str] libraries: list of library names (not filenames or paths) to link against :keyword list[str] runtime_library_dirs: list of directories to search for C/C++ libraries at run time (for shared extensions, this is when the extension is loaded). Setting this will cause an exception during build on Windows platforms. :keyword list[str] extra_objects: list of extra files to link with (eg. object files not implied by 'sources', static library that must be explicitly specified, binary resource files, etc.) :keyword list[str] extra_compile_args: any extra platform- and compiler-specific information to use when compiling the source files in 'sources'. For platforms and compilers where "command line" makes sense, this is typically a list of command-line arguments, but for other platforms it could be anything. :keyword list[str] extra_link_args: any extra platform- and compiler-specific information to use when linking object files together to create the extension (or to create a new static Python interpreter). Similar interpretation as for 'extra_compile_args'. :keyword list[str] export_symbols: list of symbols to be exported from a shared extension. Not used on all platforms, and not generally necessary for Python extensions, which typically export exactly one symbol: "init" + extension_name. :keyword list[str] swig_opts: any extra options to pass to SWIG if a source file has the .i extension. :keyword list[str] depends: list of files that the extension depends on :keyword str language: extension language (i.e. "c", "c++", "objc"). Will be detected from the source extensions if not provided. :keyword bool optional: specifies that a build failure in the extension should not abort the build process, but simply not install the failing extension. :keyword bool py_limited_api: opt-in flag for the usage of :doc:`Python's limited API `. :raises setuptools.errors.PlatformError: if 'runtime_library_dirs' is specified on Windows. (since v63) cz|dd|_tj||g|Ri|dS)Npy_limited_apiF)poprsuper__init__)selfnamesourcesargskw __class__s r rzExtension.__init__~sK!ff%5u==w444444444ctrdS|jpd}|dkrdnd}tjt jd|}tt||j |_ dS)z Replace sources with .pyx extensions to sources with the target language extension. This mechanism allows language authors to supply pre-converted sources but to prefer the .pyx sources. Nzc++z.cppz.cz.pyx$) r languagelower functoolspartialresublistmapr)rlang target_extr"s r _convert_pyx_sources_to_langz&Extension._convert_pyx_sources_to_langsq >>  F}"#zz||u44VV$ <<CT\2233 r)__name__ __module__ __qualname____doc__rr' __classcell__)rs@r rrsT]]~55555 4 4 4 4 4 4 4rrceZdZdZdS)Libraryz=Just like a regular Extension, but built as a library insteadN)r(r)r*r+rr r.r.sGGGGrr.)r!rdistutils.core distutilsdistutils.errorsdistutils.extensionmonkeyrr have_pyrexcorer _Extensionr.r/rr r8s !!!!!!    ]9>3 4 4 r4r4r4r4r4 r4r4r4jHHHHHiHHHHHrPK{5Z)'Lib/site-packages/setuptools/gui-32.exenuW+AMZ@ !L!This program cannot be run in DOS mode. $Sؠ222Ջ222}82`*2`;2`-2`?2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nrMu@u9EtM+útGHt.Ht&ssj^SSSSS0?sUtuE@}EjY+t7+t*+t+t@u9}EEE E]E#¹;;t0;t,;t==@E/E&E=t=t`;EEEt  A#MxE@tMMMt } tME릨tMujrMrE=@SuuEPuuu ׉EumM#;u+Et%eSuEuPuuu ׉Eu46*AD0 \@PqYqtu@@;uD6*AD0 \@VqYu@;u_q 룃uM@ uMu64Ѓ*AYYMLЃ*AD$ MeHMEtqjW6 E;up8tM6jEP6] u}uERP6 ;tSS6F ;tE0@@}uE#u M EE#;tD=t)=@t"=t)=@t"=t=@uEM#;u E]EE@]E#=@=tw;E;yvv0fE3H&HREEjSS68 tSSS6'#ƒjEP6/ utk}uYEE;bPjSS6 CSSS6#ƒE%=u6Ynj^0d=uSj6X EASS6= EEE+PD=P6 9}ۋ *AD$2M0 *AD$M ʈ8]u!Etȃ *AD }#;u|Etvu@SuEjPuWu @u4\@Pmȃ *AD 6Y6 *A_^[jh@omM3u39u;u mVVVVVlruuj@u uEPEEE};t?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~=EncodePointerKERNEL32.DLLDecodePointerFlsFreeFlsSetValueFlsGetValueFlsAllocruntime error TLOSS error SING error DOMAIN error R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information. R6033 - Attempt to use MSIL code from this assembly during native code initialization This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain. R6032 - not enough space for locale information R6031 - Attempt to initialize the CRT more than once. This indicates a bug in your application. R6030 - CRT not initialized R6028 - unable to initialize heap R6027 - not enough space for lowio initialization R6026 - not enough space for stdio initialization R6025 - pure virtual function call R6024 - not enough space for _onexit/atexit table R6019 - unable to open console device R6018 - unexpected heap error R6017 - unexpected multithread lock error R6016 - not enough space for thread data This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. R6009 - not enough space for environment R6008 - not enough space for arguments R6002 - floating point support not loaded Microsoft Visual C++ Runtime Library ...Runtime Error! Program:  EEE00P('8PW700PP (`h`hhhxppwpp ((((( H h(((( H H  !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLLSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$.com.exe.bat.cmd.\SystemRootHA@8i@#@%@%@%@%@h5@l5@;@;@k=@7=@>@#@@MA@iA@]G@+K@N@P@P@R@R@eY@ [@[@][@a[@^@H_@__@j@l@y@ށ@@@M@@[@!@]@ܮ@@@\$<Thp$@^r &0@Vbr$2L\r"4FXjv$0@RRGenerateConsoleCtrlEventGetExitCodeProcessnWaitForSingleObjectCreateProcessASetConsoleCtrlHandlerGetModuleFileNameAEnterCriticalSectionLeaveCriticalSectionGetModuleHandleW+Sleep"GetProcAddressExitProcesspGetCommandLineA<GetStartupInfoASetHandleCount>GetStdHandleGetFileTypeDeleteCriticalSection7TerminateProcessGetCurrentProcessHUnhandledExceptionFilterSetUnhandledExceptionFilterIsDebuggerPresentGetLastErrorHeapFreeHeapAlloc\GetCPInfoInterlockedIncrementInterlockedDecrementSGetACPGetOEMCPIsValidCodePage>TlsGetValue<TlsAlloc?TlsSetValue=TlsFreeSetLastErrorGetCurrentThreadIdWriteFileLoadLibraryAInitializeCriticalSectionAndSpinCountKFreeEnvironmentStringsAGetEnvironmentStringsLFreeEnvironmentStringsWWideCharToMultiByteGetEnvironmentStringsWHeapCreateaVirtualFreeYQueryPerformanceCounterjGetTickCountGetCurrentProcessIdSGetSystemTimeAsFileTimeRtlUnwindHeapReAlloc^VirtualAllocGetConsoleCPGetConsoleModeBFlushFileBuffersLCMapStringAMultiByteToWideCharLCMapStringW@GetStringTypeACGetStringTypeWGetLocaleInfoASetFilePointerHeapSizeDCloseHandleWriteConsoleAGetConsoleOutputCPWriteConsoleWSetStdHandleyCreateFileASCompareStringAVCompareStringWSetEnvironmentVariableAKERNEL32.dllnReadFileSetEndOfFile&GetProcessHeapGetFileAttributesA+A+AN@D#@l@\@         ! 5A CPR S WY l m pr   )     abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZhA`y!@~ڣ @ڣ AϢ[@~QQ^ _j21~l@CAAAAAHAh@@p@AAAhA@@ @ @@@@\@$@@@@d@D@@ @!@"@x@y@z@@@^@^@^@^@^@^@^@^@^@^@x h@j@@@@@@@@x@p@h@\@P@H@<@8@4@0@,@(@$@ @@@@@ @@@@@(@@@@@@@@@@@|@p@ A.DA)A)A)A)A)A)A)A)A)AHA. pPSTPDTAA;Zx0Nm:Yw/Mll@d@\@T@PK{5ZTD'Lib/site-packages/setuptools/logging.pynuW+Aimport sys import logging import distutils.log from . import monkey def _not_warning(record): return record.levelno < logging.WARNING def configure(): """ Configure logging to emit warning and above to stderr and everything else to stdout. This behavior is provided for compatibility with distutils.log but may change in the future. """ err_handler = logging.StreamHandler() err_handler.setLevel(logging.WARNING) out_handler = logging.StreamHandler(sys.stdout) out_handler.addFilter(_not_warning) handlers = err_handler, out_handler logging.basicConfig( format="{message}", style='{', handlers=handlers, level=logging.DEBUG) if hasattr(distutils.log, 'Log'): monkey.patch_func(set_threshold, distutils.log, 'set_threshold') # For some reason `distutils.log` module is getting cached in `distutils.dist` # and then loaded again when patched, # implying: id(distutils.log) != id(distutils.dist.log). # Make sure the same module object is used everywhere: distutils.dist.log = distutils.log def set_threshold(level): logging.root.setLevel(level*10) return set_threshold.unpatched(level) PK{5ZVH*Lib/site-packages/setuptools/gui-arm64.exenuW+AMZ@ !L!This program cannot be run in DOS mode. $ضV8K8K8K;J8K=J 8K NNNN_Tf ib8 * $! )&&&&&&&&&&&&&&&&@q @! @! _@q @! @ _@q @! A9_@q @! _@q @! _@q @ _@q A9_@q _H@ qL@qL_R_TIE)@LTB@_H @TAB@qLIF     )@!LTB@B_+T@LBT_c2 __S[cks{CsP@uXAw`ByhC{pDa(@@?{EsDkCcB[ASƨ_S[cks{CsP@uXAw`ByhC{pDa(@@?{EsDkCcB[ASƨ_ T!_ "Tb6 ` b6 ` b6"@9b9_BTBcT! BT? @aT @`T L$ L!@!`` Ld LB"Tb06 @" A$B&C!!@!``b dfcBbTb06 L` Lb(6 L`Lb 6 pL`pLb6 p `p b6 ` b6 ` b6"@9b9_!!_ T6!c ` ` 6!c ` ` b6"_8b8_BTBT!BT? @aT @T! @L!$ @L!!c` Lcd LBT!&C$Bc" A @!!fdb `BbT06!c @L` L(6!c @L`L 6!@c@ p@L`pL6! c p@ `p 6!c ` ` 6!c ` ` b6"_8b8_{S[cks!@SP@UXAW`BYhC[pD](@?@BsFkEcD[CSB{A_@xb 4@7 @`T,@_?Tt@Lqn"&"4@| ՠtLqn"&5@`N!Npn&BR@_!@ˢ$@x4!T$@x5ѠA_`7? #T @T,@_?Tc@ˠt@Lqn"&4!˥? CT#CtLqn"&4caT!@T! ˥ˠtLqn"&b4$@xB4!TA_c@ˢ$@x"4!TclT_@8 4 @@T,@_? Tp@L1n"&4@|pL1n"&5@a N!N0n&B R_֥Ѡ_!@ˢ@8B4!T ?@#T @T,@_?lTc@ˠp@L1n"&4!˥?@CT#DpL1n"&B4caT! @T!@˥ˠpL1n"&4@84!T_c@ˢ@84!TclT_Q @s/3CT_t1@?@?T__@lTChhb8c`(($TJ ) @ $Z_@(@Tc  `$Z_D@(D@Tc `$Z_@8(@8`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T<LT|D{s/CsRRhsB***4*R*5Rj*5h_R kaT`BR_R kaTB*_CCԮ+@kDcC[BSA{ƨ_D@*h_R kT`BѶS[c{C****t@****#@94@HC yIC{è@cB[ASĨ_{.Sq{_h]AH5S {CCsR#{@TR@@c@**"Rc5RQ@94 @HC yI{è @S¨_S[{ SC9R;9@)R @ k!T@94 @HC yI"R@954 @HC yI"R4 @HC yIR 5ܺ@)R @ k!T#A94@HC yI"R#A954@HC yI"R4@HC yIRCv`5A3@K@ ?A93@*A93@Ru4B9h4K@*{˨[AS¨_bR%@x+$@xHQeqIhQLieqhK5l4BB_{R hD ( R ?{_S[{$HT vD R ?ր r4 4DR?֠R{[AS¨_S[{`RRR!S)(9h4)(!_RR`5SvR`R*{[AS¨_R޴S {9h4(855i@(9 h4H85H )T`@h8qT`4i@h@  { @S¨_R#RbR@8+@8HQeqIhQLieqhK5l4BB_{h]A5RR  A{@_T{_S {:RT{@TsRC@ @@8 ij8@8ij8 K5i4s@94 @HC yI{è @S¨_{#y_4S!RC~`4#@yR{¨_|P;_{Cha(j /?.?(G?g [H @y5@987OqQh qaTLR h qaTlRhqTRR)R K(! Q+  * L@9 SK@ S? qAzT kT 8qaT  * T? T)KKL y SI yRhKqiTADq"TR R(R) (yhkTOq__HRC5{_{*Ax   jTRRi`yR4R``]R{A_{``R{A_{`@`@IC @5@h@ kT@Rh@ k@T R{¨A_{ C5 @C@h(25R R{¨A_f )L T@`T %RR#RHa;/&RaRk@TERRCR X X Tn`t \8pp \ \ \+qf }`r;g;{y*sz | \8 yOT \RX yBXu+qR }yK]Yg^`g^;"Tz \gR1:p.fRn2\ 2lȵm}\l ~\b(-Lgt+KiQ}@8b H+u rymHA3:uP\VQU\q\st\KT7 yBUymFW\t wfY*u_VX }yc]Rg^`K^_ V]4x?Q#Ib?ƺ??^?AG;BIb?WUUUUU?B.?_D; R J}S rTPq T`qTpq `R R@RRr R_qRqR**qKRI*q**} SK * j *K*`*_(D;*r R_qRqOR**qJ*}SK * j *@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3h! @@0 @Ha@ 2Ia @)Rha@( 3ha @@1)ZA C"RR* ? @H @ 6h@ wiH @6h@ viH @6h@ uiH @6h@ tiH @6h@ siH@ r T?qT? qT? qTh@ j )h@(jhIh@ hi4PQ@Q)@{¨cB[ASè_ {qTQqTEHRB(R{_(D;}@ *D_D; R J!*-)|@|@  i D_(D; }@K+D_(D;}@_<@ R (I)@yL @y( a4 I@?@)TH@  ?@)Tk kJT_S{T`5R aˀ`R$@h* R{S_@yIR kaT<@ R (I@? kTH1@y R-q@TR_!594  |j7p= S %Ț N2 NI>N*`TIH>N )I87(}@` Hw }@H S %Ț 1 )>N*TH }@Ӏ IilA< N0:n>N1 N(>N }S(>N +j}SA*AV4 N|=   N4n1 Nr N,>NO>N 7 S)>NJ%ȚH>N-  (!Q qSJ%ɚOL ҆RkL ki _ kcTl>Nk>NJ86ki  K H <4n Nq NR N+>N/>NM>NL>N) (!ʚ * KډR) K HQ(!Ț * `TI  K(}@ H_954  |j7p= S %Ț N2 NI>N*`TIH>N )I87(}@` Hr }@H S %Ț 1 )>N*TH }@Ӏ IdlA< N0:n>N1 N(>N }S(>N +j}SA*AQh5N  | 73 Np= SJ%Ț NR N3nH>N1 N)>N.>N  , `TH>N *l _ k+T-T(}@` , }@( SI%Ț0  >N0   10.1 (>N  _ TTH }@ 3 NkAp< N3nNQ:n(>NHR NH>Nh H>N )(}@i H+Aj9_!k`_{(@@g {_a{@ @? k{_a{ ȨC@94( @c)ȱc*H@ kaTc( @?qTc(ȩ!@ kTc( !@ kTc(i!@ kTyc()3@r ձS?S ߈{A_a csm !"{ @@߰ {_a{ @@H {_a{@@ {_a{@@6 {_a{@(4@@4 |@*FHA )@ yj*! I@9(H9 {_a{@ {_a{ @@ {_a{R {_a{@@ {_a{R {_a{R {_a{R {_a{R {_a{C@94`R {_a{ @Y {_a{`R {_a{@ @R r? k{_a0F\n.L^.FXj|(:HVbt*6JZlv*<Tjz-@'@'@'@=@U@@z@k@>@failed to create process. failed to get exit code from process. %s %s-script.pywCannot open %s #!#!python.exeCannot find Python executable %s Could not exec %sp@@@4@@@@@ (@ 8@ H@ X@ d@p@ @ @@ @ @ ‹@ċ@Ћ@؋@܋@@@@@@@@@ @@@@@ @$@(@,@0@4@8@<@@@D@H@L@P@T@X@\@`@d@h@l@p@t@x@|@@ @ @@@Ќ@@@@8@X@x@@#@@ @(@&P@p@@@@@#Ď@Ў@ @@@0@%X@$@%@+؏@@ @"H@(x@*@Ȑ@ ؐ@@ ‹@@@8@P@p@‹@@@P@H@(@Ќ@@__based(__cdecl__pascal__stdcall__thiscall__fastcall__vectorcall__clrcall__eabi__swift_1__swift_2__ptr64__restrict__unalignedrestrict( new delete=>><<!==!=[]operator->*++---+&->*/%<<=>>=,()~^|&&||*=+=-=/=%=>>=<<=&=|=^=`vftable'`vbtable'`vcall'`typeof'`local static guard'`string'`vbase destructor'`vector deleting destructor'`default constructor closure'`scalar deleting destructor'`vector constructor iterator'`vector destructor iterator'`vector vbase constructor iterator'`virtual displacement map'`eh vector constructor iterator'`eh vector destructor iterator'`eh vector vbase constructor iterator'`copy constructor closure'`udt returning'`EH`RTTI`local vftable'`local vftable constructor closure' new[] delete[]`omni callsig'`placement delete closure'`placement delete[] closure'`managed vector constructor iterator'`managed vector destructor iterator'`eh vector copy constructor iterator'`eh vector vbase copy constructor iterator'`dynamic initializer for '`dynamic atexit destructor for '`vector copy constructor iterator'`vector vbase copy constructor iterator'`managed vector copy constructor iterator'`local static thread guard'operator "" operator co_awaitoperator<=> Type Descriptor' Base Class Descriptor at ( Base Class Array' Class Hierarchy Descriptor' Complete Object Locator'`anonymous namespace'(null)(null)   mscoree.dllCorExitProcessP@@@H@-@-@@@p @ @@@@x@@(=@-@@-@@ @-@@h@-@.\.com.exe.bat.cmd        ! 5A CPR S WY l m pr  )   Y* @@@@@@p@@@@@@@@P@@@P@h@@@؞@api-ms-win-core-datetime-l1-1-1api-ms-win-core-fibers-l1-1-1api-ms-win-core-file-l1-2-2api-ms-win-core-localization-l1-2-1api-ms-win-core-localization-obsolete-l1-2-0api-ms-win-core-processthreads-l1-1-2api-ms-win-core-string-l1-1-0api-ms-win-core-synch-l1-2-0api-ms-win-core-sysinfo-l1-2-1api-ms-win-core-winrt-l1-1-0api-ms-win-core-xstate-l2-1-0api-ms-win-rtcore-ntuser-window-l1-1-0api-ms-win-security-systemfunctions-l1-1-0ext-ms-win-ntuser-dialogbox-l1-1-0ext-ms-win-ntuser-windowstation-l1-1-0advapi32kernel32ntdllapi-ms-win-appmodel-runtime-l1-1-2user32api-ms-ext-ms-AreFileApisANSICompareStringExFlsAllocFlsFreeFlsGetValueFlsSetValueInitializeCriticalSectionExLCMapStringExLocaleNameToLCIDAppPolicyGetProcessTerminationMethod@@@@@@@@@@@@Р@@@@INFinfNANnanNAN(SNAN)nan(snan)NAN(IND)nan(ind)e+000@ģ@ȣ@̣@У@ԣ@أ@ܣ@@@@@@ @,@0@4@8@<@@@D@H@L@P@T@X@`@h@t@|@<@@@@@@@Ȥ@Ԥ@ؤ@@@@@ @(@0@8@@@H@P@`@p@@@@@إ@@@@@@@@@ @(@0@8@H@`@p@@@@@@Ȧ@ئ@@@ @@0@X@p@SunMonTueWedThuFriSatSundayMondayTuesdayWednesdayThursdayFridaySaturdayJanFebMarAprMayJunJulAugSepOctNovDecJanuaryFebruaryMarchAprilJuneJulyAugustSeptemberOctoberNovemberDecemberAMPMMM/dd/yydddd, MMMM dd, yyyyHH:mm:ssSunMonTueWedThuFriSatSundayMondayTuesdayWednesdayThursdayFridaySaturdayJanFebMarAprMayJunJulAugSepOctNovDecJanuaryFebruaryMarchAprilJuneJulyAugustSeptemberOctoberNovemberDecemberAMPMMM/dd/yydddd, MMMM dd, yyyyHH:mm:ssen-USja-JPzh-CNko-KRzh-TW ((((( H   !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP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MXfr-BEit-CHnl-BEnn-NOpt-PTsr-SP-Latnsv-FIaz-AZ-Cyrlse-SEms-BNuz-UZ-Cyrlquz-ECar-EGzh-HKde-ATen-AUes-ESfr-CAsr-SP-Cyrlse-FIquz-PEar-LYzh-SGde-LUen-CAes-GTfr-CHhr-BAsmj-NOar-DZzh-MOde-LIen-NZes-CRfr-LUbs-BA-Latnsmj-SEar-MAen-IEes-PAfr-MCsr-BA-Latnsma-NOar-TNen-ZAes-DOsr-BA-Cyrlsma-SEar-OMen-JMes-VEsms-FIar-YEen-CBes-COsmn-FIar-SYen-BZes-PEar-JOen-TTes-ARar-LBen-ZWes-ECar-KWen-PHes-CLar-AEes-UYar-BHes-PYar-QAes-BOes-SVes-HNes-NIes-PRzh-CHTsr @Bp@,p@q@@@@@@@@@@@ @0@@@CP@`@p@X@)@@k@!@c@@D@}@ @@E8@@G@@@(@HH@8@H@X@Ih@x@@A@P@@JX@@@@@@@@@(@8@H@KX@h@`@ x@@@@@@@@@@@(@8@H@X@h@x@@@(@#@e`@*@l@@&@hh@ @L@.@sp@ @@@(@M8@H@@>X@Ƚ@7h@x@ x@N@/@tؼ@@@Z@ @OP@(@j@@a@@P@@@Q@@Rx@-(@r@18@x@:H@@@?X@h@S@2x@y8@%@g0@$@f@h@+@m@@=@@;@@0@@w@u(@U@8@H@TX@@h@@6x@~@@V@@W@@@@ȼ@@Xм@@Y@<@@(@v8@@H@[ @"X@dh@x@@@@@@@\ @@@@ @@8@H@]@3X@z@@h@н@8x@ؽ@9@@@^@n@@_@5@|@ @b@@`@4@@{H@'(@i8@oH@X@h@x@@@@F@paf-zaar-aear-bhar-dzar-egar-iqar-joar-kwar-lbar-lyar-maar-omar-qaar-saar-syar-tnar-yeaz-az-cyrlaz-az-latnbe-bybg-bgbn-inbs-ba-latnca-escs-czcy-gbda-dkde-atde-chde-dede-lide-ludiv-mvel-gren-auen-bzen-caen-cben-gben-ieen-jmen-nzen-phen-tten-usen-zaen-zwes-ares-boes-cles-coes-cres-does-eces-eses-gtes-hnes-mxes-nies-paes-pees-pres-pyes-sves-uyes-veet-eeeu-esfa-irfi-fifo-fofr-befr-cafr-chfr-frfr-lufr-mcgl-esgu-inhe-ilhi-inhr-bahr-hrhu-huhy-amid-idis-isit-chit-itja-jpka-gekk-kzkn-inkok-inko-krky-kglt-ltlv-lvmi-nzmk-mkml-inmn-mnmr-inms-bnms-mymt-mtnb-nonl-benl-nlnn-nons-zapa-inpl-plpt-brpt-ptquz-boquz-ecquz-pero-roru-rusa-inse-fise-nose-sesk-sksl-sisma-nosma-sesmj-nosmj-sesmn-fisms-fisq-alsr-ba-cyrlsr-ba-latnsr-sp-cyrlsr-sp-latnsv-fisv-sesw-kesyr-syta-inte-inth-thtn-zatr-trtt-ruuk-uaur-pkuz-uz-cyrluz-uz-latnvi-vnxh-zazh-chszh-chtzh-cnzh-hkzh-mozh-sgzh-twzu-za Tc-^k@tFМ, a\)cd4҇f;lDِe,BbE"&'O@V$gmsmrd'c%{pk>_nj f29.EZ%qVJ.C|!@Ί Ą' |Ô%I@T̿aYܫ\ DgR)`*! VG6K]_܀ @َЀk#cd8L2WBJa"=UD~ $s%rс@b;zO]3AOmm!3VV%(w;I-G 8NhU]i<$qE}A'JnWb쪉"f37>,ެdNj5jVg@;*xh2kůid&_U JW {,Ji)Ǫv6 UړǚK%v t:H孎cY˗i&>r䴆["93uzKG-wn@  _l%Bɝ s|-Ciu+-,W@zbjUUYԾX1EL9MLy;-"m^8{yrvxyN\lo};obwQ4Y+XW߯_w[R/=OB R E]B.4o?nz(wKgg;ɭVl H[=J6RMq! EJjت|Lu<@rd 6x)Q9%0+L ;<(wXC=sF|bt!ۮ.P9B4Ҁy7P,=87MsgmQĢR:#שsDp:RRN/M׫ Ob{!@fu)/wdq=v/}fL3. iLs&`@< q!-7ڊ1BALlȸ|Rabڇ3ah𔽚j-6zƞ) ?IϦw#[/r5D¨N2Lɭ3v2!L.2>p6\BF8҇i>o@@w,=q/ cQrFZ**F΍$'#+GK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B ɊȆBv0Ȅ&@;@"J0Є&;0Є&20Є&p"01??{ @- @@&@*@"J@?@Ȃ&5@0@CP>@Ђ$01luu|@vp"01u u{!pȂ$01@zz8|p"01||{p"01X|d|{ 01hc`Ђ$@@ɆȂ*p"01{@" 1P @"01؋\|@@@Ȃ&@@ɆȂ(NpцȂ(01,h|@!p"01̤|  +@@Ȃ&8@@5pȂ$01иh|1p"018{;pȂ$01t$}p01@}s@E@Ђ$/7*5;@6@Ђ$.@*@"p"01Hh{p"01 8{p"01p{p"01{2@ @@@ɆȂ(=`$:0&h`Ђ$@@ɆȂ*d@@цȂ(PшȄ&B0&J`$0Ȅ&2P-@Ђ$01\`}\@+@Ȃ$0&VpȂ$01{@@ɆȂ*9@@Ȃ$VP$@Ȃ&01L@}l @}.P @Ȃ&01X@}h@}o0 ɈȄ&P@"01 4 }p01D ` }P%@цȂ(01<}}p"01  {a@U@ɆȂ(PшȄ&20&FpцȂ(01l##|0 ɈȄ&40 ɈȄ&N0Ȅ&L0Ȅ&_0 ɈȄ&FpцȂ(01d))|P @"01,,}-p"01 --|j@F@ɆȂ**@@Ђ$gP V ɈȄ&@=Ȃ$P  ɈȄ&+P'&P ɈȄ&=P3@Ȃ$014ZZ~Z[~r0&0 ɈȄ&NP D шȄ&p"01puu(~u @ r0F\n.L^.FXj|(:HVbt*6JZlv*<TjzWaitForSingleObject=GetExitCodeProcessCreateProcessAsGetModuleFileNameASetConsoleCtrlHandlerGenerateConsoleCtrlEventDQueryPerformanceCounterGetCurrentProcessIdGetCurrentThreadIdGetSystemTimeAsFileTimebInitializeSListHeadnSetUnhandledExceptionFilterGetStartupInfoWxGetModuleHandleWKERNEL32.dllRtlUnwindExaGetLastError1SetLastErrorFlsAllocFlsGetValueFlsSetValueFlsFree3EnterCriticalSectionLeaveCriticalSection_InitializeCriticalSectionExDeleteCriticalSectionYRaiseExceptionGetCommandLineAGetCommandLineWGetStdHandleWriteFiletGetModuleFileNameWGetCurrentProcess`ExitProcessTerminateProcessFreeLibrarywGetModuleHandleExWGetProcAddressCloseHandleCreateProcessWCreateFileWOGetFileTypejReadFileGetConsoleModegReadConsoleWDHeapAllocHHeapFree^InitializeCriticalSectionAndSpinCountTlsAllocTlsGetValueTlsSetValueTlsFreeLoadLibraryExWCompareStringWLCMapStringWwFindClose}FindFirstFileExWFindNextFileWIsValidCodePageGetACPGetOEMCPGetCPInfoMultiByteToWideCharWideCharToMultiByte8GetEnvironmentStringsWFreeEnvironmentStringsWSetEnvironmentVariableWKSetStdHandleGetStringTypeWGetProcessHeapCGetFileAttributesExWGetConsoleOutputCPSetEndOfFile#SetFilePointerExFlushFileBuffersMGetFileSizeExMHeapSizeKHeapReAllocWriteConsoleW2-+] f     @@@@@@@@@@@@@@C abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`y!@~ڣ @ڣ AϢ[@~QQ^ _j21~@)@)@)@)@)@)@)@)@)@@)@)@)@)@)@)@)@..uL XPhp0Phltp| x|` 1H1x Q' '!0h&(&9'x''')) *]x*++9a ,Eah,Ia,,b.5.Y`.}x/$0eh0e00101i3=4%@4855P5p56ya7EaH7U7me08e9}f<y`(=E=!>up?l?BfBme(CaCDEdF$H!b8KaKaLaMNPcTecPWWZaZ5f0]b]^_0aXaeb)cu`8d gUahg h ej]b0kQmqamo}bp0qrUbXrUbrMasbsb(tqet]t8u`v8wwxAyQ z$z1`za{M{H8|h|f@~Ii=A`h-Ma ]b]a%EPЂ@h`HH8В1hxix\` aaP)x)bX8aaH%ipebYa8i0mbqbqbiuHeP @a`bXeaȼia0g0IixDEb-`uXh(P-a`mbM9a0MaMaqi@@Pfg(4T1d5YabaaP`Xt00X`Hab84H$qb!%el ymeHE`f`ef e-bbQa-`Qe`IaX yb p 1 ep a Qb0 @x 0 1`x dxpi P c Hd( |X!"#, 'f()c*}8+f+b,--X.aa.I/01X2Q3\7<8I,IIcKK}bHM|`QRUU!UVXMHYZ[\Yp\(]=`]X_ya_1a`ep`]eafjjea@ke0m nn4pHt=`uTpzzz\{{|8|\|,|||}@}`}}}}}~(~txآأ 0@P`pФ 0@P`pХ 0@P`pЦ 0@P`pЧ 0@P`pШ 0@P`pЩ 0@P`pЪdЦ (8@HPX`hpȧ`hpxȩЩة (08@HPX`hpx (08@HPX`hpxȡСء (08@HP`hpxȢТآ (08@HPX`hpxح(8HXhxȮخ(8HXhxȯد(8HXhxȠؠ(8HXhxȡء(8HXhxȢآ(8HXhxȣأ(8HXhxȤؤ(8HXhxȥإ(8HXhxȦئ(8HXhxȧا(8HXhxȨب(8HXhxȩة(8HXhxȪت(8HXhxȫث0@P`pШ 0@P`pЩ 0@P`pЪ 0@P`pЫ 0@P`pЬ 0@P`pЭ 0@P`pЮ 0@P`pЯ 0@P`pР 0@P`pС 0@P`pТ 0@P`pУ 0@P`pФ 0@P`pХ 0@P` h @Dآ8X@HPX`hpxȩЩPK{5ZM7SLSL*Lib/site-packages/setuptools/build_meta.pynuW+A"""A PEP 517 interface to setuptools Previously, when a user or a command line tool (let's call it a "frontend") needed to make a request of setuptools to take a certain action, for example, generating a list of installation requirements, the frontend would would call "setup.py egg_info" or "setup.py bdist_wheel" on the command line. PEP 517 defines a different method of interfacing with setuptools. Rather than calling "setup.py" directly, the frontend should: 1. Set the current directory to the directory with a setup.py file 2. Import this module into a safe python interpreter (one in which setuptools can potentially set global variables or crash hard). 3. Call one of the functions defined in PEP 517. What each function does is defined in PEP 517. However, here is a "casual" definition of the functions (this definition should not be relied on for bug reports or API stability): - `build_wheel`: build a wheel in the folder and return the basename - `get_requires_for_build_wheel`: get the `setup_requires` to build - `prepare_metadata_for_build_wheel`: get the `install_requires` - `build_sdist`: build an sdist in the folder and return the basename - `get_requires_for_build_sdist`: get the `setup_requires` to build Again, this is not a formal definition! Just a "taste" of the module. """ import io import os import shlex import sys import tokenize import shutil import contextlib import tempfile import warnings from pathlib import Path from typing import Dict, Iterator, List, Optional, Union import setuptools import distutils from . import errors from ._path import same_path from ._reqs import parse_strings from ._deprecation_warning import SetuptoolsDeprecationWarning from distutils.util import strtobool __all__ = ['get_requires_for_build_sdist', 'get_requires_for_build_wheel', 'prepare_metadata_for_build_wheel', 'build_wheel', 'build_sdist', 'get_requires_for_build_editable', 'prepare_metadata_for_build_editable', 'build_editable', '__legacy__', 'SetupRequirementsError'] SETUPTOOLS_ENABLE_FEATURES = os.getenv("SETUPTOOLS_ENABLE_FEATURES", "").lower() LEGACY_EDITABLE = "legacy-editable" in SETUPTOOLS_ENABLE_FEATURES.replace("_", "-") class SetupRequirementsError(BaseException): def __init__(self, specifiers): self.specifiers = specifiers class Distribution(setuptools.dist.Distribution): def fetch_build_eggs(self, specifiers): specifier_list = list(parse_strings(specifiers)) raise SetupRequirementsError(specifier_list) @classmethod @contextlib.contextmanager def patch(cls): """ Replace distutils.dist.Distribution with this class for the duration of this context. """ orig = distutils.core.Distribution distutils.core.Distribution = cls try: yield finally: distutils.core.Distribution = orig @contextlib.contextmanager def no_install_setup_requires(): """Temporarily disable installing setup_requires Under PEP 517, the backend reports build dependencies to the frontend, and the frontend is responsible for ensuring they're installed. So setuptools (acting as a backend) should not try to install them. """ orig = setuptools._install_setup_requires setuptools._install_setup_requires = lambda attrs: None try: yield finally: setuptools._install_setup_requires = orig def _get_immediate_subdirectories(a_dir): return [name for name in os.listdir(a_dir) if os.path.isdir(os.path.join(a_dir, name))] def _file_with_extension(directory, extension): matching = ( f for f in os.listdir(directory) if f.endswith(extension) ) try: file, = matching except ValueError: raise ValueError( 'No distribution was found. Ensure that `setup.py` ' 'is not empty and that it calls `setup()`.') return file def _open_setup_script(setup_script): if not os.path.exists(setup_script): # Supply a default setup.py return io.StringIO(u"from setuptools import setup; setup()") return getattr(tokenize, 'open', open)(setup_script) @contextlib.contextmanager def suppress_known_deprecation(): with warnings.catch_warnings(): warnings.filterwarnings('ignore', 'setup.py install is deprecated') yield _ConfigSettings = Optional[Dict[str, Union[str, List[str], None]]] """ Currently the user can run:: pip install -e . --config-settings key=value python -m build -C--key=value -C key=value - pip will pass both key and value as strings and overwriting repeated keys (pypa/pip#11059). - build will accumulate values associated with repeated keys in a list. It will also accept keys with no associated value. This means that an option passed by build can be ``str | list[str] | None``. - PEP 517 specifies that ``config_settings`` is an optional dict. """ class _ConfigSettingsTranslator: """Translate ``config_settings`` into distutils-style command arguments. Only a limited number of options is currently supported. """ # See pypa/setuptools#1928 pypa/setuptools#2491 def _get_config(self, key: str, config_settings: _ConfigSettings) -> List[str]: """ Get the value of a specific key in ``config_settings`` as a list of strings. >>> fn = _ConfigSettingsTranslator()._get_config >>> fn("--global-option", None) [] >>> fn("--global-option", {}) [] >>> fn("--global-option", {'--global-option': 'foo'}) ['foo'] >>> fn("--global-option", {'--global-option': ['foo']}) ['foo'] >>> fn("--global-option", {'--global-option': 'foo'}) ['foo'] >>> fn("--global-option", {'--global-option': 'foo bar'}) ['foo', 'bar'] """ cfg = config_settings or {} opts = cfg.get(key) or [] return shlex.split(opts) if isinstance(opts, str) else opts def _valid_global_options(self): """Global options accepted by setuptools (e.g. quiet or verbose).""" options = (opt[:2] for opt in setuptools.dist.Distribution.global_options) return {flag for long_and_short in options for flag in long_and_short if flag} def _global_args(self, config_settings: _ConfigSettings) -> Iterator[str]: """ Let the user specify ``verbose`` or ``quiet`` + escape hatch via ``--global-option``. Note: ``-v``, ``-vv``, ``-vvv`` have similar effects in setuptools, so we just have to cover the basic scenario ``-v``. >>> fn = _ConfigSettingsTranslator()._global_args >>> list(fn(None)) [] >>> list(fn({"verbose": "False"})) ['-q'] >>> list(fn({"verbose": "1"})) ['-v'] >>> list(fn({"--verbose": None})) ['-v'] >>> list(fn({"verbose": "true", "--global-option": "-q --no-user-cfg"})) ['-v', '-q', '--no-user-cfg'] >>> list(fn({"--quiet": None})) ['-q'] """ cfg = config_settings or {} falsey = {"false", "no", "0", "off"} if "verbose" in cfg or "--verbose" in cfg: level = str(cfg.get("verbose") or cfg.get("--verbose") or "1") yield ("-q" if level.lower() in falsey else "-v") if "quiet" in cfg or "--quiet" in cfg: level = str(cfg.get("quiet") or cfg.get("--quiet") or "1") yield ("-v" if level.lower() in falsey else "-q") valid = self._valid_global_options() args = self._get_config("--global-option", config_settings) yield from (arg for arg in args if arg.strip("-") in valid) def __dist_info_args(self, config_settings: _ConfigSettings) -> Iterator[str]: """ The ``dist_info`` command accepts ``tag-date`` and ``tag-build``. .. warning:: We cannot use this yet as it requires the ``sdist`` and ``bdist_wheel`` commands run in ``build_sdist`` and ``build_wheel`` to re-use the egg-info directory created in ``prepare_metadata_for_build_wheel``. >>> fn = _ConfigSettingsTranslator()._ConfigSettingsTranslator__dist_info_args >>> list(fn(None)) [] >>> list(fn({"tag-date": "False"})) ['--no-date'] >>> list(fn({"tag-date": None})) ['--no-date'] >>> list(fn({"tag-date": "true", "tag-build": ".a"})) ['--tag-date', '--tag-build', '.a'] """ cfg = config_settings or {} if "tag-date" in cfg: val = strtobool(str(cfg["tag-date"] or "false")) yield ("--tag-date" if val else "--no-date") if "tag-build" in cfg: yield from ["--tag-build", str(cfg["tag-build"])] def _editable_args(self, config_settings: _ConfigSettings) -> Iterator[str]: """ The ``editable_wheel`` command accepts ``editable-mode=strict``. >>> fn = _ConfigSettingsTranslator()._editable_args >>> list(fn(None)) [] >>> list(fn({"editable-mode": "strict"})) ['--mode', 'strict'] """ cfg = config_settings or {} mode = cfg.get("editable-mode") or cfg.get("editable_mode") if not mode: return yield from ["--mode", str(mode)] def _arbitrary_args(self, config_settings: _ConfigSettings) -> Iterator[str]: """ Users may expect to pass arbitrary lists of arguments to a command via "--global-option" (example provided in PEP 517 of a "escape hatch"). >>> fn = _ConfigSettingsTranslator()._arbitrary_args >>> list(fn(None)) [] >>> list(fn({})) [] >>> list(fn({'--build-option': 'foo'})) ['foo'] >>> list(fn({'--build-option': ['foo']})) ['foo'] >>> list(fn({'--build-option': 'foo'})) ['foo'] >>> list(fn({'--build-option': 'foo bar'})) ['foo', 'bar'] >>> warnings.simplefilter('error', SetuptoolsDeprecationWarning) >>> list(fn({'--global-option': 'foo'})) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): SetuptoolsDeprecationWarning: ...arguments given via `--global-option`... """ args = self._get_config("--global-option", config_settings) global_opts = self._valid_global_options() bad_args = [] for arg in args: if arg.strip("-") not in global_opts: bad_args.append(arg) yield arg yield from self._get_config("--build-option", config_settings) if bad_args: msg = f""" The arguments {bad_args!r} were given via `--global-option`. Please use `--build-option` instead, `--global-option` is reserved to flags like `--verbose` or `--quiet`. """ warnings.warn(msg, SetuptoolsDeprecationWarning) class _BuildMetaBackend(_ConfigSettingsTranslator): def _get_build_requires(self, config_settings, requirements): sys.argv = [ *sys.argv[:1], *self._global_args(config_settings), "egg_info", *self._arbitrary_args(config_settings), ] try: with Distribution.patch(): self.run_setup() except SetupRequirementsError as e: requirements += e.specifiers return requirements def run_setup(self, setup_script='setup.py'): # Note that we can reuse our build directory between calls # Correctness comes first, then optimization later __file__ = setup_script __name__ = '__main__' with _open_setup_script(__file__) as f: code = f.read().replace(r'\r\n', r'\n') exec(code, locals()) def get_requires_for_build_wheel(self, config_settings=None): return self._get_build_requires(config_settings, requirements=['wheel']) def get_requires_for_build_sdist(self, config_settings=None): return self._get_build_requires(config_settings, requirements=[]) def _bubble_up_info_directory(self, metadata_directory: str, suffix: str) -> str: """ PEP 517 requires that the .dist-info directory be placed in the metadata_directory. To comply, we MUST copy the directory to the root. Returns the basename of the info directory, e.g. `proj-0.0.0.dist-info`. """ info_dir = self._find_info_directory(metadata_directory, suffix) if not same_path(info_dir.parent, metadata_directory): shutil.move(str(info_dir), metadata_directory) # PEP 517 allow other files and dirs to exist in metadata_directory return info_dir.name def _find_info_directory(self, metadata_directory: str, suffix: str) -> Path: for parent, dirs, _ in os.walk(metadata_directory): candidates = [f for f in dirs if f.endswith(suffix)] if len(candidates) != 0 or len(dirs) != 1: assert len(candidates) == 1, f"Multiple {suffix} directories found" return Path(parent, candidates[0]) msg = f"No {suffix} directory found in {metadata_directory}" raise errors.InternalError(msg) def prepare_metadata_for_build_wheel(self, metadata_directory, config_settings=None): sys.argv = [ *sys.argv[:1], *self._global_args(config_settings), "dist_info", "--output-dir", metadata_directory, "--keep-egg-info", ] with no_install_setup_requires(): self.run_setup() self._bubble_up_info_directory(metadata_directory, ".egg-info") return self._bubble_up_info_directory(metadata_directory, ".dist-info") def _build_with_temp_dir(self, setup_command, result_extension, result_directory, config_settings): result_directory = os.path.abspath(result_directory) # Build in a temporary directory, then copy to the target. os.makedirs(result_directory, exist_ok=True) with tempfile.TemporaryDirectory(dir=result_directory) as tmp_dist_dir: sys.argv = [ *sys.argv[:1], *self._global_args(config_settings), *setup_command, "--dist-dir", tmp_dist_dir, *self._arbitrary_args(config_settings), ] with no_install_setup_requires(): self.run_setup() result_basename = _file_with_extension( tmp_dist_dir, result_extension) result_path = os.path.join(result_directory, result_basename) if os.path.exists(result_path): # os.rename will fail overwriting on non-Unix. os.remove(result_path) os.rename(os.path.join(tmp_dist_dir, result_basename), result_path) return result_basename def build_wheel(self, wheel_directory, config_settings=None, metadata_directory=None): with suppress_known_deprecation(): return self._build_with_temp_dir(['bdist_wheel'], '.whl', wheel_directory, config_settings) def build_sdist(self, sdist_directory, config_settings=None): return self._build_with_temp_dir(['sdist', '--formats', 'gztar'], '.tar.gz', sdist_directory, config_settings) def _get_dist_info_dir(self, metadata_directory: Optional[str]) -> Optional[str]: if not metadata_directory: return None dist_info_candidates = list(Path(metadata_directory).glob("*.dist-info")) assert len(dist_info_candidates) <= 1 return str(dist_info_candidates[0]) if dist_info_candidates else None if not LEGACY_EDITABLE: # PEP660 hooks: # build_editable # get_requires_for_build_editable # prepare_metadata_for_build_editable def build_editable( self, wheel_directory, config_settings=None, metadata_directory=None ): # XXX can or should we hide our editable_wheel command normally? info_dir = self._get_dist_info_dir(metadata_directory) opts = ["--dist-info-dir", info_dir] if info_dir else [] cmd = ["editable_wheel", *opts, *self._editable_args(config_settings)] with suppress_known_deprecation(): return self._build_with_temp_dir( cmd, ".whl", wheel_directory, config_settings ) def get_requires_for_build_editable(self, config_settings=None): return self.get_requires_for_build_wheel(config_settings) def prepare_metadata_for_build_editable(self, metadata_directory, config_settings=None): return self.prepare_metadata_for_build_wheel( metadata_directory, config_settings ) class _BuildMetaLegacyBackend(_BuildMetaBackend): """Compatibility backend for setuptools This is a version of setuptools.build_meta that endeavors to maintain backwards compatibility with pre-PEP 517 modes of invocation. It exists as a temporary bridge between the old packaging mechanism and the new packaging mechanism, and will eventually be removed. """ def run_setup(self, setup_script='setup.py'): # In order to maintain compatibility with scripts assuming that # the setup.py script is in a directory on the PYTHONPATH, inject # '' into sys.path. (pypa/setuptools#1642) sys_path = list(sys.path) # Save the original path script_dir = os.path.dirname(os.path.abspath(setup_script)) if script_dir not in sys.path: sys.path.insert(0, script_dir) # Some setup.py scripts (e.g. in pygame and numpy) use sys.argv[0] to # get the directory of the source code. They expect it to refer to the # setup.py script. sys_argv_0 = sys.argv[0] sys.argv[0] = setup_script try: super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script) finally: # While PEP 517 frontends should be calling each hook in a fresh # subprocess according to the standard (and thus it should not be # strictly necessary to restore the old sys.path), we'll restore # the original path so that the path manipulation does not persist # within the hook after run_setup is called. sys.path[:] = sys_path sys.argv[0] = sys_argv_0 # The primary backend _BACKEND = _BuildMetaBackend() get_requires_for_build_wheel = _BACKEND.get_requires_for_build_wheel get_requires_for_build_sdist = _BACKEND.get_requires_for_build_sdist prepare_metadata_for_build_wheel = _BACKEND.prepare_metadata_for_build_wheel build_wheel = _BACKEND.build_wheel build_sdist = _BACKEND.build_sdist if not LEGACY_EDITABLE: get_requires_for_build_editable = _BACKEND.get_requires_for_build_editable prepare_metadata_for_build_editable = _BACKEND.prepare_metadata_for_build_editable build_editable = _BACKEND.build_editable # The legacy backend __legacy__ = _BuildMetaLegacyBackend() PK{5Zx (Lib/site-packages/setuptools/__init__.pynuW+A"""Extensions to the 'distutils' for large or complex distributions""" import functools import os import re import warnings import _distutils_hack.override # noqa: F401 import distutils.core from distutils.errors import DistutilsOptionError from distutils.util import convert_path as _convert_path from ._deprecation_warning import SetuptoolsDeprecationWarning import setuptools.version from setuptools.extension import Extension from setuptools.dist import Distribution from setuptools.depends import Require from setuptools.discovery import PackageFinder, PEP420PackageFinder from . import monkey from . import logging __all__ = [ 'setup', 'Distribution', 'Command', 'Extension', 'Require', 'SetuptoolsDeprecationWarning', 'find_packages', 'find_namespace_packages', ] __version__ = setuptools.version.__version__ bootstrap_install_from = None find_packages = PackageFinder.find find_namespace_packages = PEP420PackageFinder.find def _install_setup_requires(attrs): # Note: do not use `setuptools.Distribution` directly, as # our PEP 517 backend patch `distutils.core.Distribution`. class MinimalDistribution(distutils.core.Distribution): """ A minimal version of a distribution for supporting the fetch_build_eggs interface. """ def __init__(self, attrs): _incl = 'dependency_links', 'setup_requires' filtered = {k: attrs[k] for k in set(_incl) & set(attrs)} super().__init__(filtered) # Prevent accidentally triggering discovery with incomplete set of attrs self.set_defaults._disable() def _get_project_config_files(self, filenames=None): """Ignore ``pyproject.toml``, they are not related to setup_requires""" try: cfg, toml = super()._split_standard_project_metadata(filenames) return cfg, () except Exception: return filenames, () def finalize_options(self): """ Disable finalize_options to avoid building the working set. Ref #2158. """ dist = MinimalDistribution(attrs) # Honor setup.cfg's options. dist.parse_config_files(ignore_option_errors=True) if dist.setup_requires: dist.fetch_build_eggs(dist.setup_requires) def setup(**attrs): # Make sure we have any requirements needed to interpret 'attrs'. logging.configure() _install_setup_requires(attrs) return distutils.core.setup(**attrs) setup.__doc__ = distutils.core.setup.__doc__ _Command = monkey.get_unpatched(distutils.core.Command) class Command(_Command): """ Setuptools internal actions are organized using a *command design pattern*. This means that each action (or group of closely related actions) executed during the build should be implemented as a ``Command`` subclass. These commands are abstractions and do not necessarily correspond to a command that can (or should) be executed via a terminal, in a CLI fashion (although historically they would). When creating a new command from scratch, custom defined classes **SHOULD** inherit from ``setuptools.Command`` and implement a few mandatory methods. Between these mandatory methods, are listed: .. method:: initialize_options(self) Set or (reset) all options/attributes/caches used by the command to their default values. Note that these values may be overwritten during the build. .. method:: finalize_options(self) Set final values for all options/attributes used by the command. Most of the time, each option/attribute/cache should only be set if it does not have any value yet (e.g. ``if self.attr is None: self.attr = val``). .. method:: run(self) Execute the actions intended by the command. (Side effects **SHOULD** only take place when ``run`` is executed, for example, creating new files or writing to the terminal output). A useful analogy for command classes is to think of them as subroutines with local variables called "options". The options are "declared" in ``initialize_options()`` and "defined" (given their final values, aka "finalized") in ``finalize_options()``, both of which must be defined by every command class. The "body" of the subroutine, (where it does all the work) is the ``run()`` method. Between ``initialize_options()`` and ``finalize_options()``, ``setuptools`` may set the values for options/attributes based on user's input (or circumstance), which means that the implementation should be careful to not overwrite values in ``finalize_options`` unless necessary. Please note that other commands (or other parts of setuptools) may also overwrite the values of the command's options/attributes multiple times during the build process. Therefore it is important to consistently implement ``initialize_options()`` and ``finalize_options()``. For example, all derived attributes (or attributes that depend on the value of other attributes) **SHOULD** be recomputed in ``finalize_options``. When overwriting existing commands, custom defined classes **MUST** abide by the same APIs implemented by the original class. They also **SHOULD** inherit from the original class. """ command_consumes_arguments = False def __init__(self, dist, **kw): """ Construct the command for dist, updating vars(self) with any keyword parameters. """ super().__init__(dist) vars(self).update(kw) def _ensure_stringlike(self, option, what, default=None): val = getattr(self, option) if val is None: setattr(self, option, default) return default elif not isinstance(val, str): raise DistutilsOptionError( "'%s' must be a %s (got `%s`)" % (option, what, val) ) return val def ensure_string_list(self, option): r"""Ensure that 'option' is a list of strings. If 'option' is currently a string, we split it either on /,\s*/ or /\s+/, so "foo bar baz", "foo,bar,baz", and "foo, bar baz" all become ["foo", "bar", "baz"]. .. TODO: This method seems to be similar to the one in ``distutils.cmd`` Probably it is just here for backward compatibility with old Python versions? :meta private: """ val = getattr(self, option) if val is None: return elif isinstance(val, str): setattr(self, option, re.split(r',\s*|\s+', val)) else: if isinstance(val, list): ok = all(isinstance(v, str) for v in val) else: ok = False if not ok: raise DistutilsOptionError( "'%s' must be a list of strings (got %r)" % (option, val) ) def reinitialize_command(self, command, reinit_subcommands=0, **kw): cmd = _Command.reinitialize_command(self, command, reinit_subcommands) vars(cmd).update(kw) return cmd def _find_all_simple(path): """ Find all files under 'path' """ results = ( os.path.join(base, file) for base, dirs, files in os.walk(path, followlinks=True) for file in files ) return filter(os.path.isfile, results) def findall(dir=os.curdir): """ Find all files under 'dir' and return the list of full filenames. Unless dir is '.', return full filenames with dir prepended. """ files = _find_all_simple(dir) if dir == os.curdir: make_rel = functools.partial(os.path.relpath, start=dir) files = map(make_rel, files) return list(files) @functools.wraps(_convert_path) def convert_path(pathname): from inspect import cleandoc msg = """ The function `convert_path` is considered internal and not part of the public API. Its direct usage by 3rd-party packages is considered deprecated and the function may be removed in the future. """ warnings.warn(cleandoc(msg), SetuptoolsDeprecationWarning) return _convert_path(pathname) class sic(str): """Treat this string as-is (https://en.wikipedia.org/wiki/Sic)""" # Apply monkey patches monkey.patch_all() PK{5ZJ4Lib/site-packages/setuptools/_deprecation_warning.pynuW+Aclass SetuptoolsDeprecationWarning(Warning): """ Base class for warning deprecations in ``setuptools`` This class is not derived from ``DeprecationWarning``, and as such is visible by default. """ PK{5ZVzƸ %Lib/site-packages/setuptools/wheel.pynuW+A"""Wheels support.""" import email import itertools import os import posixpath import re import zipfile import contextlib from distutils.util import get_platform import pkg_resources import setuptools from pkg_resources import parse_version from setuptools.extern.packaging.tags import sys_tags from setuptools.extern.packaging.utils import canonicalize_name from setuptools.command.egg_info import write_requirements from setuptools.archive_util import _unpack_zipfile_obj WHEEL_NAME = re.compile( r"""^(?P.+?)-(?P\d.*?) ((-(?P\d.*?))?-(?P.+?)-(?P.+?)-(?P.+?) )\.whl$""", re.VERBOSE).match NAMESPACE_PACKAGE_INIT = \ "__import__('pkg_resources').declare_namespace(__name__)\n" def unpack(src_dir, dst_dir): '''Move everything under `src_dir` to `dst_dir`, and delete the former.''' for dirpath, dirnames, filenames in os.walk(src_dir): subdir = os.path.relpath(dirpath, src_dir) for f in filenames: src = os.path.join(dirpath, f) dst = os.path.join(dst_dir, subdir, f) os.renames(src, dst) for n, d in reversed(list(enumerate(dirnames))): src = os.path.join(dirpath, d) dst = os.path.join(dst_dir, subdir, d) if not os.path.exists(dst): # Directory does not exist in destination, # rename it and prune it from os.walk list. os.renames(src, dst) del dirnames[n] # Cleanup. for dirpath, dirnames, filenames in os.walk(src_dir, topdown=True): assert not filenames os.rmdir(dirpath) @contextlib.contextmanager def disable_info_traces(): """ Temporarily disable info traces. """ from distutils import log saved = log.set_threshold(log.WARN) try: yield finally: log.set_threshold(saved) class Wheel: def __init__(self, filename): match = WHEEL_NAME(os.path.basename(filename)) if match is None: raise ValueError('invalid wheel name: %r' % filename) self.filename = filename for k, v in match.groupdict().items(): setattr(self, k, v) def tags(self): '''List tags (py_version, abi, platform) supported by this wheel.''' return itertools.product( self.py_version.split('.'), self.abi.split('.'), self.platform.split('.'), ) def is_compatible(self): '''Is the wheel is compatible with the current platform?''' supported_tags = set( (t.interpreter, t.abi, t.platform) for t in sys_tags()) return next((True for t in self.tags() if t in supported_tags), False) def egg_name(self): return pkg_resources.Distribution( project_name=self.project_name, version=self.version, platform=(None if self.platform == 'any' else get_platform()), ).egg_name() + '.egg' def get_dist_info(self, zf): # find the correct name of the .dist-info dir in the wheel file for member in zf.namelist(): dirname = posixpath.dirname(member) if (dirname.endswith('.dist-info') and canonicalize_name(dirname).startswith( canonicalize_name(self.project_name))): return dirname raise ValueError("unsupported wheel format. .dist-info not found") def install_as_egg(self, destination_eggdir): '''Install wheel as an egg directory.''' with zipfile.ZipFile(self.filename) as zf: self._install_as_egg(destination_eggdir, zf) def _install_as_egg(self, destination_eggdir, zf): dist_basename = '%s-%s' % (self.project_name, self.version) dist_info = self.get_dist_info(zf) dist_data = '%s.data' % dist_basename egg_info = os.path.join(destination_eggdir, 'EGG-INFO') self._convert_metadata(zf, destination_eggdir, dist_info, egg_info) self._move_data_entries(destination_eggdir, dist_data) self._fix_namespace_packages(egg_info, destination_eggdir) @staticmethod def _convert_metadata(zf, destination_eggdir, dist_info, egg_info): def get_metadata(name): with zf.open(posixpath.join(dist_info, name)) as fp: value = fp.read().decode('utf-8') return email.parser.Parser().parsestr(value) wheel_metadata = get_metadata('WHEEL') # Check wheel format version is supported. wheel_version = parse_version(wheel_metadata.get('Wheel-Version')) wheel_v1 = ( parse_version('1.0') <= wheel_version < parse_version('2.0dev0') ) if not wheel_v1: raise ValueError( 'unsupported wheel format version: %s' % wheel_version) # Extract to target directory. _unpack_zipfile_obj(zf, destination_eggdir) # Convert metadata. dist_info = os.path.join(destination_eggdir, dist_info) dist = pkg_resources.Distribution.from_location( destination_eggdir, dist_info, metadata=pkg_resources.PathMetadata(destination_eggdir, dist_info), ) # Note: Evaluate and strip markers now, # as it's difficult to convert back from the syntax: # foobar; "linux" in sys_platform and extra == 'test' def raw_req(req): req.marker = None return str(req) install_requires = list(map(raw_req, dist.requires())) extras_require = { extra: [ req for req in map(raw_req, dist.requires((extra,))) if req not in install_requires ] for extra in dist.extras } os.rename(dist_info, egg_info) os.rename( os.path.join(egg_info, 'METADATA'), os.path.join(egg_info, 'PKG-INFO'), ) setup_dist = setuptools.Distribution( attrs=dict( install_requires=install_requires, extras_require=extras_require, ), ) with disable_info_traces(): write_requirements( setup_dist.get_command_obj('egg_info'), None, os.path.join(egg_info, 'requires.txt'), ) @staticmethod def _move_data_entries(destination_eggdir, dist_data): """Move data entries to their correct location.""" dist_data = os.path.join(destination_eggdir, dist_data) dist_data_scripts = os.path.join(dist_data, 'scripts') if os.path.exists(dist_data_scripts): egg_info_scripts = os.path.join( destination_eggdir, 'EGG-INFO', 'scripts') os.mkdir(egg_info_scripts) for entry in os.listdir(dist_data_scripts): # Remove bytecode, as it's not properly handled # during easy_install scripts install phase. if entry.endswith('.pyc'): os.unlink(os.path.join(dist_data_scripts, entry)) else: os.rename( os.path.join(dist_data_scripts, entry), os.path.join(egg_info_scripts, entry), ) os.rmdir(dist_data_scripts) for subdir in filter(os.path.exists, ( os.path.join(dist_data, d) for d in ('data', 'headers', 'purelib', 'platlib') )): unpack(subdir, destination_eggdir) if os.path.exists(dist_data): os.rmdir(dist_data) @staticmethod def _fix_namespace_packages(egg_info, destination_eggdir): namespace_packages = os.path.join( egg_info, 'namespace_packages.txt') if os.path.exists(namespace_packages): with open(namespace_packages) as fp: namespace_packages = fp.read().split() for mod in namespace_packages: mod_dir = os.path.join(destination_eggdir, *mod.split('.')) mod_init = os.path.join(mod_dir, '__init__.py') if not os.path.exists(mod_dir): os.mkdir(mod_dir) if not os.path.exists(mod_init): with open(mod_init, 'w') as fp: fp.write(NAMESPACE_PACKAGE_INIT) PK{5Z X X $Lib/site-packages/setuptools/_imp.pynuW+A""" Re-implementation of find_module and get_frozen_object from the deprecated imp module. """ import os import importlib.util import importlib.machinery from .py34compat import module_from_spec PY_SOURCE = 1 PY_COMPILED = 2 C_EXTENSION = 3 C_BUILTIN = 6 PY_FROZEN = 7 def find_spec(module, paths): finder = ( importlib.machinery.PathFinder().find_spec if isinstance(paths, list) else importlib.util.find_spec ) return finder(module, paths) def find_module(module, paths=None): """Just like 'imp.find_module()', but with package support""" spec = find_spec(module, paths) if spec is None: raise ImportError("Can't find %s" % module) if not spec.has_location and hasattr(spec, 'submodule_search_locations'): spec = importlib.util.spec_from_loader('__init__.py', spec.loader) kind = -1 file = None static = isinstance(spec.loader, type) if spec.origin == 'frozen' or static and issubclass( spec.loader, importlib.machinery.FrozenImporter): kind = PY_FROZEN path = None # imp compabilty suffix = mode = '' # imp compatibility elif spec.origin == 'built-in' or static and issubclass( spec.loader, importlib.machinery.BuiltinImporter): kind = C_BUILTIN path = None # imp compabilty suffix = mode = '' # imp compatibility elif spec.has_location: path = spec.origin suffix = os.path.splitext(path)[1] mode = 'r' if suffix in importlib.machinery.SOURCE_SUFFIXES else 'rb' if suffix in importlib.machinery.SOURCE_SUFFIXES: kind = PY_SOURCE elif suffix in importlib.machinery.BYTECODE_SUFFIXES: kind = PY_COMPILED elif suffix in importlib.machinery.EXTENSION_SUFFIXES: kind = C_EXTENSION if kind in {PY_SOURCE, PY_COMPILED}: file = open(path, mode) else: path = None suffix = mode = '' return file, path, (suffix, mode, kind) def get_frozen_object(module, paths=None): spec = find_spec(module, paths) if not spec: raise ImportError("Can't find %s" % module) return spec.loader.get_code(module) def get_module(module, paths, info): spec = find_spec(module, paths) if not spec: raise ImportError("Can't find %s" % module) return module_from_spec(spec) PK{5Z.Lib/site-packages/setuptools/script (dev).tmplnuW+A# EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r __requires__ = %(spec)r __import__('pkg_resources').require(%(spec)r) __file__ = %(dev_path)r with open(__file__) as f: exec(compile(f.read(), __file__, 'exec')) PK{5Z3(Lib/site-packages/setuptools/script.tmplnuW+A# EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r __requires__ = %(spec)r __import__('pkg_resources').run_script(%(spec)r, %(script_name)r) PK{5Zzi'Lib/site-packages/setuptools/cli-32.exenuW+AMZ@ !L!This program cannot be run in DOS mode. $YSj292929:92929F29}929`9929`929`9m29`929Rich29PELQ  N%@@,(@@.text] `.rdata` "@@.data+@QD$P@uSUV+WD-jPs 33ۉD$"p~WL$ <\uG <"u~Wj\V 3\F3T$CF;|Å~Wj\VV D$_"F^][YÁ A3ĉ$V$W$τtd$A@P F^$3! Wh$ QV虫V,訊$,H@;st t uj$ h@RT t2@ @ @$@$ $$$(L$Q$"R0D$ D$$PV$|$ u Vh@S\$ U$,+D$@jPWt$C ;~L$ R#G;|D$$P ;~L$RG;|惼$4][tED$t$ PV$Vh@@Pn _^$3sËL$T$D$ QRPP$,_^3?̋D$L$jPQ j h@3u3];;u ;VVVVV39u ;tԉ]SYuC @uwS*Yttȃ *AAA$u)tt*AA@$tVVVVV)M9uu#SL EPVu SESW E EuLYøAá;AVj^u;}ƣ;AjP YY+AujV5;Az YY+AujX^3ҹA+A  A|j^3ҹAW*At;tu1 BpA|_3^#=0 Atp!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SSSSbbEP蹒GGY}9]tu褒Y}ЋE;tOj_P舒|Y;u< A;uC< A;u5u6MRgEYeE}ȋ6;FU]8t(=tVYML< A4M:u܋MM+8Xt-x:u'x=u!PݑYM؍D < AE8=t΋E+Eu}EP謑PEP6tM9u}jWeuYYM;26kfYb cMiEP+EPV t SSSSS'a7t6PE+EPVI t SSSSS`7 FY;uËE^09]}؋E+Q < AQV+} }6EM7+PVѹ t SSSSSy`7kYt9u9]ug}ЍEPWV藹 t SSSSS?`h`@WV t SSSSS`9]tuWV߷ t SSSSS_;t E;0uF< A;tPdY< A9]t udYE܋M_^3[IËUV39uu$Ba0(aVVVVV`jXUE uu8@u\@PaY`(u"tE t`` 3^]ËUSu3ۍM]lHM;u(`SSSSS`8]tE`p3qVu9^uu QjYY8]tWMapNWD7t!A:t 9E uAE 9]9E uMA:u_8]tE`pE^[ËUju u2 ]ËUS39]u3uMGE9Xu&uu u 8]mMapaW};t9] u._SSSSS _8]tE`p%VfMGDMtC:u]Xff fGMf;pr f;pwfp6f;pr0f;pw*fp$U At fʉMfuM f E DMtEU :u]Wff E ɉMf;Hr f;HwfH6f;Hr0f;Hw*fH$U At fʉMfMf;u!f;t 9]8]tE`p3^_[H8]tMapUjuu u#]UW}3كE 8t3_4L`hz8Vjz(8NZj*DTj ,>Pbn|(8J@A@4K@X@_@@@failed to get exit code from process. failed to create process. %s%sCould not exec %sCannot find Python executable %s #!python.exe#!Cannot open %s -script.pyCorExitProcessmscoree.dll(null)(null)EEE50P( 8PX700WP `h````xpxxxx!A"A  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~=EncodePointerKERNEL32.DLLDecodePointerFlsFreeFlsSetValueFlsGetValueFlsAllocruntime error TLOSS error SING error DOMAIN error R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information. R6033 - Attempt to use MSIL code from this assembly during native code initialization This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain. R6032 - not enough space for locale information R6031 - Attempt to initialize the CRT more than once. This indicates a bug in your application. R6030 - CRT not initialized R6028 - unable to initialize heap R6027 - not enough space for lowio initialization R6026 - not enough space for stdio initialization R6025 - pure virtual function call R6024 - not enough space for _onexit/atexit table R6019 - unable to open console device R6018 - unexpected heap error R6017 - unexpected multithread lock error R6016 - not enough space for thread data This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. R6009 - not enough space for environment R6008 - not enough space for arguments R6002 - floating point support not loaded Microsoft Visual C++ Runtime Library ...Runtime Error! Program:  EEE00P('8PW700PP (`h`hhhxppwpp ((((( H h(((( H H  !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLLSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$.com.exe.bat.cmd.\SystemRootHA@7 i@#@%@%@<5@@5@:@;@;=@=@>@?@A@9A@-G@J@kN@P@P@oR@{R@5Y@Z@Z@-[@1[@^@_@/_@)j@:l@>y@N@/@$@@T@˥@@ͦ@L@h@ @T4L`hz8Vjz(8NZj*DTj ,>Pbn|(8JRGenerateConsoleCtrlEventGetExitCodeProcessnWaitForSingleObjectCreateProcessASetConsoleCtrlHandlerGetModuleFileNameAEnterCriticalSectionLeaveCriticalSectionGetModuleHandleW+Sleep"GetProcAddressExitProcesspGetCommandLineASetHandleCount>GetStdHandleGetFileType<GetStartupInfoADeleteCriticalSection7TerminateProcessGetCurrentProcessHUnhandledExceptionFilterSetUnhandledExceptionFilterIsDebuggerPresentGetLastErrorHeapFreeHeapAlloc\GetCPInfoInterlockedIncrementInterlockedDecrementSGetACPGetOEMCPIsValidCodePage>TlsGetValue<TlsAlloc?TlsSetValue=TlsFreeSetLastErrorGetCurrentThreadIdWriteFileLoadLibraryAInitializeCriticalSectionAndSpinCountKFreeEnvironmentStringsAGetEnvironmentStringsLFreeEnvironmentStringsWWideCharToMultiByteGetEnvironmentStringsWHeapCreateaVirtualFreeYQueryPerformanceCounterjGetTickCountGetCurrentProcessIdSGetSystemTimeAsFileTimeRtlUnwindHeapReAlloc^VirtualAllocGetConsoleCPGetConsoleModeBFlushFileBuffersLCMapStringAMultiByteToWideCharLCMapStringW@GetStringTypeACGetStringTypeWGetLocaleInfoASetFilePointerHeapSizeDCloseHandleWriteConsoleAGetConsoleOutputCPWriteConsoleWSetStdHandleyCreateFileASCompareStringAVCompareStringWSetEnvironmentVariableAKERNEL32.dllnReadFileSetEndOfFile&GetProcessHeapGetFileAttributesA+A+AN@D#@l@\@         ! 5A CPR S WY l m pr   )     abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZhA`y!@~ڣ @ڣ AϢ[@~QQ^ _j21~l@CAAAAAHAh@@p@AAAhA@@ @ @@@@\@$@@@@d@D@@ @!@"@x@y@z@@@Η@Η@Η@Η@Η@Η@Η@Η@Η@Η@x h@j@@@@@@@@x@p@h@\@P@H@<@8@4@0@,@(@$@ @@@@@ @@@@@(@@@@@@@@@@@|@p@ A.DA)A)A)A)A)A)A)A)A)AHA. pPSTPDTAA;Zx0Nm:Yw/Mll@d@\@T@PK{5Z#l2yy6Lib/site-packages/setuptools/command/editable_wheel.pynuW+A""" Create a wheel that, when installed, will make the source package 'editable' (add it to the interpreter's path, including metadata) per PEP 660. Replaces 'setup.py develop'. .. note:: One of the mechanisms briefly mentioned in PEP 660 to implement editable installs is to create a separated directory inside ``build`` and use a .pth file to point to that directory. In the context of this file such directory is referred as *auxiliary build directory* or ``auxiliary_dir``. """ import logging import os import re import shutil import sys import traceback import warnings from contextlib import suppress from enum import Enum from inspect import cleandoc from itertools import chain from pathlib import Path from tempfile import TemporaryDirectory from typing import ( TYPE_CHECKING, Dict, Iterable, Iterator, List, Mapping, Optional, Tuple, TypeVar, Union, ) from setuptools import Command, SetuptoolsDeprecationWarning, errors, namespaces from setuptools.command.build_py import build_py as build_py_cls from setuptools.discovery import find_package_path from setuptools.dist import Distribution if TYPE_CHECKING: from wheel.wheelfile import WheelFile # noqa if sys.version_info >= (3, 8): from typing import Protocol elif TYPE_CHECKING: from typing_extensions import Protocol else: from abc import ABC as Protocol _Path = Union[str, Path] _P = TypeVar("_P", bound=_Path) _logger = logging.getLogger(__name__) class _EditableMode(Enum): """ Possible editable installation modes: `lenient` (new files automatically added to the package - DEFAULT); `strict` (requires a new installation when files are added/removed); or `compat` (attempts to emulate `python setup.py develop` - DEPRECATED). """ STRICT = "strict" LENIENT = "lenient" COMPAT = "compat" # TODO: Remove `compat` after Dec/2022. @classmethod def convert(cls, mode: Optional[str]) -> "_EditableMode": if not mode: return _EditableMode.LENIENT # default _mode = mode.upper() if _mode not in _EditableMode.__members__: raise errors.OptionError(f"Invalid editable mode: {mode!r}. Try: 'strict'.") if _mode == "COMPAT": msg = """ The 'compat' editable mode is transitional and will be removed in future versions of `setuptools`. Please adapt your code accordingly to use either the 'strict' or the 'lenient' modes. For more information, please check: https://setuptools.pypa.io/en/latest/userguide/development_mode.html """ warnings.warn(msg, SetuptoolsDeprecationWarning) return _EditableMode[_mode] _STRICT_WARNING = """ New or renamed files may not be automatically picked up without a new installation. """ _LENIENT_WARNING = """ Options like `package-data`, `include/exclude-package-data` or `packages.find.exclude/include` may have no effect. """ class editable_wheel(Command): """Build 'editable' wheel for development. (This command is reserved for internal use of setuptools). """ description = "create a PEP 660 'editable' wheel" user_options = [ ("dist-dir=", "d", "directory to put final built distributions in"), ("dist-info-dir=", "I", "path to a pre-build .dist-info directory"), ("mode=", None, cleandoc(_EditableMode.__doc__ or "")), ] def initialize_options(self): self.dist_dir = None self.dist_info_dir = None self.project_dir = None self.mode = None def finalize_options(self): dist = self.distribution self.project_dir = dist.src_root or os.curdir self.package_dir = dist.package_dir or {} self.dist_dir = Path(self.dist_dir or os.path.join(self.project_dir, "dist")) def run(self): try: self.dist_dir.mkdir(exist_ok=True) self._ensure_dist_info() # Add missing dist_info files self.reinitialize_command("bdist_wheel") bdist_wheel = self.get_finalized_command("bdist_wheel") bdist_wheel.write_wheelfile(self.dist_info_dir) self._create_wheel_file(bdist_wheel) except Exception as ex: traceback.print_exc() msg = """ Support for editable installs via PEP 660 was recently introduced in `setuptools`. If you are seeing this error, please report to: https://github.com/pypa/setuptools/issues Meanwhile you can try the legacy behavior by setting an environment variable and trying to install again: SETUPTOOLS_ENABLE_FEATURES="legacy-editable" """ raise errors.InternalError(cleandoc(msg)) from ex def _ensure_dist_info(self): if self.dist_info_dir is None: dist_info = self.reinitialize_command("dist_info") dist_info.output_dir = self.dist_dir dist_info.ensure_finalized() dist_info.run() self.dist_info_dir = dist_info.dist_info_dir else: assert str(self.dist_info_dir).endswith(".dist-info") assert Path(self.dist_info_dir, "METADATA").exists() def _install_namespaces(self, installation_dir, pth_prefix): # XXX: Only required to support the deprecated namespace practice dist = self.distribution if not dist.namespace_packages: return src_root = Path(self.project_dir, self.package_dir.get("", ".")).resolve() installer = _NamespaceInstaller(dist, installation_dir, pth_prefix, src_root) installer.install_namespaces() def _find_egg_info_dir(self) -> Optional[str]: parent_dir = Path(self.dist_info_dir).parent if self.dist_info_dir else Path() candidates = map(str, parent_dir.glob("*.egg-info")) return next(candidates, None) def _configure_build( self, name: str, unpacked_wheel: _Path, build_lib: _Path, tmp_dir: _Path ): """Configure commands to behave in the following ways: - Build commands can write to ``build_lib`` if they really want to... (but this folder is expected to be ignored and modules are expected to live in the project directory...) - Binary extensions should be built in-place (editable_mode = True) - Data/header/script files are not part of the "editable" specification so they are written directly to the unpacked_wheel directory. """ # Non-editable files (data, headers, scripts) are written directly to the # unpacked_wheel dist = self.distribution wheel = str(unpacked_wheel) build_lib = str(build_lib) data = str(Path(unpacked_wheel, f"{name}.data", "data")) headers = str(Path(unpacked_wheel, f"{name}.data", "headers")) scripts = str(Path(unpacked_wheel, f"{name}.data", "scripts")) # egg-info may be generated again to create a manifest (used for package data) egg_info = dist.reinitialize_command("egg_info", reinit_subcommands=True) egg_info.egg_base = str(tmp_dir) egg_info.ignore_egg_info_in_manifest = True build = dist.reinitialize_command("build", reinit_subcommands=True) install = dist.reinitialize_command("install", reinit_subcommands=True) build.build_platlib = build.build_purelib = build.build_lib = build_lib install.install_purelib = install.install_platlib = install.install_lib = wheel install.install_scripts = build.build_scripts = scripts install.install_headers = headers install.install_data = data install_scripts = dist.get_command_obj("install_scripts") install_scripts.no_ep = True build.build_temp = str(tmp_dir) build_py = dist.get_command_obj("build_py") build_py.compile = False build_py.existing_egg_info_dir = self._find_egg_info_dir() self._set_editable_mode() build.ensure_finalized() install.ensure_finalized() def _set_editable_mode(self): """Set the ``editable_mode`` flag in the build sub-commands""" dist = self.distribution build = dist.get_command_obj("build") for cmd_name in build.get_sub_commands(): cmd = dist.get_command_obj(cmd_name) if hasattr(cmd, "editable_mode"): cmd.editable_mode = True elif hasattr(cmd, "inplace"): cmd.inplace = True # backward compatibility with distutils def _collect_build_outputs(self) -> Tuple[List[str], Dict[str, str]]: files: List[str] = [] mapping: Dict[str, str] = {} build = self.get_finalized_command("build") for cmd_name in build.get_sub_commands(): cmd = self.get_finalized_command(cmd_name) if hasattr(cmd, "get_outputs"): files.extend(cmd.get_outputs() or []) if hasattr(cmd, "get_output_mapping"): mapping.update(cmd.get_output_mapping() or {}) return files, mapping def _run_build_commands( self, dist_name: str, unpacked_wheel: _Path, build_lib: _Path, tmp_dir: _Path ) -> Tuple[List[str], Dict[str, str]]: self._configure_build(dist_name, unpacked_wheel, build_lib, tmp_dir) self._run_build_subcommands() files, mapping = self._collect_build_outputs() self._run_install("headers") self._run_install("scripts") self._run_install("data") return files, mapping def _run_build_subcommands(self): """ Issue #3501 indicates that some plugins/customizations might rely on: 1. ``build_py`` not running 2. ``build_py`` always copying files to ``build_lib`` However both these assumptions may be false in editable_wheel. This method implements a temporary workaround to support the ecosystem while the implementations catch up. """ # TODO: Once plugins/customisations had the chance to catch up, replace # `self._run_build_subcommands()` with `self.run_command("build")`. # Also remove _safely_run, TestCustomBuildPy. Suggested date: Aug/2023. build: Command = self.get_finalized_command("build") for name in build.get_sub_commands(): cmd = self.get_finalized_command(name) if name == "build_py" and type(cmd) != build_py_cls: self._safely_run(name) else: self.run_command(name) def _safely_run(self, cmd_name: str): try: return self.run_command(cmd_name) except Exception: msg = f"""{traceback.format_exc()}\n If you are seeing this warning it is very likely that a setuptools plugin or customization overrides the `{cmd_name}` command, without taking into consideration how editable installs run build steps starting from v64.0.0. Plugin authors and developers relying on custom build steps are encouraged to update their `{cmd_name}` implementation considering the information in https://setuptools.pypa.io/en/latest/userguide/extension.html about editable installs. For the time being `setuptools` will silence this error and ignore the faulty command, but this behaviour will change in future versions.\n """ warnings.warn(msg, SetuptoolsDeprecationWarning, stacklevel=2) def _create_wheel_file(self, bdist_wheel): from wheel.wheelfile import WheelFile dist_info = self.get_finalized_command("dist_info") dist_name = dist_info.name tag = "-".join(bdist_wheel.get_tag()) build_tag = "0.editable" # According to PEP 427 needs to start with digit archive_name = f"{dist_name}-{build_tag}-{tag}.whl" wheel_path = Path(self.dist_dir, archive_name) if wheel_path.exists(): wheel_path.unlink() unpacked_wheel = TemporaryDirectory(suffix=archive_name) build_lib = TemporaryDirectory(suffix=".build-lib") build_tmp = TemporaryDirectory(suffix=".build-temp") with unpacked_wheel as unpacked, build_lib as lib, build_tmp as tmp: unpacked_dist_info = Path(unpacked, Path(self.dist_info_dir).name) shutil.copytree(self.dist_info_dir, unpacked_dist_info) self._install_namespaces(unpacked, dist_info.name) files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp) strategy = self._select_strategy(dist_name, tag, lib) with strategy, WheelFile(wheel_path, "w") as wheel_obj: strategy(wheel_obj, files, mapping) wheel_obj.write_files(unpacked) return wheel_path def _run_install(self, category: str): has_category = getattr(self.distribution, f"has_{category}", None) if has_category and has_category(): _logger.info(f"Installing {category} as non editable") self.run_command(f"install_{category}") def _select_strategy( self, name: str, tag: str, build_lib: _Path, ) -> "EditableStrategy": """Decides which strategy to use to implement an editable installation.""" build_name = f"__editable__.{name}-{tag}" project_dir = Path(self.project_dir) mode = _EditableMode.convert(self.mode) if mode is _EditableMode.STRICT: auxiliary_dir = _empty_dir(Path(self.project_dir, "build", build_name)) return _LinkTree(self.distribution, name, auxiliary_dir, build_lib) packages = _find_packages(self.distribution) has_simple_layout = _simple_layout(packages, self.package_dir, project_dir) is_compat_mode = mode is _EditableMode.COMPAT if set(self.package_dir) == {""} and has_simple_layout or is_compat_mode: # src-layout(ish) is relatively safe for a simple pth file src_dir = self.package_dir.get("", ".") return _StaticPth(self.distribution, name, [Path(project_dir, src_dir)]) # Use a MetaPathFinder to avoid adding accidental top-level packages/modules return _TopLevelFinder(self.distribution, name) class EditableStrategy(Protocol): def __call__(self, wheel: "WheelFile", files: List[str], mapping: Dict[str, str]): ... def __enter__(self): ... def __exit__(self, _exc_type, _exc_value, _traceback): ... class _StaticPth: def __init__(self, dist: Distribution, name: str, path_entries: List[Path]): self.dist = dist self.name = name self.path_entries = path_entries def __call__(self, wheel: "WheelFile", files: List[str], mapping: Dict[str, str]): entries = "\n".join((str(p.resolve()) for p in self.path_entries)) contents = bytes(f"{entries}\n", "utf-8") wheel.writestr(f"__editable__.{self.name}.pth", contents) def __enter__(self): msg = f""" Editable install will be performed using .pth file to extend `sys.path` with: {list(map(os.fspath, self.path_entries))!r} """ _logger.warning(msg + _LENIENT_WARNING) return self def __exit__(self, _exc_type, _exc_value, _traceback): ... class _LinkTree(_StaticPth): """ Creates a ``.pth`` file that points to a link tree in the ``auxiliary_dir``. This strategy will only link files (not dirs), so it can be implemented in any OS, even if that means using hardlinks instead of symlinks. By collocating ``auxiliary_dir`` and the original source code, limitations with hardlinks should be avoided. """ def __init__( self, dist: Distribution, name: str, auxiliary_dir: _Path, build_lib: _Path, ): self.auxiliary_dir = Path(auxiliary_dir) self.build_lib = Path(build_lib).resolve() self._file = dist.get_command_obj("build_py").copy_file super().__init__(dist, name, [self.auxiliary_dir]) def __call__(self, wheel: "WheelFile", files: List[str], mapping: Dict[str, str]): self._create_links(files, mapping) super().__call__(wheel, files, mapping) def _normalize_output(self, file: str) -> Optional[str]: # Files relative to build_lib will be normalized to None with suppress(ValueError): path = Path(file).resolve().relative_to(self.build_lib) return str(path).replace(os.sep, '/') return None def _create_file(self, relative_output: str, src_file: str, link=None): dest = self.auxiliary_dir / relative_output if not dest.parent.is_dir(): dest.parent.mkdir(parents=True) self._file(src_file, dest, link=link) def _create_links(self, outputs, output_mapping): self.auxiliary_dir.mkdir(parents=True, exist_ok=True) link_type = "sym" if _can_symlink_files(self.auxiliary_dir) else "hard" mappings = { self._normalize_output(k): v for k, v in output_mapping.items() } mappings.pop(None, None) # remove files that are not relative to build_lib for output in outputs: relative = self._normalize_output(output) if relative and relative not in mappings: self._create_file(relative, output) for relative, src in mappings.items(): self._create_file(relative, src, link=link_type) def __enter__(self): msg = "Strict editable install will be performed using a link tree.\n" _logger.warning(msg + _STRICT_WARNING) return self def __exit__(self, _exc_type, _exc_value, _traceback): msg = f"""\n Strict editable installation performed using the auxiliary directory: {self.auxiliary_dir} Please be careful to not remove this directory, otherwise you might not be able to import/use your package. """ warnings.warn(msg, InformationOnly) class _TopLevelFinder: def __init__(self, dist: Distribution, name: str): self.dist = dist self.name = name def __call__(self, wheel: "WheelFile", files: List[str], mapping: Dict[str, str]): src_root = self.dist.src_root or os.curdir top_level = chain(_find_packages(self.dist), _find_top_level_modules(self.dist)) package_dir = self.dist.package_dir or {} roots = _find_package_roots(top_level, package_dir, src_root) namespaces_: Dict[str, List[str]] = dict(chain( _find_namespaces(self.dist.packages or [], roots), ((ns, []) for ns in _find_virtual_namespaces(roots)), )) name = f"__editable__.{self.name}.finder" finder = _make_identifier(name) content = bytes(_finder_template(name, roots, namespaces_), "utf-8") wheel.writestr(f"{finder}.py", content) content = bytes(f"import {finder}; {finder}.install()", "utf-8") wheel.writestr(f"__editable__.{self.name}.pth", content) def __enter__(self): msg = "Editable install will be performed using a meta path finder.\n" _logger.warning(msg + _LENIENT_WARNING) return self def __exit__(self, _exc_type, _exc_value, _traceback): msg = """\n Please be careful with folders in your working directory with the same name as your package as they may take precedence during imports. """ warnings.warn(msg, InformationOnly) def _can_symlink_files(base_dir: Path) -> bool: with TemporaryDirectory(dir=str(base_dir.resolve())) as tmp: path1, path2 = Path(tmp, "file1.txt"), Path(tmp, "file2.txt") path1.write_text("file1", encoding="utf-8") with suppress(AttributeError, NotImplementedError, OSError): os.symlink(path1, path2) if path2.is_symlink() and path2.read_text(encoding="utf-8") == "file1": return True try: os.link(path1, path2) # Ensure hard links can be created except Exception as ex: msg = ( "File system does not seem to support either symlinks or hard links. " "Strict editable installs require one of them to be supported." ) raise LinksNotSupported(msg) from ex return False def _simple_layout( packages: Iterable[str], package_dir: Dict[str, str], project_dir: Path ) -> bool: """Return ``True`` if: - all packages are contained by the same parent directory, **and** - all packages become importable if the parent directory is added to ``sys.path``. >>> _simple_layout(['a'], {"": "src"}, "/tmp/myproj") True >>> _simple_layout(['a', 'a.b'], {"": "src"}, "/tmp/myproj") True >>> _simple_layout(['a', 'a.b'], {}, "/tmp/myproj") True >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"": "src"}, "/tmp/myproj") True >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "a", "b": "b"}, ".") True >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a", "b": "_b"}, ".") False >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a"}, "/tmp/myproj") False >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a.a1.a2": "_a2"}, ".") False >>> _simple_layout(['a', 'a.b'], {"": "src", "a.b": "_ab"}, "/tmp/myproj") False >>> # Special cases, no packages yet: >>> _simple_layout([], {"": "src"}, "/tmp/myproj") True >>> _simple_layout([], {"a": "_a", "": "src"}, "/tmp/myproj") False """ layout = { pkg: find_package_path(pkg, package_dir, project_dir) for pkg in packages } if not layout: return set(package_dir) in ({}, {""}) parent = os.path.commonpath([_parent_path(k, v) for k, v in layout.items()]) return all( _normalize_path(Path(parent, *key.split('.'))) == _normalize_path(value) for key, value in layout.items() ) def _parent_path(pkg, pkg_path): """Infer the parent path containing a package, that if added to ``sys.path`` would allow importing that package. When ``pkg`` is directly mapped into a directory with a different name, return its own path. >>> _parent_path("a", "src/a") 'src' >>> _parent_path("b", "src/c") 'src/c' """ parent = pkg_path[:-len(pkg)] if pkg_path.endswith(pkg) else pkg_path return parent.rstrip("/" + os.sep) def _find_packages(dist: Distribution) -> Iterator[str]: yield from iter(dist.packages or []) py_modules = dist.py_modules or [] nested_modules = [mod for mod in py_modules if "." in mod] if dist.ext_package: yield dist.ext_package else: ext_modules = dist.ext_modules or [] nested_modules += [x.name for x in ext_modules if "." in x.name] for module in nested_modules: package, _, _ = module.rpartition(".") yield package def _find_top_level_modules(dist: Distribution) -> Iterator[str]: py_modules = dist.py_modules or [] yield from (mod for mod in py_modules if "." not in mod) if not dist.ext_package: ext_modules = dist.ext_modules or [] yield from (x.name for x in ext_modules if "." not in x.name) def _find_package_roots( packages: Iterable[str], package_dir: Mapping[str, str], src_root: _Path, ) -> Dict[str, str]: pkg_roots: Dict[str, str] = { pkg: _absolute_root(find_package_path(pkg, package_dir, src_root)) for pkg in sorted(packages) } return _remove_nested(pkg_roots) def _absolute_root(path: _Path) -> str: """Works for packages and top-level modules""" path_ = Path(path) parent = path_.parent if path_.exists(): return str(path_.resolve()) else: return str(parent.resolve() / path_.name) def _find_virtual_namespaces(pkg_roots: Dict[str, str]) -> Iterator[str]: """By carefully designing ``package_dir``, it is possible to implement the logical structure of PEP 420 in a package without the corresponding directories. Moreover a parent package can be purposefully/accidentally skipped in the discovery phase (e.g. ``find_packages(include=["mypkg.*"])``, when ``mypkg.foo`` is included by ``mypkg`` itself is not). We consider this case to also be a virtual namespace (ignoring the original directory) to emulate a non-editable installation. This function will try to find these kinds of namespaces. """ for pkg in pkg_roots: if "." not in pkg: continue parts = pkg.split(".") for i in range(len(parts) - 1, 0, -1): partial_name = ".".join(parts[:i]) path = Path(find_package_path(partial_name, pkg_roots, "")) if not path.exists() or partial_name not in pkg_roots: # partial_name not in pkg_roots ==> purposefully/accidentally skipped yield partial_name def _find_namespaces( packages: List[str], pkg_roots: Dict[str, str] ) -> Iterator[Tuple[str, List[str]]]: for pkg in packages: path = find_package_path(pkg, pkg_roots, "") if Path(path).exists() and not Path(path, "__init__.py").exists(): yield (pkg, [path]) def _remove_nested(pkg_roots: Dict[str, str]) -> Dict[str, str]: output = dict(pkg_roots.copy()) for pkg, path in reversed(list(pkg_roots.items())): if any( pkg != other and _is_nested(pkg, path, other, other_path) for other, other_path in pkg_roots.items() ): output.pop(pkg) return output def _is_nested(pkg: str, pkg_path: str, parent: str, parent_path: str) -> bool: """ Return ``True`` if ``pkg`` is nested inside ``parent`` both logically and in the file system. >>> _is_nested("a.b", "path/a/b", "a", "path/a") True >>> _is_nested("a.b", "path/a/b", "a", "otherpath/a") False >>> _is_nested("a.b", "path/a/b", "c", "path/c") False >>> _is_nested("a.a", "path/a/a", "a", "path/a") True >>> _is_nested("b.a", "path/b/a", "a", "path/a") False """ norm_pkg_path = _normalize_path(pkg_path) rest = pkg.replace(parent, "", 1).strip(".").split(".") return ( pkg.startswith(parent) and norm_pkg_path == _normalize_path(Path(parent_path, *rest)) ) def _normalize_path(filename: _Path) -> str: """Normalize a file/dir name for comparison purposes""" # See pkg_resources.normalize_path file = os.path.abspath(filename) if sys.platform == 'cygwin' else filename return os.path.normcase(os.path.realpath(os.path.normpath(file))) def _empty_dir(dir_: _P) -> _P: """Create a directory ensured to be empty. Existing files may be removed.""" shutil.rmtree(dir_, ignore_errors=True) os.makedirs(dir_) return dir_ def _make_identifier(name: str) -> str: """Make a string safe to be used as Python identifier. >>> _make_identifier("12abc") '_12abc' >>> _make_identifier("__editable__.myns.pkg-78.9.3_local") '__editable___myns_pkg_78_9_3_local' """ safe = re.sub(r'\W|^(?=\d)', '_', name) assert safe.isidentifier() return safe class _NamespaceInstaller(namespaces.Installer): def __init__(self, distribution, installation_dir, editable_name, src_root): self.distribution = distribution self.src_root = src_root self.installation_dir = installation_dir self.editable_name = editable_name self.outputs = [] self.dry_run = False def _get_target(self): """Installation target.""" return os.path.join(self.installation_dir, self.editable_name) def _get_root(self): """Where the modules/packages should be loaded from.""" return repr(str(self.src_root)) _FINDER_TEMPLATE = """\ import sys from importlib.machinery import ModuleSpec from importlib.machinery import all_suffixes as module_suffixes from importlib.util import spec_from_file_location from itertools import chain from pathlib import Path MAPPING = {mapping!r} NAMESPACES = {namespaces!r} PATH_PLACEHOLDER = {name!r} + ".__path_hook__" class _EditableFinder: # MetaPathFinder @classmethod def find_spec(cls, fullname, path=None, target=None): for pkg, pkg_path in reversed(list(MAPPING.items())): if fullname == pkg or fullname.startswith(f"{{pkg}}."): rest = fullname.replace(pkg, "", 1).strip(".").split(".") return cls._find_spec(fullname, Path(pkg_path, *rest)) return None @classmethod def _find_spec(cls, fullname, candidate_path): init = candidate_path / "__init__.py" candidates = (candidate_path.with_suffix(x) for x in module_suffixes()) for candidate in chain([init], candidates): if candidate.exists(): return spec_from_file_location(fullname, candidate) class _EditableNamespaceFinder: # PathEntryFinder @classmethod def _path_hook(cls, path): if path == PATH_PLACEHOLDER: return cls raise ImportError @classmethod def _paths(cls, fullname): # Ensure __path__ is not empty for the spec to be considered a namespace. return NAMESPACES[fullname] or MAPPING.get(fullname) or [PATH_PLACEHOLDER] @classmethod def find_spec(cls, fullname, target=None): if fullname in NAMESPACES: spec = ModuleSpec(fullname, None, is_package=True) spec.submodule_search_locations = cls._paths(fullname) return spec return None @classmethod def find_module(cls, fullname): return None def install(): if not any(finder == _EditableFinder for finder in sys.meta_path): sys.meta_path.append(_EditableFinder) if not NAMESPACES: return if not any(hook == _EditableNamespaceFinder._path_hook for hook in sys.path_hooks): # PathEntryFinder is needed to create NamespaceSpec without private APIS sys.path_hooks.append(_EditableNamespaceFinder._path_hook) if PATH_PLACEHOLDER not in sys.path: sys.path.append(PATH_PLACEHOLDER) # Used just to trigger the path hook """ def _finder_template( name: str, mapping: Mapping[str, str], namespaces: Dict[str, List[str]] ) -> str: """Create a string containing the code for the``MetaPathFinder`` and ``PathEntryFinder``. """ mapping = dict(sorted(mapping.items(), key=lambda p: p[0])) return _FINDER_TEMPLATE.format(name=name, mapping=mapping, namespaces=namespaces) class InformationOnly(UserWarning): """Currently there is no clear way of displaying messages to the users that use the setuptools backend directly via ``pip``. The only thing that might work is a warning, although it is not the most appropriate tool for the job... """ class LinksNotSupported(errors.FileError): """File system does not seem to support either symlinks or hard links.""" PK{5ZqB#7#70Lib/site-packages/setuptools/command/build_py.pynuW+Afrom functools import partial from glob import glob from distutils.util import convert_path import distutils.command.build_py as orig import os import fnmatch import textwrap import io import distutils.errors import itertools import stat import warnings from pathlib import Path from typing import Dict, Iterable, Iterator, List, Optional, Tuple from setuptools._deprecation_warning import SetuptoolsDeprecationWarning from setuptools.extern.more_itertools import unique_everseen def make_writable(target): os.chmod(target, os.stat(target).st_mode | stat.S_IWRITE) class build_py(orig.build_py): """Enhanced 'build_py' command that includes data files with packages The data files are specified via a 'package_data' argument to 'setup()'. See 'setuptools.dist.Distribution' for more details. Also, this version of the 'build_py' command allows you to specify both 'py_modules' and 'packages' in the same setup operation. """ editable_mode: bool = False existing_egg_info_dir: Optional[str] = None #: Private API, internal use only. def finalize_options(self): orig.build_py.finalize_options(self) self.package_data = self.distribution.package_data self.exclude_package_data = self.distribution.exclude_package_data or {} if 'data_files' in self.__dict__: del self.__dict__['data_files'] self.__updated_files = [] def copy_file(self, infile, outfile, preserve_mode=1, preserve_times=1, link=None, level=1): # Overwrite base class to allow using links if link: infile = str(Path(infile).resolve()) outfile = str(Path(outfile).resolve()) return super().copy_file(infile, outfile, preserve_mode, preserve_times, link, level) def run(self): """Build modules, packages, and copy data files to build directory""" if not (self.py_modules or self.packages) or self.editable_mode: return if self.py_modules: self.build_modules() if self.packages: self.build_packages() self.build_package_data() # Only compile actual .py files, using our base class' idea of what our # output files are. self.byte_compile(orig.build_py.get_outputs(self, include_bytecode=0)) def __getattr__(self, attr): "lazily compute data files" if attr == 'data_files': self.data_files = self._get_data_files() return self.data_files return orig.build_py.__getattr__(self, attr) def build_module(self, module, module_file, package): outfile, copied = orig.build_py.build_module(self, module, module_file, package) if copied: self.__updated_files.append(outfile) return outfile, copied def _get_data_files(self): """Generate list of '(package,src_dir,build_dir,filenames)' tuples""" self.analyze_manifest() return list(map(self._get_pkg_data_files, self.packages or ())) def get_data_files_without_manifest(self): """ Generate list of ``(package,src_dir,build_dir,filenames)`` tuples, but without triggering any attempt to analyze or build the manifest. """ # Prevent eventual errors from unset `manifest_files` # (that would otherwise be set by `analyze_manifest`) self.__dict__.setdefault('manifest_files', {}) return list(map(self._get_pkg_data_files, self.packages or ())) def _get_pkg_data_files(self, package): # Locate package source directory src_dir = self.get_package_dir(package) # Compute package build directory build_dir = os.path.join(*([self.build_lib] + package.split('.'))) # Strip directory from globbed filenames filenames = [ os.path.relpath(file, src_dir) for file in self.find_data_files(package, src_dir) ] return package, src_dir, build_dir, filenames def find_data_files(self, package, src_dir): """Return filenames for package's data files in 'src_dir'""" patterns = self._get_platform_patterns( self.package_data, package, src_dir, ) globs_expanded = map(partial(glob, recursive=True), patterns) # flatten the expanded globs into an iterable of matches globs_matches = itertools.chain.from_iterable(globs_expanded) glob_files = filter(os.path.isfile, globs_matches) files = itertools.chain( self.manifest_files.get(package, []), glob_files, ) return self.exclude_data_files(package, src_dir, files) def get_outputs(self, include_bytecode=1) -> List[str]: """See :class:`setuptools.commands.build.SubCommand`""" if self.editable_mode: return list(self.get_output_mapping().keys()) return super().get_outputs(include_bytecode) def get_output_mapping(self) -> Dict[str, str]: """See :class:`setuptools.commands.build.SubCommand`""" mapping = itertools.chain( self._get_package_data_output_mapping(), self._get_module_mapping(), ) return dict(sorted(mapping, key=lambda x: x[0])) def _get_module_mapping(self) -> Iterator[Tuple[str, str]]: """Iterate over all modules producing (dest, src) pairs.""" for (package, module, module_file) in self.find_all_modules(): package = package.split('.') filename = self.get_module_outfile(self.build_lib, package, module) yield (filename, module_file) def _get_package_data_output_mapping(self) -> Iterator[Tuple[str, str]]: """Iterate over package data producing (dest, src) pairs.""" for package, src_dir, build_dir, filenames in self.data_files: for filename in filenames: target = os.path.join(build_dir, filename) srcfile = os.path.join(src_dir, filename) yield (target, srcfile) def build_package_data(self): """Copy data files into build directory""" for target, srcfile in self._get_package_data_output_mapping(): self.mkpath(os.path.dirname(target)) _outf, _copied = self.copy_file(srcfile, target) make_writable(target) def analyze_manifest(self): self.manifest_files = mf = {} if not self.distribution.include_package_data: return src_dirs = {} for package in self.packages or (): # Locate package source directory src_dirs[assert_relative(self.get_package_dir(package))] = package if ( getattr(self, 'existing_egg_info_dir', None) and Path(self.existing_egg_info_dir, "SOURCES.txt").exists() ): egg_info_dir = self.existing_egg_info_dir manifest = Path(egg_info_dir, "SOURCES.txt") files = manifest.read_text(encoding="utf-8").splitlines() else: self.run_command('egg_info') ei_cmd = self.get_finalized_command('egg_info') egg_info_dir = ei_cmd.egg_info files = ei_cmd.filelist.files check = _IncludePackageDataAbuse() for path in self._filter_build_files(files, egg_info_dir): d, f = os.path.split(assert_relative(path)) prev = None oldf = f while d and d != prev and d not in src_dirs: prev = d d, df = os.path.split(d) f = os.path.join(df, f) if d in src_dirs: if f == oldf: if check.is_module(f): continue # it's a module, not data else: importable = check.importable_subpackage(src_dirs[d], f) if importable: check.warn(importable) mf.setdefault(src_dirs[d], []).append(path) def _filter_build_files(self, files: Iterable[str], egg_info: str) -> Iterator[str]: """ ``build_meta`` may try to create egg_info outside of the project directory, and this can be problematic for certain plugins (reported in issue #3500). Extensions might also include between their sources files created on the ``build_lib`` and ``build_temp`` directories. This function should filter this case of invalid files out. """ build = self.get_finalized_command("build") build_dirs = (egg_info, self.build_lib, build.build_temp, build.build_base) norm_dirs = [os.path.normpath(p) for p in build_dirs if p] for file in files: norm_path = os.path.normpath(file) if not os.path.isabs(file) or all(d not in norm_path for d in norm_dirs): yield file def get_data_files(self): pass # Lazily compute data files in _get_data_files() function. def check_package(self, package, package_dir): """Check namespace packages' __init__ for declare_namespace""" try: return self.packages_checked[package] except KeyError: pass init_py = orig.build_py.check_package(self, package, package_dir) self.packages_checked[package] = init_py if not init_py or not self.distribution.namespace_packages: return init_py for pkg in self.distribution.namespace_packages: if pkg == package or pkg.startswith(package + '.'): break else: return init_py with io.open(init_py, 'rb') as f: contents = f.read() if b'declare_namespace' not in contents: raise distutils.errors.DistutilsError( "Namespace package problem: %s is a namespace package, but " "its\n__init__.py does not call declare_namespace()! Please " 'fix it.\n(See the setuptools manual under ' '"Namespace Packages" for details.)\n"' % (package,) ) return init_py def initialize_options(self): self.packages_checked = {} orig.build_py.initialize_options(self) self.editable_mode = False self.existing_egg_info_dir = None def get_package_dir(self, package): res = orig.build_py.get_package_dir(self, package) if self.distribution.src_root is not None: return os.path.join(self.distribution.src_root, res) return res def exclude_data_files(self, package, src_dir, files): """Filter filenames for package's data files in 'src_dir'""" files = list(files) patterns = self._get_platform_patterns( self.exclude_package_data, package, src_dir, ) match_groups = (fnmatch.filter(files, pattern) for pattern in patterns) # flatten the groups of matches into an iterable of matches matches = itertools.chain.from_iterable(match_groups) bad = set(matches) keepers = (fn for fn in files if fn not in bad) # ditch dupes return list(unique_everseen(keepers)) @staticmethod def _get_platform_patterns(spec, package, src_dir): """ yield platform-specific path patterns (suitable for glob or fn_match) from a glob-based spec (such as self.package_data or self.exclude_package_data) matching package in src_dir. """ raw_patterns = itertools.chain( spec.get('', []), spec.get(package, []), ) return ( # Each pattern has to be converted to a platform-specific path os.path.join(src_dir, convert_path(pattern)) for pattern in raw_patterns ) def assert_relative(path): if not os.path.isabs(path): return path from distutils.errors import DistutilsSetupError msg = ( textwrap.dedent( """ Error: setup script specifies an absolute path: %s setup() arguments must *always* be /-separated paths relative to the setup.py directory, *never* absolute paths. """ ).lstrip() % path ) raise DistutilsSetupError(msg) class _IncludePackageDataAbuse: """Inform users that package or module is included as 'data file'""" MESSAGE = """\ Installing {importable!r} as data is deprecated, please list it in `packages`. !!\n\n ############################ # Package would be ignored # ############################ Python recognizes {importable!r} as an importable package, but it is not listed in the `packages` configuration of setuptools. {importable!r} has been automatically added to the distribution only because it may contain data files, but this behavior is likely to change in future versions of setuptools (and therefore is considered deprecated). Please make sure that {importable!r} is included as a package by using the `packages` configuration field or the proper discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" and "data files" on setuptools documentation page. \n\n!! """ def __init__(self): self._already_warned = set() def is_module(self, file): return file.endswith(".py") and file[:-len(".py")].isidentifier() def importable_subpackage(self, parent, file): pkg = Path(file).parent parts = list(itertools.takewhile(str.isidentifier, pkg.parts)) if parts: return ".".join([parent, *parts]) return None def warn(self, importable): if importable not in self._already_warned: msg = textwrap.dedent(self.MESSAGE).format(importable=importable) warnings.warn(msg, SetuptoolsDeprecationWarning, stacklevel=2) self._already_warned.add(importable) PK{5ZGl-Lib/site-packages/setuptools/command/build.pynuW+Aimport sys import warnings from typing import TYPE_CHECKING, List, Dict from distutils.command.build import build as _build from setuptools import SetuptoolsDeprecationWarning if sys.version_info >= (3, 8): from typing import Protocol elif TYPE_CHECKING: from typing_extensions import Protocol else: from abc import ABC as Protocol _ORIGINAL_SUBCOMMANDS = {"build_py", "build_clib", "build_ext", "build_scripts"} class build(_build): # copy to avoid sharing the object with parent class sub_commands = _build.sub_commands[:] def get_sub_commands(self): subcommands = {cmd[0] for cmd in _build.sub_commands} if subcommands - _ORIGINAL_SUBCOMMANDS: msg = """ It seems that you are using `distutils.command.build` to add new subcommands. Using `distutils` directly is considered deprecated, please use `setuptools.command.build`. """ warnings.warn(msg, SetuptoolsDeprecationWarning) self.sub_commands = _build.sub_commands return super().get_sub_commands() class SubCommand(Protocol): """In order to support editable installations (see :pep:`660`) all build subcommands **SHOULD** implement this protocol. They also **MUST** inherit from ``setuptools.Command``. When creating an :pep:`editable wheel <660>`, ``setuptools`` will try to evaluate custom ``build`` subcommands using the following procedure: 1. ``setuptools`` will set the ``editable_mode`` attribute to ``True`` 2. ``setuptools`` will execute the ``run()`` command. .. important:: Subcommands **SHOULD** take advantage of ``editable_mode=True`` to adequate its behaviour or perform optimisations. For example, if a subcommand don't need to generate any extra file and everything it does is to copy a source file into the build directory, ``run()`` **SHOULD** simply "early return". Similarly, if the subcommand creates files that would be placed alongside Python files in the final distribution, during an editable install the command **SHOULD** generate these files "in place" (i.e. write them to the original source directory, instead of using the build directory). Note that ``get_output_mapping()`` should reflect that and include mappings for "in place" builds accordingly. 3. ``setuptools`` use any knowledge it can derive from the return values of ``get_outputs()`` and ``get_output_mapping()`` to create an editable wheel. When relevant ``setuptools`` **MAY** attempt to use file links based on the value of ``get_output_mapping()``. Alternatively, ``setuptools`` **MAY** attempt to use :doc:`import hooks ` to redirect any attempt to import to the directory with the original source code and other files built in place. Please note that custom sub-commands **SHOULD NOT** rely on ``run()`` being executed (or not) to provide correct return values for ``get_outputs()``, ``get_output_mapping()`` or ``get_source_files()``. The ``get_*`` methods should work independently of ``run()``. """ editable_mode: bool = False """Boolean flag that will be set to ``True`` when setuptools is used for an editable installation (see :pep:`660`). Implementations **SHOULD** explicitly set the default value of this attribute to ``False``. When subcommands run, they can use this flag to perform optimizations or change their behaviour accordingly. """ build_lib: str """String representing the directory where the build artifacts should be stored, e.g. ``build/lib``. For example, if a distribution wants to provide a Python module named ``pkg.mod``, then a corresponding file should be written to ``{build_lib}/package/module.py``. A way of thinking about this is that the files saved under ``build_lib`` would be eventually copied to one of the directories in :obj:`site.PREFIXES` upon installation. A command that produces platform-independent files (e.g. compiling text templates into Python functions), **CAN** initialize ``build_lib`` by copying its value from the ``build_py`` command. On the other hand, a command that produces platform-specific files **CAN** initialize ``build_lib`` by copying its value from the ``build_ext`` command. In general this is done inside the ``finalize_options`` method with the help of the ``set_undefined_options`` command:: def finalize_options(self): self.set_undefined_options("build_py", ("build_lib", "build_lib")) ... """ def initialize_options(self): """(Required by the original :class:`setuptools.Command` interface)""" def finalize_options(self): """(Required by the original :class:`setuptools.Command` interface)""" def run(self): """(Required by the original :class:`setuptools.Command` interface)""" def get_source_files(self) -> List[str]: """ Return a list of all files that are used by the command to create the expected outputs. For example, if your build command transpiles Java files into Python, you should list here all the Java files. The primary purpose of this function is to help populating the ``sdist`` with all the files necessary to build the distribution. All files should be strings relative to the project root directory. """ def get_outputs(self) -> List[str]: """ Return a list of files intended for distribution as they would have been produced by the build. These files should be strings in the form of ``"{build_lib}/destination/file/path"``. .. note:: The return value of ``get_output()`` should include all files used as keys in ``get_output_mapping()`` plus files that are generated during the build and don't correspond to any source file already present in the project. """ def get_output_mapping(self) -> Dict[str, str]: """ Return a mapping between destination files as they would be produced by the build (dict keys) into the respective existing (source) files (dict values). Existing (source) files should be represented as strings relative to the project root directory. Destination files should be strings in the form of ``"{build_lib}/destination/file/path"``. """ PK{5Z= (3, 6, 0, 'beta', 1): return self.formats = ['gztar'] def make_distribution(self): """ Workaround for #516 """ with self._remove_os_link(): orig.sdist.make_distribution(self) @staticmethod @contextlib.contextmanager def _remove_os_link(): """ In a context, remove and restore os.link if it exists """ class NoValue: pass orig_val = getattr(os, 'link', NoValue) try: del os.link except Exception: pass try: yield finally: if orig_val is not NoValue: setattr(os, 'link', orig_val) def add_defaults(self): super().add_defaults() self._add_defaults_build_sub_commands() def _add_defaults_optional(self): super()._add_defaults_optional() if os.path.isfile('pyproject.toml'): self.filelist.append('pyproject.toml') def _add_defaults_python(self): """getting python files""" if self.distribution.has_pure_modules(): build_py = self.get_finalized_command('build_py') self.filelist.extend(build_py.get_source_files()) self._add_data_files(self._safe_data_files(build_py)) def _add_defaults_build_sub_commands(self): build = self.get_finalized_command("build") missing_cmds = set(build.get_sub_commands()) - _ORIGINAL_SUBCOMMANDS # ^-- the original built-in sub-commands are already handled by default. cmds = (self.get_finalized_command(c) for c in missing_cmds) files = (c.get_source_files() for c in cmds if hasattr(c, "get_source_files")) self.filelist.extend(chain.from_iterable(files)) def _safe_data_files(self, build_py): """ Since the ``sdist`` class is also used to compute the MANIFEST (via :obj:`setuptools.command.egg_info.manifest_maker`), there might be recursion problems when trying to obtain the list of data_files and ``include_package_data=True`` (which in turn depends on the files included in the MANIFEST). To avoid that, ``manifest_maker`` should be able to overwrite this method and avoid recursive attempts to build/analyze the MANIFEST. """ return build_py.data_files def _add_data_files(self, data_files): """ Add data files as found in build_py.data_files. """ self.filelist.extend( os.path.join(src_dir, name) for _, src_dir, _, filenames in data_files for name in filenames ) def _add_defaults_data_files(self): try: super()._add_defaults_data_files() except TypeError: log.warn("data_files contains unexpected objects") def check_readme(self): for f in self.READMES: if os.path.exists(f): return else: self.warn( "standard file not found: should have one of " + ', '.join(self.READMES) ) def make_release_tree(self, base_dir, files): orig.sdist.make_release_tree(self, base_dir, files) # Save any egg_info command line options used to create this sdist dest = os.path.join(base_dir, 'setup.cfg') if hasattr(os, 'link') and os.path.exists(dest): # unlink and re-copy, since it might be hard-linked, and # we don't want to change the source version os.unlink(dest) self.copy_file('setup.cfg', dest) self.get_finalized_command('egg_info').save_version_info(dest) def _manifest_is_not_generated(self): # check for special comment used in 2.7.1 and higher if not os.path.isfile(self.manifest): return False with io.open(self.manifest, 'rb') as fp: first_line = fp.readline() return (first_line != '# file GENERATED by distutils, do NOT edit\n'.encode()) def read_manifest(self): """Read the manifest file (named by 'self.manifest') and use it to fill in 'self.filelist', the list of files to include in the source distribution. """ log.info("reading manifest file '%s'", self.manifest) manifest = open(self.manifest, 'rb') for line in manifest: # The manifest must contain UTF-8. See #303. try: line = line.decode('UTF-8') except UnicodeDecodeError: log.warn("%r not UTF-8 decodable -- skipping" % line) continue # ignore comments and blank lines line = line.strip() if line.startswith('#') or not line: continue self.filelist.append(line) manifest.close() PK{5Z. n.Lib/site-packages/setuptools/command/setopt.pynuW+Afrom distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import distutils import os import configparser from setuptools import Command __all__ = ['config_file', 'edit_config', 'option_base', 'setopt'] def config_file(kind="local"): """Get the filename of the distutils, local, global, or per-user config `kind` must be one of "local", "global", or "user" """ if kind == 'local': return 'setup.cfg' if kind == 'global': return os.path.join( os.path.dirname(distutils.__file__), 'distutils.cfg' ) if kind == 'user': dot = os.name == 'posix' and '.' or '' return os.path.expanduser(convert_path("~/%spydistutils.cfg" % dot)) raise ValueError( "config_file() type must be 'local', 'global', or 'user'", kind ) def edit_config(filename, settings, dry_run=False): """Edit a configuration file to include `settings` `settings` is a dictionary of dictionaries or ``None`` values, keyed by command/section name. A ``None`` value means to delete the entire section, while a dictionary lists settings to be changed or deleted in that section. A setting of ``None`` means to delete that setting. """ log.debug("Reading configuration from %s", filename) opts = configparser.RawConfigParser() opts.optionxform = lambda x: x opts.read([filename]) for section, options in settings.items(): if options is None: log.info("Deleting section [%s] from %s", section, filename) opts.remove_section(section) else: if not opts.has_section(section): log.debug("Adding new section [%s] to %s", section, filename) opts.add_section(section) for option, value in options.items(): if value is None: log.debug( "Deleting %s.%s from %s", section, option, filename ) opts.remove_option(section, option) if not opts.options(section): log.info("Deleting empty [%s] section from %s", section, filename) opts.remove_section(section) else: log.debug( "Setting %s.%s to %r in %s", section, option, value, filename ) opts.set(section, option, value) log.info("Writing %s", filename) if not dry_run: with open(filename, 'w') as f: opts.write(f) class option_base(Command): """Abstract base class for commands that mess with config files""" user_options = [ ('global-config', 'g', "save options to the site-wide distutils.cfg file"), ('user-config', 'u', "save options to the current user's pydistutils.cfg file"), ('filename=', 'f', "configuration file to use (default=setup.cfg)"), ] boolean_options = [ 'global-config', 'user-config', ] def initialize_options(self): self.global_config = None self.user_config = None self.filename = None def finalize_options(self): filenames = [] if self.global_config: filenames.append(config_file('global')) if self.user_config: filenames.append(config_file('user')) if self.filename is not None: filenames.append(self.filename) if not filenames: filenames.append(config_file('local')) if len(filenames) > 1: raise DistutilsOptionError( "Must specify only one configuration file option", filenames ) self.filename, = filenames class setopt(option_base): """Save command-line options to a file""" description = "set an option in setup.cfg or another config file" user_options = [ ('command=', 'c', 'command to set an option for'), ('option=', 'o', 'option to set'), ('set-value=', 's', 'value of the option'), ('remove', 'r', 'remove (unset) the value'), ] + option_base.user_options boolean_options = option_base.boolean_options + ['remove'] def initialize_options(self): option_base.initialize_options(self) self.command = None self.option = None self.set_value = None self.remove = None def finalize_options(self): option_base.finalize_options(self) if self.command is None or self.option is None: raise DistutilsOptionError("Must specify --command *and* --option") if self.set_value is None and not self.remove: raise DistutilsOptionError("Must specify --set-value or --remove") def run(self): edit_config( self.filename, { self.command: {self.option.replace('-', '_'): self.set_value} }, self.dry_run ) PK{5Z3RR2Lib/site-packages/setuptools/command/py36compat.pynuW+Aimport os from glob import glob from distutils.util import convert_path from distutils.command import sdist class sdist_add_defaults: """ Mix-in providing forward-compatibility for functionality as found in distutils on Python 3.7. Do not edit the code in this class except to update functionality as implemented in distutils. Instead, override in the subclass. """ def add_defaults(self): """Add all the default files to self.filelist: - README or README.txt - setup.py - test/test*.py - all pure Python modules mentioned in setup script - all files pointed by package_data (build_py) - all files defined in data_files. - all files defined as scripts. - all C sources listed as part of extensions or C libraries in the setup script (doesn't catch C headers!) Warns if (README or README.txt) or setup.py are missing; everything else is optional. """ self._add_defaults_standards() self._add_defaults_optional() self._add_defaults_python() self._add_defaults_data_files() self._add_defaults_ext() self._add_defaults_c_libs() self._add_defaults_scripts() @staticmethod def _cs_path_exists(fspath): """ Case-sensitive path existence check >>> sdist_add_defaults._cs_path_exists(__file__) True >>> sdist_add_defaults._cs_path_exists(__file__.upper()) False """ if not os.path.exists(fspath): return False # make absolute so we always have a directory abspath = os.path.abspath(fspath) directory, filename = os.path.split(abspath) return filename in os.listdir(directory) def _add_defaults_standards(self): standards = [self.READMES, self.distribution.script_name] for fn in standards: if isinstance(fn, tuple): alts = fn got_it = False for fn in alts: if self._cs_path_exists(fn): got_it = True self.filelist.append(fn) break if not got_it: self.warn("standard file not found: should have one of " + ', '.join(alts)) else: if self._cs_path_exists(fn): self.filelist.append(fn) else: self.warn("standard file '%s' not found" % fn) def _add_defaults_optional(self): optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: files = filter(os.path.isfile, glob(pattern)) self.filelist.extend(files) def _add_defaults_python(self): # build_py is used to get: # - python modules # - files defined in package_data build_py = self.get_finalized_command('build_py') # getting python files if self.distribution.has_pure_modules(): self.filelist.extend(build_py.get_source_files()) # getting package_data files # (computed in build_py.data_files by build_py.finalize_options) for pkg, src_dir, build_dir, filenames in build_py.data_files: for filename in filenames: self.filelist.append(os.path.join(src_dir, filename)) def _add_defaults_data_files(self): # getting distribution.data_files if self.distribution.has_data_files(): for item in self.distribution.data_files: if isinstance(item, str): # plain file item = convert_path(item) if os.path.isfile(item): self.filelist.append(item) else: # a (dirname, filenames) tuple dirname, filenames = item for f in filenames: f = convert_path(f) if os.path.isfile(f): self.filelist.append(f) def _add_defaults_ext(self): if self.distribution.has_ext_modules(): build_ext = self.get_finalized_command('build_ext') self.filelist.extend(build_ext.get_source_files()) def _add_defaults_c_libs(self): if self.distribution.has_c_libraries(): build_clib = self.get_finalized_command('build_clib') self.filelist.extend(build_clib.get_source_files()) def _add_defaults_scripts(self): if self.distribution.has_scripts(): build_scripts = self.get_finalized_command('build_scripts') self.filelist.extend(build_scripts.get_source_files()) if hasattr(sdist.sdist, '_add_defaults_standards'): # disable the functionality already available upstream class sdist_add_defaults: # noqa pass PK{5Z40Lib/site-packages/setuptools/command/saveopts.pynuW+Afrom setuptools.command.setopt import edit_config, option_base class saveopts(option_base): """Save command-line options to a file""" description = "save supplied options to setup.cfg or other config file" def run(self): dist = self.distribution settings = {} for cmd in dist.command_options: if cmd == 'saveopts': continue # don't save our own options! for opt, (src, val) in dist.get_option_dict(cmd).items(): if src == "command line": settings.setdefault(cmd, {})[opt] = val edit_config(self.filename, settings, self.dry_run) PK{5ZO\,Lib/site-packages/setuptools/command/test.pynuW+Aimport os import operator import sys import contextlib import itertools import unittest from distutils.errors import DistutilsError, DistutilsOptionError from distutils import log from unittest import TestLoader from pkg_resources import ( resource_listdir, resource_exists, normalize_path, working_set, evaluate_marker, add_activation_listener, require, ) from .._importlib import metadata from setuptools import Command from setuptools.extern.more_itertools import unique_everseen from setuptools.extern.jaraco.functools import pass_none class ScanningLoader(TestLoader): def __init__(self): TestLoader.__init__(self) self._visited = set() def loadTestsFromModule(self, module, pattern=None): """Return a suite of all tests cases contained in the given module If the module is a package, load tests from all the modules in it. If the module has an ``additional_tests`` function, call it and add the return value to the tests. """ if module in self._visited: return None self._visited.add(module) tests = [] tests.append(TestLoader.loadTestsFromModule(self, module)) if hasattr(module, "additional_tests"): tests.append(module.additional_tests()) if hasattr(module, '__path__'): for file in resource_listdir(module.__name__, ''): if file.endswith('.py') and file != '__init__.py': submodule = module.__name__ + '.' + file[:-3] else: if resource_exists(module.__name__, file + '/__init__.py'): submodule = module.__name__ + '.' + file else: continue tests.append(self.loadTestsFromName(submodule)) if len(tests) != 1: return self.suiteClass(tests) else: return tests[0] # don't create a nested suite for only one return # adapted from jaraco.classes.properties:NonDataProperty class NonDataProperty: def __init__(self, fget): self.fget = fget def __get__(self, obj, objtype=None): if obj is None: return self return self.fget(obj) class test(Command): """Command to run unit tests after in-place build""" description = "run unit tests after in-place build (deprecated)" user_options = [ ('test-module=', 'm', "Run 'test_suite' in specified module"), ( 'test-suite=', 's', "Run single test, case or suite (e.g. 'module.test_suite')", ), ('test-runner=', 'r', "Test runner to use"), ] def initialize_options(self): self.test_suite = None self.test_module = None self.test_loader = None self.test_runner = None def finalize_options(self): if self.test_suite and self.test_module: msg = "You may specify a module or a suite, but not both" raise DistutilsOptionError(msg) if self.test_suite is None: if self.test_module is None: self.test_suite = self.distribution.test_suite else: self.test_suite = self.test_module + ".test_suite" if self.test_loader is None: self.test_loader = getattr(self.distribution, 'test_loader', None) if self.test_loader is None: self.test_loader = "setuptools.command.test:ScanningLoader" if self.test_runner is None: self.test_runner = getattr(self.distribution, 'test_runner', None) @NonDataProperty def test_args(self): return list(self._test_args()) def _test_args(self): if not self.test_suite: yield 'discover' if self.verbose: yield '--verbose' if self.test_suite: yield self.test_suite def with_project_on_sys_path(self, func): """ Backward compatibility for project_on_sys_path context. """ with self.project_on_sys_path(): func() @contextlib.contextmanager def project_on_sys_path(self, include_dists=[]): self.run_command('egg_info') # Build extensions in-place self.reinitialize_command('build_ext', inplace=1) self.run_command('build_ext') ei_cmd = self.get_finalized_command("egg_info") old_path = sys.path[:] old_modules = sys.modules.copy() try: project_path = normalize_path(ei_cmd.egg_base) sys.path.insert(0, project_path) working_set.__init__() add_activation_listener(lambda dist: dist.activate()) require('%s==%s' % (ei_cmd.egg_name, ei_cmd.egg_version)) with self.paths_on_pythonpath([project_path]): yield finally: sys.path[:] = old_path sys.modules.clear() sys.modules.update(old_modules) working_set.__init__() @staticmethod @contextlib.contextmanager def paths_on_pythonpath(paths): """ Add the indicated paths to the head of the PYTHONPATH environment variable so that subprocesses will also see the packages at these paths. Do this in a context that restores the value on exit. """ nothing = object() orig_pythonpath = os.environ.get('PYTHONPATH', nothing) current_pythonpath = os.environ.get('PYTHONPATH', '') try: prefix = os.pathsep.join(unique_everseen(paths)) to_join = filter(None, [prefix, current_pythonpath]) new_path = os.pathsep.join(to_join) if new_path: os.environ['PYTHONPATH'] = new_path yield finally: if orig_pythonpath is nothing: os.environ.pop('PYTHONPATH', None) else: os.environ['PYTHONPATH'] = orig_pythonpath @staticmethod def install_dists(dist): """ Install the requirements indicated by self.distribution and return an iterable of the dists that were built. """ ir_d = dist.fetch_build_eggs(dist.install_requires) tr_d = dist.fetch_build_eggs(dist.tests_require or []) er_d = dist.fetch_build_eggs( v for k, v in dist.extras_require.items() if k.startswith(':') and evaluate_marker(k[1:]) ) return itertools.chain(ir_d, tr_d, er_d) def run(self): self.announce( "WARNING: Testing via this command is deprecated and will be " "removed in a future version. Users looking for a generic test " "entry point independent of test runner are encouraged to use " "tox.", log.WARN, ) installed_dists = self.install_dists(self.distribution) cmd = ' '.join(self._argv) if self.dry_run: self.announce('skipping "%s" (dry run)' % cmd) return self.announce('running "%s"' % cmd) paths = map(operator.attrgetter('location'), installed_dists) with self.paths_on_pythonpath(paths): with self.project_on_sys_path(): self.run_tests() def run_tests(self): test = unittest.main( None, None, self._argv, testLoader=self._resolve_as_ep(self.test_loader), testRunner=self._resolve_as_ep(self.test_runner), exit=False, ) if not test.result.wasSuccessful(): msg = 'Test failed: %s' % test.result self.announce(msg, log.ERROR) raise DistutilsError(msg) @property def _argv(self): return ['unittest'] + self.test_args @staticmethod @pass_none def _resolve_as_ep(val): """ Load the indicated attribute value, called, as a as if it were specified as an entry point. """ return metadata.EntryPoint(value=val, name=None, group=None).load()() PK{5Z,##3Lib/site-packages/setuptools/command/install_lib.pynuW+Aimport os import sys from itertools import product, starmap import distutils.command.install_lib as orig class install_lib(orig.install_lib): """Don't add compiled flags to filenames of non-Python files""" def run(self): self.build() outfiles = self.install() if outfiles is not None: # always compile, in case we have any extension stubs to deal with self.byte_compile(outfiles) def get_exclusions(self): """ Return a collections.Sized collections.Container of paths to be excluded for single_version_externally_managed installations. """ all_packages = ( pkg for ns_pkg in self._get_SVEM_NSPs() for pkg in self._all_packages(ns_pkg) ) excl_specs = product(all_packages, self._gen_exclusion_paths()) return set(starmap(self._exclude_pkg_path, excl_specs)) def _exclude_pkg_path(self, pkg, exclusion_path): """ Given a package name and exclusion path within that package, compute the full exclusion path. """ parts = pkg.split('.') + [exclusion_path] return os.path.join(self.install_dir, *parts) @staticmethod def _all_packages(pkg_name): """ >>> list(install_lib._all_packages('foo.bar.baz')) ['foo.bar.baz', 'foo.bar', 'foo'] """ while pkg_name: yield pkg_name pkg_name, sep, child = pkg_name.rpartition('.') def _get_SVEM_NSPs(self): """ Get namespace packages (list) but only for single_version_externally_managed installations and empty otherwise. """ # TODO: is it necessary to short-circuit here? i.e. what's the cost # if get_finalized_command is called even when namespace_packages is # False? if not self.distribution.namespace_packages: return [] install_cmd = self.get_finalized_command('install') svem = install_cmd.single_version_externally_managed return self.distribution.namespace_packages if svem else [] @staticmethod def _gen_exclusion_paths(): """ Generate file paths to be excluded for namespace packages (bytecode cache files). """ # always exclude the package module itself yield '__init__.py' yield '__init__.pyc' yield '__init__.pyo' if not hasattr(sys, 'implementation'): return base = os.path.join( '__pycache__', '__init__.' + sys.implementation.cache_tag) yield base + '.pyc' yield base + '.pyo' yield base + '.opt-1.pyc' yield base + '.opt-2.pyc' def copy_tree( self, infile, outfile, preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1 ): assert preserve_mode and preserve_times and not preserve_symlinks exclude = self.get_exclusions() if not exclude: return orig.install_lib.copy_tree(self, infile, outfile) # Exclude namespace package __init__.py* files from the output from setuptools.archive_util import unpack_directory from distutils import log outfiles = [] def pf(src, dst): if dst in exclude: log.warn("Skipping installation of %s (namespace package)", dst) return False log.info("copying %s -> %s", src, os.path.dirname(dst)) outfiles.append(dst) return dst unpack_directory(infile, outfile, pf) return outfiles def get_outputs(self): outputs = orig.install_lib.get_outputs(self) exclude = self.get_exclusions() if exclude: return [f for f in outputs if f not in exclude] return outputs PK{5Z&dd/Lib/site-packages/setuptools/command/develop.pynuW+Afrom distutils.util import convert_path from distutils import log from distutils.errors import DistutilsError, DistutilsOptionError import os import glob import io import pkg_resources from setuptools.command.easy_install import easy_install from setuptools import namespaces import setuptools class develop(namespaces.DevelopInstaller, easy_install): """Set up package for development""" description = "install package in 'development mode'" user_options = easy_install.user_options + [ ("uninstall", "u", "Uninstall this source package"), ("egg-path=", None, "Set the path to be used in the .egg-link file"), ] boolean_options = easy_install.boolean_options + ['uninstall'] command_consumes_arguments = False # override base def run(self): if self.uninstall: self.multi_version = True self.uninstall_link() self.uninstall_namespaces() else: self.install_for_development() self.warn_deprecated_options() def initialize_options(self): self.uninstall = None self.egg_path = None easy_install.initialize_options(self) self.setup_path = None self.always_copy_from = '.' # always copy eggs installed in curdir def finalize_options(self): ei = self.get_finalized_command("egg_info") if ei.broken_egg_info: template = "Please rename %r to %r before using 'develop'" args = ei.egg_info, ei.broken_egg_info raise DistutilsError(template % args) self.args = [ei.egg_name] easy_install.finalize_options(self) self.expand_basedirs() self.expand_dirs() # pick up setup-dir .egg files only: no .egg-info self.package_index.scan(glob.glob('*.egg')) egg_link_fn = ei.egg_name + '.egg-link' self.egg_link = os.path.join(self.install_dir, egg_link_fn) self.egg_base = ei.egg_base if self.egg_path is None: self.egg_path = os.path.abspath(ei.egg_base) target = pkg_resources.normalize_path(self.egg_base) egg_path = pkg_resources.normalize_path( os.path.join(self.install_dir, self.egg_path) ) if egg_path != target: raise DistutilsOptionError( "--egg-path must be a relative path from the install" " directory to " + target ) # Make a distribution for the package's source self.dist = pkg_resources.Distribution( target, pkg_resources.PathMetadata(target, os.path.abspath(ei.egg_info)), project_name=ei.egg_name, ) self.setup_path = self._resolve_setup_path( self.egg_base, self.install_dir, self.egg_path, ) @staticmethod def _resolve_setup_path(egg_base, install_dir, egg_path): """ Generate a path from egg_base back to '.' where the setup script resides and ensure that path points to the setup path from $install_dir/$egg_path. """ path_to_setup = egg_base.replace(os.sep, '/').rstrip('/') if path_to_setup != os.curdir: path_to_setup = '../' * (path_to_setup.count('/') + 1) resolved = pkg_resources.normalize_path( os.path.join(install_dir, egg_path, path_to_setup) ) if resolved != pkg_resources.normalize_path(os.curdir): raise DistutilsOptionError( "Can't get a consistent path to setup script from" " installation directory", resolved, pkg_resources.normalize_path(os.curdir), ) return path_to_setup def install_for_development(self): self.run_command('egg_info') # Build extensions in-place self.reinitialize_command('build_ext', inplace=1) self.run_command('build_ext') if setuptools.bootstrap_install_from: self.easy_install(setuptools.bootstrap_install_from) setuptools.bootstrap_install_from = None self.install_namespaces() # create an .egg-link in the installation dir, pointing to our egg log.info("Creating %s (link to %s)", self.egg_link, self.egg_base) if not self.dry_run: with open(self.egg_link, "w") as f: f.write(self.egg_path + "\n" + self.setup_path) # postprocess the installed distro, fixing up .pth, installing scripts, # and handling requirements self.process_distribution(None, self.dist, not self.no_deps) def uninstall_link(self): if os.path.exists(self.egg_link): log.info("Removing %s (link to %s)", self.egg_link, self.egg_base) egg_link_file = open(self.egg_link) contents = [line.rstrip() for line in egg_link_file] egg_link_file.close() if contents not in ([self.egg_path], [self.egg_path, self.setup_path]): log.warn("Link points to %s: uninstall aborted", contents) return if not self.dry_run: os.unlink(self.egg_link) if not self.dry_run: self.update_pth(self.dist) # remove any .pth link to us if self.distribution.scripts: # XXX should also check for entry point scripts! log.warn("Note: you must uninstall or replace scripts manually!") def install_egg_scripts(self, dist): if dist is not self.dist: # Installing a dependency, so fall back to normal behavior return easy_install.install_egg_scripts(self, dist) # create wrapper scripts in the script dir, pointing to dist.scripts # new-style... self.install_wrapper_scripts(dist) # ...and old-style for script_name in self.distribution.scripts or []: script_path = os.path.abspath(convert_path(script_name)) script_name = os.path.basename(script_path) with io.open(script_path) as strm: script_text = strm.read() self.install_script(dist, script_name, script_text, script_path) def install_wrapper_scripts(self, dist): dist = VersionlessRequirement(dist) return easy_install.install_wrapper_scripts(self, dist) class VersionlessRequirement: """ Adapt a pkg_resources.Distribution to simply return the project name as the 'requirement' so that scripts will work across multiple versions. >>> from pkg_resources import Distribution >>> dist = Distribution(project_name='foo', version='1.0') >>> str(dist.as_requirement()) 'foo==1.0' >>> adapted_dist = VersionlessRequirement(dist) >>> str(adapted_dist.as_requirement()) 'foo' """ def __init__(self, dist): self.__dist = dist def __getattr__(self, name): return getattr(self.__dist, name) def as_requirement(self): return self.project_name PK{5Ze\@@1Lib/site-packages/setuptools/command/bdist_egg.pynuW+A"""setuptools.command.bdist_egg Build .egg distributions""" from distutils.dir_util import remove_tree, mkpath from distutils import log from types import CodeType import sys import os import re import textwrap import marshal from pkg_resources import get_build_platform, Distribution from setuptools.extension import Library from setuptools import Command from .._path import ensure_directory from sysconfig import get_path, get_python_version def _get_purelib(): return get_path("purelib") def strip_module(filename): if '.' in filename: filename = os.path.splitext(filename)[0] if filename.endswith('module'): filename = filename[:-6] return filename def sorted_walk(dir): """Do os.walk in a reproducible way, independent of indeterministic filesystem readdir order """ for base, dirs, files in os.walk(dir): dirs.sort() files.sort() yield base, dirs, files def write_stub(resource, pyfile): _stub_template = textwrap.dedent(""" def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, importlib.util __file__ = pkg_resources.resource_filename(__name__, %r) __loader__ = None; del __bootstrap__, __loader__ spec = importlib.util.spec_from_file_location(__name__,__file__) mod = importlib.util.module_from_spec(spec) spec.loader.exec_module(mod) __bootstrap__() """).lstrip() with open(pyfile, 'w') as f: f.write(_stub_template % resource) class bdist_egg(Command): description = "create an \"egg\" distribution" user_options = [ ('bdist-dir=', 'b', "temporary directory for creating the distribution"), ('plat-name=', 'p', "platform name to embed in generated filenames " "(default: %s)" % get_build_platform()), ('exclude-source-files', None, "remove all .py files from the generated egg"), ('keep-temp', 'k', "keep the pseudo-installation tree around after " + "creating the distribution archive"), ('dist-dir=', 'd', "directory to put final built distributions in"), ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), ] boolean_options = [ 'keep-temp', 'skip-build', 'exclude-source-files' ] def initialize_options(self): self.bdist_dir = None self.plat_name = None self.keep_temp = 0 self.dist_dir = None self.skip_build = 0 self.egg_output = None self.exclude_source_files = None def finalize_options(self): ei_cmd = self.ei_cmd = self.get_finalized_command("egg_info") self.egg_info = ei_cmd.egg_info if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'egg') if self.plat_name is None: self.plat_name = get_build_platform() self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) if self.egg_output is None: # Compute filename of the output egg basename = Distribution( None, None, ei_cmd.egg_name, ei_cmd.egg_version, get_python_version(), self.distribution.has_ext_modules() and self.plat_name ).egg_name() self.egg_output = os.path.join(self.dist_dir, basename + '.egg') def do_install_data(self): # Hack for packages that install data to install's --install-lib self.get_finalized_command('install').install_lib = self.bdist_dir site_packages = os.path.normcase(os.path.realpath(_get_purelib())) old, self.distribution.data_files = self.distribution.data_files, [] for item in old: if isinstance(item, tuple) and len(item) == 2: if os.path.isabs(item[0]): realpath = os.path.realpath(item[0]) normalized = os.path.normcase(realpath) if normalized == site_packages or normalized.startswith( site_packages + os.sep ): item = realpath[len(site_packages) + 1:], item[1] # XXX else: raise ??? self.distribution.data_files.append(item) try: log.info("installing package data to %s", self.bdist_dir) self.call_command('install_data', force=0, root=None) finally: self.distribution.data_files = old def get_outputs(self): return [self.egg_output] def call_command(self, cmdname, **kw): """Invoke reinitialized command `cmdname` with keyword args""" for dirname in INSTALL_DIRECTORY_ATTRS: kw.setdefault(dirname, self.bdist_dir) kw.setdefault('skip_build', self.skip_build) kw.setdefault('dry_run', self.dry_run) cmd = self.reinitialize_command(cmdname, **kw) self.run_command(cmdname) return cmd def run(self): # noqa: C901 # is too complex (14) # FIXME # Generate metadata first self.run_command("egg_info") # We run install_lib before install_data, because some data hacks # pull their data path from the install_lib command. log.info("installing library code to %s", self.bdist_dir) instcmd = self.get_finalized_command('install') old_root = instcmd.root instcmd.root = None if self.distribution.has_c_libraries() and not self.skip_build: self.run_command('build_clib') cmd = self.call_command('install_lib', warn_dir=0) instcmd.root = old_root all_outputs, ext_outputs = self.get_ext_outputs() self.stubs = [] to_compile = [] for (p, ext_name) in enumerate(ext_outputs): filename, ext = os.path.splitext(ext_name) pyfile = os.path.join(self.bdist_dir, strip_module(filename) + '.py') self.stubs.append(pyfile) log.info("creating stub loader for %s", ext_name) if not self.dry_run: write_stub(os.path.basename(ext_name), pyfile) to_compile.append(pyfile) ext_outputs[p] = ext_name.replace(os.sep, '/') if to_compile: cmd.byte_compile(to_compile) if self.distribution.data_files: self.do_install_data() # Make the EGG-INFO directory archive_root = self.bdist_dir egg_info = os.path.join(archive_root, 'EGG-INFO') self.mkpath(egg_info) if self.distribution.scripts: script_dir = os.path.join(egg_info, 'scripts') log.info("installing scripts to %s", script_dir) self.call_command('install_scripts', install_dir=script_dir, no_ep=1) self.copy_metadata_to(egg_info) native_libs = os.path.join(egg_info, "native_libs.txt") if all_outputs: log.info("writing %s", native_libs) if not self.dry_run: ensure_directory(native_libs) libs_file = open(native_libs, 'wt') libs_file.write('\n'.join(all_outputs)) libs_file.write('\n') libs_file.close() elif os.path.isfile(native_libs): log.info("removing %s", native_libs) if not self.dry_run: os.unlink(native_libs) write_safety_flag( os.path.join(archive_root, 'EGG-INFO'), self.zip_safe() ) if os.path.exists(os.path.join(self.egg_info, 'depends.txt')): log.warn( "WARNING: 'depends.txt' will not be used by setuptools 0.6!\n" "Use the install_requires/extras_require setup() args instead." ) if self.exclude_source_files: self.zap_pyfiles() # Make the archive make_zipfile(self.egg_output, archive_root, verbose=self.verbose, dry_run=self.dry_run, mode=self.gen_header()) if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) # Add to 'Distribution.dist_files' so that the "upload" command works getattr(self.distribution, 'dist_files', []).append( ('bdist_egg', get_python_version(), self.egg_output)) def zap_pyfiles(self): log.info("Removing .py files from temporary directory") for base, dirs, files in walk_egg(self.bdist_dir): for name in files: path = os.path.join(base, name) if name.endswith('.py'): log.debug("Deleting %s", path) os.unlink(path) if base.endswith('__pycache__'): path_old = path pattern = r'(?P.+)\.(?P[^.]+)\.pyc' m = re.match(pattern, name) path_new = os.path.join( base, os.pardir, m.group('name') + '.pyc') log.info( "Renaming file from [%s] to [%s]" % (path_old, path_new)) try: os.remove(path_new) except OSError: pass os.rename(path_old, path_new) def zip_safe(self): safe = getattr(self.distribution, 'zip_safe', None) if safe is not None: return safe log.warn("zip_safe flag not set; analyzing archive contents...") return analyze_egg(self.bdist_dir, self.stubs) def gen_header(self): return 'w' def copy_metadata_to(self, target_dir): "Copy metadata (egg info) to the target_dir" # normalize the path (so that a forward-slash in egg_info will # match using startswith below) norm_egg_info = os.path.normpath(self.egg_info) prefix = os.path.join(norm_egg_info, '') for path in self.ei_cmd.filelist.files: if path.startswith(prefix): target = os.path.join(target_dir, path[len(prefix):]) ensure_directory(target) self.copy_file(path, target) def get_ext_outputs(self): """Get a list of relative paths to C extensions in the output distro""" all_outputs = [] ext_outputs = [] paths = {self.bdist_dir: ''} for base, dirs, files in sorted_walk(self.bdist_dir): for filename in files: if os.path.splitext(filename)[1].lower() in NATIVE_EXTENSIONS: all_outputs.append(paths[base] + filename) for filename in dirs: paths[os.path.join(base, filename)] = (paths[base] + filename + '/') if self.distribution.has_ext_modules(): build_cmd = self.get_finalized_command('build_ext') for ext in build_cmd.extensions: if isinstance(ext, Library): continue fullname = build_cmd.get_ext_fullname(ext.name) filename = build_cmd.get_ext_filename(fullname) if not os.path.basename(filename).startswith('dl-'): if os.path.exists(os.path.join(self.bdist_dir, filename)): ext_outputs.append(filename) return all_outputs, ext_outputs NATIVE_EXTENSIONS = dict.fromkeys('.dll .so .dylib .pyd'.split()) def walk_egg(egg_dir): """Walk an unpacked egg's contents, skipping the metadata directory""" walker = sorted_walk(egg_dir) base, dirs, files = next(walker) if 'EGG-INFO' in dirs: dirs.remove('EGG-INFO') yield base, dirs, files for bdf in walker: yield bdf def analyze_egg(egg_dir, stubs): # check for existing flag in EGG-INFO for flag, fn in safety_flags.items(): if os.path.exists(os.path.join(egg_dir, 'EGG-INFO', fn)): return flag if not can_scan(): return False safe = True for base, dirs, files in walk_egg(egg_dir): for name in files: if name.endswith('.py') or name.endswith('.pyw'): continue elif name.endswith('.pyc') or name.endswith('.pyo'): # always scan, even if we already know we're not safe safe = scan_module(egg_dir, base, name, stubs) and safe return safe def write_safety_flag(egg_dir, safe): # Write or remove zip safety flag file(s) for flag, fn in safety_flags.items(): fn = os.path.join(egg_dir, fn) if os.path.exists(fn): if safe is None or bool(safe) != flag: os.unlink(fn) elif safe is not None and bool(safe) == flag: f = open(fn, 'wt') f.write('\n') f.close() safety_flags = { True: 'zip-safe', False: 'not-zip-safe', } def scan_module(egg_dir, base, name, stubs): """Check whether module possibly uses unsafe-for-zipfile stuff""" filename = os.path.join(base, name) if filename[:-1] in stubs: return True # Extension module pkg = base[len(egg_dir) + 1:].replace(os.sep, '.') module = pkg + (pkg and '.' or '') + os.path.splitext(name)[0] if sys.version_info < (3, 7): skip = 12 # skip magic & date & file size else: skip = 16 # skip magic & reserved? & date & file size f = open(filename, 'rb') f.read(skip) code = marshal.load(f) f.close() safe = True symbols = dict.fromkeys(iter_symbols(code)) for bad in ['__file__', '__path__']: if bad in symbols: log.warn("%s: module references %s", module, bad) safe = False if 'inspect' in symbols: for bad in [ 'getsource', 'getabsfile', 'getsourcefile', 'getfile' 'getsourcelines', 'findsource', 'getcomments', 'getframeinfo', 'getinnerframes', 'getouterframes', 'stack', 'trace' ]: if bad in symbols: log.warn("%s: module MAY be using inspect.%s", module, bad) safe = False return safe def iter_symbols(code): """Yield names and strings used by `code` and its nested code objects""" for name in code.co_names: yield name for const in code.co_consts: if isinstance(const, str): yield const elif isinstance(const, CodeType): for name in iter_symbols(const): yield name def can_scan(): if not sys.platform.startswith('java') and sys.platform != 'cli': # CPython, PyPy, etc. return True log.warn("Unable to analyze compiled code on this platform.") log.warn("Please ask the author to include a 'zip_safe'" " setting (either True or False) in the package's setup.py") # Attribute names of options for commands that might need to be convinced to # install to the egg build directory INSTALL_DIRECTORY_ATTRS = [ 'install_lib', 'install_dir', 'install_data', 'install_base' ] def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=True, mode='w'): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file. """ import zipfile mkpath(os.path.dirname(zip_filename), dry_run=dry_run) log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir) def visit(z, dirname, names): for name in names: path = os.path.normpath(os.path.join(dirname, name)) if os.path.isfile(path): p = path[len(base_dir) + 1:] if not dry_run: z.write(path, p) log.debug("adding '%s'", p) compression = zipfile.ZIP_DEFLATED if compress else zipfile.ZIP_STORED if not dry_run: z = zipfile.ZipFile(zip_filename, mode, compression=compression) for dirname, dirs, files in sorted_walk(base_dir): visit(z, dirname, files) z.close() else: for dirname, dirs, files in sorted_walk(base_dir): visit(None, dirname, files) return zip_filename PK{5Z!1??2Lib/site-packages/setuptools/command/build_clib.pynuW+Aimport distutils.command.build_clib as orig from distutils.errors import DistutilsSetupError from distutils import log from setuptools.dep_util import newer_pairwise_group class build_clib(orig.build_clib): """ Override the default build_clib behaviour to do the following: 1. Implement a rudimentary timestamp-based dependency system so 'compile()' doesn't run every time. 2. Add more keys to the 'build_info' dictionary: * obj_deps - specify dependencies for each object compiled. this should be a dictionary mapping a key with the source filename to a list of dependencies. Use an empty string for global dependencies. * cflags - specify a list of additional flags to pass to the compiler. """ def build_libraries(self, libraries): for (lib_name, build_info) in libraries: sources = build_info.get('sources') if sources is None or not isinstance(sources, (list, tuple)): raise DistutilsSetupError( "in 'libraries' option (library '%s'), " "'sources' must be present and must be " "a list of source filenames" % lib_name) sources = list(sources) log.info("building '%s' library", lib_name) # Make sure everything is the correct type. # obj_deps should be a dictionary of keys as sources # and a list/tuple of files that are its dependencies. obj_deps = build_info.get('obj_deps', dict()) if not isinstance(obj_deps, dict): raise DistutilsSetupError( "in 'libraries' option (library '%s'), " "'obj_deps' must be a dictionary of " "type 'source: list'" % lib_name) dependencies = [] # Get the global dependencies that are specified by the '' key. # These will go into every source's dependency list. global_deps = obj_deps.get('', list()) if not isinstance(global_deps, (list, tuple)): raise DistutilsSetupError( "in 'libraries' option (library '%s'), " "'obj_deps' must be a dictionary of " "type 'source: list'" % lib_name) # Build the list to be used by newer_pairwise_group # each source will be auto-added to its dependencies. for source in sources: src_deps = [source] src_deps.extend(global_deps) extra_deps = obj_deps.get(source, list()) if not isinstance(extra_deps, (list, tuple)): raise DistutilsSetupError( "in 'libraries' option (library '%s'), " "'obj_deps' must be a dictionary of " "type 'source: list'" % lib_name) src_deps.extend(extra_deps) dependencies.append(src_deps) expected_objects = self.compiler.object_filenames( sources, output_dir=self.build_temp, ) if ( newer_pairwise_group(dependencies, expected_objects) != ([], []) ): # First, compile the source code to object files in the library # directory. (This should probably change to putting object # files in a temporary build directory.) macros = build_info.get('macros') include_dirs = build_info.get('include_dirs') cflags = build_info.get('cflags') self.compiler.compile( sources, output_dir=self.build_temp, macros=macros, include_dirs=include_dirs, extra_postargs=cflags, debug=self.debug ) # Now "link" the object files together into a static library. # (On Unix at least, this isn't really linking -- it just # builds an archive. Whatever.) self.compiler.create_static_lib( expected_objects, lib_name, output_dir=self.build_clib, debug=self.debug ) PK{5ZY$Ve4 4 7Lib/site-packages/setuptools/command/install_scripts.pynuW+Afrom distutils import log import distutils.command.install_scripts as orig from distutils.errors import DistutilsModuleError import os import sys from pkg_resources import Distribution, PathMetadata from .._path import ensure_directory class install_scripts(orig.install_scripts): """Do normal script install, plus any egg_info wrapper scripts""" def initialize_options(self): orig.install_scripts.initialize_options(self) self.no_ep = False def run(self): import setuptools.command.easy_install as ei self.run_command("egg_info") if self.distribution.scripts: orig.install_scripts.run(self) # run first to set up self.outfiles else: self.outfiles = [] if self.no_ep: # don't install entry point scripts into .egg file! return ei_cmd = self.get_finalized_command("egg_info") dist = Distribution( ei_cmd.egg_base, PathMetadata(ei_cmd.egg_base, ei_cmd.egg_info), ei_cmd.egg_name, ei_cmd.egg_version, ) bs_cmd = self.get_finalized_command('build_scripts') exec_param = getattr(bs_cmd, 'executable', None) try: bw_cmd = self.get_finalized_command("bdist_wininst") is_wininst = getattr(bw_cmd, '_is_running', False) except (ImportError, DistutilsModuleError): is_wininst = False writer = ei.ScriptWriter if is_wininst: exec_param = "python.exe" writer = ei.WindowsScriptWriter if exec_param == sys.executable: # In case the path to the Python executable contains a space, wrap # it so it's not split up. exec_param = [exec_param] # resolve the writer to the environment writer = writer.best() cmd = writer.command_spec_class.best().from_param(exec_param) for args in writer.get_args(dist, cmd.as_header()): self.write_script(*args) def write_script(self, script_name, contents, mode="t", *ignored): """Write an executable file to the scripts directory""" from setuptools.command.easy_install import chmod, current_umask log.info("Installing %s script to %s", script_name, self.install_dir) target = os.path.join(self.install_dir, script_name) self.outfiles.append(target) mask = current_umask() if not self.dry_run: ensure_directory(target) f = open(target, "w" + mode) f.write(contents) f.close() chmod(target, 0o777 - mask) PK{5Zrs)))))) %%%,'He$$ ,,,&GU# $$U+++++,  333s )A  A PK{5ZAAJLib/site-packages/setuptools/command/__pycache__/dist_info.cpython-311.pycnuW+A b;ddZddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z ddl m Z ddlmZddlmZdd lmZGd d e Zd ed efdZded efdZdZdZdS)zD Create a dist_info directory As defined in the wheel specification N)contextmanager)cleandoc)Path)Command)log) packaging)SetuptoolsDeprecationWarningc\eZdZdZgdZddgZddiZdZdZe de d e fd Z d Z d S) dist_infozcreate a .dist-info directory))z egg-base=ezjdirectory containing .egg-info directories (default: top of the source tree) DEPRECATED: use --output-dir.)z output-dir=ozYdirectory inside of which the .dist-info will becreated (default: top of the source tree))tag-datedz0Add date stamp (e.g. 20050528) to version number)z tag-build=bz-Specify explicit tag to add to version number)no-dateDz"Don't include date stamp [default]) keep-egg-infoNz,*TRANSITIONAL* will be removed in the futurerrrchd|_d|_d|_d|_d|_d|_d|_dS)NF)egg_base output_dirname dist_info_dirtag_date tag_build keep_egg_info)selfs kE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/dist_info.pyinitialize_optionszdist_info.initialize_options(s;  ! "c|jr/d}tj|t|jp|j|_|j}|jp tj}t|jp||_| d}t|j|_|j r |j |_ n |j |_ |j r |j |_ n |j |_ |||_t!|}t%|}|d||_tj|j|jd|_dS)NzA--egg-base is deprecated for dist_info command. Use --output-dir.egg_info-z .dist-info)rwarningswarnr r distributionsrc_rootoscurdirrreinitialize_commandstrrrfinalize_optionsr!_safeget_name_version get_versionrpathjoinr)rmsgdist project_dirr!rversions rr+zdist_info.finalize_options1sN = ?UC M#; < < <"m>tDO m0ry t=+>>,,Z8800 = . $ H  $-DM > 0!%H  %/DN!!###  T]]__%%4++--..''g'' W\\$/di;S;S;STTrdir_path requires_bkpc#K|r|d}t|dt||dd dVt|dtj||dS#t|dtj||wxYwdVdS)Nz.__bkp__T) ignore_errors) dirs_exist_oksymlinks)_rm_copyshutilmove)rr6r7bkp_names r_maybe_bkp_dirzdist_info._maybe_bkp_dirPs  ",,,H  - - - - (HD4 H H H H 0HD1111 Hh/////HD1111 Hh//// EEEEEs A(Bc4|jdd|j|jj}tj|s Jdtjd tj |j | d}| ||j5|||j ddddS#1swxYwYdS)NT)parentsexist_okz&.egg-info dir should have been createdz creating '{}' bdist_wheel)rmkdirr!runr'r0isdirrinfoformatabspathrget_finalized_commandrAregg2dist)r egg_info_dirrEs rrGz dist_info.run^sL dT::: }- w}}\**TT,TTTT ''8J(K(KLLMMM00??  t/A B B C C  t/A B B B C C C C C C C C C C C C C C C C C Cs$D  DDN)__name__ __module__ __qualname__ description user_optionsboolean_options negative_optrr+rr*boolrArGrrr r s1K   L"?3Oz*L###UUU> s $   ^  C C C C Crr componentreturnc.tjdd|S)zAEscape a component used to form a wheel name according to PEP 491z [^\w\d.]+_)resub)rXs rr,r,ls 6,Y / //rr5c||dd} ttj|ddS#tjj$rOd|d|d}t jt|t| dcYSwxYw)z0Convert an arbitrary string to a version string. .r"r[zInvalid version: zk. !! ################### # Invalid version # ################### z is not valid according to PEP 440. Please make sure specify a valid version for your package. Also note that future releases of setuptools may halt the build process if an invalid version is given. !! ) replacer*rr5VersionInvalidVersionr#r$rr,strip)r5vr2s rr.r.qsS!!A#9$,,Q//0088cBBB   + # # #  G         hsmm$$$Qxx~~c""""" #s?AA B;:B;c ltj|rtj|fi|dSdS)N)r'r0rHr>rmtree)dir_nameoptss rr<r<s@ w}}X( h''$'''''((rc xtjdkr|ddtj||fi|dS)N)r:)sys version_infopopr>copytree)srcdstris rr=r=sD &   $''' OC%%%%%%%r)__doc__r'r\r>rmr# contextlibrinspectrpathlibrdistutils.corer distutilsrsetuptools.externrsetuptools._deprecation_warningr r r*r,r.r<r=rWrrr{sc  %%%%%%""""""''''''HHHHHHTCTCTCTCTCTCTCTCn0S0S0000 #c#c####*((( &&&&&rPK{5ZooGLib/site-packages/setuptools/command/__pycache__/rotate.cpython-311.pycnuW+A b;dPbddlmZddlmZddlmZddlZddlZddlm Z Gdde Z dS)) convert_path)log)DistutilsOptionErrorN)Commandc4eZdZdZdZgdZgZdZdZdZ dS)rotatezDelete older distributionsz2delete older distributions, keeping N newest files))zmatch=mzpatterns to match (required))z dist-dir=dz%directory where the distributions are)zkeep=kz(number of matching distributions to keepc0d|_d|_d|_dS)N)matchdist_dirkeep)selfs hE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/rotate.pyinitialize_optionszrotate.initialize_optionss   c|jtd|jtd t|j|_n"#t$r}td|d}~wwxYwt |jt r)d|jdD|_|dddS)NzQMust specify one or more (comma-separated) match patterns (e.g. '.zip' or '.egg')z$Must specify number of files to keepz--keep must be an integercPg|]#}t|$S)rstrip).0ps r z+rotate.finalize_options..(s5,- QWWYY''r,bdist)rr) r rrint ValueError isinstancestrsplitset_undefined_options)res rfinalize_optionszrotate.finalize_optionss : &*  9 &'MNN N KDIDII K K K&'BCC J K dj# & & 151A1A#1F1FDJ ""7,DEEEEEsA A'A""A'c|dddlm}|jD]"}|jdz|z}|t j|j|}d|D}| | tj dt||||jd}|D]i\}}tj d||jsHt j|rt#j|Ut j|j$dS)Negg_infor)glob*cPg|]#}tj||f$Sr)ospathgetmtime)rfs rrzrotate.run..4s-===!bg&&q))1-===rz%d file(s) matching %sz Deleting %s) run_commandr'r distributionget_namer*r+joinrsortreverserinfolenrdry_runisdirshutilrmtreeunlink)rr'patternfilestr-s rrunz rotate.run-sE $$$z % %G'0022S87BGDdmW==>>E==u===E JJLLL MMOOO H-s5zz7 C C C$)**%E % %A***|%w}}Q''% a(((( !  % % %rN) __name__ __module__ __qualname____doc__ description user_optionsboolean_optionsrr$r>rrrrr sg$$FKL O FFF$%%%%%rr) distutils.utilr distutilsrdistutils.errorsrr*r8 setuptoolsrrrrrrJs''''''111111 6%6%6%6%6%W6%6%6%6%6%rPK{5Z,myyKLib/site-packages/setuptools/command/__pycache__/py36compat.cpython-311.pycnuW+A b;dRddlZddlmZddlmZddlmZGddZeejdrGddZdSdS) N)glob) convert_path)sdistcXeZdZdZdZedZdZdZdZ dZ dZ d Z d Z d S) sdist_add_defaultsz Mix-in providing forward-compatibility for functionality as found in distutils on Python 3.7. Do not edit the code in this class except to update functionality as implemented in distutils. Instead, override in the subclass. c|||||||dS)a9Add all the default files to self.filelist: - README or README.txt - setup.py - test/test*.py - all pure Python modules mentioned in setup script - all files pointed by package_data (build_py) - all files defined in data_files. - all files defined as scripts. - all C sources listed as part of extensions or C libraries in the setup script (doesn't catch C headers!) Warns if (README or README.txt) or setup.py are missing; everything else is optional. N)_add_defaults_standards_add_defaults_optional_add_defaults_python_add_defaults_data_files_add_defaults_ext_add_defaults_c_libs_add_defaults_scripts)selfs lE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/py36compat.py add_defaultszsdist_add_defaults.add_defaultss $$&&& ##%%% !!### %%'''     !!### ""$$$$$ctj|sdStj|}tj|\}}|tj|vS)z Case-sensitive path existence check >>> sdist_add_defaults._cs_path_exists(__file__) True >>> sdist_add_defaults._cs_path_exists(__file__.upper()) False F)ospathexistsabspathsplitlistdir)fspathr directoryfilenames r_cs_path_existsz"sdist_add_defaults._cs_path_exists&s_w~~f%% 5'//&)) gmmG44 82:i0000rc|j|jjg}|D]}t|trj|}d}|D]5}||rd}|j|n6|s+|dd |z||r|j||d|zdS)NFTz,standard file not found: should have one of z, zstandard file '%s' not found) READMES distribution script_name isinstancetuplerfilelistappendwarnjoin)r standardsfnaltsgot_its rr z*sdist_add_defaults._add_defaults_standards7s\4#4#@A  C CB"e$$ CB++B//!% ,,R000 /IIL"iioo.///''++CM((,,,,II4==99E M  ' ' ' ' ( (rcR|d}|jr,|j||jD]D\}}}}|D]:}|jtj ||;EdS)Nbuild_py) get_finalized_commandr!has_pure_modulesr%r0get_source_files data_filesr&rrr()rr5pkgsrc_dir build_dir filenamesrs rr z'sdist_add_defaults._add_defaults_pythonRs--j99   - - / / > M !:!:!>!,,4 M003334 4 4 4 4rc|jrC|d}|j|dSdS)N build_ext)r!has_ext_modulesr6r%r0r8)rrEs rr z$sdist_add_defaults._add_defaults_extss^   , , . . ?22;??I M !;!;!=!= > > > > > ? ?rc|jrC|d}|j|dSdS)N build_clib)r!has_c_librariesr6r%r0r8)rrHs rrz'sdist_add_defaults._add_defaults_c_libsxsa   , , . . @33LAAJ M !!> ? ? ? ? ? @ @rc|jrC|d}|j|dSdS)N build_scripts)r! has_scriptsr6r%r0r8)rrKs rrz(sdist_add_defaults._add_defaults_scripts}sa   ( ( * * C 66GGM M !?!?!A!A B B B B B C CrN)__name__ __module__ __qualname____doc__r staticmethodrr r r r r rrrrrrs%%%,11\1 CCC*((( FFF 444"??? @@@ CCCCCrrr ceZdZdS)rN)rMrNrOrRrrrrs r)rrdistutils.utilrdistutils.commandrrhasattrrRrrrWs ''''''######yCyCyCyCyCyCyCyCx 75;122             rPK{5Z@{{ILib/site-packages/setuptools/command/__pycache__/register.cpython-311.pycnuW+A b;dVddlmZddlmcmZddlmZGddejZdS))logN)RemovedCommandErrorceZdZdZdZdS)registerz+Formerly used to register packages on PyPI.cjd}|d|ztjt|)Nz]The register command has been removed, use twine to upload instead (https://pypi.org/p/twine)zERROR: )announcerERRORr)selfmsgs jE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/register.pyrunz register.run s6 3 i#osy111!#&&&N)__name__ __module__ __qualname____doc__r rr rrs)55'''''rr) distutilsrdistutils.command.registercommandrorigsetuptools.errorsrrrr rsz)))))))))111111 ' ' ' ' 't} ' ' ' ' 'rPK{5ZmGgOLib/site-packages/setuptools/command/__pycache__/editable_wheel.cpython-311.pycnuW+A b;dy dZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z ddl m Z ddlmZddlmZddlmZdd lmZmZmZmZmZmZmZmZmZmZdd lm Z m!Z!m"Z"m#Z#dd l$m%Z&dd l'm(Z(dd l)m*Z*erddl+m,Z,ej-dkrddlm.Z.nerddl/m.Z.nddl0m1Z.ee2efZ3ede3Z4ej5e6Z7Gdde Z8dZ9dZ:Gdde Z;Gdde.Z<GddZ=Gdde=Z>Gd d!Z?d"ed#e@fd$ZAd%ee2d&ee2e2fd'ed#e@fd(ZBd)ZCd*e*d#ee2fd+ZDd*e*d#ee2fd,ZEd%ee2d&ee2e2fd-e3d#ee2e2ffd.ZFd/e3d#e2fd0ZGd1ee2e2fd#ee2fd2ZHd%ee2d1ee2e2fd#eee2ee2ffd3ZId1ee2e2fd#ee2e2ffd4ZJd5e2d6e2d7e2d8e2d#e@f d9ZKd:e3d#e2fd;ZLde2d#e2fd?ZNGd@dAe#jOZPdBZQd>e2dCee2e2fdDee2ee2fd#e2fdEZRGdFdGeSZTGdHdIe"jUZVdS)Ja Create a wheel that, when installed, will make the source package 'editable' (add it to the interpreter's path, including metadata) per PEP 660. Replaces 'setup.py develop'. .. note:: One of the mechanisms briefly mentioned in PEP 660 to implement editable installs is to create a separated directory inside ``build`` and use a .pth file to point to that directory. In the context of this file such directory is referred as *auxiliary build directory* or ``auxiliary_dir``. N)suppress)Enum)cleandoc)chain)Path)TemporaryDirectory) TYPE_CHECKINGDictIterableIteratorListMappingOptionalTupleTypeVarUnion)CommandSetuptoolsDeprecationWarningerrors namespaces)build_pyfind_package_path) Distribution WheelFile))Protocol)ABC_P)boundcJeZdZdZdZdZdZedee ddfdZ dS) _EditableModea Possible editable installation modes: `lenient` (new files automatically added to the package - DEFAULT); `strict` (requires a new installation when files are added/removed); or `compat` (attempts to emulate `python setup.py develop` - DEPRECATED). strictlenientcompatmodereturnc|s tjS|}|tjvrt jd|d|dkrd}t j|tt|S)NzInvalid editable mode: z. Try: 'strict'.COMPATax The 'compat' editable mode is transitional and will be removed in future versions of `setuptools`. Please adapt your code accordingly to use either the 'strict' or the 'lenient' modes. For more information, please check: https://setuptools.pypa.io/en/latest/userguide/development_mode.html ) r$LENIENTupper __members__r OptionErrorwarningswarnr)clsr(_modemsgs pE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/editable_wheel.pyconvertz_EditableMode.convertGs} ) ( (   1 1 1$%Wt%W%W%WXX X H  C M#; < < <U##N) __name__ __module__ __qualname____doc__STRICTr,r+ classmethodrstrr6r7r5r$r$;s_FG F$8C=$_$$$[$$$r7r$zU New or renamed files may not be automatically picked up without a new installation. zt Options like `package-data`, `include/exclude-package-data` or `packages.find.exclude/include` may have no effect. cVeZdZdZdZddddeejpdfgZdZd Z d Z d Z d Z d e efdZdedededefdZdZd eeeeeefffdZdedededed eeeeeefff dZdZdefdZdZdefdZdededed dfd ZdS)!editable_wheelzkBuild 'editable' wheel for development. (This command is reserved for internal use of setuptools). z!create a PEP 660 'editable' wheel)z dist-dir=dz-directory to put final built distributions in)zdist-info-dir=Iz(path to a pre-build .dist-info directoryzmode=Nc>d|_d|_d|_d|_dSN)dist_dir dist_info_dir project_dirr(selfs r5initialize_optionsz!editable_wheel.initialize_optionsvs$ ! r7c|j}|jp tj|_|jpi|_t |jp$tj |jd|_dS)Ndist) distributionsrc_rootoscurdirrI package_dirrrGpathjoin)rKrNs r5finalize_optionszeditable_wheel.finalize_options|sX =5BI+1rT]Tbgll4;KV.T.TUU r7c |jd||d|d}||j||dS#t$r<}tj d}tj t||d}~wwxYw)NT)exist_ok bdist_wheela Support for editable installs via PEP 660 was recently introduced in `setuptools`. If you are seeing this error, please report to: https://github.com/pypa/setuptools/issues Meanwhile you can try the legacy behavior by setting an environment variable and trying to install again: SETUPTOOLS_ENABLE_FEATURES="legacy-editable" )rGmkdir_ensure_dist_inforeinitialize_commandget_finalized_commandwrite_wheelfilerH_create_wheel_file Exception traceback print_excr InternalErrorr)rKrYexr4s r5runzeditable_wheel.runs > M    . . .  " " $ $ $  % %m 4 4 444]CCK  ' '(: ; ; ;  # #K 0 0 0 0 0 > > >   ! ! ! C&x}}552 = >sBB C7C  Ccf|jW|d}|j|_|||j|_dSt |jdsJt|jd sJdS)N dist_infoz .dist-infoMETADATA) rHr\rG output_dirensure_finalizedrer>endswithrexists)rKrgs r5r[z editable_wheel._ensure_dist_infos   %11+>>I#'=I  & & ( ( ( MMOOO!*!8D   t)**33LAA A A A*J77>>@@ @ @ @ @ @r7c|j}|jsdSt|j|jdd}t||||}|dS)NrD.) rOnamespace_packagesrrIrSgetresolve_NamespaceInstallerinstall_namespaces)rKinstallation_dir pth_prefixrNrP installers r5_install_namespacesz"editable_wheel._install_namespacessw &  F($*:*>*>r3*G*GHHPPRR'.> HUU $$&&&&&r7r)c|jrt|jjn t}tt|d}t |dS)Nz *.egg-info)rHrparentmapr>globnext)rK parent_dir candidatess r5_find_egg_info_dirz!editable_wheel._find_egg_info_dirsT8<8JVT$,--44PTPVPV jool;;<< J%%%r7nameunpacked_wheel build_libtmp_dirc|j}t|}t|}tt||dd}tt||dd}tt||dd} |dd} t|| _d| _|dd} |d d} |x| _x| _| _|x| _ x| _ | _ | x| _ | _ || _|| _|d } d| _t|| _|d }d |_||_|| | d S)aConfigure commands to behave in the following ways: - Build commands can write to ``build_lib`` if they really want to... (but this folder is expected to be ignored and modules are expected to live in the project directory...) - Binary extensions should be built in-place (editable_mode = True) - Data/header/script files are not part of the "editable" specification so they are written directly to the unpacked_wheel directory. z.datadataheadersscriptsegg_infoT)reinit_subcommandsbuildinstallinstall_scriptsrFN)rOr>rr\egg_baseignore_egg_info_in_manifest build_platlib build_purelibrinstall_purelibinstall_platlib install_libr build_scriptsinstall_headers install_dataget_command_objno_ep build_tempcompilerexisting_egg_info_dir_set_editable_moderj)rKrrrrrNwheelrrrrrrrrs r5_configure_buildzeditable_wheel._configure_builds N## NN 44??@@d>d>>>9EEFFd>d>>>9EEFF,,ZD,QQLL/3,))'d)KK++I$+OOFOOOe1EORWWW'"9G>>g~r7 dist_namec|||||||\}}|d|d|d||fS)Nrrr)r_run_build_subcommandsr _run_install)rKrrrrrrs r5_run_build_commandsz"editable_wheel._run_build_commandss iGLLL ##%%%4466w )$$$ )$$$ &!!!g~r7c|d}|D]`}||}|dkr.t|tkr||K||adS)a} Issue #3501 indicates that some plugins/customizations might rely on: 1. ``build_py`` not running 2. ``build_py`` always copying files to ``build_lib`` However both these assumptions may be false in editable_wheel. This method implements a temporary workaround to support the ecosystem while the implementations catch up. rrN)r]rtype build_py_cls _safely_run run_command)rKrrrs r5rz%editable_wheel._run_build_subcommands s33G<<**,, ' 'D,,T22Cz!!d3ii<&?&?  &&&&  &&&&  ' 'r7rc ||S#t$r<tjd|d|d}t j|t dYdSwxYw)Nz If you are seeing this warning it is very likely that a setuptools plugin or customization overrides the `z` command, without taking into consideration how editable installs run build steps starting from v64.0.0. Plugin authors and developers relying on custom build steps are encouraged to update their `aO` implementation considering the information in https://setuptools.pypa.io/en/latest/userguide/extension.html about editable installs. For the time being `setuptools` will silence this error and ignore the faulty command, but this behaviour will change in future versions. ) stacklevel)rr`ra format_excr0r1r)rKrr4s r5rzeditable_wheel._safely_run"s K##H-- - K K K +--  4<  '   C M#; J J J J J J J KsAAAc ddlm}|d}|j}d|}d}|d|d|d}t |j|}|r| t|} td} td } | 5} | 5} | 5}t | t |j j}tj |j ||| |j||| | |\}}|||| }|5||d 5}|||||| dddn #1swxYwYdddn #1swxYwYdddn #1swxYwYdddn #1swxYwYdddn #1swxYwY|S) Nrrrg-z 0.editablez.whl)suffixz .build-libz .build-tempw)wheel.wheelfilerr]rrUget_tagrrGrlunlinkrrHshutilcopytreerwr_select_strategy write_files)rKrYrrgrtag build_tag archive_name wheel_pathrr build_tmpunpackedlibtmpunpacked_dist_inforrstrategy wheel_objs r5r_z!editable_wheel._create_wheel_file6sJ------..{;; N hh{**,,-- #;;i;;#;;; $-66           +<@@@&l;;; &m<<<  0x 0c9 0!%hT5G0H0H0M!N!N  OD.0B C C C  $ $Xy~ > > >!55i3PSTTNE7,,YSAAH 0 099Z55 0E7333%%h/// 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0sG5 G BG F0 *#F F0 FF0 F!F0 $ G0F4 4G7F4 8G; GG GG G G5G" "G5%G" &G55G9<G9categoryct|jd|d}|rB|r:td|d|d|dSdSdS)Nhas_z Installing z as non editableinstall_)getattrrO_loggerinfor)rKr has_categorys r5rzeditable_wheel._run_installRst02C2C2CTJJ  4LLNN 4 LLAxAAA B B B   222 3 3 3 3 3 4 4 4 4r7rEditableStrategyc\d|d|}t|j}t|j}|tjur:t t|jd|}t|j|||St|j}t||j |} |tj u} t|j dhkr| s| r@|j dd} t|j|t|| gSt!|j|S)zDDecides which strategy to use to implement an editable installation. __editable__.rrrDrn)rrIr$r6r(r< _empty_dir _LinkTreerO_find_packages_simple_layoutrSr+setrp _StaticPth_TopLevelFinder) rKrrr build_namerIr( auxiliary_dirpackageshas_simple_layoutis_compat_modesrc_dirs r5rzeditable_wheel._select_strategyXs#2T11C11 4+,, $$TY// =' ' '&tD, (. (&**2s33Gd/['8R8R7STT Tt0$777r7)r8r9r:r; descriptionrr$ user_optionsrLrVrer[rwrr>r_Pathrrrr r rrrrr_rrr?r7r5rArAis6K LK $!6!<"==>L  VVV >>>4 A A A'''&HSM&&&& 0#0#).0#;@0#KP0#0#0#0#d # # # d3ic3h.G(H      .3 @E PU  tCy$sCx.( )    ''',KCKKKK(84S4444 888 8  888888r7rAcJeZdZdddeedeeeffdZdZdZdS) rrrrrcdSrFr?)rKrrrs r5__call__zEditableStrategy.__call__t r7cdSrFr?rJs r5 __enter__zEditableStrategy.__enter__wrr7cdSrFr?rK _exc_type _exc_value _tracebacks r5__exit__zEditableStrategy.__exit__zrr7N) r8r9r:r r>r rrrr?r7r5rrssh k $s) d3PS8n            r7rcjeZdZdededeefdZdddeedeeeffd Z d Z d Z d S) rrNr path_entriesc0||_||_||_dSrF)rNrr)rKrNrrs r5__init__z_StaticPth.__init__s  (r7rrrrcdd|jD}t|dd}|d|jd|dS)N c3XK|]%}t|V&dSrF)r>rq).0ps r5 z&_StaticPth.__call__..s2II!S--IIIIIIr7utf-8r.pth)rUrbyteswritestrr)rKrrrentriescontentss r5rz_StaticPth.__call__sb))IIt7HIIIJJG11 6ty666AAAAAr7cdtttj|jd}t |tz|S)Nz_ Editable install will be performed using .pth file to extend `sys.path` with: z )listrzrQfspathrrwarning_LENIENT_WARNINGrKr4s r5rz_StaticPth.__enter__sQ c")T.// 0 0    ../// r7cdSrFr?rs r5rz_StaticPth.__exit__rr7N) r8r9r:rr>r rrr rrrr?r7r5rr~s)\))DJ)))) BkB$s)Bd3PS8nBBBB      r7rceZdZdZdedededeffd Zddd eed e eefffd Z d ed e efdZ ddedefdZ dZdZdZxZS)ra` Creates a ``.pth`` file that points to a link tree in the ``auxiliary_dir``. This strategy will only link files (not dirs), so it can be implemented in any OS, even if that means using hardlinks instead of symlinks. By collocating ``auxiliary_dir`` and the original source code, limitations with hardlinks should be avoided. rNrrrc t||_t||_|dj|_t|||jgdS)Nr) rrrqrr copy_file_filesuperr)rKrNrrr __class__s r5rz_LinkTree.__init__sn "-00i0022))*55?  td&8%9:::::r7rrrrcz|||t|||dSrF) _create_linksrr)rKrrrrs r5rz_LinkTree.__call__s; 5'*** w/////r7filer)c*tt5t||j}t |tj dcdddS#1swxYwYdS)N/) r ValueErrorrrq relative_torr>replacerQsep)rKrrTs r5_normalize_outputz_LinkTree._normalize_outputs j ! ! 2 2::%%''33DNCCDt99$$RVS11 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2tsA&BB B Nrelative_outputsrc_filec|j|z }|js|jd||||dS)NT)parentslink)rryis_dirrZr)rKr r!r%dests r5 _create_filez_LinkTree._create_files\!O3{!!## , K  d  + + + 8T -----r7cjddtjrdnd}fd|D}|dd|D]3}|}|r||vr||4|D]\}}|||dS)NT)r#rXsymhardcBi|]\}}||Sr?)r)rkvrKs r5 z+_LinkTree._create_links..s=   1  " "1 % %q   r7r$)rrZ_can_symlink_filesitemspoprr()rKoutputsoutput_mapping link_typemappingsoutputrelativesrcs` r5rz_LinkTree._create_linkss    ===/0BCCOEE     &,,..     T4    4 4F--f55H 4HH44!!(F333%^^-- = =MHc   h)  < < < < = =r7cNd}t|tz|S)Nz=Strict editable install will be performed using a link tree. )rr _STRICT_WARNINGrs r5rz_LinkTree.__enter__s#No-... r7cPd|jd}tj|tdS)Nz\ Strict editable installation performed using the auxiliary directory: z Please be careful to not remove this directory, otherwise you might not be able to import/use your package. )rr0r1InformationOnlyrKrrrr4s r5rz_LinkTree.__exit__s8       c?+++++r7rF)r8r9r:r;rr>rrr r rrrr(rrr __classcell__)rs@r5rrs% ;  ; ; ; ; ; ; ; ; ;0k0$s)0d3PS8n000000chsm..C.3.... ===" ,,,,,,,r7rcZeZdZdedefdZdddeedeeeffdZd Z d Z d S) rrNrc"||_||_dSrF)rNr)rKrNrs r5rz_TopLevelFinder.__init__s  r7rrrrc |jjp tj}t t |jt |j}|jjpi}t|||}tt t|jj pg|dt|D}d|j d} t| } tt!| ||d} || d| td| d| dd} |d|j d | dS) Nc3K|]}|gfV dSrFr?)rnss r5rz+_TopLevelFinder.__call__..s& @ @"b"X @ @ @ @ @ @r7rz.finderrz.pyzimport z; z .install()r)rNrPrQrRrr_find_top_level_modulesrS_find_package_rootsdict_find_namespacesr_find_virtual_namespacesr_make_identifierr_finder_templater) rKrrrrP top_levelrSroots namespaces_rfindercontents r5rz_TopLevelFinder.__call__sE9%2.335LTY5W5WXX i+1r #I{HEE,0 TY/52u = = @ @ 8 ? ? @ @ @2 2 - - 2ty111!$''(ukBBGLL &~~~w///>&>>F>>>HH 6ty666@@@@@r7cNd}t|tz|S)Nz=Editable install will be performed using a meta path finder. )rr r rs r5rz_TopLevelFinder.__enter__s$N../// r7c>d}tj|tdS)Nz Please be careful with folders in your working directory with the same name as your package as they may take precedence during imports. )r0r1r=r>s r5rz_TopLevelFinder.__exit__s#   c?+++++r7N) r8r9r:rr>rr r rrrr?r7r5rrs\AkA$s)Ad3PS8nAAAA& ,,,,,r7rbase_dirr)ctt|5}t|dt|d}}|ddt t tt5tj ||| r3| ddkr dddddddSdddn #1swxYwY tj ||n$#t$r}d}t||d}~wwxYw dddd S#1swxYwYdS) N)dirz file1.txtz file2.txtfile1r)encodingTzFile system does not seem to support either symlinks or hard links. Strict editable installs require one of them to be supported.F)rr>rqr write_textrAttributeErrorNotImplementedErrorOSErrorrQsymlink is_symlink read_textr%r`LinksNotSupported)rSrpath1path2rdr4s r5r0r0s H$4$4$6$6 7 7 8 8 8CC--tC/E/Eu 7333 n&97 C C   Jue $ $ $!! eoowo&G&G7&R&R                       1 GE5 ! ! ! ! 1 1 1P $C((b 0  1 !saAEAC1 E% E1C5 5E8C5 9E=DE D4D//D44EE  E rrSrIc"fd|D}|stidhfvStjd|Dt fd|DS)a[Return ``True`` if: - all packages are contained by the same parent directory, **and** - all packages become importable if the parent directory is added to ``sys.path``. >>> _simple_layout(['a'], {"": "src"}, "/tmp/myproj") True >>> _simple_layout(['a', 'a.b'], {"": "src"}, "/tmp/myproj") True >>> _simple_layout(['a', 'a.b'], {}, "/tmp/myproj") True >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"": "src"}, "/tmp/myproj") True >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "a", "b": "b"}, ".") True >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a", "b": "_b"}, ".") False >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a"}, "/tmp/myproj") False >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a.a1.a2": "_a2"}, ".") False >>> _simple_layout(['a', 'a.b'], {"": "src", "a.b": "_ab"}, "/tmp/myproj") False >>> # Special cases, no packages yet: >>> _simple_layout([], {"": "src"}, "/tmp/myproj") True >>> _simple_layout([], {"a": "_a", "": "src"}, "/tmp/myproj") False c4i|]}|t|Sr?r)rpkgrSrIs r5r/z"_simple_layout..4s8  sK = =r7rDc4g|]\}}t||Sr?) _parent_path)rr-r.s r5 z"_simple_layout..:s& O O O1a!3!3 O O Or7c 3K|]E\}}ttg|dRt|kVFdSrnN)_normalize_pathrsplit)rkeyvaluerys r5rz!_simple_layout..;sj C V5ciinn55566/%:P:PPr7)rrQrT commonpathr1all)rrSrIlayoutrys `` @r5rrs>F .;B:-- W   O O  O O O P PF  ,,..  r7c||r|dt| n|}|dtjzS)a7Infer the parent path containing a package, that if added to ``sys.path`` would allow importing that package. When ``pkg`` is directly mapped into a directory with a different name, return its own path. >>> _parent_path("a", "src/a") 'src' >>> _parent_path("b", "src/c") 'src/c' Nr)rklenrstriprQr)rdpkg_pathrys r5rfrfAsJ&.%6%6s%;%; IXjCyj ! !F ==rv & &&r7rNc#Kt|jpgEd{V|jpg}d|D}|jr |jVn|jpg}|d|Dz }|D]}|d\}}}|V dS)Ncg|]}d|v| Srnr?rmods r5rgz"_find_packages..Ss>>>c3#::c:::r7c.g|]}d|jv |jSrwrrxs r5rgz"_find_packages..Xs!HHHa#--16---r7rn)iterr py_modules ext_package ext_modules rpartition)rNrnested_modulesrmodulepackage_s r5rrOsDM'R(((((((((&BJ>>Z>>>N I&," HH;HHHH ))#.. A r7c#K|jpg}d|DEd{V|js|jpg}d|DEd{VdSdS)Nc3"K|] }d|v|V dSrir?rxs r5rz*_find_top_level_modules..as&<<S^^^^^^<.es0EEq3af3D3DAF3D3D3D3DEEr7)rrr)rNrrs r5rErE_s&BJ<.ms@!!!  ^-c;II J J!!!r7)sorted_remove_nested)rrSrP pkg_rootss `` r5rFrFhsI !!!!!(##!!!I ) $ $$r7rTct|}|j}|r!t|St||jz S)z(Works for packages and top-level modules)rryrlr>rqr)rTpath_rys r5rrusY JJE \F ||~~25==??###6>>##ej0111r7rc #>K|D]}d|vr|d}tt|dz ddD]Y}d|d|}t t ||d}|r||vr|VZdS)a8By carefully designing ``package_dir``, it is possible to implement the logical structure of PEP 420 in a package without the corresponding directories. Moreover a parent package can be purposefully/accidentally skipped in the discovery phase (e.g. ``find_packages(include=["mypkg.*"])``, when ``mypkg.foo`` is included by ``mypkg`` itself is not). We consider this case to also be a virtual namespace (ignoring the original directory) to emulate a non-editable installation. This function will try to find these kinds of namespaces. rnrNrD)rkrangerrrUrrrl)rrdpartsi partial_namerTs r5rIrIs # # c>>  #s5zzA~q"-- # #A88E"1"I..L), 2FFGGD;;== #L $A$A""""  # # #r7c#K|D]]}t||d}t|r)t|ds||gfV^dS)NrDz __init__.py)rrrl)rrrdrTs r5rHrHs|   i44 ::     tD-'@'@'G'G'I'I -     r7c:t|}tt|D]H\t fd|Dr|I|S)Nc3NK|]\}}|kot||V dSrF) _is_nested)rother other_pathrTrds r5rz!_remove_nested..sR  !z 5L EZT5*EE      r7)rGcopyreversedr r1anyr2)rr7rTrds @@r5rrs ).."" # #Fd9??#4#45566 T      %.__%6%6       JJsOOO Mr7rdrtry parent_pathct|}||dddd}||o|tt |g|RkS)a Return ``True`` if ``pkg`` is nested inside ``parent`` both logically and in the file system. >>> _is_nested("a.b", "path/a/b", "a", "path/a") True >>> _is_nested("a.b", "path/a/b", "a", "otherpath/a") False >>> _is_nested("a.b", "path/a/b", "c", "path/c") False >>> _is_nested("a.a", "path/a/a", "a", "path/a") True >>> _is_nested("b.a", "path/b/a", "a", "path/a") False rDrrn)rjrstriprk startswithr)rdrtryr norm_pkg_pathrests r5rrs|$H--M ;;vr1 % % + +C 0 0 6 6s ; ;D v G _T+-E-E-E-EFF Fr7filenamectjdkrtj|n|}tjtjtj|S)z1Normalize a file/dir name for comparison purposescygwin)sysplatformrQrTabspathnormcaserealpathnormpath)rrs r5rjrjs^), (@(@27??8 $ $ $hD 7  BG,,RW-=-=d-C-CDD E EEr7dir_cZtj|dtj||S)zFCreate a directory ensured to be empty. Existing files may be removed.T) ignore_errors)rrmtreerQmakedirs)rs r5rrs, M$d++++K Kr7rc^tjdd|}|sJ|S)zMake a string safe to be used as Python identifier. >>> _make_identifier("12abc") '_12abc' >>> _make_identifier("__editable__.myns.pkg-78.9.3_local") '__editable___myns_pkg_78_9_3_local' z \W|^(?=\d)r)resub isidentifier)rsafes r5rJrJs4 6-d + +D      Kr7c eZdZdZdZdZdS)rrcZ||_||_||_||_g|_d|_dS)NF)rOrPrt editable_namer3dry_run)rKrOrtrrPs r5rz_NamespaceInstaller.__init__s3(  0*  r7cVtj|j|jS)zInstallation target.)rQrTrUrtrrJs r5 _get_targetz_NamespaceInstaller._get_targetsw||D143EFFFr7cDtt|jS)z1Where the modules/packages should be loaded from.)reprr>rPrJs r5 _get_rootz_NamespaceInstaller._get_rootsC &&'''r7N)r8r9r:rrrr?r7r5rrrrsDGGG(((((r7rra< import sys from importlib.machinery import ModuleSpec from importlib.machinery import all_suffixes as module_suffixes from importlib.util import spec_from_file_location from itertools import chain from pathlib import Path MAPPING = {mapping!r} NAMESPACES = {namespaces!r} PATH_PLACEHOLDER = {name!r} + ".__path_hook__" class _EditableFinder: # MetaPathFinder @classmethod def find_spec(cls, fullname, path=None, target=None): for pkg, pkg_path in reversed(list(MAPPING.items())): if fullname == pkg or fullname.startswith(f"{{pkg}}."): rest = fullname.replace(pkg, "", 1).strip(".").split(".") return cls._find_spec(fullname, Path(pkg_path, *rest)) return None @classmethod def _find_spec(cls, fullname, candidate_path): init = candidate_path / "__init__.py" candidates = (candidate_path.with_suffix(x) for x in module_suffixes()) for candidate in chain([init], candidates): if candidate.exists(): return spec_from_file_location(fullname, candidate) class _EditableNamespaceFinder: # PathEntryFinder @classmethod def _path_hook(cls, path): if path == PATH_PLACEHOLDER: return cls raise ImportError @classmethod def _paths(cls, fullname): # Ensure __path__ is not empty for the spec to be considered a namespace. return NAMESPACES[fullname] or MAPPING.get(fullname) or [PATH_PLACEHOLDER] @classmethod def find_spec(cls, fullname, target=None): if fullname in NAMESPACES: spec = ModuleSpec(fullname, None, is_package=True) spec.submodule_search_locations = cls._paths(fullname) return spec return None @classmethod def find_module(cls, fullname): return None def install(): if not any(finder == _EditableFinder for finder in sys.meta_path): sys.meta_path.append(_EditableFinder) if not NAMESPACES: return if not any(hook == _EditableNamespaceFinder._path_hook for hook in sys.path_hooks): # PathEntryFinder is needed to create NamespaceSpec without private APIS sys.path_hooks.append(_EditableNamespaceFinder._path_hook) if PATH_PLACEHOLDER not in sys.path: sys.path.append(PATH_PLACEHOLDER) # Used just to trigger the path hook rrctt|d}t|||S)z_Create a string containing the code for the``MetaPathFinder`` and ``PathEntryFinder``. c|dS)Nrr?)rs r5z"_finder_template..?s 1r7)rlrrr)rGrr1_FINDER_TEMPLATEformatrs r5rKrK9sC 6'--//~~>>>??G  " "g* " U UUr7ceZdZdZdS)r=zCurrently there is no clear way of displaying messages to the users that use the setuptools backend directly via ``pip``. The only thing that might work is a warning, although it is not the most appropriate tool for the job... Nr8r9r:r;r?r7r5r=r=Csr7r=ceZdZdZdS)r_zCFile system does not seem to support either symlinks or hard links.Nrr?r7r5r_r_KsMMMMr7r_)Wr;loggingrQrrrrar0 contextlibrenumrinspectr itertoolsrpathlibrtempfilertypingr r r r r rrrrr setuptoolsrrrrsetuptools.command.build_pyrrsetuptools.discoveryrsetuptools.distrrr version_infortyping_extensionsabcr r>rr! getLoggerr8rr$r;r rArrrrboolr0rrfrrErFrrIrHrrrjrrJ InstallerrrrrK UserWarningr= FileErrorr_r?r7r5rs   ''''''                        QPPPPPPPPPPP@@@@@@222222((((((*))))))v$*******###### c4i WT ' H % %!$!$!$!$!$D!$!$!$H G8G8G8G8G8WG8G8G8T     x           .D,D,D,D,D, D,D,D,N",",",",",",",",J$()sm)*.sCx.)GK) ))))X ' ' '  (3-     F,F8C=FFFF %sm %c" % % #s(^ % % % %2232222#S#X#8C=####0 3i $(cN  eCcN#$     d38n c3h    C3#$.FeFFFFFRB 3 3    (((((*.((($EPV VS)V7;CcN7KVVVVVkNNNNN(NNNNNr7PK{5ZRDB55QLib/site-packages/setuptools/command/__pycache__/install_egg_info.cpython-311.pycnuW+A b;d~ddlmZmZddlZddlmZddlmZddlmZddl m Z ddl Z Gdd ej eZ dS) )logdir_utilN)Command) namespaces)unpack_archive)ensure_directoryc:eZdZdZdZdgZdZdZdZdZ dZ dS) install_egg_infoz.Install an .egg-info directory for the package)z install-dir=dzdirectory to install tocd|_dSN) install_dirselfs rE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/install_egg_info.pyinitialize_optionsz#install_egg_info.initialize_optionsscB|dd|d}tjdd|j|jdz}|j|_tj |j ||_ g|_ dS)N install_lib)rregg_infoz .egg-info)set_undefined_optionsget_finalized_command pkg_resources Distributionegg_name egg_versionrsourceospathjoinrtargetoutputs)rei_cmdbasenames rfinalize_optionsz!install_egg_info.finalize_optionss ""=#A C C C++J77 - $);  (**{#o gll4#3X>>  rc^|dtj|jrEtj|js!t j|j|jnStj |jr/| tj |jfd|jz|jst|j| |j dd|jd|j|dS)Nr)dry_runz Removing zCopying z to ) run_commandrr isdirr"islinkr remove_treer(existsexecuteunlinkr copytreerinstall_namespacesrs rrunzinstall_egg_info.run"s $$$ 7== % % ObgnnT[.I.I O  dl C C C C C W^^DK ( ( O LLT[NK$+4M N N N| * T[ ) ) ) M22T[[[$++N    !!!!!rc|jSr)r#rs r get_outputszinstall_egg_info.get_outputs/s |rcHfd}tjj|dS)NcdD]!}||sd|z|vrdS"j|tjd|||S)N)z.svn/zCVS//zCopying %s to %s) startswithr#appendrdebug)srcdstskiprs rskimmerz*install_egg_info.copytree..skimmer4sr(  >>$'' 3:+<+<44,= L   $ $ $ I(#s 3 3 3Jr)rrr")rr?s` rr1zinstall_egg_info.copytree2s:      t{DK99999rN) __name__ __module__ __qualname____doc__ description user_optionsrr&r3r5r1r)rrr r sv88BK 9L       " " " : : : : :rr ) distutilsrrr setuptoolsrrsetuptools.archive_utilr_pathr r Installerr r)rrrKs######## !!!!!!222222$$$$$$4:4:4:4:4:z+W4:4:4:4:4:rPK{5Z)ĮILib/site-packages/setuptools/command/__pycache__/egg_info.cpython-311.pycnuW+A b;dh dZddlmZddlmZddlmZddlm Z ddlZddlZddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZddlmZddlm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddlm-Z-dZ.GddZ/Gdde/eZ0GddeZGddeZ1dZ2dZ3dZ4d Z5d!Z6d"Z7d#Z8d$Z9d+d&Z:d'Z;d(Z<Gd)d*e-Z=dS),zUsetuptools.command.egg_info Create a distribution's .egg-info directory and contents)FileList)DistutilsInternalError) convert_path)logN)metadata) _entry_points)Command)sdist) walk_revctrl) edit_config) bdist_egg) Requirement safe_name parse_version safe_version to_filename)glob) packaging) yield_lines)SetuptoolsDeprecationWarningcd}|jtjj}t jtj}d|d}t |D]f\}}|t|dz k}|dkr|r|dz }n |d|d|d z }7d }t|} || kr||} | d kr ||d zz }n| d kr||z }n| d kr|dz} | | kr|| dkr| dz} | | kr|| dkr| dz} | | kr#|| dkr| dz} | | kr || dk| | kr|t j| z }na||dz| } d} | d dkr d} | dd} | t j| z } |d | dz }| }n|t j| z }|dz }|| k|s||z }h|dz }t j|tj tj zS)z Translate a file path glob like '*.txt' in to a regular expression. This differs from fnmatch.translate which allows wildcards to match directory separators. It also knows about '**/' which matches any number of directories. z[^]**z.*z(?:+z)*r*?[!^Nz\Z)flags) splitospathsepreescape enumeratelencompile MULTILINEDOTALL)rpatchunksr' valid_charcchunk last_chunki chunk_lencharinner_iinner char_classs jE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/egg_info.pytranslate_patternr<'s CTZ $ $F )BF  CCCC!Jf%%>>5#f++/)  D== 8t zzz33377  JJ )mm8Ds{{zC''z!a%Y&&5>S+@+@%kGY&&5>S+@+@%kG ))eGn.C.C%kG ))eGn.C.Ci''29T??*CC"!a%-0E!#JQx3%( %abb ")E"2"22JCZZZ11C AAry& FAU)mmZ  3JC5LC :c !9 : : ::cveZdZdZdZedZdZdZde de fdZ de fdZ de fd Z ee ZdS) InfoCommonNcNt|jSN)r distributionget_nameselfs r;namezInfoCommon.name~s*3355666r=ctt||jSrA)r _maybe_tagrB get_versionrDs r;tagged_versionzInfoCommon.tagged_versions+DOOD,=,I,I,K,KLLMMMr=cR|jr||r|n ||jzS)z egg_info may be called more than once for a distribution, in which case the version string already contains all tags. )vtags_already_taggedrEversions r;rHzInfoCommon._maybe_tags6 z &d&:&:7&C&C &GG4:% r=rOreturnc||jp&||SrA)endswithrL _safe_tagsrNs r;rMzInfoCommon._already_taggeds7 ++Rw/?/?@Q@Q/R/RRr=c@td|jddS)N0r)rrLrDs r;rSzInfoCommon._safe_tagss&, ,,--abb11r=chd}|jr ||jz }|jr|tjdz }|S)Nrz-%Y%m%d) tag_buildtag_datetimestrftimerNs r;tagszInfoCommon.tagss@ > & t~ %G = 0 t}Y// /Gr=)__name__ __module__ __qualname__rWrXpropertyrFrJrHstrboolrMrSr[rLr=r;r?r?zsIH 77X7NNN   SsStSSSS 2C2222 c HTNNEEEr=r?ceZdZdZgdZdgZddiZdZedZ e j dZ dZ d Z dd Z d Zd ZdZdZdZdS)egg_infoz+create a distribution's .egg-info directory))z egg-base=ezLdirectory containing .egg-info directories (default: top of the source tree))tag-datedz0Add date stamp (e.g. 20050528) to version number)z tag-build=bz-Specify explicit tag to add to version number)no-dateDz"Don't include date stamp [default]rfricZd|_d|_d|_d|_d|_d|_dS)NF)egg_baseegg_namerd egg_versionbroken_egg_infoignore_egg_info_in_manifestrDs r;initialize_optionszegg_info.initialize_optionss5   $+0(((r=cdSrArbrDs r;tag_svn_revisionzegg_info.tag_svn_revision r=cdSrArb)rEvalues r;rszegg_info.tag_svn_revisionrtr=ctj}||d<d|d<t|t |dS)z Materialize the value of date into the build tag. Install build keys in a deterministic order to avoid arbitrary reordering on subsequent builds. rWrrX)rdN) collections OrderedDictr[r dict)rEfilenamerds r;save_version_infozegg_info.save_version_infosQ *,,!%  HdH55566666r=c|j|_||_t |j} t |t jj}|rdnd}t||j|jfznB#t$r5}tj d|jd|j|d}~wwxYw|j3|jj}|pidt$j|_|dt+|jdz|_|jt$jkr/t$j|j|j|_d|jvr||j|jj_|jj}|U|j|jkr5|j|_t |j|_d|j_dSdSdS)Nz%s==%sz%s===%sz-Invalid distribution name or version syntax: -rrl .egg-info) rFrmrJrnr isinstancerrOVersionr ValueError distutilserrorsDistutilsOptionErrorrlrB package_dirgetr%curdirensure_dirnamerrdr&joincheck_broken_egg_infor _patched_distkeylower_version_parsed_version)rEparsed_version is_versionspecredirspds r;finalize_optionszegg_info.finalize_optionss   ..00&t'788 #NI4E4MNNJ)888yD  t/?@@ A A A A   "777 0 02   = $0D!ZR,,R;;DM J'''#DM22[@ =BI % %GLL FFDM $-    & & ( ( ( .2-="*   , >bf (;(;(=(===*BK!.t/?!@!@B .2D  + + + >==sAA?? B> 0B99B>Fc|r||||dStj|r3||st jd||dS||dSdS)aWrite `data` to `filename` or delete if empty If `data` is non-empty, this routine is the same as ``write_file()``. If `data` is empty but not ``None``, this is the same as calling ``delete_file(filename)`. If `data` is ``None``, then this is a no-op unless `filename` exists, in which case a warning is issued about the orphaned file (if `force` is false), or deleted (if `force` is true). Nz$%s not set in setup(), but %s exists) write_filer%r&existsrwarn delete_file)rEwhatr{dataforces r;write_or_delete_filezegg_info.write_or_delete_files  + OOD(D 1 1 1 1 1 W^^H % % +|E|:D(  ***** + +r=ctjd|||d}|js;t |d}|||dSdS)zWrite `data` to `filename` (if not a dry run) after announcing it `what` is used in a log message to identify what is being written to the file. zwriting %s to %sutf-8wbN)rinfoencodedry_runopenwriteclose)rErr{rfs r;rzegg_info.write_filesm #T8444{{7##| Xt$$A GGDMMM GGIIIII  r=cjtjd||jstj|dSdS)z8Delete `filename` (if not a dry run) after announcing itz deleting %sN)rrrr%unlink)rEr{s r;rzegg_info.delete_file"s> )))| Ih       r=c ||jtj|jdt jdD]P}|}|||jtj |j|jQtj |jd}tj |r| || dS)Nzegg_info.writers)groupznative_libs.txt) mkpathrdr%utimer entry_pointsloadrFr&rrr find_sources)rEepwriternls r;runz egg_info.run(s DM""" %%%'.@AAA H HBWWYYF F4"',,t}bg"F"F G G G GW\\$-): ; ; 7>>"   !   R  r=ctj|jd}t |j}|j|_||_| |j |_ dS)z"Generate SOURCES.txt manifest filez SOURCES.txtN) r%r&rrdmanifest_makerrBrpignore_egg_info_dirmanifestrfilelist)rEmanifest_filenamemms r;rzegg_info.find_sources6sVGLL FF D- . .!%!A'    r=c,|jdz}|jtjkr%tj|j|}tj|r0tjd||j |j |_ ||_ dSdS)NraB------------------------------------------------------------------------------ Note: Your current .egg-info directory has a '-' in its name; this will not work correctly with "setup.py develop". Please rename %s to %s to correct this problem. ------------------------------------------------------------------------------) rmrlr%rr&rrrrrdro)rEbeis r;rzegg_info.check_broken_egg_info?smk) =BI % %',,t}c22C 7>>#   HOT]    $(=D DMMM r=NF)r\r]r^ description user_optionsboolean_options negative_optrqr_rssetterr|rrrrrrrrbr=r;rdrds?KL"lO:L111  X     7 7 7+3+3+3Z++++(        $$$      r=rdcteZdZdfd ZdZdZdZdZdZd Z d Z d Z d Z d Z dZdZdZdZxZS)rNFcZt||||_dSrA)super__init__r)rEr debug_printr __class__s r;rzFileList.__init__Rs+ {+++#6   r=c |||\}}}}|j|j|j|jt j|j|t j|j||j |j d}dddddddd d} ||}n1#t$r$td | wxYw|d } |d vr|g}| r|fnd} ||} |d|g| r|gngz|z|D] } || st#j| | g| R!dS)N)includeexcludezglobal-includezglobal-excludezrecursive-includezrecursive-excludegraftprunez%warning: no files found matching '%s'z9warning: no previously-included files found matching '%s'z>warning: no files found matching '%s' anywhere in distributionzRwarning: no previously-included files matching '%s' found anywhere in distributionz:warning: no files found matching '%s' under directory '%s'zNwarning: no previously-included files matching '%s' found under directory '%s'z+warning: no directories found matching '%s'z6no previously-included directories found matching '%s'z/this cannot happen: invalid action '{action!s}')actionz recursive->rrrb )_parse_template_linerrglobal_includeglobal_exclude functoolspartialrecursive_includerecursive_excluderrKeyErrorrformat startswithrrrr) rElinerpatternsdir dir_pattern action_maplog_mapprocess_actionaction_is_recursiveextra_log_argslog_tmplpatterns r;process_template_linezFileList.process_template_lineVs 04/H/H/N/N,3 ||"1"1!*!2&"""+!2&""ZZ   ? +6'2CM/  4 '/NN   (Af%%  %// == ' ' '#}H$7?#R6?  HH-5#27       = =G!>'** =7<^<<<< = =s B .B7cd}tt|jdz ddD]E}||j|r-|d|j|z|j|=d}F|S)z Remove all files from the file list that match the predicate. Return True if any matching files were removed Frz removing T)ranger+filesr)rE predicatefoundr5s r; _remove_fileszFileList._remove_filess| s4:*B33  AyA''    1 !=>>>JqM r=c|dt|D}||t|S)z#Include files that match 'pattern'.cPg|]#}tj|!|$Srbr%r&isdir.0rs r; z$FileList.include..s+BBBqq1A1ABBBBr=rextendra)rErrs r;rzFileList.includes9BBDMMBBB EE{{r=cTt|}||jS)z#Exclude files that match 'pattern'.)r<rmatchrErrs r;rzFileList.excludes%!'**!!%+...r=ctj|d|}dt|dD}||t |S)zN Include all files anywhere in 'dir/' that match the pattern. rcPg|]#}tj|!|$Srbrrs r;rz.FileList.recursive_include..s:***q a((****r=T) recursive)r%r&rrrra)rErr full_patternrs r;rzFileList.recursive_includescw||Cw77 **D>>>*** EE{{r=cttj|d|}||jS)zM Exclude any file anywhere in 'dir/' that match the pattern. rr<r%r&rrr)rErrrs r;rzFileList.recursive_excludes9""',,sD'"B"BCC!!%+...r=c|dt|D}||t|S)zInclude all files from 'dir/'.cVg|]&}tj|D]}|'Srb)rrfindall)r match_diritems r;rz"FileList.graft..sP   !*229==       r=r)rErrs r;rzFileList.graftsF  !#YY    EE{{r=cttj|d}||jS)zFilter out files from 'dir/'.rr)rErrs r;rzFileList.prunes5!"',,sD"9"9::!!%+...r=c|j|ttjd|fd|jD}||t|S)z Include all files anywhere in the current directory that match the pattern. This is very inefficient on large file trees. Nrc>g|]}||Srb)r)rrrs r;rz+FileList.global_include..s(<<%@%@ A A A A A A Bs"B75>B771C,+C,)NNF)r\r]r^rrrrrrrrrrrrrrr __classcell__)rs@r;rrOs777777K=K=K=Z    /// //////   ///$$$:::???BBBBBBBr=rcdeZdZdZdZdZdZdZdZdZ e dZ d Z d Z d Zd Zd S)rz MANIFEST.incLd|_d|_d|_d|_d|_dS)NrF) use_defaultsr manifest_onlyforce_manifestrrDs r;rqz!manifest_maker.initialize_options"s/ #(   r=cdSrArbrDs r;rzmanifest_maker.finalize_options)s r=ct|j|_tj|js||tj|j r| | | |j |j|dS)N)r)rrrr%r&rrwrite_manifest add_defaultstemplate read_templateadd_license_filesprune_file_listsortremove_duplicatesrDs r;rzmanifest_maker.run,s T5MNNN w~~dm,, "    ! ! !  7>>$- ( ( !           ''))) r=cjtj|}|tjdS)N/)rrreplacer%r')rEr&s r;_manifest_normalizez"manifest_maker._manifest_normalize9s(+D11||BFC(((r=cjfdjjD}djz}t j|f|dS)zo Write the file list in 'self.filelist' to the manifest file named by 'self.manifest'. c:g|]}|Srb)r4)rrrEs r;rz1manifest_maker.write_manifest..Es'JJJ))!,,JJJr=zwriting manifest file '%s'N)rrrrexecuter)rErmsgs` r;r)zmanifest_maker.write_manifest=si KJJJdm6IJJJ*T]: Z$-!7=====r=c^||stj||dSdSrA)_should_suppress_warningr r)rEr8s r;rzmanifest_maker.warnIs:,,S11 " JtS ! ! ! ! ! " "r=c,tjd|S)z; suppress missing-file warnings from sdist zstandard file .*not found)r(r)r8s r;r:z'manifest_maker._should_suppress_warningMs x4c:::r=cdtj||j|j|j|jt t}|r|j|n8tj |jr| tj dr|jd| d}|j|jdS)Nzsetup.pyrd)r r*rrr+rrr rr%r&r read_manifestget_finalized_commandrrd)rErcfilesei_cmds r;r*zmanifest_maker.add_defaultsTs 4    T]+++ T]+++|~~&&  ! M  ) ) ) ) W^^DM * * !    7>>* % % - M  , , ,++J77 FO,,,,,r=c|jjjpg}|D]}tjd||j|dS)Nzadding license file '%s')rBr license_filesrrrr)rErBlfs r;r-z manifest_maker.add_license_filesfsV)2@FB   B H/ 4 4 4  ]+++++r=cZ|d}|j}|j|j|j|t jtj }|j d|zdz|zddS)Nbuildz(^|z)(RCS|CVS|\.svn)r)is_regex) r>rB get_fullnamerr build_baser(r)r%r'exclude_pattern)rErEbase_dirr's r;r.zmanifest_maker.prune_file_listms**733$1133 E,--- H%%%i %%fsl5H&H3&N/0 & 2 2 2 2 2r=ct|dr|Stjdt|S)a0 The parent class implementation of this method (``sdist``) will try to include data files, which might cause recursion problems when ``include_package_data=True``. Therefore, avoid triggering any attempt of analyzing/building the manifest again. get_data_files_without_manifestzCustom 'build_py' does not implement 'get_data_files_without_manifest'. Please extend command classes from setuptools instead of distutils.)hasattrrLwarningsrrget_data_files)rEbuild_pys r;_safe_data_fileszmanifest_maker._safe_data_filesvs[ 8> ? ? >;;== =  5 )    &&(((r=N)r\r]r^r+rqrrr4r)r staticmethodr:r*r-r.rQrbr=r;rrsH)))      ))) > > >""";;\; ---$,,,222)))))r=rcd|}|d}t|d5}||ddddS#1swxYwYdS)z{Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it.  rrN)rrrr)r{contentsrs r;rrsyy""Hw''H h   sAA"%A"c~tjd||js|jj}|j|jc|_}|j|jc|_} |j |j ||c|_|_n#||c|_|_wxYwt|jdd}tj |j |dSdS)Nz writing %szip_safe)rrrrBrrnrOrmrFwrite_pkg_infordgetattrrwrite_safety_flag)cmdbasenamer{roldveroldnamesafes r;rXrXsH\8$$$ ;8#,#&?H4D &!$x} w > $H #CL 1 1 1.5v +HM8++gv +HM8+ = = = =s'T::#CL$7777788s A77Bcptj|rtjddSdS)NzsWARNING: 'depends.txt' is not used by setuptools 0.6! Use the install_requires/extras_require setup() args instead.)r%r&rrrr[r\r{s r;warn_depends_obsoleterbsF w~~h   L       r=cxt|pd}d}t||}||dS)Nrbc |dzS)NrTrb)rs r; append_crz&_write_requirements..append_crs d{r=)rmap writelines)streamreqslinesres r;_write_requirementsrksK   # #E  5 ! !E er=c p|j}tj}t||j|jpi}t |D]D}|djditt|||E| d|| dS)Nz [{extra}] requirementsrb) rBioStringIOrkinstall_requiresextras_requiresortedrrvarsrgetvalue)r[r\r{distrrqextras r;write_requirementsrws  D ;==Dd3444(.BN''99 )?)33DFF33444D."78888^Xt}}GGGGGr=ctj}t||jj|d||dS)Nzsetup-requirements)rnrorkrBsetup_requiresrrt)r[r\r{rs r;write_setup_requirementsrzsJ ;==Dc.=>>>18T]]__MMMMMr=c td|jD}|d|dt |dzdS)NcFg|]}|dddS).rr)r$)rks r;rz(write_toplevel_names..s9    GGCOOA    r=ztop-level namesrT)rzfromkeysrBiter_distribution_namesrrrr)r[r\r{pkgss r;write_toplevel_namesrsv ==  %==??     D NN$h &,,0G0G$0NOOOOOr=c*t|||ddS)NT) write_argras r; overwrite_argrs c8Xt,,,,,r=Fctj|d}t|j|d}|d|dz}|||||dS)NrrT)r%r&splitextrYrBrr)r[r\r{rargnamervs r;rrslgx((+G C$gt 4 4E  %  4'Whu=====r=ctj|jj}tj|}|d||ddS)Nz entry pointsT)r rrBrrenderr)r[r\r{epsdefns r; write_entriesrsH  S-: ; ;C   $ $D^XtTBBBBBr=cjtjdttjdryt jd5}|D]I}tj d|}|r0t| dccdddSJ dddn #1swxYwYdS)zd Get a -r### off of PKG-INFO Version in case this is an sdist of a subversion revision. z$get_pkg_info_revision is deprecated.zPKG-INFOzVersion:.*-r(\d+)\s*$rNr) rNrEggInfoDeprecationWarningr%r&rrnrr(rintr)rrrs r;get_pkg_info_revisionrs  M.0IKKK w~~j!!/ WZ  /A / /!94@@/u{{1~~....  / / / / / / / // / / / / / / / / / / / / / / / / 1s?B(B((B,/B,ceZdZdZdS)rz?Deprecated behavior warning for EggInfo, bypassing suppression.N)r\r]r^__doc__rbr=r;rrsIIIIr=rr)>rdistutils.filelistr _FileListdistutils.errorsrdistutils.utilrrrrr%r(rrnrNrYrx _importlibrrr setuptoolsr setuptools.command.sdistr r setuptools.command.setoptr setuptools.commandr pkg_resourcesrrrrrsetuptools.unicode_utilsrsetuptools.globrsetuptools.externrsetuptools.extern.jaraco.textrrr<r?rdrrrXrbrkrwrzrrrrrrrbr=r;rs<<544444333333''''''  !!!!!!******111111111111((((((100000 ''''''555555333333P;P;P;f&&&&&&&&Ri i i i i z7i i i XMBMBMBMBMByMBMBMB`j)j)j)j)j)Uj)j)j)Z   888&   HHHNNN PPP--->>>>CCC    JJJJJ <JJJJJr=PK{5ZkkILib/site-packages/setuptools/command/__pycache__/saveopts.cpython-311.pycnuW+A b;d2ddlmZmZGddeZdS)) edit_config option_baseceZdZdZdZdZdS)saveoptsz#Save command-line options to a filez7save supplied options to setup.cfg or other config filec|j}i}|jD]X}|dkr ||D]'\}\}}|dkr|||i|<(Yt |j||jdS)Nrz command line) distributioncommand_optionsget_option_dictitems setdefaultrfilenamedry_run)selfdistsettingscmdoptsrcvals jE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/saveopts.pyrunz saveopts.run s ' < r sQ>>>>>>>>;;;;;{;;;;;rPK{5Z44FLib/site-packages/setuptools/command/__pycache__/sdist.cpython-311.pycnuW+A b;dddlmZddlmcmZddlZddlZddlZddl Z ddl m Z ddl m Z ddlmZddlmZeZd d ZGd d e ejZdS))logN)chain)sdist_add_defaults)metadata)_ORIGINAL_SUBCOMMANDSc#KtjdD]&}||D]}|V'dS)z%Find all files under revision controlzsetuptools.file_finders)groupN)r entry_pointsload)dirnameepitems gE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/sdist.py walk_revctrlrs_#*CDDDBGGIIg&&  DJJJJ ceZdZdZgdZiZgdZedeDZdZ dZ dZ dZ e ejd Zfd Zfd Zd Zd ZdZdZfdZdZdZdZdZxZS)sdistz=Smart sdist that finds anything supported by revision control))zformats=Nz6formats for source distribution (comma-separated list))z keep-tempkz@keep the distribution tree around after creating archive file(s))z dist-dir=dzFdirectory to put the source distribution archive(s) in [default: dist])zowner=uz@Owner name used when creating a tar file [default: current user])zgroup=gzAGroup name used when creating a tar file [default: current group])r z.rstz.txtz.mdc#@K|]}d|VdS)z README{0}N)format).0exts r zsdist.-s0IIK&&s++IIIIIIrc|d|d}|j|_|jtj|jd|| D]}||| t|j dg}|j D] }dd|f}||vr||!dS)Negg_infoz SOURCES.txt dist_filesrr ) run_commandget_finalized_commandfilelistappendospathjoinr! check_readmeget_sub_commandsmake_distributiongetattr distribution archive_files)selfei_cmdcmd_namer"filedatas rrunz sdist.run/s $$$++J77  RW\\&/=IIJJJ --// ' 'H   X & & & &    T. bAA & ( (DR&D:%%!!$''' ( (rcltj||dSN)origrinitialize_options_default_to_gztarr0s rr9zsdist.initialize_optionsBs0 %%d+++      rc:tjdkrdSdg|_dS)N)rbetargztar)sys version_infoformatsr;s rr:zsdist._default_to_gztarGs#  3 3 3 Fy rc|5tj|ddddS#1swxYwYdS)z% Workaround for #516 N)_remove_os_linkr8rr,r;s rr,zsdist.make_distributionMs ! ! # # / / J ( ( . . . / / / / / / / / / / / / / / / / / /s AA Ac#KGdd}ttd|} t`n#t$rYnwxYw dV||urt td|dSdS#||urt td|wwxYw)zG In a context, remove and restore os.link if it exists ceZdZdS)&sdist._remove_os_link..NoValueN)__name__ __module__ __qualname__rrNoValuerH[s DrrMlinkN)r-r'rN Exceptionsetattr)rMorig_vals rrEzsdist._remove_os_linkTs        2vw//     D  . EEEw&&FH-----'&xw&&FH----'s/ <<A""A?cpt|dSr7)super add_defaults _add_defaults_build_sub_commandsr0 __class__s rrTzsdist.add_defaultsis1  --/////rcttjdr|jddSdS)Nzpyproject.toml)rS_add_defaults_optionalr'r(isfiler%r&rVs rrYzsdist._add_defaults_optionalmsW &&((( 7>>* + + 3 M !1 2 2 2 2 2 3 3rc|jrk|d}|j||||dSdS)zgetting python filesbuild_pyN)r.has_pure_modulesr$r%extendget_source_files_add_data_files_safe_data_filesr0r\s r_add_defaults_pythonzsdist._add_defaults_pythonrs   - - / / B11*==H M !:!:!.}s1DD!**1--DDDDDDrc3^K|](}t|d|V)dS)r_N)hasattrr_)rrgs rrz9sdist._add_defaults_build_sub_commands..~s>VV!wqBT7U7UV##%%VVVVVVr)r$setr+r r%r^r from_iterable)r0re missing_cmdscmdsfiless` rrUz&sdist._add_defaults_build_sub_commandsys**73351133447LL DDDD|DDDVVtVVV U07788888rc|jS)a Since the ``sdist`` class is also used to compute the MANIFEST (via :obj:`setuptools.command.egg_info.manifest_maker`), there might be recursion problems when trying to obtain the list of data_files and ``include_package_data=True`` (which in turn depends on the files included in the MANIFEST). To avoid that, ``manifest_maker`` should be able to overwrite this method and avoid recursive attempts to build/analyze the MANIFEST. ) data_filesrbs rrazsdist._safe_data_filess ""rcN|jd|DdS)zA Add data files as found in build_py.data_files. c3jK|].\}}}}|D]$}tj||V%/dSr7)r'r(r))r_src_dir filenamesnames rrz(sdist._add_data_files..se  (7Ay!   GLL$ ' '       rN)r%r^)r0rps rr`zsdist._add_data_filessD   ,6        rc tdS#t$rtjdYdSwxYw)Nz&data_files contains unexpected objects)rS_add_defaults_data_files TypeErrorrwarnrVs rrxzsdist._add_defaults_data_filessY ? GG , , . . . . . ? ? ? H= > > > > > > ?s %AAc|jD]$}tj|rdS%|dd|jzdS)Nz,standard file not found: should have one of z, )READMESr'r(existsrzr))r0fs rr*zsdist.check_readmesp  Aw~~a     II> $,''(     rctj|||tj|d}t tdrItj|r*tj|| d|| d |dS)Nz setup.cfgrNr!) r8rmake_release_treer'r(r)rir}unlink copy_filer$save_version_info)r0base_dirrndests rrzsdist.make_release_trees $$T8U;;;w||Hk22 2v   .27>>$#7#7 . IdOOO NN; - - - "":..@@FFFFFrc tj|jsdSt j|jd5}|}dddn #1swxYwY|dkS)NFrbz+# file GENERATED by distutils, do NOT edit )r'r(rZmanifestioopenreadlineencode)r0fp first_lines r_manifest_is_not_generatedz sdist._manifest_is_not_generatedsw~~dm,, 5 WT]D ) ) 'RJ ' ' ' ' ' ' ' ' ' ' ' ' ' ' '>EEGGH IsA""A&)A&ctjd|jt|jd}|D]} |d}n'#t $rtjd|zYrs&&&&&&&&& ******!!!!!!((((((zzzzz  zzzzzrPK{5ZP]GLib/site-packages/setuptools/command/__pycache__/setopt.cpython-311.pycnuW+A b;dddlmZddlmZddlmZddlZddlZddlZddlm Z gdZ ddZ dd Z Gd d e Z Gd de ZdS)) convert_path)log)DistutilsOptionErrorN)Command) config_file edit_config option_basesetoptlocalc^|dkrdS|dkrGtjtjtjdS|dkrCtjdkrdpd}tjtd |zStd |) zGet the filename of the distutils, local, global, or per-user config `kind` must be one of "local", "global", or "user" r z setup.cfgglobalz distutils.cfguserposix.z~/%spydistutils.cfgz7config_file() type must be 'local', 'global', or 'user') ospathjoindirname distutils__file__name expanduserr ValueError)kinddots hE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/setopt.pyrr s  w{ xw|| GOOI. / /    v~~g (S.Bw!!,/Ds/J"K"KLLL A4  Fc tjd|tj}d|_||g|D]-\}}|,tjd||||4| |s+tjd||| ||D]\}}|ntjd|||| ||| |s+tjd||||utjd||||| |||/tjd ||s@t|d 5}||ddddS#1swxYwYdSdS) aYEdit a configuration file to include `settings` `settings` is a dictionary of dictionaries or ``None`` values, keyed by command/section name. A ``None`` value means to delete the entire section, while a dictionary lists settings to be changed or deleted in that section. A setting of ``None`` means to delete that setting. zReading configuration from %sc|SN)xs rzedit_config..*srNzDeleting section [%s] from %szAdding new section [%s] to %szDeleting %s.%s from %sz#Deleting empty [%s] section from %szSetting %s.%s to %r in %sz Writing %sw)rdebug configparserRawConfigParser optionxformreaditemsinforemove_section has_section add_section remove_optionoptionssetopenwrite) filenamesettingsdry_runoptssectionr1optionvaluefs rrr sRI-x888  ' ) )D"{DIIxj$NN,,55 ? H4gx H H H    ( ( ( (##G,, * 97HMMM  )))!( 5 5 =I0&&w777<<005!F!((444++G444I3HHWfe4444! 5$H\8$$$  (C  A JJqMMM                  s1GGGc.eZdZdZgdZddgZdZdZdS)r zr@c0d|_d|_d|_dSr!) global_config user_configr5selfs rinitialize_optionszoption_base.initialize_options\s! rcg}|jr"|td|jr"|td|j||j|s"|tdt |dkrt d||\|_dS)Nr rr z/Must specify only one configuration file option)rCappendrrDr5lenr)rF filenamess rfinalize_optionszoption_base.finalize_optionsas   4   [22 3 3 3   2   [00 1 1 1 = $   T] + + + 3   [11 2 2 2 y>>A  &A # rN)__name__ __module__ __qualname____doc__ user_optionsboolean_optionsrGrMr"rrr r LsWFFL O #####rr cVeZdZdZdZgdejzZejdgzZdZdZ dZ dS) r z#Save command-line options to a filez1set an option in setup.cfg or another config file))zcommand=czcommand to set an option for)zoption=oz option to set)z set-value=szvalue of the option)removerzremove (unset) the valuerXcrt|d|_d|_d|_d|_dSr!)r rGcommandr: set_valuerXrEs rrGzsetopt.initialize_optionss6&&t,,,   rct||j|jt d|j|jst ddSdS)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)r rMr[r:rr\rXrEs rrMzsetopt.finalize_optionss`$$T*** < 4;#6&'NOO O > !$+ !&'MNN N " ! ! !rct|j|j|jdd|jii|jdS)N-_)rr5r[r:replacer\r7rEs rrunz setopt.runsO M t{223<OOOO     rr )r )F)distutils.utilrrrdistutils.errorsrrr' setuptoolsr__all__rrr r r"rrrhs''''''111111  A A A&))))X$#$#$#$#$#'$#$#$#N" " " " " [" " " " " rPK{5Zy00KLib/site-packages/setuptools/command/__pycache__/build_clib.cpython-311.pycnuW+A b;d?bddlmcmZddlmZddlmZddlm Z GddejZdS)N)DistutilsSetupError)log)newer_pairwise_groupceZdZdZdZdS) build_clibav Override the default build_clib behaviour to do the following: 1. Implement a rudimentary timestamp-based dependency system so 'compile()' doesn't run every time. 2. Add more keys to the 'build_info' dictionary: * obj_deps - specify dependencies for each object compiled. this should be a dictionary mapping a key with the source filename to a list of dependencies. Use an empty string for global dependencies. * cflags - specify a list of additional flags to pass to the compiler. c |D]i\}}|d}|t|ttfst d|zt|}t jd||dt}t|tst d|zg}|dt}t|ttfst d|z|D]}|g} | |||t} t| ttfst d|z| | | | |j ||j } t|| ggfkri|d} |d } |d }|j ||j | | ||j |j | ||j|j kdS) Nsourceszfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenameszbuilding '%s' libraryobj_depsz\in 'libraries' option (library '%s'), 'obj_deps' must be a dictionary of type 'source: list') output_dirmacros include_dirscflags)r r rextra_postargsdebug)r r)get isinstancelisttuplerrinfodictextendappendcompilerobject_filenames build_temprcompilercreate_static_libr)self librarieslib_name build_infor r dependencies global_depssourcesrc_deps extra_depsexpected_objectsr rrs lE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/build_clib.pybuild_librarieszbuild_clib.build_librariess&/M M  "Xz nnY//Gj4-&H&H)13;<===7mmG H,h 7 7 7 "~~j$&&99Hh-- 6)*,45666L#,,r46622KkD%=99 6)*,45666" . ."8 ,,,%\\&$&&99 !*tUm<<:-.089::: +++##H----#}==? >    %\3CDD8 $11)~~n== #11 %%#!!-#)* & M + + ?j ,    QM M N)__name__ __module__ __qualname____doc__r*r+r)rrs2  NNNNNr+r) distutils.command.build_clibcommandrorigdistutils.errorsr distutilsrsetuptools.dep_utilrr0r+r)r7s+++++++++000000444444^^^^^^^^^^r+PK{5Z2Zn**HLib/site-packages/setuptools/command/__pycache__/develop.cpython-311.pycnuW+A b;ddddlmZddlmZddlmZmZddlZddlZddl Z ddl Z ddl m Z ddl mZddl Z Gddeje ZGd d ZdS) ) convert_path)log)DistutilsErrorDistutilsOptionErrorN) easy_install) namespacesceZdZdZdZejddgzZejdgzZdZdZ dZ d Z e d Z d Zd Zd ZdZdS)developzSet up package for developmentz%install package in 'development mode') uninstalluzUninstall this source package)z egg-path=Nz-Set the path to be used in the .egg-link filer Fc|jr0d|_||n||dS)NT)r multi_versionuninstall_linkuninstall_namespacesinstall_for_developmentwarn_deprecated_optionsselfs iE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/develop.pyrunz develop.runse > +!%D     ! ! !  % % ' ' ' '  ( ( * * * $$&&&&&cfd|_d|_tj|d|_d|_dS)N.)r egg_pathrinitialize_options setup_pathalways_copy_fromrs rrzdevelop.initialize_options%s6 '--- #rc (|d}|jr"d}|j|jf}t||z|jg|_t j||| |j tj d|jdz}tj|j||_|j|_|j)tj|j|_t+j|j}t+jtj|j|j}||krt/d|zt+j|t+j|tj|j|j|_||j|j|j|_dS)Negg_infoz-Please rename %r to %r before using 'develop'z*.eggz .egg-linkzA--egg-path must be a relative path from the install directory to  project_name)get_finalized_commandbroken_egg_inforregg_nameargsrfinalize_optionsexpand_basedirs expand_dirs package_indexscanglobospathjoin install_diregg_linkegg_baserabspath pkg_resourcesnormalize_pathr Distribution PathMetadatadist_resolve_setup_pathr)reitemplater% egg_link_fntargetrs rr&zdevelop.finalize_options,s  ' ' 3 3  2FH; 22D D11 1[M %d+++    ' 2 2333kK/  T%5{CC   = GOOBK88DM-dm<< / GLL)4= 9 9   v  &!#)*  ".   &vrwr{/K/K L L    22 M   M  rc|tjdd}|tjkrd|ddzz}t jtj |||}|t jtjkr-td|t jtj|S)z Generate a path from egg_base back to '.' where the setup script resides and ensure that path points to the setup path from $install_dir/$egg_path. /z../zGCan't get a consistent path to setup script from installation directory) replacer,seprstripcurdircountr3r4r-r.r)r1r/r path_to_setupresolveds rr8zdevelop._resolve_setup_pathWs!((55< >   }3BI>> > >&*,RY77   rcT|d|dd|dtjr+|tjdt_|t jd|j|j |j sRt|jd5}| |j dz|jzdddn #1swxYwY|d|j|j dS)Nr build_extr?)inplacezCreating %s (link to %s)w ) run_commandreinitialize_command setuptoolsbootstrap_install_fromrinstall_namespacesrinfor0r1dry_runopenwriterrprocess_distributionr7no_deps)rfs rrzdevelop.install_for_developmentmsb $$$ !!+q!999 %%%  , 5   j? @ @ @04J - !!! +T]DMJJJ| @dmS)) @Q ,t>??? @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !!$ t|3CDDDDDs &C;;C?C?ctj|jrt jd|j|jt|j}d|D}|||j g|j |j gfvrt j d|dS|j stj |j|j s||j|jjrt j ddSdS)NzRemoving %s (link to %s)c6g|]}|S)rB).0lines r z*develop.uninstall_link..s @@@$ @@@rz$Link points to %s: uninstall abortedz5Note: you must uninstall or replace scripts manually!)r,r-existsr0rrQr1rScloserrwarnrRunlink update_pthr7 distributionscripts)r egg_link_filecontentss rrzdevelop.uninstall_links 7>>$- ( ( ) H/ N N N //M@@-@@@H    ! ! !$-1QRRR?JJJ< ) $-(((| ' OODI & & &   $ N HL M M M M M N Nrc||jurtj||S|||jjpgD]}t jt|}t j |}tj |5}| }dddn #1swxYwY|||||dSN)r7rinstall_egg_scriptsinstall_wrapper_scriptsrcrdr,r-r2rbasenameiorSreadinstall_script)rr7 script_name script_pathstrm script_texts rrizdevelop.install_egg_scriptss ty 3D$?? ? $$T*** ,4: M MK'//,{*C*CDDK'**;77K%% *"iikk  * * * * * * * * * * * * * * *   k; L L L L  M Ms#CC C cJt|}tj||Srh)VersionlessRequirementrrjrr7s rrjzdevelop.install_wrapper_scriptss"%d++3D$???rN)__name__ __module__ __qualname____doc__ descriptionr user_optionsboolean_optionscommand_consumes_argumentsrrr& staticmethodr8rrrirjrZrrr r s((9K,;L0L #2k]BO!&'''$$$) ) ) V\*EEE,NNN"MMM$@@@@@rr c$eZdZdZdZdZdZdS)rta Adapt a pkg_resources.Distribution to simply return the project name as the 'requirement' so that scripts will work across multiple versions. >>> from pkg_resources import Distribution >>> dist = Distribution(project_name='foo', version='1.0') >>> str(dist.as_requirement()) 'foo==1.0' >>> adapted_dist = VersionlessRequirement(dist) >>> str(adapted_dist.as_requirement()) 'foo' c||_dSrh)_VersionlessRequirement__distrus r__init__zVersionlessRequirement.__init__s  rc,t|j|Srh)getattrr)rnames r __getattr__z"VersionlessRequirement.__getattr__st{D)))rc|jSrhr rs ras_requirementz%VersionlessRequirement.as_requirements   rN)rvrwrxryrrrrZrrrtrtsK  ***!!!!!rrt)distutils.utilr distutilsrdistutils.errorsrrr,r+rlr3setuptools.command.easy_installrrNrDevelopInstallerr rtrZrrrs ''''''AAAAAAAA 888888!!!!!!Z@Z@Z@Z@Z@j)<Z@Z@Z@z!!!!!!!!!!rPK{5Z ϏSSFLib/site-packages/setuptools/command/__pycache__/alias.cpython-311.pycnuW+A b;dM NddlmZddlmZmZmZdZGddeZdZdS))DistutilsOptionError) edit_config option_base config_filecdD]}||vrt|cS||gkrt|S|S)z4Quote an argument for later parsing by shlex.split())"'\#)reprsplit)argcs gE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/alias.pyshquotersW  8899     yy{{seCyy JcXeZdZdZdZdZdgejzZejdgzZdZ dZ dZ d S) aliasz3Define a shortcut that invokes one or more commandsz0define a shortcut to invoke one or more commandsT)removerzremove (unset) the aliasrcJtj|d|_d|_dS)N)rinitialize_optionsargsrselfs rrzalias.initialize_optionss%&t,,,  rctj||jr't|jdkrt ddSdS)NzFMust specify exactly one argument (the alias name) when using --remove)rfinalize_optionsrlenrrrs rrzalias.finalize_options!sV$T*** ; 3ty>>Q..&!   ..rcV|jd}|jsCtdtd|D] }tdt ||!dSt |jdkrK|j\}|jrd}nz||vr tdt ||dStd|zdS|jd}dtt|jdd}t|j d||ii|j dS) NaliaseszCommand Aliasesz---------------zsetup.py aliasrz No alias definition found for %rr ) distributionget_option_dictrprint format_aliasrrjoinmaprrfilenamedry_run)rr!rcommands rrunz alias.run)s;#33I>>y < # $ $ $ # $ $ $  F F& UG(D(DEEEE F ^^q YFE{ '!!& UG(D(DEEE85@AAAIaLEhhs7DIabbM::;;GDMIw/?#@$,OOOOOrN) __name__ __module__ __qualname____doc__ descriptioncommand_consumes_argumentsr user_optionsboolean_optionsrrr,rrrrs==DK!% 4 !L"1XJ>O PPPPPrrc||\}}|tdkrd}n1|tdkrd}n|tdkrd}nd|z}||zdz|zS) Nglobalz--global-config userz--user-config localz --filename=%rr")r)namer!sourcer+s rr&r&Ds{dmOFG X&&&&# ;v&& & &! ;w'' ' ' 6) D=3  ((rN) distutils.errorsrsetuptools.command.setoptrrrrrr&r5rrr?s111111KKKKKKKKKK1P1P1P1P1PK1P1P1Ph ) ) ) ) )rPK{5Z]JLib/site-packages/setuptools/command/__pycache__/bdist_rpm.cpython-311.pycnuW+A b;dRddlmcmZddlZddlmZGddejZdS)N)SetuptoolsDeprecationWarningceZdZdZdZdZdS) bdist_rpma Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to disable eggs in RPM distributions. ctjdt|dtj|dS)Nzjbdist_rpm is deprecated and will be removed in a future version. Use bdist_wheel (wheel packages) instead.egg_info)warningswarnr run_commandorigrrun)selfs kE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/bdist_rpm.pyr z bdist_rpm.runsQ  A (    $$$ 4     c\tj|}d|D}|S)Ncbg|],}|dddd-S)zsetup.py install z5setup.py install --single-version-externally-managed z%setupz&%setup -n %{name}-%{unmangled_version})replace).0lines r z-bdist_rpm._make_spec_file..sU     LL#G  g8    r)r r_make_spec_file)r specs rrzbdist_rpm._make_spec_files>~--d33        rN)__name__ __module__ __qualname____doc__r rrrrrs< ! ! !     rr)distutils.command.bdist_rpmcommandrr r setuptoolsrrrrr sq*********333333!!!!!!!!!!rPK{5Z`$/0909ELib/site-packages/setuptools/command/__pycache__/test.cpython-311.pycnuW+A b;dddlZddlZddlZddlZddlZddlZddlmZmZddl m Z ddlm Z ddl m Z mZmZmZmZmZmZddlmZddlmZdd lmZdd lmZGd d e ZGd dZGddeZdS)N)DistutilsErrorDistutilsOptionError)log) TestLoader)resource_listdirresource_existsnormalize_path working_setevaluate_markeradd_activation_listenerrequire)metadata)Command)unique_everseen) pass_noneceZdZdZddZdS)ScanningLoadercTtj|t|_dSN)r__init__set_visitedselfs fE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/test.pyrzScanningLoader.__init__s"D!!! Nc||jvrdS|j|g}|tj||t |dr'||t |drt|jdD]}| dr|dkr|jdz|ddz}n't|j|d zr|jdz|z}nZ|| |t|d kr| |S|d S) aReturn a suite of all tests cases contained in the given module If the module is a package, load tests from all the modules in it. If the module has an ``additional_tests`` function, call it and add the return value to the tests. Nadditional_tests__path__z.pyz __init__.py.z /__init__.pyr)raddappendrloadTestsFromModulehasattrrr__name__endswithrloadTestsFromNamelen suiteClass)rmodulepatterntestsfile submodules rr'z"ScanningLoader.loadTestsFromModulesf T] " "4 &!!! Z3D&AABBB 6- . . 4 LL0022 3 3 3 6: & & @("== @ @==''!DM,A,A &# 5SbS AII&v~8MNN!$*Oc$9D$@   T33I>>???? u::????5)) )8Orr)r) __module__ __qualname__rr'rrrrs7rrceZdZdZddZdS)NonDataPropertyc||_dSrfget)rr:s rrzNonDataProperty.__init__Cs  rNc4||S||Srr9)robjobjtypes r__get__zNonDataProperty.__get__Fs ;Kyy~~rr)r)r3r4rr>r5rrr7r7Bs7rr7ceZdZdZdZgdZdZdZedZ dZ dZ e j gfd Zee j d Zed Zd Zd ZedZeedZdS)testz.Command to run unit tests after in-place buildz0run unit tests after in-place build (deprecated)))z test-module=mz$Run 'test_suite' in specified module)z test-suite=sz9Run single test, case or suite (e.g. 'module.test_suite'))z test-runner=rzTest runner to usec>d|_d|_d|_d|_dSr) test_suite test_module test_loader test_runnerrs rinitialize_optionsztest.initialize_options[s'rcJ|jr|jrd}t||j(|j|jj|_n|jdz|_|jt |jdd|_|jd|_|jt |jdd|_dSdS)Nz1You may specify a module or a suite, but not bothz .test_suiterGz&setuptools.command.test:ScanningLoaderrH)rErFr distributionrGgetattrrH)rmsgs rfinalize_optionsztest.finalize_optionsas ? ,t/ ,EC&s++ + ? "'"&"3">"&"2]"B   #&t'8-NND    #GD    #&t'8-NND    $ #rcDt|Sr)list _test_argsrs r test_argsztest.test_argstsDOO%%&&&rc#ZK|jsdV|jrdV|jr |jVdSdS)Ndiscoverz --verbose)rEverbosers rrQztest._test_argsxsZ     <     ? "/ ! ! ! ! ! " "rct|5|ddddS#1swxYwYdS)zI Backward compatibility for project_on_sys_path context. N)project_on_sys_path)rfuncs rwith_project_on_sys_pathztest.with_project_on_sys_paths % % ' '   DFFF                  s -11c#K|d|dd|d|d}tjdd}tj} t|j}tj d|tj tdt|jd|j||g5dVdddn #1swxYwY|tjdd<tjtj|tj dS#|tjdd<tjtj|tj wxYw)Negg_info build_extr$)inplacerc*|Sr)activate)dists rz*test.project_on_sys_path..srz==) run_commandreinitialize_commandget_finalized_commandsyspathmodulescopyr egg_baseinsertr rr r egg_name egg_versionpaths_on_pythonpathclearupdate)r include_distsei_cmdold_path old_modules project_paths rrWztest.project_on_sys_paths $$$ !!+q!999 %%%++J778AAA;k&&((  #)&/::L HOOA| , , ,  " " " #$@$@ A A A 1C1CD E E E))<.99                 #CHQQQK K      K  { + + +  " " " " "#CHQQQK K      K  { + + +  " " " "s2 B FD( F(D,,F/D,0FA#G9c#hKt}tjd|}tjdd} tjt |}td||g}tj|}|r|tjd<dV||ur"tjdddS|tjd<dS#||ur!tjddn|tjd<wxYw)z Add the indicated paths to the head of the PYTHONPATH environment variable so that subprocesses will also see the packages at these paths. Do this in a context that restores the value on exit. PYTHONPATHr!N) objectosenvirongetpathsepjoinrfilterpop)pathsnothingorig_pythonpathcurrent_pythonpathprefixto_joinnew_paths rrmztest.paths_on_pythonpaths((*..w??Z^^L"== ;Z___U%;%;<#?@@Gzw//H 4+3 <( EEE')) |T22222+: <(((')) |T2222+: <(::::s A2C;;6D1c||j}||jpg}|d|jD}t j|||S)z Install the requirements indicated by self.distribution and return an iterable of the dists that were built. c3xK|]5\}}|dt|dd1|V6dS):r$N) startswithr ).0kvs r z%test.install_dists..sf% % 1||C  % &5QqrrU%;%;% % % % % % % r)fetch_build_eggsinstall_requires tests_requireextras_requireitems itertoolschain)r`ir_dtr_der_ds r install_distsztest.install_distss $$T%:;;$$T%7%=2>>$$% % +1133% % %    tT4000rc@|dtj||j}d|j}|jr|d|zdS|d|zttj d|}| |5| 5| dddn #1swxYwYddddS#1swxYwYdS)NzWARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox. zskipping "%s" (dry run)z running "%s"location)announcerWARNrrKr|_argvdry_runmapoperator attrgetterrmrW run_tests)rinstalled_distscmdrs rrunztest.runs   H    ,,T->??hhtz"" <  MM3c9 : : : F ns*+++H' 33_EE  % %e , , ! !))++ ! !    ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !s6DC;/ D;C? ?DC? DDDc Htjdd|j||j||jd}|js9d|jz}||tj t|dS)NF) testLoader testRunnerexitzTest failed: %s) unittestmainr_resolve_as_eprGrHresult wasSuccessfulrrERRORr)rr@rMs rrztest.run_testss}   J**4+;<<**4+;<<    {((** &#dk1C MM#sy ) ) ) %% % & &rcdg|jzS)Nr)rRrs rrz test._argvs|dn,,rcdtj|ddS)zu Load the indicated attribute value, called, as a as if it were specified as an entry point. N)valuenamegroup)r EntryPointload)vals rrztest._resolve_as_eps1Lx"4tDDDIIKKMMMrN)r)r3r4__doc__ description user_optionsrIrNr7rRrQrY contextlibcontextmanagerrW staticmethodrmrrrpropertyrrrr5rrr@r@LsX88DKL   OOO&''_'"""02####4;;\;0 1 1\ 1!!!. & & &--X-NNY\NNNrr@)rxrrerrrdistutils.errorsrr distutilsrr pkg_resourcesrrr r r r r _importlibr setuptoolsr setuptools.extern.more_itertoolsr"setuptools.extern.jaraco.functoolsrrr7r@r5rrrs  AAAAAAAA"!!!!!<<<<<<888888$$$$$Z$$$PoNoNoNoNoN7oNoNoNoNoNrPK{5Z Ǔ(ddJLib/site-packages/setuptools/command/__pycache__/bdist_egg.cpython-311.pycnuW+A b;d@bdZddlmZmZddlmZddlmZddlZddl Z ddl Z ddl Z ddl Z ddl mZmZddlmZddlmZd d lmZdd lmZmZd Zd ZdZdZGddeZed Z!dZ"dZ#dZ$dddZ%dZ&dZ'dZ(gdZ) d dZ*dS)!z6setuptools.command.bdist_egg Build .egg distributions) remove_treemkpath)log)CodeTypeN)get_build_platform Distribution)Library)Command)ensure_directory)get_pathget_python_versionc tdS)Npurelib)r kE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/bdist_egg.py _get_purelibrs I  rcd|vr%tj|d}|dr |dd}|S)N.rmodulei)ospathsplitextendswith)filenames r strip_modulersM h7##H--a0""!CRC= Orc#Ktj|D]5\}}}|||||fV6dS)zbDo os.walk in a reproducible way, independent of indeterministic filesystem readdir order N)rwalksort)dirbasedirsfiless r sorted_walkr%"s` WS\\  dE  D%  rctjd}t|d5}|||zddddS#1swxYwYdS)Na def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, importlib.util __file__ = pkg_resources.resource_filename(__name__, %r) __loader__ = None; del __bootstrap__, __loader__ spec = importlib.util.spec_from_file_location(__name__,__file__) mod = importlib.util.module_from_spec(spec) spec.loader.exec_module(mod) __bootstrap__() w)textwrapdedentlstripopenwrite)resourcepyfile_stub_templatefs r write_stubr1,s_ &   VXX fc  +a )***++++++++++++++++++sAA!$A!ceZdZdZddddezfdddd gZgd Zd Zd Zd Z dZ dZ dZ dZ dZdZdZdZdS) bdist_eggzcreate an "egg" distribution)z bdist-dir=bz1temporary directory for creating the distributionz plat-name=pz;platform name to embed in generated filenames (default: %s))exclude-source-filesNz+remove all .py files from the generated egg) keep-tempkzPkeep the pseudo-installation tree around after creating the distribution archive)z dist-dir=dz-directory to put final built distributions in) skip-buildNz2skip rebuilding everything (for testing/debugging))r7r:r6chd|_d|_d|_d|_d|_d|_d|_dS)Nr) bdist_dir plat_name keep_tempdist_dir skip_build egg_outputexclude_source_filesselfs rinitialize_optionszbdist_egg.initialize_optionsSs: $(!!!rc b|dx}|_|j|_|j?|dj}t j|d|_|jt|_| dd|j tdd|j |jt|jo|j }t j|j|dz|_ dSdS)Negg_infobdistegg)r?r?z.egg)get_finalized_commandei_cmdrGr< bdist_baserrjoinr=rset_undefined_optionsrAregg_name egg_versionr distributionhas_ext_modulesr?)rDrKrLbasenames rfinalize_optionszbdist_egg.finalize_options\s #99*EEE > !33G<<GJW\\*e< !/11DN ""7,DEEE ? "$dFOV-?"$$!1133Fhjj  !gll4=(V:KLLDOOO # "rc|j|d_tjtjt}|jj gc}|j_ |D]}t|trt|dkrtj |drtj|d}tj|}||ks"||tjzr"|t|dzd|df}|jj | t#jd|j|ddd||j_ dS#||j_ wxYw)Ninstallr rzinstalling package data to %s install_data)forceroot)r<rJ install_librrnormcaserealpathrrQ data_files isinstancetuplelenisabs startswithsepappendrinfo call_command)rD site_packagesolditemr] normalizeds rdo_install_datazbdist_egg.do_install_datats<@N""9--9(()9)9,..)I)IJJ ,0,=,H")T  ) 6 6D$&& J3t99>>7==a))J!w//Q88H!#!1!1(!;!;J!]22j6K6K%.772 (M(:(:Q(>(?(?@$q'I   ( / / 5 5 5 5 / H4dn E E E   nAD  A A A+.D  ( ( (3D  ( . . . .s 2GGc|jgS)N)rArCs r get_outputszbdist_egg.get_outputss   rc tD]}|||j|d|j|d|j|j|fi|}|||S)z8Invoke reinitialized command `cmdname` with keyword argsr@dry_run)INSTALL_DIRECTORY_ATTRS setdefaultr<r@rpreinitialize_command run_command)rDcmdnamekwdirnamecmds rrgzbdist_egg.call_commands. 3 3G MM'4> 2 2 2 2 lDO444 i...'d'66266 !!! rc |dtjd|j|d}|j}d|_|jr|js|d| dd}||_| \}}g|_ g}t|D]\}}tj|\} } tj|jt#| dz} |j | tjd ||js-t)tj|| || |tjd ||<|r|||jjr||j} tj| d } || |jjrMtj| d }tjd || d|d|| tj| d}|rtjd||jspt=|t?|d}| d|| d|!nOtj"|r0tjd||jstj#|tItj| d |%tj&tj|j'drtj(d|j)r|*tW|j,| |j-|j|.|j/sta|j|jtc|jdgdte|j,fdS)NrGzinstalling library code to %srV build_clibr[r)warn_dir.pyzcreating stub loader for %s/EGG-INFOscriptszinstalling scripts to %sinstall_scriptsrW) install_dirno_epznative_libs.txtz writing %swt z removing %sz depends.txtzxWARNING: 'depends.txt' will not be used by setuptools 0.6! Use the install_requires/extras_require setup() args instead.)verboserpmoderp dist_filesr3)3rtrrfr<rJrZrQhas_c_librariesr@rgget_ext_outputsstubs enumeraterrrrMrrerpr1rSreplacerd byte_compiler^rlrrcopy_metadata_tor r+r,closeisfileunlinkwrite_safety_flagzip_safeexistsrGwarnrB zap_pyfiles make_zipfilerAr gen_headerr>rgetattrr)rDinstcmdold_rootrx all_outputs ext_outputs to_compiler5ext_namerextr. archive_rootrG script_dir native_libs libs_files rrunz bdist_egg.runs $$$ 0$.AAA,,Y77<   , , . . +t +   \ * * * :: #'#7#7#9#9 [  &{33 ; ;MQG,,X66MHcW\\$.,x2H2H"'3())F J  f % % % H2H = = =< ?27++H55v>>>   f % % %%--bfc::KNN  )   Z ( ( (   ' #  " " "~ 7<< j99 H   $ 'h ::J H/ < < <   /Z$%  ' ' ' h'''gll8->??  ' H\; / / /< " --- d33  + 6 6777%%%!!! W^^K ( ( ' H]K 0 0 0< ' +&&& GLLz 2 2DMMOO    7>>"',,t}mDD E E  HP     $        T_lDL!\0A0A C C C C~ >  = = = = !<44;; ,.. @ B B B B Brc tjdt|jD]1\}}}|D]&}tj||}|dr)tjd|t j ||dr|}d}tj ||}tj|tj | ddz} tjd|d | d  t j| n#t$rYnwxYwt j|| (3dS) Nz+Removing .py files from temporary directoryr|z Deleting %s __pycache__z#(?P.+)\.(?P[^.]+)\.pycname.pyczRenaming file from [z] to [])rrfwalk_eggr<rrrMrdebugrrematchpardirgroupremoveOSErrorrename) rDr"r#r$rrpath_oldpatternmpath_news rrzbdist_egg.zap_pyfilessj >???!)$.!9!9 2 2 D$ 2 2w||D$//==''$ImT222IdOOO==//2#HDG$//A!w||bi6)A C CHHH#88XXX/000 (++++"Ih111+ 2 2 2sD33 E?Ect|jdd}||Stjdt |j|jS)Nrz4zip_safe flag not set; analyzing archive contents...)rrQrr analyze_eggr<r)rDsafes rrzbdist_egg.zip_safesFt(*d;;  K GHHH4>4:666rcdS)Nr'rrCs rrzbdist_egg.gen_header ssrctj|j}tj|d}|jjjD]q}||rZtj||t|d}t|| ||rdS)z*Copy metadata (egg info) to the target_dirN) rrnormpathrGrMrKfilelistr$rcrar copy_file)rD target_dir norm_egg_infoprefixrtargets rrzbdist_egg.copy_metadata_tos((77 mR00K(. - -Dv&& -j$s6{{||2DEE (((tV,,,  - -rcg}g}|jdi}t|jD]\}}}|D]^}tj|dt vr||||z_|D]1}|||zdz|tj||<2|j r| d}|j D]} t| tr|| j} || }tj|dsWtjtj|j|r||||fS)zAGet a list of relative paths to C extensions in the output distrorrWr} build_extzdl-)r<r%rrrlowerNATIVE_EXTENSIONSrerMrQrRrJ extensionsr_r get_ext_fullnamerget_ext_filenamerSrcr) rDrrpathsr"r#r$r build_cmdrfullnames rrzbdist_egg.get_ext_outputss  $!,T^!>>  G G78&L&LMM5#**8444K''rN)__name__ __module__ __qualname__ descriptionr user_optionsboolean_optionsrErTrlrnrgrrrrrrrrrr3r3<s2K > s,.@.@.B.BC D 8 . : ?L O)))MMM0///2!!!OBOBOBb2224777 - - -(((((rr3z.dll .so .dylib .pydc#Kt|}t|\}}}d|vr|d|||fV|D]}|VdS)z@Walk an unpacked egg's contents, skipping the metadata directoryr~N)r%nextr)egg_dirwalkerr"r#r$bdfs rrr;sy  ! !FV D$T J e  rctD]G\}}tjtj|d|r|cSHt sdSd}t|D]t\}}}|D]k}|ds|dr-|ds|drt||||o|}lu|S)Nr~FTr|z.pywrz.pyo) safety_flagsitemsrrrrMcan_scanrr scan_module) rrflagfnrr"r#r$rs rrrFs &&((b 7>>"',,w B?? @ @ KKK  ::u D%g..HHdE H HD}}U## Ht}}V'<'< Hv&& H$--*?*? H"7D$>>G4  H KrctD]\}}tj||}tj|r*|t ||krtj|n|Lt ||kr9t|d}| d| dS)Nrr) rrrrrMrboolrr+r,r)rrrrr0s rrrXs &&((b W\\'2 & & 7>>"   |tDzzT11 "  $t**"4"4RA GGDMMM GGIIIrzzip-safez not-zip-safe)TFctj||}|dd|vrdS|t|dzdtjd}||rdpdztj|dz}tjdkrd }nd }t|d }| |tj |} | d} tt!| } d D]} | | vrt#jd || d} d| vr!dD]} | | vrt#jd|| d} | S)z;Check whether module possibly uses unsafe-for-zipfile stuffNTrWrrr) rb)__file____path__z%s: module references %sFinspect) getsource getabsfile getsourcefilegetfilegetsourcelines findsource getcomments getframeinfogetinnerframesgetouterframesstacktracez"%s: module MAY be using inspect.%s)rrrMrarrdrsys version_infor+readmarshalloadrdictfromkeys iter_symbolsrr) rr"rrrpkgrskipr0codersymbolsbads rrrksuw||D$''H}t s7||a  ! ) )"&# 6 6C CKC%2 &)9)9$)?)?)B BF &   XtAFF4LLL <??DGGIII DmmL..//G' '>> H/ = = =DG   C g~~=vsKKK Krc#K|jD]}|V|jD]G}t|tr|Vt|trt |D]}|VHdS)zBYield names and strings used by `code` and its nested code objectsN)co_names co_constsr_strrr)rrconsts rrrs   eS ! ! KKKK x ( ( $U++   rctjdstjdkrdStjdtjddS)NjavacliTz1Unable to analyze compiled code on this platform.zfPlease ask the author to include a 'zip_safe' setting (either True or False) in the package's setup.py)rplatformrcrrrrrrrse < " "6 * *s|u/D/DtH @AAAHIJJJJJr)r[rrX install_baseTr'cddl}ttj|t jd|fd}|r|jn|j}sP| |||} tD]\} } } || | | | n#tD]\} } } |d| | |S)aqCreate a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file. rNrz#creating '%s' and adding '%s' to itcX|D]}tjtj||}tj|rG|t dzd}s|||tjd|dS)NrWz adding '%s') rrrrMrrar,rr)zrwnamesrrr5base_dirrps rvisitzmake_zipfile..visits , ,D7##BGLL$$?$?@@Dw~~d## ,X*++,%GGD!$$$ -+++  , ,r) compression) zipfilerrrrwrrf ZIP_DEFLATED ZIP_STOREDZipFiler%r) zip_filenamerrrpcompressrrrrrrwr#r$s ` ` rrrsNNN 27??< ( ('::::H 2L(KKK,,,,,,+3J'&&8JK ( OOL$KO H H$/$9$9 % % GT5 E!We $ $ $ $  $/$9$9 ( ( GT5 E$ ' ' ' ' r)rrTr')+__doc__distutils.dir_utilrr distutilsrtypesrrrrr(r pkg_resourcesrrsetuptools.extensionr setuptoolsr _pathr sysconfigr rrrr%r1r3rrsplitrrrrrrrrrqrrrrr's32222222 ::::::::(((((($$$$$$22222222    + + + y(y(y(y(y(y(y(y(xMM"8">">"@"@AA$      D   JJJ IMrPK{5ZHLib/site-packages/setuptools/command/__pycache__/install.cpython-311.pycnuW+A b;d+ddlmZddlZddlZddlZddlZddlmcmZ ddl Z e jZ Gdde jZde jj Dej ze_ dS))DistutilsArgErrorNceZdZdZejjddgzZejjddgzZddfdd fgZe eZ d Z d Z d Z d ZedZdZdS)installz7Use easy_install to install the package, w/dependencies)old-and-unmanageableNzTry not to use this!)!single-version-externally-managedNz5used by system package builders to create 'flat' eggsrrinstall_egg_infocdSNTselfs iE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/install.pyzinstall.s$install_scriptscdSr r r s rrzinstall.srctjdtjtj|d|_d|_dS)NzRsetup.py install is deprecated. Use build and pip and other standards-based tools.) warningswarn setuptoolsSetuptoolsDeprecationWarningorigrinitialize_optionsold_and_unmanageable!single_version_externally_managedr s rrzinstall.initialize_options sP  A  3   ''---$(!15...rctj||jr d|_dS|jr|js|jst ddSdSdS)NTzAYou must specify --record or --root when building system packages)rrfinalize_optionsrootrrecordrr s rrzinstall.finalize_options,s %%d+++ 9 59D 2 2 2  3 9 T[ '       rc||js|jrtj|Sd|_d|_dS)N)rrrrhandle_extra_path path_file extra_dirsr s rr"zinstall.handle_extra_path7s@ 9 8> 8<11$77 7rc|js|jrtj|S|t js!tj|dS|dS)N) rrrrrun_called_from_setupinspect currentframedo_egg_installr s rr&z install.runAs  $ *(N *<##D)) )&&w';'='=>> " L  T " " " " "    ! ! ! ! !rc|Ed}tj|tjdkrd}tj|dSt j|}|ddD]a}|dd\}t j|}|jd d }|d kr |j d krO|d ko |j dkcSdS)a Attempt to detect whether run() was called from setup() or by another command. If called by setup(), the parent caller will be the 'run_command' method in 'distutils.dist', and *its* caller will be the 'run_commands' method. If called any other way, the immediate caller *might* be 'run_command', but it won't have been called by 'run_commands'. Return True in that case or if a call stack is unavailable. Return False otherwise. Nz4Call stack not available. bdist_* commands may fail. IronPythonz6For best results, pass -X:Frames to enable call stack.T__name__r!zsetuptools.dist run_commandzdistutils.dist run_commands) rrplatformpython_implementationr(getouterframes getframeinfo f_globalsgetfunction) run_framemsgframesframecallerinfo caller_modules rr'zinstall._called_from_setupLs  HC M#   -//<??N c"""4' 22AaC[  EBQBiGF'//D",00R@@M 111dm}6T6T!114M^3     rc|jd}||jd|j|j}|d|_|jtjd| d|j dj g}tj r |dtj ||_|d dt_ dS) N easy_installx)argsrr.z*.egg bdist_eggrF)show_deprecation) distributionget_command_classrrensure_finalizedalways_copy_from package_indexscanglobr1get_command_obj egg_outputrbootstrap_install_frominsertrDr&)r rBcmdrDs rr*zinstall.do_egg_installns(::>JJ l  Cdi     " ty11222 %%%!11+>>IJ  , > KK:< = = = ''',0 )))rN)r0 __module__ __qualname____doc__rr user_optionsboolean_options new_commandsdict_ncrrr"r& staticmethodr'r*r rrrrsAA<,> B0L l2 C6O ../ --.L $|  C 6 6 6    " " "\B11111rrc:g|]}|dtjv|S)r)rr[).0rSs r r_s(KKKSQw{1J1JS1J1J1Jr)distutils.errorsrr(rNrr3distutils.command.installcommandrrr_install sub_commandsrYr rrres...... ((((((((( <u1u1u1u1u1dlu1u1u1tLKDL-KKK rPK{5ZBZZILib/site-packages/setuptools/command/__pycache__/build_py.cpython-311.pycnuW+A b;d#7 ddlmZddlmZddlmZddlmcmZddl Z ddl Z ddl Z ddl Z ddl ZddlZddlZddlZddlmZddlmZmZmZmZmZmZddlmZddlmZd ZGd d ejZd Z Gd dZ!dS))partial)glob) convert_pathN)Path)DictIterableIteratorListOptionalTuple)SetuptoolsDeprecationWarning)unique_everseencxtj|tj|jtjzdSN)oschmodstatst_modeS_IWRITE)targets jE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/build_py.py make_writablers,HVRWV__,t}<=====cxeZdZUdZdZeed<dZee ed<dZ d fd Z d Z d Z d Zd Zd ZdZdZd!dee ffd Zdee e ffdZdeee e ffdZdeee e ffdZdZdZdee de dee fdZdZdZ dZ!dZ"dZ#e$dZ%xZ&S)"build_pyaXEnhanced 'build_py' command that includes data files with packages The data files are specified via a 'package_data' argument to 'setup()'. See 'setuptools.dist.Distribution' for more details. Also, this version of the 'build_py' command allows you to specify both 'py_modules' and 'packages' in the same setup operation. F editable_modeNexisting_egg_info_dirctj||jj|_|jjpi|_d|jvr|jd=g|_dS)N data_files)origrfinalize_options distribution package_dataexclude_package_data__dict___build_py__updated_filesselfs rr!zbuild_py.finalize_options$s^ &&t,,, -:$($5$J$Pb! 4= ( ( l+!rc |r\tt|}tt|}t||||||Sr)strrresolvesuper copy_file)r(infileoutfile preserve_modepreserve_timeslinklevel __class__s rr.zbuild_py.copy_file,st  3f--//00F$w--//1122Gww  -!%u.. .rc0|js|jr|jrdS|jr||jr(|||tj |ddS)z?Build modules, packages, and copy data files to build directoryNr)include_bytecode) py_modulespackagesr build_modulesbuild_packagesbuild_package_data byte_compiler r get_outputsr's rrunz build_py.run5s 4= T5G  F ? !    = &    ! ! !  # # % % % $-33D13MMNNNNNrc|dkr ||_|jStj||S)zlazily compute data filesr)_get_data_filesrr r __getattr__)r(attrs rrBzbuild_py.__getattr__Es@ <  "2244DO? "}((t444rctj||||\}}|r|j|||fSr)r r build_moduler&append)r(module module_filepackager0copieds rrEzbuild_py.build_moduleLsK-44T6;PWXX  1  ' ' 0 0 0rc||tt|j|jpdS)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples)analyze_manifestlistmap_get_pkg_data_filesr9r's rrAzbuild_py._get_data_filesRs6 C0$-2E2FFGGGrc|jditt|j|jpdS)z Generate list of ``(package,src_dir,build_dir,filenames)`` tuples, but without triggering any attempt to analyze or build the manifest. manifest_filesrL)r% setdefaultrNrOrPr9r's rget_data_files_without_manifestz(build_py.get_data_files_without_manifestWs?   !12666C0$-2E2FFGGGrc||tjj|jg|dz}fd||D}|||fS)N.cPg|]"}tj|#SrL)rpathrelpath).0filesrc_dirs r z0build_py._get_pkg_data_files..is9    GOOD' * *   r)get_package_dirrrXjoin build_libsplitfind_data_files)r(rI build_dir filenamesr\s @rrPzbuild_py._get_pkg_data_filesas&&w//GLDN#3gmmC6H6H#HJ     ,,Wg>>   I55rc||j||}tttd|}t j|}ttj j |}t j|j |g|}||||S)z6Return filenames for package's data files in 'src_dir'T) recursive)_get_platform_patternsr#rOrr itertoolschain from_iterablefilterrrXisfilerRgetexclude_data_files)r(rIr\patternsglobs_expanded globs_matches glob_filesfiless rrbzbuild_py.find_data_filesos..       WTT:::HEE!55nEE BGNM::    # #GR 0 0   &&w???rreturnc|jr3t|St |S)1See :class:`setuptools.commands.build.SubCommand`)rrNget_output_mappingkeysr-r>)r(r7r5s rr>zbuild_py.get_outputssM   ://11668899 9ww""#3444rctj||}t t |dS)rvc|dS)NrrL)xs rz-build_py.get_output_mapping..s !A$r)key)rhri _get_package_data_output_mapping_get_module_mappingdictsorted)r(mappings rrwzbuild_py.get_output_mappingsP/  1 1 3 3  $ $ & &  F7777888rc#K|D]=\}}}|d}||j||}||fV>dS)z5Iterate over all modules producing (dest, src) pairs.rVN)find_all_modulesraget_module_outfiler`)r(rIrGrHfilenames rrzbuild_py._get_module_mappingsp.2.C.C.E.E * * *WfkmmC((G..t~wOOH[) ) ) ) ) * *rc#K|jD]R\}}}}|D]H}tj||}tj||}||fVISdS)z6Iterate over package data producing (dest, src) pairs.N)rrrXr_)r(rIr\rcrdrrsrcfiles rr~z)build_py._get_package_data_output_mappings|6:o ( ( 2GWi% ( (i::',,w99w''''' ( ( (rc|D]_\}}|tj||||\}}t |`dS)z$Copy data files into build directoryN)r~mkpathrrXdirnamer.r)r(rr_outf_copieds rr<zbuild_py.build_package_datass#DDFF " "OFG KK// 0 0 0!^^GV<.s-BBBQBRW%%a((BBBrc3 K|]}|vV dSrrL)rZr norm_paths r z/build_py._filter_build_files..s(-T-TQay.@-T-T-T-T-T-TrN) rr` build_temp build_baserrXrisabsall)r(rsrr build_dirs norm_dirsr[rs @rrzbuild_py._filter_build_filess**7330@%BRS BB*BBB   D((..I7==&& #-T-T-T-T)-T-T-T*T*T    rcdSrrLr's rget_data_fileszbuild_py.get_data_filess rc |j|S#t$rYnwxYwtj|||}||j|<|r |jjs|S|jjD]"}||ks||dzrn#|Stj |d5}| }dddn #1swxYwYd|vr#tj d|d|S)z8Check namespace packages' __init__ for declare_namespacerVrbNsdeclare_namespacezNamespace package problem: z is a namespace package, but its __init__.py does not call declare_namespace()! Please fix it. (See the setuptools manual under "Namespace Packages" for details.) ")packages_checkedKeyErrorr r check_packager"namespace_packages startswithioopenread distutilserrorsDistutilsError)r(rI package_dirinit_pypkgrcontentss rrzbuild_py.check_packagesk (1 1    D ---dG[II)0g& d/B N$7  Cg~~# !>!>~N WWd # # qvvxxH               x / /"111.s/OO7ug66OOOOOOrc3$K|] }|v|V dSrrL)rZfnbads rrz.build_py.exclude_data_files..s'77"3277r)rNrgr$rhrirjsetr) r(rIr\rsro match_groupsmatcheskeepersrs ` @rrnzbuild_py.exclude_data_files sU ..  %     POOOhOOO /// =='ll7777777OG,,---rctj|dg||g}fd|DS)z yield platform-specific path patterns (suitable for glob or fn_match) from a glob-based spec (such as self.package_data or self.exclude_package_data) matching package in src_dir. c3rK|]1}tjt|V2dSr)rrXr_r)rZrr\s rrz2build_py._get_platform_patterns..)sQ   GLL,w"7"7 8 8      r)rhrirm)specrIr\ raw_patternss ` rrgzbuild_py._get_platform_patternsse! HHR   HHWb ! !      (    r)r)r)Nr))r))'__name__ __module__ __qualname____doc__rbool__annotations__rr r+r!r.r?rBrErArTrPrbr r>rrwr r rr~r<rMrrrrrr^rn staticmethodrg __classcell__)r5s@rrrsV M4+/8C=///"""JK#$......OOO 555 HHH HHH 6 6 6@@@"55c555555 9DcN9999*XeCHo%>****((5c?2K(((("""'<'<'Inform users that package or module is included as 'data file'a Installing {importable!r} as data is deprecated, please list it in `packages`. !! ############################ # Package would be ignored # ############################ Python recognizes {importable!r} as an importable package, but it is not listed in the `packages` configuration of setuptools. {importable!r} has been automatically added to the distribution only because it may contain data files, but this behavior is likely to change in future versions of setuptools (and therefore is considered deprecated). Please make sure that {importable!r} is included as a package by using the `packages` configuration field or the proper discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" and "data files" on setuptools documentation page. !! c,t|_dSr)r_already_warnedr's r__init__z!_IncludePackageDataAbuse.__init___s"uurc|do)|dtd S)Nz.py)endswithlen isidentifier)r(r[s rrz"_IncludePackageDataAbuse.is_modulebs6}}U##I\s5zzk\(:(G(G(I(IIrct|j}ttjt j|j}|rd|g|SdS)NrV) rparentrNrh takewhiler+rpartsr_)r(rr[rrs rrz._IncludePackageDataAbuse.importable_subpackageesV4jjY()939EEFF  .88V,e,-- -trc||jvretj|j|}t j|td|j|dSdS)N)r) stacklevel) rrrMESSAGEformatwarningsrr add)r(rrs rrz_IncludePackageDataAbuse.warnlso T1 1 1/$,//66*6MMC M#; J J J J  $ $Z 0 0 0 0 0 2 1rN) rrrrrrrrrrLrrrrEs`HHG.%%%JJJ11111rr)" functoolsrrdistutils.utilrdistutils.command.build_pycommandrr rrrrrrrhrrpathlibrtypingrrr r r r setuptools._deprecation_warningr setuptools.extern.more_itertoolsrrrrrLrrr s'''''')))))))))   BBBBBBBBBBBBBBBBHHHHHH<<<<<<>>>U U U U U t}U U U p###*+1+1+1+1+1+1+1+1+1+1rPK{5Z"cFLLib/site-packages/setuptools/command/__pycache__/install_lib.cpython-311.pycnuW+A b;d#^ddlZddlZddlmZmZddlmcmZGddejZdS)N)productstarmapcfeZdZdZdZdZdZedZdZ edZ d d Z d Z d S) install_libz9Don't add compiled flags to filenames of non-Python filesc||}|||dSdSN)buildinstall byte_compile)selfoutfiless mE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/install_lib.pyrunzinstall_lib.run sD <<>>     h ' ' ' ' ' cfdD}t|}tt j|S)z Return a collections.Sized collections.Container of paths to be excluded for single_version_externally_managed installations. c3LK|]}|D]}|VdSr) _all_packages).0ns_pkgpkgr s r z-install_lib.get_exclusions..s\  ))&11          r)_get_SVEM_NSPsr_gen_exclusion_pathssetr_exclude_pkg_path)r all_packages excl_specss` rget_exclusionszinstall_lib.get_exclusionsso     --//   \4+D+D+F+FGG 741:>>???rcl|d|gz}tjj|jg|RS)zw Given a package name and exclusion path within that package, compute the full exclusion path. .)splitospathjoin install_dir)r rexclusion_pathpartss rrzinstall_lib._exclude_pkg_paths8  #.!11w|D,5u5555rc#PK|r!|V|d\}}}|dSdS)zn >>> list(install_lib._all_packages('foo.bar.baz')) ['foo.bar.baz', 'foo.bar', 'foo'] r N) rpartition)pkg_namesepchilds rrzinstall_lib._all_packages'sQ  <NNN#+#6#6s#;#; Hc5 < < < < %s)warninfor"r#dirnameappend)srcdstexcluder>r s rpfz!install_lib.copy_tree..pfhsig~~Ju HH'bgooc.B.B C C C OOC Jr)rorigr copy_treesetuptools.archive_utilr= distutilsr>) r infileoutfile preserve_modepreserve_timespreserve_symlinkslevelr=rGrFr>r s @@@rrIzinstall_lib.copy_treeWsII8IIII%%'' E#--dFGDD D =<<<<<!!!!!!        "---rctj|}|rfd|DS|S)Ncg|]}|v| SrT)rfrFs r z+install_lib.get_outputs..ys#;;;!!7*:*:A*:*:*:r)rHr get_outputsr)r outputsrFs @rrWzinstall_lib.get_outputsusQ"..t44%%''  <;;;;w;;; ;rN)r;r;rr;) __name__ __module__ __qualname____doc__rrr staticmethodrrrrIrWrTrrrrsCC((( @ @ @666<<\<DDD ""\".KL<rr) r"r8 itertoolsrrdistutils.command.install_libcommandrrHrTrrras &&&&&&&&,,,,,,,,,sssss$"sssssrPK{5ZPS<<MLib/site-packages/setuptools/command/__pycache__/easy_install.cpython-311.pycnuW+A b;dNdZddlmZddlmZddlmZmZddlmZmZm Z m Z ddl m Z m Z ddlmZddlmZdd lmZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd l Z dd l!Z!dd l"Z"dd l#Z#dd l$Z$dd l%Z%dd l&Z&dd l&m'Z'dd l(m)Z)dd l(m*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2m3Z3m4Z4ddl-m5Z5m6Z6ddl7m8Z8ddl9m:Z:m;Z;mZ>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFdd l9Z9ddlGmHZHddlImJZJejKde9jLgdZMdZNdZOdZPdZQGdd e*ZRd!ZSd"ZTd#ZUd$ZVd%ZWGd&d'e>ZXGd(d)eXZYejZ[d*d+d,kreYZXd-Z\d.Z]d/Z^d0Z_dPd1Z`d2Zad3Zbd4ejcvrebZdnd5ZddQd7Zed8Zfd9Zgd:Zh dd;lmiZjn#ek$rd<ZjYnwxYwd=ZiGd>d?elZmemnZoGd@dAemZpGdBdCZqGdDdEeqZrGdFdGerZseqjtZteqjuZudHZvdIZwdJe]fdKZxdLZydMZzGdNdOe)Z{d S)Ra) Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://setuptools.pypa.io/en/latest/deprecated/easy_install.html )glob) get_platform) convert_path subst_vars)DistutilsArgErrorDistutilsOptionErrorDistutilsErrorDistutilsPlatformError)logdir_util) first_line_re)find_executable)installN)get_path)SetuptoolsDeprecationWarning)Command) run_setup)setopt)unpack_archive) PackageIndexparse_requirement_arg URL_SCHEME) bdist_eggegg_info)Wheel) normalize_pathresource_stringget_distributionfind_distributions Environment Requirement Distribution PathMetadata EggMetadata WorkingSetDistributionNotFoundVersionConflict DEVELOP_DIST)ensure_directory) yield_linesdefault)category) easy_installPthDistributionsextract_wininst_cfgget_exe_prefixesc2tjddkS)NP)structcalcsizenE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/easy_install.pyis_64bitr:Ns ?3  1 $$r8c,|dS)Nutf8)encodess r9 _to_bytesr@Rs 88F  r8cT |ddS#t$rYdSwxYw)NasciiTF)r= UnicodeErrorr>s r9isasciirDVs@ t uus  ''cvtj|ddS)N z; )textwrapdedentstripreplace)texts r9 _one_linerrL^s. ?4 & & ( ( 0 0t < <Z1d?Z2dcd@Z3edAZ4dddDZ5dEZ6dFZ7dGZ8dHZ9dIZ:dJZ;ejdKZ<ejdLZ=dedNZ>ejdOZ?dPZ@dQZAdRZBdSZCdTZDdUZEdVZFdWZGejdXHZIdYZJeKeKdZd[\]ZLeKd^d_\ZMd`ZNdS)fr.z'Manage a download/build/install processz Find/get/install Python packagesT)zprefix=Nzinstallation prefix)zip-okzzinstall package as a zipfile) multi-versionmz%make apps have to require() a version)upgradeUz1force upgrade (searches PyPI for latest versions))z install-dir=dzinstall package to DIR)z script-dir=r?zinstall scripts to DIR)exclude-scriptsxzDon't install scripts) always-copyaz'Copy all needed packages to install dir)z index-url=iz base URL of Python Package Index)z find-links=fz(additional URL(s) to search for packages)zbuild-directory=bz/download/extract/build in DIR; keep the results)z optimize=Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])zrecord=Nz3filename in which to record list of installed files) always-unzipZz*don't install as a zipfile, no matter what)z site-dirs=Sz)list of directories where .pth files work)editableez+Install specified packages in editable form)no-depsNzdon't install dependencies)z allow-hosts=Hz$pattern(s) that hostnames must match)local-snapshots-oklz(allow building eggs from local checkouts)versionNz"print version information and exit)z no-find-linksNz9Don't load find-links defined in packages being installeduserNz!install in user site-package '%s') rNrPrUrRrWr`rbrergrhr]rNc tjdtd|_dx|_|_dx|_x|_|_d|_ d|_ d|_ d|_ dx|_ |_dx|_x|_|_dx|_x|_|_dx|_x|_|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ tBj"|_#tBj$|_%d|_&d|_'dx|_(|_)d|_*i|_+d|_,|j-j.|_.|j-/||j-0ddS)NzVeasy_install command is deprecated. Use build and pip and other standards-based tools.rr.)1warningswarnEasyInstallDeprecationWarningrhzip_oklocal_snapshots_ok install_dir script_direxclude_scripts index_url find_linksbuild_directoryargsoptimizerecordrR always_copy multi_versionr`no_deps allow_hostsrootprefix no_reportrginstall_purelibinstall_platlibinstall_headers install_libinstall_scripts install_data install_baseinstall_platbasesite USER_BASEinstall_userbase USER_SITEinstall_usersite no_find_links package_indexpth_filealways_copy_from site_dirsinstalled_projects_dry_run distributionverbose_set_command_optionsget_option_dictselfs r9initialize_optionszeasy_install.initialize_optionss  A )    044 d-DHHH4?T-A# &**  ?CC Ct'$*<:>> > t'7377 7DK$. ####   $ $ $!"044 -"$  (0  .. $#33NCC     r8cbd|D}tt|j|dS)Nc3K|]D}tj|stj|@|VEdSN)ospathexistsislink).0filenames r9 z/easy_install.delete_blockers..s`  !w~~h'' +-7>>(+C+C       r8)listmap _delete_path)rblockersextant_blockerss r9delete_blockerszeasy_install.delete_blockerssC  %-    S"O 4 455555r8ctjd||jrdStj|otj| }|rtn tj}||dS)Nz Deleting %s) r infodry_runrrisdirrrmtreeunlink)rris_treeremovers r9rzeasy_install._delete_pathsm %%% <  F'--%%BbgnnT.B.B*B#2&& r8cdjtj}td}d}t |jdit t )zT Render the Setuptools version and installation details, then exit. {}.{} setuptoolsz=setuptools {dist.version} from {dist.location} (Python {ver})Nr7)formatsys version_inforprintlocals SystemExit)verdisttmpls r9_render_versionzeasy_install._render_versionsU gnc./ --N kdk%%FHH%%&&&llr8cL |jo|tjd}t t j|_|j|j |j |j |tj jdtj jtj jtj j|jd|jdt!tddt!tddd t#jt&5|jt)jt)jd dddn #1swxYwY|jd t!td ddd|j|jd <|j|jd<|jr t8jst=jd| |!|"|#dddd|j$ |j%|_$|j&d|_&|'dd|'dd|jr|j(r|j(|_%|j)|_$|'ddtU|_+|j+,|-|j.|j/s|0tcj2dd}|j3p||_3|j+dd|_4|j%tk|j$fD]&}||j4vr|j46d|'|j7%d|j7dD}ndg}|j8'|9|j3|j4| |_8tu|j4tj;z|_<|j=9t}|j=t~r|j=|_=ng|_=|j@r,|j8A|j4tj;z|j&s|j8B|j=|'dd!|C|jD|_D|j/r|jEstd"|jGstd#g|_HdS)$Nr.r} exec_prefixabiflags platlibdirlib) dist_name dist_version dist_fullname py_versionpy_version_shortpy_version_nodot sys_prefixsys_exec_prefixrr)implementation_lowerimplementationpy_version_nodot_platwindiruserbaseusersitez6WARNING: The user site-packages directory is disabled.rorprtrFr)rororrorpr)rwrw__EASYINSTALL_INDEXzhttps://pypi.org/simple/c6g|]}|Sr7)rIrr?s r9 z1easy_install.finalize_options..0s DDD1QWWYYDDDr8,*) search_pathhosts)rvrvz9Must specify a build directory (-b) when using --editablez:No urls, filenames, or requirements specified (see --help))Irgrrsplitdict sysconfigget_config_vars config_varsupdaterget_name get_version get_fullnamermajorminorgetattr contextlibsuppressAttributeErrorr_get_implementationlower setdefaultrJrrrhrENABLE_USER_SITEr rk_fix_install_dir_for_user_siteexpand_basedirs expand_dirs_expandrprorset_undefined_optionsrr get_site_dirs all_site_dirsextend_process_site_dirsrr`check_site_dirrgetenvrr shadow_pathrinsertr{r create_indexr r local_indexrs isinstancestrrnscan_egg_linksadd_find_links_validate_optimizervrtrruoutputs)rr default_index path_itemrs r9finalize_optionszeasy_install.finalize_optionss /--//[&&((+  9 ; ;<< *3355 -99;;!.;;==$##9 T TCZ44!#|U;; ! !   0 0     # #(/(C(E(E(K(K(M(M")"="?"?%%                   ## # C2 & & . .sB 7 7   (,'<$'+'<$ 9 OT2 O HM N N N ++---   <):    ? "".DO   %!&D  "" 9    "" <    9 3- 3#3D "2DO ""9.BCCC*__ !!$"9"9$."I"IJJJ} "    ! ! ! "79STT 8=-aaa0)>$/+J+JJ 6 6I 000 ''9555   'DD(8(>(>s(C(CDDDEEEE   %!%!2!2D,.I J J J! ?   - -do > > > ""=2JKKK// >> = !5 #K y N#LNN N s+AG  G G c#jK|dStttj}d|dD}|D]k}t j|stjd|7t||vrt|dzt|VldS)Ncpg|]3}tj|4Sr7)rr expanduserrIrs r9rz3easy_install._process_site_dirs..Us=   ./BG  qwwyy ) )   r8rz"%s (in --site-dirs) does not existz$ (in --site-dirs) is not on sys.path) rrrrrrrr rkr)rnormpathrTs r9rzeasy_install._process_site_dirsOs   F~sx00  OOC     ( (A7==## (=qAAAA""(22*>>%Q'''''' ( (r8c t|}|tdvrtn"#t$r}td|d}~wwxYw|S)Nz--optimize must be 0, 1, or 2)intrange ValueErrorr)valueras r9rzeasy_install._validate_optimizecsl JJEE!HH$$  %   &/    s'* A AA c|jsdS||jd}t||jx|_|_t jd}||dS)z; Fix the install_dir if "--user" was used. Nz$User base directory is not specified_user) rhcreate_home_pathrr rrrname select_scheme)rmsg scheme_names r9rz+easy_install._fix_install_dir_for_user_siteps~y  F   (8C(-- -484IID1'''  ;'''''r8c|D]y}t||}|etjdkstjdkrtj|}t ||j}t|||zdS)Nposixnt)rrrrr rrsetattr)rattrsattrvals r9 _expand_attrszeasy_install._expand_attrss ) )D$%%C7g%%D',,S11C d&677dC(((  ) )r8c4|gddS)zNCalls `os.path.expanduser` on install_base, install_platbase and root.)rrr|Nr rs r9rzeasy_install.expand_basedirss% GGGHHHHHr8c8gd}||dS)z+Calls `os.path.expanduser` on install dirs.)rrrrrrNr")rdirss r9rzeasy_install.expand_dirss/    4     r8c|r |dtj|j|jjkrtj|j |jD]}|||j |j r|j }|j rFt|j }tt|D]}|||d||<ddlm}||j|j |fd|j z|tj|jjdS#tj|jjwxYw)NzXWARNING: The easy_install command is deprecated and will be removed in a future version.r) file_utilz'writing list of installed files to '%s')announcer WARNrr set_verbosityrur.rzrwrr|lenr distutilsr&execute write_filewarn_deprecated_options)rshow_deprecationspecrroot_lencounterr&s r9runzeasy_install.runs{   MM;    <4,4 4 4  dl + + + 9  : :!!$DL(89999{ ,9G"49~~H#(W#6#6GG+27+;HII+F((////// (4;*@=K   ( ( * * *  d/7 8 8 8 8 8C d/7 8 8 8 8s CD88 Ec tj}n/#t$r"tjdt j}YnwxYwtj|j d|zS)zReturn a pseudo-tempname base in the install directory. This code is intentionally naive; if a malicious party can write to the target directory you're already in deep doodoo. rztest-easy-install-%s) rgetpid Exceptionrandomrandintrmaxsizerjoinro)rpids r9pseudo_tempnamezeasy_install.pseudo_tempnamese  1)++CC 1 1 1.CK00CCC 1w||D,.Ds.JKKKs)AAcdSrr7rs r9r.z$easy_install.warn_deprecated_options r8c*t|j}tj|d}tj|sA tj|n+#ttf$r| YnwxYw||j v}|s|j s| }n| dz}tj|} |rtj|t|dtj|n+#ttf$r| YnwxYw|sG|j s@tjdd}t'j|j|j||r"|jt/||j |_nd|_|j r&tj|sd|_||_dS)z;Verify that self.install_dir is .pth-capable dir, if neededeasy-install.pthz .write-testw PYTHONPATHrN)rrorrr:rmakedirsOSErrorIOErrorcant_write_to_targetrrycheck_pth_processingr<ropencloseenvirongetr rk_easy_install__no_default_msgrr/)rinstdirr is_site_dirtestfile test_exists pythonpaths r9rzeasy_install.check_site_dirs!!1227<<);<<w~~g&& , , G$$$$W% , , ,))+++++ ,!33  ,4#5 ,3355KK++-- =H'..22K ,(Ih'''Xs##))+++ (####W% , , ,))+++++ , J4#5 J b99J HT*D,&> ! DM"s%A**%BB3A E%E('E(aS can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: %s The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: %s z This directory does not currently exist. Please create it and try again, or choose a different installation directory (using the -d or --install-dir option). a Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable. For information on other options, you may wish to consult the documentation at: https://setuptools.pypa.io/en/latest/deprecated/easy_install.html Please make the appropriate changes for your system and try again. c|jtjd|jfz}tj|js|d|jzz }n |d|jzz }t|)NrF) _easy_install__cant_write_msgrexc_infororrr_easy_install__not_exists_id_easy_install__access_msgr )rrs r9rFz!easy_install.cant_write_to_targetso#s|~~a'8$:J&LLw~~d.// , 4$.. .CC 4$++ +CS!!!r8cl|j}tjd||dz}|dz}tj|}tddz} |rt j|tj |}t j |dt|d} | |j dit|d }t j}tjd kr}tj|\}} tj|d } | d kotj| } | r| }d dlm} | |dddgd tj|rtjd| |r|tj|rt j|tj|rt j|dSdS |r|tj|rt j|tj|rt j|n#|r|tj|rt j|tj|rt j|wwxYw#t0t2f$r|YnwxYw|jstjd|dS)z@Empirically verify whether .pth files are supported in inst. dirz Checking .pth file support in %s.pthz.okzz import os f = open({ok_file!r}, 'w') f.write('OK') f.close() rFT)exist_okrANr pythonw.exe python.exer)spawnz-Ez-cpassz-TEST PASSED: %s appears to support .pth filesz+TEST FAILED: %s does NOT support .pth filesFr7)ror rr<rrrrLrdirnamerCrHwriterrrIr executablerrr:rdistutils.spawnr]rDrErFryrk) rrMrok_file ok_existsrr_rZrabasenamealtuse_altr]s r9rGz!easy_install.check_pth_processings" 3W===''))F2U"GNN7++    ) ( # '"""goog..G K$ / / / /Xs##A (  //fhh//000  ^ 7d??(* j(A(A%GX',,w >>C ((L8,s++)%( 111111z4v6:::7>>'** HG GGIII7>>'**'Ig&&&7>>(++(Ih'''''(( GGIII7>>'**'Ig&&&7>>(++(Ih''' GGIII7>>'**'Ig&&&7>>(++(Ih''''(E! ( ( (  % % ' ' ' ' ' (H! M HBG L L Lus!+AM-D%K++A?M*-%NNc $|jss|dr^|dD]H}|d|zr||||d|zI||dS)z=Write all the scripts for `dist`, unless scripts are excludedscriptszscripts/N)rqmetadata_isdirmetadata_listdirinstall_script get_metadatainstall_wrapper_scripts)rr script_names r9install_egg_scriptsz easy_install.install_egg_scriptsYs# (;(;I(F(F #44Y??   &&zK'?@@##+%%j;&>?? $$T*****r8c,tj|rZtj|D]C\}}}|D]:}|jtj||;DdS|j|dSr)rrrwalkrappendr:)rrbaser$filesrs r9 add_outputzeasy_install.add_outputgs 7==   &%'WT]] F F!dE %FFHL'' T8(D(DEEEEF F F L   % % % % %r8c:|jrtd|ddS)NzInvalid argument zW: you can't use filenames or URLs with --editable (except via the --find-links option).)r`rrr0s r9 not_editablezeasy_install.not_editableos9 = ##44   r8c|jsdStjtj|j|jrt|jd|jddS)Nz already exists in z; can't do a checkout there)r`rrrr:rtkeyrrxs r9check_editablezeasy_install.check_editablewsq}  F 7>>"',,t';TXFF G G #4///1   r8c#$Ktjd} t|Vtj|ot |dSdS#tj|ot |wwxYw)Nz easy_install-)r})tempfilemkdtemprrrrr)rtmpdirs r9_tmpdirzeasy_install._tmpdirs!)9::: 6f++    GNN6 " " 5vf~~~~~ 5 5 5BGNN6 " " 5vf~~~~ 5 5s A2BFc |5}t|tst|rU|||j||}|d|||dcdddStj |r:|||d|||dcdddSt|}| ||j |||j|j|j |j}| d|z}|jr|dz }t%||jt(kr&||||d|cdddS|||j||cdddS#1swxYwYdS)NTz+Could not find suitable distribution for %rz2 (--always-copy skips system and development eggs)Using)rrr!rryrdownload install_itemrrrrr|fetch_distributionrRr`rxrr precedencer(process_distributionlocation)rr0depsrdlrrs r9r.zeasy_install.easy_installs \\^^ LvdK00 7d## 7%%d++++44T6BBB,,T2vtTJJ  L L L L L L L LW^^D))7%%d+++,,T4tLL L L L L L L L L166D    % % %%88fdlDM$$d&6D|CdJ#POOC$S)))L00))$dGDDD9 L L L L L L L L<((t}fdKK= L L L L L L L L L L L L L L L L L Ls&A-GA G(B#GGGGc|p|j}|p"tj||k}|p|d }|pJ|jduoAtjt |t |jk}|r&|s$|j|jD]}|j |krnd}tj dtj ||r4| |||}|D]}||||n4||g}|||d|d| |D] }||vr|cS dSdS)N.eggTz Processing %srr)rxrrr_endswithrrr project_namerr rre install_eggsregg_distribution)rr0rrrinstall_neededrdistss r9rzeasy_install.install_items(;4+;'N27??8+D+D+N'Hx/@/@/H/H+H'  ! - 2 GOON844 5 5 40 1 1 2   & &():; & &=H,,E-"& "'"2"28"<"<===  E%%dHf==E < <))$d;;;; <**8445E  % %dE!HdG D D D    4<<KKK     r8c tj||dS#t$r8tj||ddYdSwxYw)Nrunix)r_select_schemerrrJ)rrs r9rzeasy_install.select_schemeso O  "4 . . . . . O O O O ) )$ Wf0M0M N N N N N N Os>AAc|||j|||j|jvr|j||j|||||j|j<tj |j ||g|R| dr4|j s-|j |d|s |jsdS|'|j|jkrtjd|dS|||vr0|}t%t'|}tj d| t)g|g|j|j}n^#t.$r"}t1t'||d}~wt2$r'}t1||d}~wwxYw|js|jr:|D]7}|j|jvr'||8tj d|dS)Nzdependency_links.txtzSkipping dependencies for %szProcessing dependencies for %sz'Finished processing dependencies for %s) update_pthraddrr{removerprr rinstallation_report has_metadatarrget_metadata_linesrxrkas_requirementr!rr%resolver.r&r r'reportr)r requirementrrrdistreqdistrosras r9rz!easy_install.process_distributions  t$$$ 4#DH- - -   # #D ) ) ) T"""   &&&,0) ))+tCdCCCDDD   4 5 5 &    - -''(>??    4D, 4 F  $[_)D)D H3T : : : F  D $;$;))++G%c'll33K 1;??? 4 nn,, t/1BGG$ 0 0 0 Q((a / 4 4 4 ,,! 3 4   =t4 = = =84#:::%%d&9&9&;&;<<< :KHHHHHs$/F66 HG H*"H  Hc|j|j S|drdS|dsdSdS)Nz not-zip-safeTzzip-safeF)rmr)rrs r9 should_unzipzeasy_install.should_unzipsO ; "{? "   ^ , , 4  ,, 4ur8ctj|j|j}tj|r%d}t j||j|j||Stj|r|}ntj ||krtj |tj |}t|dkrGtj||d}tj|r|}t|tj|||S)Nz<%r already exists in %s; build directory %s will not be keptrSr)rrr:rtr{rr rkrr_rlistdirr*r*shutilmove)rr0 dist_filename setup_basedstrcontentss r9 maybe_movezeasy_install.maybe_move sgll4/:: 7>>#   N  HS$(D$8* E E E  7== ' ' /&JJw}--;; -(((z*--H8}}!! " Z! E E 7==///!.J J$$$ r8c|jrdSt|D] }|j| dSr)rq ScriptWriterbestget_args write_script)rrrus r9rnz$easy_install.install_wrapper_scripts sX    F %%''0066 % %D D t $ $ $ % %r8c6t|}t||}|rA||t z}t ||z}||t|ddS)z/Generate a legacy script wrapper and install itr[N) rris_python_script_load_templaterr get_headerrr@)rrro script_textdev_pathr0 is_scriptbodys r9rlzeasy_install.install_script&s4&&(())$[+>>  F&&x00688;D&11+>>EK +y'='=sCCCCCr8cd}|r|dd}td|}|dS)z There are a couple of template scripts in the package. This function loads one of them and prepares it for use. z script.tmplz.tmplz (dev).tmplrutf-8)rJrdecode)rr raw_bytess r9rzeasy_install._load_template0sG  8<<77D#L$77 (((r8tr7cLfd|Dtjd|jtjj|}|jrdSt}t|tj |rt j |t|d|z5}||dddn #1swxYwYt|d|z dS)z1Write an executable file to the scripts directorycZg|]'}tjj|(Sr7)rrr:rp)rrVrs r9rz-easy_install.write_script..Bs+ @ @ @!RW\\$/1 - - @ @ @r8zInstalling %s script to %sNrAi)rr rrprrr:rvr current_umaskr*rrrHr`chmod)rrormodertargetmaskrZs` r9rzeasy_install.write_script?sR  @ @ @ @x @ @ @    -{DOLLLdo{;;  <  F   7>>& ! !  If    &#* % %  GGH                   fedl#####s$DD  D c|j|j|jd} ||dd}|||gS#t$rYnwxYw|}t j|r,|dst|||j n>t j |rt j |}| |r |jr|||||}t j|d}t j|st%t j|dd}|s/t'dt j |zt)|dkr/t'dt j |z|d }|jr*t-j|||gS|||S) N)r.exez.whl.pyzsetup.pyrz"Couldn't find a setup script in %srSzMultiple setup scripts in %sr) install_egg install_exe install_wheelrKeyErrorrrisfilerrunpack_progressrabspath startswithrtrr:rrr r*r`r rreport_editablebuild_and_install) rr0rr installer_map install_distr setup_scriptsetupss r9rzeasy_install.install_eggsSsA$$&   9(##%%bcc*L !L778 8    D   7>>- ( ( 81G1G1N1N 8 =&$2F G G G G W]]= ) ) 877J  ! !& ) ) J( J-1-=}jIIJw||J ;; w~~l++ %"',,z3 CCDDF $8GOOM2236{{Q$2GOOM223"!9L = D HT))$ == > > >I)), CC Cs"A AAc tj|r/t|tj|d}n!t t j|}tj ||S)NEGG-INFO)metadata) rrrr#r:r$ zipimport zipimporterr" from_filename)regg_pathrs r9rzeasy_install.egg_distributionsw 7== " " D#Hbgll8;E/G/GHHHH#9#8#B#BCCH)(XFFFFr8c tj|jtj|}tj|}|jst|||}tj |r!tj ||stj |r;tj |stj||jnDtj |r%|tj|fd|z d}tj |r3||rt$jd}}nwt$jd}}nh||r|||jd}}n4d}||rt$jd}}nt$jd}}||||f|dztj|tj|fzt5|| n #t6$rt5|d wxYw||||S) Nr Removing FMovingCopying ExtractingTz %s to %sfix_zipimporter_caches)rrr:rorerrr*rrsamefilerrr remove_treer,rrrrcopytreermkpathunpack_and_compilecopy2r_update_dist_cachesr6rv)rrr destinationrnew_dist_is_zippedrZrQs r9rzeasy_install.install_eggsgll   G  X & &  gook22 | * [ ) ) )$$X.. GNN; ' ') ,.G,<,.s=    GLLT!W - -   r8)rr)r0r r"rKrrrr:egg_namerr*r# _provider exe_to_eggrrHr`itemsrJtitlerIrrrr make_zipfilerrr) rrrcfgrregg_tmp _egg_infopkg_infrZkvrps @r9rzeasy_install.install_exesT!-00 ; :]J  V44GGJ 22\^^   7<< &(@AA  V#GLL*55 ',,y*55!!!%gy99  w///w~~g&& Wc""A GG- . . . *-- K K1(((GG!))C*=*=*C*C*E*E*E*EqqqIJJJ GGIIIW\\)Y77      $--d33       gt|T\    &111r8c  t| gg i fd}t||g} D]}|dr|d}|d}t j|ddz|d<tjj g|R} || |t j ||| t j tj dt j|dD]} t| rtj d| dz} tj| sat#| d } | d t| d z| d S) z;Extract a bdist_wininst to the directories an egg would usecR|} D]c\}}||rG||t|dz}|d}t jjg|R}|}|ds|dratj |d|d<d tj |dd< |n^|drI|dkrCd tj |dd< ||cSe|d stj d |dS) N/.pyd.dllrSrrSCRIPTS/rYzWARNING: can't process %s)rrr*rrrr:rr strip_modulesplitextrsr rk) srcrr?oldnewpartsrr native_libsprefixes to_compile top_levels r9processz(easy_install.exe_to_egg..processs A$  S<<$$ CHHII.CIIcNNE',w7777CB{{6**/bkk&.A.A/$-$:59$E$Eb CD "'"2"258"<"=%(version)s") # this version or higher z Note also that the installation directory must be on sys.path at runtime for this to work. (e.g. by being the application's script directory, by being on PYTHONPATH, or by being added to sys.path by your code.) Installedcd}|jrG|js@|d|jzz }|jt t t jvr |d|jzz }|j }|j }|j }d}|tzS)z9Helpful installation message for display to package usersz %(what)s %(eggloc)s%(extras)srFr) ryr~_easy_install__mv_warningrorrrr_easy_install__id_warningrrrgr) rreqrwhatregglocrrgextrass r9rz easy_install.installation_reportXs/   0dn 0 4$++ +Cs>38'D'DDDtd/// ,VXX~r8aR Extracted editable version of %(spec)s to %(dirname)s If it uses setuptools in its setup script, you can activate it in "development" mode by going to that directory and running:: %(python)s setup.py develop See the setuptools documentation for the "develop" command for more info. ctj|}tj}d|jt zzS)NrF)rrr_rra_easy_install__editable_msgr)rr0rr_pythons r9rzeasy_install.report_editableqs3'//,//d)FHH444r8ctjdttjdtt |}|jdkr'd|jdz z}|dd|zn!|jdkr|dd|jr|dd tj d |t|dzdd | t||dS#t$r#}td |jd|d}~wwxYw) Nzdistutils.command.bdist_eggzdistutils.command.egg_infor)rrSrrz-qz-nz Running %s %s zSetup script exited with )rmodulesrrrrrrrr rr*r:rrr ru)rrrrurs r9rzeasy_install.run_setupvsQ *>?$     lD ) ) ) ) )    .12<  s D E (EE cddg}tjdtj|} |tj|||||||t|g}g}|D];}||D]0}|| |j |1<|s|j stj d||t|tj|jS#t|tj|jwxYw)Nrz --dist-dirz egg-dist-tmp-)r}dirz+No eggs found in %s (setup script problem?))r~rrrr__set_fetcher_optionsrsrr rrrr rkrr)r) rrrrudist_dirall_eggseggsr{rs r9rzeasy_install.build_and_installsh\*#" (E(E    ,  % %bgool&C&C D D D KK ! ! ! NN<T : : :"H:..HD M M$SMMMDKK 0 0 K KLLLLM #  #F!### 8     dl + + + + 8     dl + + + +s C D//*EcD|jd}d}i}|D]\}}||vr |d||<t |}t j|d}tj ||dS)a When easy_install is about to run bdist_egg on a source dist, that source dist might have 'setup_requires' directives, requiring additional fetching. Ensure the fetcher options given to easy_install are available to that command as well. r.)rsrrrrvr{rS)r.z setup.cfgN) rrcopyrrrrr:r edit_config) rrtei_optsfetch_directives fetch_optionsr{rsettings cfg_filenames r9r5z!easy_install._set_fetcher_optionss#33NCCHHJJ    ( (HC***!$QM#  ]333w||D+66 <22222r8c |jdS|j|jD]v}|js|j|jkrt jd||j||j|jvr|j|jw|js|j|jjvrt jd|n\t jd||j ||j|jvr|j |j|j rdS|j |jdkrdStj|jd}tj|rtj|t'|d5}||j|jdzddddS#1swxYwYdS)Nz&Removing %s from easy-install.pth filez4%s is already the active version in easy-install.pthz"Adding %s to easy-install.pth filersetuptools.pthwtrF)rr{ryrr rrrpathsrrsrsaverrr:rorrrHr` make_relative)rrrTrrZs r9rzeasy_install.update_pthsI = Ftx( 4 4A% !* *E*E H=q A A A M  # # #zT--- '' 333! ;} 333J =tDDD !!$'''=(888$++DM::: <  F  8| # # F7<< 02BCC 7>>( # # Ih    (D ! ! GQ GGDM// >>E F F F G G G G G G G G G G G G G G G G G Gs66G99G=G=c2tjd|||S)NzUnpacking %s to %s)r debug)rrrs r9rzeasy_install.unpack_progresss &S111 r8cggfd}t|||js?D]>}tj|tjdzdz}t ||=dSdS)NcF|dr+|ds|n?|ds|dr|||j r|pdS)Nr EGG-INFO/r z.so)rrrsrr)rrrto_chmodrs r9pfz+easy_install.unpack_and_compile..pfs||E"" %3>>++F+F %!!#&&&&f%% %e)<)< %$$$  c * * *|#+3t 3r8imi)rrrrstatST_MODEr)rrrrMrZrrLrs` @@r9rzeasy_install.unpack_and_compiles  4 4 4 4 4 4 4 xb111 *%%%|   DL1U:fDa    r8c>tjrdSddlm} t j|jdz ||dd|j|jr|||jd|jt j|jdS#t j|jwxYw)Nr)rrS)rvforcer) rdont_write_bytecodedistutils.utilrr r)rrrv)rrrs r9rzeasy_install.byte_compiles  "  F////// ,  dlQ. / / / Laq$, O O O O}  a L  dl + + + + +C dl + + + +s ABBa bad install directory or PYTHONPATH You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: %s and your PYTHONPATH environment variable currently contains: %r Here are some of your options for correcting the problem: * You can choose a different installation directory, i.e., one that is on PYTHONPATH or supports .pth files * You can add the installation directory to the PYTHONPATH environment variable. (It must then also be on PYTHONPATH whenever you run Python and want to use the package(s) you are installing.) * You can set up the installation directory to support ".pth" files by using one of the approaches described here: https://setuptools.pypa.io/en/latest/deprecated/easy_install.html#custom-installation-locations Please make the appropriate changes for your system and try again. c|jsdSttjd}t |jD]c}||rLtj |s-| d|ztj |dddS)zCreate directories under ~.N~zos.makedirs('%s', 0o700)i) rhrrrr  only_strsrvaluesrr debug_printrC)rhomers r9rzeasy_install.create_home_path/sy  FBG..s3344d.557788 ) )Dt$$ )RW]]4-@-@ )  !;d!BCCC D%((( ) )r8z/$base/lib/python$py_version_short/site-packagesz $base/binrrz$base/Lib/site-packagesz $base/Scriptsc|dj}|jrt|}|j|d<|jt j|j}| D]'\}}t||dt|||(ddl m }|D]`}t||}|L|||}t jdkrt j|}t|||adS)Nrrtr)rr)get_finalized_commandrr}rINSTALL_SCHEMESrKrrDEFAULT_SCHEMErrrrSrrr )rrrschemerrrs r9rzeasy_install._expandEs00;;G ; -{++K"&+K )--bgt7JKKF#\\^^ - - c4t,,4D$,,,------ ) )D$%%C jk227g%%',,S11CdC(((  ) )r8)T)Fr)rr7)r%)O__name__ __module__ __qualname____doc__ descriptioncommand_consumes_argumentsrr user_optionsboolean_options negative_optrrrrr staticmethodrrrrrr rrr3r<r.rrGrHlstriprTrVrWrFrGrprvryr|rcontextmanagerrr.rrrrrrnrlrrrrrrrrr'r(rr.rrrr5rrrrrIrLrrr]r^rr7r8r9r.r.bs}114K!% 17GM769G?H < F @KHH6E 5? F :T^KL9L<O#H-LL/ / / b666\rrrh((\(&  \  ( ( ()))III ! ! !9999: L L L   +#+#+#Z'x (   VXX&ho'   VXX  #8?$   VXX """999v + + +&&&666LLLLB" " " " HOOO+/'I'I'I'IR.%%% DDDD ) )\ )$$$$(1D1D1DfGGG626262p+2+2+2\333j222:#8? $   VXX#8?$   L    %X_ &   VXX555 ,,,,0333.'G'G'GR &,,,&'x(   <UWW=@)))ddI"   OT-"N )))))r8r.ctjddtj}t d|S)NrBr)rrJrKrpathsepfilter)rs r9 _pythonpathro\s7 JNN< , , 2 22: > >E $  r8c gttjg}tjtjkr|tj|D]}}|stjdvr5tj |ddntj dkritj |ddj tj dtj |ddgn6|tj |ddgtjdkr d |vrtj d }|s3tj |d d d j tj d}|tdtdf}fd|Dt jrt jt'jt*5t!jdddn #1swxYwYt/t1t2S)z& Return a list of 'site' dirs )os2emxriscosLibz site-packagesrrz python{}.{}z site-pythondarwinzPython.frameworkHOMELibraryPythonrpurelibplatlibc3$K|] }|v|V dSrr7)rr?sitedirss r9rz get_site_dirs..s->>!AX,=,=A,=,=,=,=>>r8N)rrorr}rrsrrrr:seprrrJrKrrrrrrrgetsitepackagesrrr)rr}rYhome_sp lib_pathsr{s @r9rras H OOKMM""" |H #*$$((()!)!   </ / / OOBGLLHH I I I I Vs]] OO (M(#*:;#   VUM::     OO VUO<<    <8 # #  V + + z~~f%%  ',,    GNC, -         ##Xi%8%88I OO>>>>y>>>>>> ('''  ^ , ,00,..///000000000000000C1122H Os/'J""J&)J&c#Ki}|D]Q}t|}||vrd||<tj|sd||<tj|sc|tj|fV|SdS)zBYield sys.path directories that might contain "old-style" packagesrSrY)r@rBimportN) rrrrrrrHr:rr+rIrrstrip)inputsseenr_rurrZlineslines r9 expand_pathsrs D&-&- )) d?? W w}}W%%   7##un - -D==(( ===RW\\'40011AQ((E GGIII - -??8,,%dkkmm444<<T w}}T**BJt,,,,,,, - -&-&-r8cFt|d} tj|}| |dS|d|dz |dz }|dkr |dS||dz t jd|d\}}}|dvr |dS||d|zz d d d }tj |} ||} | d d d } | tj } |tj| n*#tj$rY|dSwxYw|dr|ds |dS||S#|wxYw)znExtract configuration data from a bdist_wininst .exe Returns a configparser.RawConfigParser, or None rbN  z:  7AY*fQi7 r>>2  1 y2~#]6166"::>>VU . . .(  % yBK()))44*400 66&>>DZZq))!,F]]3#<#>#>??F MM"+f-- . . . .!      z** #//'2J2J      sHH H 6AH 4H A>F H F0H /F00-H 4H H c ,gd}tj|} |D]}|j}|d}t |dkr\|ddkrP|ddr5|dd|d dd fnt |dks|d s|d r|d d vr| | }t|D]b}| dd}|ds#||dd|ddfc|n#|wxYwd|D}|||S)z4Get exe->egg path translations for a given .exe file))zPURELIB/r)zPLATLIB/pywin32_system32r)zPLATLIB/r)r zEGG-INFO/scripts/)zDATA/lib/site-packagesrrr r)rrSz .egg-inforNrKrYz -nspkg.pth)PURELIBPLATLIB\rrc@g|]\}}||fSr7)r)rrVys r9rz$get_exe_prefixes..s(44441aA444r8)rZipFileinfolistrrr*rrr:upperrrr+rIrJrrsrIsortreverse) exe_filenamerrOrrrrpths r9r1r1sH  %%AJJLL L LD=DJJsOOE5zzQ58z#9#98$$[11OOArr(;(;['IJJJE5zzQdmmF&;&;}}\** Qx~~#99966$<<..00&x00LLC))++--dC88C>>(33L eAhhh*Dr(JKKK   448444H MMOOO  Os FGGcdeZdZdZdZd fd ZdZdZedZ fdZ fd Z d Z xZ S) r/z)A .pth file with Distribution paths in itFr7c ||_ttt||_tt j|j|_| t gddt|j D]2}tt|jt|d3dS)NT)rrrrr{rrr_basedir_loadsuper__init__r+rDrr)rrr{r __class__s r9rzPthDistributions.__init__(s  S::;; %bgoodm&D&DEE   T4((( ++ @ @D TX1$==>> ? ? ? ? @ @r8cg|_d}t|j}tj|jr8t|jd}|D] }| drd}| }|j || r'| drttj|j|x}|jd<tj|r||vr"|jd|_d||< ||jr |sd|_|jr`|jd sE|j|jr#|jd ?dSdSdSdS)NFrtrT#r rS)rDrfromkeysr{rrrrrHrrrsrIrr:rrpopdirtyrI)r saw_importrrZrrs r9rzPthDistributions._load1s  }}T]++ 7>>$- ( ( T]D))A  ??8,,!%J{{}} !!$'''zz||tzz||'>'>s'C'C)7GLLt44))tz"~w~~d++tt||JNN$$$!%DJT GGIII : j DJj B!5!5!7!7  JNN   j B!5!5!7!7         r8c|jsdStt|j|j}|rt jd|j||}d |dz}tj |jrtj |jt|jd5}||dddn #1swxYwYnWtj |jr3t jd|jtj |jd|_dS)z$Write changed .pth file back to diskNz Saving %srFrCzDeleting empty %sF)rrrrFrDr rHr _wrap_linesr:rrrrrHr`r)r rel_pathsrdatarZs r9rEzPthDistributions.savePs\z  FT/<<==  % Ik4= 1 1 1$$Y//E99U##d*Dw~~dm,, ) $-(((dmT** a                W^^DM * * % I)4= 9 9 9 Idm $ $ $ s C..C25C2c|Srr7)rs r9rzPthDistributions._wrap_linesfs r8c |j|jvo)|j|jvp|jtjk}|r&|j|jd|_t|dS)z"Add `dist` to the distribution mapTN) rrDr{rgetcwdrsrrr)rrnew_pathrs r9rzPthDistributions.addjs M +  T]2- ,    J  dm , , ,DJ  Dr8c|j|jvr4|j|jd|_|j|jv4t |dS)z'Remove `dist` from the distribution mapTN)rrDrrr)rrrs r9rzPthDistributions.removexs`mtz)) J  dm , , ,DJmtz)) tr8c.tjt|\}}t |j}|g}tjdkrdp tj}t ||kr||jkrH|tj | | |Stj|\}}||t ||k|S)Nr) rrrrr*raltsepr|rscurdirrr:)rrnpathlastbaselenrr|s r9rFzPthDistributions.make_relativesgmmN4$8$899 tdl##i3&30"&%jjG## $$ RY''' xx&'--..KE4 LL    %jjG##Kr8)r7)r`rarbrcrrrrErirrrrF __classcell__)rs@r9r/r/#s33 E@@@@@@>,\            r8r/cPeZdZedZedZedZdS)RewritePthDistributionsc#@K|jV|D]}|V|jVdSr)preludepostlude)clsrrs r9rz#RewritePthDistributions._wrap_linessBk  DJJJJlr8z? import sys sys.__plen = len(sys.path) z import sys new = sys.path[sys.__plen:] del sys.path[sys.__plen:] p = getattr(sys, '__egginsert', 0) sys.path[p:p] = new sys.__egginsert = p + len(new) N)r`rarb classmethodrrLrrr7r8r9rrsW[ j   Gz   HHHr8rSETUPTOOLS_SYS_PATH_TECHNIQUErawrewritecttjtrtSt jtjS)z_ Return a regular expression based on first_line_re suitable for matching strings. )rr patternrrecompilerr7r8r9_first_line_rers@ -'-- :m+2244 5 55r8c|tjtjfvr5tjdkr%t |t j||Stj\}}}|d|dd|d|zf)NrrrSr1) rrrrrrNS_IWRITErrU)funcargexcetevrs r9 auto_chmodrsv  29%%%"'T// c4=!!!tCyy IBA a5"Q%%tttSS12 33r8ct|}t|tj|rt |dSt |dS)aa Fix any globally cached `dist_path` related data `dist_path` should be a path of a newly installed egg distribution (zipped or unzipped). sys.path_importer_cache contains finder objects that have been cached when importing data from the original distribution. Any such finders need to be cleared since the replacement distribution might be packaged differently, e.g. a zipped egg distribution might get replaced with an unzipped egg folder or vice versa. Having the old finders cached may then cause Python to attempt loading modules from the replacement distribution using an incorrect loader. zipimport.zipimporter objects are Python loaders charged with importing data packaged inside zip archives. If stale loaders referencing the original distribution, are left behind, they can fail to load modules from the replacement distribution. E.g. if an old zipimport.zipimporter instance is used to load data from a new zipped egg archive, it may cause the operation to attempt to locate the requested data in the wrong location - one indicated by the original distribution's zip archive directory information. Such an operation may then fail outright, e.g. report having read a 'bad local file header', or even worse, it may fail silently & return invalid data. zipimport._zip_directory_cache contains cached zip archive directory information for all existing zipimport.zipimporter instances and all such instances connected to the same archive share the same cached directory information. If asked, and the underlying Python implementation allows it, we can fix all existing zipimport.zipimporter instances instead of having to track them down and remove them one by one, by updating their shared cached zip archive directory information. This, of course, assumes that the replacement distribution is packaged as a zipped egg. If not asked to fix existing zipimport.zipimporter instances, we still do our best to clear any remaining zipimport.zipimporter related cached data that might somehow later get used when attempting to load data from the new distribution and thus cause such load operations to fail. Note that when tracking down such remaining stale data, we can not catch every conceivable usage from here, and we clear only those that we know of and have found to cause problems if left alive. Any remaining caches should be updated by whomever is in charge of maintaining them, i.e. they should be ready to handle us replacing their zip archives with new distributions at runtime. N)r_uncacherpath_importer_cache!_replace_zip_directory_cache_data*_remove_and_clear_zip_directory_cache_data) dist_pathrnormalized_paths r9rrsXx%Y//O _c5666D)/::::: 3?CCCCCr8cg}t|}|D]V}t|}||r0|||dztjdfvr||W|S)ap Return zipimporter cache entry keys related to a given normalized path. Alternative path spellings (e.g. those using different character case or those using alternative path separators) related to the same path are included. Any sub-path entries are included as well, i.e. those corresponding to zip archives embedded in other zip archives. rSr)r*rrrr|rs)rcacheresult prefix_lenpnps r9"_collect_zipimporter_cache_entriesrs}F_%%J  A   MM/ * * :j1n,-"&"== MM!    Mr8clt||D]"}||}||=|o |||}||||<#dS)a Update zipimporter cache data for a given normalized path. Any sub-path entries are processed as well, i.e. those corresponding to zip archives embedded in other zip archives. Given updater is a callable taking a cache entry key and the original entry (after already removing the entry from the cache), and expected to update the entry and possibly return a new one to be inserted in its place. Returning None indicates that the entry should not be replaced with a new one. If no updater is given, the cache entries are simply removed without any additional processing, the same as if the updater simply returned None. N)r)rrupdaterr old_entry new_entrys r9_update_zipimporter_cacher$s_0 G G!!!H !H59 5 5   E!H!!r8c&t||dSr)r)rrs r9rrDsou55555r8cDd}t|tj|dS)Nc.|dSr)clearrrs r92clear_and_remove_cached_zip_archive_directory_datazf_remove_and_clear_zip_directory_cache_data..clear_and_remove_cached_zip_archive_directory_dataIsr8rrr_zip_directory_cache)rrs r9rrHsE7BDDDDDDr8__pypy__cDd}t|tj|dS)Nc|tj||tj||Sr)rrrrrrs r9)replace_cached_zip_archive_directory_datazT_replace_zip_directory_cache_data..replace_cached_zip_archive_directory_data_sG OO     !$ ' ' '   Y;DA B B B r8rr)rrs r9rr^s?    " Y;= ? ? ? ? ? ?r8cZ t||ddS#ttf$rYdSwxYw)z%Is this string a valid Python script?execTF)r SyntaxError TypeError)rKrs r9 is_pythonr qsIh'''t  #uus **c tj|d5}|d}dddn #1swxYwYn#ttf$r|cYSwxYw|dkS)zCDetermine if the specified executable is a .sh (contains a #! line)zlatin-1)encodingr)N#!)rrHrrDrE)rafpmagics r9is_shr{s WZ) 4 4 4 GGAJJE                W  D=s.A: A>A>AAAc,tj|gS)z@Quote a command line argument according to Windows parsing rules subprocess list2cmdline)rs r9 nt_quote_argrs  "C5 ) ))r8c|ds|drdSt||rdS|dr.d|dvSdS)zMIs this text, as a whole, a Python script? (as opposed to shell/bat/etc. r.pywTrr/rF)rr r splitlinesr)rrs r9rrs8#4#4V#<#<th''td##?;1133A6<<>>>> 5r8)rcdSrr7)rus r9_chmodrr>r8ctjd|| t||dS#tj$r }tjd|Yd}~dSd}~wwxYw)Nzchanging mode of %s to %ozchmod failed: %s)r rHrrerror)rrras r9rrsxI)4666)tT 8))) $a((((((((()s*AAAceZdZdZgZeZedZedZ edZ edZ edZ dZ edZd Zed Zed Zd S) CommandSpeczm A command spec for a #! header, specified as a list of arguments akin to those passed to Popen. c|S)zV Choose the best CommandSpec class based on environmental conditions. r7rs r9rzCommandSpec.bests  r8ctjtj}tjd|S)N__PYVENV_LAUNCHER__)rrr rrarJrK)r_defaults r9_sys_executablezCommandSpec._sys_executables07##CN33z~~3X>>>r8ct||r|St|tr ||S||S||S)zg Construct a CommandSpec from a parameter to build_scripts, which may be None. )rrfrom_environment from_string)rparams r9 from_paramzCommandSpec.from_paramsd eS ! ! L eT " " 3u::  ='')) )u%%%r8c>||gSr)r&r"s r9r(zCommandSpec.from_environments!sC''))*+++r8cFtj|fi|j}||S)z} Construct a command spec from a simple string representing a command line parseable by shlex.split. )shlexr split_args)rstringrs r9r)zCommandSpec.from_strings+  F55cn55s5zzr8ctj|||_t j|}t |sdg|jdd<dSdS)Nz-xr)r.r_extract_optionsoptionsrrrD)rrcmdlines r9install_optionszCommandSpec.install_optionssc{4#8#8#E#EFF )$//w & $vDL!    & &r8c|dzd}t|}|r|dpdnd}|S)zH Extract any options from the first line of the script. rFrrSr)rrmatchgrouprI) orig_scriptfirstr7r3s r9r2zCommandSpec._extract_optionssb t#//11!4  &&u--*/7%++a..&BR}}r8cV||t|jzSr)_renderrr3rs r9 as_headerzCommandSpec.as_headers#||D4 #5#55666r8cd}|D]8}||r!||r |ddcS9|S)Nz"'rSr )rr)item_QUOTESqs r9 _strip_quoteszCommandSpec._strip_quotessW " "Aq!! "dmmA&6&6 "AbDz!!! r8cNtjd|D}d|zdzS)Nc3nK|]0}t|V1dSr)r rBrI)rr?s r9rz&CommandSpec._render..sQ*G*G8^^%%F4&&(())%  EJ&E ..u55;;==  b%%d+++!lVXX5 ++E4MMCIIII    r8cRtjd|}|rtddS)z? Prevent paths in *_scripts entry point names. z[\\/]z+Path separators not allowed in script namesN)rsearchr)r has_path_seps r9rWzScriptWriter._ensure_safe_nameQs9 y400  LJKK K L Lr8ctjdt|rtn|SNzUse best)rjrkrlrIr)r force_windowss r9 get_writerzScriptWriter.get_writerZs<  j"?@@@-:J"''))) Jr8ctjdks tjdkr)tjdkrt S|S)zD Select the best ScriptWriter for this environment. win32javar)rrrr_namerIrr"s r9rzScriptWriter.best`s@ <7 " "rw&'8'8RX=M=M&++-- -Jr8c#K|||zfVdSrr7)rrZrrMrs r9rYzScriptWriter._get_script_argsjs$Vk)******r8rc|j|}|||S)z;Create a #! line, getting options (if any) from script_text)command_spec_classrr+r5r=)rrracmds r9rzScriptWriter.get_headerosH$))++66zBB K(((}}r8)NFr)rN)r`rarbrcrGrHrjrXr rirrNrJrrirWrbrrYrr7r8r9rrsA x! ! ! BVXXC F%---[-777[7["LL\LKK[K [++[+[r8rceZdZeZedZedZedZedZ e dZ dS)rIc^tjdt|Sr`)rjrkrlrr"s r9rbzWindowsScriptWriter.get_writerzs%  j"?@@@xxzzr8c~tt|}tjdd}||S)zC Select the best ScriptWriter suitable for Windows )ranaturalSETUPTOOLS_LAUNCHERra)rWindowsExecutableLauncherWriterrrJrK)r writer_lookuplaunchers r9rzWindowsScriptWriter.bestsA 6   :>>"7FFX&&r8c#Ktdd|}|tjddvr3djd it }tj|tgd}| || ||}fd|D}|z||zd |fVd S) z For Windows, add a .py extension.pyarrRPATHEXT;zK{ext} not listed in PATHEXT; scripts will not be recognized as executables.)rtr -script.py.pyc.pyorrcg|]}|zSr7r7rrVrs r9rz8WindowsScriptWriter._get_script_args..***D1H***r8rNr7) rrrJrrrrrjrk UserWarningr_adjust_header) rrZrrMrextrrrs ` r9rYz$WindowsScriptWriter._get_script_argss6v...u5 bj+113399#>> > >-!!xx!!C M#{ + + +KKK 3##E622****c***Sj&;.X======r8cd}d}|dkr||}}tjtj|tj}|||}||r|n|S)z Make sure 'pythonw' is used for gui and 'python' is used for console (regardless of what sys.executable is). r[r\rT)r0repl)rrescape IGNORECASEsub _use_header)rrZ orig_headerrr pattern_ob new_headers r9r~z"WindowsScriptWriter._adjust_headersm   E>> 'TGZ ' 2 2BMBB ^^;T^BB  __Z88IzzkIr8cz|ddd}tjdkpt|S)z Should _adjust_header use the replaced header? On non-windows systems, always use. On Windows systems, only use the replaced header if it resolves to an executable on the system. r)r "rd)rIrrr)r clean_headers r9rzWindowsScriptWriter._use_headers:"!B$'--c22 |w&G/,*G*GGr8N) r`rarbrFrirrbrrYr~rirr7r8r9rIrIws+[  ' '[ ' > >[ > J J[ J H H\ H H Hr8rIc$eZdZedZdS)rpc#K|dkrd}d}dg}nd}d}gd}|||}fd|D} |z||zd| fVd zt|d fVtsd z} | tdfVd Sd S) zG For Windows, add a .py extension and an .exe launcher rTz -script.pywrclirw)rrxrycg|]}|zSr7r7r{s r9rzDWindowsExecutableLauncherWriter._get_script_args..r|r8rrr[z .exe.manifestN)r~get_win_launcherr:load_launcher_manifest) rrZrrMr launcher_typerrhdrrm_names ` r9rYz0WindowsExecutableLauncherWriter._get_script_argss E>>!MC(CC!MC)))C  //****c***cz3,c8<<<< 6M+M::     zz > O+F1$77= = = = = = > >r8N)r`rarbrrYr7r8r9rprps->>[>>>r8rpcd|z}tr@tdkr|dd}n-|dd}n|dd}td|S)z Load the Windows launcher (executable) suitable for launching a script. `type` should be either 'cli' or 'gui' Returns the executable as a byte string. z%s.exez win-arm64rz-arm64.z-64.z-32.r)r:rrJr)type launcher_fns r9rrs{T/Kzz7 >>[ ( (%--c9==KK%--c6::KK!))#v66 < 5 55r8c~tjtd}|dt zS)Nzlauncher manifest.xmlr) pkg_resourcesrr`rvars)rmanifests r9rrs0,X7NOOH ??7 # #dff ,,r8Fc.tj|||Sr)rr)r ignore_errorsonerrors r9rrs =}g 6 66r8cVtjd}tj||S)N)rumask)tmps r9rrs! (5//CHSMMM Jr8c$td|S)z, Exclude non-str values. Ref #3063. c,t|tSr)rr)rs r9zonly_strs.. sjc22r8)rn)rWs r9rVrVs 22F ; ;;r8ceZdZdZdS)rlzF Warning for EasyInstall deprecations, bypassing suppression. N)r`rarbrcr7r8r9rlrl sr8rlr)r)|rcrrSrrrdistutils.errorsrrr r r+r r distutils.command.build_scriptsr rbrdistutils.commandrrrrrr~rrrNr7rGrjrr5rrr.rrrrrrrsetuptools.sandboxrsetuptools.commandrsetuptools.archive_utilrsetuptools.package_indexrrrrrsetuptools.wheelrrrrrrr r!r"r#r$r%r&r'r(_pathr*extern.jaraco.textr+filterwarnings PEP440Warning__all__r:r@rDrLr.rorrr0r1r/rrJrKrrrrrrrbuiltin_module_namesrr rrrrr ImportErrorrr r&sys_executablerFrrIrprNrJrrrrrVrlr7r8r9rsx  ''''''33333333$#######999999++++++%%%%%%     333333((((((%%%%%%22222232222222"""""" $$$$$$,,,,,, M,GHHHH    %%%===w)w)w)w)w)7w)w)w)t' CCCL+-+-+-\&&&R"""Jiiiii{iiiX     .   ,:>>1599YFF. 6 6 6444ODODODd(!!!!@666DDD")))2&%???&***    """""""         )))P%P%P%P%P%$P%P%P%h,,..########qqqqqqqqh>H>H>H>H>H,>H>H>HB>>>>>&9>>>@. 2666&--- %j7777 <<<$@s'F..F98F9PK{5Z=PLib/site-packages/setuptools/command/__pycache__/install_scripts.cpython-311.pycnuW+A b;d4 ddlmZddlmcmZddlmZddlZddl Z ddl m Z m Z ddl mZGddejZdS) )logN)DistutilsModuleError) Distribution PathMetadata)ensure_directoryc&eZdZdZdZdZddZdS)install_scriptsz;Do normal script install, plus any egg_info wrapper scriptscRtj|d|_dS)NF)origr initialize_optionsno_ep)selfs qE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/install_scripts.pyr z"install_scripts.initialize_optionss$ //555 cXddlmcm}|d|jjr t j|ng|_ |j rdS| d}t|j t|j |j|j|j}| d}t%|dd} | d}t%|dd}n#t&t(f$rd}YnwxYw|j}|r d}|j}|t.jkr|g}|}|j|} ||| D] } |j|  dS) Nregg_info build_scripts executable bdist_wininst _is_runningFz python.exe)setuptools.command.easy_installcommand easy_install run_command distributionscriptsr r runoutfilesrget_finalized_commandregg_baserregg_name egg_versiongetattr ImportErrorr ScriptWriterWindowsScriptWritersysrbestcommand_spec_class from_paramget_args as_header write_script) reiei_cmddistbs_cmd exec_parambw_cmd is_wininstwritercmdargss rrzinstall_scripts.runs444444444 $$$   $   $ $T * * * *DM :  F++J77 O\&/6?KK OV/  ++O<<V\488  //@@F >>JJ12   JJJ   ,%J+F  ' '%J',,..99*EEOOD#--//:: % %D D t $ $ $ % %s&C77D  D tcddlm}m}tjd||jt j|j|}|j ||}|j s\t|t|d|z} | || ||d|z dSdS)z1Write an executable file to the scripts directoryr)chmod current_umaskzInstalling %s script to %swiN)rr;r<rinfo install_dirospathjoinrappenddry_runropenwriteclose) r script_namecontentsmodeignoredr;r<targetmaskfs rr.zinstall_scripts.write_script8sHHHHHHHH -{DrYs000000000111111 44444444$$$$$$;(;(;(;(;(d*;(;(;(;(;(rPK{5Z7VVJLib/site-packages/setuptools/command/__pycache__/build_ext.cpython-311.pycnuW+A b;d=ddlZddlZddlZddlmZddlmZddlm Z m Z m Z m Z ddl mZddlmZddlmZmZddlmZdd lmZdd lmZmZ ddlmZed n #e$reZYnwxYwed dd lm Z!dZ"dZ#dZ$dZ%ej&dkrdZ$n*ej'dkr ddl(Z(e)e(dxZ$Z#n #e$rYnwxYwdZ*dZ+GddeZe$s ej'dkr ddZ,dSdZ% ddZ,dS)NEXTENSION_SUFFIXES)cache_from_source)DictIteratorListTuple) build_ext) new_compiler)customize_compilerget_config_var)log) BaseError) ExtensionLibraryzCython.Compiler.MainLDSHARED) _config_varscptjdkrtj} dtd<dtd<dtd<t |tjtj|dS#tjtj|wxYwt |dS)Ndarwinz0gcc -Wl,-x -dynamiclib -undefined dynamic_lookuprz -dynamiclibCCSHAREDz.dylibSO)sysplatform _CONFIG_VARScopyr clearupdate)compilertmps kE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/build_ext.py_customize_compiler_for_shlibr!s |x!! %C  $'5L $!)L  x ( ( (     $ $ $ $ $     $ $ $ $8$$$$$s -A;;)B$FsharedrTntRTLD_NOWctr|ndS)N) have_rtld)ss r if_dlr)@s !11r!c>tD]}d|vr|cS|dkr|cSdS)z;Return the file extension for an abi3-compliant Extension()z.abi3z.pydNr)suffixs r get_abi3_suffixr-DsH$ f  MMM v  MMMr*c$eZdZUdZeed<dZeed<dZdede e e ffdZ dZ ded e de fd Z dee e e ffd Zd Zd ZdZdZdZdZdZdee fdZdee e ffdZdZdZddZdde defdZde fdZdS)r F editable_modeinplacec|jdc}|_tj|||_|r|dSdS)z;Build extensions in build directory, then copy if --inplacerN)r0 _build_extruncopy_extensions_to_source)self old_inplaces r r3z build_ext.runQsS$(L!! T\t"  -  * * , , , , , - -r*extreturnc||j}||}|d}d|dd}||}t j|t j|}t j|j |} || fS)N.) get_ext_fullnamenameget_ext_filenamesplitjoinget_package_dirospathbasename build_lib) r5build_pyr7fullnamefilenamemodpathpackage package_dir inplace_file regular_files r _get_inplace_equivalentz!build_ext._get_inplace_equivalentYs((22((22..%%((73B3<((..w77 w||K1A1A(1K1KLL w||DNH== l++r*cf|d}|jD]}|||\}}tj|s|js||||j|j r.| ||}| ||ddS)NrF)levelT)compile) get_finalized_command extensionsrNrBrCexistsoptional copy_fileverbose _needs_stub_get_equivalent_stub_write_stub_file)r5rFr7rLrM inplace_stubs r r4z#build_ext.copy_extensions_to_sourcecs--j99? G GC)-)E)EhPS)T)T &L, w~~l++ O3< O|\NNN G#88lKK %%lC%FFF G Gr* output_filectj|}|jd\}}}tj||dSNr:.py)rBrCdirnamer= rpartitionr@)r5r7r\dir__r=s r rYzbuild_ext._get_equivalent_stubtsOw{++X((-- 1d',,tT**////r*c#K|jsdS|d}|djpd}|jD]|}|||\}}||fV|jrT|||}|||}t||}t||} | |fV}dS)NrF install_libr&) optimization)r0rRoptimizerSrNrXrY_compiled_file_name) r5rFoptr7rLrMr[ regular_stub inplace_cache output_caches r _get_output_mappingzbuild_ext._get_output_mappingys|  F--j99((77@FB? 4 4C)-)E)EhPS)T)T &L,. . . . 4 $88lKK #88lKK 3Ls S S S 2r ext_mapgetattrr-len isinstancersplitextshlib_compilerlibrary_filenamelibtype use_stubs_links_to_dynamic)r5rGso_extrHr7use_abi3fnds r r>zbuild_ext.get_ext_filenamesM233  2w|X^^C%8%89FBHH!24BBH#L11F t| # #,x(Cs$455K/:K:KH -#Mc&kk\M2(**#f,#w'' 3'**844C*;;BHHH 3s4 3 h//2w||Aurz222r*cftj|d|_g|_i|_d|_dS)NF)r2initialize_optionsrxshlibsrsr/r5s r rzbuild_ext.initialize_optionss7%d+++"  "r*ctj||jpg|_||jd|jD|_|jr||jD]!}||j|_"|jD]E}|j}||j |<||j | dd<|jr| |pd}|otot|t }||_||_||x}|_t&jt&j|j|}|r#||jvr|j||r>tr7t&j|jvr$|jt&jG|jr d|_dSdS)Nc<g|]}t|t|S)rvr).0r7s r z.build_ext.finalize_options..s6444s$S'224s444r*r:r;FT)r2finalize_optionsrScheck_extensions_listrsetup_shlib_compilerr<r= _full_namersr?links_to_dynamicr{rvrr|rXr> _file_namerBrCr`r@rE library_dirsappendcurdirruntime_library_dirsr/r0)r5r7rGltdnsrHlibdirs r rzbuild_ext.finalize_optionss#D)))//R ""4?33344do444 ; (  % % ' ' '? = =C!2238< %  " "4> 2 2 2   (  % %d&7 8 8 8 : !  - -dj 9 9 9   (  % %d&7 8 8 8'9&@&@&J&J###r*cdt|tr|jStj||SN)rvrexport_symbolsr2get_export_symbols)r5r7s r rzbuild_ext.get_export_symbolss0 c7 # # &% %,T3777r*c>||j} t|tr |j|_t j|||jr0|dj }| ||||_dS#||_wxYw)NrF) _convert_pyx_sources_to_langrrvrrxr2build_extensionrXrRrE write_stub)r5r7 _compilerrEs r rzbuild_ext.build_extensions ((***M  &#w'' 4 $ 3  &tS 1 1 1 0 66zBBL  3///%DMMMIDM % % % %s A-B Bc td|jDd|jddddgzt fd|jDS)z?Return true if 'ext' links to a dynamic lib in the same packagecg|] }|j Sr)r)rlibs r rz.build_ext.links_to_dynamic..s!H!H!HS#.!H!H!Hr*r:Nr;r&c3&K|] }|zvV dSrr)rlibnamelibnamespkgs r z-build_ext.links_to_dynamic..s,JJ3=H,JJJJJJr*)dictfromkeysrr@rr?anyr)r5r7rrs @@r rzbuild_ext.links_to_dynamics ==!H!HDK!H!H!HIIhhs~++C00"5<==JJJJJCMJJJJJJr*c|jr3t|St t j||zSr)r0listget_output_mappingkeyssortedr2 get_outputs_build_ext__get_stubs_outputsrs r rzbuild_ext.get_outputss\ < ://11668899 9j,T22T5M5M5O5OOPPPr*ch|}tt|dS)z1See :class:`setuptools.commands.build.SubCommand`c|dS)Nrr)xs r z.build_ext.get_output_mapping..s !A$r*)key)rmrr)r5mappings r rzbuild_ext.get_output_mapping s0**,,F7777888r*cfdjD}tj|}t d|DS)Nc3K|]?}|j tjjjg|jdRV@dS)r:N)rXrBrCr@rErr?)rr7r5s r rz0build_ext.__get_stubs_outputs..se   GL D#.*>*>s*C*C D D D      r*c3&K|] \}}||zV dSrr)rbasefnexts r rz0build_ext.__get_stubs_outputs..s*::[T5D5L::::::r*)rS itertoolsproduct!_build_ext__get_output_extensionsr)r5 ns_ext_basespairss` r __get_stubs_outputszbuild_ext.__get_stubs_outputssj       !,0L0L0N0NOO::E::::::r*c#ZKdVdV|djrdVdSdS)Nr_z.pycrFz.pyo)rRrgrs r __get_output_extensionsz!build_ext.__get_output_extensionssH   % %j 1 1 : LLLLL  r*ctjj|g|jdRdz}||||dSr^)rBrCr@rr?rZ)r5 output_dirr7rQ stub_files r rzbuild_ext.write_stub!sNGLHcn.B.B3.G.GHHH5P  ig66666r*rc\tjd|j||r1tj|rt |dz|jst|d}| d dddtdzd tj |j zd d d td dddtddddddtddddg||r||dSdS)Nz writing stub loader for %s to %sz already exists! Please delete.w zdef __bootstrap__():z- global __bootstrap__, __file__, __loader__z0 import sys, os, pkg_resources, importlib.utilz, dlz: __file__ = pkg_resources.resource_filename(__name__,%r)z del __bootstrap__z if '__loader__' in globals():z del __loader__z# old_flags = sys.getdlopenflags()z old_dir = os.getcwd()z try:z( os.chdir(os.path.dirname(__file__))z$ sys.setdlopenflags(dl.RTLD_NOW)z3 spec = importlib.util.spec_from_file_location(z# __name__, __file__)z0 mod = importlib.util.module_from_spec(spec)z! spec.loader.exec_module(mod)z finally:z" sys.setdlopenflags(old_flags)z os.chdir(old_dir)z__bootstrap__()r&)rinforrBrCrTrropenwriter@r)rDrclose_compile_and_remove_stub)r5rr7rQfs r rZzbuild_ext._write_stub_file%sR 3S^YOOO  Krw~~i00 KI(IIJJ J| Y$$A GG *CF&MM"$g&&s~667+6+?@@.>@AAI9F7!>??,%1   8 GGIII  5  ) )) 4 4 4 4 4 5 5r*c"ddlm}||gdd|j|dj}|dkr||g|d|jt j|r|jst j|dSdSdS)Nr) byte_compileT)rgrrre) distutils.utilrrrRrgrBrCrTunlink)r5rrrgs r rz"build_ext._compile_and_remove_stubKs////// i[1 7 7 7 7--m<<E a<< L)x#T\ ; ; ; ; 7>>) $ $ !T\ ! Ii  ! ! ! !r*N)F) __name__ __module__ __qualname__r/bool__annotations__r0r3rr strrNr4rYrrmr>rrrrrrrrrrrrrrZrrr*r r r MsM4GT---,Y,5c?,,,, G G G"0 000000 4XeCHo%>44442.###   @KKK6888 & & &KKKQT#YQQQQ 9DcN9999 ; ; ; 7777$5$5#$5I$5$5$5$5L !# ! ! ! ! ! !r*r c R||j||||||||| | | | dSr)linkSHARED_LIBRARY) r5objectsoutput_libnamerrrrrdebug extra_preargsextra_postargs build_temp target_langs r rr[sF  .  <1E E=.       r*staticc ,|Jtj|\}} tj| \}}|ddr |dd}|||||| dS)Nrr)rBrCr?rwry startswithcreate_static_lib)r5rrrrrrrrrrrrrHrDr7s r rrjs!!!!w}}^<< H((22 #   % % 0 0 7 7 $ |H  Xz5+     r*) NNNNNrNNNN)-rBrrimportlib.machineryrimportlib.utilrrhtypingrrrr distutils.command.build_extr _du_build_extdistutils.ccompilerr distutils.sysconfigr r distutilsrsetuptools.errorsrsetuptools.extensionrrCython.Distutils.build_extr2 __import__ ImportErrorrrr!r'r{rzrr=dlhasattrr)r-rrr*r r s 222222CCCCCC............BBBBBB,,,,,,BBBBBBBB''''''33333333BBBBBBJ%&&&&JJJz<<<<<<%%%(   <8IIW__  'J 7 77 II      """H!H!H!H!H! H!H!H!V ' 4GKIMIM       GGKIMIM       s$A A*)A*!B44B<;B<PK{5ZӤbWWGLib/site-packages/setuptools/command/__pycache__/upload.cpython-311.pycnuW+A b;dPddlmZddlmZddlmZGddejZdS))log)upload)RemovedCommandErrorceZdZdZdZdS)rz)Formerly used to upload packages to PyPI.cjd}|d|ztjt|)Nz[The upload command has been removed, use twine to upload instead (https://pypi.org/p/twine)zERROR: )announcerERRORr)selfmsgs hE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/upload.pyrunz upload.run s6 3 i#osy111!#&&&N)__name__ __module__ __qualname____doc__r rr rrs)33'''''rrN) distutilsrdistutils.commandrorigsetuptools.errorsrrrr rsq,,,,,,111111 ' ' ' ' 'T[ ' ' ' ' 'rPK{5ZH..LLib/site-packages/setuptools/command/__pycache__/upload_docs.cpython-311.pycnuW+A b;dFdZddlmZddlmZddlmZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlmZddlmZd d lmZd ZGd d eZdS)z|upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to sites other than PyPi such as devpi). )standard_b64encode)log)DistutilsOptionErrorN)metadata)SetuptoolsDeprecationWarning)uploadc.|ddS)Nzutf-8surrogateescape)encode)ss mE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/upload_docs.py_encoders 88G. / //ceZdZdZdZdddejzfddgZejZdZd efgZ d Z d Z d Z d Z edZedZdZdS) upload_docszhttps://pypi.python.org/pypi/z;Upload documentation to sites other than PyPi such as devpiz repository=rzurl of repository [default: %s])z show-responseNz&display full response text from server)z upload-dir=Nzdirectory to uploadcZt|jduotjddS)Nzdistutils.commands build_sphinx)groupname)bool upload_dirr entry_pointsselfs r has_sphinxzupload_docs.has_sphinx0s8 Ot # W%,@~VVV   rrcJtj|d|_d|_dS)N)r initialize_optionsr target_dirrs rr zupload_docs.initialize_options8s%!$'''rctjdtj||j|r5|d}t|jd|_ na|d}tj |j d|_ n!|d|j|_ |d|j zdS)NzWUpload_docs command is deprecated. Use Read the Docs (https://readthedocs.org) instead.rhtmlbuilddocsrzUsing upload directory %s)rwarnr finalize_optionsrrget_finalized_commanddictbuilder_target_dirsr!ospathjoin build_baseensure_dirnameannounce)rrr$s rr'zupload_docs.finalize_options=s  1 2 2 2 %%% ? "   I#99.II "&|'G"H"H"P227;;"$',,u/?"H"H    - - -"oDO 1DOCDDDDDrctj|d} ||jt j|jD]\}}}||jkr|sd}t ||jz|D]}tj||}|t|jd tjj } tj| |} | ||  | dS#| wxYw)Nwz'no files found in upload directory '%s')zipfileZipFilemkpathr!r+walkrr,r-lenlstripsepwriteclose) rfilenamezip_filerootdirsfilestmplrfullrelativedests rcreate_zipfilezupload_docs.create_zipfileNs.?8S11  KK ( ( (%'WT_%=%= / /!dE4?**5*DD.tdo/EFFF!//D7<<d33D#C$8$8$9$9:AA"'+NNH7<<$77DNN4.... /  / NN     HNN    s C9D''D=ctjdt|D]}||t j}|jj }tj |d|z} | |||tj|dS#tj|wxYw)Nziupload_docs is deprecated and will be removed in a future version. Use tools like httpie or curl instead.z%s.zip)warningsr&rget_sub_commands run_commandtempfilemkdtemp distributionrget_namer+r,r-rE upload_fileshutilrmtree)rcmd_nametmp_dirrr=s rrunzupload_docs.run^s  > (   --// ' 'H   X & & & &"$$ )22447<<D99 #    ) ) )   X & & & M' " " " " "FM' " " " "s *CC2c#0K|\}}d|z}t|ts|g}|D]n}t|tr|d|dzz }|d}nt|}|Vt|VdV|V|r|dddkrdVodS) Nz* Content-Disposition: form-data; name="%s"z; filename="%s"rr s   ) isinstancelisttupler)item sep_boundarykeyvaluestitlevalues r _build_partzupload_docs._build_partrs V=C&$'' XF  E%'' '*U1X55a   %.. MMMKKK rssu,,   rcbd}d|dz}|dz}|df}tj|j|}t ||}t j|}t j||} d|z} d | | fS) z= Build up the MIME payload for the POST data z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s --asciis--rW)r\z multipart/form-data; boundary=%sr) r functoolspartialramapitems itertoolschain from_iterabler-) clsdataboundaryr\ end_boundary end_itemsbuilder part_groupsparts body_items content_types r_build_multipartzupload_docs._build_multiparts I!9!99 #e+  %( # O%   '4::<<00 --k::_UI66 9HD xx ##\11rcRt|d5}|}dddn #1swxYwY|jj}d|t j||fd}t|j dz|j z}t| d}d|z}| |\}} d|jz} || t jt$j|j\} } } }}}|s|s|rJ| dkr t*j| }n8| d kr t*j| }nt3d | zd } ||d | | }|d ||dt;t=||d||| |nJ#tBj"$r8}|t;|t j#Yd}~dSd}~wwxYw|$}|j%dkr3d|j%d|j&} || t jn|j%dkrT|'d}|d|z}d|z} || t jn2d|j%d|j&} || t j#|j(r%tSd|ddSdS)Nrb doc_upload)z:actionrcontent:rczBasic zSubmitting documentation to %shttphttpszunsupported schema POSTz Content-typezContent-length AuthorizationzServer response (z): i-Locationzhttps://pythonhosted.org/%s/zUpload successful. Visit %szUpload failed (zK---------------------------------------------------------------------------)*openreadrLrrMr+r,basenamerusernamepasswordrdecoderu repositoryr0rINFOurllibparseurlparser{clientHTTPConnectionHTTPSConnectionAssertionErrorconnect putrequest putheaderstrr7 endheaderssendsocketerrorERROR getresponsestatusreason getheader show_responseprint)rr<frymetarl credentialsauthbodyctmsgschemanetlocurlparamsquery fragmentsconnrterlocations rrNzupload_docs.upload_files (D ! ! QffhhG                )#MMOO((22G<   dmc1DMABB (55<< 8 8 8 NN+ST^^ < < < NN?D 1 1 1 OO    IIdOOOO|    MM#a&&#) , , , FFFFF       8s???01!((CC MM#sx ( ( ( ( X__{{:..H9DMMOOK/(:C MM#sx ( ( ( ( /0hhhAC MM#sy ) ) )   0 (AFFHHh / / / / / 0 0s%266B1IJ-JJN)__name__ __module__ __qualname__DEFAULT_REPOSITORY descriptionr user_optionsboolean_optionsr sub_commandsr r'rErS staticmethodra classmethodrurNrrrr s9OK  *V-F F H 34 L,O   $Z01L EEE" ###(\&22[2$<0<0<0<0<0rr)__doc__base64r distutilsrdistutils.errorsrr+rr3rJrOrhrd http.clientr{ urllib.parserrG _importlibrr}rr rrrrrrs0 &%%%%%111111  !!!!!!++++++000u0u0u0u0u0&u0u0u0u0u0rPK{5Z-l'iiFLib/site-packages/setuptools/command/__pycache__/build.cpython-311.pycnuW+A b;dddlZddlZddlmZmZmZddlmZddl m Z ej dkrddlm Z nerddl m Z nddlmZ hdZGd d eZGd d e ZdS) N) TYPE_CHECKINGListDict)build)SetuptoolsDeprecationWarning))Protocol)ABC>build_py build_ext build_clib build_scriptsc<eZdZejddZfdZxZS)rNcdtjD}|tz r-d}tj|t tj|_t S)Nch|] }|d S)r).0cmds gE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/command/build.py z)build.get_sub_commands..s===#s1v===z It seems that you are using `distutils.command.build` to add new subcommands. Using `distutils` directly is considered deprecated, please use `setuptools.command.build`. )_build sub_commands_ORIGINAL_SUBCOMMANDSwarningswarnrsuperget_sub_commands)self subcommandsmsg __class__s rrzbuild.get_sub_commandssd==)<=== . . 4C M#; < < < & 3D ww'')))r)__name__ __module__ __qualname__rrr __classcell__)r#s@rrrsI&qqq)L * * * * * * * * *rrceZdZUdZdZeed< eed< dZdZ dZ de efd Z de efd Z deeeffd Zd S) SubCommanda4In order to support editable installations (see :pep:`660`) all build subcommands **SHOULD** implement this protocol. They also **MUST** inherit from ``setuptools.Command``. When creating an :pep:`editable wheel <660>`, ``setuptools`` will try to evaluate custom ``build`` subcommands using the following procedure: 1. ``setuptools`` will set the ``editable_mode`` attribute to ``True`` 2. ``setuptools`` will execute the ``run()`` command. .. important:: Subcommands **SHOULD** take advantage of ``editable_mode=True`` to adequate its behaviour or perform optimisations. For example, if a subcommand don't need to generate any extra file and everything it does is to copy a source file into the build directory, ``run()`` **SHOULD** simply "early return". Similarly, if the subcommand creates files that would be placed alongside Python files in the final distribution, during an editable install the command **SHOULD** generate these files "in place" (i.e. write them to the original source directory, instead of using the build directory). Note that ``get_output_mapping()`` should reflect that and include mappings for "in place" builds accordingly. 3. ``setuptools`` use any knowledge it can derive from the return values of ``get_outputs()`` and ``get_output_mapping()`` to create an editable wheel. When relevant ``setuptools`` **MAY** attempt to use file links based on the value of ``get_output_mapping()``. Alternatively, ``setuptools`` **MAY** attempt to use :doc:`import hooks ` to redirect any attempt to import to the directory with the original source code and other files built in place. Please note that custom sub-commands **SHOULD NOT** rely on ``run()`` being executed (or not) to provide correct return values for ``get_outputs()``, ``get_output_mapping()`` or ``get_source_files()``. The ``get_*`` methods should work independently of ``run()``. F editable_mode build_libcdSz@(Required by the original :class:`setuptools.Command` interface)Nrr s rinitialize_optionszSubCommand.initialize_optionsircdSr-rr.s rfinalize_optionszSubCommand.finalize_optionslr0rcdSr-rr.s rrunzSubCommand.runor0rreturncdS)a Return a list of all files that are used by the command to create the expected outputs. For example, if your build command transpiles Java files into Python, you should list here all the Java files. The primary purpose of this function is to help populating the ``sdist`` with all the files necessary to build the distribution. All files should be strings relative to the project root directory. Nrr.s rget_source_fileszSubCommand.get_source_filesrr0rcdS)a Return a list of files intended for distribution as they would have been produced by the build. These files should be strings in the form of ``"{build_lib}/destination/file/path"``. .. note:: The return value of ``get_output()`` should include all files used as keys in ``get_output_mapping()`` plus files that are generated during the build and don't correspond to any source file already present in the project. Nrr.s r get_outputszSubCommand.get_outputs}r0rcdS)a Return a mapping between destination files as they would be produced by the build (dict keys) into the respective existing (source) files (dict values). Existing (source) files should be represented as strings relative to the project root directory. Destination files should be strings in the form of ``"{build_lib}/destination/file/path"``. Nrr.s rget_output_mappingzSubCommand.get_output_mappingr0rN)r$r%r&__doc__r*bool__annotations__strr/r2r4rr7r9rr;rrrr)r)$s$$L M4NNN(OOOOOOOOO  $s)       T#Y      DcN      rr))sysrtypingrrrdistutils.command.buildrr setuptoolsr version_infor typing_extensionsabcr rr)rrrrGs" ,,,,,,,,,,333333333333v$*******######QPP*****F***"n n n n n n n n n n rPK{5Z;1Lib/site-packages/setuptools/command/dist_info.pynuW+A""" Create a dist_info directory As defined in the wheel specification """ import os import re import shutil import sys import warnings from contextlib import contextmanager from inspect import cleandoc from pathlib import Path from distutils.core import Command from distutils import log from setuptools.extern import packaging from setuptools._deprecation_warning import SetuptoolsDeprecationWarning class dist_info(Command): description = 'create a .dist-info directory' user_options = [ ('egg-base=', 'e', "directory containing .egg-info directories" " (default: top of the source tree)" " DEPRECATED: use --output-dir."), ('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 = ['tag-date', 'keep-egg-info'] negative_opt = {'no-date': 'tag-date'} def initialize_options(self): self.egg_base = None 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): if self.egg_base: msg = "--egg-base is deprecated for dist_info command. Use --output-dir." warnings.warn(msg, SetuptoolsDeprecationWarning) self.output_dir = self.egg_base or self.output_dir dist = self.distribution project_dir = dist.src_root or os.curdir self.output_dir = Path(self.output_dir or project_dir) egg_info = 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 = _safe(dist.get_name()) version = _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) _copy(dir_path, bkp_name, dirs_exist_ok=True, symlinks=True) try: yield finally: _rm(dir_path, ignore_errors=True) shutil.move(bkp_name, dir_path) else: yield def run(self): self.output_dir.mkdir(parents=True, exist_ok=True) self.egg_info.run() egg_info_dir = self.egg_info.egg_info assert os.path.isdir(egg_info_dir), ".egg-info dir should have been created" log.info("creating '{}'".format(os.path.abspath(self.dist_info_dir))) bdist_wheel = self.get_finalized_command('bdist_wheel') # TODO: if bdist_wheel if merged into setuptools, just add "keep_egg_info" there with self._maybe_bkp_dir(egg_info_dir, self.keep_egg_info): bdist_wheel.egg2dist(egg_info_dir, self.dist_info_dir) def _safe(component: str) -> str: """Escape a component used to form a wheel name according to PEP 491""" return re.sub(r"[^\w\d.]+", "_", component) def _version(version: str) -> str: """Convert an arbitrary string to a version string.""" v = version.replace(' ', '.') try: return str(packaging.version.Version(v)).replace("-", "_") except packaging.version.InvalidVersion: msg = f"""Invalid version: {version!r}. !!\n\n ################### # Invalid version # ################### {version!r} is not valid according to PEP 440.\n Please make sure specify a valid version for your package. Also note that future releases of setuptools may halt the build process if an invalid version is given. \n\n!! """ warnings.warn(cleandoc(msg)) return _safe(v).strip("_") def _rm(dir_name, **opts): if os.path.isdir(dir_name): shutil.rmtree(dir_name, **opts) def _copy(src, dst, **opts): if sys.version_info < (3, 8): opts.pop("dirs_exist_ok", None) shutil.copytree(src, dst, **opts) PK{5Zw͔8Lib/site-packages/setuptools/command/install_egg_info.pynuW+Afrom distutils import log, dir_util import os from setuptools import Command from setuptools import namespaces from setuptools.archive_util import unpack_archive from .._path import ensure_directory import pkg_resources class install_egg_info(namespaces.Installer, Command): """Install an .egg-info directory for the package""" description = "Install an .egg-info directory for the package" user_options = [ ('install-dir=', 'd', "directory to install to"), ] def initialize_options(self): self.install_dir = None def finalize_options(self): self.set_undefined_options('install_lib', ('install_dir', 'install_dir')) ei_cmd = self.get_finalized_command("egg_info") basename = pkg_resources.Distribution( None, None, ei_cmd.egg_name, ei_cmd.egg_version ).egg_name() + '.egg-info' self.source = ei_cmd.egg_info self.target = os.path.join(self.install_dir, basename) self.outputs = [] def run(self): self.run_command('egg_info') if os.path.isdir(self.target) and not os.path.islink(self.target): dir_util.remove_tree(self.target, dry_run=self.dry_run) elif os.path.exists(self.target): self.execute(os.unlink, (self.target,), "Removing " + self.target) if not self.dry_run: ensure_directory(self.target) self.execute( self.copytree, (), "Copying %s to %s" % (self.source, self.target) ) self.install_namespaces() def get_outputs(self): return self.outputs def copytree(self): # Copy the .egg-info tree to site-packages def skimmer(src, dst): # filter out source-control directories; note that 'src' is always # a '/'-separated path, regardless of platform. 'dst' is a # platform-specific path. for skip in '.svn/', 'CVS/': if src.startswith(skip) or '/' + skip in src: return None self.outputs.append(dst) log.debug("Copying %s to %s", src, dst) return dst unpack_archive(self.source, self.target, skimmer) PK{5Z;N0Lib/site-packages/setuptools/command/__init__.pynuW+Afrom distutils.command.bdist import bdist import sys if 'egg' not in bdist.format_commands: try: bdist.format_commands['egg'] = ('bdist_egg', "Python .egg file") except TypeError: # For backward compatibility with older distutils (stdlib) bdist.format_command['egg'] = ('bdist_egg', "Python .egg file") bdist.format_commands.append('egg') del bdist, sys PK{5Zv0Lib/site-packages/setuptools/command/register.pynuW+Afrom distutils import log import distutils.command.register as orig from setuptools.errors import RemovedCommandError class register(orig.register): """Formerly used to register packages on PyPI.""" def run(self): msg = ( "The register command has been removed, use twine to upload " + "instead (https://pypi.org/p/twine)" ) self.announce("ERROR: " + msg, log.ERROR) raise RemovedCommandError(msg) PK{5Z"]K.Lib/site-packages/setuptools/command/upload.pynuW+Afrom distutils import log from distutils.command import upload as orig from setuptools.errors import RemovedCommandError class upload(orig.upload): """Formerly used to upload packages to PyPI.""" def run(self): msg = ( "The upload command has been removed, use twine to upload " + "instead (https://pypi.org/p/twine)" ) self.announce("ERROR: " + msg, log.ERROR) raise RemovedCommandError(msg) PK{5Z!PP.Lib/site-packages/setuptools/command/rotate.pynuW+Afrom distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import os import shutil from setuptools import Command class rotate(Command): """Delete older distributions""" description = "delete older distributions, keeping N newest files" user_options = [ ('match=', 'm', "patterns to match (required)"), ('dist-dir=', 'd', "directory where the distributions are"), ('keep=', 'k', "number of matching distributions to keep"), ] boolean_options = [] def initialize_options(self): self.match = None self.dist_dir = None self.keep = None def finalize_options(self): if self.match is None: raise DistutilsOptionError( "Must specify one or more (comma-separated) match patterns " "(e.g. '.zip' or '.egg')" ) if self.keep is None: raise DistutilsOptionError("Must specify number of files to keep") try: self.keep = int(self.keep) except ValueError as e: raise DistutilsOptionError("--keep must be an integer") from e if isinstance(self.match, str): self.match = [ convert_path(p.strip()) for p in self.match.split(',') ] self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) def run(self): self.run_command("egg_info") from glob import glob for pattern in self.match: pattern = self.distribution.get_name() + '*' + pattern files = glob(os.path.join(self.dist_dir, pattern)) files = [(os.path.getmtime(f), f) for f in files] files.sort() files.reverse() log.info("%d file(s) matching %s", len(files), pattern) files = files[self.keep:] for (t, f) in files: log.info("Deleting %s", f) if not self.dry_run: if os.path.isdir(f): shutil.rmtree(f) else: os.unlink(f) PK{5Z++/Lib/site-packages/setuptools/command/install.pynuW+Afrom distutils.errors import DistutilsArgError import inspect import glob import warnings import platform import distutils.command.install as orig import setuptools # Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for # now. See https://github.com/pypa/setuptools/issues/199/ _install = orig.install class install(orig.install): """Use easy_install to install the package, w/dependencies""" user_options = orig.install.user_options + [ ('old-and-unmanageable', None, "Try not to use this!"), ('single-version-externally-managed', None, "used by system package builders to create 'flat' eggs"), ] boolean_options = orig.install.boolean_options + [ 'old-and-unmanageable', 'single-version-externally-managed', ] new_commands = [ ('install_egg_info', lambda self: True), ('install_scripts', lambda self: True), ] _nc = dict(new_commands) def initialize_options(self): warnings.warn( "setup.py install is deprecated. " "Use build and pip and other standards-based tools.", setuptools.SetuptoolsDeprecationWarning, ) orig.install.initialize_options(self) self.old_and_unmanageable = None self.single_version_externally_managed = None def finalize_options(self): orig.install.finalize_options(self) if self.root: self.single_version_externally_managed = True elif self.single_version_externally_managed: if not self.root and not self.record: raise DistutilsArgError( "You must specify --record or --root when building system" " packages" ) def handle_extra_path(self): if self.root or self.single_version_externally_managed: # explicit backward-compatibility mode, allow extra_path to work return orig.install.handle_extra_path(self) # Ignore extra_path when installing an egg (or being run by another # command without --root or --single-version-externally-managed self.path_file = None self.extra_dirs = '' def run(self): # Explicit request for old-style install? Just do it if self.old_and_unmanageable or self.single_version_externally_managed: return orig.install.run(self) if not self._called_from_setup(inspect.currentframe()): # Run in backward-compatibility mode to support bdist_* commands. orig.install.run(self) else: self.do_egg_install() @staticmethod def _called_from_setup(run_frame): """ Attempt to detect whether run() was called from setup() or by another command. If called by setup(), the parent caller will be the 'run_command' method in 'distutils.dist', and *its* caller will be the 'run_commands' method. If called any other way, the immediate caller *might* be 'run_command', but it won't have been called by 'run_commands'. Return True in that case or if a call stack is unavailable. Return False otherwise. """ if run_frame is None: msg = "Call stack not available. bdist_* commands may fail." warnings.warn(msg) if platform.python_implementation() == 'IronPython': msg = "For best results, pass -X:Frames to enable call stack." warnings.warn(msg) return True frames = inspect.getouterframes(run_frame) for frame in frames[2:4]: caller, = frame[:1] info = inspect.getframeinfo(caller) caller_module = caller.f_globals.get('__name__', '') if caller_module == "setuptools.dist" and info.function == "run_command": # Starting from v61.0.0 setuptools overwrites dist.run_command continue return ( caller_module == 'distutils.dist' and info.function == 'run_commands' ) def do_egg_install(self): easy_install = self.distribution.get_command_class('easy_install') cmd = easy_install( self.distribution, args="x", root=self.root, record=self.record, ) cmd.ensure_finalized() # finalize before bdist_egg munges install cmd cmd.always_copy_from = '.' # make sure local-dir eggs get installed # pick up setup-dir .egg files only: no .egg-info cmd.package_index.scan(glob.glob('*.egg')) self.run_command('bdist_egg') args = [self.distribution.get_command_obj('bdist_egg').egg_output] if setuptools.bootstrap_install_from: # Bootstrap self-installation of setuptools args.insert(0, setuptools.bootstrap_install_from) cmd.args = args cmd.run(show_deprecation=False) setuptools.bootstrap_install_from = None # XXX Python 3.1 doesn't see _nc if this is inside the class install.sub_commands = ( [cmd for cmd in orig.install.sub_commands if cmd[0] not in install._nc] + install.new_commands ) PK{5Z-]NN4Lib/site-packages/setuptools/command/easy_install.pynuW+A""" Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://setuptools.pypa.io/en/latest/deprecated/easy_install.html """ from glob import glob from distutils.util import get_platform from distutils.util import convert_path, subst_vars from distutils.errors import ( DistutilsArgError, DistutilsOptionError, DistutilsError, DistutilsPlatformError, ) from distutils import log, dir_util from distutils.command.build_scripts import first_line_re from distutils.spawn import find_executable from distutils.command import install import sys import os import zipimport import shutil import tempfile import zipfile import re import stat import random import textwrap import warnings import site import struct import contextlib import subprocess import shlex import io import configparser import sysconfig from sysconfig import get_path from setuptools import SetuptoolsDeprecationWarning from setuptools import Command from setuptools.sandbox import run_setup from setuptools.command import setopt from setuptools.archive_util import unpack_archive from setuptools.package_index import ( PackageIndex, parse_requirement_arg, URL_SCHEME, ) from setuptools.command import bdist_egg, egg_info from setuptools.wheel import Wheel from pkg_resources import ( normalize_path, resource_string, get_distribution, find_distributions, Environment, Requirement, Distribution, PathMetadata, EggMetadata, WorkingSet, DistributionNotFound, VersionConflict, DEVELOP_DIST, ) import pkg_resources from .._path import ensure_directory from ..extern.jaraco.text import yield_lines # Turn on PEP440Warnings warnings.filterwarnings("default", category=pkg_resources.PEP440Warning) __all__ = [ 'easy_install', 'PthDistributions', 'extract_wininst_cfg', 'get_exe_prefixes', ] def is_64bit(): return struct.calcsize("P") == 8 def _to_bytes(s): return s.encode('utf8') def isascii(s): try: s.encode('ascii') return True except UnicodeError: return False def _one_liner(text): return textwrap.dedent(text).strip().replace('\n', '; ') class easy_install(Command): """Manage a download/build/install process""" description = "Find/get/install Python packages" command_consumes_arguments = True user_options = [ ('prefix=', None, "installation prefix"), ("zip-ok", "z", "install package as a zipfile"), ("multi-version", "m", "make apps have to require() a version"), ("upgrade", "U", "force upgrade (searches PyPI for latest versions)"), ("install-dir=", "d", "install package to DIR"), ("script-dir=", "s", "install scripts to DIR"), ("exclude-scripts", "x", "Don't install scripts"), ("always-copy", "a", "Copy all needed packages to install dir"), ("index-url=", "i", "base URL of Python Package Index"), ("find-links=", "f", "additional URL(s) to search for packages"), ("build-directory=", "b", "download/extract/build in DIR; keep the results"), ('optimize=', 'O', "also compile with optimization: -O1 for \"python -O\", " "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), ('record=', None, "filename in which to record list of installed files"), ('always-unzip', 'Z', "don't install as a zipfile, no matter what"), ('site-dirs=', 'S', "list of directories where .pth files work"), ('editable', 'e', "Install specified packages in editable form"), ('no-deps', 'N', "don't install dependencies"), ('allow-hosts=', 'H', "pattern(s) that hostnames must match"), ('local-snapshots-ok', 'l', "allow building eggs from local checkouts"), ('version', None, "print version information and exit"), ('no-find-links', None, "Don't load find-links defined in packages being installed"), ('user', None, "install in user site-package '%s'" % site.USER_SITE) ] boolean_options = [ 'zip-ok', 'multi-version', 'exclude-scripts', 'upgrade', 'always-copy', 'editable', 'no-deps', 'local-snapshots-ok', 'version', 'user' ] negative_opt = {'always-unzip': 'zip-ok'} create_index = PackageIndex def initialize_options(self): warnings.warn( "easy_install command is deprecated. " "Use build and pip and other standards-based tools.", EasyInstallDeprecationWarning, ) # the --user option seems to be an opt-in one, # so the default should be False. self.user = 0 self.zip_ok = self.local_snapshots_ok = None self.install_dir = self.script_dir = self.exclude_scripts = None self.index_url = None self.find_links = None self.build_directory = None self.args = None self.optimize = self.record = None self.upgrade = self.always_copy = self.multi_version = None self.editable = self.no_deps = self.allow_hosts = None self.root = self.prefix = self.no_report = None self.version = None self.install_purelib = None # for pure module distributions self.install_platlib = None # non-pure (dists w/ extensions) self.install_headers = None # for C/C++ headers self.install_lib = None # set to either purelib or platlib self.install_scripts = None self.install_data = None self.install_base = None self.install_platbase = None self.install_userbase = site.USER_BASE self.install_usersite = site.USER_SITE self.no_find_links = None # Options not specifiable via command line self.package_index = None self.pth_file = self.always_copy_from = None self.site_dirs = None self.installed_projects = {} # Always read easy_install options, even if we are subclassed, or have # an independent instance created. This ensures that defaults will # always come from the standard configuration file(s)' "easy_install" # section, even if this is a "develop" or "install" command, or some # other embedding. self._dry_run = None self.verbose = self.distribution.verbose self.distribution._set_command_options( self, self.distribution.get_option_dict('easy_install') ) def delete_blockers(self, blockers): extant_blockers = ( filename for filename in blockers if os.path.exists(filename) or os.path.islink(filename) ) list(map(self._delete_path, extant_blockers)) def _delete_path(self, path): log.info("Deleting %s", path) if self.dry_run: return is_tree = os.path.isdir(path) and not os.path.islink(path) remover = rmtree if is_tree else os.unlink remover(path) @staticmethod def _render_version(): """ Render the Setuptools version and installation details, then exit. """ ver = '{}.{}'.format(*sys.version_info) dist = get_distribution('setuptools') tmpl = 'setuptools {dist.version} from {dist.location} (Python {ver})' print(tmpl.format(**locals())) raise SystemExit() def finalize_options(self): # noqa: C901 # is too complex (25) # FIXME self.version and self._render_version() py_version = sys.version.split()[0] self.config_vars = dict(sysconfig.get_config_vars()) self.config_vars.update({ 'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), 'dist_fullname': self.distribution.get_fullname(), 'py_version': py_version, 'py_version_short': f'{sys.version_info.major}.{sys.version_info.minor}', 'py_version_nodot': f'{sys.version_info.major}{sys.version_info.minor}', 'sys_prefix': self.config_vars['prefix'], 'sys_exec_prefix': self.config_vars['exec_prefix'], # Only python 3.2+ has abiflags 'abiflags': getattr(sys, 'abiflags', ''), 'platlibdir': getattr(sys, 'platlibdir', 'lib'), }) with contextlib.suppress(AttributeError): # only for distutils outside stdlib self.config_vars.update({ 'implementation_lower': install._get_implementation().lower(), 'implementation': install._get_implementation(), }) # pypa/distutils#113 Python 3.9 compat self.config_vars.setdefault( 'py_version_nodot_plat', getattr(sys, 'windir', '').replace('.', ''), ) self.config_vars['userbase'] = self.install_userbase self.config_vars['usersite'] = self.install_usersite if self.user and not site.ENABLE_USER_SITE: log.warn("WARNING: The user site-packages directory is disabled.") self._fix_install_dir_for_user_site() self.expand_basedirs() self.expand_dirs() self._expand( 'install_dir', 'script_dir', 'build_directory', 'site_dirs', ) # If a non-default installation directory was specified, default the # script directory to match it. if self.script_dir is None: self.script_dir = self.install_dir if self.no_find_links is None: self.no_find_links = False # Let install_dir get set by install_lib command, which in turn # gets its info from the install command, and takes into account # --prefix and --home and all that other crud. self.set_undefined_options( 'install_lib', ('install_dir', 'install_dir') ) # Likewise, set default script_dir from 'install_scripts.install_dir' self.set_undefined_options( 'install_scripts', ('install_dir', 'script_dir') ) if self.user and self.install_purelib: self.install_dir = self.install_purelib self.script_dir = self.install_scripts # default --record from the install command self.set_undefined_options('install', ('record', 'record')) self.all_site_dirs = get_site_dirs() self.all_site_dirs.extend(self._process_site_dirs(self.site_dirs)) if not self.editable: self.check_site_dir() default_index = os.getenv("__EASYINSTALL_INDEX", "https://pypi.org/simple/") # ^ Private API for testing purposes only self.index_url = self.index_url or default_index self.shadow_path = self.all_site_dirs[:] for path_item in self.install_dir, normalize_path(self.script_dir): if path_item not in self.shadow_path: self.shadow_path.insert(0, path_item) if self.allow_hosts is not None: hosts = [s.strip() for s in self.allow_hosts.split(',')] else: hosts = ['*'] if self.package_index is None: self.package_index = self.create_index( self.index_url, search_path=self.shadow_path, hosts=hosts, ) self.local_index = Environment(self.shadow_path + sys.path) if self.find_links is not None: if isinstance(self.find_links, str): self.find_links = self.find_links.split() else: self.find_links = [] if self.local_snapshots_ok: self.package_index.scan_egg_links(self.shadow_path + sys.path) if not self.no_find_links: self.package_index.add_find_links(self.find_links) self.set_undefined_options('install_lib', ('optimize', 'optimize')) self.optimize = self._validate_optimize(self.optimize) if self.editable and not self.build_directory: raise DistutilsArgError( "Must specify a build directory (-b) when using --editable" ) if not self.args: raise DistutilsArgError( "No urls, filenames, or requirements specified (see --help)") self.outputs = [] @staticmethod def _process_site_dirs(site_dirs): if site_dirs is None: return normpath = map(normalize_path, sys.path) site_dirs = [ os.path.expanduser(s.strip()) for s in site_dirs.split(',') ] for d in site_dirs: if not os.path.isdir(d): log.warn("%s (in --site-dirs) does not exist", d) elif normalize_path(d) not in normpath: raise DistutilsOptionError( d + " (in --site-dirs) is not on sys.path" ) else: yield normalize_path(d) @staticmethod def _validate_optimize(value): try: value = int(value) if value not in range(3): raise ValueError except ValueError as e: raise DistutilsOptionError( "--optimize must be 0, 1, or 2" ) from e return value def _fix_install_dir_for_user_site(self): """ Fix the install_dir if "--user" was used. """ if not self.user: return self.create_home_path() if self.install_userbase is None: msg = "User base directory is not specified" raise DistutilsPlatformError(msg) self.install_base = self.install_platbase = self.install_userbase scheme_name = f'{os.name}_user' self.select_scheme(scheme_name) def _expand_attrs(self, attrs): for attr in attrs: val = getattr(self, attr) if val is not None: if os.name == 'posix' or os.name == 'nt': val = os.path.expanduser(val) val = subst_vars(val, self.config_vars) setattr(self, attr, val) def expand_basedirs(self): """Calls `os.path.expanduser` on install_base, install_platbase and root.""" self._expand_attrs(['install_base', 'install_platbase', 'root']) def expand_dirs(self): """Calls `os.path.expanduser` on install dirs.""" dirs = [ 'install_purelib', 'install_platlib', 'install_lib', 'install_headers', 'install_scripts', 'install_data', ] self._expand_attrs(dirs) def run(self, show_deprecation=True): if show_deprecation: self.announce( "WARNING: The easy_install command is deprecated " "and will be removed in a future version.", log.WARN, ) if self.verbose != self.distribution.verbose: log.set_verbosity(self.verbose) try: for spec in self.args: self.easy_install(spec, not self.no_deps) if self.record: outputs = self.outputs if self.root: # strip any package prefix root_len = len(self.root) for counter in range(len(outputs)): outputs[counter] = outputs[counter][root_len:] from distutils import file_util self.execute( file_util.write_file, (self.record, outputs), "writing list of installed files to '%s'" % self.record ) self.warn_deprecated_options() finally: log.set_verbosity(self.distribution.verbose) def pseudo_tempname(self): """Return a pseudo-tempname base in the install directory. This code is intentionally naive; if a malicious party can write to the target directory you're already in deep doodoo. """ try: pid = os.getpid() except Exception: pid = random.randint(0, sys.maxsize) return os.path.join(self.install_dir, "test-easy-install-%s" % pid) def warn_deprecated_options(self): pass def check_site_dir(self): # noqa: C901 # is too complex (12) # FIXME """Verify that self.install_dir is .pth-capable dir, if needed""" instdir = normalize_path(self.install_dir) pth_file = os.path.join(instdir, 'easy-install.pth') if not os.path.exists(instdir): try: os.makedirs(instdir) except (OSError, IOError): self.cant_write_to_target() # Is it a configured, PYTHONPATH, implicit, or explicit site dir? is_site_dir = instdir in self.all_site_dirs if not is_site_dir and not self.multi_version: # No? Then directly test whether it does .pth file processing is_site_dir = self.check_pth_processing() else: # make sure we can write to target dir testfile = self.pseudo_tempname() + '.write-test' test_exists = os.path.exists(testfile) try: if test_exists: os.unlink(testfile) open(testfile, 'w').close() os.unlink(testfile) except (OSError, IOError): self.cant_write_to_target() if not is_site_dir and not self.multi_version: # Can't install non-multi to non-site dir with easy_install pythonpath = os.environ.get('PYTHONPATH', '') log.warn(self.__no_default_msg, self.install_dir, pythonpath) if is_site_dir: if self.pth_file is None: self.pth_file = PthDistributions(pth_file, self.all_site_dirs) else: self.pth_file = None if self.multi_version and not os.path.exists(pth_file): self.pth_file = None # don't create a .pth file self.install_dir = instdir __cant_write_msg = textwrap.dedent(""" can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: %s The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: %s """).lstrip() # noqa __not_exists_id = textwrap.dedent(""" This directory does not currently exist. Please create it and try again, or choose a different installation directory (using the -d or --install-dir option). """).lstrip() # noqa __access_msg = textwrap.dedent(""" Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable. For information on other options, you may wish to consult the documentation at: https://setuptools.pypa.io/en/latest/deprecated/easy_install.html Please make the appropriate changes for your system and try again. """).lstrip() # noqa def cant_write_to_target(self): msg = self.__cant_write_msg % (sys.exc_info()[1], self.install_dir,) if not os.path.exists(self.install_dir): msg += '\n' + self.__not_exists_id else: msg += '\n' + self.__access_msg raise DistutilsError(msg) def check_pth_processing(self): """Empirically verify whether .pth files are supported in inst. dir""" instdir = self.install_dir log.info("Checking .pth file support in %s", instdir) pth_file = self.pseudo_tempname() + ".pth" ok_file = pth_file + '.ok' ok_exists = os.path.exists(ok_file) tmpl = _one_liner(""" import os f = open({ok_file!r}, 'w') f.write('OK') f.close() """) + '\n' try: if ok_exists: os.unlink(ok_file) dirname = os.path.dirname(ok_file) os.makedirs(dirname, exist_ok=True) f = open(pth_file, 'w') except (OSError, IOError): self.cant_write_to_target() else: try: f.write(tmpl.format(**locals())) f.close() f = None executable = sys.executable if os.name == 'nt': dirname, basename = os.path.split(executable) alt = os.path.join(dirname, 'pythonw.exe') use_alt = ( basename.lower() == 'python.exe' and os.path.exists(alt) ) if use_alt: # use pythonw.exe to avoid opening a console window executable = alt from distutils.spawn import spawn spawn([executable, '-E', '-c', 'pass'], 0) if os.path.exists(ok_file): log.info( "TEST PASSED: %s appears to support .pth files", instdir ) return True finally: if f: f.close() if os.path.exists(ok_file): os.unlink(ok_file) if os.path.exists(pth_file): os.unlink(pth_file) if not self.multi_version: log.warn("TEST FAILED: %s does NOT support .pth files", instdir) return False def install_egg_scripts(self, dist): """Write all the scripts for `dist`, unless scripts are excluded""" if not self.exclude_scripts and dist.metadata_isdir('scripts'): for script_name in dist.metadata_listdir('scripts'): if dist.metadata_isdir('scripts/' + script_name): # The "script" is a directory, likely a Python 3 # __pycache__ directory, so skip it. continue self.install_script( dist, script_name, dist.get_metadata('scripts/' + script_name) ) self.install_wrapper_scripts(dist) def add_output(self, path): if os.path.isdir(path): for base, dirs, files in os.walk(path): for filename in files: self.outputs.append(os.path.join(base, filename)) else: self.outputs.append(path) def not_editable(self, spec): if self.editable: raise DistutilsArgError( "Invalid argument %r: you can't use filenames or URLs " "with --editable (except via the --find-links option)." % (spec,) ) def check_editable(self, spec): if not self.editable: return if os.path.exists(os.path.join(self.build_directory, spec.key)): raise DistutilsArgError( "%r already exists in %s; can't do a checkout there" % (spec.key, self.build_directory) ) @contextlib.contextmanager def _tmpdir(self): tmpdir = tempfile.mkdtemp(prefix=u"easy_install-") try: # cast to str as workaround for #709 and #710 and #712 yield str(tmpdir) finally: os.path.exists(tmpdir) and rmtree(tmpdir) def easy_install(self, spec, deps=False): with self._tmpdir() as tmpdir: if not isinstance(spec, Requirement): if URL_SCHEME(spec): # It's a url, download it to tmpdir and process self.not_editable(spec) dl = self.package_index.download(spec, tmpdir) return self.install_item(None, dl, tmpdir, deps, True) elif os.path.exists(spec): # Existing file or directory, just process it directly self.not_editable(spec) return self.install_item(None, spec, tmpdir, deps, True) else: spec = parse_requirement_arg(spec) self.check_editable(spec) dist = self.package_index.fetch_distribution( spec, tmpdir, self.upgrade, self.editable, not self.always_copy, self.local_index ) if dist is None: msg = "Could not find suitable distribution for %r" % spec if self.always_copy: msg += " (--always-copy skips system and development eggs)" raise DistutilsError(msg) elif dist.precedence == DEVELOP_DIST: # .egg-info dists don't need installing, just process deps self.process_distribution(spec, dist, deps, "Using") return dist else: return self.install_item(spec, dist.location, tmpdir, deps) def install_item(self, spec, download, tmpdir, deps, install_needed=False): # Installation is also needed if file in tmpdir or is not an egg install_needed = install_needed or self.always_copy install_needed = install_needed or os.path.dirname(download) == tmpdir install_needed = install_needed or not download.endswith('.egg') install_needed = install_needed or ( self.always_copy_from is not None and os.path.dirname(normalize_path(download)) == normalize_path(self.always_copy_from) ) if spec and not install_needed: # at this point, we know it's a local .egg, we just don't know if # it's already installed. for dist in self.local_index[spec.project_name]: if dist.location == download: break else: install_needed = True # it's not in the local index log.info("Processing %s", os.path.basename(download)) if install_needed: dists = self.install_eggs(spec, download, tmpdir) for dist in dists: self.process_distribution(spec, dist, deps) else: dists = [self.egg_distribution(download)] self.process_distribution(spec, dists[0], deps, "Using") if spec is not None: for dist in dists: if dist in spec: return dist def select_scheme(self, name): try: install._select_scheme(self, name) except AttributeError: # stdlib distutils install.install.select_scheme(self, name.replace('posix', 'unix')) # FIXME: 'easy_install.process_distribution' is too complex (12) def process_distribution( # noqa: C901 self, requirement, dist, deps=True, *info, ): self.update_pth(dist) self.package_index.add(dist) if dist in self.local_index[dist.key]: self.local_index.remove(dist) self.local_index.add(dist) self.install_egg_scripts(dist) self.installed_projects[dist.key] = dist log.info(self.installation_report(requirement, dist, *info)) if (dist.has_metadata('dependency_links.txt') and not self.no_find_links): self.package_index.add_find_links( dist.get_metadata_lines('dependency_links.txt') ) if not deps and not self.always_copy: return elif requirement is not None and dist.key != requirement.key: log.warn("Skipping dependencies for %s", dist) return # XXX this is not the distribution we were looking for elif requirement is None or dist not in requirement: # if we wound up with a different version, resolve what we've got distreq = dist.as_requirement() requirement = Requirement(str(distreq)) log.info("Processing dependencies for %s", requirement) try: distros = WorkingSet([]).resolve( [requirement], self.local_index, self.easy_install ) except DistributionNotFound as e: raise DistutilsError(str(e)) from e except VersionConflict as e: raise DistutilsError(e.report()) from e if self.always_copy or self.always_copy_from: # Force all the relevant distros to be copied or activated for dist in distros: if dist.key not in self.installed_projects: self.easy_install(dist.as_requirement()) log.info("Finished processing dependencies for %s", requirement) def should_unzip(self, dist): if self.zip_ok is not None: return not self.zip_ok if dist.has_metadata('not-zip-safe'): return True if not dist.has_metadata('zip-safe'): return True return False def maybe_move(self, spec, dist_filename, setup_base): dst = os.path.join(self.build_directory, spec.key) if os.path.exists(dst): msg = ( "%r already exists in %s; build directory %s will not be kept" ) log.warn(msg, spec.key, self.build_directory, setup_base) return setup_base if os.path.isdir(dist_filename): setup_base = dist_filename else: if os.path.dirname(dist_filename) == setup_base: os.unlink(dist_filename) # get it out of the tmp dir contents = os.listdir(setup_base) if len(contents) == 1: dist_filename = os.path.join(setup_base, contents[0]) if os.path.isdir(dist_filename): # if the only thing there is a directory, move it instead setup_base = dist_filename ensure_directory(dst) shutil.move(setup_base, dst) return dst def install_wrapper_scripts(self, dist): if self.exclude_scripts: return for args in ScriptWriter.best().get_args(dist): self.write_script(*args) def install_script(self, dist, script_name, script_text, dev_path=None): """Generate a legacy script wrapper and install it""" spec = str(dist.as_requirement()) is_script = is_python_script(script_text, script_name) if is_script: body = self._load_template(dev_path) % locals() script_text = ScriptWriter.get_header(script_text) + body self.write_script(script_name, _to_bytes(script_text), 'b') @staticmethod def _load_template(dev_path): """ There are a couple of template scripts in the package. This function loads one of them and prepares it for use. """ # See https://github.com/pypa/setuptools/issues/134 for info # on script file naming and downstream issues with SVR4 name = 'script.tmpl' if dev_path: name = name.replace('.tmpl', ' (dev).tmpl') raw_bytes = resource_string('setuptools', name) return raw_bytes.decode('utf-8') def write_script(self, script_name, contents, mode="t", blockers=()): """Write an executable file to the scripts directory""" self.delete_blockers( # clean up old .py/.pyw w/o a script [os.path.join(self.script_dir, x) for x in blockers] ) log.info("Installing %s script to %s", script_name, self.script_dir) target = os.path.join(self.script_dir, script_name) self.add_output(target) if self.dry_run: return mask = current_umask() ensure_directory(target) if os.path.exists(target): os.unlink(target) with open(target, "w" + mode) as f: f.write(contents) chmod(target, 0o777 - mask) def install_eggs(self, spec, dist_filename, tmpdir): # .egg dirs or files are already built, so just return them installer_map = { '.egg': self.install_egg, '.exe': self.install_exe, '.whl': self.install_wheel, } try: install_dist = installer_map[ dist_filename.lower()[-4:] ] except KeyError: pass else: return [install_dist(dist_filename, tmpdir)] # Anything else, try to extract and build setup_base = tmpdir if os.path.isfile(dist_filename) and not dist_filename.endswith('.py'): unpack_archive(dist_filename, tmpdir, self.unpack_progress) elif os.path.isdir(dist_filename): setup_base = os.path.abspath(dist_filename) if (setup_base.startswith(tmpdir) # something we downloaded and self.build_directory and spec is not None): setup_base = self.maybe_move(spec, dist_filename, setup_base) # Find the setup.py file setup_script = os.path.join(setup_base, 'setup.py') if not os.path.exists(setup_script): setups = glob(os.path.join(setup_base, '*', 'setup.py')) if not setups: raise DistutilsError( "Couldn't find a setup script in %s" % os.path.abspath(dist_filename) ) if len(setups) > 1: raise DistutilsError( "Multiple setup scripts in %s" % os.path.abspath(dist_filename) ) setup_script = setups[0] # Now run it, and return the result if self.editable: log.info(self.report_editable(spec, setup_script)) return [] else: return self.build_and_install(setup_script, setup_base) def egg_distribution(self, egg_path): if os.path.isdir(egg_path): metadata = PathMetadata(egg_path, os.path.join(egg_path, 'EGG-INFO')) else: metadata = EggMetadata(zipimport.zipimporter(egg_path)) return Distribution.from_filename(egg_path, metadata=metadata) # FIXME: 'easy_install.install_egg' is too complex (11) def install_egg(self, egg_path, tmpdir): # noqa: C901 destination = os.path.join( self.install_dir, os.path.basename(egg_path), ) destination = os.path.abspath(destination) if not self.dry_run: ensure_directory(destination) dist = self.egg_distribution(egg_path) if not ( os.path.exists(destination) and os.path.samefile(egg_path, destination) ): if os.path.isdir(destination) and not os.path.islink(destination): dir_util.remove_tree(destination, dry_run=self.dry_run) elif os.path.exists(destination): self.execute( os.unlink, (destination,), "Removing " + destination, ) try: new_dist_is_zipped = False if os.path.isdir(egg_path): if egg_path.startswith(tmpdir): f, m = shutil.move, "Moving" else: f, m = shutil.copytree, "Copying" elif self.should_unzip(dist): self.mkpath(destination) f, m = self.unpack_and_compile, "Extracting" else: new_dist_is_zipped = True if egg_path.startswith(tmpdir): f, m = shutil.move, "Moving" else: f, m = shutil.copy2, "Copying" self.execute( f, (egg_path, destination), (m + " %s to %s") % ( os.path.basename(egg_path), os.path.dirname(destination) ), ) update_dist_caches( destination, fix_zipimporter_caches=new_dist_is_zipped, ) except Exception: update_dist_caches(destination, fix_zipimporter_caches=False) raise self.add_output(destination) return self.egg_distribution(destination) def install_exe(self, dist_filename, tmpdir): # See if it's valid, get data cfg = extract_wininst_cfg(dist_filename) if cfg is None: raise DistutilsError( "%s is not a valid distutils Windows .exe" % dist_filename ) # Create a dummy distribution object until we build the real distro dist = Distribution( None, project_name=cfg.get('metadata', 'name'), version=cfg.get('metadata', 'version'), platform=get_platform(), ) # Convert the .exe to an unpacked egg egg_path = os.path.join(tmpdir, dist.egg_name() + '.egg') dist.location = egg_path egg_tmp = egg_path + '.tmp' _egg_info = os.path.join(egg_tmp, 'EGG-INFO') pkg_inf = os.path.join(_egg_info, 'PKG-INFO') ensure_directory(pkg_inf) # make sure EGG-INFO dir exists dist._provider = PathMetadata(egg_tmp, _egg_info) # XXX self.exe_to_egg(dist_filename, egg_tmp) # Write EGG-INFO/PKG-INFO if not os.path.exists(pkg_inf): f = open(pkg_inf, 'w') f.write('Metadata-Version: 1.0\n') for k, v in cfg.items('metadata'): if k != 'target_version': f.write('%s: %s\n' % (k.replace('_', '-').title(), v)) f.close() script_dir = os.path.join(_egg_info, 'scripts') # delete entry-point scripts to avoid duping self.delete_blockers([ os.path.join(script_dir, args[0]) for args in ScriptWriter.get_args(dist) ]) # Build .egg file from tmpdir bdist_egg.make_zipfile( egg_path, egg_tmp, verbose=self.verbose, dry_run=self.dry_run, ) # install the .egg return self.install_egg(egg_path, tmpdir) # FIXME: 'easy_install.exe_to_egg' is too complex (12) def exe_to_egg(self, dist_filename, egg_tmp): # noqa: C901 """Extract a bdist_wininst to the directories an egg would use""" # Check for .pth file and set up prefix translations prefixes = get_exe_prefixes(dist_filename) to_compile = [] native_libs = [] top_level = {} def process(src, dst): s = src.lower() for old, new in prefixes: if s.startswith(old): src = new + src[len(old):] parts = src.split('/') dst = os.path.join(egg_tmp, *parts) dl = dst.lower() if dl.endswith('.pyd') or dl.endswith('.dll'): parts[-1] = bdist_egg.strip_module(parts[-1]) top_level[os.path.splitext(parts[0])[0]] = 1 native_libs.append(src) elif dl.endswith('.py') and old != 'SCRIPTS/': top_level[os.path.splitext(parts[0])[0]] = 1 to_compile.append(dst) return dst if not src.endswith('.pth'): log.warn("WARNING: can't process %s", src) return None # extract, tracking .pyd/.dll->native_libs and .py -> to_compile unpack_archive(dist_filename, egg_tmp, process) stubs = [] for res in native_libs: if res.lower().endswith('.pyd'): # create stubs for .pyd's parts = res.split('/') resource = parts[-1] parts[-1] = bdist_egg.strip_module(parts[-1]) + '.py' pyfile = os.path.join(egg_tmp, *parts) to_compile.append(pyfile) stubs.append(pyfile) bdist_egg.write_stub(resource, pyfile) self.byte_compile(to_compile) # compile .py's bdist_egg.write_safety_flag( os.path.join(egg_tmp, 'EGG-INFO'), bdist_egg.analyze_egg(egg_tmp, stubs)) # write zip-safety flag for name in 'top_level', 'native_libs': if locals()[name]: txt = os.path.join(egg_tmp, 'EGG-INFO', name + '.txt') if not os.path.exists(txt): f = open(txt, 'w') f.write('\n'.join(locals()[name]) + '\n') f.close() def install_wheel(self, wheel_path, tmpdir): wheel = Wheel(wheel_path) assert wheel.is_compatible() destination = os.path.join(self.install_dir, wheel.egg_name()) destination = os.path.abspath(destination) if not self.dry_run: ensure_directory(destination) if os.path.isdir(destination) and not os.path.islink(destination): dir_util.remove_tree(destination, dry_run=self.dry_run) elif os.path.exists(destination): self.execute( os.unlink, (destination,), "Removing " + destination, ) try: self.execute( wheel.install_as_egg, (destination,), ("Installing %s to %s") % ( os.path.basename(wheel_path), os.path.dirname(destination) ), ) finally: update_dist_caches(destination, fix_zipimporter_caches=False) self.add_output(destination) return self.egg_distribution(destination) __mv_warning = textwrap.dedent(""" Because this distribution was installed --multi-version, before you can import modules from this package in an application, you will need to 'import pkg_resources' and then use a 'require()' call similar to one of these examples, in order to select the desired version: pkg_resources.require("%(name)s") # latest installed version pkg_resources.require("%(name)s==%(version)s") # this exact version pkg_resources.require("%(name)s>=%(version)s") # this version or higher """).lstrip() # noqa __id_warning = textwrap.dedent(""" Note also that the installation directory must be on sys.path at runtime for this to work. (e.g. by being the application's script directory, by being on PYTHONPATH, or by being added to sys.path by your code.) """) # noqa def installation_report(self, req, dist, what="Installed"): """Helpful installation message for display to package users""" msg = "\n%(what)s %(eggloc)s%(extras)s" if self.multi_version and not self.no_report: msg += '\n' + self.__mv_warning if self.install_dir not in map(normalize_path, sys.path): msg += '\n' + self.__id_warning eggloc = dist.location name = dist.project_name version = dist.version extras = '' # TODO: self.report_extras(req, dist) return msg % locals() __editable_msg = textwrap.dedent(""" Extracted editable version of %(spec)s to %(dirname)s If it uses setuptools in its setup script, you can activate it in "development" mode by going to that directory and running:: %(python)s setup.py develop See the setuptools documentation for the "develop" command for more info. """).lstrip() # noqa def report_editable(self, spec, setup_script): dirname = os.path.dirname(setup_script) python = sys.executable return '\n' + self.__editable_msg % locals() def run_setup(self, setup_script, setup_base, args): sys.modules.setdefault('distutils.command.bdist_egg', bdist_egg) sys.modules.setdefault('distutils.command.egg_info', egg_info) args = list(args) if self.verbose > 2: v = 'v' * (self.verbose - 1) args.insert(0, '-' + v) elif self.verbose < 2: args.insert(0, '-q') if self.dry_run: args.insert(0, '-n') log.info( "Running %s %s", setup_script[len(setup_base) + 1:], ' '.join(args) ) try: run_setup(setup_script, args) except SystemExit as v: raise DistutilsError( "Setup script exited with %s" % (v.args[0],) ) from v def build_and_install(self, setup_script, setup_base): args = ['bdist_egg', '--dist-dir'] dist_dir = tempfile.mkdtemp( prefix='egg-dist-tmp-', dir=os.path.dirname(setup_script) ) try: self._set_fetcher_options(os.path.dirname(setup_script)) args.append(dist_dir) self.run_setup(setup_script, setup_base, args) all_eggs = Environment([dist_dir]) eggs = [] for key in all_eggs: for dist in all_eggs[key]: eggs.append(self.install_egg(dist.location, setup_base)) if not eggs and not self.dry_run: log.warn("No eggs found in %s (setup script problem?)", dist_dir) return eggs finally: rmtree(dist_dir) log.set_verbosity(self.verbose) # restore our log verbosity def _set_fetcher_options(self, base): """ When easy_install is about to run bdist_egg on a source dist, that source dist might have 'setup_requires' directives, requiring additional fetching. Ensure the fetcher options given to easy_install are available to that command as well. """ # find the fetch options from easy_install and write them out # to the setup.cfg file. ei_opts = self.distribution.get_option_dict('easy_install').copy() fetch_directives = ( 'find_links', 'site_dirs', 'index_url', 'optimize', 'allow_hosts', ) fetch_options = {} for key, val in ei_opts.items(): if key not in fetch_directives: continue fetch_options[key] = val[1] # create a settings dictionary suitable for `edit_config` settings = dict(easy_install=fetch_options) cfg_filename = os.path.join(base, 'setup.cfg') setopt.edit_config(cfg_filename, settings) def update_pth(self, dist): # noqa: C901 # is too complex (11) # FIXME if self.pth_file is None: return for d in self.pth_file[dist.key]: # drop old entries if not self.multi_version and d.location == dist.location: continue log.info("Removing %s from easy-install.pth file", d) self.pth_file.remove(d) if d.location in self.shadow_path: self.shadow_path.remove(d.location) if not self.multi_version: if dist.location in self.pth_file.paths: log.info( "%s is already the active version in easy-install.pth", dist, ) else: log.info("Adding %s to easy-install.pth file", dist) self.pth_file.add(dist) # add new entry if dist.location not in self.shadow_path: self.shadow_path.append(dist.location) if self.dry_run: return self.pth_file.save() if dist.key != 'setuptools': return # Ensure that setuptools itself never becomes unavailable! # XXX should this check for latest version? filename = os.path.join(self.install_dir, 'setuptools.pth') if os.path.islink(filename): os.unlink(filename) with open(filename, 'wt') as f: f.write(self.pth_file.make_relative(dist.location) + '\n') def unpack_progress(self, src, dst): # Progress filter for unpacking log.debug("Unpacking %s to %s", src, dst) return dst # only unpack-and-compile skips files for dry run def unpack_and_compile(self, egg_path, destination): to_compile = [] to_chmod = [] def pf(src, dst): if dst.endswith('.py') and not src.startswith('EGG-INFO/'): to_compile.append(dst) elif dst.endswith('.dll') or dst.endswith('.so'): to_chmod.append(dst) self.unpack_progress(src, dst) return not self.dry_run and dst or None unpack_archive(egg_path, destination, pf) self.byte_compile(to_compile) if not self.dry_run: for f in to_chmod: mode = ((os.stat(f)[stat.ST_MODE]) | 0o555) & 0o7755 chmod(f, mode) def byte_compile(self, to_compile): if sys.dont_write_bytecode: return from distutils.util import byte_compile try: # try to make the byte compile messages quieter log.set_verbosity(self.verbose - 1) byte_compile(to_compile, optimize=0, force=1, dry_run=self.dry_run) if self.optimize: byte_compile( to_compile, optimize=self.optimize, force=1, dry_run=self.dry_run, ) finally: log.set_verbosity(self.verbose) # restore original verbosity __no_default_msg = textwrap.dedent(""" bad install directory or PYTHONPATH You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: %s and your PYTHONPATH environment variable currently contains: %r Here are some of your options for correcting the problem: * You can choose a different installation directory, i.e., one that is on PYTHONPATH or supports .pth files * You can add the installation directory to the PYTHONPATH environment variable. (It must then also be on PYTHONPATH whenever you run Python and want to use the package(s) you are installing.) * You can set up the installation directory to support ".pth" files by using one of the approaches described here: https://setuptools.pypa.io/en/latest/deprecated/easy_install.html#custom-installation-locations Please make the appropriate changes for your system and try again. """).strip() def create_home_path(self): """Create directories under ~.""" if not self.user: return home = convert_path(os.path.expanduser("~")) for path in only_strs(self.config_vars.values()): if path.startswith(home) and not os.path.isdir(path): self.debug_print("os.makedirs('%s', 0o700)" % path) os.makedirs(path, 0o700) INSTALL_SCHEMES = dict( posix=dict( install_dir='$base/lib/python$py_version_short/site-packages', script_dir='$base/bin', ), ) DEFAULT_SCHEME = dict( install_dir='$base/Lib/site-packages', script_dir='$base/Scripts', ) def _expand(self, *attrs): config_vars = self.get_finalized_command('install').config_vars if self.prefix: # Set default install_dir/scripts from --prefix config_vars = dict(config_vars) config_vars['base'] = self.prefix scheme = self.INSTALL_SCHEMES.get(os.name, self.DEFAULT_SCHEME) for attr, val in scheme.items(): if getattr(self, attr, None) is None: setattr(self, attr, val) from distutils.util import subst_vars for attr in attrs: val = getattr(self, attr) if val is not None: val = subst_vars(val, config_vars) if os.name == 'posix': val = os.path.expanduser(val) setattr(self, attr, val) def _pythonpath(): items = os.environ.get('PYTHONPATH', '').split(os.pathsep) return filter(None, items) def get_site_dirs(): """ Return a list of 'site' dirs """ sitedirs = [] # start with PYTHONPATH sitedirs.extend(_pythonpath()) prefixes = [sys.prefix] if sys.exec_prefix != sys.prefix: prefixes.append(sys.exec_prefix) for prefix in prefixes: if not prefix: continue if sys.platform in ('os2emx', 'riscos'): sitedirs.append(os.path.join(prefix, "Lib", "site-packages")) elif os.sep == '/': sitedirs.extend([ os.path.join( prefix, "lib", "python{}.{}".format(*sys.version_info), "site-packages", ), os.path.join(prefix, "lib", "site-python"), ]) else: sitedirs.extend([ prefix, os.path.join(prefix, "lib", "site-packages"), ]) if sys.platform != 'darwin': continue # for framework builds *only* we add the standard Apple # locations. Currently only per-user, but /Library and # /Network/Library could be added too if 'Python.framework' not in prefix: continue home = os.environ.get('HOME') if not home: continue home_sp = os.path.join( home, 'Library', 'Python', '{}.{}'.format(*sys.version_info), 'site-packages', ) sitedirs.append(home_sp) lib_paths = get_path('purelib'), get_path('platlib') sitedirs.extend(s for s in lib_paths if s not in sitedirs) if site.ENABLE_USER_SITE: sitedirs.append(site.USER_SITE) with contextlib.suppress(AttributeError): sitedirs.extend(site.getsitepackages()) sitedirs = list(map(normalize_path, sitedirs)) return sitedirs def expand_paths(inputs): # noqa: C901 # is too complex (11) # FIXME """Yield sys.path directories that might contain "old-style" packages""" seen = {} for dirname in inputs: dirname = normalize_path(dirname) if dirname in seen: continue seen[dirname] = 1 if not os.path.isdir(dirname): continue files = os.listdir(dirname) yield dirname, files for name in files: if not name.endswith('.pth'): # We only care about the .pth files continue if name in ('easy-install.pth', 'setuptools.pth'): # Ignore .pth files that we control continue # Read the .pth file f = open(os.path.join(dirname, name)) lines = list(yield_lines(f)) f.close() # Yield existing non-dupe, non-import directory lines from it for line in lines: if line.startswith("import"): continue line = normalize_path(line.rstrip()) if line in seen: continue seen[line] = 1 if not os.path.isdir(line): continue yield line, os.listdir(line) def extract_wininst_cfg(dist_filename): """Extract configuration data from a bdist_wininst .exe Returns a configparser.RawConfigParser, or None """ f = open(dist_filename, 'rb') try: endrec = zipfile._EndRecData(f) if endrec is None: return None prepended = (endrec[9] - endrec[5]) - endrec[6] if prepended < 12: # no wininst data here return None f.seek(prepended - 12) tag, cfglen, bmlen = struct.unpack("egg path translations for a given .exe file""" prefixes = [ ('PURELIB/', ''), ('PLATLIB/pywin32_system32', ''), ('PLATLIB/', ''), ('SCRIPTS/', 'EGG-INFO/scripts/'), ('DATA/lib/site-packages', ''), ] z = zipfile.ZipFile(exe_filename) try: for info in z.infolist(): name = info.filename parts = name.split('/') if len(parts) == 3 and parts[2] == 'PKG-INFO': if parts[1].endswith('.egg-info'): prefixes.insert(0, ('/'.join(parts[:2]), 'EGG-INFO/')) break if len(parts) != 2 or not name.endswith('.pth'): continue if name.endswith('-nspkg.pth'): continue if parts[0].upper() in ('PURELIB', 'PLATLIB'): contents = z.read(name).decode() for pth in yield_lines(contents): pth = pth.strip().replace('\\', '/') if not pth.startswith('import'): prefixes.append((('%s/%s/' % (parts[0], pth)), '')) finally: z.close() prefixes = [(x.lower(), y) for x, y in prefixes] prefixes.sort() prefixes.reverse() return prefixes class PthDistributions(Environment): """A .pth file with Distribution paths in it""" dirty = False def __init__(self, filename, sitedirs=()): self.filename = filename self.sitedirs = list(map(normalize_path, sitedirs)) self.basedir = normalize_path(os.path.dirname(self.filename)) self._load() super().__init__([], None, None) for path in yield_lines(self.paths): list(map(self.add, find_distributions(path, True))) def _load(self): self.paths = [] saw_import = False seen = dict.fromkeys(self.sitedirs) if os.path.isfile(self.filename): f = open(self.filename, 'rt') for line in f: if line.startswith('import'): saw_import = True continue path = line.rstrip() self.paths.append(path) if not path.strip() or path.strip().startswith('#'): continue # skip non-existent paths, in case somebody deleted a package # manually, and duplicate paths as well path = self.paths[-1] = normalize_path( os.path.join(self.basedir, path) ) if not os.path.exists(path) or path in seen: self.paths.pop() # skip it self.dirty = True # we cleaned up, so we're dirty now :) continue seen[path] = 1 f.close() if self.paths and not saw_import: self.dirty = True # ensure anything we touch has import wrappers while self.paths and not self.paths[-1].strip(): self.paths.pop() def save(self): """Write changed .pth file back to disk""" if not self.dirty: return rel_paths = list(map(self.make_relative, self.paths)) if rel_paths: log.debug("Saving %s", self.filename) lines = self._wrap_lines(rel_paths) data = '\n'.join(lines) + '\n' if os.path.islink(self.filename): os.unlink(self.filename) with open(self.filename, 'wt') as f: f.write(data) elif os.path.exists(self.filename): log.debug("Deleting empty %s", self.filename) os.unlink(self.filename) self.dirty = False @staticmethod def _wrap_lines(lines): return lines def add(self, dist): """Add `dist` to the distribution map""" new_path = ( dist.location not in self.paths and ( dist.location not in self.sitedirs or # account for '.' being in PYTHONPATH dist.location == os.getcwd() ) ) if new_path: self.paths.append(dist.location) self.dirty = True super().add(dist) def remove(self, dist): """Remove `dist` from the distribution map""" while dist.location in self.paths: self.paths.remove(dist.location) self.dirty = True super().remove(dist) def make_relative(self, path): npath, last = os.path.split(normalize_path(path)) baselen = len(self.basedir) parts = [last] sep = os.altsep == '/' and '/' or os.sep while len(npath) >= baselen: if npath == self.basedir: parts.append(os.curdir) parts.reverse() return sep.join(parts) npath, last = os.path.split(npath) parts.append(last) else: return path class RewritePthDistributions(PthDistributions): @classmethod def _wrap_lines(cls, lines): yield cls.prelude for line in lines: yield line yield cls.postlude prelude = _one_liner(""" import sys sys.__plen = len(sys.path) """) postlude = _one_liner(""" import sys new = sys.path[sys.__plen:] del sys.path[sys.__plen:] p = getattr(sys, '__egginsert', 0) sys.path[p:p] = new sys.__egginsert = p + len(new) """) if os.environ.get('SETUPTOOLS_SYS_PATH_TECHNIQUE', 'raw') == 'rewrite': PthDistributions = RewritePthDistributions def _first_line_re(): """ Return a regular expression based on first_line_re suitable for matching strings. """ if isinstance(first_line_re.pattern, str): return first_line_re # first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern. return re.compile(first_line_re.pattern.decode()) def auto_chmod(func, arg, exc): if func in [os.unlink, os.remove] and os.name == 'nt': chmod(arg, stat.S_IWRITE) return func(arg) et, ev, _ = sys.exc_info() # TODO: This code doesn't make sense. What is it trying to do? raise (ev[0], ev[1] + (" %s %s" % (func, arg))) def update_dist_caches(dist_path, fix_zipimporter_caches): """ Fix any globally cached `dist_path` related data `dist_path` should be a path of a newly installed egg distribution (zipped or unzipped). sys.path_importer_cache contains finder objects that have been cached when importing data from the original distribution. Any such finders need to be cleared since the replacement distribution might be packaged differently, e.g. a zipped egg distribution might get replaced with an unzipped egg folder or vice versa. Having the old finders cached may then cause Python to attempt loading modules from the replacement distribution using an incorrect loader. zipimport.zipimporter objects are Python loaders charged with importing data packaged inside zip archives. If stale loaders referencing the original distribution, are left behind, they can fail to load modules from the replacement distribution. E.g. if an old zipimport.zipimporter instance is used to load data from a new zipped egg archive, it may cause the operation to attempt to locate the requested data in the wrong location - one indicated by the original distribution's zip archive directory information. Such an operation may then fail outright, e.g. report having read a 'bad local file header', or even worse, it may fail silently & return invalid data. zipimport._zip_directory_cache contains cached zip archive directory information for all existing zipimport.zipimporter instances and all such instances connected to the same archive share the same cached directory information. If asked, and the underlying Python implementation allows it, we can fix all existing zipimport.zipimporter instances instead of having to track them down and remove them one by one, by updating their shared cached zip archive directory information. This, of course, assumes that the replacement distribution is packaged as a zipped egg. If not asked to fix existing zipimport.zipimporter instances, we still do our best to clear any remaining zipimport.zipimporter related cached data that might somehow later get used when attempting to load data from the new distribution and thus cause such load operations to fail. Note that when tracking down such remaining stale data, we can not catch every conceivable usage from here, and we clear only those that we know of and have found to cause problems if left alive. Any remaining caches should be updated by whomever is in charge of maintaining them, i.e. they should be ready to handle us replacing their zip archives with new distributions at runtime. """ # There are several other known sources of stale zipimport.zipimporter # instances that we do not clear here, but might if ever given a reason to # do so: # * Global setuptools pkg_resources.working_set (a.k.a. 'master working # set') may contain distributions which may in turn contain their # zipimport.zipimporter loaders. # * Several zipimport.zipimporter loaders held by local variables further # up the function call stack when running the setuptools installation. # * Already loaded modules may have their __loader__ attribute set to the # exact loader instance used when importing them. Python 3.4 docs state # that this information is intended mostly for introspection and so is # not expected to cause us problems. normalized_path = normalize_path(dist_path) _uncache(normalized_path, sys.path_importer_cache) if fix_zipimporter_caches: _replace_zip_directory_cache_data(normalized_path) else: # Here, even though we do not want to fix existing and now stale # zipimporter cache information, we still want to remove it. Related to # Python's zip archive directory information cache, we clear each of # its stale entries in two phases: # 1. Clear the entry so attempting to access zip archive information # via any existing stale zipimport.zipimporter instances fails. # 2. Remove the entry from the cache so any newly constructed # zipimport.zipimporter instances do not end up using old stale # zip archive directory information. # This whole stale data removal step does not seem strictly necessary, # but has been left in because it was done before we started replacing # the zip archive directory information cache content if possible, and # there are no relevant unit tests that we can depend on to tell us if # this is really needed. _remove_and_clear_zip_directory_cache_data(normalized_path) def _collect_zipimporter_cache_entries(normalized_path, cache): """ Return zipimporter cache entry keys related to a given normalized path. Alternative path spellings (e.g. those using different character case or those using alternative path separators) related to the same path are included. Any sub-path entries are included as well, i.e. those corresponding to zip archives embedded in other zip archives. """ result = [] prefix_len = len(normalized_path) for p in cache: np = normalize_path(p) if (np.startswith(normalized_path) and np[prefix_len:prefix_len + 1] in (os.sep, '')): result.append(p) return result def _update_zipimporter_cache(normalized_path, cache, updater=None): """ Update zipimporter cache data for a given normalized path. Any sub-path entries are processed as well, i.e. those corresponding to zip archives embedded in other zip archives. Given updater is a callable taking a cache entry key and the original entry (after already removing the entry from the cache), and expected to update the entry and possibly return a new one to be inserted in its place. Returning None indicates that the entry should not be replaced with a new one. If no updater is given, the cache entries are simply removed without any additional processing, the same as if the updater simply returned None. """ for p in _collect_zipimporter_cache_entries(normalized_path, cache): # N.B. pypy's custom zipimport._zip_directory_cache implementation does # not support the complete dict interface: # * Does not support item assignment, thus not allowing this function # to be used only for removing existing cache entries. # * Does not support the dict.pop() method, forcing us to use the # get/del patterns instead. For more detailed information see the # following links: # https://github.com/pypa/setuptools/issues/202#issuecomment-202913420 # http://bit.ly/2h9itJX old_entry = cache[p] del cache[p] new_entry = updater and updater(p, old_entry) if new_entry is not None: cache[p] = new_entry def _uncache(normalized_path, cache): _update_zipimporter_cache(normalized_path, cache) def _remove_and_clear_zip_directory_cache_data(normalized_path): def clear_and_remove_cached_zip_archive_directory_data(path, old_entry): old_entry.clear() _update_zipimporter_cache( normalized_path, zipimport._zip_directory_cache, updater=clear_and_remove_cached_zip_archive_directory_data) # PyPy Python implementation does not allow directly writing to the # zipimport._zip_directory_cache and so prevents us from attempting to correct # its content. The best we can do there is clear the problematic cache content # and have PyPy repopulate it as needed. The downside is that if there are any # stale zipimport.zipimporter instances laying around, attempting to use them # will fail due to not having its zip archive directory information available # instead of being automatically corrected to use the new correct zip archive # directory information. if '__pypy__' in sys.builtin_module_names: _replace_zip_directory_cache_data = \ _remove_and_clear_zip_directory_cache_data else: def _replace_zip_directory_cache_data(normalized_path): def replace_cached_zip_archive_directory_data(path, old_entry): # N.B. In theory, we could load the zip directory information just # once for all updated path spellings, and then copy it locally and # update its contained path strings to contain the correct # spelling, but that seems like a way too invasive move (this cache # structure is not officially documented anywhere and could in # theory change with new Python releases) for no significant # benefit. old_entry.clear() zipimport.zipimporter(path) old_entry.update(zipimport._zip_directory_cache[path]) return old_entry _update_zipimporter_cache( normalized_path, zipimport._zip_directory_cache, updater=replace_cached_zip_archive_directory_data) def is_python(text, filename=''): "Is this string a valid Python script?" try: compile(text, filename, 'exec') except (SyntaxError, TypeError): return False else: return True def is_sh(executable): """Determine if the specified executable is a .sh (contains a #! line)""" try: with io.open(executable, encoding='latin-1') as fp: magic = fp.read(2) except (OSError, IOError): return executable return magic == '#!' def nt_quote_arg(arg): """Quote a command line argument according to Windows parsing rules""" return subprocess.list2cmdline([arg]) def is_python_script(script_text, filename): """Is this text, as a whole, a Python script? (as opposed to shell/bat/etc. """ if filename.endswith('.py') or filename.endswith('.pyw'): return True # extension says it's Python if is_python(script_text, filename): return True # it's syntactically valid Python if script_text.startswith('#!'): # It begins with a '#!' line, so check if 'python' is in it somewhere return 'python' in script_text.splitlines()[0].lower() return False # Not any Python I can recognize try: from os import chmod as _chmod except ImportError: # Jython compatibility def _chmod(*args): pass def chmod(path, mode): log.debug("changing mode of %s to %o", path, mode) try: _chmod(path, mode) except os.error as e: log.debug("chmod failed: %s", e) class CommandSpec(list): """ A command spec for a #! header, specified as a list of arguments akin to those passed to Popen. """ options = [] split_args = dict() @classmethod def best(cls): """ Choose the best CommandSpec class based on environmental conditions. """ return cls @classmethod def _sys_executable(cls): _default = os.path.normpath(sys.executable) return os.environ.get('__PYVENV_LAUNCHER__', _default) @classmethod def from_param(cls, param): """ Construct a CommandSpec from a parameter to build_scripts, which may be None. """ if isinstance(param, cls): return param if isinstance(param, list): return cls(param) if param is None: return cls.from_environment() # otherwise, assume it's a string. return cls.from_string(param) @classmethod def from_environment(cls): return cls([cls._sys_executable()]) @classmethod def from_string(cls, string): """ Construct a command spec from a simple string representing a command line parseable by shlex.split. """ items = shlex.split(string, **cls.split_args) return cls(items) def install_options(self, script_text): self.options = shlex.split(self._extract_options(script_text)) cmdline = subprocess.list2cmdline(self) if not isascii(cmdline): self.options[:0] = ['-x'] @staticmethod def _extract_options(orig_script): """ Extract any options from the first line of the script. """ first = (orig_script + '\n').splitlines()[0] match = _first_line_re().match(first) options = match.group(1) or '' if match else '' return options.strip() def as_header(self): return self._render(self + list(self.options)) @staticmethod def _strip_quotes(item): _QUOTES = '"\'' for q in _QUOTES: if item.startswith(q) and item.endswith(q): return item[1:-1] return item @staticmethod def _render(items): cmdline = subprocess.list2cmdline( CommandSpec._strip_quotes(item.strip()) for item in items) return '#!' + cmdline + '\n' # For pbr compat; will be removed in a future version. sys_executable = CommandSpec._sys_executable() class WindowsCommandSpec(CommandSpec): split_args = dict(posix=False) class ScriptWriter: """ Encapsulates behavior around writing entry point scripts for console and gui apps. """ template = textwrap.dedent(r""" # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r import re import sys # for compatibility with easy_install; see #2198 __requires__ = %(spec)r try: from importlib.metadata import distribution except ImportError: try: from importlib_metadata import distribution except ImportError: from pkg_resources import load_entry_point def importlib_load_entry_point(spec, group, name): dist_name, _, _ = spec.partition('==') matches = ( entry_point for entry_point in distribution(dist_name).entry_points if entry_point.group == group and entry_point.name == name ) return next(matches).load() globals().setdefault('load_entry_point', importlib_load_entry_point) if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit(load_entry_point(%(spec)r, %(group)r, %(name)r)()) """).lstrip() command_spec_class = CommandSpec @classmethod def get_script_args(cls, dist, executable=None, wininst=False): # for backward compatibility warnings.warn("Use get_args", EasyInstallDeprecationWarning) writer = (WindowsScriptWriter if wininst else ScriptWriter).best() header = cls.get_script_header("", executable, wininst) return writer.get_args(dist, header) @classmethod def get_script_header(cls, script_text, executable=None, wininst=False): # for backward compatibility warnings.warn( "Use get_header", EasyInstallDeprecationWarning, stacklevel=2) if wininst: executable = "python.exe" return cls.get_header(script_text, executable) @classmethod def get_args(cls, dist, header=None): """ Yield write_script() argument tuples for a distribution's console_scripts and gui_scripts entry points. """ if header is None: header = cls.get_header() spec = str(dist.as_requirement()) for type_ in 'console', 'gui': group = type_ + '_scripts' for name, ep in dist.get_entry_map(group).items(): cls._ensure_safe_name(name) script_text = cls.template % locals() args = cls._get_script_args(type_, name, header, script_text) for res in args: yield res @staticmethod def _ensure_safe_name(name): """ Prevent paths in *_scripts entry point names. """ has_path_sep = re.search(r'[\\/]', name) if has_path_sep: raise ValueError("Path separators not allowed in script names") @classmethod def get_writer(cls, force_windows): # for backward compatibility warnings.warn("Use best", EasyInstallDeprecationWarning) return WindowsScriptWriter.best() if force_windows else cls.best() @classmethod def best(cls): """ Select the best ScriptWriter for this environment. """ if sys.platform == 'win32' or (os.name == 'java' and os._name == 'nt'): return WindowsScriptWriter.best() else: return cls @classmethod def _get_script_args(cls, type_, name, header, script_text): # Simply write the stub with no extension. yield (name, header + script_text) @classmethod def get_header(cls, script_text="", executable=None): """Create a #! line, getting options (if any) from script_text""" cmd = cls.command_spec_class.best().from_param(executable) cmd.install_options(script_text) return cmd.as_header() class WindowsScriptWriter(ScriptWriter): command_spec_class = WindowsCommandSpec @classmethod def get_writer(cls): # for backward compatibility warnings.warn("Use best", EasyInstallDeprecationWarning) return cls.best() @classmethod def best(cls): """ Select the best ScriptWriter suitable for Windows """ writer_lookup = dict( executable=WindowsExecutableLauncherWriter, natural=cls, ) # for compatibility, use the executable launcher by default launcher = os.environ.get('SETUPTOOLS_LAUNCHER', 'executable') return writer_lookup[launcher] @classmethod def _get_script_args(cls, type_, name, header, script_text): "For Windows, add a .py extension" ext = dict(console='.pya', gui='.pyw')[type_] if ext not in os.environ['PATHEXT'].lower().split(';'): msg = ( "{ext} not listed in PATHEXT; scripts will not be " "recognized as executables." ).format(**locals()) warnings.warn(msg, UserWarning) old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe'] old.remove(ext) header = cls._adjust_header(type_, header) blockers = [name + x for x in old] yield name + ext, header + script_text, 't', blockers @classmethod def _adjust_header(cls, type_, orig_header): """ Make sure 'pythonw' is used for gui and 'python' is used for console (regardless of what sys.executable is). """ pattern = 'pythonw.exe' repl = 'python.exe' if type_ == 'gui': pattern, repl = repl, pattern pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE) new_header = pattern_ob.sub(string=orig_header, repl=repl) return new_header if cls._use_header(new_header) else orig_header @staticmethod def _use_header(new_header): """ Should _adjust_header use the replaced header? On non-windows systems, always use. On Windows systems, only use the replaced header if it resolves to an executable on the system. """ clean_header = new_header[2:-1].strip('"') return sys.platform != 'win32' or find_executable(clean_header) class WindowsExecutableLauncherWriter(WindowsScriptWriter): @classmethod def _get_script_args(cls, type_, name, header, script_text): """ For Windows, add a .py extension and an .exe launcher """ if type_ == 'gui': launcher_type = 'gui' ext = '-script.pyw' old = ['.pyw'] else: launcher_type = 'cli' ext = '-script.py' old = ['.py', '.pyc', '.pyo'] hdr = cls._adjust_header(type_, header) blockers = [name + x for x in old] yield (name + ext, hdr + script_text, 't', blockers) yield ( name + '.exe', get_win_launcher(launcher_type), 'b' # write in binary mode ) if not is_64bit(): # install a manifest for the launcher to prevent Windows # from detecting it as an installer (which it will for # launchers like easy_install.exe). Consider only # adding a manifest for launchers detected as installers. # See Distribute #143 for details. m_name = name + '.exe.manifest' yield (m_name, load_launcher_manifest(name), 't') # for backward-compatibility get_script_args = ScriptWriter.get_script_args get_script_header = ScriptWriter.get_script_header def get_win_launcher(type): """ Load the Windows launcher (executable) suitable for launching a script. `type` should be either 'cli' or 'gui' Returns the executable as a byte string. """ launcher_fn = '%s.exe' % type if is_64bit(): if get_platform() == "win-arm64": launcher_fn = launcher_fn.replace(".", "-arm64.") else: launcher_fn = launcher_fn.replace(".", "-64.") else: launcher_fn = launcher_fn.replace(".", "-32.") return resource_string('setuptools', launcher_fn) def load_launcher_manifest(name): manifest = pkg_resources.resource_string(__name__, 'launcher manifest.xml') return manifest.decode('utf-8') % vars() def rmtree(path, ignore_errors=False, onerror=auto_chmod): return shutil.rmtree(path, ignore_errors, onerror) def current_umask(): tmp = os.umask(0o022) os.umask(tmp) return tmp def only_strs(values): """ Exclude non-str values. Ref #3063. """ return filter(lambda val: isinstance(val, str), values) class EasyInstallDeprecationWarning(SetuptoolsDeprecationWarning): """ Warning for EasyInstall deprecations, bypassing suppression. """ PK{5Z=M M -Lib/site-packages/setuptools/command/alias.pynuW+Afrom distutils.errors import DistutilsOptionError from setuptools.command.setopt import edit_config, option_base, config_file def shquote(arg): """Quote an argument for later parsing by shlex.split()""" for c in '"', "'", "\\", "#": if c in arg: return repr(arg) if arg.split() != [arg]: return repr(arg) return arg class alias(option_base): """Define a shortcut that invokes one or more commands""" description = "define a shortcut to invoke one or more commands" command_consumes_arguments = True user_options = [ ('remove', 'r', 'remove (unset) the alias'), ] + option_base.user_options boolean_options = option_base.boolean_options + ['remove'] def initialize_options(self): option_base.initialize_options(self) self.args = None self.remove = None def finalize_options(self): option_base.finalize_options(self) if self.remove and len(self.args) != 1: raise DistutilsOptionError( "Must specify exactly one argument (the alias name) when " "using --remove" ) def run(self): aliases = self.distribution.get_option_dict('aliases') if not self.args: print("Command Aliases") print("---------------") for alias in aliases: print("setup.py alias", format_alias(alias, aliases)) return elif len(self.args) == 1: alias, = self.args if self.remove: command = None elif alias in aliases: print("setup.py alias", format_alias(alias, aliases)) return else: print("No alias definition found for %r" % alias) return else: alias = self.args[0] command = ' '.join(map(shquote, self.args[1:])) edit_config(self.filename, {'aliases': {alias: command}}, self.dry_run) def format_alias(name, aliases): source, command = aliases[name] if source == config_file('global'): source = '--global-config ' elif source == config_file('user'): source = '--user-config ' elif source == config_file('local'): source = '' else: source = '--filename=%r' % source return source + name + ' ' + command PK{5Zȹ1Lib/site-packages/setuptools/command/bdist_rpm.pynuW+Aimport distutils.command.bdist_rpm as orig import warnings from setuptools import SetuptoolsDeprecationWarning class bdist_rpm(orig.bdist_rpm): """ Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to disable eggs in RPM distributions. """ def run(self): warnings.warn( "bdist_rpm is deprecated and will be removed in a future " "version. Use bdist_wheel (wheel packages) instead.", SetuptoolsDeprecationWarning, ) # ensure distro name is up-to-date self.run_command('egg_info') orig.bdist_rpm.run(self) def _make_spec_file(self): spec = orig.bdist_rpm._make_spec_file(self) spec = [ line.replace( "setup.py install ", "setup.py install --single-version-externally-managed " ).replace( "%setup", "%setup -n %{name}-%{unmangled_version}" ) for line in spec ] return spec PK{5ZPhh0Lib/site-packages/setuptools/command/egg_info.pynuW+A"""setuptools.command.egg_info Create a distribution's .egg-info directory and contents""" from distutils.filelist import FileList as _FileList from distutils.errors import DistutilsInternalError from distutils.util import convert_path from distutils import log import distutils.errors import distutils.filelist import functools import os import re import sys import io import warnings import time import collections from .._importlib import metadata from .. import _entry_points from setuptools import Command from setuptools.command.sdist import sdist from setuptools.command.sdist import walk_revctrl from setuptools.command.setopt import edit_config from setuptools.command import bdist_egg from pkg_resources import ( Requirement, safe_name, parse_version, safe_version, to_filename) import setuptools.unicode_utils as unicode_utils from setuptools.glob import glob from setuptools.extern import packaging from setuptools.extern.jaraco.text import yield_lines from setuptools import SetuptoolsDeprecationWarning def translate_pattern(glob): # noqa: C901 # is too complex (14) # FIXME """ Translate a file path glob like '*.txt' in to a regular expression. This differs from fnmatch.translate which allows wildcards to match directory separators. It also knows about '**/' which matches any number of directories. """ pat = '' # This will split on '/' within [character classes]. This is deliberate. chunks = glob.split(os.path.sep) sep = re.escape(os.sep) valid_char = '[^%s]' % (sep,) for c, chunk in enumerate(chunks): last_chunk = c == len(chunks) - 1 # Chunks that are a literal ** are globstars. They match anything. if chunk == '**': if last_chunk: # Match anything if this is the last component pat += '.*' else: # Match '(name/)*' pat += '(?:%s+%s)*' % (valid_char, sep) continue # Break here as the whole path component has been handled # Find any special characters in the remainder i = 0 chunk_len = len(chunk) while i < chunk_len: char = chunk[i] if char == '*': # Match any number of name characters pat += valid_char + '*' elif char == '?': # Match a name character pat += valid_char elif char == '[': # Character class inner_i = i + 1 # Skip initial !/] chars if inner_i < chunk_len and chunk[inner_i] == '!': inner_i = inner_i + 1 if inner_i < chunk_len and chunk[inner_i] == ']': inner_i = inner_i + 1 # Loop till the closing ] is found while inner_i < chunk_len and chunk[inner_i] != ']': inner_i = inner_i + 1 if inner_i >= chunk_len: # Got to the end of the string without finding a closing ] # Do not treat this as a matching group, but as a literal [ pat += re.escape(char) else: # Grab the insides of the [brackets] inner = chunk[i + 1:inner_i] char_class = '' # Class negation if inner[0] == '!': char_class = '^' inner = inner[1:] char_class += re.escape(inner) pat += '[%s]' % (char_class,) # Skip to the end ] i = inner_i else: pat += re.escape(char) i += 1 # Join each chunk with the dir separator if not last_chunk: pat += sep pat += r'\Z' return re.compile(pat, flags=re.MULTILINE | re.DOTALL) class InfoCommon: tag_build = None tag_date = None @property def name(self): return safe_name(self.distribution.get_name()) def tagged_version(self): return safe_version(self._maybe_tag(self.distribution.get_version())) def _maybe_tag(self, version): """ egg_info may be called more than once for a distribution, in which case the version string already contains all tags. """ return ( version if self.vtags and self._already_tagged(version) else version + self.vtags ) def _already_tagged(self, version: str) -> bool: # Depending on their format, tags may change with version normalization. # So in addition the regular tags, we have to search for the normalized ones. return version.endswith(self.vtags) or version.endswith(self._safe_tags()) def _safe_tags(self) -> str: # To implement this we can rely on `safe_version` pretending to be version 0 # followed by tags. Then we simply discard the starting 0 (fake version number) return safe_version(f"0{self.vtags}")[1:] def tags(self) -> str: version = '' if self.tag_build: version += self.tag_build if self.tag_date: version += time.strftime("-%Y%m%d") return version vtags = property(tags) class egg_info(InfoCommon, Command): description = "create a distribution's .egg-info directory" user_options = [ ('egg-base=', 'e', "directory containing .egg-info directories" " (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]"), ] boolean_options = ['tag-date'] negative_opt = { 'no-date': 'tag-date', } def initialize_options(self): self.egg_base = None self.egg_name = None self.egg_info = None self.egg_version = None self.broken_egg_info = False self.ignore_egg_info_in_manifest = False #################################### # allow the 'tag_svn_revision' to be detected and # set, supporting sdists built on older Setuptools. @property def tag_svn_revision(self): pass @tag_svn_revision.setter def tag_svn_revision(self, value): pass #################################### def save_version_info(self, filename): """ Materialize the value of date into the build tag. Install build keys in a deterministic order to avoid arbitrary reordering on subsequent builds. """ egg_info = collections.OrderedDict() # follow the order these keys would have been added # when PYTHONHASHSEED=0 egg_info['tag_build'] = self.tags() egg_info['tag_date'] = 0 edit_config(filename, dict(egg_info=egg_info)) def finalize_options(self): # Note: we need to capture the current value returned # by `self.tagged_version()`, so we can later update # `self.distribution.metadata.version` without # repercussions. self.egg_name = self.name self.egg_version = self.tagged_version() parsed_version = parse_version(self.egg_version) try: is_version = isinstance(parsed_version, packaging.version.Version) spec = "%s==%s" if is_version else "%s===%s" Requirement(spec % (self.egg_name, self.egg_version)) except ValueError as e: raise distutils.errors.DistutilsOptionError( "Invalid distribution name or version syntax: %s-%s" % (self.egg_name, self.egg_version) ) from e if self.egg_base is None: dirs = self.distribution.package_dir self.egg_base = (dirs or {}).get('', os.curdir) self.ensure_dirname('egg_base') self.egg_info = to_filename(self.egg_name) + '.egg-info' if self.egg_base != os.curdir: self.egg_info = os.path.join(self.egg_base, self.egg_info) if '-' in self.egg_name: self.check_broken_egg_info() # Set package version for the benefit of dumber commands # (e.g. sdist, bdist_wininst, etc.) # self.distribution.metadata.version = self.egg_version # If we bootstrapped around the lack of a PKG-INFO, as might be the # case in a fresh checkout, make sure that any special tags get added # to the version info # pd = self.distribution._patched_dist if pd is not None and pd.key == self.egg_name.lower(): pd._version = self.egg_version pd._parsed_version = parse_version(self.egg_version) self.distribution._patched_dist = None def write_or_delete_file(self, what, filename, data, force=False): """Write `data` to `filename` or delete if empty If `data` is non-empty, this routine is the same as ``write_file()``. If `data` is empty but not ``None``, this is the same as calling ``delete_file(filename)`. If `data` is ``None``, then this is a no-op unless `filename` exists, in which case a warning is issued about the orphaned file (if `force` is false), or deleted (if `force` is true). """ if data: self.write_file(what, filename, data) elif os.path.exists(filename): if data is None and not force: log.warn( "%s not set in setup(), but %s exists", what, filename ) return else: self.delete_file(filename) def write_file(self, what, filename, data): """Write `data` to `filename` (if not a dry run) after announcing it `what` is used in a log message to identify what is being written to the file. """ log.info("writing %s to %s", what, filename) data = data.encode("utf-8") if not self.dry_run: f = open(filename, 'wb') f.write(data) f.close() def delete_file(self, filename): """Delete `filename` (if not a dry run) after announcing it""" log.info("deleting %s", filename) if not self.dry_run: os.unlink(filename) def run(self): self.mkpath(self.egg_info) os.utime(self.egg_info, None) for ep in metadata.entry_points(group='egg_info.writers'): writer = ep.load() writer(self, ep.name, os.path.join(self.egg_info, ep.name)) # Get rid of native_libs.txt if it was put there by older bdist_egg nl = os.path.join(self.egg_info, "native_libs.txt") if os.path.exists(nl): self.delete_file(nl) self.find_sources() def find_sources(self): """Generate SOURCES.txt manifest file""" manifest_filename = os.path.join(self.egg_info, "SOURCES.txt") mm = manifest_maker(self.distribution) mm.ignore_egg_info_dir = self.ignore_egg_info_in_manifest mm.manifest = manifest_filename mm.run() self.filelist = mm.filelist def check_broken_egg_info(self): bei = self.egg_name + '.egg-info' if self.egg_base != os.curdir: bei = os.path.join(self.egg_base, bei) if os.path.exists(bei): log.warn( "-" * 78 + '\n' "Note: Your current .egg-info directory has a '-' in its name;" '\nthis will not work correctly with "setup.py develop".\n\n' 'Please rename %s to %s to correct this problem.\n' + '-' * 78, bei, self.egg_info ) self.broken_egg_info = self.egg_info self.egg_info = bei # make it work for now class FileList(_FileList): # Implementations of the various MANIFEST.in commands def __init__(self, warn=None, debug_print=None, ignore_egg_info_dir=False): super().__init__(warn, debug_print) self.ignore_egg_info_dir = ignore_egg_info_dir def process_template_line(self, line): # Parse the line: split it up, make sure the right number of words # is there, and return the relevant words. 'action' is always # defined: it's the first word of the line. Which of the other # three are defined depends on the action; it'll be either # patterns, (dir and patterns), or (dir_pattern). (action, patterns, dir, dir_pattern) = self._parse_template_line(line) action_map = { 'include': self.include, 'exclude': self.exclude, 'global-include': self.global_include, 'global-exclude': self.global_exclude, 'recursive-include': functools.partial( self.recursive_include, dir, ), 'recursive-exclude': functools.partial( self.recursive_exclude, dir, ), 'graft': self.graft, 'prune': self.prune, } log_map = { 'include': "warning: no files found matching '%s'", 'exclude': ( "warning: no previously-included files found " "matching '%s'" ), 'global-include': ( "warning: no files found matching '%s' " "anywhere in distribution" ), 'global-exclude': ( "warning: no previously-included files matching " "'%s' found anywhere in distribution" ), 'recursive-include': ( "warning: no files found matching '%s' " "under directory '%s'" ), 'recursive-exclude': ( "warning: no previously-included files matching " "'%s' found under directory '%s'" ), 'graft': "warning: no directories found matching '%s'", 'prune': "no previously-included directories found matching '%s'", } try: process_action = action_map[action] except KeyError: raise DistutilsInternalError( "this cannot happen: invalid action '{action!s}'". format(action=action), ) # OK, now we know that the action is valid and we have the # right number of words on the line for that action -- so we # can proceed with minimal error-checking. action_is_recursive = action.startswith('recursive-') if action in {'graft', 'prune'}: patterns = [dir_pattern] extra_log_args = (dir, ) if action_is_recursive else () log_tmpl = log_map[action] self.debug_print( ' '.join( [action] + ([dir] if action_is_recursive else []) + patterns, ) ) for pattern in patterns: if not process_action(pattern): log.warn(log_tmpl, pattern, *extra_log_args) def _remove_files(self, predicate): """ Remove all files from the file list that match the predicate. Return True if any matching files were removed """ found = False for i in range(len(self.files) - 1, -1, -1): if predicate(self.files[i]): self.debug_print(" removing " + self.files[i]) del self.files[i] found = True return found def include(self, pattern): """Include files that match 'pattern'.""" found = [f for f in glob(pattern) if not os.path.isdir(f)] self.extend(found) return bool(found) def exclude(self, pattern): """Exclude files that match 'pattern'.""" match = translate_pattern(pattern) return self._remove_files(match.match) def recursive_include(self, dir, pattern): """ Include all files anywhere in 'dir/' that match the pattern. """ full_pattern = os.path.join(dir, '**', pattern) found = [f for f in glob(full_pattern, recursive=True) if not os.path.isdir(f)] self.extend(found) return bool(found) def recursive_exclude(self, dir, pattern): """ Exclude any file anywhere in 'dir/' that match the pattern. """ match = translate_pattern(os.path.join(dir, '**', pattern)) return self._remove_files(match.match) def graft(self, dir): """Include all files from 'dir/'.""" found = [ item for match_dir in glob(dir) for item in distutils.filelist.findall(match_dir) ] self.extend(found) return bool(found) def prune(self, dir): """Filter out files from 'dir/'.""" match = translate_pattern(os.path.join(dir, '**')) return self._remove_files(match.match) def global_include(self, pattern): """ Include all files anywhere in the current directory that match the pattern. This is very inefficient on large file trees. """ if self.allfiles is None: self.findall() match = translate_pattern(os.path.join('**', pattern)) found = [f for f in self.allfiles if match.match(f)] self.extend(found) return bool(found) def global_exclude(self, pattern): """ Exclude all files anywhere that match the pattern. """ match = translate_pattern(os.path.join('**', pattern)) return self._remove_files(match.match) def append(self, item): if item.endswith('\r'): # Fix older sdists built on Windows item = item[:-1] path = convert_path(item) if self._safe_path(path): self.files.append(path) def extend(self, paths): self.files.extend(filter(self._safe_path, paths)) def _repair(self): """ Replace self.files with only safe paths Because some owners of FileList manipulate the underlying ``files`` attribute directly, this method must be called to repair those paths. """ self.files = list(filter(self._safe_path, self.files)) def _safe_path(self, path): enc_warn = "'%s' not %s encodable -- skipping" # To avoid accidental trans-codings errors, first to unicode u_path = unicode_utils.filesys_decode(path) if u_path is None: log.warn("'%s' in unexpected encoding -- skipping" % path) return False # Must ensure utf-8 encodability utf8_path = unicode_utils.try_encode(u_path, "utf-8") if utf8_path is None: log.warn(enc_warn, path, 'utf-8') return False try: # ignore egg-info paths is_egg_info = ".egg-info" in u_path or b".egg-info" in utf8_path if self.ignore_egg_info_dir and is_egg_info: return False # accept is either way checks out if os.path.exists(u_path) or os.path.exists(utf8_path): return True # this will catch any encode errors decoding u_path except UnicodeEncodeError: log.warn(enc_warn, path, sys.getfilesystemencoding()) class manifest_maker(sdist): template = "MANIFEST.in" def initialize_options(self): self.use_defaults = 1 self.prune = 1 self.manifest_only = 1 self.force_manifest = 1 self.ignore_egg_info_dir = False def finalize_options(self): pass def run(self): self.filelist = FileList(ignore_egg_info_dir=self.ignore_egg_info_dir) if not os.path.exists(self.manifest): self.write_manifest() # it must exist so it'll get in the list self.add_defaults() if os.path.exists(self.template): self.read_template() self.add_license_files() self.prune_file_list() self.filelist.sort() self.filelist.remove_duplicates() self.write_manifest() def _manifest_normalize(self, path): path = unicode_utils.filesys_decode(path) return path.replace(os.sep, '/') def write_manifest(self): """ Write the file list in 'self.filelist' to the manifest file named by 'self.manifest'. """ self.filelist._repair() # Now _repairs should encodability, but not unicode files = [self._manifest_normalize(f) for f in self.filelist.files] msg = "writing manifest file '%s'" % self.manifest self.execute(write_file, (self.manifest, files), msg) def warn(self, msg): if not self._should_suppress_warning(msg): sdist.warn(self, msg) @staticmethod def _should_suppress_warning(msg): """ suppress missing-file warnings from sdist """ return re.match(r"standard file .*not found", msg) def add_defaults(self): sdist.add_defaults(self) self.filelist.append(self.template) self.filelist.append(self.manifest) rcfiles = list(walk_revctrl()) if rcfiles: self.filelist.extend(rcfiles) elif os.path.exists(self.manifest): self.read_manifest() if os.path.exists("setup.py"): # setup.py should be included by default, even if it's not # the script called to create the sdist self.filelist.append("setup.py") ei_cmd = self.get_finalized_command('egg_info') self.filelist.graft(ei_cmd.egg_info) def add_license_files(self): license_files = self.distribution.metadata.license_files or [] for lf in license_files: log.info("adding license file '%s'", lf) pass self.filelist.extend(license_files) def prune_file_list(self): build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() self.filelist.prune(build.build_base) self.filelist.prune(base_dir) sep = re.escape(os.sep) self.filelist.exclude_pattern(r'(^|' + sep + r')(RCS|CVS|\.svn)' + sep, is_regex=1) def _safe_data_files(self, build_py): """ The parent class implementation of this method (``sdist``) will try to include data files, which might cause recursion problems when ``include_package_data=True``. Therefore, avoid triggering any attempt of analyzing/building the manifest again. """ if hasattr(build_py, 'get_data_files_without_manifest'): return build_py.get_data_files_without_manifest() warnings.warn( "Custom 'build_py' does not implement " "'get_data_files_without_manifest'.\nPlease extend command classes" " from setuptools instead of distutils.", SetuptoolsDeprecationWarning ) return build_py.get_data_files() def write_file(filename, contents): """Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. """ contents = "\n".join(contents) # assuming the contents has been vetted for utf-8 encoding contents = contents.encode("utf-8") with open(filename, "wb") as f: # always write POSIX-style manifest f.write(contents) def write_pkg_info(cmd, basename, filename): log.info("writing %s", filename) if not cmd.dry_run: metadata = cmd.distribution.metadata metadata.version, oldver = cmd.egg_version, metadata.version metadata.name, oldname = cmd.egg_name, metadata.name try: # write unescaped data to PKG-INFO, so older pkg_resources # can still parse it metadata.write_pkg_info(cmd.egg_info) finally: metadata.name, metadata.version = oldname, oldver safe = getattr(cmd.distribution, 'zip_safe', None) bdist_egg.write_safety_flag(cmd.egg_info, safe) def warn_depends_obsolete(cmd, basename, filename): if os.path.exists(filename): log.warn( "WARNING: 'depends.txt' is not used by setuptools 0.6!\n" "Use the install_requires/extras_require setup() args instead." ) def _write_requirements(stream, reqs): lines = yield_lines(reqs or ()) def append_cr(line): return line + '\n' lines = map(append_cr, lines) stream.writelines(lines) def write_requirements(cmd, basename, filename): dist = cmd.distribution data = io.StringIO() _write_requirements(data, dist.install_requires) extras_require = dist.extras_require or {} for extra in sorted(extras_require): data.write('\n[{extra}]\n'.format(**vars())) _write_requirements(data, extras_require[extra]) cmd.write_or_delete_file("requirements", filename, data.getvalue()) def write_setup_requirements(cmd, basename, filename): data = io.StringIO() _write_requirements(data, cmd.distribution.setup_requires) cmd.write_or_delete_file("setup-requirements", filename, data.getvalue()) def write_toplevel_names(cmd, basename, filename): pkgs = dict.fromkeys( [ k.split('.', 1)[0] for k in cmd.distribution.iter_distribution_names() ] ) cmd.write_file("top-level names", filename, '\n'.join(sorted(pkgs)) + '\n') def overwrite_arg(cmd, basename, filename): write_arg(cmd, basename, filename, True) def write_arg(cmd, basename, filename, force=False): argname = os.path.splitext(basename)[0] value = getattr(cmd.distribution, argname, None) if value is not None: value = '\n'.join(value) + '\n' cmd.write_or_delete_file(argname, filename, value, force) def write_entries(cmd, basename, filename): eps = _entry_points.load(cmd.distribution.entry_points) defn = _entry_points.render(eps) cmd.write_or_delete_file('entry points', filename, defn, True) def get_pkg_info_revision(): """ Get a -r### off of PKG-INFO Version in case this is an sdist of a subversion revision. """ warnings.warn( "get_pkg_info_revision is deprecated.", EggInfoDeprecationWarning) if os.path.exists('PKG-INFO'): with io.open('PKG-INFO') as f: for line in f: match = re.match(r"Version:.*-r(\d+)\s*$", line) if match: return int(match.group(1)) return 0 class EggInfoDeprecationWarning(SetuptoolsDeprecationWarning): """Deprecated behavior warning for EggInfo, bypassing suppression.""" PK{5ZFF3Lib/site-packages/setuptools/command/upload_docs.pynuW+A# -*- coding: utf-8 -*- """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to sites other than PyPi such as devpi). """ from base64 import standard_b64encode from distutils import log from distutils.errors import DistutilsOptionError import os import socket import zipfile import tempfile import shutil import itertools import functools import http.client import urllib.parse import warnings from .._importlib import metadata from .. import SetuptoolsDeprecationWarning from .upload import upload def _encode(s): return s.encode('utf-8', 'surrogateescape') class upload_docs(upload): # override the default repository as upload_docs isn't # supported by Warehouse (and won't be). DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi/' description = 'Upload documentation to sites other than PyPi such as devpi' user_options = [ ('repository=', 'r', "url of repository [default: %s]" % upload.DEFAULT_REPOSITORY), ('show-response', None, 'display full response text from server'), ('upload-dir=', None, 'directory to upload'), ] boolean_options = upload.boolean_options def has_sphinx(self): return bool( self.upload_dir is None and metadata.entry_points(group='distutils.commands', name='build_sphinx') ) sub_commands = [('build_sphinx', has_sphinx)] def initialize_options(self): upload.initialize_options(self) self.upload_dir = None self.target_dir = None def finalize_options(self): log.warn( "Upload_docs command is deprecated. Use Read the Docs " "(https://readthedocs.org) instead.") upload.finalize_options(self) if self.upload_dir is None: if self.has_sphinx(): build_sphinx = self.get_finalized_command('build_sphinx') self.target_dir = dict(build_sphinx.builder_target_dirs)['html'] else: build = self.get_finalized_command('build') self.target_dir = os.path.join(build.build_base, 'docs') else: self.ensure_dirname('upload_dir') self.target_dir = self.upload_dir self.announce('Using upload directory %s' % self.target_dir) def create_zipfile(self, filename): zip_file = zipfile.ZipFile(filename, "w") try: self.mkpath(self.target_dir) # just in case for root, dirs, files in os.walk(self.target_dir): if root == self.target_dir and not files: tmpl = "no files found in upload directory '%s'" raise DistutilsOptionError(tmpl % self.target_dir) for name in files: full = os.path.join(root, name) relative = root[len(self.target_dir):].lstrip(os.path.sep) dest = os.path.join(relative, name) zip_file.write(full, dest) finally: zip_file.close() def run(self): warnings.warn( "upload_docs is deprecated and will be removed in a future " "version. Use tools like httpie or curl instead.", SetuptoolsDeprecationWarning, ) # Run sub commands for cmd_name in self.get_sub_commands(): self.run_command(cmd_name) tmp_dir = tempfile.mkdtemp() name = self.distribution.metadata.get_name() zip_file = os.path.join(tmp_dir, "%s.zip" % name) try: self.create_zipfile(zip_file) self.upload_file(zip_file) finally: shutil.rmtree(tmp_dir) @staticmethod def _build_part(item, sep_boundary): key, values = item title = '\nContent-Disposition: form-data; name="%s"' % key # handle multiple entries for the same name if not isinstance(values, list): values = [values] for value in values: if isinstance(value, tuple): title += '; filename="%s"' % value[0] value = value[1] else: value = _encode(value) yield sep_boundary yield _encode(title) yield b"\n\n" yield value if value and value[-1:] == b'\r': yield b'\n' # write an extra newline (lurve Macs) @classmethod def _build_multipart(cls, data): """ Build up the MIME payload for the POST data """ boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = b'\n--' + boundary.encode('ascii') end_boundary = sep_boundary + b'--' end_items = end_boundary, b"\n", builder = functools.partial( cls._build_part, sep_boundary=sep_boundary, ) part_groups = map(builder, data.items()) parts = itertools.chain.from_iterable(part_groups) body_items = itertools.chain(parts, end_items) content_type = 'multipart/form-data; boundary=%s' % boundary return b''.join(body_items), content_type def upload_file(self, filename): with open(filename, 'rb') as f: content = f.read() meta = self.distribution.metadata data = { ':action': 'doc_upload', 'name': meta.get_name(), 'content': (os.path.basename(filename), content), } # set up the authentication credentials = _encode(self.username + ':' + self.password) credentials = standard_b64encode(credentials).decode('ascii') auth = "Basic " + credentials body, ct = self._build_multipart(data) msg = "Submitting documentation to %s" % (self.repository) self.announce(msg, log.INFO) # build the Request # We can't use urllib2 since we need to send the Basic # auth right with the first request schema, netloc, url, params, query, fragments = \ urllib.parse.urlparse(self.repository) assert not params and not query and not fragments if schema == 'http': conn = http.client.HTTPConnection(netloc) elif schema == 'https': conn = http.client.HTTPSConnection(netloc) else: raise AssertionError("unsupported schema " + schema) data = '' try: conn.connect() conn.putrequest("POST", url) content_type = ct conn.putheader('Content-type', content_type) conn.putheader('Content-length', str(len(body))) conn.putheader('Authorization', auth) conn.endheaders() conn.send(body) except socket.error as e: self.announce(str(e), log.ERROR) return r = conn.getresponse() if r.status == 200: msg = 'Server response (%s): %s' % (r.status, r.reason) self.announce(msg, log.INFO) elif r.status == 301: location = r.getheader('Location') if location is None: location = 'https://pythonhosted.org/%s/' % meta.get_name() msg = 'Upload successful. Visit %s' % location self.announce(msg, log.INFO) else: msg = 'Upload failed (%s): %s' % (r.status, r.reason) self.announce(msg, log.ERROR) if self.show_response: print('-' * 75, r.read(), '-' * 75) PK{5Z])Btt:Lib/site-packages/setuptools/command/launcher manifest.xmlnuW+A PK{5Z}]==1Lib/site-packages/setuptools/command/build_ext.pynuW+Aimport os import sys import itertools from importlib.machinery import EXTENSION_SUFFIXES from importlib.util import cache_from_source as _compiled_file_name from typing import Dict, Iterator, List, Tuple from distutils.command.build_ext import build_ext as _du_build_ext from distutils.ccompiler import new_compiler from distutils.sysconfig import customize_compiler, get_config_var from distutils import log from setuptools.errors import BaseError from setuptools.extension import Extension, Library try: # Attempt to use Cython for building extensions, if available from Cython.Distutils.build_ext import build_ext as _build_ext # Additionally, assert that the compiler module will load # also. Ref #1229. __import__('Cython.Compiler.Main') except ImportError: _build_ext = _du_build_ext # make sure _config_vars is initialized get_config_var("LDSHARED") from distutils.sysconfig import _config_vars as _CONFIG_VARS # noqa def _customize_compiler_for_shlib(compiler): if sys.platform == "darwin": # building .dylib requires additional compiler flags on OSX; here we # temporarily substitute the pyconfig.h variables so that distutils' # 'customize_compiler' uses them before we build the shared libraries. tmp = _CONFIG_VARS.copy() try: # XXX Help! I don't have any idea whether these are right... _CONFIG_VARS['LDSHARED'] = ( "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup") _CONFIG_VARS['CCSHARED'] = " -dynamiclib" _CONFIG_VARS['SO'] = ".dylib" customize_compiler(compiler) finally: _CONFIG_VARS.clear() _CONFIG_VARS.update(tmp) else: customize_compiler(compiler) have_rtld = False use_stubs = False libtype = 'shared' if sys.platform == "darwin": use_stubs = True elif os.name != 'nt': try: import dl use_stubs = have_rtld = hasattr(dl, 'RTLD_NOW') except ImportError: pass def if_dl(s): return s if have_rtld else '' def get_abi3_suffix(): """Return the file extension for an abi3-compliant Extension()""" for suffix in EXTENSION_SUFFIXES: if '.abi3' in suffix: # Unix return suffix elif suffix == '.pyd': # Windows return suffix class build_ext(_build_ext): editable_mode: bool = False inplace: bool = False def run(self): """Build extensions in build directory, then copy if --inplace""" old_inplace, self.inplace = self.inplace, 0 _build_ext.run(self) self.inplace = old_inplace if old_inplace: self.copy_extensions_to_source() def _get_inplace_equivalent(self, build_py, ext: Extension) -> Tuple[str, str]: fullname = self.get_ext_fullname(ext.name) filename = self.get_ext_filename(fullname) modpath = fullname.split('.') package = '.'.join(modpath[:-1]) package_dir = build_py.get_package_dir(package) inplace_file = os.path.join(package_dir, os.path.basename(filename)) regular_file = os.path.join(self.build_lib, filename) return (inplace_file, regular_file) def copy_extensions_to_source(self): build_py = self.get_finalized_command('build_py') for ext in self.extensions: inplace_file, regular_file = self._get_inplace_equivalent(build_py, ext) # Always copy, even if source is older than destination, to ensure # that the right extensions for the current Python/platform are # used. if os.path.exists(regular_file) or not ext.optional: self.copy_file(regular_file, inplace_file, level=self.verbose) if ext._needs_stub: inplace_stub = self._get_equivalent_stub(ext, inplace_file) self._write_stub_file(inplace_stub, ext, compile=True) # Always compile stub and remove the original (leave the cache behind) # (this behaviour was observed in previous iterations of the code) def _get_equivalent_stub(self, ext: Extension, output_file: str) -> str: dir_ = os.path.dirname(output_file) _, _, name = ext.name.rpartition(".") return f"{os.path.join(dir_, name)}.py" def _get_output_mapping(self) -> Iterator[Tuple[str, str]]: if not self.inplace: return build_py = self.get_finalized_command('build_py') opt = self.get_finalized_command('install_lib').optimize or "" for ext in self.extensions: inplace_file, regular_file = self._get_inplace_equivalent(build_py, ext) yield (regular_file, inplace_file) if ext._needs_stub: # This version of `build_ext` always builds artifacts in another dir, # when "inplace=True" is given it just copies them back. # This is done in the `copy_extensions_to_source` function, which # always compile stub files via `_compile_and_remove_stub`. # At the end of the process, a `.pyc` stub file is created without the # corresponding `.py`. inplace_stub = self._get_equivalent_stub(ext, inplace_file) regular_stub = self._get_equivalent_stub(ext, regular_file) inplace_cache = _compiled_file_name(inplace_stub, optimization=opt) output_cache = _compiled_file_name(regular_stub, optimization=opt) yield (output_cache, inplace_cache) def get_ext_filename(self, fullname): so_ext = os.getenv('SETUPTOOLS_EXT_SUFFIX') if so_ext: filename = os.path.join(*fullname.split('.')) + so_ext else: filename = _build_ext.get_ext_filename(self, fullname) so_ext = get_config_var('EXT_SUFFIX') if fullname in self.ext_map: ext = self.ext_map[fullname] use_abi3 = getattr(ext, 'py_limited_api') and get_abi3_suffix() if use_abi3: filename = filename[:-len(so_ext)] so_ext = get_abi3_suffix() filename = filename + so_ext if isinstance(ext, Library): fn, ext = os.path.splitext(filename) return self.shlib_compiler.library_filename(fn, libtype) elif use_stubs and ext._links_to_dynamic: d, fn = os.path.split(filename) return os.path.join(d, 'dl-' + fn) return filename def initialize_options(self): _build_ext.initialize_options(self) self.shlib_compiler = None self.shlibs = [] self.ext_map = {} self.editable_mode = False def finalize_options(self): _build_ext.finalize_options(self) self.extensions = self.extensions or [] self.check_extensions_list(self.extensions) self.shlibs = [ext for ext in self.extensions if isinstance(ext, Library)] if self.shlibs: self.setup_shlib_compiler() for ext in self.extensions: ext._full_name = self.get_ext_fullname(ext.name) for ext in self.extensions: fullname = ext._full_name self.ext_map[fullname] = ext # distutils 3.1 will also ask for module names # XXX what to do with conflicts? self.ext_map[fullname.split('.')[-1]] = ext ltd = self.shlibs and self.links_to_dynamic(ext) or False ns = ltd and use_stubs and not isinstance(ext, Library) ext._links_to_dynamic = ltd ext._needs_stub = ns filename = ext._file_name = self.get_ext_filename(fullname) libdir = os.path.dirname(os.path.join(self.build_lib, filename)) if ltd and libdir not in ext.library_dirs: ext.library_dirs.append(libdir) if ltd and use_stubs and os.curdir not in ext.runtime_library_dirs: ext.runtime_library_dirs.append(os.curdir) if self.editable_mode: self.inplace = True def setup_shlib_compiler(self): compiler = self.shlib_compiler = new_compiler( compiler=self.compiler, dry_run=self.dry_run, force=self.force ) _customize_compiler_for_shlib(compiler) if self.include_dirs is not None: compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: compiler.undefine_macro(macro) if self.libraries is not None: compiler.set_libraries(self.libraries) if self.library_dirs is not None: compiler.set_library_dirs(self.library_dirs) if self.rpath is not None: compiler.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: compiler.set_link_objects(self.link_objects) # hack so distutils' build_extension() builds a library instead compiler.link_shared_object = link_shared_object.__get__(compiler) def get_export_symbols(self, ext): if isinstance(ext, Library): return ext.export_symbols return _build_ext.get_export_symbols(self, ext) def build_extension(self, ext): ext._convert_pyx_sources_to_lang() _compiler = self.compiler try: if isinstance(ext, Library): self.compiler = self.shlib_compiler _build_ext.build_extension(self, ext) if ext._needs_stub: build_lib = self.get_finalized_command('build_py').build_lib self.write_stub(build_lib, ext) finally: self.compiler = _compiler def links_to_dynamic(self, ext): """Return true if 'ext' links to a dynamic lib in the same package""" # XXX this should check to ensure the lib is actually being built # XXX as dynamic, and not just using a locally-found version or a # XXX static-compiled version libnames = dict.fromkeys([lib._full_name for lib in self.shlibs]) pkg = '.'.join(ext._full_name.split('.')[:-1] + ['']) return any(pkg + libname in libnames for libname in ext.libraries) def get_outputs(self) -> List[str]: if self.inplace: return list(self.get_output_mapping().keys()) return sorted(_build_ext.get_outputs(self) + self.__get_stubs_outputs()) def get_output_mapping(self) -> Dict[str, str]: """See :class:`setuptools.commands.build.SubCommand`""" mapping = self._get_output_mapping() return dict(sorted(mapping, key=lambda x: x[0])) def __get_stubs_outputs(self): # assemble the base name for each extension that needs a stub ns_ext_bases = ( os.path.join(self.build_lib, *ext._full_name.split('.')) for ext in self.extensions if ext._needs_stub ) # pair each base with the extension pairs = itertools.product(ns_ext_bases, self.__get_output_extensions()) return list(base + fnext for base, fnext in pairs) def __get_output_extensions(self): yield '.py' yield '.pyc' if self.get_finalized_command('build_py').optimize: yield '.pyo' def write_stub(self, output_dir, ext, compile=False): stub_file = os.path.join(output_dir, *ext._full_name.split('.')) + '.py' self._write_stub_file(stub_file, ext, compile) def _write_stub_file(self, stub_file: str, ext: Extension, compile=False): log.info("writing stub loader for %s to %s", ext._full_name, stub_file) if compile and os.path.exists(stub_file): raise BaseError(stub_file + " already exists! Please delete.") if not self.dry_run: f = open(stub_file, 'w') f.write( '\n'.join([ "def __bootstrap__():", " global __bootstrap__, __file__, __loader__", " import sys, os, pkg_resources, importlib.util" + if_dl(", dl"), " __file__ = pkg_resources.resource_filename" "(__name__,%r)" % os.path.basename(ext._file_name), " del __bootstrap__", " if '__loader__' in globals():", " del __loader__", if_dl(" old_flags = sys.getdlopenflags()"), " old_dir = os.getcwd()", " try:", " os.chdir(os.path.dirname(__file__))", if_dl(" sys.setdlopenflags(dl.RTLD_NOW)"), " spec = importlib.util.spec_from_file_location(", " __name__, __file__)", " mod = importlib.util.module_from_spec(spec)", " spec.loader.exec_module(mod)", " finally:", if_dl(" sys.setdlopenflags(old_flags)"), " os.chdir(old_dir)", "__bootstrap__()", "" # terminal \n ]) ) f.close() if compile: self._compile_and_remove_stub(stub_file) def _compile_and_remove_stub(self, stub_file: str): from distutils.util import byte_compile byte_compile([stub_file], optimize=0, force=True, dry_run=self.dry_run) optimize = self.get_finalized_command('install_lib').optimize if optimize > 0: byte_compile([stub_file], optimize=optimize, force=True, dry_run=self.dry_run) if os.path.exists(stub_file) and not self.dry_run: os.unlink(stub_file) if use_stubs or os.name == 'nt': # Build shared libraries # def link_shared_object( self, objects, output_libname, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None): self.link( self.SHARED_LIBRARY, objects, output_libname, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, build_temp, target_lang ) else: # Build static libraries everywhere else libtype = 'static' def link_shared_object( self, objects, output_libname, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None): # XXX we need to either disallow these attrs on Library instances, # or warn/abort here if set, or something... # libraries=None, library_dirs=None, runtime_library_dirs=None, # export_symbols=None, extra_preargs=None, extra_postargs=None, # build_temp=None assert output_dir is None # distutils build_ext doesn't pass this output_dir, filename = os.path.split(output_libname) basename, ext = os.path.splitext(filename) if self.library_filename("x").startswith('lib'): # strip 'lib' prefix; this is kludgy if some platform uses # a different prefix basename = basename[3:] self.create_static_lib( objects, basename, output_dir, debug, target_lang ) PK{5Z%Dll$Lib/site-packages/setuptools/msvc.pynuW+A""" Improved support for Microsoft Visual C++ compilers. Known supported compilers: -------------------------- Microsoft Visual C++ 14.X: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) Microsoft Visual Studio Build Tools 2019 (x86, x64, arm, arm64) This may also support compilers shipped with compatible Visual Studio versions. """ import json from io import open from os import listdir, pathsep from os.path import join, isfile, isdir, dirname import sys import contextlib import platform import itertools import subprocess import distutils.errors from setuptools.extern.packaging.version import LegacyVersion from setuptools.extern.more_itertools import unique_everseen from .monkey import get_unpatched if platform.system() == 'Windows': import winreg from os import environ else: # Mock winreg and environ so the module can be imported on this platform. class winreg: HKEY_USERS = None HKEY_CURRENT_USER = None HKEY_LOCAL_MACHINE = None HKEY_CLASSES_ROOT = None environ = dict() def _msvc14_find_vc2015(): """Python 3.8 "distutils/_msvccompiler.py" backport""" try: key = winreg.OpenKey( winreg.HKEY_LOCAL_MACHINE, r"Software\Microsoft\VisualStudio\SxS\VC7", 0, winreg.KEY_READ | winreg.KEY_WOW64_32KEY ) except OSError: return None, None best_version = 0 best_dir = None with key: for i in itertools.count(): try: v, vc_dir, vt = winreg.EnumValue(key, i) except OSError: break if v and vt == winreg.REG_SZ and isdir(vc_dir): try: version = int(float(v)) except (ValueError, TypeError): continue if version >= 14 and version > best_version: best_version, best_dir = version, vc_dir return best_version, best_dir def _msvc14_find_vc2017(): """Python 3.8 "distutils/_msvccompiler.py" backport Returns "15, path" based on the result of invoking vswhere.exe If no install is found, returns "None, None" The version is returned to avoid unnecessarily changing the function result. It may be ignored when the path is not None. If vswhere.exe is not available, by definition, VS 2017 is not installed. """ root = environ.get("ProgramFiles(x86)") or environ.get("ProgramFiles") if not root: return None, None try: path = subprocess.check_output([ join(root, "Microsoft Visual Studio", "Installer", "vswhere.exe"), "-latest", "-prerelease", "-requiresAny", "-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", "-requires", "Microsoft.VisualStudio.Workload.WDExpress", "-property", "installationPath", "-products", "*", ]).decode(encoding="mbcs", errors="strict").strip() except (subprocess.CalledProcessError, OSError, UnicodeDecodeError): return None, None path = join(path, "VC", "Auxiliary", "Build") if isdir(path): return 15, path return None, None PLAT_SPEC_TO_RUNTIME = { 'x86': 'x86', 'x86_amd64': 'x64', 'x86_arm': 'arm', 'x86_arm64': 'arm64' } def _msvc14_find_vcvarsall(plat_spec): """Python 3.8 "distutils/_msvccompiler.py" backport""" _, best_dir = _msvc14_find_vc2017() vcruntime = None if plat_spec in PLAT_SPEC_TO_RUNTIME: vcruntime_plat = PLAT_SPEC_TO_RUNTIME[plat_spec] else: vcruntime_plat = 'x64' if 'amd64' in plat_spec else 'x86' if best_dir: vcredist = join(best_dir, "..", "..", "redist", "MSVC", "**", vcruntime_plat, "Microsoft.VC14*.CRT", "vcruntime140.dll") try: import glob vcruntime = glob.glob(vcredist, recursive=True)[-1] except (ImportError, OSError, LookupError): vcruntime = None if not best_dir: best_version, best_dir = _msvc14_find_vc2015() if best_version: vcruntime = join(best_dir, 'redist', vcruntime_plat, "Microsoft.VC140.CRT", "vcruntime140.dll") if not best_dir: return None, None vcvarsall = join(best_dir, "vcvarsall.bat") if not isfile(vcvarsall): return None, None if not vcruntime or not isfile(vcruntime): vcruntime = None return vcvarsall, vcruntime def _msvc14_get_vc_env(plat_spec): """Python 3.8 "distutils/_msvccompiler.py" backport""" if "DISTUTILS_USE_SDK" in environ: return { key.lower(): value for key, value in environ.items() } vcvarsall, vcruntime = _msvc14_find_vcvarsall(plat_spec) if not vcvarsall: raise distutils.errors.DistutilsPlatformError( "Unable to find vcvarsall.bat" ) try: out = subprocess.check_output( 'cmd /u /c "{}" {} && set'.format(vcvarsall, plat_spec), stderr=subprocess.STDOUT, ).decode('utf-16le', errors='replace') except subprocess.CalledProcessError as exc: raise distutils.errors.DistutilsPlatformError( "Error executing {}".format(exc.cmd) ) from exc env = { key.lower(): value for key, _, value in (line.partition('=') for line in out.splitlines()) if key and value } if vcruntime: env['py_vcruntime_redist'] = vcruntime return env def msvc14_get_vc_env(plat_spec): """ Patched "distutils._msvccompiler._get_vc_env" for support extra Microsoft Visual C++ 14.X compilers. Set environment without use of "vcvarsall.bat". Parameters ---------- plat_spec: str Target architecture. Return ------ dict environment """ # Always use backport from CPython 3.8 try: return _msvc14_get_vc_env(plat_spec) except distutils.errors.DistutilsPlatformError as exc: _augment_exception(exc, 14.0) raise def msvc14_gen_lib_options(*args, **kwargs): """ Patched "distutils._msvccompiler.gen_lib_options" for fix compatibility between "numpy.distutils" and "distutils._msvccompiler" (for Numpy < 1.11.2) """ if "numpy.distutils" in sys.modules: import numpy as np if LegacyVersion(np.__version__) < LegacyVersion('1.11.2'): return np.distutils.ccompiler.gen_lib_options(*args, **kwargs) return get_unpatched(msvc14_gen_lib_options)(*args, **kwargs) def _augment_exception(exc, version, arch=''): """ Add details to the exception message to help guide the user as to what action will resolve it. """ # Error if MSVC++ directory not found or environment not set message = exc.args[0] if "vcvarsall" in message.lower() or "visual c" in message.lower(): # Special error message if MSVC++ not installed tmpl = 'Microsoft Visual C++ {version:0.1f} or greater is required.' message = tmpl.format(**locals()) msdownload = 'www.microsoft.com/download/details.aspx?id=%d' if version == 9.0: if arch.lower().find('ia64') > -1: # For VC++ 9.0, if IA64 support is needed, redirect user # to Windows SDK 7.0. # Note: No download link available from Microsoft. message += ' Get it with "Microsoft Windows SDK 7.0"' else: # For VC++ 9.0 redirect user to Vc++ for Python 2.7 : # This redirection link is maintained by Microsoft. # Contact vspython@microsoft.com if it needs updating. message += ' Get it from http://aka.ms/vcpython27' elif version == 10.0: # For VC++ 10.0 Redirect user to Windows SDK 7.1 message += ' Get it with "Microsoft Windows SDK 7.1": ' message += msdownload % 8279 elif version >= 14.0: # For VC++ 14.X Redirect user to latest Visual C++ Build Tools message += (' Get it with "Microsoft C++ Build Tools": ' r'https://visualstudio.microsoft.com' r'/visual-cpp-build-tools/') exc.args = (message, ) class PlatformInfo: """ Current and Target Architectures information. Parameters ---------- arch: str Target architecture. """ current_cpu = environ.get('processor_architecture', '').lower() def __init__(self, arch): self.arch = arch.lower().replace('x64', 'amd64') @property def target_cpu(self): """ Return Target CPU architecture. Return ------ str Target CPU """ return self.arch[self.arch.find('_') + 1:] def target_is_x86(self): """ Return True if target CPU is x86 32 bits.. Return ------ bool CPU is x86 32 bits """ return self.target_cpu == 'x86' def current_is_x86(self): """ Return True if current CPU is x86 32 bits.. Return ------ bool CPU is x86 32 bits """ return self.current_cpu == 'x86' def current_dir(self, hidex86=False, x64=False): """ Current platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. Return ------ str subfolder: '\target', or '' (see hidex86 parameter) """ return ( '' if (self.current_cpu == 'x86' and hidex86) else r'\x64' if (self.current_cpu == 'amd64' and x64) else r'\%s' % self.current_cpu ) def target_dir(self, hidex86=False, x64=False): r""" Target platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. Return ------ str subfolder: '\current', or '' (see hidex86 parameter) """ return ( '' if (self.target_cpu == 'x86' and hidex86) else r'\x64' if (self.target_cpu == 'amd64' and x64) else r'\%s' % self.target_cpu ) def cross_dir(self, forcex86=False): r""" Cross platform specific subfolder. Parameters ---------- forcex86: bool Use 'x86' as current architecture even if current architecture is not x86. Return ------ str subfolder: '' if target architecture is current architecture, '\current_target' if not. """ current = 'x86' if forcex86 else self.current_cpu return ( '' if self.target_cpu == current else self.target_dir().replace('\\', '\\%s_' % current) ) class RegistryInfo: """ Microsoft Visual Studio related registry information. Parameters ---------- platform_info: PlatformInfo "PlatformInfo" instance. """ HKEYS = (winreg.HKEY_USERS, winreg.HKEY_CURRENT_USER, winreg.HKEY_LOCAL_MACHINE, winreg.HKEY_CLASSES_ROOT) def __init__(self, platform_info): self.pi = platform_info @property def visualstudio(self): """ Microsoft Visual Studio root registry key. Return ------ str Registry key """ return 'VisualStudio' @property def sxs(self): """ Microsoft Visual Studio SxS registry key. Return ------ str Registry key """ return join(self.visualstudio, 'SxS') @property def vc(self): """ Microsoft Visual C++ VC7 registry key. Return ------ str Registry key """ return join(self.sxs, 'VC7') @property def vs(self): """ Microsoft Visual Studio VS7 registry key. Return ------ str Registry key """ return join(self.sxs, 'VS7') @property def vc_for_python(self): """ Microsoft Visual C++ for Python registry key. Return ------ str Registry key """ return r'DevDiv\VCForPython' @property def microsoft_sdk(self): """ Microsoft SDK registry key. Return ------ str Registry key """ return 'Microsoft SDKs' @property def windows_sdk(self): """ Microsoft Windows/Platform SDK registry key. Return ------ str Registry key """ return join(self.microsoft_sdk, 'Windows') @property def netfx_sdk(self): """ Microsoft .NET Framework SDK registry key. Return ------ str Registry key """ return join(self.microsoft_sdk, 'NETFXSDK') @property def windows_kits_roots(self): """ Microsoft Windows Kits Roots registry key. Return ------ str Registry key """ return r'Windows Kits\Installed Roots' def microsoft(self, key, x86=False): """ Return key in Microsoft software registry. Parameters ---------- key: str Registry key path where look. x86: str Force x86 software registry. Return ------ str Registry key """ node64 = '' if self.pi.current_is_x86() or x86 else 'Wow6432Node' return join('Software', node64, 'Microsoft', key) def lookup(self, key, name): """ Look for values in registry in Microsoft software registry. Parameters ---------- key: str Registry key path where look. name: str Value name to find. Return ------ str value """ key_read = winreg.KEY_READ openkey = winreg.OpenKey closekey = winreg.CloseKey ms = self.microsoft for hkey in self.HKEYS: bkey = None try: bkey = openkey(hkey, ms(key), 0, key_read) except (OSError, IOError): if not self.pi.current_is_x86(): try: bkey = openkey(hkey, ms(key, True), 0, key_read) except (OSError, IOError): continue else: continue try: return winreg.QueryValueEx(bkey, name)[0] except (OSError, IOError): pass finally: if bkey: closekey(bkey) class SystemInfo: """ Microsoft Windows and Visual Studio related system information. Parameters ---------- registry_info: RegistryInfo "RegistryInfo" instance. vc_ver: float Required Microsoft Visual C++ version. """ # Variables and properties in this class use originals CamelCase variables # names from Microsoft source files for more easy comparison. WinDir = environ.get('WinDir', '') ProgramFiles = environ.get('ProgramFiles', '') ProgramFilesx86 = environ.get('ProgramFiles(x86)', ProgramFiles) def __init__(self, registry_info, vc_ver=None): self.ri = registry_info self.pi = self.ri.pi self.known_vs_paths = self.find_programdata_vs_vers() # Except for VS15+, VC version is aligned with VS version self.vs_ver = self.vc_ver = ( vc_ver or self._find_latest_available_vs_ver()) def _find_latest_available_vs_ver(self): """ Find the latest VC version Return ------ float version """ reg_vc_vers = self.find_reg_vs_vers() if not (reg_vc_vers or self.known_vs_paths): raise distutils.errors.DistutilsPlatformError( 'No Microsoft Visual C++ version found') vc_vers = set(reg_vc_vers) vc_vers.update(self.known_vs_paths) return sorted(vc_vers)[-1] def find_reg_vs_vers(self): """ Find Microsoft Visual Studio versions available in registry. Return ------ list of float Versions """ ms = self.ri.microsoft vckeys = (self.ri.vc, self.ri.vc_for_python, self.ri.vs) vs_vers = [] for hkey, key in itertools.product(self.ri.HKEYS, vckeys): try: bkey = winreg.OpenKey(hkey, ms(key), 0, winreg.KEY_READ) except (OSError, IOError): continue with bkey: subkeys, values, _ = winreg.QueryInfoKey(bkey) for i in range(values): with contextlib.suppress(ValueError): ver = float(winreg.EnumValue(bkey, i)[0]) if ver not in vs_vers: vs_vers.append(ver) for i in range(subkeys): with contextlib.suppress(ValueError): ver = float(winreg.EnumKey(bkey, i)) if ver not in vs_vers: vs_vers.append(ver) return sorted(vs_vers) def find_programdata_vs_vers(self): r""" Find Visual studio 2017+ versions from information in "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances". Return ------ dict float version as key, path as value. """ vs_versions = {} instances_dir = \ r'C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances' try: hashed_names = listdir(instances_dir) except (OSError, IOError): # Directory not exists with all Visual Studio versions return vs_versions for name in hashed_names: try: # Get VS installation path from "state.json" file state_path = join(instances_dir, name, 'state.json') with open(state_path, 'rt', encoding='utf-8') as state_file: state = json.load(state_file) vs_path = state['installationPath'] # Raises OSError if this VS installation does not contain VC listdir(join(vs_path, r'VC\Tools\MSVC')) # Store version and path vs_versions[self._as_float_version( state['installationVersion'])] = vs_path except (OSError, IOError, KeyError): # Skip if "state.json" file is missing or bad format continue return vs_versions @staticmethod def _as_float_version(version): """ Return a string version as a simplified float version (major.minor) Parameters ---------- version: str Version. Return ------ float version """ return float('.'.join(version.split('.')[:2])) @property def VSInstallDir(self): """ Microsoft Visual Studio directory. Return ------ str path """ # Default path default = join(self.ProgramFilesx86, 'Microsoft Visual Studio %0.1f' % self.vs_ver) # Try to get path from registry, if fail use default path return self.ri.lookup(self.ri.vs, '%0.1f' % self.vs_ver) or default @property def VCInstallDir(self): """ Microsoft Visual C++ directory. Return ------ str path """ path = self._guess_vc() or self._guess_vc_legacy() if not isdir(path): msg = 'Microsoft Visual C++ directory not found' raise distutils.errors.DistutilsPlatformError(msg) return path def _guess_vc(self): """ Locate Visual C++ for VS2017+. Return ------ str path """ if self.vs_ver <= 14.0: return '' try: # First search in known VS paths vs_dir = self.known_vs_paths[self.vs_ver] except KeyError: # Else, search with path from registry vs_dir = self.VSInstallDir guess_vc = join(vs_dir, r'VC\Tools\MSVC') # Subdir with VC exact version as name try: # Update the VC version with real one instead of VS version vc_ver = listdir(guess_vc)[-1] self.vc_ver = self._as_float_version(vc_ver) return join(guess_vc, vc_ver) except (OSError, IOError, IndexError): return '' def _guess_vc_legacy(self): """ Locate Visual C++ for versions prior to 2017. Return ------ str path """ default = join(self.ProgramFilesx86, r'Microsoft Visual Studio %0.1f\VC' % self.vs_ver) # Try to get "VC++ for Python" path from registry as default path reg_path = join(self.ri.vc_for_python, '%0.1f' % self.vs_ver) python_vc = self.ri.lookup(reg_path, 'installdir') default_vc = join(python_vc, 'VC') if python_vc else default # Try to get path from registry, if fail use default path return self.ri.lookup(self.ri.vc, '%0.1f' % self.vs_ver) or default_vc @property def WindowsSdkVersion(self): """ Microsoft Windows SDK versions for specified MSVC++ version. Return ------ tuple of str versions """ if self.vs_ver <= 9.0: return '7.0', '6.1', '6.0a' elif self.vs_ver == 10.0: return '7.1', '7.0a' elif self.vs_ver == 11.0: return '8.0', '8.0a' elif self.vs_ver == 12.0: return '8.1', '8.1a' elif self.vs_ver >= 14.0: return '10.0', '8.1' @property def WindowsSdkLastVersion(self): """ Microsoft Windows SDK last version. Return ------ str version """ return self._use_last_dir_name(join(self.WindowsSdkDir, 'lib')) @property # noqa: C901 def WindowsSdkDir(self): # noqa: C901 # is too complex (12) # FIXME """ Microsoft Windows SDK directory. Return ------ str path """ sdkdir = '' for ver in self.WindowsSdkVersion: # Try to get it from registry loc = join(self.ri.windows_sdk, 'v%s' % ver) sdkdir = self.ri.lookup(loc, 'installationfolder') if sdkdir: break if not sdkdir or not isdir(sdkdir): # Try to get "VC++ for Python" version from registry path = join(self.ri.vc_for_python, '%0.1f' % self.vc_ver) install_base = self.ri.lookup(path, 'installdir') if install_base: sdkdir = join(install_base, 'WinSDK') if not sdkdir or not isdir(sdkdir): # If fail, use default new path for ver in self.WindowsSdkVersion: intver = ver[:ver.rfind('.')] path = r'Microsoft SDKs\Windows Kits\%s' % intver d = join(self.ProgramFiles, path) if isdir(d): sdkdir = d if not sdkdir or not isdir(sdkdir): # If fail, use default old path for ver in self.WindowsSdkVersion: path = r'Microsoft SDKs\Windows\v%s' % ver d = join(self.ProgramFiles, path) if isdir(d): sdkdir = d if not sdkdir: # If fail, use Platform SDK sdkdir = join(self.VCInstallDir, 'PlatformSDK') return sdkdir @property def WindowsSDKExecutablePath(self): """ Microsoft Windows SDK executable directory. Return ------ str path """ # Find WinSDK NetFx Tools registry dir name if self.vs_ver <= 11.0: netfxver = 35 arch = '' else: netfxver = 40 hidex86 = True if self.vs_ver <= 12.0 else False arch = self.pi.current_dir(x64=True, hidex86=hidex86) fx = 'WinSDK-NetFx%dTools%s' % (netfxver, arch.replace('\\', '-')) # list all possibles registry paths regpaths = [] if self.vs_ver >= 14.0: for ver in self.NetFxSdkVersion: regpaths += [join(self.ri.netfx_sdk, ver, fx)] for ver in self.WindowsSdkVersion: regpaths += [join(self.ri.windows_sdk, 'v%sA' % ver, fx)] # Return installation folder from the more recent path for path in regpaths: execpath = self.ri.lookup(path, 'installationfolder') if execpath: return execpath @property def FSharpInstallDir(self): """ Microsoft Visual F# directory. Return ------ str path """ path = join(self.ri.visualstudio, r'%0.1f\Setup\F#' % self.vs_ver) return self.ri.lookup(path, 'productdir') or '' @property def UniversalCRTSdkDir(self): """ Microsoft Universal CRT SDK directory. Return ------ str path """ # Set Kit Roots versions for specified MSVC++ version vers = ('10', '81') if self.vs_ver >= 14.0 else () # Find path of the more recent Kit for ver in vers: sdkdir = self.ri.lookup(self.ri.windows_kits_roots, 'kitsroot%s' % ver) if sdkdir: return sdkdir or '' @property def UniversalCRTSdkLastVersion(self): """ Microsoft Universal C Runtime SDK last version. Return ------ str version """ return self._use_last_dir_name(join(self.UniversalCRTSdkDir, 'lib')) @property def NetFxSdkVersion(self): """ Microsoft .NET Framework SDK versions. Return ------ tuple of str versions """ # Set FxSdk versions for specified VS version return (('4.7.2', '4.7.1', '4.7', '4.6.2', '4.6.1', '4.6', '4.5.2', '4.5.1', '4.5') if self.vs_ver >= 14.0 else ()) @property def NetFxSdkDir(self): """ Microsoft .NET Framework SDK directory. Return ------ str path """ sdkdir = '' for ver in self.NetFxSdkVersion: loc = join(self.ri.netfx_sdk, ver) sdkdir = self.ri.lookup(loc, 'kitsinstallationfolder') if sdkdir: break return sdkdir @property def FrameworkDir32(self): """ Microsoft .NET Framework 32bit directory. Return ------ str path """ # Default path guess_fw = join(self.WinDir, r'Microsoft.NET\Framework') # Try to get path from registry, if fail use default path return self.ri.lookup(self.ri.vc, 'frameworkdir32') or guess_fw @property def FrameworkDir64(self): """ Microsoft .NET Framework 64bit directory. Return ------ str path """ # Default path guess_fw = join(self.WinDir, r'Microsoft.NET\Framework64') # Try to get path from registry, if fail use default path return self.ri.lookup(self.ri.vc, 'frameworkdir64') or guess_fw @property def FrameworkVersion32(self): """ Microsoft .NET Framework 32bit versions. Return ------ tuple of str versions """ return self._find_dot_net_versions(32) @property def FrameworkVersion64(self): """ Microsoft .NET Framework 64bit versions. Return ------ tuple of str versions """ return self._find_dot_net_versions(64) def _find_dot_net_versions(self, bits): """ Find Microsoft .NET Framework versions. Parameters ---------- bits: int Platform number of bits: 32 or 64. Return ------ tuple of str versions """ # Find actual .NET version in registry reg_ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits) dot_net_dir = getattr(self, 'FrameworkDir%d' % bits) ver = reg_ver or self._use_last_dir_name(dot_net_dir, 'v') or '' # Set .NET versions for specified MSVC++ version if self.vs_ver >= 12.0: return ver, 'v4.0' elif self.vs_ver >= 10.0: return 'v4.0.30319' if ver.lower()[:2] != 'v4' else ver, 'v3.5' elif self.vs_ver == 9.0: return 'v3.5', 'v2.0.50727' elif self.vs_ver == 8.0: return 'v3.0', 'v2.0.50727' @staticmethod def _use_last_dir_name(path, prefix=''): """ Return name of the last dir in path or '' if no dir found. Parameters ---------- path: str Use dirs in this path prefix: str Use only dirs starting by this prefix Return ------ str name """ matching_dirs = ( dir_name for dir_name in reversed(listdir(path)) if isdir(join(path, dir_name)) and dir_name.startswith(prefix) ) return next(matching_dirs, None) or '' class EnvironmentInfo: """ Return environment variables for specified Microsoft Visual C++ version and platform : Lib, Include, Path and libpath. This function is compatible with Microsoft Visual C++ 9.0 to 14.X. Script created by analysing Microsoft environment configuration files like "vcvars[...].bat", "SetEnv.Cmd", "vcbuildtools.bat", ... Parameters ---------- arch: str Target architecture. vc_ver: float Required Microsoft Visual C++ version. If not set, autodetect the last version. vc_min_ver: float Minimum Microsoft Visual C++ version. """ # Variables and properties in this class use originals CamelCase variables # names from Microsoft source files for more easy comparison. def __init__(self, arch, vc_ver=None, vc_min_ver=0): self.pi = PlatformInfo(arch) self.ri = RegistryInfo(self.pi) self.si = SystemInfo(self.ri, vc_ver) if self.vc_ver < vc_min_ver: err = 'No suitable Microsoft Visual C++ version found' raise distutils.errors.DistutilsPlatformError(err) @property def vs_ver(self): """ Microsoft Visual Studio. Return ------ float version """ return self.si.vs_ver @property def vc_ver(self): """ Microsoft Visual C++ version. Return ------ float version """ return self.si.vc_ver @property def VSTools(self): """ Microsoft Visual Studio Tools. Return ------ list of str paths """ paths = [r'Common7\IDE', r'Common7\Tools'] if self.vs_ver >= 14.0: arch_subdir = self.pi.current_dir(hidex86=True, x64=True) paths += [r'Common7\IDE\CommonExtensions\Microsoft\TestWindow'] paths += [r'Team Tools\Performance Tools'] paths += [r'Team Tools\Performance Tools%s' % arch_subdir] return [join(self.si.VSInstallDir, path) for path in paths] @property def VCIncludes(self): """ Microsoft Visual C++ & Microsoft Foundation Class Includes. Return ------ list of str paths """ return [join(self.si.VCInstallDir, 'Include'), join(self.si.VCInstallDir, r'ATLMFC\Include')] @property def VCLibraries(self): """ Microsoft Visual C++ & Microsoft Foundation Class Libraries. Return ------ list of str paths """ if self.vs_ver >= 15.0: arch_subdir = self.pi.target_dir(x64=True) else: arch_subdir = self.pi.target_dir(hidex86=True) paths = ['Lib%s' % arch_subdir, r'ATLMFC\Lib%s' % arch_subdir] if self.vs_ver >= 14.0: paths += [r'Lib\store%s' % arch_subdir] return [join(self.si.VCInstallDir, path) for path in paths] @property def VCStoreRefs(self): """ Microsoft Visual C++ store references Libraries. Return ------ list of str paths """ if self.vs_ver < 14.0: return [] return [join(self.si.VCInstallDir, r'Lib\store\references')] @property def VCTools(self): """ Microsoft Visual C++ Tools. Return ------ list of str paths """ si = self.si tools = [join(si.VCInstallDir, 'VCPackages')] forcex86 = True if self.vs_ver <= 10.0 else False arch_subdir = self.pi.cross_dir(forcex86) if arch_subdir: tools += [join(si.VCInstallDir, 'Bin%s' % arch_subdir)] if self.vs_ver == 14.0: path = 'Bin%s' % self.pi.current_dir(hidex86=True) tools += [join(si.VCInstallDir, path)] elif self.vs_ver >= 15.0: host_dir = (r'bin\HostX86%s' if self.pi.current_is_x86() else r'bin\HostX64%s') tools += [join( si.VCInstallDir, host_dir % self.pi.target_dir(x64=True))] if self.pi.current_cpu != self.pi.target_cpu: tools += [join( si.VCInstallDir, host_dir % self.pi.current_dir(x64=True))] else: tools += [join(si.VCInstallDir, 'Bin')] return tools @property def OSLibraries(self): """ Microsoft Windows SDK Libraries. Return ------ list of str paths """ if self.vs_ver <= 10.0: arch_subdir = self.pi.target_dir(hidex86=True, x64=True) return [join(self.si.WindowsSdkDir, 'Lib%s' % arch_subdir)] else: arch_subdir = self.pi.target_dir(x64=True) lib = join(self.si.WindowsSdkDir, 'lib') libver = self._sdk_subdir return [join(lib, '%sum%s' % (libver, arch_subdir))] @property def OSIncludes(self): """ Microsoft Windows SDK Include. Return ------ list of str paths """ include = join(self.si.WindowsSdkDir, 'include') if self.vs_ver <= 10.0: return [include, join(include, 'gl')] else: if self.vs_ver >= 14.0: sdkver = self._sdk_subdir else: sdkver = '' return [join(include, '%sshared' % sdkver), join(include, '%sum' % sdkver), join(include, '%swinrt' % sdkver)] @property def OSLibpath(self): """ Microsoft Windows SDK Libraries Paths. Return ------ list of str paths """ ref = join(self.si.WindowsSdkDir, 'References') libpath = [] if self.vs_ver <= 9.0: libpath += self.OSLibraries if self.vs_ver >= 11.0: libpath += [join(ref, r'CommonConfiguration\Neutral')] if self.vs_ver >= 14.0: libpath += [ ref, join(self.si.WindowsSdkDir, 'UnionMetadata'), join( ref, 'Windows.Foundation.UniversalApiContract', '1.0.0.0'), join(ref, 'Windows.Foundation.FoundationContract', '1.0.0.0'), join( ref, 'Windows.Networking.Connectivity.WwanContract', '1.0.0.0'), join( self.si.WindowsSdkDir, 'ExtensionSDKs', 'Microsoft.VCLibs', '%0.1f' % self.vs_ver, 'References', 'CommonConfiguration', 'neutral'), ] return libpath @property def SdkTools(self): """ Microsoft Windows SDK Tools. Return ------ list of str paths """ return list(self._sdk_tools()) def _sdk_tools(self): """ Microsoft Windows SDK Tools paths generator. Return ------ generator of str paths """ if self.vs_ver < 15.0: bin_dir = 'Bin' if self.vs_ver <= 11.0 else r'Bin\x86' yield join(self.si.WindowsSdkDir, bin_dir) if not self.pi.current_is_x86(): arch_subdir = self.pi.current_dir(x64=True) path = 'Bin%s' % arch_subdir yield join(self.si.WindowsSdkDir, path) if self.vs_ver in (10.0, 11.0): if self.pi.target_is_x86(): arch_subdir = '' else: arch_subdir = self.pi.current_dir(hidex86=True, x64=True) path = r'Bin\NETFX 4.0 Tools%s' % arch_subdir yield join(self.si.WindowsSdkDir, path) elif self.vs_ver >= 15.0: path = join(self.si.WindowsSdkDir, 'Bin') arch_subdir = self.pi.current_dir(x64=True) sdkver = self.si.WindowsSdkLastVersion yield join(path, '%s%s' % (sdkver, arch_subdir)) if self.si.WindowsSDKExecutablePath: yield self.si.WindowsSDKExecutablePath @property def _sdk_subdir(self): """ Microsoft Windows SDK version subdir. Return ------ str subdir """ ucrtver = self.si.WindowsSdkLastVersion return ('%s\\' % ucrtver) if ucrtver else '' @property def SdkSetup(self): """ Microsoft Windows SDK Setup. Return ------ list of str paths """ if self.vs_ver > 9.0: return [] return [join(self.si.WindowsSdkDir, 'Setup')] @property def FxTools(self): """ Microsoft .NET Framework Tools. Return ------ list of str paths """ pi = self.pi si = self.si if self.vs_ver <= 10.0: include32 = True include64 = not pi.target_is_x86() and not pi.current_is_x86() else: include32 = pi.target_is_x86() or pi.current_is_x86() include64 = pi.current_cpu == 'amd64' or pi.target_cpu == 'amd64' tools = [] if include32: tools += [join(si.FrameworkDir32, ver) for ver in si.FrameworkVersion32] if include64: tools += [join(si.FrameworkDir64, ver) for ver in si.FrameworkVersion64] return tools @property def NetFxSDKLibraries(self): """ Microsoft .Net Framework SDK Libraries. Return ------ list of str paths """ if self.vs_ver < 14.0 or not self.si.NetFxSdkDir: return [] arch_subdir = self.pi.target_dir(x64=True) return [join(self.si.NetFxSdkDir, r'lib\um%s' % arch_subdir)] @property def NetFxSDKIncludes(self): """ Microsoft .Net Framework SDK Includes. Return ------ list of str paths """ if self.vs_ver < 14.0 or not self.si.NetFxSdkDir: return [] return [join(self.si.NetFxSdkDir, r'include\um')] @property def VsTDb(self): """ Microsoft Visual Studio Team System Database. Return ------ list of str paths """ return [join(self.si.VSInstallDir, r'VSTSDB\Deploy')] @property def MSBuild(self): """ Microsoft Build Engine. Return ------ list of str paths """ if self.vs_ver < 12.0: return [] elif self.vs_ver < 15.0: base_path = self.si.ProgramFilesx86 arch_subdir = self.pi.current_dir(hidex86=True) else: base_path = self.si.VSInstallDir arch_subdir = '' path = r'MSBuild\%0.1f\bin%s' % (self.vs_ver, arch_subdir) build = [join(base_path, path)] if self.vs_ver >= 15.0: # Add Roslyn C# & Visual Basic Compiler build += [join(base_path, path, 'Roslyn')] return build @property def HTMLHelpWorkshop(self): """ Microsoft HTML Help Workshop. Return ------ list of str paths """ if self.vs_ver < 11.0: return [] return [join(self.si.ProgramFilesx86, 'HTML Help Workshop')] @property def UCRTLibraries(self): """ Microsoft Universal C Runtime SDK Libraries. Return ------ list of str paths """ if self.vs_ver < 14.0: return [] arch_subdir = self.pi.target_dir(x64=True) lib = join(self.si.UniversalCRTSdkDir, 'lib') ucrtver = self._ucrt_subdir return [join(lib, '%sucrt%s' % (ucrtver, arch_subdir))] @property def UCRTIncludes(self): """ Microsoft Universal C Runtime SDK Include. Return ------ list of str paths """ if self.vs_ver < 14.0: return [] include = join(self.si.UniversalCRTSdkDir, 'include') return [join(include, '%sucrt' % self._ucrt_subdir)] @property def _ucrt_subdir(self): """ Microsoft Universal C Runtime SDK version subdir. Return ------ str subdir """ ucrtver = self.si.UniversalCRTSdkLastVersion return ('%s\\' % ucrtver) if ucrtver else '' @property def FSharp(self): """ Microsoft Visual F#. Return ------ list of str paths """ if 11.0 > self.vs_ver > 12.0: return [] return [self.si.FSharpInstallDir] @property def VCRuntimeRedist(self): """ Microsoft Visual C++ runtime redistributable dll. Return ------ str path """ vcruntime = 'vcruntime%d0.dll' % self.vc_ver arch_subdir = self.pi.target_dir(x64=True).strip('\\') # Installation prefixes candidates prefixes = [] tools_path = self.si.VCInstallDir redist_path = dirname(tools_path.replace(r'\Tools', r'\Redist')) if isdir(redist_path): # Redist version may not be exactly the same as tools redist_path = join(redist_path, listdir(redist_path)[-1]) prefixes += [redist_path, join(redist_path, 'onecore')] prefixes += [join(tools_path, 'redist')] # VS14 legacy path # CRT directory crt_dirs = ('Microsoft.VC%d.CRT' % (self.vc_ver * 10), # Sometime store in directory with VS version instead of VC 'Microsoft.VC%d.CRT' % (int(self.vs_ver) * 10)) # vcruntime path for prefix, crt_dir in itertools.product(prefixes, crt_dirs): path = join(prefix, arch_subdir, crt_dir, vcruntime) if isfile(path): return path def return_env(self, exists=True): """ Return environment dict. Parameters ---------- exists: bool It True, only return existing paths. Return ------ dict environment """ env = dict( include=self._build_paths('include', [self.VCIncludes, self.OSIncludes, self.UCRTIncludes, self.NetFxSDKIncludes], exists), lib=self._build_paths('lib', [self.VCLibraries, self.OSLibraries, self.FxTools, self.UCRTLibraries, self.NetFxSDKLibraries], exists), libpath=self._build_paths('libpath', [self.VCLibraries, self.FxTools, self.VCStoreRefs, self.OSLibpath], exists), path=self._build_paths('path', [self.VCTools, self.VSTools, self.VsTDb, self.SdkTools, self.SdkSetup, self.FxTools, self.MSBuild, self.HTMLHelpWorkshop, self.FSharp], exists), ) if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist): env['py_vcruntime_redist'] = self.VCRuntimeRedist return env def _build_paths(self, name, spec_path_lists, exists): """ Given an environment variable name and specified paths, return a pathsep-separated string of paths containing unique, extant, directories from those paths and from the environment variable. Raise an error if no paths are resolved. Parameters ---------- name: str Environment variable name spec_path_lists: list of str Paths exists: bool It True, only return existing paths. Return ------ str Pathsep-separated paths """ # flatten spec_path_lists spec_paths = itertools.chain.from_iterable(spec_path_lists) env_paths = environ.get(name, '').split(pathsep) paths = itertools.chain(spec_paths, env_paths) extant_paths = list(filter(isdir, paths)) if exists else paths if not extant_paths: msg = "%s environment variable is empty" % name.upper() raise distutils.errors.DistutilsPlatformError(msg) unique_paths = unique_everseen(extant_paths) return pathsep.join(unique_paths) PK{5Zğ2-Lib/site-packages/setuptools/_entry_points.pynuW+Aimport functools import operator import itertools from .extern.jaraco.text import yield_lines from .extern.jaraco.functools import pass_none from ._importlib import metadata from ._itertools import ensure_unique from .extern.more_itertools import consume def ensure_valid(ep): """ Exercise one of the dynamic properties to trigger the pattern match. """ ep.extras def load_group(value, group): """ Given a value of an entry point or series of entry points, return each as an EntryPoint. """ # normalize to a single sequence of lines lines = yield_lines(value) text = f'[{group}]\n' + '\n'.join(lines) return metadata.EntryPoints._from_text(text) def by_group_and_name(ep): return ep.group, ep.name def validate(eps: metadata.EntryPoints): """ Ensure entry points are unique by group and name and validate each. """ consume(map(ensure_valid, ensure_unique(eps, key=by_group_and_name))) return eps @functools.singledispatch def load(eps): """ Given a Distribution.entry_points, produce EntryPoints. """ groups = itertools.chain.from_iterable( load_group(value, group) for group, value in eps.items()) return validate(metadata.EntryPoints(groups)) @load.register(str) def _(eps): r""" >>> ep, = load('[console_scripts]\nfoo=bar') >>> ep.group 'console_scripts' >>> ep.name 'foo' >>> ep.value 'bar' """ return validate(metadata.EntryPoints(metadata.EntryPoints._from_text(eps))) load.register(type(None), lambda x: x) @pass_none def render(eps: metadata.EntryPoints): by_group = operator.attrgetter('group') groups = itertools.groupby(sorted(eps, key=by_group), by_group) return '\n'.join( f'[{group}]\n{render_items(items)}\n' for group, items in groups ) def render_items(eps): return '\n'.join( f'{ep.name} = {ep.value}' for ep in sorted(eps) ) PK{5ZzkK hKhK4Lib/site-packages/setuptools/config/pyprojecttoml.pynuW+A""" Load setuptools configuration from ``pyproject.toml`` files. **PRIVATE MODULE**: API reserved for setuptools internal usage only. """ import logging import os import warnings from contextlib import contextmanager from functools import partial from typing import TYPE_CHECKING, Callable, Dict, Optional, Mapping, Union from setuptools.errors import FileError, OptionError from . import expand as _expand from ._apply_pyprojecttoml import apply as _apply from ._apply_pyprojecttoml import _PREVIOUSLY_DEFINED, _WouldIgnoreField if TYPE_CHECKING: from setuptools.dist import Distribution # noqa _Path = Union[str, os.PathLike] _logger = logging.getLogger(__name__) def load_file(filepath: _Path) -> dict: from setuptools.extern import tomli # type: ignore with open(filepath, "rb") as file: return tomli.load(file) def validate(config: dict, filepath: _Path) -> bool: from . import _validate_pyproject as validator trove_classifier = validator.FORMAT_FUNCTIONS.get("trove-classifier") if hasattr(trove_classifier, "_disable_download"): # Improve reproducibility by default. See issue 31 for validate-pyproject. trove_classifier._disable_download() # type: ignore try: return validator.validate(config) except validator.ValidationError as ex: summary = f"configuration error: {ex.summary}" if ex.name.strip("`") != "project": # Probably it is just a field missing/misnamed, not worthy the verbosity... _logger.debug(summary) _logger.debug(ex.details) error = f"invalid pyproject.toml config: {ex.name}." raise ValueError(f"{error}\n{summary}") from None def apply_configuration( dist: "Distribution", filepath: _Path, ignore_option_errors=False, ) -> "Distribution": """Apply the configuration from a ``pyproject.toml`` file into an existing distribution object. """ config = read_configuration(filepath, True, ignore_option_errors, dist) return _apply(dist, config, filepath) def read_configuration( filepath: _Path, expand=True, ignore_option_errors=False, dist: Optional["Distribution"] = None, ): """Read given configuration file and returns options from it as a dict. :param str|unicode filepath: Path to configuration file in the ``pyproject.toml`` format. :param bool expand: Whether to expand directives and other computed values (i.e. post-process the given configuration) :param bool ignore_option_errors: Whether to silently ignore options, values of which could not be resolved (e.g. due to exceptions in directives such as file:, attr:, etc.). If False exceptions are propagated as expected. :param Distribution|None: Distribution object to which the configuration refers. If not given a dummy object will be created and discarded after the configuration is read. This is used for auto-discovery of packages in the case a dynamic configuration (e.g. ``attr`` or ``cmdclass``) is expanded. When ``expand=False`` this object is simply ignored. :rtype: dict """ filepath = os.path.abspath(filepath) if not os.path.isfile(filepath): raise FileError(f"Configuration file {filepath!r} does not exist.") asdict = load_file(filepath) or {} project_table = asdict.get("project", {}) tool_table = asdict.get("tool", {}) setuptools_table = tool_table.get("setuptools", {}) if not asdict or not (project_table or setuptools_table): return {} # User is not using pyproject to configure setuptools if setuptools_table: # TODO: Remove the following once the feature stabilizes: msg = "Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*." warnings.warn(msg, _BetaConfiguration) # There is an overall sense in the community that making include_package_data=True # the default would be an improvement. # `ini2toml` backfills include_package_data=False when nothing is explicitly given, # therefore setting a default here is backwards compatible. orig_setuptools_table = setuptools_table.copy() if dist and getattr(dist, "include_package_data") is not None: setuptools_table.setdefault("include-package-data", dist.include_package_data) else: setuptools_table.setdefault("include-package-data", True) # Persist changes: asdict["tool"] = tool_table tool_table["setuptools"] = setuptools_table try: # Don't complain about unrelated errors (e.g. tools not using the "tool" table) subset = {"project": project_table, "tool": {"setuptools": setuptools_table}} validate(subset, filepath) except Exception as ex: # TODO: Remove the following once the feature stabilizes: if _skip_bad_config(project_table, orig_setuptools_table, dist): return {} # TODO: After the previous statement is removed the try/except can be replaced # by the _ignore_errors context manager. if ignore_option_errors: _logger.debug(f"ignored error: {ex.__class__.__name__} - {ex}") else: raise # re-raise exception if expand: root_dir = os.path.dirname(filepath) return expand_configuration(asdict, root_dir, ignore_option_errors, dist) return asdict def _skip_bad_config( project_cfg: dict, setuptools_cfg: dict, dist: Optional["Distribution"] ) -> bool: """Be temporarily forgiving with invalid ``pyproject.toml``""" # See pypa/setuptools#3199 and pypa/cibuildwheel#1064 if dist is None or ( dist.metadata.name is None and dist.metadata.version is None and dist.install_requires is None ): # It seems that the build is not getting any configuration from other places return False if setuptools_cfg: # If `[tool.setuptools]` is set, then `pyproject.toml` config is intentional return False given_config = set(project_cfg.keys()) popular_subset = {"name", "version", "python_requires", "requires-python"} if given_config <= popular_subset: # It seems that the docs in cibuildtool has been inadvertently encouraging users # to create `pyproject.toml` files that are not compliant with the standards. # Let's be forgiving for the time being. warnings.warn(_InvalidFile.message(), _InvalidFile, stacklevel=2) return True return False def expand_configuration( config: dict, root_dir: Optional[_Path] = None, ignore_option_errors: bool = False, dist: Optional["Distribution"] = None, ) -> dict: """Given a configuration with unresolved fields (e.g. dynamic, cmdclass, ...) find their final values. :param dict config: Dict containing the configuration for the distribution :param str root_dir: Top-level directory for the distribution/project (the same directory where ``pyproject.toml`` is place) :param bool ignore_option_errors: see :func:`read_configuration` :param Distribution|None: Distribution object to which the configuration refers. If not given a dummy object will be created and discarded after the configuration is read. Used in the case a dynamic configuration (e.g. ``attr`` or ``cmdclass``). :rtype: dict """ return _ConfigExpander(config, root_dir, ignore_option_errors, dist).expand() class _ConfigExpander: def __init__( self, config: dict, root_dir: Optional[_Path] = None, ignore_option_errors: bool = False, dist: Optional["Distribution"] = None, ): self.config = config self.root_dir = root_dir or os.getcwd() self.project_cfg = config.get("project", {}) self.dynamic = self.project_cfg.get("dynamic", []) self.setuptools_cfg = config.get("tool", {}).get("setuptools", {}) self.dynamic_cfg = self.setuptools_cfg.get("dynamic", {}) self.ignore_option_errors = ignore_option_errors self._dist = dist def _ensure_dist(self) -> "Distribution": from setuptools.dist import Distribution attrs = {"src_root": self.root_dir, "name": self.project_cfg.get("name", None)} return self._dist or Distribution(attrs) def _process_field(self, container: dict, field: str, fn: Callable): if field in container: with _ignore_errors(self.ignore_option_errors): container[field] = fn(container[field]) def _canonic_package_data(self, field="package-data"): package_data = self.setuptools_cfg.get(field, {}) return _expand.canonic_package_data(package_data) def expand(self): self._expand_packages() self._canonic_package_data() self._canonic_package_data("exclude-package-data") # A distribution object is required for discovering the correct package_dir dist = self._ensure_dist() ctx = _EnsurePackagesDiscovered(dist, self.project_cfg, self.setuptools_cfg) with ctx as ensure_discovered: package_dir = ensure_discovered.package_dir self._expand_data_files() self._expand_cmdclass(package_dir) self._expand_all_dynamic(dist, package_dir) return self.config def _expand_packages(self): packages = self.setuptools_cfg.get("packages") if packages is None or isinstance(packages, (list, tuple)): return find = packages.get("find") if isinstance(find, dict): find["root_dir"] = self.root_dir find["fill_package_dir"] = self.setuptools_cfg.setdefault("package-dir", {}) with _ignore_errors(self.ignore_option_errors): self.setuptools_cfg["packages"] = _expand.find_packages(**find) def _expand_data_files(self): data_files = partial(_expand.canonic_data_files, root_dir=self.root_dir) self._process_field(self.setuptools_cfg, "data-files", data_files) def _expand_cmdclass(self, package_dir: Mapping[str, str]): root_dir = self.root_dir cmdclass = partial(_expand.cmdclass, package_dir=package_dir, root_dir=root_dir) self._process_field(self.setuptools_cfg, "cmdclass", cmdclass) def _expand_all_dynamic(self, dist: "Distribution", package_dir: Mapping[str, str]): special = ( # need special handling "version", "readme", "entry-points", "scripts", "gui-scripts", "classifiers", "dependencies", "optional-dependencies", ) # `_obtain` functions are assumed to raise appropriate exceptions/warnings. obtained_dynamic = { field: self._obtain(dist, field, package_dir) for field in self.dynamic if field not in special } obtained_dynamic.update( self._obtain_entry_points(dist, package_dir) or {}, version=self._obtain_version(dist, package_dir), readme=self._obtain_readme(dist), classifiers=self._obtain_classifiers(dist), dependencies=self._obtain_dependencies(dist), optional_dependencies=self._obtain_optional_dependencies(dist), ) # `None` indicates there is nothing in `tool.setuptools.dynamic` but the value # might have already been set by setup.py/extensions, so avoid overwriting. updates = {k: v for k, v in obtained_dynamic.items() if v is not None} self.project_cfg.update(updates) def _ensure_previously_set(self, dist: "Distribution", field: str): previous = _PREVIOUSLY_DEFINED[field](dist) if previous is None and not self.ignore_option_errors: msg = ( f"No configuration found for dynamic {field!r}.\n" "Some dynamic fields need to be specified via `tool.setuptools.dynamic`" "\nothers must be specified via the equivalent attribute in `setup.py`." ) raise OptionError(msg) def _expand_directive( self, specifier: str, directive, package_dir: Mapping[str, str] ): with _ignore_errors(self.ignore_option_errors): root_dir = self.root_dir if "file" in directive: return _expand.read_files(directive["file"], root_dir) if "attr" in directive: return _expand.read_attr(directive["attr"], package_dir, root_dir) raise ValueError(f"invalid `{specifier}`: {directive!r}") return None def _obtain(self, dist: "Distribution", field: str, package_dir: Mapping[str, str]): if field in self.dynamic_cfg: return self._expand_directive( f"tool.setuptools.dynamic.{field}", self.dynamic_cfg[field], package_dir, ) self._ensure_previously_set(dist, field) return None def _obtain_version(self, dist: "Distribution", package_dir: Mapping[str, str]): # Since plugins can set version, let's silently skip if it cannot be obtained if "version" in self.dynamic and "version" in self.dynamic_cfg: return _expand.version(self._obtain(dist, "version", package_dir)) return None def _obtain_readme(self, dist: "Distribution") -> Optional[Dict[str, str]]: if "readme" not in self.dynamic: return None dynamic_cfg = self.dynamic_cfg if "readme" in dynamic_cfg: return { "text": self._obtain(dist, "readme", {}), "content-type": dynamic_cfg["readme"].get("content-type", "text/x-rst"), } self._ensure_previously_set(dist, "readme") return None def _obtain_entry_points( self, dist: "Distribution", package_dir: Mapping[str, str] ) -> Optional[Dict[str, dict]]: fields = ("entry-points", "scripts", "gui-scripts") if not any(field in self.dynamic for field in fields): return None text = self._obtain(dist, "entry-points", package_dir) if text is None: return None groups = _expand.entry_points(text) expanded = {"entry-points": groups} def _set_scripts(field: str, group: str): if group in groups: value = groups.pop(group) if field not in self.dynamic: msg = _WouldIgnoreField.message(field, value) warnings.warn(msg, _WouldIgnoreField) # TODO: Don't set field when support for pyproject.toml stabilizes # instead raise an error as specified in PEP 621 expanded[field] = value _set_scripts("scripts", "console_scripts") _set_scripts("gui-scripts", "gui_scripts") return expanded def _obtain_classifiers(self, dist: "Distribution"): if "classifiers" in self.dynamic: value = self._obtain(dist, "classifiers", {}) if value: return value.splitlines() return None def _obtain_dependencies(self, dist: "Distribution"): if "dependencies" in self.dynamic: value = self._obtain(dist, "dependencies", {}) if value: return _parse_requirements_list(value) return None def _obtain_optional_dependencies(self, dist: "Distribution"): if "optional-dependencies" not in self.dynamic: return None if "optional-dependencies" in self.dynamic_cfg: optional_dependencies_map = self.dynamic_cfg["optional-dependencies"] assert isinstance(optional_dependencies_map, dict) return { group: _parse_requirements_list(self._expand_directive( f"tool.setuptools.dynamic.optional-dependencies.{group}", directive, {}, )) for group, directive in optional_dependencies_map.items() } self._ensure_previously_set(dist, "optional-dependencies") return None def _parse_requirements_list(value): return [ line for line in value.splitlines() if line.strip() and not line.strip().startswith("#") ] @contextmanager def _ignore_errors(ignore_option_errors: bool): if not ignore_option_errors: yield return try: yield except Exception as ex: _logger.debug(f"ignored error: {ex.__class__.__name__} - {ex}") class _EnsurePackagesDiscovered(_expand.EnsurePackagesDiscovered): def __init__( self, distribution: "Distribution", project_cfg: dict, setuptools_cfg: dict ): super().__init__(distribution) self._project_cfg = project_cfg self._setuptools_cfg = setuptools_cfg def __enter__(self): """When entering the context, the values of ``packages``, ``py_modules`` and ``package_dir`` that are missing in ``dist`` are copied from ``setuptools_cfg``. """ dist, cfg = self._dist, self._setuptools_cfg package_dir: Dict[str, str] = cfg.setdefault("package-dir", {}) package_dir.update(dist.package_dir or {}) dist.package_dir = package_dir # needs to be the same object dist.set_defaults._ignore_ext_modules() # pyproject.toml-specific behaviour # Set `name`, `py_modules` and `packages` in dist to short-circuit # auto-discovery, but avoid overwriting empty lists purposefully set by users. if dist.metadata.name is None: dist.metadata.name = self._project_cfg.get("name") if dist.py_modules is None: dist.py_modules = cfg.get("py-modules") if dist.packages is None: dist.packages = cfg.get("packages") return super().__enter__() def __exit__(self, exc_type, exc_value, traceback): """When exiting the context, if values of ``packages``, ``py_modules`` and ``package_dir`` are missing in ``setuptools_cfg``, copy from ``dist``. """ # If anything was discovered set them back, so they count in the final config. self._setuptools_cfg.setdefault("packages", self._dist.packages) self._setuptools_cfg.setdefault("py-modules", self._dist.py_modules) return super().__exit__(exc_type, exc_value, traceback) class _BetaConfiguration(UserWarning): """Explicitly inform users that some `pyproject.toml` configuration is *beta*""" class _InvalidFile(UserWarning): """The given `pyproject.toml` file is invalid and would be ignored. !!\n\n ############################ # Invalid `pyproject.toml` # ############################ Any configurations in `pyproject.toml` will be ignored. Please note that future releases of setuptools will halt the build process if an invalid file is given. To prevent setuptools from considering `pyproject.toml` please DO NOT include the `[project]` or `[tool.setuptools]` tables in your file. \n\n!! """ @classmethod def message(cls): from inspect import cleandoc return cleandoc(cls.__doc__) PK{5ZE_V4V4;Lib/site-packages/setuptools/config/_apply_pyprojecttoml.pynuW+A"""Translation layer between pyproject config and setuptools distribution and metadata objects. The distribution and metadata objects are modeled after (an old version of) core metadata, therefore configs in the format specified for ``pyproject.toml`` need to be processed before being applied. **PRIVATE MODULE**: API reserved for setuptools internal usage only. """ import logging import os import warnings from collections.abc import Mapping from email.headerregistry import Address from functools import partial, reduce from itertools import chain from types import MappingProxyType from typing import (TYPE_CHECKING, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union) from setuptools._deprecation_warning import SetuptoolsDeprecationWarning if TYPE_CHECKING: from setuptools._importlib import metadata # noqa from setuptools.dist import Distribution # noqa EMPTY: Mapping = MappingProxyType({}) # Immutable dict-like _Path = Union[os.PathLike, str] _DictOrStr = Union[dict, str] _CorrespFn = Callable[["Distribution", Any, _Path], None] _Correspondence = Union[str, _CorrespFn] _logger = logging.getLogger(__name__) def apply(dist: "Distribution", config: dict, filename: _Path) -> "Distribution": """Apply configuration dict read with :func:`read_configuration`""" if not config: return dist # short-circuit unrelated pyproject.toml file root_dir = os.path.dirname(filename) or "." _apply_project_table(dist, config, root_dir) _apply_tool_table(dist, config, filename) current_directory = os.getcwd() os.chdir(root_dir) try: dist._finalize_requires() dist._finalize_license_files() finally: os.chdir(current_directory) return dist def _apply_project_table(dist: "Distribution", config: dict, root_dir: _Path): project_table = config.get("project", {}).copy() if not project_table: return # short-circuit _handle_missing_dynamic(dist, project_table) _unify_entry_points(project_table) for field, value in project_table.items(): norm_key = json_compatible_key(field) corresp = PYPROJECT_CORRESPONDENCE.get(norm_key, norm_key) if callable(corresp): corresp(dist, value, root_dir) else: _set_config(dist, corresp, value) def _apply_tool_table(dist: "Distribution", config: dict, filename: _Path): tool_table = config.get("tool", {}).get("setuptools", {}) if not tool_table: return # short-circuit for field, value in tool_table.items(): norm_key = json_compatible_key(field) if norm_key in TOOL_TABLE_DEPRECATIONS: suggestion = TOOL_TABLE_DEPRECATIONS[norm_key] msg = f"The parameter `{norm_key}` is deprecated, {suggestion}" warnings.warn(msg, SetuptoolsDeprecationWarning) norm_key = TOOL_TABLE_RENAMES.get(norm_key, norm_key) _set_config(dist, norm_key, value) _copy_command_options(config, dist, filename) def _handle_missing_dynamic(dist: "Distribution", project_table: dict): """Be temporarily forgiving with ``dynamic`` fields not listed in ``dynamic``""" # TODO: Set fields back to `None` once the feature stabilizes dynamic = set(project_table.get("dynamic", [])) for field, getter in _PREVIOUSLY_DEFINED.items(): if not (field in project_table or field in dynamic): value = getter(dist) if value: msg = _WouldIgnoreField.message(field, value) warnings.warn(msg, _WouldIgnoreField) def json_compatible_key(key: str) -> str: """As defined in :pep:`566#json-compatible-metadata`""" return key.lower().replace("-", "_") def _set_config(dist: "Distribution", field: str, value: Any): setter = getattr(dist.metadata, f"set_{field}", None) if setter: setter(value) elif hasattr(dist.metadata, field) or field in SETUPTOOLS_PATCHES: setattr(dist.metadata, field, value) else: setattr(dist, field, value) _CONTENT_TYPES = { ".md": "text/markdown", ".rst": "text/x-rst", ".txt": "text/plain", } def _guess_content_type(file: str) -> Optional[str]: _, ext = os.path.splitext(file.lower()) if not ext: return None if ext in _CONTENT_TYPES: return _CONTENT_TYPES[ext] valid = ", ".join(f"{k} ({v})" for k, v in _CONTENT_TYPES.items()) msg = f"only the following file extensions are recognized: {valid}." raise ValueError(f"Undefined content type for {file}, {msg}") def _long_description(dist: "Distribution", val: _DictOrStr, root_dir: _Path): from setuptools.config import expand if isinstance(val, str): text = expand.read_files(val, root_dir) ctype = _guess_content_type(val) else: text = val.get("text") or expand.read_files(val.get("file", []), root_dir) ctype = val["content-type"] _set_config(dist, "long_description", text) if ctype: _set_config(dist, "long_description_content_type", ctype) def _license(dist: "Distribution", val: dict, root_dir: _Path): from setuptools.config import expand if "file" in val: _set_config(dist, "license", expand.read_files([val["file"]], root_dir)) else: _set_config(dist, "license", val["text"]) def _people(dist: "Distribution", val: List[dict], _root_dir: _Path, kind: str): field = [] email_field = [] for person in val: if "name" not in person: email_field.append(person["email"]) elif "email" not in person: field.append(person["name"]) else: addr = Address(display_name=person["name"], addr_spec=person["email"]) email_field.append(str(addr)) if field: _set_config(dist, kind, ", ".join(field)) if email_field: _set_config(dist, f"{kind}_email", ", ".join(email_field)) def _project_urls(dist: "Distribution", val: dict, _root_dir): _set_config(dist, "project_urls", val) def _python_requires(dist: "Distribution", val: dict, _root_dir): from setuptools.extern.packaging.specifiers import SpecifierSet _set_config(dist, "python_requires", SpecifierSet(val)) def _dependencies(dist: "Distribution", val: list, _root_dir): if getattr(dist, "install_requires", []): msg = "`install_requires` overwritten in `pyproject.toml` (dependencies)" warnings.warn(msg) _set_config(dist, "install_requires", val) def _optional_dependencies(dist: "Distribution", val: dict, _root_dir): existing = getattr(dist, "extras_require", {}) _set_config(dist, "extras_require", {**existing, **val}) def _unify_entry_points(project_table: dict): project = project_table entry_points = project.pop("entry-points", project.pop("entry_points", {})) renaming = {"scripts": "console_scripts", "gui_scripts": "gui_scripts"} for key, value in list(project.items()): # eager to allow modifications norm_key = json_compatible_key(key) if norm_key in renaming and value: entry_points[renaming[norm_key]] = project.pop(key) if entry_points: project["entry-points"] = { name: [f"{k} = {v}" for k, v in group.items()] for name, group in entry_points.items() } def _copy_command_options(pyproject: dict, dist: "Distribution", filename: _Path): tool_table = pyproject.get("tool", {}) cmdclass = tool_table.get("setuptools", {}).get("cmdclass", {}) valid_options = _valid_command_options(cmdclass) cmd_opts = dist.command_options for cmd, config in pyproject.get("tool", {}).get("distutils", {}).items(): cmd = json_compatible_key(cmd) valid = valid_options.get(cmd, set()) cmd_opts.setdefault(cmd, {}) for key, value in config.items(): key = json_compatible_key(key) cmd_opts[cmd][key] = (str(filename), value) if key not in valid: # To avoid removing options that are specified dynamically we # just log a warn... _logger.warning(f"Command option {cmd}.{key} is not defined") def _valid_command_options(cmdclass: Mapping = EMPTY) -> Dict[str, Set[str]]: from .._importlib import metadata from setuptools.dist import Distribution valid_options = {"global": _normalise_cmd_options(Distribution.global_options)} unloaded_entry_points = metadata.entry_points(group='distutils.commands') loaded_entry_points = (_load_ep(ep) for ep in unloaded_entry_points) entry_points = (ep for ep in loaded_entry_points if ep) for cmd, cmd_class in chain(entry_points, cmdclass.items()): opts = valid_options.get(cmd, set()) opts = opts | _normalise_cmd_options(getattr(cmd_class, "user_options", [])) valid_options[cmd] = opts return valid_options def _load_ep(ep: "metadata.EntryPoint") -> Optional[Tuple[str, Type]]: # Ignore all the errors try: return (ep.name, ep.load()) except Exception as ex: msg = f"{ex.__class__.__name__} while trying to load entry-point {ep.name}" _logger.warning(f"{msg}: {ex}") return None def _normalise_cmd_option_key(name: str) -> str: return json_compatible_key(name).strip("_=") def _normalise_cmd_options(desc: List[Tuple[str, Optional[str], str]]) -> Set[str]: return {_normalise_cmd_option_key(fancy_option[0]) for fancy_option in desc} def _attrgetter(attr): """ Similar to ``operator.attrgetter`` but returns None if ``attr`` is not found >>> from types import SimpleNamespace >>> obj = SimpleNamespace(a=42, b=SimpleNamespace(c=13)) >>> _attrgetter("a")(obj) 42 >>> _attrgetter("b.c")(obj) 13 >>> _attrgetter("d")(obj) is None True """ return partial(reduce, lambda acc, x: getattr(acc, x, None), attr.split(".")) def _some_attrgetter(*items): """ Return the first "truth-y" attribute or None >>> from types import SimpleNamespace >>> obj = SimpleNamespace(a=42, b=SimpleNamespace(c=13)) >>> _some_attrgetter("d", "a", "b.c")(obj) 42 >>> _some_attrgetter("d", "e", "b.c", "a")(obj) 13 >>> _some_attrgetter("d", "e", "f")(obj) is None True """ def _acessor(obj): values = (_attrgetter(i)(obj) for i in items) return next((i for i in values if i is not None), None) return _acessor PYPROJECT_CORRESPONDENCE: Dict[str, _Correspondence] = { "readme": _long_description, "license": _license, "authors": partial(_people, kind="author"), "maintainers": partial(_people, kind="maintainer"), "urls": _project_urls, "dependencies": _dependencies, "optional_dependencies": _optional_dependencies, "requires_python": _python_requires, } TOOL_TABLE_RENAMES = {"script_files": "scripts"} TOOL_TABLE_DEPRECATIONS = { "namespace_packages": "consider using implicit namespaces instead (PEP 420)." } SETUPTOOLS_PATCHES = {"long_description_content_type", "project_urls", "provides_extras", "license_file", "license_files"} _PREVIOUSLY_DEFINED = { "name": _attrgetter("metadata.name"), "version": _attrgetter("metadata.version"), "description": _attrgetter("metadata.description"), "readme": _attrgetter("metadata.long_description"), "requires-python": _some_attrgetter("python_requires", "metadata.python_requires"), "license": _attrgetter("metadata.license"), "authors": _some_attrgetter("metadata.author", "metadata.author_email"), "maintainers": _some_attrgetter("metadata.maintainer", "metadata.maintainer_email"), "keywords": _attrgetter("metadata.keywords"), "classifiers": _attrgetter("metadata.classifiers"), "urls": _attrgetter("metadata.project_urls"), "entry-points": _attrgetter("entry_points"), "dependencies": _some_attrgetter("_orig_install_requires", "install_requires"), "optional-dependencies": _some_attrgetter("_orig_extras_require", "extras_require"), } class _WouldIgnoreField(UserWarning): """Inform users that ``pyproject.toml`` would overwrite previous metadata.""" MESSAGE = """\ {field!r} defined outside of `pyproject.toml` would be ignored. !!\n\n ########################################################################## # configuration would be ignored/result in error due to `pyproject.toml` # ########################################################################## The following seems to be defined outside of `pyproject.toml`: `{field} = {value!r}` According to the spec (see the link below), however, setuptools CANNOT consider this value unless {field!r} is listed as `dynamic`. https://packaging.python.org/en/latest/specifications/declaring-project-metadata/ For the time being, `setuptools` will still consider the given value (as a **transitional** measure), but please note that future releases of setuptools will follow strictly the standard. To prevent this warning, you can list {field!r} under `dynamic` or alternatively remove the `[project]` table from your file and rely entirely on other means of configuration. \n\n!! """ @classmethod def message(cls, field, value): from inspect import cleandoc return cleandoc(cls.MESSAGE.format(field=field, value=value)) PK{5Z>HLib/site-packages/setuptools/config/__pycache__/__init__.cpython-311.pycnuW+A b;dadZddlZddlmZddlmZddlmZmZm Z ddl m Z dd l m Z ed e Zd Zd edefdZee jZee jZdS)zVFor backward compatibility, expose main functions from ``setuptools.config.setupcfg`` N)wraps)dedent)CallableTypeVarcast)SetuptoolsDeprecationWarning)setupcfgFn)bound)parse_configurationread_configurationfnreturncbtfd}tt|S)Ncdtdjdtjd}tjt |t d|i|S)NzQ As setuptools moves its configuration towards `pyproject.toml`, `.zC` became deprecated. For the time being, you can use the `z` module to access a backward compatible API, but this module is provisional and might be removed in the future. r) stacklevel)__name__r warningswarnrr )argskwargsmsgrs iE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/config/__init__.py_wrapperz%_deprecation_notice.._wrappersr   [  /7.?      fSkk#?ANNNNr4"6""")rrr )rrs` r_deprecation_noticers> 2YY # # # #Y # H  r)__doc__r functoolsrtextwraprtypingrrr_deprecation_warningr r r __all__rrrrrr(s**********?????? WT""" 7B2")()DEE))(*FGGrPK{5Zx GkGkMLib/site-packages/setuptools/config/__pycache__/pyprojecttoml.cpython-311.pycnuW+A b;dhK :dZddlZddlZddlZddlmZddlmZddlm Z m Z m Z m Z m Z mZddlmZmZddlmZdd lmZdd lmZmZe rdd lmZeeejfZeje Z!d ed e"fdZ#de"d ed e$fdZ% d'ddd ed dfdZ& d(d ede dfdZ'de"de"de dd e$fdZ( d)de"de ede$de dd e"f dZ)GddZ*dZ+ede$fd Z,Gd!d"ej-Z.Gd#d$e/Z0Gd%d&e/Z1dS)*z Load setuptools configuration from ``pyproject.toml`` files. **PRIVATE MODULE**: API reserved for setuptools internal usage only. N)contextmanager)partial) TYPE_CHECKINGCallableDictOptionalMappingUnion) FileError OptionError)expand)apply)_PREVIOUSLY_DEFINED_WouldIgnoreField Distributionfilepathreturncddlm}t|d5}||cdddS#1swxYwYdS)Nr)tomlirb)setuptools.externropenload)rrfiles nE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/config/pyprojecttoml.py load_filers'''''' h   zz$                  s 9==configcddlm}|jd}t |dr| ||S#|j$r}d|j}|j ddkr9t |t |j d|j d }t|d |dd}~wwxYw) Nr )_validate_pyprojectztrove-classifier_disable_downloadzconfiguration error: `projectzinvalid pyproject.toml config: . )r!FORMAT_FUNCTIONSgethasattrr"validateValidationErrorsummarynamestrip_loggerdebugdetails ValueError)rr validatortrove_classifierexr-errors rr+r+!s 222222 1556HII!455-**,,, :!!&)))  $:::6"*66 7==   * * MM' " " " MM"* % % %<"'<<<E..W..//T9:sA C+%BC&&C+FdistrcHt|d||}t|||S)zeApply the configuration from a ``pyproject.toml`` file into an existing distribution object. T)read_configuration_apply)r8rignore_option_errorsrs rapply_configurationr=6s* $0Dd K KF $ ) ))Tctj|}tj|st d|dt |pi}|di}|di}|di}|r|s|siS|rd}tj|t| } |r,t|d| d |j n| d d ||d<||d< |d|id } t| |n]#t$rP} t!|| |ricYd} ~ S|r+t"d | jjd | nYd} ~ nd} ~ wwxYw|r1tj|} t-|| ||S|S)aRead given configuration file and returns options from it as a dict. :param str|unicode filepath: Path to configuration file in the ``pyproject.toml`` format. :param bool expand: Whether to expand directives and other computed values (i.e. post-process the given configuration) :param bool ignore_option_errors: Whether to silently ignore options, values of which could not be resolved (e.g. due to exceptions in directives such as file:, attr:, etc.). If False exceptions are propagated as expected. :param Distribution|None: Distribution object to which the configuration refers. If not given a dummy object will be created and discarded after the configuration is read. This is used for auto-discovery of packages in the case a dynamic configuration (e.g. ``attr`` or ``cmdclass``) is expanded. When ``expand=False`` this object is simply ignored. :rtype: dict zConfiguration file z does not exist.r$tool setuptoolszDSupport for `[tool.setuptools]` in `pyproject.toml` is still *beta*.include_package_dataNzinclude-package-dataT)r$r@ignored error:  - )ospathabspathisfiler rr)warningswarn_BetaConfigurationcopygetattr setdefaultrBr+ Exception_skip_bad_configr0r1 __class____name__dirnameexpand_configuration) rrr<r8asdict project_table tool_tablesetuptools_tablemsgorig_setuptools_tablesubsetr6root_dirs rr:r:Bs46wx((H 7>>( # #LJhJJJKKK x &BFJJy"--MFB''J!~~lB77 -+; /T c-... -1133 B455A##$:Drequires-pythonr.versionpython_requires) stacklevelT) metadatar.rainstall_requiressetkeysrIrJ _InvalidFilemessage)r]r^r8 given_configpopular_subsets rrPrPs  | " M ! )  ! )uu{''))**LNNNN~%%  l**,,lqIIIIt 5r>r\r<cJt||||S)aGiven a configuration with unresolved fields (e.g. dynamic, cmdclass, ...) find their final values. :param dict config: Dict containing the configuration for the distribution :param str root_dir: Top-level directory for the distribution/project (the same directory where ``pyproject.toml`` is place) :param bool ignore_option_errors: see :func:`read_configuration` :param Distribution|None: Distribution object to which the configuration refers. If not given a dummy object will be created and discarded after the configuration is read. Used in the case a dynamic configuration (e.g. ``attr`` or ``cmdclass``). :rtype: dict )_ConfigExpanderr)rr\r<r8s rrTrTs%( 68-A4 H H O O Q QQr>c eZdZ d!dedeedededfdZd"d Zd ed e d e fdZ d#dZ dZ dZdZdee e ffdZdddee e ffdZddd e fdZde dee e ffdZddd e dee e ffdZdddee e ffdZddd eee e ffdZdddee e fd eee effdZd$dZd$dZd$d ZdS)%rnNFrr\r<r8rcx||_|ptj|_|di|_|jdg|_|didi|_|jdi|_||_ ||_ dS)Nr$dynamicr@rA) rrEgetcwdr\r)r]rqr^ dynamic_cfgr<_dist)selfrr\r<r8s r__init__z_ConfigExpander.__init__s  /BIKK !::i44'++Ir:: $jj4488rJJ.229bAA$8! r>rcxddlm}|j|jddd}|jp ||S)Nrrr.)src_rootr.)setuptools.distrr\r]r)rt)rurattrss r _ensure_distz_ConfigExpander._ensure_distsN000000!]D4D4H4HQU4V4VWWz0\\%000r> containerfieldfnc||vrCt|j5|||||<ddddS#1swxYwYdSdSN)_ignore_errorsr<)rur|r}r~s r_process_fieldz_ConfigExpander._process_fields I   9:: 8 8#%2i&6#7#7 %  8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8  s ;?? package-datac`|j|i}tj|Sr)r^r)_expandcanonic_package_data)rur} package_datas r_canonic_package_dataz%_ConfigExpander._canonic_package_datas+*..ub99 +L999r>c|||d|}t||j|j}|5}|j}|||| ||dddn #1swxYwY|j S)Nzexclude-package-data) _expand_packagesrr{_EnsurePackagesDiscoveredr]r^ package_dir_expand_data_files_expand_cmdclass_expand_all_dynamicr)rur8ctxensure_discoveredrs rrz_ConfigExpander.expands   ""$$$ ""#9:::  ""'d.>@STT  8%+7K  # # % % %  ! !+ . . .  $ $T; 7 7 7  8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 {s/ACC Cc|jd}|t|ttfrdS|d}t|t rp|j|d<|jdi|d<t|j 5tj di||jd<ddddS#1swxYwYdSdS)Npackagesfindr\ package-dirfill_package_dir) r^r) isinstancelisttupledictr\rNrr<r find_packages)rurrs rrz _ConfigExpander._expand_packagess8&**:66  z(T5MBB  F||F## dD ! ! P#}D '+':'E'EmUW'X'XD# $ 9:: P P292G2O2O$2O2O#J/ P P P P P P P P P P P P P P P P P P P Ps!CC C c~ttj|j}||jd|dS)N)r\z data-files)rrcanonic_data_filesr\rr^)ru data_filess rrz"_ConfigExpander._expand_data_filess:W7$-PPP  D/zJJJJJr>rc|j}ttj||}||jd|dS)N)rr\cmdclass)r\rrrrr^)rurr\rs rrz _ConfigExpander._expand_cmdclasssA=7+xXXX D/XFFFFFr>c dfdjD}|pid|D}j |dS)N)rareadme entry-pointsscripts gui-scripts classifiers dependenciesoptional-dependenciescHi|]}|v||Sr)_obtain).0r}r8rruspecials r z7_ConfigExpander._expand_all_dynamic..s@   G## 4<<e[99###r>)rarrroptional_dependenciesci|] \}}||| Srr)rkvs rrz7_ConfigExpander._expand_all_dynamic..&sNNNDAq 1a r>) rqupdate_obtain_entry_points_obtain_version_obtain_readme_obtain_classifiers_obtain_dependencies_obtain_optional_dependenciesitemsr])rur8robtained_dynamicupdatesrs``` @rrz#_ConfigExpander._expand_all_dynamic s               % %dK 8 8 >B(({;;&&t,,006622488"&"D"DT"J"J    ON$4$:$:$<$<NNN (((((r>cpt||}||jsd|d}t|dSdS)Nz#No configuration found for dynamic z. Some dynamic fields need to be specified via `tool.setuptools.dynamic` others must be specified via the equivalent attribute in `setup.py`.)rr<r )rur8r}previousrYs r_ensure_previously_setz&_ConfigExpander._ensure_previously_set)s_&u-d33  D$= YeYYY  c"" "    r> specifierc,t|j5|j}d|vr'tj|d|cdddSd|vr(tj|d||cdddSt d|d|#1swxYwYdS)Nrattrz invalid `z`: )rr<r\r read_files read_attrr3)rur directiverr\s r_expand_directivez!_ConfigExpander._expand_directive3s$D5 6 6 F F}H""))F*;XFF F F F F F F F F""(6):KRR  F F F F F F F F DDDyDDEE E  F F F F F F F Fts&B B 4B  B B c||jvr%|d||j||S|||dS)Nztool.setuptools.dynamic.)rsrr)rur8r}rs rrz_ConfigExpander._obtain?s^ D$ $ $))2522 '  ##D%000tr>c|d|jvr2d|jvr)tj||d|SdS)Nra)rqrsrrar)rur8rs rrz_ConfigExpander._obtain_versionIsA  $ $d6F)F)F?4<<i#M#MNN Ntr>cd|jvrdS|j}d|vr4||di|ddddS||ddS)Nr content-typez text/x-rst)textr)rqrsrr)r)rur8rss rrz_ConfigExpander._obtain_readmeOs~ 4< ' '4& { " " T8R88 +H 5 9 9., W W  ##D(333tr>c d}tfd|DsdS|d|}|dStj|didtdtffd }|dd|d d S) N)rrrc3*K|] }|jvVdSr)rq)rr}rus r z7_ConfigExpander._obtain_entry_points..as*==U5DL(======r>rr}groupc|vrT|}|jvr/tj||}t j|t||<dSdSr)poprqrrjrIrJ)r}rvaluerYexpandedgroupsrus r _set_scriptsz:_ConfigExpander._obtain_entry_points.._set_scriptskse 5)) ,,+3E5AACM#'8999#(r>rconsole_scriptsr gui_scripts)anyrr entry_pointsstr)rur8rfieldsrrrrs` @@rrz$_ConfigExpander._obtain_entry_points]s<====f===== 4||D.+>> <4%d++"F+ ( (C ( ( ( ( ( ( ( (  Y 1222 ]M222r>crd|jvr-||di}|r|SdS)Nr)rqr splitlinesrur8rs rrz#_ConfigExpander._obtain_classifierszsC DL ( (LL}b99E *'')))tr>chd|jvr(||di}|rt|SdS)Nr)rqr_parse_requirements_listrs rrz$_ConfigExpander._obtain_dependenciess? T\ ) )LL~r::E 7/666tr>cdjvrdSdjvrDjd}t|tsJfd|DS|ddS)Nrc fi|]-\}}|td||i.S)z.tool.setuptools.dynamic.optional-dependencies.)rr)rrrrus rrzA_ConfigExpander._obtain_optional_dependencies..s_ %E9 /0F0FLULL11r>)rqrsrrrr)rur8optional_dependencies_maps` rrz-_ConfigExpander._obtain_optional_dependenciess "$, 6 64 "d&6 6 6(,(89P(Q %7>> > > > )B(G(G(I(I   ##D*ABBBtr>NFN)rr)r)r8r)rR __module__ __qualname__rr_Pathboolrvr{rrrrrrrr rrrrrrrrrrrrrr>rrnrns%)%*)- 5/#  ~&  1111 88S8h8888 :::: P P PKKKGGCH,=GGGG ))WSRUXEV))))<#>######  6=c3h6G    N3WSRUXEVNcAR > htCH~6N    "18c1B $sDy/ ":r>rnc>d|DS)Ncg|]?}||d=|@S)#)r/ startswith)rlines r z,_parse_requirements_list..sV     ::<< !% 7 7 < <     r>)r)rs rrrs/  $$&&   r>c#K|sdVdS dVdS#t$r5}td|jjd|Yd}~dSd}~wwxYw)NrCrD)rOr0r1rQrR)r<r6s rrrs  H  HHH F (=FF"FFGGGGGGGGGHs A*A  Ac@eZdZdddedeffd ZfdZfdZxZS)r distributionrr]r^cft|||_||_dSr)superrv _project_cfg_setuptools_cfg)rurr]r^rQs rrvz"_EnsurePackagesDiscovered.__init__s3 &&&'-r>c|j|j}}|di}||jpi||_|j|jj$|j d|j_|j | d|_ |j | d|_ tS)zWhen entering the context, the values of ``packages``, ``py_modules`` and ``package_dir`` that are missing in ``dist`` are copied from ``setuptools_cfg``. rNr. py-modulesr)rtrrNrr set_defaults_ignore_ext_modulesrer.rr) py_modulesrr __enter__)rur8cfgrrQs rrz#_EnsurePackagesDiscovered.__enter__sJ 4c&)nn]B&G&G 4+1r222& --/// =  %!%!2!6!6v!>!>DM  ? "!ggl33DO = GGJ//DMww  """r>c|jd|jj|jd|jjt |||S)zWhen exiting the context, if values of ``packages``, ``py_modules`` and ``package_dir`` are missing in ``setuptools_cfg``, copy from ``dist``. rr)rrNrtrrr__exit__)ruexc_type exc_value tracebackrQs rrz"_EnsurePackagesDiscovered.__exit__s] '' DJ4GHHH '' dj6KLLLww)Y???r>)rRrrrrvrr __classcell__)rQs@rrrs.*.9=.OS......#####,@@@@@@@@@r>rceZdZdZdS)rKzJExplicitly inform users that some `pyproject.toml` configuration is *beta*N)rRrr__doc__rr>rrKrKsTTTTr>rKc(eZdZdZedZdS)riaThe given `pyproject.toml` file is invalid and would be ignored. !! ############################ # Invalid `pyproject.toml` # ############################ Any configurations in `pyproject.toml` will be ignored. Please note that future releases of setuptools will halt the build process if an invalid file is given. To prevent setuptools from considering `pyproject.toml` please DO NOT include the `[project]` or `[tool.setuptools]` tables in your file. !! c.ddlm}||jS)Nr)cleandoc)inspectrr)clsrs rrjz_InvalidFile.messages&$$$$$$x $$$r>N)rRrrr classmethodrjrr>rriris9  %%[%%%r>ri)F)TFNr)2rloggingrErI contextlibr functoolsrtypingrrrrr r setuptools.errorsr r r'rr_apply_pyprojecttomlrr;rrryrrPathLiker getLoggerrRr0rrrr+r=r:rPrTrnrrEnsurePackagesDiscoveredr UserWarningrKrirr>rrs~  %%%%%%JJJJJJJJJJJJJJJJ44444444111111HHHHHHHH-,,,,,, c2; ' H % %  $    :T:U:t::::0 * *  * * * * * * %) LLL > " LLLL^'+3;N3K @!%!&%) RR RuoRR > " R  RRRR.QQQQQQQQhHHHHH%@%@%@%@%@ @%@%@%@PUUUUUUUU%%%%%;%%%%%r>PK{5ZkNXXTLib/site-packages/setuptools/config/__pycache__/_apply_pyprojecttoml.cpython-311.pycnuW+A b;dV4UdZddlZddlZddlZddlmZddlmZddlm Z m Z ddl m Z ddl mZddlmZmZmZmZmZmZmZmZmZmZdd lmZer dd lmZdd lmZeiZ ee!d <eej"e#fZ$ee%e#fZ&ed ee$gdfZ'ee#e'fZ(ej)e*Z+dd de%de$dd fdZ,dd de%de$fdZ-dd de%de$fdZ.dd de%fdZ/de#de#fdZ0dd de#defdZ1dddd Z2d!e#dee#fd"Z3dd d#e&de$fd$Z4dd d#e%de$fd%Z5dd d#ee%d&e$d'e#fd(Z6dd d#e%fd)Z7dd d#e%fd*Z8dd d#e9fd+Z:dd d#e%fd,Z;de%fd-Zd2d3deee#effd4Z?d5e#de#fd6Z@d7eee#ee#e#fdee#fd8ZAd9ZBd:ZCe4e5e e6d;<e e6d=<e7e:e;e8d>ZDee#e(fe!d?<d@dAiZEdBdCiZFhdDZGeBdEeBdFeBdGeBdHeCdIdJeBdKeCdLdMeCdNdOeBdPeBdQeBdReBdSeCdTdUeCdVdWdXZHGdYdZeIZJdS)[akTranslation layer between pyproject config and setuptools distribution and metadata objects. The distribution and metadata objects are modeled after (an old version of) core metadata, therefore configs in the format specified for ``pyproject.toml`` need to be processed before being applied. **PRIVATE MODULE**: API reserved for setuptools internal usage only. N)Mapping)Address)partialreduce)chain)MappingProxyType) TYPE_CHECKINGAnyCallableDictListOptionalSetTupleTypeUnion)SetuptoolsDeprecationWarningmetadata DistributionEMPTYrdistconfigfilenamereturnc|s|Stj|pd}t|||t |||tj}tj| ||tj|n#tj|wxYw|S)z=Apply configuration dict read with :func:`read_configuration`.) ospathdirname_apply_project_table_apply_tool_tablegetcwdchdir_finalize_requires_finalize_license_files)rrrroot_dircurrent_directorys uE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/config/_apply_pyprojecttoml.pyapplyr+$s  wx((/CHvx000dFH--- HX$ !!! $$&&& "####"#### Ks 0(B--Cr(c|di}|sdSt||t||D]]\}}t |}t ||}t|r||||Lt|||^dS)Nproject) getcopy_handle_missing_dynamic_unify_entry_pointsitemsjson_compatible_keyPYPROJECT_CORRESPONDENCEcallable _set_config)rrr( project_tablefieldvaluenorm_keycorresps r*r"r":sJJy"--2244M D-000 &&&%++--.. u&u--*..xBB G   . GD% * * * * gu - - - - ..c|didi}|sdS|D]x\}}t|}|tvr/t|}d|d|}t j|t t||}t|||yt|||dS)Ntool setuptoolszThe parameter `z` is deprecated, ) r.r2r3TOOL_TABLE_DEPRECATIONSwarningswarnrTOOL_TABLE_RENAMESr6_copy_command_options) rrr tool_tabler8r9r: suggestionmsgs r*r#r#KsFB''++L"==J "((** + + u&u-- . . .0:JKHKKzKKC M#; < < <%))(H==D(E****&$11111r<r7ct|dg}tD]O\}}||vsF||vsB||}|r5t||}t j|tPdS)zJBe temporarily forgiving with ``dynamic`` fields not listed in ``dynamic``dynamicN)setr._PREVIOUSLY_DEFINEDr2_WouldIgnoreFieldmessagerArB)rr7rIr8getterr9rGs r*r0r0^s-##Ir2233G,224466 v&&%7*:*:F4LLE 6'//u== c#4555 66r<keycR|ddS)z1As defined in :pep:`566#json-compatible-metadata`-_)lowerreplace)rOs r*r3r3js 99;;  sC ( ((r<r8r9ct|jd|d}|r ||dSt|j|s |tvrt |j||dSt |||dS)Nset_)getattrrhasattrSETUPTOOLS_PATCHESsetattr)rr8r9setters r*r6r6os T]N5NND 9 9F $u  & &$%3E*E*E ue,,,,,eU#####r<z text/markdownz text/x-rstz text/plain)z.mdz.rstz.txtfilec@tj|\}}|sdS|tvr t|SddtD}d|d}td|d|)N, c3,K|]\}}|d|dVdS)z ()N.0kvs r* z&_guess_content_type..s2FFtq!llalllFFFFFFr<z3only the following file extensions are recognized: rzUndefined content type for )rr splitextrS_CONTENT_TYPESjoinr2 ValueError)r\rRextvalidrGs r*_guess_content_typerms W  djjll + +FAs t nc"" IIFF~/C/C/E/EFFF F FE H H H HC @4@@3@@ A AAr<valcbddlm}t|tr&|||}t |}nG|dp)||dg|}|d}t|d||rt|d|dSdS)Nrexpandtextr\z content-typelong_descriptionlong_description_content_type)setuptools.configrq isinstancestr read_filesrmr.r6)rrnr(rqrrctypes r*_long_descriptionrzs((((((#s$  h//#C((wwvR&"3"3CGGFB4G4G"R"RN#($/// BD95AAAAABBr<cddlm}d|vr.t|d||dg|dSt|d|ddS)Nrrpr\licenserr)rurqr6rx)rrnr(rqs r*_licenser}sg(((((( }}D)V%6%6F }h%O%OPPPPPD)S[11111r< _root_dirkindcg}g}|D]}d|vr||d"d|vr||dBt|d|d}|t||r$t||d||r)t||dd|dSdS)Nnameemail) display_name addr_specr^_email)appendrrwr6ri)rrnr~rr8 email_fieldpersonaddrs r*_peoplers EK**      vg / / / / F " " LL ( ( ( (v&/RRRD   s4yy ) ) ) ) 2D$ % 0 0111CDT///499[+A+ABBBBBCCr<c(t|d|dS)N project_urls)r6)rrnr~s r* _project_urlsrsnc*****r<cFddlm}t|d||dS)Nr) SpecifierSetpython_requires)&setuptools.extern.packaging.specifiersrr6)rrnr~rs r*_python_requiresrs7CCCCCC'c):):;;;;;r<cvt|dgrd}tj|t|d|dS)Ninstall_requireszA`install_requires` overwritten in `pyproject.toml` (dependencies))rWrArBr6)rrnr~rGs r* _dependenciesrsEt',,Q c(#.....r<cRt|di}t|di||dS)Nextras_require)rWr6)rrnr~existings r*_optional_dependenciesrs8t-r22H&(;8(;s(;<<<<z2_unify_entry_points...s&:::DAqa<z'_unify_entry_points..sE# # # e ::EKKMM:::# # # r<)poplistr2r3)r7r-rrenamingrOr9r:s r*r1r1sG;;~w{{>2/N/NOOL,]KKH7==??++@@ U&s++ x  E /6{{3/?/?L(+ , # # +1133# # #   r< pyprojectc |di}|didi}t|}|j}|didiD]\}}t |}||t } ||i|D]S\} } t | } t|| f||| <| | vr!t d|d| dTdS)Nr>r?cmdclass distutilszCommand option rz is not defined) r._valid_command_optionscommand_optionsr2r3rJ setdefaultrw_loggerwarning) rrrrEr valid_optionscmd_optscmdrrlrOr9s r*rDrDsQvr**J~~lB//33JCCH*844M#H }}VR0044["EEKKMM N N V!#&&!!#suu--C$$$ ,,.. N NJC%c**C"%h--!7HSM# % L# L L L L LMMM  N N Nr<rc |ddlm}ddlm}dt |ji}|jd}d|D}d |D}t||D]M\}}| |t} | t t|d gz} | ||<N|S) Nrrrglobalzdistutils.commands)rc34K|]}t|VdSN)_load_eprceps r*rfz)_valid_command_options..s(HHB8B<<HHHHHHr<c3K|]}||V dSrrars r*rfz)_valid_command_options..s';;2;B;;;;;;r< user_options) _importlibrsetuptools.distr_normalise_cmd_optionsglobal_optionsrrr2r.rJrW) rrrrunloaded_entry_pointsloaded_entry_pointsrr cmd_classoptss r*rrs%%%%%%,,,,,,5l6QRRSM1H18LMMMHH2GHHH;;!4;;;L hnn.>.>??""Y  cee,,,WYPR-S-STTT! c r<rzmetadata.EntryPointc |j|fS#t$r@}|jjd|j}t |d|Yd}~dSd}~wwxYw)Nz" while trying to load entry-point z: )rload Exception __class____name__rr)rexrGs r*rrs~## &SS"'SS3"'''ttttts A'5A""A'rcFt|dS)Nz_=)r3strip)rs r*_normalise_cmd_option_keyr s t $ $ * *4 0 00r<desccd|DS)Nc8h|]}t|dS)r)r)rc fancy_options r* z)_normalise_cmd_options..s% P P P< %l1o 6 6 P P Pr<ra)rs r*rrs P P4 P P PPr<cVttd|dS)a8 Similar to ``operator.attrgetter`` but returns None if ``attr`` is not found >>> from types import SimpleNamespace >>> obj = SimpleNamespace(a=42, b=SimpleNamespace(c=13)) >>> _attrgetter("a")(obj) 42 >>> _attrgetter("b.c")(obj) 13 >>> _attrgetter("d")(obj) is None True c$t||dSr)rW)accxs r*z_attrgetter..s'#q$*?*?r<r)rrsplit)attrs r* _attrgetterrs$ 6??C Q QQr<cfd}|S)aL Return the first "truth-y" attribute or None >>> from types import SimpleNamespace >>> obj = SimpleNamespace(a=42, b=SimpleNamespace(c=13)) >>> _some_attrgetter("d", "a", "b.c")(obj) 42 >>> _some_attrgetter("d", "e", "b.c", "a")(obj) 13 >>> _some_attrgetter("d", "e", "f")(obj) is None True cVfdD}td|DdS)Nc3HK|]}t|VdSr)r)rciobjs r*rfz5_some_attrgetter.._acessor../s355!.+a..%%555555r<c3K|]}||V dSrra)rcrs r*rfz5_some_attrgetter.._acessor..0s"881!-Q----88r<)next)rvaluesr2s` r*_acessorz"_some_attrgetter.._acessor.s<5555u55588888$???r<ra)r2rs` r*_some_attrgetterr"s(@@@@@ Or<author)r maintainer)readmer|authors maintainersurls dependenciesoptional_dependenciesrequires_pythonr4 script_filesrnamespace_packagesz5consider using implicit namespaces instead (PEP 420).> license_filer license_filesprovides_extrasrtz metadata.namezmetadata.versionzmetadata.descriptionzmetadata.long_descriptionrzmetadata.python_requireszmetadata.licensezmetadata.authorzmetadata.author_emailzmetadata.maintainerzmetadata.maintainer_emailzmetadata.keywordszmetadata.classifierszmetadata.project_urlsr_orig_install_requiresr_orig_extras_requirer)rversion descriptionrzrequires-pythonr|rrkeywords classifiersrrrzoptional-dependenciesc,eZdZdZdZedZdS)rLzGInform users that ``pyproject.toml`` would overwrite previous metadata.a {field!r} defined outside of `pyproject.toml` would be ignored. !! ########################################################################## # configuration would be ignored/result in error due to `pyproject.toml` # ########################################################################## The following seems to be defined outside of `pyproject.toml`: `{field} = {value!r}` According to the spec (see the link below), however, setuptools CANNOT consider this value unless {field!r} is listed as `dynamic`. https://packaging.python.org/en/latest/specifications/declaring-project-metadata/ For the time being, `setuptools` will still consider the given value (as a **transitional** measure), but please note that future releases of setuptools will follow strictly the standard. To prevent this warning, you can list {field!r} under `dynamic` or alternatively remove the `[project]` table from your file and rely entirely on other means of configuration. !! cXddlm}||j||S)Nr)cleandoc)r8r9)inspectrMESSAGEformat)clsr8r9rs r*rMz_WouldIgnoreField.messagevs9$$$$$$x **e*DDEEEr<N)r __module__ __qualname____doc__r classmethodrMrar<r*rLrLYsAQQG4FF[FFFr<rL)KrloggingrrAcollections.abcremail.headerregistryr functoolsrr itertoolsrtypesrtypingr r r r r rrrrrsetuptools._deprecation_warningrsetuptools._importlibrrrr__annotations__PathLikerw_Pathdict _DictOrStr _CorrespFn_Correspondence getLoggerrrr+r"r#r0r3r6rhrmrzr}rrrrrrr1rDrrrrrrr4rCr@rYrK UserWarningrLrar<r*rs ######((((((%%%%%%%%""""""!!!!!!!!!!!!!!!!!!!!!!!!IHHHHH-......,,,,,,!!"%%w%%% bk3 49  ~sE2D8 9 Z( ' H % %.,.~.t.u...."2N2D2E2222& 6. 6 6 6 6 6)S)S)))) $n$S$$$$$    Bc Bhsm B B B B BN B Bu B B B B2>222222C.CtDzCeC3CCCC$++T++++<><<<<< //T////==d====  t     NTNN5NNNN&05Wc3s8m9L"&8E#t)4D+E1C1C1111QeC#,C&D!EQ#c(QQQQ R R R& wwX...77666 !3' 8 8$sO34   %i0QJJJ K ( ({-..;566k566''(9;UVV{-.. 13JKK##$9;VWW /00;566 K/ 0 0K//$$%=?QRR--.DFVWW$ F F F F F F F F F Fr<PK{5Z*ininFLib/site-packages/setuptools/config/__pycache__/expand.cpython-311.pycnuW+A b;d? (dZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z ddl m Z ddlmZddlmZmZmZmZmZmZmZmZmZmZmZmZddlmZdd lmZdd l m!Z!d d l"m#Z$erdd l%m&Z&ddl'm(Z(ddl)m*Z*ej+Z,ee-ej.fZ/edZ0eddZ1GddZ2 d@dee-dee/dee-fdZ3d@dee-e4ee/fde-fdZ5dee/dee/fdZ6dee4e/fde-fdZ7de/de-fdZ8 dAd e-d!eee-e-fdee/fd"Z9d#e-d$ee/de fd%Z:d&e d#e-defd'Z;d#e-d!eee-e-fde/dee/ee-e-ffd(Z< dAd)e-d!eee-e-fdee/defd*Z= dAd+ee-e-fd!eee-e-fdee/dee-effd,Z>dddd-d.eee-e-fdee/dee-fd/Z?d0e/d1e/de-fd2Z@d3eeeee-eAfe-fde-fd4ZBd5eCdeCfd6ZD d@d7eeEeCfdee/deee-ee-ffd8ZFdBd:e-dee-eCffd;ZGGd<d=ZHGd>d?ee0e1fZIdS)CaiUtility functions to expand configuration directives or special values (such glob patterns). We can split the process of interpreting configuration files into 2 steps: 1. The parsing the file contents from strings to value objects that can be understand by Python (for example a string with a comma separated list of keywords into an actual Python list of strings). 2. The expansion (or post-processing) of these values according to the semantics ``setuptools`` assign to them (for example a configuration field with the ``file:`` directive should be expanded from a list of file paths to a single string with the contents of those files concatenated) This module focus on the second step, and therefore allow sharing the expansion functions among several configuration file formats. **PRIVATE MODULE**: API reserved for setuptools internal usage only. N)iglob) ConfigParser) ModuleSpec)chain) TYPE_CHECKINGCallableDictIterableIteratorListMappingOptionalTupleTypeVarUnioncast)Path) ModuleType)DistutilsOptionError) same_path) Distribution)ConfigDiscovery)DistributionMetadata_K_VT) covariantcdeZdZdZdedefdZdeee j e j ffdZ dZ dS) StaticModulez>Proxy to a module object that avoids executing arbitrary code.namespecctjtj|j}t |t|` dSN) astparsepathlibrorigin read_bytesvarsupdatelocalsself)r,r r!modules gE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/config/expand.py__init__zStaticModule.__init__BsP7< 44??AABB T &((### IIIreturnc#K|jjD]gttjrfdjDEd{V6ttjrjrjjfVhdS)Nc3*K|] }|jfVdSr#value).0target statements r. z1StaticModule._find_assignments..Js*VV&VY_5VVVVVVr0) r-body isinstancer$Assigntargets AnnAssignr5r7)r,r8s @r._find_assignmentszStaticModule._find_assignmentsGs) : :I)SZ00 :VVVVIDUVVVVVVVVVVVIs}55 :)/ : '9999  : :r0c tfd|DS#t$r}t|jd|d}~wwxYw)zHAttempt to load an attribute "statically", via :func:`ast.literal_eval`.c3K|]@\}}t|tjr!|jk*tj|VAdSr#)r;r$Nameid literal_eval)r6r7r5attrs r.r9z+StaticModule.__getattr__..Qsa!FEfch//5;I4E4E ''4E4E4E4Er0z has no attribute N)nextr? ExceptionAttributeErrorr )r,rEes ` r. __getattr__zStaticModule.__getattr__Ns P%)%;%;%=%=   P P P DI!G!G!G!GHHa O Ps,0 AAAN) __name__ __module__ __qualname____doc__strrr/r rr$ASTr?rJr0r.rr?s~HHS  :8E#'372B,C#D:::: P P P P Pr0rpatternsroot_dirr1c hd}g}ptj|D]tfd|Dr{tjtj}|tfdt|dDtj  tj d}| ||S)aExpand the list of glob patterns, but preserving relative paths. :param list[str] patterns: List of glob patterns :param str root_dir: Path to which globs should be relative (current directory by default) :rtype: list >*{}?[]c3 K|]}|vV dSr#rQ)r6charr5s r.r9z glob_relative..js'99tu}999999r0c3K|]B}tj|tjdVCdS)/N)ospathrelpathreplacesepr6r`rSs r.r9z glob_relative..msY*>*>h//77DD*>*>*>*>*>*>r0T) recursiver^) r_getcwdanyr`abspathjoinextendsortedrrarbrcappend)rRrSglob_charactersexpanded_values glob_pathr`r5s ` @r. glob_relativerpZs!544OO&29;;H ) ) 9999999 9 9 ) Xu(E(EFFI  " "6*>*>*>*>!)t<<<*>*>*>$>$> ? ? ? ? 7??5(33;;BFCHHD  " "4 ( ( ( ( r0 filepathscddlm}tjptjfd||D}dfdt|DS)zReturn the content of the files concatenated using `` `` as str This function is sandboxed and won't reach anything outside ``root_dir`` (By default ``root_dir`` is the current directory). r)always_iterablec3XK|]$}tj|V%dSr#)r_r`rirds r.r9zread_files..s3VV4"',,x..VVVVVVr0 c3VK|]#}t|t|V$dSr#) _assert_local _read_filerds r.r9zread_files..sO  x ( (4r0) setuptools.extern.more_itertoolsrsr_r`rhrfri_filter_existing_files)rqrSrs _filepathss ` r. read_filesr|ysA@@@@@wx629;;77HVVVV??9;U;UVVVJ 99*:66  r0c#K|D]>}tj|r|V&tjd|d?dS)NzFile z cannot be found)r_r`isfilewarningswarn)rqr`s r.rzrzs_<< 7>>$   <JJJJ M:$::: ; ; ; ; < 1 1+{ K KD  89>++K88D |!+... Kr0r!ct|d|}|tjvrtj|Stj|}|tj|<|j||S)NrK)rsysmodulesrrmodule_from_specloader exec_module)r!rr r-s r.rrsi 4[ 1 1D s{{4  ^ , ,T 2 2FCKKF### Mr0c|}|d}|r|d|vr||d}|dd}t|dkr/tj||d}|d}n|}d|g|dd}n*d|vr&tj||d}tjj|g|dR}t |dtj|dft|d } td | Dd} || |fS) a0Given a module (that could normally be imported by ``module_name`` after the build is complete), find the path to the parent directory where it is contained and the canonical name that could be used to import it considering the ``package_dir`` in the build configuration and ``root_dir`` rrr^Nz.pyz __init__.pyz.*c3XK|]%}tj|!|V&dSr#)r_r`r~)r6xs r.r9z_find_module..s5CCa1B1BCCCCCCCr0) rrsplitlenr_r`rirrrF) rrrS parent_path module_parts custom_pathparts parent_module path_start candidatesrs r.rrsoK$$S))L B ?k ) )%l1o6K&&sA..E5zzA~~ gll8U1X>> %a + ((M#EL4D#EFFKK ;  ',,xRAAKkCK,=,=c,B,BCCCJ    RW\\*mDDE   JCC:CCCTJJK  [ 00r0qualified_class_namec |ptj}|d}||dzd}|d|}t|||\}}}t t |||} t | |S)z@Given a qualified class name, return the associated class objectrrN)r_rfrfindrrrr) rrrSidx class_namepkg_namerr`rr-s r. resolve_classrs &29;;H  $ $S ) )C%cAgii0J#DSD)H&28[(&S&S#L$  ;55{ C CF 6: & &&r0valuescHfd|DS)zGiven a dictionary mapping command names to strings for qualified class names, apply :func:`resolve_class` to the dict values. c:i|]\}}|t|SrQ)r)r6kvrrSs r. zcmdclass..s+ R R R41aA}Q X66 R R Rr0)items)rrrSs ``r.cmdclassr s, S R R R R6<<>> R R RRr0) namespacesfill_package_dirrSrc  ddlm}ddlm}m}|rddlm}nddlm}|p tj}| ddg}g} |in|}t||| t d kr9t fd d|fDr| d d D]} t|| } |j| fi|} | | | rX|d | ks?tj| |s||| | | S) aWorks similarly to :func:`setuptools.find_packages`, but with all arguments given as keyword arguments. Moreover, ``where`` can be given as a list (the results will be simply concatenated). When the additional keyword argument ``namespaces`` is ``True``, it will behave like :func:`setuptools.find_namespace_packages`` (i.e. include implicit namespaces as per :pep:`420`). The ``where`` argument will be considered relative to ``root_dir`` (or the current working directory when ``root_dir`` is not given). If the ``fill_package_dir`` argument is passed, this function will consider it as a similar data structure to the ``package_dir`` configuration parameter add fill-in any missing package location. :rtype: list r)construct_package_dir)unique_everseenrs)PEP420PackageFinder) PackageFinderwhererNrc3FK|]}td| VdS)rN) _same_path)r6rsearchs r.r9z find_packages..=s4VVJvay!$<$< <VVVVVVr0r)setuptools.discoveryrryrrsrrr_curdirrlistrall setdefault _nest_pathfindrjgetr`samefiler*)rrrSkwargsrrrsrrpackagesr` package_pathpkgsrs @r. find_packagesrs0;:::::QQQQQQQQ7MMMMMMM666666$29H JJw & &EH-5rr;K ////%"8"899 : :F 6{{aCVVVVsHoVVVVV##Bq 222GG!(D11 !}!,99&99  G   $ $ , ,w h77 -  # #$9$9$$E$E F F F Or0parentr`c|dvr|ntj||}tj|S)N>rr)r_r`rinormpath)rr`s r.rrMs;Y&&66BGLL,F,FD 7  D ! !!r0r5cBt|r |}ttttt f|}t |ts>t|dr)dtt|}nd|z}|S)z`When getting the version directly from an attribute, it should be normalised to string. __iter__rz%s) callablerr rrOintr;hasattrrimapr4s r.versionrRs %S/*E 2 2E eS ! !! 5* % % !HHSe__--EE5LE Lr0 package_datac>d|vr|d|d<|S)NrUr)r)rs r.canonic_package_datards+ l'++C00 R r0 data_filescrt|tr|Sfd|DS)zFor compatibility with ``setup.py``, ``data_files`` should be a list of pairs instead of a dict. This function also expands glob patterns. c:g|]\}}|t|fSrQ)rp)r6destrRrSs r. z&canonic_data_files..us<    D( }Xx001   r0)r;rr)rrSs `r.canonic_data_filesrjsT*d##    (..00   r0 entry-pointstextctdd}t|_|||d|D}||jd|S)a?Given the contents of entry-points file, process it into a 2-level dictionary (``dict[str, dict[str, str]]``). The first level keys are entry-point groups, the second level keys are entry-point names, and the second level values are references to objects (that correspond to the entry-point value). N)=)default_section delimiterscXi|]'\}}|t|(SrQ)dictr)r6rrs r.rz entry_points..s, < < >> def obtain_mapping(): ... print("Running expensive function!") ... return {"key": "value", "other key": "other value"} >>> mapping = LazyMappingProxy(obtain_mapping) >>> mapping["key"] Running expensive function! 'value' >>> mapping["other key"] 'other value' obtain_mapping_valuec"||_d|_dSr#)_obtain_value)r,rs r.r/zLazyMappingProxy.__init__s+ 15 r0r1cP|j||_|jSr#)rrrs r._targetzLazyMappingProxy._targets! ; ,,..DK{r0keyc6||Sr#)r)r,rs r. __getitem__zLazyMappingProxy.__getitem__s||~~c""r0cDt|Sr#)rrrs r.__len__zLazyMappingProxy.__len__s4<<>>"""r0cDt|Sr#)iterrrs r.rzLazyMappingProxy.__iter__sDLLNN###r0N)rKrLrMrNrr rrr/rr!rr#r rrQr0r.rrs  6Xb'"b&/6I-J6666R #r#b#########$(2,$$$$$$r0rr#)NN)r)JrNr$rrr_r&rrglobr configparserrimportlib.machineryr itertoolsrtypingrrr r r r r rrrrrrtypesrdistutils.errorsr_pathrrsetuptools.distrrrdistutils.distr from_iterable chain_iterrOPathLike_Pathrrrrpbytesr|rzrxrwrrrrrrrrrrrrrrrrrrQr0r.r5s&   %%%%%%******                            111111++++++4,,,,,,444444333333   c2; WT]] WTT"""PPPPPPPP8:>sm'/ #Y>%UHUO ;<PS$1JO1 5(3- $%1111H04 $ ' ' ''#s(+, 'uo ' ' ' ' '$04 $SS cNS'#s(+,SuoS #x- SSSS15 $ 333tCH~.3uo 3  #Y 3333l"u"E"c"""" 58E#s(O#>D,7?&&(((RIdHi1EFFH  * **r+rcNt||||S)z`Apply the configuration from a ``setup.cfg`` file into an existing distribution object. )r'_finalize_requires)r+r"s r.apply_configurationr3Ds+ 4 Kr0 other_filesr*) ConfigHandler.c(ddlm}tj|}tj|st d|ztj}tjtj |g||} | ||t||j |}| tj|n#tj|wxYw|S)zHRead configuration from ``filepath`` and applies to the ``dist`` object.r) _Distributionz%Configuration file %s does not exist.)r,)r*)r%r8ospathabspathisfilergetcwdchdirdirnameparse_config_filesparse_configurationcommand_options_finalize_license_files)r+r"r5r*r8current_directoryr,r-s r.r'r'Ms .-----wx((H 7>>( # #U !H8!STTT HRW__X & &'''(+(x(I$(((CCC& $&=Q    $$&&& "####"#### Os "AC99D target_objkeycdjdit}tjt||}t |||}|S)z Given a target object and option key, get that option from the target object, either through a get_{key} method or from an attribute directly. z get_{key}r4)formatlocals functoolsrgetattr)rErF getter_name by_attributegetters r. _get_optionrOjsP %+$00vxx00K$Wj#>>L Zl ; ;F 688Or0r-ctt}|D]1}|jD]'}t|j|}|||j|<(2|S)zReturns configuration data gathered by given handlers as a dict. :param list[ConfigHandler] handlers: Handlers list, usually from parse_configuration() :rtype: dict )rdict set_optionsrOrEsection_prefix)r- config_dicthandleroptionvalues r.r(r(vsk$D))K@@) @ @F 2F;;E:?K. / 7 7 @ r0 distributionrB)ConfigMetadataHandlerConfigOptionsHandlerc Btj|5}t||||}||js |j|_t |j||||j|j}|dddn #1swxYwY||fS)aPerforms additional parsing of configuration options for a distribution. Returns a list of used option handlers. :param Distribution distribution: :param dict command_options: :param bool ignore_option_errors: Whether to silently ignore options, values of which could not be resolved (e.g. due to exceptions in directives such as file:, attr:, etc.). If False exceptions are propagated as expected. :rtype: list N)rEnsurePackagesDiscoveredrZparse package_dirrYmetadatasrc_root)rXrBr*ensure_discoveredoptionsmetas r.rArAs$  ( 6 6:K&        ' ;'.':L $$  !    $  !    ), =sA1BBBlabel orig_valueparsedcDd|vst|dkrdStjt5d|}t |}|j)d|d|dd}tj|tddddS#1swxYwYdS) amBecause users sometimes misinterpret this configuration: [options.extras_require] foo = bar;python_version<"4" It looks like one requirement with an environment marker but because there is no newline, it's parsed as two requirements with a semicolon as separator. Therefore, if: * input string does not contain a newline AND * parsed result contains two requirements AND * parsing of the two parts from the result (";") leads in a valid Requirement with a valid marker a UserWarning is shown to inform the user about the possible problem.  N;z#One of the parsed requirements in `z*` looks like a valid environment marker: 'rz}' Make sure that the config is correct and check https://setuptools.pypa.io/en/latest/userguide/declarative_config.html#opt-2) len contextlibsuppressrjoinrmarkerwarningswarn UserWarning)rdrerforiginal_requirements_strreqmsgs r.%_warn_accidental_env_marker_misconfigrvs" zS[[A--  / 0 0 , ,$'HHV$4$4!344 : !_e__;A!9___  M#{ + + + , , , , , , , , , , , , , , , , , ,sABBBcReZdZUdZeed< iZeeefed< dede de j fdZ e dZd Zedd Zed Zed ZedZedefdZdefdZedZedZeddZdZdZdZdS)r6z1Handles metadata supplied in configuration files.rSaliasesrErbraci}|j}|D]I\}}||s||dd}|||<J||_||_||_g|_||_ dS)N.) rSitems startswithreplacestripr*rEsectionsrRra) selfrErbr*rarrS section_namesection_optionss r.__init__zConfigHandler.__init__s'),-4]]__ 5 5 )L/**>:: '//CCII#NNL%4H\ " "$8!$  &(!2r0c:td|jjz).Metadata item name to parser function mapping.z!%s must provide .parsers property)NotImplementedError __class____name__)rs r.parserszConfigHandler.parserss#" /$.2I I   r0ct}|j}|j||}t |||}||urt ||rdSd}|j|}|r' ||}n#t$r d}|jsYnwxYw|rdSt |d|zd}|t|||n |||j |dS)NFTzset_%s) tuplerErxgetrKKeyErrorr Exceptionr*setattrrRappend) r option_namerWunknownrE current_value skip_optionparsersetters r. __setitem__zConfigHandler.__setitem__s9''_ l&&{K@@  KAA G # #;'' '   F !!+..   u    " 0    FX %;TBB > J U 3 3 3 3 F5MMM  ,,,,,s8 BBB,ct|tr|Sd|vr|}n||}d|DS)zRepresents value as a list. Value is split either by separator (defaults to comma) or by lines. :param value: :param separator: List items separator character. :rtype: list rhc^g|]*}||+Sr4r).0chunks r. z-ConfigHandler._parse_list..:s-BBB%EKKMMB BBBr0) isinstancelist splitlinessplit)clsrW separators r. _parse_listzConfigHandler._parse_list(s\ eT " " L 5==$$&&EEKK **EBB5BBBBr0cd}i}||D]\}||\}}}||krtd|z|||<]|S)zPRepresents value as a dict. :param value: :rtype: dict =z(Unable to parse option value to dict: %s)r partitionrr)rrWrresultlinerFsepvals r. _parse_dictzConfigHandler._parse_dict<s OOE** . .D NN955MCci*>F#&))++F399;;   r0c2|}|dvS)zQRepresents value as boolean. :param value: :rtype: bool )1trueyes)lowerrrWs r. _parse_boolzConfigHandler._parse_boolOs ,,,r0cfd}|S)zReturns a parser function to make sure field inputs are not files. Parses a value after getting the key so error messages are more informative. :param key: :rtype: callable czd}||r"td|S)Nfile:zCOnly strings are accepted for the {0} field, files are not accepted)r} ValueErrorrH)rWexclude_directiverFs r.rz3ConfigHandler._exclude_files_parser..parseresI '  122  --3VC[[Lr0r4)rrFrs ` r._exclude_files_parserz#ConfigHandler._exclude_files_parserYs#      r0root_dircd}t|ts|S||s|S|t|d}d|dD}t j||S)aORepresents value as a string, allowing including text from nearest files using `file:` directive. Directive is sandboxed and won't reach anything outside directory with setup.py. Examples: file: README.rst, CHANGELOG.md, src/file.txt :param str value: :rtype: str rNc3>K|]}|VdSNr)rr:s r. z,ConfigHandler._parse_file..s*>>dTZZ\\>>>>>>r0r)rrr}rkrr read_files)rrWrinclude_directivespec filepathss r. _parse_filezConfigHandler._parse_fileps$%%% L 122 LS*++--.>>djjoo>>>  H555r0cd}||s|S||d}||jjt j|||S)zRepresents value as a module attribute. Examples: attr: package.attr attr: package.module.attr :param str value: :rtype: str zattr:rz)r}r~updaterar^r read_attr)rrWr^rattr_directive attr_descs r. _parse_attrzConfigHandler._parse_attrsh!// LMM."55  41=>>> ;AAAr0cfd}|S)zReturns parser function to represents value as a list. Parses a value applying given methods one after another. :param parse_methods: :rtype: callable c,|}D] }||}|Srr4)rWrfmethod parse_methodss r.r]z1ConfigHandler._get_parser_compound..parses+F' ( (Mr0r4)rrr]s ` r._get_parser_compoundz"ConfigHandler._get_parser_compounds#      r0cbi}|D]\}\}}|||||<|S)aParses section options into a dictionary. Applies a given parser to each option in a section. :param dict section_options: :param callable values_parser: function with 2 args corresponding to key, value :rtype: dict )r|)rr values_parserrWrF_rs r._parse_section_to_dict_with_keyz-ConfigHandler._parse_section_to_dict_with_keysH,2244 1 1MC!S&sC00E#JJ r0NcDrfdnd}|||S)aParses section options into a dictionary. Optionally applies a given parser to each value. :param dict section_options: :param callable values_parser: function with 1 arg corresponding to option value :rtype: dict c|Srr4)rvrs r.z6ConfigHandler._parse_section_to_dict..s}}Q//r0c|Srr4)rrs r.rz6ConfigHandler._parse_section_to_dict..sUVr0r)rrrrs ` r._parse_section_to_dictz$ConfigHandler._parse_section_to_dicts75BW/////22?FKKKr0c|D]>\}\}}tjt5|||<dddn #1swxYwY?dS)zQParses configuration file section. :param dict section_options: N)r|rlrmr)rrnamerrWs r. parse_sectionzConfigHandler.parse_sections #2"7"7"9"9 # # T:Au$X.. # #"T  # # # # # # # # # # # # # # # # #sAA A c|jD]^\}}d}|rd|z}t|d|zddd}|t d|jd|d||_dS) zTParses configuration file items from one or more related sections. rzz_%szparse_section%sr{__Nz*Unsupported distribution option section: [])rr|rKr~rrS)rrrmethod_postfixsection_parser_methods r.r]zConfigHandler.parses .2]-@-@-B-B 3 3 )L/N 6!&!58?"^3<tj|i|Sr)rprq)argskwargsfuncru warning_classs r.config_handlerz@ConfigHandler._deprecated_config_handler..config_handlers* M#} - - -4((( (r0r)rrrurrs ``` r._deprecated_config_handlerz(ConfigHandler._deprecated_config_handlersB t ) ) ) ) ) )  )r0)rr)r __module__ __qualname____doc__r__annotations__rxr r AllCommandOptionsrr\rpropertyrr classmethodrrrr_Pathrrrrrrr]rr4r0r.r6r6s;; !GT#s(^    33#3 ": 3333.  X $-$-$-LCCC[C&[$--[-[,6%666[62BBBBB([&  [  L L L[ L###3334     r0r6c eZdZdZdddddZdZ dejfd d d ed e d e j de e def fd ZedZdZxZS)rYr_url description classifiers platforms) home_pagesummary classifierplatformFNrErrbr*rar^rclt||||||_||_dSr)superrr^r)rrErbr*rar^rrs r.rzConfigMetadataHandler.__init__s8 W.BDUVVV&  r0c@|j}t|j|j}|j}|j}|||||dt|||||d||ddt||||j |d S)rrz[The requires parameter is deprecated, please use install_requires for runtime dependencies.license license_filezDThe license_file parameter is deprecated, use license_files instead.) rkeywordsprovidesrequires obsoletesrrr license_filesrlong_descriptionversion project_urls) rrrrrrrrr_parse_version)r parse_list parse_file parse_dictexclude_files_parsers r.rzConfigMetadataHandler.parsers s% T- FFF % #9$""77=,  $44ZLL++I66 ;;$$^44-,  (% **&/   r0c d|||j}||kr]|} t|n6#t$r)d}t |jditwxYw|Stj | ||j |jS)zSParses `version` option value. :param value: :rtype: str zCVersion loaded from {value} does not comply with PEP 440: {version}r4) rrrrrrrHrIrr rr^)rrWr tmpls r.r z$ConfigMetadataHandler._parse_versionBs""5$-88 e  mmooG D    ! D D D5+;4;+B+B+B+BCCC  DN~d..ud6F VVWWWs A3A:)rrrrSrx strict_moder9curdirrboolrr\rrQrrrrr  __classcell__rs@r.rYrYsN # GK'+) ! !* !# !# ! ": ! d^ ! ! ! ! ! ! !  X BXXXXXXXr0rYrceZdZdZdddededejffd Ze dZ dZ d e d e fd Z ed Zd ZdZdZdZdZdZdZdZdZxZS)rZrbrErr*racvt|||||j|_i|_dSr)rrr`rr^)rrErbr*rars r.rzConfigOptionsHandler.__init__as= W.BDUVVV"+ +-r0c0||dS)Nrj)r)rrs r._parse_list_semicolonz*ConfigOptionsHandler._parse_list_semicolonlsu444r0c:|||jS)Nr)rr)rrWs r._parse_file_in_rootz(ConfigOptionsHandler._parse_file_in_rootps >>>r0rdrWc|||}t|||d|DS)Nc<g|]}|d|S)#)r})rrs r.rzAConfigOptionsHandler._parse_requirements_list..ys)DDDts/C/CDDDDr0)rrrv)rrdrWrfs r._parse_requirements_listz-ConfigOptionsHandler._parse_requirements_listssL++D,D,DU,K,KLL-eUFCCCEDDDDDr0c|j}|j}|j}|j}||||||||dt t |jd|j|j|j |j |t|dS)rzeThe namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).install_requires)zip_safeinclude_package_datar^scriptseager_resourcesdependency_linksnamespace_packagesr"setup_requires tests_requirepackages entry_points py_modulespython_requirescmdclass) rrr_parse_cmdclassrrrr r_parse_packagesrr)rr  parse_boolrparse_cmdclasss r.rzConfigOptionsHandler.parsers{s% % % -#$.%!) *"&"A"AH, ## !(-/A!!#8!7, 4$+&-   r0cv|jj}tj||||jSr)rar^rr/rr)rrWr^s r.r0z$ConfigOptionsHandler._parse_cmdclasss1,8 t//66 T]SSSr0c:ddg}|}||vr||S||jdi}|||dk|j|jtj di|S)zTParses `packages` option value. :param value: :rtype: list zfind:zfind_namespace:z packages.findr) namespacesrfill_package_dirr4) rrparse_section_packages__findrrrrr^r find_packages)rrWfind_directives trimmed_value find_kwargss r.r1z$ConfigOptionsHandler._parse_packagess #$56  / /##E** *77 M  or 2 2   %);;]!-    #22k222r0c|||j}gdtfd|D}|d}| |d|d<|S)zParses `packages.find` configuration file section. To be used in conjunction with _parse_packages(). :param dict section_options: )whereincludeexcludec*g|]\}}|v | ||fSr4r4)rkr valid_keyss r.rzEConfigOptionsHandler.parse_section_packages__find..s* N N N1ZAaVr0r>Nr)rrrQr|r)rr section_datar<r>rCs @r.r8z1ConfigOptionsHandler.parse_section_packages__finds22?DDTUU 444  N N N N 2 2 4 4 N N N  ((  #(8K r0cF|||j}||d<dS)z`Parses `entry_points` configuration file section. :param dict section_options: r,N)rrrrrfs r.parse_section_entry_pointsz/ConfigOptionsHandler.parse_section_entry_pointss, ,,_d>NOO%^r0c`|||j}tj|Sr)rrrcanonic_package_data)rr package_datas r._parse_package_dataz(ConfigOptionsHandler._parse_package_datas+22?DDTUU *<888r0c6|||d<dS)z`Parses `package_data` configuration file section. :param dict section_options: rJNrKrrs r.parse_section_package_dataz/ConfigOptionsHandler.parse_section_package_datas" $77HH^r0c6|||d<dS)zhParses `exclude_package_data` configuration file section. :param dict section_options: exclude_package_dataNrMrNs r."parse_section_exclude_package_dataz7ConfigOptionsHandler.parse_section_exclude_package_datas# (,'?'?'P'P #$$$r0cD|fd}|d<dS)zbParses `extras_require` configuration file section. :param dict section_options: c8d|d|S)Nzextras_require[r)r )rBrrs r.rzCConfigOptionsHandler.parse_section_extras_require..s#667M7M7M7MqQQr0extras_requireNrrFs` r.parse_section_extras_requirez1ConfigOptionsHandler.parse_section_extras_requires< 55  Q Q Q Q   "( r0cv|||j}tj||j|d<dS)z^Parses `data_files` configuration file section. :param dict section_options: data_filesN)rrrcanonic_data_filesrrFs r.parse_section_data_filesz-ConfigOptionsHandler.parse_section_data_filess; ,,_d>NOO#6vt}MM\r0)rrrrSrrrr\rrrrrr rrr0r1r8rGrKrOrRrVrZrrs@r.rZrZ]spN ." .# .# . ": . . . . . .55[5???EcE#EEEE  X @TTT3332*&&&999IIIQQQ ( ( (NNNNNNNr0rZ)FF)r4F)F);rr9rlrJrp collectionsrrrtypingrrr r r r r rrrrdistutils.errorsrr(setuptools.extern.packaging.requirementsrr#setuptools.extern.packaging.versionrr&setuptools.extern.packaging.specifiersrsetuptools._deprecation_warningrrzrr%rdistutils.distrrPathLikerSingleCommandOptionsrr rQr/r3rr'rOr(rArrvr6rYrZr4r0r.res'  ######55555555555555555555555555FEEEEEEETTTTTTTTGGGGGGGG??????HHHHHH4,,,,,,333333 c2;E5#445  445 'M!N O O O +++ ++++8n.$&!& $)%  : F     E*>$?D*(( (&( :; ((((V,,#,t,,,,BkkkkkGFOkkk\ XXXXXXXXXXM*@AXXXXXXv]N]N]N]N]N=8]N]N]N]N]Nr0PK{5Z* aa/Lib/site-packages/setuptools/config/__init__.pynuW+A"""For backward compatibility, expose main functions from ``setuptools.config.setupcfg`` """ import warnings from functools import wraps from textwrap import dedent from typing import Callable, TypeVar, cast from .._deprecation_warning import SetuptoolsDeprecationWarning from . import setupcfg Fn = TypeVar("Fn", bound=Callable) __all__ = ('parse_configuration', 'read_configuration') def _deprecation_notice(fn: Fn) -> Fn: @wraps(fn) def _wrapper(*args, **kwargs): msg = f"""\ As setuptools moves its configuration towards `pyproject.toml`, `{__name__}.{fn.__name__}` became deprecated. For the time being, you can use the `{setupcfg.__name__}` module to access a backward compatible API, but this module is provisional and might be removed in the future. """ warnings.warn(dedent(msg), SetuptoolsDeprecationWarning, stacklevel=2) return fn(*args, **kwargs) return cast(Fn, _wrapper) read_configuration = _deprecation_notice(setupcfg.read_configuration) parse_configuration = _deprecation_notice(setupcfg.parse_configuration) PK{5ZfLLULib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_validations.pynuW+A# noqa # type: ignore # flake8: noqa # pylint: skip-file # mypy: ignore-errors # yapf: disable # pylama:skip=1 # *** PLEASE DO NOT MODIFY DIRECTLY: Automatically generated code *** VERSION = "2.15.3" import re from .fastjsonschema_exceptions import JsonSchemaValueException REGEX_PATTERNS = { '^.*$': re.compile('^.*$'), '.+': re.compile('.+'), '^.+$': re.compile('^.+$'), 'idn-email_re_pattern': re.compile('^[^@]+@[^@]+\\.[^@]+\\Z') } NoneType = type(None) def validate(data, custom_formats={}, name_prefix=None): validate_https___packaging_python_org_en_latest_specifications_declaring_build_dependencies(data, custom_formats, (name_prefix or "data") + "") return data def validate_https___packaging_python_org_en_latest_specifications_declaring_build_dependencies(data, custom_formats={}, name_prefix=None): if not isinstance(data, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-build-dependencies/', 'title': 'Data structure for ``pyproject.toml`` files', '$$description': ['File format containing build-time configurations for the Python ecosystem. ', ':pep:`517` initially defined a build-system independent format for source trees', 'which was complemented by :pep:`518` to provide a way of specifying dependencies ', 'for building Python projects.', 'Please notice the ``project`` table (as initially defined in :pep:`621`) is not included', 'in this schema and should be considered separately.'], 'type': 'object', 'additionalProperties': False, 'properties': {'build-system': {'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points `_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points `_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, 'tool': {'type': 'object', 'properties': {'distutils': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://docs.python.org/3/install/', 'title': '``tool.distutils`` table', '$$description': ['Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` scripts via `distutils configuration files', '`_.', '``tool.distutils`` subtables could be used with the same purpose', '(NOT CURRENTLY IMPLEMENTED).'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, 'setuptools': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://setuptools.pypa.io/en/latest/references/keywords.html', 'title': '``tool.setuptools`` table', '$$description': ['Please notice for the time being the ``setuptools`` project does not specify', 'a way of configuring builds via ``pyproject.toml``.', 'Therefore this schema should be taken just as a *"thought experiment"* on how', 'this *might be done*, by following the principles established in', '`ini2toml `_.', 'It considers only ``setuptools`` `parameters', '`_', 'that can currently be configured via ``setup.cfg`` and are not covered by :pep:`621`', 'but intentionally excludes ``dependency_links`` and ``setup_requires``.', 'NOTE: ``scripts`` was renamed to ``script-files`` to avoid confusion with', 'entry-point based scripts (defined in :pep:`621`).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'description': 'Whether the project can be safely installed and run from a zip file.', 'type': 'boolean'}, 'script-files': {'description': 'Legacy way of defining scripts (entry-points are preferred).', 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}}, {'$ref': '#/definitions/find-directive'}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': ''}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'data-files': {'$$description': ['**DEPRECATED**: dict-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', "Please notice this don't work with wheels. See `data files support", '`_'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', ' cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['PROVISIONAL: List of glob patterns for all license files being distributed.', '(might become standard with PEP 639).'], 'default': ['LICEN[CS]E*', ' COPYING*', ' NOTICE*', 'AUTHORS*'], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'$ref': '#/definitions/attr-directive'}, {'$ref': '#/definitions/file-directive'}]}, 'classifiers': {'$ref': '#/definitions/file-directive'}, 'description': {'$ref': '#/definitions/file-directive'}, 'dependencies': {'$ref': '#/definitions/file-directive'}, 'entry-points': {'$ref': '#/definitions/file-directive'}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$ref': '#/definitions/file-directive'}}}, 'readme': {'anyOf': [{'$ref': '#/definitions/file-directive'}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}}, 'definitions': {'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}}}}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points `_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points `_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='type') data_is_dict = isinstance(data, dict) if data_is_dict: data_keys = set(data.keys()) if "build-system" in data_keys: data_keys.remove("build-system") data__buildsystem = data["build-system"] if not isinstance(data__buildsystem, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system must be object", value=data__buildsystem, name="" + (name_prefix or "data") + ".build-system", definition={'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, rule='type') data__buildsystem_is_dict = isinstance(data__buildsystem, dict) if data__buildsystem_is_dict: data__buildsystem_len = len(data__buildsystem) if not all(prop in data__buildsystem for prop in ['requires']): raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system must contain ['requires'] properties", value=data__buildsystem, name="" + (name_prefix or "data") + ".build-system", definition={'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, rule='required') data__buildsystem_keys = set(data__buildsystem.keys()) if "requires" in data__buildsystem_keys: data__buildsystem_keys.remove("requires") data__buildsystem__requires = data__buildsystem["requires"] if not isinstance(data__buildsystem__requires, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.requires must be array", value=data__buildsystem__requires, name="" + (name_prefix or "data") + ".build-system.requires", definition={'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, rule='type') data__buildsystem__requires_is_list = isinstance(data__buildsystem__requires, (list, tuple)) if data__buildsystem__requires_is_list: data__buildsystem__requires_len = len(data__buildsystem__requires) for data__buildsystem__requires_x, data__buildsystem__requires_item in enumerate(data__buildsystem__requires): if not isinstance(data__buildsystem__requires_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.requires[{data__buildsystem__requires_x}]".format(**locals()) + " must be string", value=data__buildsystem__requires_item, name="" + (name_prefix or "data") + ".build-system.requires[{data__buildsystem__requires_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') if "build-backend" in data__buildsystem_keys: data__buildsystem_keys.remove("build-backend") data__buildsystem__buildbackend = data__buildsystem["build-backend"] if not isinstance(data__buildsystem__buildbackend, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.build-backend must be string", value=data__buildsystem__buildbackend, name="" + (name_prefix or "data") + ".build-system.build-backend", definition={'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, rule='type') if isinstance(data__buildsystem__buildbackend, str): if not custom_formats["pep517-backend-reference"](data__buildsystem__buildbackend): raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.build-backend must be pep517-backend-reference", value=data__buildsystem__buildbackend, name="" + (name_prefix or "data") + ".build-system.build-backend", definition={'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, rule='format') if "backend-path" in data__buildsystem_keys: data__buildsystem_keys.remove("backend-path") data__buildsystem__backendpath = data__buildsystem["backend-path"] if not isinstance(data__buildsystem__backendpath, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.backend-path must be array", value=data__buildsystem__backendpath, name="" + (name_prefix or "data") + ".build-system.backend-path", definition={'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}, rule='type') data__buildsystem__backendpath_is_list = isinstance(data__buildsystem__backendpath, (list, tuple)) if data__buildsystem__backendpath_is_list: data__buildsystem__backendpath_len = len(data__buildsystem__backendpath) for data__buildsystem__backendpath_x, data__buildsystem__backendpath_item in enumerate(data__buildsystem__backendpath): if not isinstance(data__buildsystem__backendpath_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.backend-path[{data__buildsystem__backendpath_x}]".format(**locals()) + " must be string", value=data__buildsystem__backendpath_item, name="" + (name_prefix or "data") + ".build-system.backend-path[{data__buildsystem__backendpath_x}]".format(**locals()) + "", definition={'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}, rule='type') if data__buildsystem_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system must not contain "+str(data__buildsystem_keys)+" properties", value=data__buildsystem, name="" + (name_prefix or "data") + ".build-system", definition={'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, rule='additionalProperties') if "project" in data_keys: data_keys.remove("project") data__project = data["project"] validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata(data__project, custom_formats, (name_prefix or "data") + ".project") if "tool" in data_keys: data_keys.remove("tool") data__tool = data["tool"] if not isinstance(data__tool, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".tool must be object", value=data__tool, name="" + (name_prefix or "data") + ".tool", definition={'type': 'object', 'properties': {'distutils': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://docs.python.org/3/install/', 'title': '``tool.distutils`` table', '$$description': ['Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` scripts via `distutils configuration files', '`_.', '``tool.distutils`` subtables could be used with the same purpose', '(NOT CURRENTLY IMPLEMENTED).'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, 'setuptools': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://setuptools.pypa.io/en/latest/references/keywords.html', 'title': '``tool.setuptools`` table', '$$description': ['Please notice for the time being the ``setuptools`` project does not specify', 'a way of configuring builds via ``pyproject.toml``.', 'Therefore this schema should be taken just as a *"thought experiment"* on how', 'this *might be done*, by following the principles established in', '`ini2toml `_.', 'It considers only ``setuptools`` `parameters', '`_', 'that can currently be configured via ``setup.cfg`` and are not covered by :pep:`621`', 'but intentionally excludes ``dependency_links`` and ``setup_requires``.', 'NOTE: ``scripts`` was renamed to ``script-files`` to avoid confusion with', 'entry-point based scripts (defined in :pep:`621`).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'description': 'Whether the project can be safely installed and run from a zip file.', 'type': 'boolean'}, 'script-files': {'description': 'Legacy way of defining scripts (entry-points are preferred).', 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}}, {'$ref': '#/definitions/find-directive'}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': ''}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'data-files': {'$$description': ['**DEPRECATED**: dict-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', "Please notice this don't work with wheels. See `data files support", '`_'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', ' cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['PROVISIONAL: List of glob patterns for all license files being distributed.', '(might become standard with PEP 639).'], 'default': ['LICEN[CS]E*', ' COPYING*', ' NOTICE*', 'AUTHORS*'], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'$ref': '#/definitions/attr-directive'}, {'$ref': '#/definitions/file-directive'}]}, 'classifiers': {'$ref': '#/definitions/file-directive'}, 'description': {'$ref': '#/definitions/file-directive'}, 'dependencies': {'$ref': '#/definitions/file-directive'}, 'entry-points': {'$ref': '#/definitions/file-directive'}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$ref': '#/definitions/file-directive'}}}, 'readme': {'anyOf': [{'$ref': '#/definitions/file-directive'}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}}, 'definitions': {'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}}}, rule='type') data__tool_is_dict = isinstance(data__tool, dict) if data__tool_is_dict: data__tool_keys = set(data__tool.keys()) if "distutils" in data__tool_keys: data__tool_keys.remove("distutils") data__tool__distutils = data__tool["distutils"] validate_https___docs_python_org_3_install(data__tool__distutils, custom_formats, (name_prefix or "data") + ".tool.distutils") if "setuptools" in data__tool_keys: data__tool_keys.remove("setuptools") data__tool__setuptools = data__tool["setuptools"] validate_https___setuptools_pypa_io_en_latest_references_keywords_html(data__tool__setuptools, custom_formats, (name_prefix or "data") + ".tool.setuptools") if data_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-build-dependencies/', 'title': 'Data structure for ``pyproject.toml`` files', '$$description': ['File format containing build-time configurations for the Python ecosystem. ', ':pep:`517` initially defined a build-system independent format for source trees', 'which was complemented by :pep:`518` to provide a way of specifying dependencies ', 'for building Python projects.', 'Please notice the ``project`` table (as initially defined in :pep:`621`) is not included', 'in this schema and should be considered separately.'], 'type': 'object', 'additionalProperties': False, 'properties': {'build-system': {'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points `_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points `_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, 'tool': {'type': 'object', 'properties': {'distutils': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://docs.python.org/3/install/', 'title': '``tool.distutils`` table', '$$description': ['Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` scripts via `distutils configuration files', '`_.', '``tool.distutils`` subtables could be used with the same purpose', '(NOT CURRENTLY IMPLEMENTED).'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, 'setuptools': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://setuptools.pypa.io/en/latest/references/keywords.html', 'title': '``tool.setuptools`` table', '$$description': ['Please notice for the time being the ``setuptools`` project does not specify', 'a way of configuring builds via ``pyproject.toml``.', 'Therefore this schema should be taken just as a *"thought experiment"* on how', 'this *might be done*, by following the principles established in', '`ini2toml `_.', 'It considers only ``setuptools`` `parameters', '`_', 'that can currently be configured via ``setup.cfg`` and are not covered by :pep:`621`', 'but intentionally excludes ``dependency_links`` and ``setup_requires``.', 'NOTE: ``scripts`` was renamed to ``script-files`` to avoid confusion with', 'entry-point based scripts (defined in :pep:`621`).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'description': 'Whether the project can be safely installed and run from a zip file.', 'type': 'boolean'}, 'script-files': {'description': 'Legacy way of defining scripts (entry-points are preferred).', 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}}, {'$ref': '#/definitions/find-directive'}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': ''}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'data-files': {'$$description': ['**DEPRECATED**: dict-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', "Please notice this don't work with wheels. See `data files support", '`_'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', ' cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['PROVISIONAL: List of glob patterns for all license files being distributed.', '(might become standard with PEP 639).'], 'default': ['LICEN[CS]E*', ' COPYING*', ' NOTICE*', 'AUTHORS*'], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'$ref': '#/definitions/attr-directive'}, {'$ref': '#/definitions/file-directive'}]}, 'classifiers': {'$ref': '#/definitions/file-directive'}, 'description': {'$ref': '#/definitions/file-directive'}, 'dependencies': {'$ref': '#/definitions/file-directive'}, 'entry-points': {'$ref': '#/definitions/file-directive'}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$ref': '#/definitions/file-directive'}}}, 'readme': {'anyOf': [{'$ref': '#/definitions/file-directive'}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}}, 'definitions': {'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}}}}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points `_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points `_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='additionalProperties') return data def validate_https___setuptools_pypa_io_en_latest_references_keywords_html(data, custom_formats={}, name_prefix=None): if not isinstance(data, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://setuptools.pypa.io/en/latest/references/keywords.html', 'title': '``tool.setuptools`` table', '$$description': ['Please notice for the time being the ``setuptools`` project does not specify', 'a way of configuring builds via ``pyproject.toml``.', 'Therefore this schema should be taken just as a *"thought experiment"* on how', 'this *might be done*, by following the principles established in', '`ini2toml `_.', 'It considers only ``setuptools`` `parameters', '`_', 'that can currently be configured via ``setup.cfg`` and are not covered by :pep:`621`', 'but intentionally excludes ``dependency_links`` and ``setup_requires``.', 'NOTE: ``scripts`` was renamed to ``script-files`` to avoid confusion with', 'entry-point based scripts (defined in :pep:`621`).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'description': 'Whether the project can be safely installed and run from a zip file.', 'type': 'boolean'}, 'script-files': {'description': 'Legacy way of defining scripts (entry-points are preferred).', 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}}, {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': ''}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'data-files': {'$$description': ['**DEPRECATED**: dict-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', "Please notice this don't work with wheels. See `data files support", '`_'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', ' cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['PROVISIONAL: List of glob patterns for all license files being distributed.', '(might become standard with PEP 639).'], 'default': ['LICEN[CS]E*', ' COPYING*', ' NOTICE*', 'AUTHORS*'], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, 'readme': {'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}}, 'definitions': {'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}, rule='type') data_is_dict = isinstance(data, dict) if data_is_dict: data_keys = set(data.keys()) if "platforms" in data_keys: data_keys.remove("platforms") data__platforms = data["platforms"] if not isinstance(data__platforms, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".platforms must be array", value=data__platforms, name="" + (name_prefix or "data") + ".platforms", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') data__platforms_is_list = isinstance(data__platforms, (list, tuple)) if data__platforms_is_list: data__platforms_len = len(data__platforms) for data__platforms_x, data__platforms_item in enumerate(data__platforms): if not isinstance(data__platforms_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".platforms[{data__platforms_x}]".format(**locals()) + " must be string", value=data__platforms_item, name="" + (name_prefix or "data") + ".platforms[{data__platforms_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') if "provides" in data_keys: data_keys.remove("provides") data__provides = data["provides"] if not isinstance(data__provides, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".provides must be array", value=data__provides, name="" + (name_prefix or "data") + ".provides", definition={'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, rule='type') data__provides_is_list = isinstance(data__provides, (list, tuple)) if data__provides_is_list: data__provides_len = len(data__provides) for data__provides_x, data__provides_item in enumerate(data__provides): if not isinstance(data__provides_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + " must be string", value=data__provides_item, name="" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='type') if isinstance(data__provides_item, str): if not custom_formats["pep508-identifier"](data__provides_item): raise JsonSchemaValueException("" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + " must be pep508-identifier", value=data__provides_item, name="" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='format') if "obsoletes" in data_keys: data_keys.remove("obsoletes") data__obsoletes = data["obsoletes"] if not isinstance(data__obsoletes, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".obsoletes must be array", value=data__obsoletes, name="" + (name_prefix or "data") + ".obsoletes", definition={'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, rule='type') data__obsoletes_is_list = isinstance(data__obsoletes, (list, tuple)) if data__obsoletes_is_list: data__obsoletes_len = len(data__obsoletes) for data__obsoletes_x, data__obsoletes_item in enumerate(data__obsoletes): if not isinstance(data__obsoletes_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + " must be string", value=data__obsoletes_item, name="" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='type') if isinstance(data__obsoletes_item, str): if not custom_formats["pep508-identifier"](data__obsoletes_item): raise JsonSchemaValueException("" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + " must be pep508-identifier", value=data__obsoletes_item, name="" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='format') if "zip-safe" in data_keys: data_keys.remove("zip-safe") data__zipsafe = data["zip-safe"] if not isinstance(data__zipsafe, (bool)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".zip-safe must be boolean", value=data__zipsafe, name="" + (name_prefix or "data") + ".zip-safe", definition={'description': 'Whether the project can be safely installed and run from a zip file.', 'type': 'boolean'}, rule='type') if "script-files" in data_keys: data_keys.remove("script-files") data__scriptfiles = data["script-files"] if not isinstance(data__scriptfiles, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".script-files must be array", value=data__scriptfiles, name="" + (name_prefix or "data") + ".script-files", definition={'description': 'Legacy way of defining scripts (entry-points are preferred).', 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, rule='type') data__scriptfiles_is_list = isinstance(data__scriptfiles, (list, tuple)) if data__scriptfiles_is_list: data__scriptfiles_len = len(data__scriptfiles) for data__scriptfiles_x, data__scriptfiles_item in enumerate(data__scriptfiles): if not isinstance(data__scriptfiles_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".script-files[{data__scriptfiles_x}]".format(**locals()) + " must be string", value=data__scriptfiles_item, name="" + (name_prefix or "data") + ".script-files[{data__scriptfiles_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') if "eager-resources" in data_keys: data_keys.remove("eager-resources") data__eagerresources = data["eager-resources"] if not isinstance(data__eagerresources, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".eager-resources must be array", value=data__eagerresources, name="" + (name_prefix or "data") + ".eager-resources", definition={'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.'], 'type': 'array', 'items': {'type': 'string'}}, rule='type') data__eagerresources_is_list = isinstance(data__eagerresources, (list, tuple)) if data__eagerresources_is_list: data__eagerresources_len = len(data__eagerresources) for data__eagerresources_x, data__eagerresources_item in enumerate(data__eagerresources): if not isinstance(data__eagerresources_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".eager-resources[{data__eagerresources_x}]".format(**locals()) + " must be string", value=data__eagerresources_item, name="" + (name_prefix or "data") + ".eager-resources[{data__eagerresources_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') if "packages" in data_keys: data_keys.remove("packages") data__packages = data["packages"] data__packages_one_of_count1 = 0 if data__packages_one_of_count1 < 2: try: if not isinstance(data__packages, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".packages must be array", value=data__packages, name="" + (name_prefix or "data") + ".packages", definition={'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}}, rule='type') data__packages_is_list = isinstance(data__packages, (list, tuple)) if data__packages_is_list: data__packages_len = len(data__packages) for data__packages_x, data__packages_item in enumerate(data__packages): if not isinstance(data__packages_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".packages[{data__packages_x}]".format(**locals()) + " must be string", value=data__packages_item, name="" + (name_prefix or "data") + ".packages[{data__packages_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name'}, rule='type') if isinstance(data__packages_item, str): if not custom_formats["python-module-name"](data__packages_item): raise JsonSchemaValueException("" + (name_prefix or "data") + ".packages[{data__packages_x}]".format(**locals()) + " must be python-module-name", value=data__packages_item, name="" + (name_prefix or "data") + ".packages[{data__packages_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name'}, rule='format') data__packages_one_of_count1 += 1 except JsonSchemaValueException: pass if data__packages_one_of_count1 < 2: try: validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_find_directive(data__packages, custom_formats, (name_prefix or "data") + ".packages") data__packages_one_of_count1 += 1 except JsonSchemaValueException: pass if data__packages_one_of_count1 != 1: raise JsonSchemaValueException("" + (name_prefix or "data") + ".packages must be valid exactly by one definition" + (" (" + str(data__packages_one_of_count1) + " matches found)"), value=data__packages, name="" + (name_prefix or "data") + ".packages", definition={'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}}, {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}]}, rule='oneOf') if "package-dir" in data_keys: data_keys.remove("package-dir") data__packagedir = data["package-dir"] if not isinstance(data__packagedir, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be object", value=data__packagedir, name="" + (name_prefix or "data") + ".package-dir", definition={'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': ''}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, rule='type') data__packagedir_is_dict = isinstance(data__packagedir, dict) if data__packagedir_is_dict: data__packagedir_keys = set(data__packagedir.keys()) for data__packagedir_key, data__packagedir_val in data__packagedir.items(): if REGEX_PATTERNS['^.*$'].search(data__packagedir_key): if data__packagedir_key in data__packagedir_keys: data__packagedir_keys.remove(data__packagedir_key) if not isinstance(data__packagedir_val, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir.{data__packagedir_key}".format(**locals()) + " must be string", value=data__packagedir_val, name="" + (name_prefix or "data") + ".package-dir.{data__packagedir_key}".format(**locals()) + "", definition={'type': 'string'}, rule='type') if data__packagedir_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must not contain "+str(data__packagedir_keys)+" properties", value=data__packagedir, name="" + (name_prefix or "data") + ".package-dir", definition={'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': ''}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, rule='additionalProperties') data__packagedir_len = len(data__packagedir) if data__packagedir_len != 0: data__packagedir_property_names = True for data__packagedir_key in data__packagedir: try: data__packagedir_key_one_of_count2 = 0 if data__packagedir_key_one_of_count2 < 2: try: if isinstance(data__packagedir_key, str): if not custom_formats["python-module-name"](data__packagedir_key): raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be python-module-name", value=data__packagedir_key, name="" + (name_prefix or "data") + ".package-dir", definition={'format': 'python-module-name'}, rule='format') data__packagedir_key_one_of_count2 += 1 except JsonSchemaValueException: pass if data__packagedir_key_one_of_count2 < 2: try: if data__packagedir_key != "": raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be same as const definition: ", value=data__packagedir_key, name="" + (name_prefix or "data") + ".package-dir", definition={'const': ''}, rule='const') data__packagedir_key_one_of_count2 += 1 except JsonSchemaValueException: pass if data__packagedir_key_one_of_count2 != 1: raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be valid exactly by one definition" + (" (" + str(data__packagedir_key_one_of_count2) + " matches found)"), value=data__packagedir_key, name="" + (name_prefix or "data") + ".package-dir", definition={'oneOf': [{'format': 'python-module-name'}, {'const': ''}]}, rule='oneOf') except JsonSchemaValueException: data__packagedir_property_names = False if not data__packagedir_property_names: raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be named by propertyName definition", value=data__packagedir, name="" + (name_prefix or "data") + ".package-dir", definition={'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': ''}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, rule='propertyNames') if "package-data" in data_keys: data_keys.remove("package-data") data__packagedata = data["package-data"] if not isinstance(data__packagedata, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be object", value=data__packagedata, name="" + (name_prefix or "data") + ".package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='type') data__packagedata_is_dict = isinstance(data__packagedata, dict) if data__packagedata_is_dict: data__packagedata_keys = set(data__packagedata.keys()) for data__packagedata_key, data__packagedata_val in data__packagedata.items(): if REGEX_PATTERNS['^.*$'].search(data__packagedata_key): if data__packagedata_key in data__packagedata_keys: data__packagedata_keys.remove(data__packagedata_key) if not isinstance(data__packagedata_val, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data.{data__packagedata_key}".format(**locals()) + " must be array", value=data__packagedata_val, name="" + (name_prefix or "data") + ".package-data.{data__packagedata_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') data__packagedata_val_is_list = isinstance(data__packagedata_val, (list, tuple)) if data__packagedata_val_is_list: data__packagedata_val_len = len(data__packagedata_val) for data__packagedata_val_x, data__packagedata_val_item in enumerate(data__packagedata_val): if not isinstance(data__packagedata_val_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data.{data__packagedata_key}[{data__packagedata_val_x}]".format(**locals()) + " must be string", value=data__packagedata_val_item, name="" + (name_prefix or "data") + ".package-data.{data__packagedata_key}[{data__packagedata_val_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') if data__packagedata_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must not contain "+str(data__packagedata_keys)+" properties", value=data__packagedata, name="" + (name_prefix or "data") + ".package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='additionalProperties') data__packagedata_len = len(data__packagedata) if data__packagedata_len != 0: data__packagedata_property_names = True for data__packagedata_key in data__packagedata: try: data__packagedata_key_one_of_count3 = 0 if data__packagedata_key_one_of_count3 < 2: try: if isinstance(data__packagedata_key, str): if not custom_formats["python-module-name"](data__packagedata_key): raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be python-module-name", value=data__packagedata_key, name="" + (name_prefix or "data") + ".package-data", definition={'format': 'python-module-name'}, rule='format') data__packagedata_key_one_of_count3 += 1 except JsonSchemaValueException: pass if data__packagedata_key_one_of_count3 < 2: try: if data__packagedata_key != "*": raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be same as const definition: *", value=data__packagedata_key, name="" + (name_prefix or "data") + ".package-data", definition={'const': '*'}, rule='const') data__packagedata_key_one_of_count3 += 1 except JsonSchemaValueException: pass if data__packagedata_key_one_of_count3 != 1: raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be valid exactly by one definition" + (" (" + str(data__packagedata_key_one_of_count3) + " matches found)"), value=data__packagedata_key, name="" + (name_prefix or "data") + ".package-data", definition={'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, rule='oneOf') except JsonSchemaValueException: data__packagedata_property_names = False if not data__packagedata_property_names: raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be named by propertyName definition", value=data__packagedata, name="" + (name_prefix or "data") + ".package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='propertyNames') if "include-package-data" in data_keys: data_keys.remove("include-package-data") data__includepackagedata = data["include-package-data"] if not isinstance(data__includepackagedata, (bool)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".include-package-data must be boolean", value=data__includepackagedata, name="" + (name_prefix or "data") + ".include-package-data", definition={'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, rule='type') if "exclude-package-data" in data_keys: data_keys.remove("exclude-package-data") data__excludepackagedata = data["exclude-package-data"] if not isinstance(data__excludepackagedata, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be object", value=data__excludepackagedata, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='type') data__excludepackagedata_is_dict = isinstance(data__excludepackagedata, dict) if data__excludepackagedata_is_dict: data__excludepackagedata_keys = set(data__excludepackagedata.keys()) for data__excludepackagedata_key, data__excludepackagedata_val in data__excludepackagedata.items(): if REGEX_PATTERNS['^.*$'].search(data__excludepackagedata_key): if data__excludepackagedata_key in data__excludepackagedata_keys: data__excludepackagedata_keys.remove(data__excludepackagedata_key) if not isinstance(data__excludepackagedata_val, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}".format(**locals()) + " must be array", value=data__excludepackagedata_val, name="" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') data__excludepackagedata_val_is_list = isinstance(data__excludepackagedata_val, (list, tuple)) if data__excludepackagedata_val_is_list: data__excludepackagedata_val_len = len(data__excludepackagedata_val) for data__excludepackagedata_val_x, data__excludepackagedata_val_item in enumerate(data__excludepackagedata_val): if not isinstance(data__excludepackagedata_val_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}[{data__excludepackagedata_val_x}]".format(**locals()) + " must be string", value=data__excludepackagedata_val_item, name="" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}[{data__excludepackagedata_val_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') if data__excludepackagedata_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must not contain "+str(data__excludepackagedata_keys)+" properties", value=data__excludepackagedata, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='additionalProperties') data__excludepackagedata_len = len(data__excludepackagedata) if data__excludepackagedata_len != 0: data__excludepackagedata_property_names = True for data__excludepackagedata_key in data__excludepackagedata: try: data__excludepackagedata_key_one_of_count4 = 0 if data__excludepackagedata_key_one_of_count4 < 2: try: if isinstance(data__excludepackagedata_key, str): if not custom_formats["python-module-name"](data__excludepackagedata_key): raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be python-module-name", value=data__excludepackagedata_key, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'format': 'python-module-name'}, rule='format') data__excludepackagedata_key_one_of_count4 += 1 except JsonSchemaValueException: pass if data__excludepackagedata_key_one_of_count4 < 2: try: if data__excludepackagedata_key != "*": raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be same as const definition: *", value=data__excludepackagedata_key, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'const': '*'}, rule='const') data__excludepackagedata_key_one_of_count4 += 1 except JsonSchemaValueException: pass if data__excludepackagedata_key_one_of_count4 != 1: raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be valid exactly by one definition" + (" (" + str(data__excludepackagedata_key_one_of_count4) + " matches found)"), value=data__excludepackagedata_key, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, rule='oneOf') except JsonSchemaValueException: data__excludepackagedata_property_names = False if not data__excludepackagedata_property_names: raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be named by propertyName definition", value=data__excludepackagedata, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='propertyNames') if "namespace-packages" in data_keys: data_keys.remove("namespace-packages") data__namespacepackages = data["namespace-packages"] if not isinstance(data__namespacepackages, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".namespace-packages must be array", value=data__namespacepackages, name="" + (name_prefix or "data") + ".namespace-packages", definition={'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html'}, rule='type') data__namespacepackages_is_list = isinstance(data__namespacepackages, (list, tuple)) if data__namespacepackages_is_list: data__namespacepackages_len = len(data__namespacepackages) for data__namespacepackages_x, data__namespacepackages_item in enumerate(data__namespacepackages): if not isinstance(data__namespacepackages_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + " must be string", value=data__namespacepackages_item, name="" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name'}, rule='type') if isinstance(data__namespacepackages_item, str): if not custom_formats["python-module-name"](data__namespacepackages_item): raise JsonSchemaValueException("" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + " must be python-module-name", value=data__namespacepackages_item, name="" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name'}, rule='format') if "py-modules" in data_keys: data_keys.remove("py-modules") data__pymodules = data["py-modules"] if not isinstance(data__pymodules, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-modules must be array", value=data__pymodules, name="" + (name_prefix or "data") + ".py-modules", definition={'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, rule='type') data__pymodules_is_list = isinstance(data__pymodules, (list, tuple)) if data__pymodules_is_list: data__pymodules_len = len(data__pymodules) for data__pymodules_x, data__pymodules_item in enumerate(data__pymodules): if not isinstance(data__pymodules_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + " must be string", value=data__pymodules_item, name="" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name'}, rule='type') if isinstance(data__pymodules_item, str): if not custom_formats["python-module-name"](data__pymodules_item): raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + " must be python-module-name", value=data__pymodules_item, name="" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name'}, rule='format') if "data-files" in data_keys: data_keys.remove("data-files") data__datafiles = data["data-files"] if not isinstance(data__datafiles, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".data-files must be object", value=data__datafiles, name="" + (name_prefix or "data") + ".data-files", definition={'$$description': ['**DEPRECATED**: dict-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', "Please notice this don't work with wheels. See `data files support", '`_'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='type') data__datafiles_is_dict = isinstance(data__datafiles, dict) if data__datafiles_is_dict: data__datafiles_keys = set(data__datafiles.keys()) for data__datafiles_key, data__datafiles_val in data__datafiles.items(): if REGEX_PATTERNS['^.*$'].search(data__datafiles_key): if data__datafiles_key in data__datafiles_keys: data__datafiles_keys.remove(data__datafiles_key) if not isinstance(data__datafiles_val, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".data-files.{data__datafiles_key}".format(**locals()) + " must be array", value=data__datafiles_val, name="" + (name_prefix or "data") + ".data-files.{data__datafiles_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') data__datafiles_val_is_list = isinstance(data__datafiles_val, (list, tuple)) if data__datafiles_val_is_list: data__datafiles_val_len = len(data__datafiles_val) for data__datafiles_val_x, data__datafiles_val_item in enumerate(data__datafiles_val): if not isinstance(data__datafiles_val_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".data-files.{data__datafiles_key}[{data__datafiles_val_x}]".format(**locals()) + " must be string", value=data__datafiles_val_item, name="" + (name_prefix or "data") + ".data-files.{data__datafiles_key}[{data__datafiles_val_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') if "cmdclass" in data_keys: data_keys.remove("cmdclass") data__cmdclass = data["cmdclass"] if not isinstance(data__cmdclass, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".cmdclass must be object", value=data__cmdclass, name="" + (name_prefix or "data") + ".cmdclass", definition={'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', ' cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, rule='type') data__cmdclass_is_dict = isinstance(data__cmdclass, dict) if data__cmdclass_is_dict: data__cmdclass_keys = set(data__cmdclass.keys()) for data__cmdclass_key, data__cmdclass_val in data__cmdclass.items(): if REGEX_PATTERNS['^.*$'].search(data__cmdclass_key): if data__cmdclass_key in data__cmdclass_keys: data__cmdclass_keys.remove(data__cmdclass_key) if not isinstance(data__cmdclass_val, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + " must be string", value=data__cmdclass_val, name="" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'python-qualified-identifier'}, rule='type') if isinstance(data__cmdclass_val, str): if not custom_formats["python-qualified-identifier"](data__cmdclass_val): raise JsonSchemaValueException("" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + " must be python-qualified-identifier", value=data__cmdclass_val, name="" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'python-qualified-identifier'}, rule='format') if "license-files" in data_keys: data_keys.remove("license-files") data__licensefiles = data["license-files"] if not isinstance(data__licensefiles, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".license-files must be array", value=data__licensefiles, name="" + (name_prefix or "data") + ".license-files", definition={'type': 'array', 'items': {'type': 'string'}, '$$description': ['PROVISIONAL: List of glob patterns for all license files being distributed.', '(might become standard with PEP 639).'], 'default': ['LICEN[CS]E*', ' COPYING*', ' NOTICE*', 'AUTHORS*'], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, rule='type') data__licensefiles_is_list = isinstance(data__licensefiles, (list, tuple)) if data__licensefiles_is_list: data__licensefiles_len = len(data__licensefiles) for data__licensefiles_x, data__licensefiles_item in enumerate(data__licensefiles): if not isinstance(data__licensefiles_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".license-files[{data__licensefiles_x}]".format(**locals()) + " must be string", value=data__licensefiles_item, name="" + (name_prefix or "data") + ".license-files[{data__licensefiles_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') else: data["license-files"] = ['LICEN[CS]E*', ' COPYING*', ' NOTICE*', 'AUTHORS*'] if "dynamic" in data_keys: data_keys.remove("dynamic") data__dynamic = data["dynamic"] if not isinstance(data__dynamic, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must be object", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, 'readme': {'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}, rule='type') data__dynamic_is_dict = isinstance(data__dynamic, dict) if data__dynamic_is_dict: data__dynamic_keys = set(data__dynamic.keys()) if "version" in data__dynamic_keys: data__dynamic_keys.remove("version") data__dynamic__version = data__dynamic["version"] data__dynamic__version_one_of_count5 = 0 if data__dynamic__version_one_of_count5 < 2: try: validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_attr_directive(data__dynamic__version, custom_formats, (name_prefix or "data") + ".dynamic.version") data__dynamic__version_one_of_count5 += 1 except JsonSchemaValueException: pass if data__dynamic__version_one_of_count5 < 2: try: validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__version, custom_formats, (name_prefix or "data") + ".dynamic.version") data__dynamic__version_one_of_count5 += 1 except JsonSchemaValueException: pass if data__dynamic__version_one_of_count5 != 1: raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.version must be valid exactly by one definition" + (" (" + str(data__dynamic__version_one_of_count5) + " matches found)"), value=data__dynamic__version, name="" + (name_prefix or "data") + ".dynamic.version", definition={'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, rule='oneOf') if "classifiers" in data__dynamic_keys: data__dynamic_keys.remove("classifiers") data__dynamic__classifiers = data__dynamic["classifiers"] validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__classifiers, custom_formats, (name_prefix or "data") + ".dynamic.classifiers") if "description" in data__dynamic_keys: data__dynamic_keys.remove("description") data__dynamic__description = data__dynamic["description"] validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__description, custom_formats, (name_prefix or "data") + ".dynamic.description") if "dependencies" in data__dynamic_keys: data__dynamic_keys.remove("dependencies") data__dynamic__dependencies = data__dynamic["dependencies"] validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__dependencies, custom_formats, (name_prefix or "data") + ".dynamic.dependencies") if "entry-points" in data__dynamic_keys: data__dynamic_keys.remove("entry-points") data__dynamic__entrypoints = data__dynamic["entry-points"] validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__entrypoints, custom_formats, (name_prefix or "data") + ".dynamic.entry-points") if "optional-dependencies" in data__dynamic_keys: data__dynamic_keys.remove("optional-dependencies") data__dynamic__optionaldependencies = data__dynamic["optional-dependencies"] if not isinstance(data__dynamic__optionaldependencies, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be object", value=data__dynamic__optionaldependencies, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, rule='type') data__dynamic__optionaldependencies_is_dict = isinstance(data__dynamic__optionaldependencies, dict) if data__dynamic__optionaldependencies_is_dict: data__dynamic__optionaldependencies_keys = set(data__dynamic__optionaldependencies.keys()) for data__dynamic__optionaldependencies_key, data__dynamic__optionaldependencies_val in data__dynamic__optionaldependencies.items(): if REGEX_PATTERNS['.+'].search(data__dynamic__optionaldependencies_key): if data__dynamic__optionaldependencies_key in data__dynamic__optionaldependencies_keys: data__dynamic__optionaldependencies_keys.remove(data__dynamic__optionaldependencies_key) validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__optionaldependencies_val, custom_formats, (name_prefix or "data") + ".dynamic.optional-dependencies.{data__dynamic__optionaldependencies_key}") if data__dynamic__optionaldependencies_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must not contain "+str(data__dynamic__optionaldependencies_keys)+" properties", value=data__dynamic__optionaldependencies, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, rule='additionalProperties') data__dynamic__optionaldependencies_len = len(data__dynamic__optionaldependencies) if data__dynamic__optionaldependencies_len != 0: data__dynamic__optionaldependencies_property_names = True for data__dynamic__optionaldependencies_key in data__dynamic__optionaldependencies: try: if isinstance(data__dynamic__optionaldependencies_key, str): if not custom_formats["python-identifier"](data__dynamic__optionaldependencies_key): raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be python-identifier", value=data__dynamic__optionaldependencies_key, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'format': 'python-identifier'}, rule='format') except JsonSchemaValueException: data__dynamic__optionaldependencies_property_names = False if not data__dynamic__optionaldependencies_property_names: raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be named by propertyName definition", value=data__dynamic__optionaldependencies, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, rule='propertyNames') if "readme" in data__dynamic_keys: data__dynamic_keys.remove("readme") data__dynamic__readme = data__dynamic["readme"] data__dynamic__readme_any_of_count6 = 0 if not data__dynamic__readme_any_of_count6: try: validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data__dynamic__readme, custom_formats, (name_prefix or "data") + ".dynamic.readme") data__dynamic__readme_any_of_count6 += 1 except JsonSchemaValueException: pass if not data__dynamic__readme_any_of_count6: try: data__dynamic__readme_is_dict = isinstance(data__dynamic__readme, dict) if data__dynamic__readme_is_dict: data__dynamic__readme_keys = set(data__dynamic__readme.keys()) if "content-type" in data__dynamic__readme_keys: data__dynamic__readme_keys.remove("content-type") data__dynamic__readme__contenttype = data__dynamic__readme["content-type"] if not isinstance(data__dynamic__readme__contenttype, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme.content-type must be string", value=data__dynamic__readme__contenttype, name="" + (name_prefix or "data") + ".dynamic.readme.content-type", definition={'type': 'string'}, rule='type') data__dynamic__readme_any_of_count6 += 1 except JsonSchemaValueException: pass if not data__dynamic__readme_any_of_count6: raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme cannot be validated by any definition", value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}, rule='anyOf') data__dynamic__readme_is_dict = isinstance(data__dynamic__readme, dict) if data__dynamic__readme_is_dict: data__dynamic__readme_len = len(data__dynamic__readme) if not all(prop in data__dynamic__readme for prop in ['file']): raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme must contain ['file'] properties", value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}, rule='required') if data__dynamic_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must not contain "+str(data__dynamic_keys)+" properties", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, 'readme': {'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}, rule='additionalProperties') if data_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://setuptools.pypa.io/en/latest/references/keywords.html', 'title': '``tool.setuptools`` table', '$$description': ['Please notice for the time being the ``setuptools`` project does not specify', 'a way of configuring builds via ``pyproject.toml``.', 'Therefore this schema should be taken just as a *"thought experiment"* on how', 'this *might be done*, by following the principles established in', '`ini2toml `_.', 'It considers only ``setuptools`` `parameters', '`_', 'that can currently be configured via ``setup.cfg`` and are not covered by :pep:`621`', 'but intentionally excludes ``dependency_links`` and ``setup_requires``.', 'NOTE: ``scripts`` was renamed to ``script-files`` to avoid confusion with', 'entry-point based scripts (defined in :pep:`621`).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'description': 'Whether the project can be safely installed and run from a zip file.', 'type': 'boolean'}, 'script-files': {'description': 'Legacy way of defining scripts (entry-points are preferred).', 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}}, {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': ''}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'oneOf': [{'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'data-files': {'$$description': ['**DEPRECATED**: dict-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', "Please notice this don't work with wheels. See `data files support", '`_'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', ' cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['PROVISIONAL: List of glob patterns for all license files being distributed.', '(might become standard with PEP 639).'], 'default': ['LICEN[CS]E*', ' COPYING*', ' NOTICE*', 'AUTHORS*'], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'format': 'python-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}}}, 'readme': {'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'properties': {'content-type': {'type': 'string'}}}], 'required': ['file']}}}}, 'definitions': {'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}, rule='additionalProperties') return data def validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directive(data, custom_formats={}, name_prefix=None): if not isinstance(data, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, rule='type') data_is_dict = isinstance(data, dict) if data_is_dict: data_len = len(data) if not all(prop in data for prop in ['file']): raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain ['file'] properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, rule='required') data_keys = set(data.keys()) if "file" in data_keys: data_keys.remove("file") data__file = data["file"] data__file_one_of_count7 = 0 if data__file_one_of_count7 < 2: try: if not isinstance(data__file, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".file must be string", value=data__file, name="" + (name_prefix or "data") + ".file", definition={'type': 'string'}, rule='type') data__file_one_of_count7 += 1 except JsonSchemaValueException: pass if data__file_one_of_count7 < 2: try: if not isinstance(data__file, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".file must be array", value=data__file, name="" + (name_prefix or "data") + ".file", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') data__file_is_list = isinstance(data__file, (list, tuple)) if data__file_is_list: data__file_len = len(data__file) for data__file_x, data__file_item in enumerate(data__file): if not isinstance(data__file_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".file[{data__file_x}]".format(**locals()) + " must be string", value=data__file_item, name="" + (name_prefix or "data") + ".file[{data__file_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') data__file_one_of_count7 += 1 except JsonSchemaValueException: pass if data__file_one_of_count7 != 1: raise JsonSchemaValueException("" + (name_prefix or "data") + ".file must be valid exactly by one definition" + (" (" + str(data__file_one_of_count7) + " matches found)"), value=data__file, name="" + (name_prefix or "data") + ".file", definition={'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, rule='oneOf') if data_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, rule='additionalProperties') return data def validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_attr_directive(data, custom_formats={}, name_prefix=None): if not isinstance(data, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, rule='type') data_is_dict = isinstance(data, dict) if data_is_dict: data_len = len(data) if not all(prop in data for prop in ['attr']): raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain ['attr'] properties", value=data, name="" + (name_prefix or "data") + "", definition={'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, rule='required') data_keys = set(data.keys()) if "attr" in data_keys: data_keys.remove("attr") data__attr = data["attr"] if not isinstance(data__attr, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".attr must be string", value=data__attr, name="" + (name_prefix or "data") + ".attr", definition={'type': 'string'}, rule='type') if data_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string'}}, 'required': ['attr']}, rule='additionalProperties') return data def validate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_find_directive(data, custom_formats={}, name_prefix=None): if not isinstance(data, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}, rule='type') data_is_dict = isinstance(data, dict) if data_is_dict: data_keys = set(data.keys()) if "find" in data_keys: data_keys.remove("find") data__find = data["find"] if not isinstance(data__find, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".find must be object", value=data__find, name="" + (name_prefix or "data") + ".find", definition={'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}, rule='type') data__find_is_dict = isinstance(data__find, dict) if data__find_is_dict: data__find_keys = set(data__find.keys()) if "where" in data__find_keys: data__find_keys.remove("where") data__find__where = data__find["where"] if not isinstance(data__find__where, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.where must be array", value=data__find__where, name="" + (name_prefix or "data") + ".find.where", definition={'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, rule='type') data__find__where_is_list = isinstance(data__find__where, (list, tuple)) if data__find__where_is_list: data__find__where_len = len(data__find__where) for data__find__where_x, data__find__where_item in enumerate(data__find__where): if not isinstance(data__find__where_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.where[{data__find__where_x}]".format(**locals()) + " must be string", value=data__find__where_item, name="" + (name_prefix or "data") + ".find.where[{data__find__where_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') if "exclude" in data__find_keys: data__find_keys.remove("exclude") data__find__exclude = data__find["exclude"] if not isinstance(data__find__exclude, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.exclude must be array", value=data__find__exclude, name="" + (name_prefix or "data") + ".find.exclude", definition={'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, rule='type') data__find__exclude_is_list = isinstance(data__find__exclude, (list, tuple)) if data__find__exclude_is_list: data__find__exclude_len = len(data__find__exclude) for data__find__exclude_x, data__find__exclude_item in enumerate(data__find__exclude): if not isinstance(data__find__exclude_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.exclude[{data__find__exclude_x}]".format(**locals()) + " must be string", value=data__find__exclude_item, name="" + (name_prefix or "data") + ".find.exclude[{data__find__exclude_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') if "include" in data__find_keys: data__find_keys.remove("include") data__find__include = data__find["include"] if not isinstance(data__find__include, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.include must be array", value=data__find__include, name="" + (name_prefix or "data") + ".find.include", definition={'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, rule='type') data__find__include_is_list = isinstance(data__find__include, (list, tuple)) if data__find__include_is_list: data__find__include_len = len(data__find__include) for data__find__include_x, data__find__include_item in enumerate(data__find__include): if not isinstance(data__find__include_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.include[{data__find__include_x}]".format(**locals()) + " must be string", value=data__find__include_item, name="" + (name_prefix or "data") + ".find.include[{data__find__include_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') if "namespaces" in data__find_keys: data__find_keys.remove("namespaces") data__find__namespaces = data__find["namespaces"] if not isinstance(data__find__namespaces, (bool)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.namespaces must be boolean", value=data__find__namespaces, name="" + (name_prefix or "data") + ".find.namespaces", definition={'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}, rule='type') if data__find_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + ".find must not contain "+str(data__find_keys)+" properties", value=data__find, name="" + (name_prefix or "data") + ".find", definition={'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}, rule='additionalProperties') if data_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}, rule='additionalProperties') return data def validate_https___docs_python_org_3_install(data, custom_formats={}, name_prefix=None): if not isinstance(data, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://docs.python.org/3/install/', 'title': '``tool.distutils`` table', '$$description': ['Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` scripts via `distutils configuration files', '`_.', '``tool.distutils`` subtables could be used with the same purpose', '(NOT CURRENTLY IMPLEMENTED).'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, rule='type') data_is_dict = isinstance(data, dict) if data_is_dict: data_keys = set(data.keys()) if "global" in data_keys: data_keys.remove("global") data__global = data["global"] if not isinstance(data__global, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".global must be object", value=data__global, name="" + (name_prefix or "data") + ".global", definition={'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}, rule='type') for data_key, data_val in data.items(): if REGEX_PATTERNS['.+'].search(data_key): if data_key in data_keys: data_keys.remove(data_key) if not isinstance(data_val, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".{data_key}".format(**locals()) + " must be object", value=data_val, name="" + (name_prefix or "data") + ".{data_key}".format(**locals()) + "", definition={'type': 'object'}, rule='type') return data def validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata(data, custom_formats={}, name_prefix=None): if not isinstance(data, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'gui-scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, rule='type') data_is_dict = isinstance(data, dict) if data_is_dict: data_len = len(data) if not all(prop in data for prop in ['name']): raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain ['name'] properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'gui-scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, rule='required') data_keys = set(data.keys()) if "name" in data_keys: data_keys.remove("name") data__name = data["name"] if not isinstance(data__name, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be string", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, rule='type') if isinstance(data__name, str): if not custom_formats["pep508-identifier"](data__name): raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be pep508-identifier", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, rule='format') if "version" in data_keys: data_keys.remove("version") data__version = data["version"] if not isinstance(data__version, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".version must be string", value=data__version, name="" + (name_prefix or "data") + ".version", definition={'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, rule='type') if isinstance(data__version, str): if not custom_formats["pep440"](data__version): raise JsonSchemaValueException("" + (name_prefix or "data") + ".version must be pep440", value=data__version, name="" + (name_prefix or "data") + ".version", definition={'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, rule='format') if "description" in data_keys: data_keys.remove("description") data__description = data["description"] if not isinstance(data__description, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".description must be string", value=data__description, name="" + (name_prefix or "data") + ".description", definition={'type': 'string', '$$description': ['The `summary description of the project', '`_']}, rule='type') if "readme" in data_keys: data_keys.remove("readme") data__readme = data["readme"] data__readme_one_of_count8 = 0 if data__readme_one_of_count8 < 2: try: if not isinstance(data__readme, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must be string", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, rule='type') data__readme_one_of_count8 += 1 except JsonSchemaValueException: pass if data__readme_one_of_count8 < 2: try: if not isinstance(data__readme, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must be object", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}, rule='type') data__readme_any_of_count9 = 0 if not data__readme_any_of_count9: try: data__readme_is_dict = isinstance(data__readme, dict) if data__readme_is_dict: data__readme_len = len(data__readme) if not all(prop in data__readme for prop in ['file']): raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must contain ['file'] properties", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, rule='required') data__readme_keys = set(data__readme.keys()) if "file" in data__readme_keys: data__readme_keys.remove("file") data__readme__file = data__readme["file"] if not isinstance(data__readme__file, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme.file must be string", value=data__readme__file, name="" + (name_prefix or "data") + ".readme.file", definition={'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}, rule='type') data__readme_any_of_count9 += 1 except JsonSchemaValueException: pass if not data__readme_any_of_count9: try: data__readme_is_dict = isinstance(data__readme, dict) if data__readme_is_dict: data__readme_len = len(data__readme) if not all(prop in data__readme for prop in ['text']): raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must contain ['text'] properties", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}, rule='required') data__readme_keys = set(data__readme.keys()) if "text" in data__readme_keys: data__readme_keys.remove("text") data__readme__text = data__readme["text"] if not isinstance(data__readme__text, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme.text must be string", value=data__readme__text, name="" + (name_prefix or "data") + ".readme.text", definition={'type': 'string', 'description': 'Full text describing the project.'}, rule='type') data__readme_any_of_count9 += 1 except JsonSchemaValueException: pass if not data__readme_any_of_count9: raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme cannot be validated by any definition", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, rule='anyOf') data__readme_is_dict = isinstance(data__readme, dict) if data__readme_is_dict: data__readme_len = len(data__readme) if not all(prop in data__readme for prop in ['content-type']): raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must contain ['content-type'] properties", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}, rule='required') data__readme_keys = set(data__readme.keys()) if "content-type" in data__readme_keys: data__readme_keys.remove("content-type") data__readme__contenttype = data__readme["content-type"] if not isinstance(data__readme__contenttype, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme.content-type must be string", value=data__readme__contenttype, name="" + (name_prefix or "data") + ".readme.content-type", definition={'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}, rule='type') data__readme_one_of_count8 += 1 except JsonSchemaValueException: pass if data__readme_one_of_count8 != 1: raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must be valid exactly by one definition" + (" (" + str(data__readme_one_of_count8) + " matches found)"), value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, rule='oneOf') if "requires-python" in data_keys: data_keys.remove("requires-python") data__requirespython = data["requires-python"] if not isinstance(data__requirespython, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".requires-python must be string", value=data__requirespython, name="" + (name_prefix or "data") + ".requires-python", definition={'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, rule='type') if isinstance(data__requirespython, str): if not custom_formats["pep508-versionspec"](data__requirespython): raise JsonSchemaValueException("" + (name_prefix or "data") + ".requires-python must be pep508-versionspec", value=data__requirespython, name="" + (name_prefix or "data") + ".requires-python", definition={'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, rule='format') if "license" in data_keys: data_keys.remove("license") data__license = data["license"] data__license_one_of_count10 = 0 if data__license_one_of_count10 < 2: try: data__license_is_dict = isinstance(data__license, dict) if data__license_is_dict: data__license_len = len(data__license) if not all(prop in data__license for prop in ['file']): raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must contain ['file'] properties", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, rule='required') data__license_keys = set(data__license.keys()) if "file" in data__license_keys: data__license_keys.remove("file") data__license__file = data__license["file"] if not isinstance(data__license__file, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".license.file must be string", value=data__license__file, name="" + (name_prefix or "data") + ".license.file", definition={'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}, rule='type') data__license_one_of_count10 += 1 except JsonSchemaValueException: pass if data__license_one_of_count10 < 2: try: data__license_is_dict = isinstance(data__license, dict) if data__license_is_dict: data__license_len = len(data__license) if not all(prop in data__license for prop in ['text']): raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must contain ['text'] properties", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}, rule='required') data__license_keys = set(data__license.keys()) if "text" in data__license_keys: data__license_keys.remove("text") data__license__text = data__license["text"] if not isinstance(data__license__text, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".license.text must be string", value=data__license__text, name="" + (name_prefix or "data") + ".license.text", definition={'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}, rule='type') data__license_one_of_count10 += 1 except JsonSchemaValueException: pass if data__license_one_of_count10 != 1: raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be valid exactly by one definition" + (" (" + str(data__license_one_of_count10) + " matches found)"), value=data__license, name="" + (name_prefix or "data") + ".license", definition={'description': '`Project license `_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, rule='oneOf') if "authors" in data_keys: data_keys.remove("authors") data__authors = data["authors"] if not isinstance(data__authors, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".authors must be array", value=data__authors, name="" + (name_prefix or "data") + ".authors", definition={'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, rule='type') data__authors_is_list = isinstance(data__authors, (list, tuple)) if data__authors_is_list: data__authors_len = len(data__authors) for data__authors_x, data__authors_item in enumerate(data__authors): validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_author(data__authors_item, custom_formats, (name_prefix or "data") + ".authors[{data__authors_x}]") if "maintainers" in data_keys: data_keys.remove("maintainers") data__maintainers = data["maintainers"] if not isinstance(data__maintainers, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".maintainers must be array", value=data__maintainers, name="" + (name_prefix or "data") + ".maintainers", definition={'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, rule='type') data__maintainers_is_list = isinstance(data__maintainers, (list, tuple)) if data__maintainers_is_list: data__maintainers_len = len(data__maintainers) for data__maintainers_x, data__maintainers_item in enumerate(data__maintainers): validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_author(data__maintainers_item, custom_formats, (name_prefix or "data") + ".maintainers[{data__maintainers_x}]") if "keywords" in data_keys: data_keys.remove("keywords") data__keywords = data["keywords"] if not isinstance(data__keywords, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".keywords must be array", value=data__keywords, name="" + (name_prefix or "data") + ".keywords", definition={'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, rule='type') data__keywords_is_list = isinstance(data__keywords, (list, tuple)) if data__keywords_is_list: data__keywords_len = len(data__keywords) for data__keywords_x, data__keywords_item in enumerate(data__keywords): if not isinstance(data__keywords_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".keywords[{data__keywords_x}]".format(**locals()) + " must be string", value=data__keywords_item, name="" + (name_prefix or "data") + ".keywords[{data__keywords_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') if "classifiers" in data_keys: data_keys.remove("classifiers") data__classifiers = data["classifiers"] if not isinstance(data__classifiers, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".classifiers must be array", value=data__classifiers, name="" + (name_prefix or "data") + ".classifiers", definition={'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, rule='type') data__classifiers_is_list = isinstance(data__classifiers, (list, tuple)) if data__classifiers_is_list: data__classifiers_len = len(data__classifiers) for data__classifiers_x, data__classifiers_item in enumerate(data__classifiers): if not isinstance(data__classifiers_item, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + " must be string", value=data__classifiers_item, name="" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, rule='type') if isinstance(data__classifiers_item, str): if not custom_formats["trove-classifier"](data__classifiers_item): raise JsonSchemaValueException("" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + " must be trove-classifier", value=data__classifiers_item, name="" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, rule='format') if "urls" in data_keys: data_keys.remove("urls") data__urls = data["urls"] if not isinstance(data__urls, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls must be object", value=data__urls, name="" + (name_prefix or "data") + ".urls", definition={'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, rule='type') data__urls_is_dict = isinstance(data__urls, dict) if data__urls_is_dict: data__urls_keys = set(data__urls.keys()) for data__urls_key, data__urls_val in data__urls.items(): if REGEX_PATTERNS['^.+$'].search(data__urls_key): if data__urls_key in data__urls_keys: data__urls_keys.remove(data__urls_key) if not isinstance(data__urls_val, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + " must be string", value=data__urls_val, name="" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'url'}, rule='type') if isinstance(data__urls_val, str): if not custom_formats["url"](data__urls_val): raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + " must be url", value=data__urls_val, name="" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'url'}, rule='format') if data__urls_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls must not contain "+str(data__urls_keys)+" properties", value=data__urls, name="" + (name_prefix or "data") + ".urls", definition={'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, rule='additionalProperties') if "scripts" in data_keys: data_keys.remove("scripts") data__scripts = data["scripts"] validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_entry_point_group(data__scripts, custom_formats, (name_prefix or "data") + ".scripts") if "gui-scripts" in data_keys: data_keys.remove("gui-scripts") data__guiscripts = data["gui-scripts"] validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_entry_point_group(data__guiscripts, custom_formats, (name_prefix or "data") + ".gui-scripts") if "entry-points" in data_keys: data_keys.remove("entry-points") data__entrypoints = data["entry-points"] data__entrypoints_is_dict = isinstance(data__entrypoints, dict) if data__entrypoints_is_dict: data__entrypoints_keys = set(data__entrypoints.keys()) for data__entrypoints_key, data__entrypoints_val in data__entrypoints.items(): if REGEX_PATTERNS['^.+$'].search(data__entrypoints_key): if data__entrypoints_key in data__entrypoints_keys: data__entrypoints_keys.remove(data__entrypoints_key) validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_entry_point_group(data__entrypoints_val, custom_formats, (name_prefix or "data") + ".entry-points.{data__entrypoints_key}") if data__entrypoints_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + ".entry-points must not contain "+str(data__entrypoints_keys)+" properties", value=data__entrypoints, name="" + (name_prefix or "data") + ".entry-points", definition={'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, rule='additionalProperties') data__entrypoints_len = len(data__entrypoints) if data__entrypoints_len != 0: data__entrypoints_property_names = True for data__entrypoints_key in data__entrypoints: try: if isinstance(data__entrypoints_key, str): if not custom_formats["python-entrypoint-group"](data__entrypoints_key): raise JsonSchemaValueException("" + (name_prefix or "data") + ".entry-points must be python-entrypoint-group", value=data__entrypoints_key, name="" + (name_prefix or "data") + ".entry-points", definition={'format': 'python-entrypoint-group'}, rule='format') except JsonSchemaValueException: data__entrypoints_property_names = False if not data__entrypoints_property_names: raise JsonSchemaValueException("" + (name_prefix or "data") + ".entry-points must be named by propertyName definition", value=data__entrypoints, name="" + (name_prefix or "data") + ".entry-points", definition={'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, rule='propertyNames') if "dependencies" in data_keys: data_keys.remove("dependencies") data__dependencies = data["dependencies"] if not isinstance(data__dependencies, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependencies must be array", value=data__dependencies, name="" + (name_prefix or "data") + ".dependencies", definition={'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, rule='type') data__dependencies_is_list = isinstance(data__dependencies, (list, tuple)) if data__dependencies_is_list: data__dependencies_len = len(data__dependencies) for data__dependencies_x, data__dependencies_item in enumerate(data__dependencies): validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_dependency(data__dependencies_item, custom_formats, (name_prefix or "data") + ".dependencies[{data__dependencies_x}]") if "optional-dependencies" in data_keys: data_keys.remove("optional-dependencies") data__optionaldependencies = data["optional-dependencies"] if not isinstance(data__optionaldependencies, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must be object", value=data__optionaldependencies, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='type') data__optionaldependencies_is_dict = isinstance(data__optionaldependencies, dict) if data__optionaldependencies_is_dict: data__optionaldependencies_keys = set(data__optionaldependencies.keys()) for data__optionaldependencies_key, data__optionaldependencies_val in data__optionaldependencies.items(): if REGEX_PATTERNS['^.+$'].search(data__optionaldependencies_key): if data__optionaldependencies_key in data__optionaldependencies_keys: data__optionaldependencies_keys.remove(data__optionaldependencies_key) if not isinstance(data__optionaldependencies_val, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies.{data__optionaldependencies_key}".format(**locals()) + " must be array", value=data__optionaldependencies_val, name="" + (name_prefix or "data") + ".optional-dependencies.{data__optionaldependencies_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, rule='type') data__optionaldependencies_val_is_list = isinstance(data__optionaldependencies_val, (list, tuple)) if data__optionaldependencies_val_is_list: data__optionaldependencies_val_len = len(data__optionaldependencies_val) for data__optionaldependencies_val_x, data__optionaldependencies_val_item in enumerate(data__optionaldependencies_val): validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_dependency(data__optionaldependencies_val_item, custom_formats, (name_prefix or "data") + ".optional-dependencies.{data__optionaldependencies_key}[{data__optionaldependencies_val_x}]") if data__optionaldependencies_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must not contain "+str(data__optionaldependencies_keys)+" properties", value=data__optionaldependencies, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='additionalProperties') data__optionaldependencies_len = len(data__optionaldependencies) if data__optionaldependencies_len != 0: data__optionaldependencies_property_names = True for data__optionaldependencies_key in data__optionaldependencies: try: if isinstance(data__optionaldependencies_key, str): if not custom_formats["pep508-identifier"](data__optionaldependencies_key): raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must be pep508-identifier", value=data__optionaldependencies_key, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'format': 'pep508-identifier'}, rule='format') except JsonSchemaValueException: data__optionaldependencies_property_names = False if not data__optionaldependencies_property_names: raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must be named by propertyName definition", value=data__optionaldependencies, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='propertyNames') if "dynamic" in data_keys: data_keys.remove("dynamic") data__dynamic = data["dynamic"] if not isinstance(data__dynamic, (list, tuple)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must be array", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}, rule='type') data__dynamic_is_list = isinstance(data__dynamic, (list, tuple)) if data__dynamic_is_list: data__dynamic_len = len(data__dynamic) for data__dynamic_x, data__dynamic_item in enumerate(data__dynamic): if data__dynamic_item not in ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']: raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic[{data__dynamic_x}]".format(**locals()) + " must be one of ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']", value=data__dynamic_item, name="" + (name_prefix or "data") + ".dynamic[{data__dynamic_x}]".format(**locals()) + "", definition={'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}, rule='enum') if data_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-project-metadata/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'authors': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'gui-scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, rule='additionalProperties') try: try: data_is_dict = isinstance(data, dict) if data_is_dict: data_len = len(data) if not all(prop in data for prop in ['dynamic']): raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain ['dynamic'] properties", value=data, name="" + (name_prefix or "data") + "", definition={'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, rule='required') data_keys = set(data.keys()) if "dynamic" in data_keys: data_keys.remove("dynamic") data__dynamic = data["dynamic"] data__dynamic_is_list = isinstance(data__dynamic, (list, tuple)) if data__dynamic_is_list: data__dynamic_contains = False for data__dynamic_key in data__dynamic: try: if data__dynamic_key != "version": raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must be same as const definition: version", value=data__dynamic_key, name="" + (name_prefix or "data") + ".dynamic", definition={'const': 'version'}, rule='const') data__dynamic_contains = True break except JsonSchemaValueException: pass if not data__dynamic_contains: raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must contain one of contains definition", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}, rule='contains') except JsonSchemaValueException: pass else: raise JsonSchemaValueException("" + (name_prefix or "data") + " must NOT match a disallowed definition", value=data, name="" + (name_prefix or "data") + "", definition={'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, rule='not') except JsonSchemaValueException: pass else: data_is_dict = isinstance(data, dict) if data_is_dict: data_len = len(data) if not all(prop in data for prop in ['version']): raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain ['version'] properties", value=data, name="" + (name_prefix or "data") + "", definition={'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, rule='required') return data def validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_dependency(data, custom_formats={}, name_prefix=None): if not isinstance(data, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}, rule='type') if isinstance(data, str): if not custom_formats["pep508"](data): raise JsonSchemaValueException("" + (name_prefix or "data") + " must be pep508", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}, rule='format') return data def validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_entry_point_group(data, custom_formats={}, name_prefix=None): if not isinstance(data, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, rule='type') data_is_dict = isinstance(data, dict) if data_is_dict: data_keys = set(data.keys()) for data_key, data_val in data.items(): if REGEX_PATTERNS['^.+$'].search(data_key): if data_key in data_keys: data_keys.remove(data_key) if not isinstance(data_val, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".{data_key}".format(**locals()) + " must be string", value=data_val, name="" + (name_prefix or "data") + ".{data_key}".format(**locals()) + "", definition={'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}, rule='type') if isinstance(data_val, str): if not custom_formats["python-entrypoint-reference"](data_val): raise JsonSchemaValueException("" + (name_prefix or "data") + ".{data_key}".format(**locals()) + " must be python-entrypoint-reference", value=data_val, name="" + (name_prefix or "data") + ".{data_key}".format(**locals()) + "", definition={'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}, rule='format') if data_keys: raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, rule='additionalProperties') data_len = len(data) if data_len != 0: data_property_names = True for data_key in data: try: if isinstance(data_key, str): if not custom_formats["python-entrypoint-name"](data_key): raise JsonSchemaValueException("" + (name_prefix or "data") + " must be python-entrypoint-name", value=data_key, name="" + (name_prefix or "data") + "", definition={'format': 'python-entrypoint-name'}, rule='format') except JsonSchemaValueException: data_property_names = False if not data_property_names: raise JsonSchemaValueException("" + (name_prefix or "data") + " must be named by propertyName definition", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, rule='propertyNames') return data def validate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata___definitions_author(data, custom_formats={}, name_prefix=None): if not isinstance(data, (dict)): raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://www.python.org/dev/peps/pep-0621/#authors-maintainers', 'type': 'object', 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, rule='type') data_is_dict = isinstance(data, dict) if data_is_dict: data_keys = set(data.keys()) if "name" in data_keys: data_keys.remove("name") data__name = data["name"] if not isinstance(data__name, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be string", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, rule='type') if "email" in data_keys: data_keys.remove("email") data__email = data["email"] if not isinstance(data__email, (str)): raise JsonSchemaValueException("" + (name_prefix or "data") + ".email must be string", value=data__email, name="" + (name_prefix or "data") + ".email", definition={'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}, rule='type') if isinstance(data__email, str): if not REGEX_PATTERNS["idn-email_re_pattern"].match(data__email): raise JsonSchemaValueException("" + (name_prefix or "data") + ".email must be idn-email", value=data__email, name="" + (name_prefix or "data") + ".email", definition={'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}, rule='format') return dataPK{5Zo^7LLTLib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_exceptions.pynuW+Aimport re SPLIT_RE = re.compile(r'[\.\[\]]+') class JsonSchemaException(ValueError): """ Base exception of ``fastjsonschema`` library. """ class JsonSchemaValueException(JsonSchemaException): """ Exception raised by validation function. Available properties: * ``message`` containing human-readable information what is wrong (e.g. ``data.property[index] must be smaller than or equal to 42``), * invalid ``value`` (e.g. ``60``), * ``name`` of a path in the data structure (e.g. ``data.property[index]``), * ``path`` as an array in the data structure (e.g. ``['data', 'property', 'index']``), * the whole ``definition`` which the ``value`` has to fulfil (e.g. ``{'type': 'number', 'maximum': 42}``), * ``rule`` which the ``value`` is breaking (e.g. ``maximum``) * and ``rule_definition`` (e.g. ``42``). .. versionchanged:: 2.14.0 Added all extra properties. """ def __init__(self, message, value=None, name=None, definition=None, rule=None): super().__init__(message) self.message = message self.value = value self.name = name self.definition = definition self.rule = rule @property def path(self): return [item for item in SPLIT_RE.split(self.name) if item != ''] @property def rule_definition(self): if not self.rule or not self.definition: return None return self.definition.get(self.rule) class JsonSchemaDefinitionException(JsonSchemaException): """ Exception raised by generator of validation function. """ PK{5ZGLLib/site-packages/setuptools/config/_validate_pyproject/extra_validations.pynuW+A"""The purpose of this module is implement PEP 621 validations that are difficult to express as a JSON Schema (or that are not supported by the current JSON Schema library). """ from typing import Mapping, TypeVar from .error_reporting import ValidationError T = TypeVar("T", bound=Mapping) class RedefiningStaticFieldAsDynamic(ValidationError): """According to PEP 621: Build back-ends MUST raise an error if the metadata specifies a field statically as well as being listed in dynamic. """ def validate_project_dynamic(pyproject: T) -> T: project_table = pyproject.get("project", {}) dynamic = project_table.get("dynamic", []) for field in dynamic: if field in project_table: msg = f"You cannot provide a value for `project.{field}` and " msg += "list it under `project.dynamic` at the same time" name = f"data.project.{field}" value = {field: project_table[field], "...": " # ...", "dynamic": dynamic} raise RedefiningStaticFieldAsDynamic(msg, value, name, rule="PEP 621") return pyproject EXTRA_VALIDATIONS = (validate_project_dynamic,) PK{5Z# # \Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/__init__.cpython-311.pycnuW+A b;dUddlmZddlmZmZmZddlmZddlm Z m Z ddl m Z ddl mZmZddlmZgd Zd ejDZeeeegeffed <d ed efdZdS))reduce)AnyCallableDict)formats)detailed_errorsValidationError)EXTRA_VALIDATIONS)JsonSchemaExceptionJsonSchemaValueException)validate)rFORMAT_FUNCTIONSr r r r ci|]G}t||jd+|jdd|HS)_-)callable__name__ startswithreplace).0fns }E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/config/_validate_pyproject/__init__.py rsb666 ||6K223776KS!!2666rdatareturnct5t|tdddn #1swxYwYtdt|dS)z~Validate the given ``data`` object using JSON Schema This function raises ``ValidationError`` if ``data`` is invalid. )custom_formatsNc||S)N)accrs rzvalidate..!s22c77rT)r _validaterrr )rs rrrs   99$'78888999999999999999 " "$5t<<< 4s 266N) functoolsrtypingrrrrerror_reportingr r extra_validationsr fastjsonschema_exceptionsr r fastjsonschema_validationsrr$__all____dict__valuesrstrbool__annotations__r!rrr2s/&&&&&&&&&&========000000TTTTTTTT======   66%%''666$sHcUD[11234rPK{5Z~``eLib/site-packages/setuptools/config/_validate_pyproject/__pycache__/extra_validations.cpython-311.pycnuW+A b;drdZddlmZmZddlmZedeZGddeZd ed efd ZefZ d S) zThe purpose of this module is implement PEP 621 validations that are difficult to express as a JSON Schema (or that are not supported by the current JSON Schema library). )MappingTypeVar)ValidationErrorT)boundceZdZdZdS)RedefiningStaticFieldAsDynamiczAccording to PEP 621: Build back-ends MUST raise an error if the metadata specifies a field statically as well as being listed in dynamic. N)__name__ __module__ __qualname____doc__E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/config/_validate_pyproject/extra_validations.pyr r srr pyprojectreturnc|di}|dg}|D]7}||vr1d|d}|dz }d|}|||ddd|i}t|||d 8|S) Nprojectdynamicz(You cannot provide a value for `project.z` and z0list it under `project.dynamic` at the same timez data.project.z...z # ...zPEP 621)rule)getr )r project_tablerfieldmsgnamevalues rvalidate_project_dynamicrsMM)R00M 2..GSS M ! !JUJJJC E EC*5**DM%0%9gVE0eT RRR R " rN) rtypingrrerror_reportingrrr rEXTRA_VALIDATIONSrrrr"s $#######,,,,,, GCw_  a    ./rPK{5ZcCnLib/site-packages/setuptools/config/_validate_pyproject/__pycache__/fastjsonschema_validations.cpython-311.pycnuW+A b;dL6dZddlZddlmZejdejdejdejdd ZedZidfd Zidfd Z idfd Z idfd Z idfdZ idfdZ idfdZidfdZidfdZidfdZidfdZdS)z2.15.3N)JsonSchemaValueException^.*$.+^.+$z^[^@]+@[^@]+\.[^@]+\Z)rrridn-email_re_patternc2t|||pddz|S)Ndata)[validate_https___packaging_python_org_en_latest_specifications_declaring_build_dependenciesr custom_formats name_prefixs E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/config/_validate_pyproject/fastjsonschema_validations.pyvalidatersE_`dftxCxMGMQSwSTTT Kc&!t|tstd|pdzdz|d|pdzdzdddgddd dd d d gd d didddddd ddgddddddgddddddgdidddd dd!dd"d#dd$dd%d&gd'd(gd)dgd*d'dd+d,dd-d.gd'id,gd/d0dd1d2id0gd/gid3dgd4d5d6id3gd/gd7gd8d9dd:d;dd?d,dd@dAgd'id,gd/d0dgdBd'id0gd/gdCdDd dEdFigdGdHdId dEdFidJdKgdHdLd d didMdNdOd ddPdQdRdSdTgdHdUddVd dWddXdYidZd[d\d]d^gd_d`d\gdad_dbgdcdddeid dWdEd\iidfdgd dhdEdiidjdkddlddd id dWd dEdiidmidndod dpdqgdrgdsiddgd dogdodtd!idugdvidwgdxdyd!gdzgd{dFd|d}ddd~dgd'ddddRddd\ddgddddid dWdddgdddiddiddddddd ddddgdddddd2idd diidddddgddd idd d didmdddgd dd dYddddgd dd dYdddddddd d didddddgd d diddgddd dddYddEdigd8dgddd ddddidtdigidd diiddgddd ddddidtdigidd d didmiddgddddgd¢dd ddddidtdigidd d didmiddd dddYddŜddd dddYdddgdʢddd d didmid˜dgd͢dddddYid˜dd d diddggdҢddԜdoddd ddgdEdidEdigd8dEdidEdidEdidEdiddddid ddEdiidۜdEdidd3d diiigd,gdݜdޜdߜddddd d,dd did d didmgiid,gdddddgdd dd diidgddddd ddddgd dd d didd ddgd didd ddgd diddddgd'ddidddddddddddgdidddd dd!dd"d#dd$dd%d&gd'd(gd)dgd*d'dd+d,dd-d.gd'id,gd/d0dd1d2id0gd/gid3dgd4d5d6id3gd/gd7gd8d9dd:d;dd?d,dd@dAgd'id,gd/d0dgdBd'id0gd/gdCdDd dEdFigdGdHdId dEdFidJdKgdHdLd d didMdNdOd ddPdQdRdSdTgdHdUddVd dWddXdYidZd[d\d]d^gd_d`d\gdad_dbgdcdddeid dWdEd\iidfdgd dhdEdiidjdkddlddd id dWd dEdiidmidndod dpdqgdrgdsiddgd dogdodtd!idugdvidwgdxdyd!gdzgd{dFd|d}ddd~dgd'ddddRddd\ddgddddid dWdddgdddiddiddddddd dd t|t}| r%t|}d|vry|d|dttsDtd|pdzdzd|pdzdzdd d d gd d didddddd ddgddddddgdd tt}|rt }tfddDsFtd|pdzdzd|pdzdzdd d d gd d didddddd ddgddddddgddt}d|vr|dd}t|ttfs.td|pdzdz|d|pdzdzd gd d didd t|ttf} | rt |} t|D]y\} } t| ts_td|pdzdj ditzdz| d|pdzdj ditzdzd did zd|vr|dd} t| ts*td|pdzd z| d|pdzd zddddd t| tr;|d| s*td|pdzd z| d|pdzd zddddddd |vr!|d d }t|ttfs/td|pdzd z|d|pdzdzd ddgddddd t|ttf}|rt |}t|D]z\}}t|ts`td|pdzdj ditzdz|d|pdzdj ditzdzdddd {|rZtd|pdzdzt|zdzd|pdzdzdd d d gd d didddddd ddgddddddgddd|vr6|d|d}t|||pddzd|vr|d|d}t|tstd|pdzdz|d|pdzdzddddgdddddd2idd diidddddgddd idd d didmdddgd dd dYddddgd dd dYdddddddd d didddddgd d diddgddd dddYddEdigd8dgddd ddddidtdigidd diiddgddd ddddidtdigidd d didmiddgddddgd¢dd ddddidtdigidd d didmiddd dddYddŜddd dddYdddgdʢddd d didmid˜dgd͢dddddYid˜dd d diddggdҢddԜdoddd ddgdEdidEdigd8dEdidEdidEdidEdiddddid ddEdiidۜdEdidd3d diiigd,gdݜdޜdߜddddd d,dd did d didmgiid,gdddddgdd dd diidgddddd ddddgd dd d didd ddgd didd ddgd diddddgd'ddidddddd t|t}|rt|}d|vr6|d|d}t|||pddzd|vr6|d|d}t!|||pddz|rtd|pdzdzt|zdz|d|pdzdzdddgddd dd d d gd d didddddd ddgddddddgddddddgdidddd dd!dd"d#dd$dd%d&gd'd(gd)dgd*d'dd+d,dd-d.gd'id,gd/d0dd1d2id0gd/gid3dgd4d5d6id3gd/gd7gd8d9dd:d;dd?d,dd@dAgd'id,gd/d0dgdBd'id0gd/gdCdDd dEdFigdGdHdId dEdFidJdKgdHdLd d didMdNdOd ddPdQdRdSdTgdHdUddVd dWddXdYidZd[d\d]d^gd_d`d\gdad_dbgdcdddeid dWdEd\iidfdgd dhdEdiidjdkddlddd id dWd dEdiidmidndod dpdqgdrgdsiddgd dogdodtd!idugdvidwgdxdyd!gdzgd{dFd|d}ddd~dgd'ddddRddd\ddgddddid dWdddgdddiddiddddddd ddddgdddddd2idd diidddddgddd idd d didmdddgd dd dYddddgd dd dYdddddddd d didddddgd d diddgddd dddYddEdigd8dgddd ddddidtdigidd diiddgddd ddddidtdigidd d didmiddgddddgd¢dd ddddidtdigidd d didmiddd dddYddŜddd dddYdddgdʢddd d didmid˜dgd͢dddddYid˜dd d diddggdҢddԜdoddd ddgdEdidEdigd8dEdidEdidEdidEdiddddid ddEdiidۜdEdidd3d diiigd,gdݜdޜdߜddddd d,dd did d didmgiid,gdddddgdd dd diidgddddd ddddgd dd d didd ddgd didd ddgd diddddgd'ddidddddddddddgdidddd dd!dd"d#dd$dd%d&gd'd(gd)dgd*d'dd+d,dd-d.gd'id,gd/d0dd1d2id0gd/gid3dgd4d5d6id3gd/gd7gd8d9dd:d;dd?d,dd@dAgd'id,gd/d0dgdBd'id0gd/gdCdDd dEdFigdGdHdId dEdFidJdKgdHdLd d didMdNdOd ddPdQdRdSdTgdHdUddVd dWddXdYidZd[d\d]d^gd_d`d\gdad_dbgdcdddeid dWdEd\iidfdgd dhdEdiidjdkddlddd id dWd dEdiidmidndod dpdqgdrgdsiddgd dogdodtd!idugdvidwgdxdyd!gdzgd{dFd|d}ddd~dgd'ddddRddd\ddgddddid dWdddgdddiddiddddddd dd|S(Nr r  must be object&http://json-schema.org/draft-07/schemazShttps://packaging.python.org/en/latest/specifications/declaring-build-dependencies/z+Data structure for ``pyproject.toml`` files)zKFile format containing build-time configurations for the Python ecosystem. zO:pep:`517` initially defined a build-system independent format for source treeszQwhich was complemented by :pep:`518` to provide a way of specifying dependencies zfor building Python projects.zYPlease notice the ``project`` table (as initially defined in :pep:`621`) is not includedz3in this schema and should be considered separately.objectFz&Table used to store build-related dataarray)zKList of dependencies in the :pep:`508` format required to execute the buildz9system. Please notice that the resulting dependency graphz**MUST NOT contain cycles**typestringr $$descriptionitemszLPython object that will be used to perform the build according to :pep:`517`zpep517-backend-referencer descriptionformatzDList of directories to be prepended to ``sys.path`` when loading thezback-end, and running its hooksz0Should be a path (TODO: enforce it with format?))r$comment)requires build-backend backend-pathr!)rradditionalProperties propertiesrequiredQhttps://packaging.python.org/en/latest/specifications/declaring-project-metadata/0Package metadata stored in the ``project`` tableBData structure for the **project** table inside ``pyproject.toml``$(as initially defined in :pep:`621`)nameIThe name (primary identifier) of the project. MUST be statically defined.pep508-identifierversion6The version of the project as supported by :pep:`440`.pep440r'The `summary description of the projectF`_rrreadmezA`Full/detailed description of the project in the form of a READMEz4`_zGwith meaning similar to the one defined in `core metadata's DescriptionzJ`_zDRelative path to a text file (UTF-8) containing the full descriptionzDof the project. If the file path ends in case-insensitive ``.md`` orz8``.rst`` suffixes, then the content-type is respectivelyz#``text/markdown`` or ``text/x-rst``anyOffile(e.g. ``text/markdown``). The ``charset`` parameter is assumedzUTF-8 when not present."TODO: add regex pattern or format?rrr rallOfroneOfrequires-pythonpep508-versionspec/`The Python version requirements of the projectO`_.rrrlicenseG`Project license `_.DRelative path to the file (UTF-8) which contains the license for theproject.z7The license of the project whose meaning is that of thez%`License field from the core metadatazG`_.rrFauthors$ref#/definitions/authorzJThe people or organizations considered to be the 'authors' of the project.zNThe exact meaning is open to interpretation (e.g. original or primary authors,z/current maintainers, or owners of the package).rrr maintainersNThe people or organizations considered to be the 'maintainers' of the project.FSimilarly to ``authors``, the exact meaning is open to interpretation.keywordsNList of keywords to assist searching for the distribution in a larger catalog.rrr classifierstrove-classifier3`PyPI classifier `_.rrr4`Trove classifiers `_which apply to the project.urls@URLs associated with the project in the form ``label => value``.rurlrrrrr$patternPropertiesscripts#/definitions/entry-point-groupzDInstruct the installer to create command-line wrappers for the givenL`entry points `_.)rSr gui-scripts)z;Instruct the installer to create GUI wrappers for the givenrkzJThe difference between ``scripts`` and ``gui-scripts`` is only relevant inzWindows. entry-pointsz@Instruct the installer to expose the given modules/functions viaz9``entry-point`` discovery mechanism (useful for plugins).z9More information available in the `Python packaging guidez>`_.rpython-entrypoint-groupr propertyNamesr$rh dependencies!Project (mandatory) dependencies.#/definitions/dependencyrrroptional-dependencies#Optional dependency for the projectrrrrrqr$rhdynamicGSpecifies which fields are intentionally unspecified and expected to be#dynamically provided by build toolsenumr.rr4rGrLrRrWrZr]rcrirlrmrrrvconst version is listed in ``dynamic``containsrr&r% zAccording to :pep:`621`:zH If the core metadata specification lists a field as "Required", thenzH the metadata MUST specify the field statically or list it in dynamicz"In turn, `core metadata`_ defines:z= The required fields are: Metadata-Version, Name, Version.z& All the other fields are optional.zISince ``Metadata-Version`` is defined by the build back-end, ``name`` andzE``version`` are the only mandatory information in ``pyproject.toml``.zM.. _core metadata: https://packaging.python.org/specifications/core-metadata/notz $$comment=version should be statically defined in the ``version`` fieldr&rAuthor or Maintainer=https://www.python.org/dev/peps/pep-0621/#authors-maintainersIMUST be a valid email name, i.e. whatever can be put as a name, before anemail, in :rfc:`822`. idn-emailMUST be a valid email addressr+email$idtitler rr% Entry-pointszLEntry-points are grouped together to indicate what sort of capabilities theyzprovide.zSee the `packaging guidesz=`_zand `setuptools docszC`_zfor more information.python-entrypoint-name6Reference to a Python object. It is either in the form<``importable.module``, or ``importable.module:object.attr``.python-entrypoint-reference9https://packaging.python.org/specifications/entry-points/rrrr rrrrrqr$rh Dependency5Project dependency specification according to PEP 508pep508rrrrrauthorzentry-point-group dependency $schemarrrrr%r&r$ifthen definitions"https://docs.python.org/3/install/``tool.distutils`` tablezGOriginally, ``distutils`` allowed developers to configure arguments forz7``setup.py`` scripts via `distutils configuration fileszE`_.z@``tool.distutils`` subtables could be used with the same purposez(NOT CURRENTLY IMPLEMENTED).global4Global options applied to all ``distutils`` commandsrCTODO: Is there a practical way of making this schema more specific?rrrrrr%rhr =https://setuptools.pypa.io/en/latest/references/keywords.html``tool.setuptools`` table zLPlease notice for the time being the ``setuptools`` project does not specifyz3a way of configuring builds via ``pyproject.toml``.zMTherefore this schema should be taken just as a *"thought experiment"* on howz@this *might be done*, by following the principles established inzO`ini2toml `_.z,It considers only ``setuptools`` `parameterszJ`_zTthat can currently be configured via ``setup.cfg`` and are not covered by :pep:`621`zGbut intentionally excludes ``dependency_links`` and ``setup_requires``.zINOTE: ``scripts`` was renamed to ``script-files`` to avoid confusion withz2entry-point based scripts (defined in :pep:`621`). platformsprovides?Package and virtual package names contained within this package**(not supported by pip)**rrr obsoletes,Packages which this package renders obsoletezip-safeDWhether the project can be safely installed and run from a zip file.booleanrr script-files`_.*include-package-datazCAutomatically include any data files inside the package directoriesz%that are specified by ``MANIFEST.in``rrrrexclude-package-datazLMapping from package names to lists of glob patterns that should be excludedrrnamespace-packagesEhttps://setuptools.pypa.io/en/latest/userguide/package_discovery.htmlrrr py-modules'Modules that setuptools will manipulate0TODO: clarify the relationship with ``packages`` data-fileszM**DEPRECATED**: dict-like structure where each key represents a directory andzFthe value is a list of glob patterns that should be installed in them.zBPlease notice this don't work with wheels. See `data files supportzA`_rrrhcmdclasszMMapping of distutils-style command names to ``setuptools.Command`` subclasseszJwhich in turn should be represented by strings with a qualified class namez+(i.e., "dotted" form with module), e.g.:: z; cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"} zFThe command class should be a directly defined at the top-level of thez%containing module (no class nesting).python-qualified-identifier license-filesKPROVISIONAL: List of glob patterns for all license files being distributed.%(might become standard with PEP 639).z LICEN[CS]E*z COPYING*z NOTICE*zAUTHORS*HTODO: revise if PEP 639 is accepted. Probably ``project.license-files``?rrrdefaultr @Instructions for loading :pep:`621`-related metadata dynamicallyBA version dynamically loaded via either the ``attr:`` or ``file:``Mdirectives. Please make sure the given file or attribute respects :pep:`440`.#/definitions/attr-directive#/definitions/file-directivepython-identifierrrqr$rhr%r7r&r.r]rrrrmrvr4rrr$r%'file:' directiveBValue is read from a file (or list of files and then concatenated)rrrrr$r%r&'attr:' directiveHValue is read from a module attribute. Supports callables and iterables;(unsupported types are cast via ``str()``attrrrrrr$r%r&'find:' directivefindDynamic `package discoveryJ`_.BDirectories to be searched for packages (Unix-style relative path)rrrznvalidate_https___packaging_python_org_en_latest_specifications_declaring_build_dependencies..-s)NN4#44NNNNNNr)r!z2.build-system must contain ['requires'] propertiesr&z$.build-system.requires must be arrayz.build-system.requiresz7.build-system.requires[{data__buildsystem__requires_x}] must be stringr"z*.build-system.build-backend must be stringz.build-system.build-backendz<.build-system.build-backend must be pep517-backend-referencer#z(.build-system.backend-path must be arrayz.build-system.backend-pathz>.build-system.backend-path[{data__buildsystem__backendpath_x}]z.build-system must not contain propertiesr$rz.projectrz.tool must be objectz.toolrz.tool.distutilsrz.tool.setuptools must not contain r) isinstancedictrsetkeysremovelenalllisttuple enumeratestrrlocalsYvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata*validate_https___docs_python_org_3_installFvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html)r rr data_is_dict data_keysdata__buildsystem_is_dictdata__buildsystem_lendata__buildsystem_keysdata__buildsystem__requires#data__buildsystem__requires_is_listdata__buildsystem__requires_lendata__buildsystem__requires_x data__buildsystem__requires_itemdata__buildsystem__buildbackenddata__buildsystem__backendpath&data__buildsystem__backendpath_is_list"data__buildsystem__backendpath_len data__buildsystem__backendpath_x#data__buildsystem__backendpath_item data__project data__tooldata__tool_is_dictdata__tool_keysdata__tool__distutilsdata__tool__setuptoolsrs @rr r s;i dT # #Hu&r[-BF'CFW'W_cjlp{qF@FkGJLkLeMVkvcvb vb vb l t N S } EV~X]CJ]H]H]HTZ\dSezfzfBJ[iuOyPyPkrFLNoEpDLZL{M{MbNbNmOmO^h]it jt jCktGRDX\^D WE O W g kuh n y A!R!]"i"|"p }"p }"g ku"H#S#[#l#d$p$x$J#y$J#y$g ku{$H%S%[%o%X&Z&b'n%c'J%d'J%d'g kuf'n'B(X,B(X,B(X,m,u,H-{0H-{0H-{0d,|0d,|0G1O1\1c1v1|1G2O2c2a3c3t3b2u3~1v3~1v3u1w3F4L4E4M4f1N4f1N4`4f4q4y4J5m5h4n5h4n5_4o5~5D6}5E6P4F6P4F6e1G6[1H6Z6h6s6{6N7a9N7a9N7a9o9S:j6T:j6T:Y6U:d:r:c:s:J6t:J6t:Z1u:~0v:~0v:c,w:p'x:p'x:g kuz:K;V;^;j;~;RQM;X>M;X>g kuZ>c>u>~?Z@`@k@s@GAMBOBYBFAZBb@[Bb@[BY@\BkBqBjBrBJ@sBJ@sBECKCVC^CqC`FqC`FqC`FMCaFMCaFDCbFqFwFpFxFuByFuByFI@zFe>{Fe>{Fg ku}FFGQGXGdGjGlGBHcGCHVHiKVHiKVHiKHGjKHGjKg kulKyKDLKLWL]L_LuLVLvLJMZN\NdOIMeO{KfO{KfOg kuhOrO}ODPPPVPXP`POPaPrPBRtOCRtOCRg kuERRR]RdRxR@SLS^SoSdToReToReTyToUqUNVxTOVTRPVTRPVg kuRVXVcVkV|V~WXX]XuX{XFYNYZY_Y}X`Y}X`YtX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u}^u}^ueu{u|u|u|u |u Krc$$Uxt|tsltd|pdzdz|d|pdzdzdddgddd id d d d iddddgd d ddddddgd d dddddddddd d d idddd d!gd d d idd"gd#d$d d d%dd&d'd(dd d)dd*d+gd d,d d d id-d d.d/gd d id0d d1d/gd d id0dd2d3gd4d5d6id7gd8d9gd:dd d;dd d iid?d@gdAdd d;dd d d idid?dCgdDddEdFgdGdd d;dd d d idid?dHd d d%ddIdJdKdLd d d%ddMddNgdOdd>d d d ididPdQgdRdd>d dSdidPdTd d d idUdVggdWdXdYdZdd[d d\d]gd^d_d`dagdd dbd d iidbgdcdddedfdd dgd;d d id d d idgiidggdhgd8dddedfdd dgd;d d id d d idgiidggdhdddedfdd dgd;d d id d d idgiidggdhdddedfdd dgd;d d id d d idgiidggdhdddedfdd dgd;d d id d d idgiidggdhddd d iid?d st|%t}&|&rt|%}'|%D]\}(})t d>|(r|(|'vr|'|(t|)tsZtd|pdzdj ditzdwz|)d|pdzdj ditzdzd d id s|'rKtd|pdzdzt|'zdz|%d|pdzdzgd:dd d;dd d iid?dst|%}*|*dkrSd}+|%D]}( d},|,dkrc t|(tr7|d%|(s&td|pdzdz|(d|pdzdzdd d iid?dsd@|vr|d@|d@}-t|-ts;td|pdzdz|-d|pdzdzgdAdd d;dd d d idid?d st|-t}.|.r]t|-}/|-D]j\}0}1t d>|0rC|0|/vr|/|0t|1t tfs]td|pdzdj ditzdz|1d|pdzdj ditzdzd d d idd st|1t tf}2|2rt|1}3t|1D]t\}4}5t|5tsZtd|pdzdj ditzdwz|5d|pdzdj ditzdzd d id sul|/rNtd|pdzdzt|/zdz|-d|pdzdzgdAdd d;dd d d idid?dst|-}6|6dkrVd}7|-D]}0 d}8|8dkrc t|0tr7|d%|0s&td|pdzdz|0d|pdzdzdd d d idid?dsdC|vr[|dC|dC}9t|9ts)td|pdzdz|9d|pdzdzgdDddEd sdF|vr|dF|dF}:t|:ts;td|pdzdz|:d|pdzdzgdGdd d;dd d d idid?d st|:t};|;r]t|:}<|:D]j\}=}>t d>|=rC|=|t tfs]td|pdzdj ditzdz|>d|pdzdj ditzdzd d d idd st|>t tf}?|?rt|>}@t|>D]t\}A}Bt|BtsZtd|pdzdj ditzdwz|Bd|pdzdj ditzdzd d id sul|d d d idid?dst|:}C|CdkrVd}D|:D]}= d}E|Edkrc t|=tr7|d%|=s&td|pdzdz|=d|pdzdzdd d d idid?dsdH|vr|dH|dH}Ft|Ft tfs+td|pdzdz|Fd|pdzdzd d d%ddIdJd st|Ft tf}G|Grt|F}Ht|FD]\}I}Jt|Jts[td|pdzdj ditzdwz|Jd|pdzdj ditzdzd d%dd st|Jtrl|d%|Js[td|pdzdj ditzdz|Jd|pdzdj ditzdzd d%ddd d d ididPd st|Pt}Q|Qrt|P}R|PD]j\}S}Tt d>|SrC|S|Rvr|R|St|Tt tfs]td|pdzdj ditzdz|Td|pdzdj ditzdzd d d idd st|Tt tf}U|Urt|T}Vt|TD]t\}W}Xt|XtsZtd|pdzdj ditzdwz|Xd|pdzdj ditzdzd d id suldQ|vr|dQ|dQ}Yt|Yts/td|pdzdz|Yd|pdzdzgdRdd>d dSdidPd st|Yt}Z|Zrht|Y}[|YD]1\}\}]t d>|\r |\|[vr|[|\t|]ts[td|pdzdj ditzdwz|]d|pdzdj ditzdzd dSdd st|]trl|dS|]s[td|pdzdj ditzdz|]d|pdzdj ditzdzd dSddd d iid?d@gdAdd d;dd d d idid?dCgdDddEdFgdGdd d;dd d d idid?dHd d d%ddIdJdKdLd d d%ddMddNgdOdd>d d d ididPdQgdRdd>d dSdidPdTd d d idUdVggdWdXdYdZdd[d d\d]gd^d_d`dagdd dbd d iidbgdcdddedfdd dgd;d d id d d idgiidggdhgd8dddedfdd dgd;d d id d d idgiidggdhdddedfdd dgd;d d id d d idgiidggdhdddedfdd dgd;d d id d d idgiidggdhdddedfdd dgd;d d id d d idgiidggdhdd.exclude-package-data must be named by propertyName definitionz!.namespace-packages must be arrayz.namespace-packagesz0.namespace-packages[{data__namespacepackages_x}]z.py-modules must be arrayz .py-modulesz .py-modules[{data__pymodules_x}]z.data-files must be objectz .data-filesz!.data-files.{data__datafiles_key}z:.data-files.{data__datafiles_key}[{data__datafiles_val_x}]z.cmdclass must be objectz .cmdclassz.cmdclass.{data__cmdclass_key}z$ must be python-qualified-identifierz.license-files must be arrayz.license-filesz&.license-files[{data__licensefiles_x}]z.dynamic must be object.dynamicr.z.dynamic.versionz8.dynamic.version must be valid exactly by one definitionr]z.dynamic.classifiersrz.dynamic.descriptionrrz.dynamic.dependenciesrmz.dynamic.entry-pointsrvz-.dynamic.optional-dependencies must be objectz.dynamic.optional-dependencieszH.dynamic.optional-dependencies.{data__dynamic__optionaldependencies_key}z0.dynamic.optional-dependencies must not contain z8.dynamic.optional-dependencies must be python-identifierzG.dynamic.optional-dependencies must be named by propertyName definitionr4z.dynamic.readmez+.dynamic.readme.content-type must be stringz.dynamic.readme.content-typez5.dynamic.readme cannot be validated by any definitionr7c3 K|]}|vV dSrr)rrdata__dynamic__readmes rr zYvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html..s)"V"VT4+@#@"V"V"V"V"V"Vrr8z0.dynamic.readme must contain ['file'] propertiesr&z.dynamic must not contain r#r)r$r%rr&r'r(r+r,r)r-r.rr/boolbvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_find_directiverREGEX_PATTERNSsearchbvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_attr_directivebvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_file_directiver*)yr rrr3r4data__platformsdata__platforms_is_listdata__platforms_lendata__platforms_xdata__platforms_itemdata__providesdata__provides_is_listdata__provides_lendata__provides_xdata__provides_itemdata__obsoletesdata__obsoletes_is_listdata__obsoletes_lendata__obsoletes_xdata__obsoletes_item data__zipsafedata__scriptfilesdata__scriptfiles_is_listdata__scriptfiles_lendata__scriptfiles_xdata__scriptfiles_itemdata__eagerresourcesdata__eagerresources_is_listdata__eagerresources_lendata__eagerresources_xdata__eagerresources_itemdata__packagesdata__packages_one_of_count1data__packages_is_listdata__packages_lendata__packages_xdata__packages_itemdata__packagedirdata__packagedir_is_dictdata__packagedir_keysdata__packagedir_keydata__packagedir_valdata__packagedir_lendata__packagedir_property_names"data__packagedir_key_one_of_count2data__packagedatadata__packagedata_is_dictdata__packagedata_keysdata__packagedata_keydata__packagedata_valdata__packagedata_val_is_listdata__packagedata_val_lendata__packagedata_val_xdata__packagedata_val_itemdata__packagedata_len data__packagedata_property_names#data__packagedata_key_one_of_count3data__includepackagedatadata__excludepackagedata data__excludepackagedata_is_dictdata__excludepackagedata_keysdata__excludepackagedata_keydata__excludepackagedata_val$data__excludepackagedata_val_is_list data__excludepackagedata_val_lendata__excludepackagedata_val_x!data__excludepackagedata_val_itemdata__excludepackagedata_len'data__excludepackagedata_property_names*data__excludepackagedata_key_one_of_count4data__namespacepackagesdata__namespacepackages_is_listdata__namespacepackages_lendata__namespacepackages_xdata__namespacepackages_itemdata__pymodulesdata__pymodules_is_listdata__pymodules_lendata__pymodules_xdata__pymodules_itemdata__datafilesdata__datafiles_is_dictdata__datafiles_keysdata__datafiles_keydata__datafiles_valdata__datafiles_val_is_listdata__datafiles_val_lendata__datafiles_val_xdata__datafiles_val_itemdata__cmdclassdata__cmdclass_is_dictdata__cmdclass_keysdata__cmdclass_keydata__cmdclass_valdata__licensefilesdata__licensefiles_is_listdata__licensefiles_lendata__licensefiles_xdata__licensefiles_item data__dynamicdata__dynamic_is_dictdata__dynamic_keysdata__dynamic__version$data__dynamic__version_one_of_count5data__dynamic__classifiersdata__dynamic__descriptiondata__dynamic__dependenciesdata__dynamic__entrypoints#data__dynamic__optionaldependencies+data__dynamic__optionaldependencies_is_dict(data__dynamic__optionaldependencies_keys'data__dynamic__optionaldependencies_key'data__dynamic__optionaldependencies_val'data__dynamic__optionaldependencies_len2data__dynamic__optionaldependencies_property_names#data__dynamic__readme_any_of_count6data__dynamic__readme_is_dictdata__dynamic__readme_keys"data__dynamic__readme__contenttypedata__d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G[S[SJPJRJR[S[SAAEE!F'12F'L'L%a/S~>R/STh/i/i)a2J2Q\Qf`fKgkTLT\pwy}H}RLRwSVdwdrz|PqQX`3a3a3a-a$F!$K$F$F'? E E E EAAEE!F';r'A'A.Fr[Mb\bGcgXHX`t{}ALAVPV{WZh{hv}AuBIP/Q/Q/Q)Q$F!$K$F$F'? E E E EAQFF&>r[EZTZ?[_U@UY]`cdF`G`GYGJ[Y[@\dxAEPEZTZ[^llzAEMOcDdgnprfsCtyu|C'D'D'D!D G7DDD>C;;;D:w 6r[=RF7SWN8NVfmos~sHBHmILZmZylylylv~X]qx|D F Z {[ ^ e g i ] j zk pl D J M S U ] L ^ C _ g` g` g v w w w w Y & &   ^ , , , $^ 4 /$88 Y .r[5JF/KNl/luFMOS^ShbhMil{M{ZzZzZzDLfkF J R T h I i l s u x k y H z ~{ S Y d k w }  G v H [ I [ I R J HK HK R X Y Y Y Y (23Dd(K(K %(( D ),->-C-C-E-E)F)F&DUD[D[D]D] [ [@)+@%f-445JKK [04JJJ299:OPPP)*?$OOs":2AVPV;W[I[B[I[U[ULRLTLT[U[U(>%(A--7;41BEE-EBC?BQFF!F'12G'M'M%d/S~>R/STi/j/j)d2J2Q\Qf`fKgkULU]ry{JTNTyUXgygu}StT[c3d3d3d-d$G1$L$G$G'? E E E EBQFF!F'<'C'C.Fr[Mb\bGcgZHZbw~@DODYSY~Z]l~lzACFyGNU/V/V/V)V$G1$L$G$G'? E E E EBaGG&>r[EZTZ?[_V@VZ^adeHaIaIZIL]Z]@^f{BDHSH]W]B^apBp~EIQSgHhkrtwjxGy}zAH'I'I'I!I H7EEE?D<<<E;D 6r[=RF7SWO8OWhoqu@uJDJoKN]o]|\|\|\fnH M a h l t v J k K N U W Z M [ j \ ` ] u { F M Y _ a i X j } k } k t l jm jm t C D D D D !Y . .   3 4 4 4'+,B'C $6?? [.r[5JF/KNu/u~V]_cncxrx]y|S]SryryryCL`M`MTZ[[[[ !Y . .   3 4 4 4'+,B'C $6?? w .r[5JF/KNt/t}U\^bmbwqw\x{R\RqXqXqXbjDI]dhprF gG J Q S V I W fX \Y q w B I U [ ] e T f y g y g p h _i _i p v w w w w /9:RTX/Y/Y ,/( b 034L4Q4Q4S4S0T0T-RjRpRpRrRr N NN02N%f-445QRR N7;XXX9@@A]^^^)*Fu VVX":2AVPV;W[X[Q[X[d[d[a[c[c[d[d@a'12SVY'['[!N*B2I^X^C_cBc{cBcNcNEKEMEMcNcNDNQbDbjKRTXcXmgmRnqPqIqPq\q\SYS[S[q\q\R\_aRaouwn@GM+N+N+N%N!N0 229N3OR{3{|A^}_}_4_`m4muMTVZeZoioTpsJTJiPiPiPZb|A U \ ` h j ~ _  B I K N A O ^ P T Q i o z A M S U ] L ^ q _ q _ h ` Wa Wa h ~     /23K/L/L,/144>B;8PLL4LIJFIAMM!F'12NPS'T'T%{/S~>R/STp/q/q){2J2Q\Qf`fKgk]L]eAHJNYNc]cHdg~H~LTVjKkrz3{3{3{-{$NRS$S$N$N'? E E E EIAMM!F'Cs'J'J.Fr[Mb\bGcgbHbjFMOS^ShbhMilCMCQXZ]P^el/m/m/m)m$NRS$S$N$N'? E E E EIQNN&>r[EZTZ?[_^@^bfilmWiXiXbX[lbl@muQXZ^i^smsXtwNXN\cgoqEfFIPRUHVeW[X_f'g'g'g!g O7LLLFKCCCLBb 6r[=RF7SWW8W_w~@DODYSY~Z]t~tSzSzSzDLfkF J R T h I i l s u x k y H z ~{ S Y d k w }  G v H [ I [ I R J AK AK R a b b b b 9 , ,   1 2 2 2&*+?&@ #5e}EE J.r[5JF/KNq/qzQXZ^i^smsXtwLXLbi}EQetftft{Y|Y|CIJJJJ.89PSWY^R_.`.` +. c.12I.J.J+OXYpOqOqccK-/K%&BSJJQ6r[=RF7SWPWIWPW\W\SYS[S[W\W\8\_p8pxT[]alavpv[wzszlzszzv|v~v~zz[BD[DZbnBQCQCJPQQQQ!">DDcC~.BCD`aac":2AVPV;W[T[M[T[`[`W]W_W_[`[`<`c@<@Hd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'`'r'E's'E's'p&t'f&u']&v'E(K(D(L(C#M(C#M(q(y(M)U)W)j)L)k)E*J*b*f*p*N+Y+l+}+A-K-S-m-r-C.I.L.S.W.]._.g.V.h.s.z.F/L/N/V/E/W/j.X/j.X/U.Y/K.Z/B.[/j/p/i/q/h*r/h*r/a*s/h(t/h(t/S0q0|0O1`1d2n2v2P3U3f3l3o3v3z3@4B4J4y3K4V4]4i4o4q4y4h4z4M4{4M4{4x3|4n3}4e3~4M5S5L5T5K0U5K0U5X5d5g5u5x5~5@6H6w5I6f5J6W5K6J0L6[6a6Z6b6@0c6@0c6Md6Md6ze6ze6l6r6s6s6s6s6$.}d$C$C !$Z p7%(););)=)=%>%>" 222&--i888-:9-E*;<8;a??>~@VXfiti~x~BThTUUU@AE@@7====;a??>~@VXfiti~x~BThTUUU@AE@@7====;q@@6r[=RF7SWQ8QUY\_`D\E\EUEHYUY8ZbxAEPEZTZ[^ppPTVeOf|OXvJ T V @ I A K S m r C I L R T \ K ] B ^ m s l t ru ru  ] h { LPZb|ARX[bflnvewBIU[]eTfygygdhZiQjyx@w Aw AqB}C}CJQRRRR $666&--m<<<1>}1M.vxRTbepeztz~TdTUUU $666&--m<<<1>}1M.vxRTbepeztz~TdTUUU!%777&--n===2?2O/vxSUcfqf{u{VeVWWW!%777&--n===1>~1N.vxRTbepeztz~UdUVVV*.@@@&--.EFFF:GH_:`7%&IDRR^ 6r[=RF7SWF8FNqxz~I~SMSxTWwxwMUiqsFhGaf~BLjuHY]goI N _ e h o s y { C r D O V b h j r a s F t F t q u g v ^ w F L E M DN DN }O DP DP W ] ^ ^ ^ ^ BLMprvBwBw?BI CFGjGoGoGqGqCrCr@qTqZqZq\q\bblCEl-d3::;bccb#JNv#v#v$L$S$ST{$|$|$|!CDkm{~I~SMSWa}a!b!b!bCq ":2AVPV;W[MQ/RSz/{/{)V2J2Q\Qf`fKgkeLemT[]alavpv[wzZ[ZhprEgFMU3V3V3V-V'?!_!_!_Y^$V$V$V!_#UI &>r[EZTZ?[_h@hpSZ\`k`uouZvyYZYowKSUhJiCH`dnLWj{I Q k p A G J Q U [ ] e T f q x D J L T C U h V h V S W I X @ Y h n g o fp fp _q fr fr y H 'I 'I 'I !I 111&--h777,9(,C):;7>>>~@UWehsh}w}ARgRSSS?1D??7====> > >$E$En$U$U$UI^_mIn$F+56X[^+`+`%o.Fr[Mb\bGcgTHT\~EGKVK`Z`EadBEBPVX`Oahn/o/o/o)o?1D??7====>a 6r[=RF7SWN8NVkrtxCxMGMrNQbrbB`k~OS]eDU[^eioqyhzELX^`hWi|j|jgk]lTm|B {C zD zD G S V d g m o w f x U y F z y{ J P I Q oR oR Y ` a a a a 4>?TVZ4[4[14c 478M4N4N1""V"V"V"VX"V"V"VVVc ":2AVPV;W[M[>NB[>NB[>NBXB`BzBBSCZC^CfChC|C]C}C@DGDIDKDCLD\CMDRCNDfDlDoDuDwDDnD@EeDAEI>BEI>BEFphDEREfEFJfEFJfEFJPJXJrJwJKKRKVK^K`KtKUKuKxKKALDLwKELTKFLJKGL_LeLpLwLCMIMKMSMBMTMgLUMgLUM^LVMTEWMTEWMFphYMoMCNJRCNJRCNJRTR]RqM^RqM^RFph`RvRJSqVJSqVJSqV{VCW]WbWvW}WAXIXKX_X@X`XcXjXlXoXbXpXWqXuWrXJYPY[YbYnYtYvY~YmYYRY@ZRY@ZIYAZxRBZxRBZFphDZXZcZjZ~ZF[R[f[uZg[uZg[u[|\ZZ}\ZZ}\Fph\K]]]F^P^W^k^s^^S_b^T_b^T_b_T`M]U`M]U`FphW`c`w`]ew`]ew`]egeoeGfMfXf_fkfqfsf{fjf|fOf}fOf}fFf~fe`fe`fFphAgKg_gcm_gcm_gcmmmumMnSn^nfnrnOoUnPoUnPoLnQoMgRoMgRoFphToconouoApGpIpQp@pRpfpsquq\rep]rjr^sjr^sjr^slsvteowteowtFphytBuMuUufuhvBwGwvwzx|xKzuwLzbzuz~z\{p{z|||f}o{g}q}y}S~X~i~o~r~x~z~Bq~Ch~DSY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kDnBlDIBmDIBmDVynDVynDWvoDWvoDNvpDItqDItqDAirDAirD}sD}sDzDPEQEQEQE QE KsFm mm)n nn'{%0Ay{% y {%y {%1z  {% z{%zA {%% {54{5G AK GAAH&H%AK H& AH3H0AK H2AH3H3 AK H=1AI/I.AK I/ AI<I9AK I;AI<I.'55D44<555555rrQz! must contain ['file'] propertiesr&rrJz.file must be stringz.filerz.file must be arrayz.file[{data__file_x}]r!z-.file must be valid exactly by one definitionrKrLr#r"r$r)r$r%rr)r*r&r'r(r.r+r,r-rr/) r rrr3data_lenr4 data__filedata__file_one_of_count7data__file_is_listdata__file_len data__file_xdata__file_items ` rrWrWs dT # #q&r[-BF'CFW'W_cjlp{qF@FkGJLkLaJ]nr|D^ctz}DHNPXGYdkw}GvH[I[IFJ|KsL[aZbYcYcjpqqq qdD))Let995555H55555 K*21F+GJm+muyACGRG\V\A]`bAbwU`sDHRZtyJPSZ^dfn]ozAMSU]L^q_q_\`RaIbqwpxoyoy@JKKK K $$ Y     V $ $ $fJ'( $'!++6%j388Y6r[=RF7SVl7lt~FHLWLa[aFbelFlz@BJyKRXYYYY,1,,/5555'!++ 6%j4-@@t6r[=RF7SVk7ks}EGKVK`Z`EadkEkAHTZ\dSexfxfmstttt)3Ju )N)N&)v),Z=Fz=R=Rvv9L/#-o#E#Ev&>r[EZTZ?[^|^u^|_I_I@F@H@H_I_I@IL]@]et{}ALAVPV{WZxZqZxZDZD{A{C{CZDZD{DGI{IW]_gVhou'v'v'v!vv,1,,/5555'1,,.r[5JF/KN}/}BFILMeIfIfBfizBz0{CMTVZeZoioTpszTzHOSY[cRdovBHJRASfTfTQUGV]deeee  e*21F+GJ^+^_bcl_m_m+mn{+{DHOQU`UjdjOknpOpEcnARV`hBGX^ahlrt|k}HO[ackZlmmjn`oWpE~F}G}GNdeee e Ks&AE E'&E'2C;I.. I;:I;c  tts3td|pdzdzd|pdzdzddddgdd d d d iid gd d tt}|r"t}t fddDs3td|pdzdzd|pdzdzddddgdd d d d iid gd dt }d |vrX|d d }t|ts&td|pdzdz|d|pdzdzd d id |rFtd|pdzdzt|zdzd|pdzdzddddgdd d d d iid gd dS)Nr r rrrrrrFrrrrrc3 K|]}|vV dSrrrs rr zuvalidate_https___setuptools_pypa_io_en_latest_references_keywords_html__definitions_attr_directive..3rr)rz! must contain ['attr'] propertiesr&z.attr must be stringz.attrr#r"r$) r$r%rr)r*r&r'r(r.)r rrr3rr4 data__attrs` rrVrV-s dT # #j&r[-BF'CFW'W_cjlp{qF@FkGJLkLcv]q{}gphrzTYjpsy{CrDiETZS[Y\Y\cijjj jdD))L ^t995555H55555 D*21F+GJm+muyACGRG\V\A]`bAbyLUsGQS}F~HPjo@FIOQYHZ[jpiqororyCDDD D $$ Y     V $ $ $fJj300 Q.r[5JF/KNd/dlv}DODYSY~Z]d~drxzBqCJPQQQQ  ^*21F+GJ^+^_bcl_m_m+mn{+{DHOQU`UjdjOknpOpGZcAU_aKTLV^x}NTW]_gVhMix~w}@}@G]^^^ ^ Krc t|tsStd|pdzdz|d|pdzdzddddddd d gdd d d didd ddgd didd ddgd diddddgdddidd t|t}|rRt|}d|vr|d|d}t|tsKtd|pdzdz|d|pdzdzdd d gdd d d didd ddgd didd ddgd diddddgdddd t|t}|r/t|}d|vr|d|d}t|t tfs*td|pdzdz|d|pdzd zd d d didd t|t tf} | rt|} t|D]t\} } t| tsZtd|pdzd!j d2itzd"z| d|pdzd!j d2itzdzd did ud#|vr|d#|d#} t| t tfs,td|pdzd$z| d|pdzd%zd ddgd didd t| t tf}|rt| }t| D]t\}}t|tsZtd|pdzd&j d2itzd"z|d|pdzd&j d2itzdzd did ud'|vr|d'|d'}t|t tfs,td|pdzd(z|d|pdzd)zd ddgd didd t|t tf}|rt|}t|D]t\}}t|tsZtd|pdzd*j d2itzd"z|d|pdzd*j d2itzdzd did ud+|vr[|d+|d+}t|ts)td|pdzd,z|d|pdzd-zdddgdd |r^td|pdzd.zt|zd/z|d|pdzdzdd d gdd d d didd ddgd didd ddgd diddddgdddd0|rftd|pdzd1zt|zd/z|d|pdzdzddddddd d gdd d d didd ddgd didd ddgd diddddgdddidd0|S)3Nr r rrrrFrrrrrrrrrrrrrrrr3rr rrz.find must be objectz.findr z.find.where must be arrayz .find.wherez".find.where[{data__find__where_x}]r!r z.find.exclude must be arrayz .find.excludez&.find.exclude[{data__find__exclude_x}]r z.find.include must be arrayz .find.includez&.find.include[{data__find__include_x}]r z .find.namespaces must be booleanz.find.namespacesz.find must not contain r"r$r#r)r$r%rr&r'r(r+r,r)r-r.rr/rR)r rrr3r4 data__finddata__find_is_dictdata__find_keysdata__find__wheredata__find__where_is_listdata__find__where_lendata__find__where_xdata__find__where_itemdata__find__excludedata__find__exclude_is_listdata__find__exclude_lendata__find__exclude_xdata__find__exclude_itemdata__find__includedata__find__include_is_listdata__find__include_lendata__find__include_xdata__find__include_itemdata__find__namespacess rrSrS?s dT # #O&r[-BF'CFW'W_cjlp{qF@FkGJLkLaJ]goIN_epxLhjvKwQV@D N U a g i q ` r ps ps I P d b d \ c ] i o q y h z @ { @ { Q X l prjk kw}GvHH IH IbkDF{~|Y}Y}f~f~gg^@YAYAHNOOO OdD))L3C $$ Y     V $ $ $fJj411 W.r[5JF/KNd/dlv}DODYSY~Z]d~dzBVrt@UA[`JNX_kqs{j|z}z}SZnl n f mg s y { C r D JE JE [ b v z | t u u AGIQ@RR SR SluINPEHFcGcGpHpHqIqIPVWWWW!+J!=!= !) Q"%joo&7&7"8"8o--#**7333(27(;%%&7$GG\6r[=RF7SVq7qzKRTXcXmgmRnq~R~[_ip|BDL{MKNKNU[\\\\0:;LtUZm0\0\-0W034E0F0F-KTUfKgKgWWG/1G#-.Ds#L#LW&>r[EZTZ?[_J_C_J_V_VMSMUMU_V_V@VYj@jrHOQU`UjdjOknYnRnYnene\b\d\dneneOehjOjx~@HwIPV'W'W'W!WW//#**9555*4Y*?'%&9D%=IIZ6r[=RF7SVs7s|OVX\g\qkqVruDVDZausumtnz@BJyKQLQLSYZZZZ2<=PSWY^R_2`2`/2a256I2J2J/OXYlOmOmaaK13K#-.F#N#Na&>r[EZTZ?[_N_G_N_Z_ZQWQYQY_Z_Z@Z]n@nvNUW[f[pjpUqtct\tctotoflfnfntotoUortUtBHJRASZ`'a'a'a!aa//#**9555*4Y*?'%&9D%=II`6r[=RF7SVs7s|OVX\g\qkqVruDVDZauy{stt@FHPQQRQRY_````2<=PSWY^R_2`2`/2a256I2J2J/OXYlOmOmaaK13K#-.F#N#Na&>r[EZTZ?[_N_G_N_Z_ZQWQYQY_Z_Z@Z]n@nvNUW[f[pjpUqtct\tctotoflfnfntotoUortUtBHJRASZ`'a'a'a!aa?22#**<888-7 -E*%&rrrrrz.global must be objectz.global .{data_key}r) r$r%rr&r'r(rrTrUrr/)r rrr3r4 data__globaldata_keydata_vals rr1r1ys\ dT # # &r[-BF'CFW'W_cjlp{qF@FkGJLkLeMVzE_re re re o w H P [ c t j R k R k G l D H K Q S [ J \ C ] k p Yq Yq x ~     dD))L O $$ y   X & & &>LlT33 ^.r[5JF/KNf/fnzBDHSH]W]B^ajBj@HYOwPwPW]^^^^"&**,, O O Hhd#**844 Oy(($$X...!(T33O229N3ORfR_RfRrRrioiqiqRrRr3rvG4GOW^`dodysy^z}Q}J}Q}]}]TZT\T\}]}]^]`b^bpvx@oAHNOOOO KrcT>QRttstd|pdzdzd|pdzdzdddddgd id d d d ddd ddddd ddgddgdd gddd ddd ddgdidgddd dd idgdgid!d gd"d#d$id!gdgd%gd&d'd d(d)d*gd+d,d-dd d.d/gdidgddd gd0didgdgd1d2d3d4d5d6d d d7d8gdd d9d:d;d<d=gd>d?d@d3d4d5d6d d d7d8gdd d9d:d;d<d=dAdBgd?dCd3dDd idEdFdGd3d dHdId;dJdKgd?dLd dMdNdOd dPdQidRdSdTdUd gdVdWdXidNdOd dYdZgd[d\d]id^d_dTdUd gdVdWdXidNdOd dYdZgd[d\d]id^d`gdadWdbidNdOdTdUd gdVdWdXidNdOd dYdZgd[d\d]id^idcddd3dedfdgd dhdidjdkdld dmdWd idNdOd3dfdgd dhdidjdnidodpd3dqdrgdsgdtidud gdNdpgdpdvdidwgdxidygdzd{dgd|gd}d4d5d6d d d7d8gdd d9d:d;d<d=dTdUd gdVdWdXidNdOd dYdZgd[d\d]id^dfdgd dhdidjd~d dDtt}|r#t}t fddDstd|pdzdzd|pdzdzdddddgd id d d d ddd ddddd ddgddgdd gddd ddd ddgdidgddd dd idgdgid!d gd"d#d$id!gdgd%gd&d'd d(d)d*gd+d,d-dd d.d/gdidgddd gd0didgdgd1d2d3d4d5d6d d d7d8gdd d9d:d;d<d=gd>d?d@d3d4d5d6d d d7d8gdd d9d:d;d<d=dAdBgd?dCd3dDd idEdFdGd3d dHdId;dJdKgd?dLd dMdNdOd dPdQidRdSdTdUd gdVdWdXidNdOd dYdZgd[d\d]id^d_dTdUd gdVdWdXidNdOd dYdZgd[d\d]id^d`gdadWdbidNdOdTdUd gdVdWdXidNdOd dYdZgd[d\d]id^idcddd3dedfdgd dhdidjdkdld dmdWd idNdOd3dfdgd dhdidjdnidodpd3dqdrgdsgdtidud gdNdpgdpdvdidwgdxidygdzd{dgd|gd}d4d5d6d d d7d8gdd d9d:d;d<d=dTdUd gdVdWdXidNdOd dYdZgd[d\d]id^dfdgd dhdidjd~d dt }d |vr|d d }t|ts(td|pdzdz|d|pdzdzd d d ddDt|tr9|d |s(td|pdzdz|d|pdzdzd d d ddWd|vr|dd}t|ts(td|pdzdz|d|pdzdzd ddddDt|tr9|d|s(td|pdzdz|d|pdzdzd ddddWd|vr[|dd}t|ts)td|pdzdz|d|pdzdzd ddgddDd|vr|ddRd} | dkrU tRts)td|pdzdzRd|pdzdzd gdddD| dz } n#t$rYnwxYw| dkr tRtsMtd|pdzdzRd|pdzdzd ddd ddgdidgddd dd idgdgid!d gd"d#d$id!gdgd%dDd} | s tRt} | rtR} t RfddDs/td|pdzdzRd|pdzdzdd ddgdidgddt R} d| vr[| dRd}t|ts)td|pdzdz|d|pdzdzd ddgddD| dz } n#t$rYnwxYw| s tRt} | rtR} t RfddDs-td|pdzdzRd|pdzdzdd dd idgddt R} d| vrY| dRd}t|ts'td|pdzdz|d|pdzdzd dd dD| dz } n#t$rYnwxYw| sd?dDt|ttf}|r:t|}t|D]\}}t|||pddzd@|vr|d@d@}t|ttfst'|>||pddzdl|vr|dldl}?t|?ts7td|pdzdz|?d|pdzdzd dmdWd idNdOd3dfdgd dhdidjdnidodDt|?t}@|@rKt |?}A|?D]\}B}Ct dO|Br|B|Avr|A|Bt|Cttfsatd|pdzdj ditzdz|Cd|pdzdj ditzdzd3dfdgd dhdidjdndDt|Cttf}D|Dr:t|C}Et|CD]\}F}Gt'|G||pddz|ArJtd|pdzdzt|Azdz|?d|pdzdzd dmdWd idNdOd3dfdgd dhdidjdnidodȬt|?}H|Hdkrd}I|?D]a}B t|Btr7|d |Bs&td|pdzdz|Bd|pdzdzdWd idWP#t$rdN}IY^wxYw|Is7td|pdzdz|?d|pdzdzd dmdWd idNdOd3dfdgd dhdidjdnidodѬdp|vr |dpdp}Jt|Jttfs.td|pdzdz|Jd|pdzdzd3dqdrgdsgdtidudDt|Jttf}K|Krt|J}Lt|JD]e\}M}N|Ndtvr\td|pdzdj ditzdz|Nd|pdzdj ditzdzdsgdtidsf|rtd|pdzdzt|zdzd|pdzdzdddddgd id d d d ddd ddddd ddgddgdd gddd ddd ddgdidgddd dd idgdgid!d gd"d#d$id!gdgd%gd&d'd d(d)d*gd+d,d-dd d.d/gdidgddd gd0didgdgd1d2d3d4d5d6d d d7d8gdd d9d:d;d<d=gd>d?d@d3d4d5d6d d d7d8gdd d9d:d;d<d=dAdBgd?dCd3dDd idEdFdGd3d dHdId;dJdKgd?dLd dMdNdOd dPdQidRdSdTdUd gdVdWdXidNdOd dYdZgd[d\d]id^d_dTdUd gdVdWdXidNdOd dYdZgd[d\d]id^d`gdadWdbidNdOdTdUd gdVdWdXidNdOd dYdZgd[d\d]id^idcddd3dedfdgd dhdidjdkdld dmdWd idNdOd3dfdgd dhdidjdnidodpd3dqdrgdsgdtidud gdNdpgdpdvdidwgdxidygdzd{dgd|gd}d4d5d6d d d7d8gdd d9d:d;d<d=dTdUd gdVdWdXidNdOd dYdZgd[d\d]id^dfdgd dhdidjd~d dȬ tt}|r-t}t fddDs0td|pdzdzd|pdzdzdpgdpdvdidwgdxidydt }dp|vr|dpdp}Jt|Jttf}K|KrsdN}O|JD]B}P |Pdkr&td|pdzdz|Pd|pdzdzdvdidvd}On#t$rY?wxYw|Os*td|pdzdz|Jd|pdzdzdvdidwgdxd笀td|pdzdzd|pdzdzdpgdpdvdidwgdxidygdzd{d鬀#t$rYnwxYw tt}|rSt}t fddDs)td|pdzdzd|pdzdzdgd|gd}dn#t$rYnwxYwS)Nr r rrr'r(r)r*rr+rr,r-rr.r/r0rr1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrErGrHrIrJrKrLrMrNrOrPrQrRrrTrrrrrrr`rrrUrVrWrXrYrZrr[r\r]r^r_rarbrcrdFrrerfrgrirjrrrrrrrrrrrlrmrnrorprrrsrtrrrrrurvrwrxryrzr{r|r}r~rrrrrrrrrrrrc3 K|]}|vV dSrrrs rr zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata..rr)r+z! must contain ['name'] propertiesr&.name must be string.namez.name must be pep508-identifierz.version must be stringz.versionz.version must be pep440z.description must be stringz .descriptionrrJz.readme must be stringz.readmerz.readme must be objectc3 K|]}|vV dSrrrr data__readmes rr zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata..(*U*UD4<+?*U*U*U*U*U*UrrQz(.readme must contain ['file'] propertiesz.readme.file must be stringz .readme.filec3 K|]}|vV dSrrrs rr zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata..rr)r<z(.readme must contain ['text'] propertiesz.readme.text must be stringz .readme.textz-.readme cannot be validated by any definitionc3 K|]}|vV dSrrrs rr zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata..s("U"UD4<#7"U"U"U"U"U"Ur)r?z0.readme must contain ['content-type'] propertiesz#.readme.content-type must be stringz.readme.content-typez/.readme must be valid exactly by one definitionrKrLrFz.requires-python must be stringz.requires-pythonz+.requires-python must be pep508-versionspecc3 K|]}|vV dSrrrr data__licenses rr zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata..("N"NT4=#8"N"N"N"N"N"Nrz).license must contain ['file'] propertiesz.licensez.license.file must be stringz .license.filec3 K|]}|vV dSrrrs rr zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata..rrz).license must contain ['text'] propertiesz.license.text must be stringz .license.textz0.license must be valid exactly by one definitionz.authors must be arrayz.authorsz.authors[{data__authors_x}]z.maintainers must be arrayz .maintainersz#.maintainers[{data__maintainers_x}]z.keywords must be arrayz .keywordsz.keywords[{data__keywords_x}]r!z.classifiers must be arrayz .classifiersz#.classifiers[{data__classifiers_x}]z must be trove-classifierz.urls must be objectz.urlsz.urls.{data__urls_key}z must be urlz.urls must not contain r"r$z.scriptsz .gui-scriptsz%.entry-points.{data__entrypoints_key}z.entry-points must not contain z .entry-pointsTz-.entry-points must be python-entrypoint-groupz6.entry-points must be named by propertyName definitionrqz.dependencies must be arrayz .dependenciesz%.dependencies[{data__dependencies_x}]z%.optional-dependencies must be objectz.optional-dependenciesz7.optional-dependencies.{data__optionaldependencies_key}rMz[.optional-dependencies.{data__optionaldependencies_key}[{data__optionaldependencies_val_x}]z(.optional-dependencies must not contain z0.optional-dependencies must be pep508-identifierz?.optional-dependencies must be named by propertyName definitionz.dynamic must be arrayrNz.dynamic[{data__dynamic_x}]z must be one of ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']r#c3 K|]}|vV dSrrrs rr zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata..s'@@D44<@@@@@@r)rzz$ must contain ['dynamic'] propertiesz2.dynamic must be same as const definition: versionz0.dynamic must contain one of contains definitionrz' must NOT match a disallowed definitionrc3 K|]}|vV dSrrrs rr zlvalidate_https___packaging_python_org_en_latest_specifications_declaring_project_metadata..s'<<tt|<<<<<h dT # #oo&r[-BF'CFW'W_cjlp{qF@FkGJLkLeMVitfz~@fygqyIcJJP[ct K ^ R_ R_ IcJa j u } N F R Z l [ l [ IcJ] j u } Q z | DP El Fl FIcJHPdzdzdzOWj]j]j]F^F^iq~EX^iqECEVDW`X`XWYhngoHpHpBHS[lOJPJPAQ`f_grhrhGi}j|JU]pC!pC!pC!Q!u!Lv!Lv!{w!F"T"E"U"lV"lV"|W"`X"`X"EY"RZ"RZ"IcJ\"m"x"@#L#`#t#e$g$x%s#y%o"z%o"z%IcJ|%E&W&`'|'B(M(U(i(o)q){)h(|)D(})D(}){'~)M*S*L*T*l'U*l'U*g*m*x*@+S+B.S+B.S+B.o*C.o*C.f*D.S.Y.R.Z.W*[.W*[.k'\.G&].G&].IcJ_.h.s.z.M/c/n/D0R0Q1[1c1E2M2a2l3n3E4`2F4|1G4|1G4[4c4o4z4K5j5R4k5R4k5s1l5s1l5E/m5E/m5@6S9@6S9@6S9j.T9j.T9IcJV9c9n9u9H:^:i::M;L<V<^<@=H=\=g>i>@?[=A?w>V?q=W?M=X?M=X?l?t?@@K@\@{@c?|@c?|@D=}@D=}@V:~@V:~@RAbBdBlCQAmC{9nC{9nC_yJpCzCEDLDXD^D`DhDWDiDzDJF|CKF|CKF_yJMFZFeFlF@GHGTGfGwGlHwFmHwFmHAIwIyIVJ@IWJ\FXJ\FXJ_yJZJ`JkJsJDKFL`LeL}LCMNMVMbMgMEMhMEMhM|LiMbJjMbJjM_yJlMuMM`NkNyNCOKO^OPT^OPT^OPTdTlTnTFUcTGUaUfU~UDVOVWVkVcWeWcXjVdXpXMY[YVZFVWZFVWZ}UXZwMYZwMYZ_yJ[ZhZrZS[^[l[v[~[Q\CaQ\CaQ\CaWa_aaayaVazaTbYbqbwbBcJc^cVdXdVe]cWece@fN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E 6r[=RF7SVn7nwCJLP[Pe_eJfirJrHP]dw}HPdbducvwwvxGMFNgOgOagrzKnioio`pE~FQGQGfH\I[it|O b O b O b p T kU kU ZV e s d t Ku Ku [v w w ~ D E E E E 12.5> >3=lD3Q3Q03 e36|3D3D 0'**U*U*U*UH*U*U*U'U'U!W*B2I^X^C_cMDMUahjnynC}ChDGPhPms~FZXZkYlumumln}C|D]E]ELV+W+W+W%W47 8I8I8K8K4L4L 1#)->#>#>$5$<$ >3=lD3Q3Q03 s36|3D3D 0'**U*U*U*UH*U*U*U'U'U!e*B2I^X^C_cMDMUahjnynC}ChDGPhPms~FWzu{u{l|KQJR]S]SZd+e+e+e%e47 8I8I8K8K4L4L 1#)->#>#>$5$<$>>-44^DDD8D^8T5#-.G##O#Of&>r[EZTZ?[_D@DLelnr}rGAGlHKalawReReResWnXnX_e'f'f'f!f.!3../5555)Q...r[5JF/KN/DHKNOiKjKjDjm~D~0GSZ\`k`uouZvyBZBawawawL T g Z g Z g Z C [ C [ f n { BU[fnB@BSAT]U]UTVekdlEmEmEPXiLGMGM~N]c\doeoeDfz gyGRZm@m@m@NrIsIsxtCQBRiSiSy T] U] UB VOWOW^effff  ) )   . / / /#'(9#: 2S:: j.r[5JF/KNo/oxLSUYdYnhnSorDSDZbnBVGIZU[Q\Q\cijjjj.44 |;~&:;,>)""N"N"N"NX"N"N"NNNS":2AVPV;W[Fr[EZTZ?[^|?|EX_aepeztz_{~M_MckEGQ~RZSZSZ`'a'a'a!a0A500/5555+a// 6,6}d,K,K), |,/ ,>,>)""N"N"N"NX"N"N"NNNn":2AVPV;W[Fr[EZTZ?[^|?|EX_aepeztz_{~M_Mck~m~m~mZnZnu{'|'|'|!|0A500/5555+q00.r[5JF/KOA0AEILOPlLmLmEmpAEA0BJW^`dodysy^z}G^GdmIOZbv|~HuIQJQJHKZ`YaybybtzE M ` O ` O ` O |P |P sQ ` f _ g dh dh xi Tj Tj q x y y y y  ! !   Y ' ' ' OMmdE];; q .r[5JF/KNf/fn{CEITI^X^C_blClBI\r}Sa`jrT\p{}ToUKVKVjr~I Z y az az B{ B{ T| T| O b O b O b yc yc j p q q q q $.}tUm$L$L !$ `$' $6$6!;D];S;S``7O%7CDVXfiti~x~B_h_```` I % %   ] + + + $] 3 /$?? F .r[5JF/KNj/jsDKMQ\Qf`fKgjxKxNUh~I_mlv~`h|GI`{aWbWbv~J U f E mF mF NG NG `H `H \ l n v [ w Ex Ex  E F F F F (23DtUm(T(T %( l(+,=(>(>%CLM^C_C_ll?')?CDZ\jmxmB|BFklkllll  " "   Z ( ( (!*-NntUm<< Y.r[5JF/KNg/go}EGKVK`Z`EadoEoELX^`hWizJ|K|KRXYYYY%/u %N%N "% B%(%8%8"=F~=V=VBB9$&9%&9CAAB6r[=RF7SV|VuV|WIWI@F@H@HWIWI8IL]8]exAEPEZTZ[^D^}^D^P^PGMGOGO^P^PPSUUciksbt{ABBBBB I % %   ] + + + $] 3 /$?? O.r[5JF/KNj/jsDKMQ\Qf`fKgjxKxNUiq}O`U`V`Vj`bi@EAEAHNOOOO(23DtUm(T(T %( E(+,=(>(>%CLM^C_C_EE?')?%&>EA~.@ABXYYE":2AVPV;W[GZ[G[S[SJPJRJR[S[SBBB).3@@D":2AVPV;WZyZrZy[F[F}C}E}E[F[F%#8#H#HG&>r[EZTZ?[^}^v^}_J_JAGAIAI_J_J@JM[@[cqxz~I~SMSxTWvWoWvWBWByyAyAWBWBxBEGxG]eqvTwTw~F'G'G'G!G"A229N3ORk3klopmAmA4ABO4OWahjnynC}ChDGNhNdl}Y^v|GO[`~a~aub[c[cj@AAAA  ! !   Y ' ' ' OM FGTVdgrg|v|@JfJ K K K I % %   ] + + +#M2  FGWYgjujyCQiQ R R R Y & &   ^ , , , $^ 4 (23Dd(K(K %( n),->-C-C-E-E)F)F&DUD[D[D]D]||@)+@%f-445JKK|04JJJ299:OPPPRShjx{F{PJPT{z{|||)D229N3ORs3stwyOuPuP4PQ^4^fw~@DODYSY~Z]l~lKKKKKK_giB ^C ] b z @ J k v D N V i [i [i [owyQnRlqIOZbvnpnuo{XfaQbQbHcB dB dy eyfyfmCDDDD(+,=(>(>%(A--7;41BEE-E)*?EEf'P~6O'PQf'g'g!f*B2I^X^C_cRDRZovx|G|QKQvRUdvdrz|UqV]e+f+f+f%f7EEE?D<<<E;n6r[=RF7SWO8OWhoqu@uJDJoKN]o]||||||PXZsOtN S k q { \ g u  G Z LZ LZ L`hjB_C]bz@KSg_a_f`lIWRBSBSyTs Us Uj VjWjW^mnnnn Y & &   ^ , , ,!%n!5 04-@@ N.r[5JF/KNk/ktFMOS^ShbhMil{M{QXiL_yDPZbsjv~WWH@H@GMNNNN)34Fu )V)V &) s),-?)@)@&ENOaEbEbssA(*AGH_aor}rGAGKrqrssss "i / /   4 5 5 5)-.E)F &84AA o .r[5JF/KNu/u~X_aepeztz_{~V_VltEj~FH[}\v{SYdk~XcoyARI U ] v^ v^ [_ [_ R` ca ca h n o o o o 1;AAADEcAdAd>irtRjSjSAA e @Be!STwyGJUJ_Y_c@I@!A!A!A!A2y 229N3OR|3|~ABa~b~b4bcp4pxRY[_j_tntYuxPYPfndx@BUwVpuMS^exR]is{L C O W pX pX UY UY LZ ][ ][ b x y y y y 145O1P1P.1Q66@D=:TNN6N)*H#NNu'J~6I'JKi'j'j!u*B2I^X^C_cUDU]{BDHSH]W]B^ayByGOQdFelt+u+u+u%u7NNNHMEEENDZ 6r[=RF7SWX8X`zACGRG\V\A]`xAxNVgL`hj}_~X]u{FM`zEQ[ctk w  X@ X@ }A }A tB EC EC J Y Z Z Z Z  ! !   Y ' ' ' OMmdE];; D .r[5JF/KNf/fn{CEITI^X^C_blClBI]fhM\NZ`btbtbtYuyvyv}C D D D D $.}tUm$L$L !$ Z $' $6$6!;D];S;SZ Z 7O%7)2DDD6r[=RF7SVzVsVzWGWG~D~F~FWGWG8GJn8nvHOQU`UjdjOknRnKnRn^n^U[U]U]n^n^O^acOcqwyK yK yK pL S Y Z Z Z Z D  cp*21F+GJ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g i g n h t Q_ZJ [J [A \{]{]dstttt KsA J JJcBt|ts6td|pdzdz|d|pdzdzdddddd d gd dd d ddddt|t}|r;t|}d|vr[|d|d}t|t s)td|pdzdz|d|pdzdzdd d gd dd|vr|d|d}t|t s(td|pdzdz|d|pdzdzdd d ddt|t rHtd|s(td|pdzdz|d|pdzdzdd d dd|S)Nr r rrTrrrrrrr3rrr`rrrrr+rrrz.email must be stringz.emailrz.email must be idn-emailr) r$r%rr&r'r(r.rTmatch)r rrr3r4r data__emails rrrsv dT # #O &r[-BF'CFW'W_cjlp{qF@FkGJLkLawBXfeowYau@BYtZP[P[owCN_~ffG@ G@ YA YA H N O O O O dD))Ld $$ Y     V $ $ $fJj300 J.r[5JF/KNd/dlv}DODYSY~Z]d~dzBVaczU{q|q|CIJJJJ i     W % % %w-KkC11 [.r[5JF/KNe/emx@BFQF[U[@\_g@g}EQ\mLtMtMTZ[[[[+s++ d%&<=CCKPPd229N3ORl3ltGIMXMb\bGcfnGnDLXctS{T{T[cdddd Kr)VERSIONrefastjsonschema_exceptionsrcompilerTrNoneTyperr r2rWrVrSr1r0rrrrrrr[s  ?????? BJv   "*T   BJv  &BJ'@AA  4::"$$vxFJGGGGRacpt^^^^@ }MQ####J}MQ$}MQ8888tEGTX&tvDHCCCCJ MO]aTVdh>IKY]rPK{5Z mLib/site-packages/setuptools/config/_validate_pyproject/__pycache__/fastjsonschema_exceptions.cpython-311.pycnuW+A b;dLddlZejdZGddeZGddeZGddeZdS) Nz [\.\[\]]+ceZdZdZdS)JsonSchemaExceptionz7 Base exception of ``fastjsonschema`` library. N__name__ __module__ __qualname____doc__E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/config/_validate_pyproject/fastjsonschema_exceptions.pyrrr rcPeZdZdZdfd ZedZedZxZS)JsonSchemaValueExceptiona Exception raised by validation function. Available properties: * ``message`` containing human-readable information what is wrong (e.g. ``data.property[index] must be smaller than or equal to 42``), * invalid ``value`` (e.g. ``60``), * ``name`` of a path in the data structure (e.g. ``data.property[index]``), * ``path`` as an array in the data structure (e.g. ``['data', 'property', 'index']``), * the whole ``definition`` which the ``value`` has to fulfil (e.g. ``{'type': 'number', 'maximum': 42}``), * ``rule`` which the ``value`` is breaking (e.g. ``maximum``) * and ``rule_definition`` (e.g. ``42``). .. versionchanged:: 2.14.0 Added all extra properties. Nct|||_||_||_||_||_dSN)super__init__messagevaluename definitionrule)selfrrrrr __class__s r rz!JsonSchemaValueException.__init__sB !!!   $ r cTdt|jDS)Ncg|] }|dk| S)r ).0items r z1JsonSchemaValueException.path..'sIIIdbjjjjjr )SPLIT_REsplitrrs r pathzJsonSchemaValueException.path%s$II !:!:IIIIr c`|jr|jsdS|j|jSr)rrgetr#s r rule_definitionz(JsonSchemaValueException.rule_definition)s2y  4""49---r )NNNN) rrrr rpropertyr$r' __classcell__)rs@r rr s  JJXJ..X.....r rceZdZdZdS)JsonSchemaDefinitionExceptionz? Exception raised by generator of validation function. Nrr r r r+r+0r r r+)recompiler! ValueErrorrrr+r r r r/s  2:l # #* . . . . .2 . . .F$7r PK{5Zḽ*8*8[Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/formats.cpython-311.pycnuW+A b;d "<ddlZddlZddlZddlZddlZddlmZeje Z dZ ej de zdzej ejzZdedefdZd Zej d ed ejZd edefd Z ddlmZn#e$r ddlmZYnwxYwdedefdZn(#e$r e ddedefdZYnwxYwdedefdZdedefdZdefdZGddZ ddl!m"Z#dedefdZ$n#e$r e Z$YnwxYwdedefdZ%dZ&ej d e&d ejZ'dZ(ej d e(d ejZ)dZ*ej d e*d ejZ+dedefdZ,dedefdZ-dedefd Z.dedefd!Z/dedefd"Z0dedefd#Z1dS)$N)chaina v? (?: (?:(?P[0-9]+)!)? # epoch (?P[0-9]+(?:\.[0-9]+)*) # release segment (?P
                                          # pre-release
            [-_\.]?
            (?P(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P[0-9]+)?
        )?
        (?P                                         # post release
            (?:-(?P[0-9]+))
            |
            (?:
                [-_\.]?
                (?Ppost|rev|r)
                [-_\.]?
                (?P[0-9]+)?
            )
        )?
        (?P                                          # dev release
            [-_\.]?
            (?Pdev)
            [-_\.]?
            (?P[0-9]+)?
        )?
    )
    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
z^\s*z\s*$versionreturnc:t|duSN)
VERSION_REGEXmatch)rs |E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/config/_validate_pyproject/formats.pypep440r/sw''t33z'([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])^$namec:t|duSr)PEP508_IDENTIFIER_REGEXr	)rs r
pep508_identifierr:s"((..d::r)requirementsvaluec\	tj|dS#tj$rYdSwxYw)NTF)_reqRequirementInvalidRequirementrs r
pep508rEsB	U###4&			55	s++zCould not find an installation of `packaging`. Requirements, dependencies and versions might not be validated. To enforce validation, please install `packaging`.cdSNTrs r
rrSstrcbtfddDrdStdS)zGExpression that can be used to specify/lock versions (including ranges)c3 K|]}|vV	dSrr).0crs  r
	z%pep508_versionspec..Ys'
/
/!1:
/
/
/
/
/
/r);]@Frequirement)anyrrs`r
pep508_versionspecr(WsH

/
/
/
/
/
/
///u'''(((rc|d\}}}dt|d|dD}td|DS)N:c3>K|]}|VdSrstripr is  r
r"z+pep517_backend_reference..is*PP17799PPPPPPr.c38K|]}|t|VdSrpython_identifierr.s  r
r"z+pep517_backend_reference..js0>>A> ##>>>>>>r)	partition_chainsplitall)rmodule_objidentifierss     r
pep517_backend_referencer<gsi__S))NFAsPPfV\\#->->		#&O&OPPPK>>[>>>>>>rcXddl}ddlm}ddlm}d}|}|||5}|}|dd|d<||	d	d
cdddS#1swxYwYdS)Nr)Message)urlopenz.https://pypi.org/pypi?:action=list_classifiers)contextzcontent-typez
text/plaincontent_typecharsetzutf-8)
ssl
email.messager>urllib.requestr?create_default_context	getheaderreaddecode	get_param)rCr>r?urlr@responseheaderss       r
_download_classifiersrNqsJJJ%%%%%%&&&&&&
:C((**G	g	&	&	&M('))"*"4"4^\"R"R}}%%g&7&7	7&K&KLLMMMMMMMMMMMMMMMMMMsABB#&B#c.eZdZdZdZdZdedefdZdS)_TroveClassifierakThe ``trove_classifiers`` package is the official way of validating classifiers,
    however this package might not be always available.
    As a workaround we can still download a list from PyPI.
    We also don't want to be over strict about it, so simply skipping silently is an
    option (classifiers will be validated anyway during the upload to PyPI).
    c0d|_d|_d|_dS)NFtrove_classifier)
downloaded_skip_download__name__selfs r
__init__z_TroveClassifier.__init__sFJ#+


rcd|_dSr)rTrVs r
_disable_downloadz"_TroveClassifier._disable_downloads"rrrc6|jdus	|jdurdStjdstjdr%d|_d}t|dS|jd}t|	t
t|_n2#t$r%d|_tdYdSwxYw||jvp&|
dS)	NFT
NO_NETWORKVALIDATE_PYPROJECT_NO_NETWORKzxInstall ``trove-classifiers`` to ensure proper validation. Skipping download of classifiers list from PyPI (NO_NETWORK).zxInstall ``trove-classifiers`` to ensure proper validation. Meanwhile a list of classifiers will be downloaded from PyPI.z*Problem with download, skipping validation
private ::)rSrTosgetenv_loggerdebugsetrN
splitlines	Exceptionlower
startswith)rWrmsgs   r
__call__z_TroveClassifier.__call__s&?e##t':d'B'B4
9\""	bi0O&P&P	#DOP

MM#4?"P

MM#
"%&;&=&=&H&H&J&J"K"K


"'

JKKKtt

'Q5;;==+C+CL+Q+QQs2B99+C('C(N)	rU
__module____qualname____doc__rXrZstrboolrirrr
rPrP~sf+++###RcRdRRRRRRrrP)classifierscb|tvp&|dS)Nr^)_trove_classifiersrfrgrs r
rRrRs)**Tekkmm.F.F|.T.TTrc>ddlm}	||}|jsYtd||ds'|dsd|vs|d|}t
|jo|jS#t$rYdSwxYw)	Nr)urlparsezsFor maximum compatibility please make sure to include a `scheme` prefix in your URL (e.g. 'http://'). Given value: /\r%zhttp://F)	urllib.parsersschemerawarningrgrnnetlocre)rrspartss   r
rKrKs%%%%%%
|	4OO( %((



$$S))
4U-=-=d-C-C
4se|| !25!2!233EL1U\222uusBB
BBz[^\[\s=]([^=]*[^\s=])?z[\w.-]+z\w+(\.\w+)*c*|Sr)isidentifierrs r
r3r3src|ds|drdStd|dDS)Nr0Fc34K|]}t|VdSrr2)r ms  r
r"z.python_qualified_identifier..s+>> ##>>>>>>r)rgendswithr7r6rs r
python_qualified_identifierrsYs 3 3u>>U[[-=-=>>>>>>rc t|Sr)rrs r
python_module_namers&u---rc:t|duSr)ENTRYPOINT_GROUP_REGEXr	rs r
python_entrypoint_grouprs!''..d::rct|sdSt|s*d|d}|tz
}t|dS)NFz
Entry point `z'` does not follow recommended pattern: T)ENTRYPOINT_REGEXr	RECOMMEDED_ENTRYPOINT_REGEXRECOMMEDED_ENTRYPOINT_PATTERNrarx)rrhs  r
python_entrypoint_namerse!!%((u&,,U33LeLLL,,4rcN|d\}}}d|vr|d\}}}|ddkrdSd|tjdzdD}td	|DsdStd
|dn|}|d}|r#t||dn|}td
|DS)Nr*[r$Fc3>K|]}|VdSrr,)r xs  r
r"z.python_entrypoint_reference..s*XX!''))XXXXXXrz[],c34K|]}t|VdSr)r)r es  r
r"z.python_entrypoint_reference..s+88A$Q''888888r`z4` - using extras for entry points is not recommendedr0c3XK|]%}t|V&dSr)r3r-r.s  r
r"z.python_entrypoint_reference..s3AA ++AAAAAAr)	r4r-string
whitespacer6r7rarxr5)	rr8r9restr:extras_extrasmodule_partsr;s	         r
python_entrypoint_referencers'ooc**OFAt
d{{..--Q==??2#%%5XXW]]63Dt3K%L%L%R%RSV%W%WXXX8888888	5WEWWWXXXX<<$$L:>P&syy~~666LKAA[AAAAAAr)2loggingr_rertyping	itertoolsrr5	getLoggerrUraVERSION_PATTERNcompileXIrrmrnrPEP508_IDENTIFIER_PATTERNrr	packagingrrImportErrorsetuptools._vendor.packagingrrxr(r<rNrPtrove_classifiersrorqrRrKENTRYPOINT_PATTERNrrrENTRYPOINT_GROUP_PATTERNrr3rrrrrrrr
rs_								







%%%%%%
'
H
%
%
>
7_4w>rtLL
4C4D4444G$"*%E)B%E%E%ErtLL;C;D;;;;F2222222FFFEEEEEEEEFcdOO	=cd	)c	)d	)	)	)	) ?C?D????
Ms
M
M
M
M-R-R-R-R-R-R-R-R`*CCCCCCUUUUUUU***''))*st(/2:7"4777>> *(bj)M-J)M)M)MrtTT)#$C(@$C$C$CRTJJ S T    ?s?t????.c.d....;3;4;;;;#$BsBtBBBBBBsB?BB BB BB  "CC,C;;D
D
PK{5ZpYOOcLib/site-packages/setuptools/config/_validate_pyproject/__pycache__/error_reporting.cpython-311.pycnuW+A

b;d,ddlZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZmZm
Z
mZmZmZmZmZddlmZejeZddd	d
dZdZhd
ZejdZejdejZdddddZGddeZ edZ!GddZ"GddZ#de$dee$fdZ%dS)N)contextmanager)indentwrap)AnyDictIteratorListOptionalSequenceUnioncast)JsonSchemaValueExceptionzkeys must be named byzat least one item that matchesz"only items matching the definition)z(must be named by propertyName definitionzone of contains definitionz same as const definition:zonly specified items)zmust not be emptyzis always invalidzmust not be there>notanyOfitemsoneOfcontains
propertyNamesz\W+|([A-Z][^A-Z\W]*)z^[\w_]+$tablekeykeys)objectproperty
propertiesproperty namesc:eZdZdZdZdZdZedefdZ	dS)ValidationErroraReport violations of a given JSON schema.

    This class extends :exc:`~fastjsonschema.JsonSchemaValueException`
    by adding the following properties:

    - ``summary``: an improved version of the ``JsonSchemaValueException`` error message
      with only the necessary information)

    - ``details``: more contextual information about the error like the failing schema
      itself and the value that violates the schema.

    Depending on the level of the verbosity of the ``logging`` configuration
    the exception message will be only ``summary`` (default) or a combination of
    ``summary`` and ``details`` (when the logging level is set to :obj:`logging.DEBUG`).
    rexcXt|}|t||j|j|j|j}t
jdd}|dkr|j	|j
c|_	|_
|j|_|j
|_
|j|_|S)N JSONSCHEMA_DEBUG_CODE_GENERATIONfalse)_ErrorFormattingstrvaluename
definitionruleosgetenvlower	__cause__
__traceback__message_original_messagesummarydetails)clsr 	formatterobj
debug_codes     E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/config/_validate_pyproject/error_reporting.py_from_jsonschemaz ValidationError._from_jsonschema=s$R((	c#i.."(INBM27SSYA7KKQQSS
  /1|R=M,CM3, "
''
N)
__name__
__module____qualname____doc__r1r2r0classmethodrr8r9r7rr(sV GG	":			[			r9rc#nK	dVdS#t$r }t|dd}~wwxYwN)rrr8)r s r7detailed_errorsrBJsM=
#===..r22<=s

4/4cveZdZdefdZdefdZedefdZedefdZ	dZ
dZdefd	Zd
S)r$r c||_d||jd|_|jj|j|j|_d|_d|_dS)N`r)r _simplify_namer'r/replacer0_summary_details)selfr s  r7__init__z_ErrorFormatting.__init__Ss]7++BG44777	!%!8!8$)!L!L



r9returncttjkr|jr|jd|jS|jS)N

)_loggergetEffectiveLevelloggingDEBUGr2r1rJs r7__str__z_ErrorFormatting.__str__ZsB$$&&'-77DL7l66666|r9cP|js||_|jSrA)rH_expand_summaryrSs r7r1z_ErrorFormatting.summary`'}	3 0022DM}r9cP|js||_|jSrA)rI_expand_detailsrSs r7r2z_ErrorFormatting.detailsgrWr9cbtd}|dr
||dn|S)Nzdata.)len
startswith)rJr'xs   r7rFz_ErrorFormatting._simplify_namens0LL??733=tABBxx=r9cj|jtD]\}}||t	fdt
DrS|jj}|jjtvr4|r2tt}dt||dSS)Nc3 K|]}|vV	dSrAr?).0	substringmsgs  r7	z3_ErrorFormatting._expand_summary..xs(??IyC??????r9z:

    )
r0_MESSAGE_REPLACEMENTSrrGany
_SKIP_DETAILSr rule_definitionr)
_NEED_DETAILS_SummaryWriter_TOML_JARGONr)rJbadreplschemar1rbs     @r7rVz _ErrorFormatting._expand_summaryrs$.4466	)	)IC++c4((CC?????????	J(7<=((V($\22GAAwwv ? ?AAA
r9c	Jg}|jjdg}|jjddpd|}|r?dt	|dddd}|d	|t
j|jjd
}t
j|jjd
}dt|dd
|jj
dt|dg}d||zS)Nz
$$descriptiondescription 
PrdF)widthinitial_indentsubsequent_indentbreak_long_wordsz
DESCRIPTION:
)rz
GIVEN VALUE:
zOFFENDING RULE: zDEFINITION:
rN)r r(popjoinrappendjsondumpsr&rr))rJoptional
desc_linesdescrprnr&defaultss        r7rYz _ErrorFormatting._expand_detailss/W'++OR@@
w!%%mT::Rchhz>R>R
	<))#)&,%*K
OO:[::;;;DG.q999
47=3334VE62244/tw|//4F662244

{{8h.///r9N)
r:r;r<rrKr%rTrr1r2rFrVrYr?r9r7r$r$Rs3XX>>> 0000000r9r$c
eZdZhdZddeeeeffdZdeee	efdeee	effdZ
	dd	d
deee	efded
eedefdZ
deedefdZdedeefdZdedeedeefdZ	ddededeedefdZdeefdZdeedefdZdedeedefdZdedeedeefdZdededefdZdS) rj>titledefaultexamplesrpNjargonc|pi|_dddd|ddddd|d	|d
ddd
d|_gd|_dS)Nzat least one of the followingzexactly one of the followingzall of the followingz(*NOT* the following)rz (in order)zcontains at least one ofznon-predefined acceptable rrz named via patternzpredefined valuezone of)rrallOfrprefixItemsrrrpatternPropertiesconstenum)rr	maxLength	minLengthpatternformatminimummaximumexclusiveMinimumexclusiveMaximum
multipleOf)r_jargon_terms_guess_inline_defs)rJrs  r7rKz_SummaryWriter.__init__s&,l53+*"ll733@@@2MT\\:J-K-KMM$(LL$>$>!R!R!R'

"#
#
#
r9termrLct|trfd|DSj||S)NcFg|]}j||Sr?)rget)r`trJs  r7
z*_SummaryWriter._jargon..s)888aDKOOAq))888r9)
isinstancelistrr)rJrs` r7rz_SummaryWriter._jargonsEdD!!	9888848888{tT***r9rr?_pathrnprefixrc
t|tr||||S|||}|||}|r||S||d}||d}t
|dz}tj5}	t|
D][\}
\}}g||}
|
dkr|n|}|	|||
dt|trX|||
}|||
}|	|rd|nd||||
t|trf|dks||
rK||||
}|d	rdnd}|	||.|	d|||
d]|	cdddS#1swxYwYdS)
Nz  - rqr:rrrtype[)rr_handle_list_filter_unecessary_handle_simple_dict
_child_prefixr[ioStringIO	enumeraterwrite_labeldict_is_propertyr\_valuegetvalue)rJrnrrfilteredsimplechild_prefixitem_prefixrbufferirr&
child_pathline_prefixchildrenseps                 r7__call__z_SummaryWriter.__call__sfd##	<$$VVU;;;**6599))(E::	'&f&&&))&$77((66Vs"
[]]	%f#,X^^-=-=#>#>
I
I.s/333>>!$$333333r9z$_)rrf_IGNORE)rJrrs  @r7_is_unecessaryz_SummaryWriter._is_unecessarys]T""	$	52h3333d33333Jsdl7JJr9cHfd|DS)NcNi|]!\}}g|||"Sr?)r)r`rr&rrJs   r7
z5_SummaryWriter._filter_unecessary..sK


U&&||s|44



r9)r)rJrnrs` `r7rz!_SummaryWriter._filter_unecessarys<




$llnn


	
r9r&ctfd|jD}tdD}|s|r-dd||dSdS)Nc3 K|]}|vV	dSrAr?)r`pr&s  r7rcz5_SummaryWriter._handle_simple_dict..s'AAAQ%ZAAAAAAr9c3NK|] }t|ttfV!dSrA)rrr)r`vs  r7rcz5_SummaryWriter._handle_simple_dict..s0MMAd|44MMMMMMr9{, z}
)rfrvaluesrz
_inline_attrs)rJr&rinliners `   r7rz"_SummaryWriter._handle_simple_dictsAAAA)@AAAAAMMellnnMMMMMM	IV	IH		$"4"4UD"A"ABBHHHHtr9schemascBrdSt|}td|Drt|dkr|dS|ddfdt
|DS)Nrc3PK|]!}t|ttfV"dSrA)rrr)r`es  r7rcz._SummaryWriter._handle_list..
s3@@1:a$...@@@@@@r9<rrrc	3JK|]\}}|gd|dVdS)r]rNr?)r`rrrrrJs   r7rcz._SummaryWriter._handle_list..s\

>BaDDK'8'8x1xxx'8999





r9)rreprallr[rrzr)rJrrrrepr_rs`  ` @r7rz_SummaryWriter._handle_listst$$	2W

@@@@@@@	 SZZRT__<<<((66ww





FOPWFXFX




	
r9cJd}|dddD]
}|dvrn|dz
}|dzdkS)zGCheck if the given path can correspond to an arbitrarily named propertyrNr>rrrr?)rJrcounterrs    r7rz_SummaryWriter._is_propertysMB<		C===qLGG{ar9c|^}}||sQt|}|j|p'd||S|ddkrd|dSt
|S)Nrqrrz(regex ))r_separate_termsrrrzrr)rJrparentsrnorm_keys     r7rz_SummaryWriter._labels
#  &&	L&s++H;??3''K388DLL4J4J+K+KK2;---%S%%%%Cyyr9c|ddkrm||sX||}t|trdd|dntt|St|S)Nrrrrr)rrrrrzr
r%r)rJr&rtype_s    r7rz_SummaryWriter._value(s8vd&7&7&=&=LL''E+5eT+B+BX'DIIe$$''''SRWHXHX
E{{r9c#K|D];\}}g||}||d|||V>> _separate_terms("FooBar-foo")
    ['foo', 'bar', 'foo']
    c:g|]}||Sr?)r,)r`ws  r7rz#_separate_terms..>s%EEE!1EAGGIIEEEr9)_CAMEL_CASE_SPLITTERsplit)rs r7rr9s(
FE399$??EEEEr9)&rr|rQr*re
contextlibrtextwraprrtypingrrrr	r
rrr
fastjsonschema_exceptionsr	getLoggerr:rOrergricompilerI_IDENTIFIERrkrrBr$rjr%rr?r9r7rs												%%%%%%!!!!!!!!MMMMMMMMMMMMMMMMMMMM??????
'
H
%
%1H"B"$@	
YXX
!rz"9::bjbd++	.D===F0F0F0F0F0F0F0F0R[7[7[7[7[7[7[7[7|F#F$s)FFFFFFr9PK{5Z[CLib/site-packages/setuptools/config/_validate_pyproject/__init__.pynuW+Afrom functools import reduce
from typing import Any, Callable, Dict

from . import formats
from .error_reporting import detailed_errors, ValidationError
from .extra_validations import EXTRA_VALIDATIONS
from .fastjsonschema_exceptions import JsonSchemaException, JsonSchemaValueException
from .fastjsonschema_validations import validate as _validate

__all__ = [
    "validate",
    "FORMAT_FUNCTIONS",
    "EXTRA_VALIDATIONS",
    "ValidationError",
    "JsonSchemaException",
    "JsonSchemaValueException",
]


FORMAT_FUNCTIONS: Dict[str, Callable[[str], bool]] = {
    fn.__name__.replace("_", "-"): fn
    for fn in formats.__dict__.values()
    if callable(fn) and not fn.__name__.startswith("_")
}


def validate(data: Any) -> bool:
    """Validate the given ``data`` object using JSON Schema
    This function raises ``ValidationError`` if ``data`` is invalid.
    """
    with detailed_errors():
        _validate(data, custom_formats=FORMAT_FUNCTIONS)
    reduce(lambda acc, fn: fn(acc), EXTRA_VALIDATIONS, data)
    return True
PK{5Z{	 " "BLib/site-packages/setuptools/config/_validate_pyproject/formats.pynuW+Aimport logging
import os
import re
import string
import typing
from itertools import chain as _chain

_logger = logging.getLogger(__name__)

# -------------------------------------------------------------------------------------
# PEP 440

VERSION_PATTERN = r"""
    v?
    (?:
        (?:(?P[0-9]+)!)?                           # epoch
        (?P[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P
                                          # pre-release
            [-_\.]?
            (?P(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P[0-9]+)?
        )?
        (?P                                         # post release
            (?:-(?P[0-9]+))
            |
            (?:
                [-_\.]?
                (?Ppost|rev|r)
                [-_\.]?
                (?P[0-9]+)?
            )
        )?
        (?P                                          # dev release
            [-_\.]?
            (?Pdev)
            [-_\.]?
            (?P[0-9]+)?
        )?
    )
    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
"""

VERSION_REGEX = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.X | re.I)


def pep440(version: str) -> bool:
    return VERSION_REGEX.match(version) is not None


# -------------------------------------------------------------------------------------
# PEP 508

PEP508_IDENTIFIER_PATTERN = r"([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])"
PEP508_IDENTIFIER_REGEX = re.compile(f"^{PEP508_IDENTIFIER_PATTERN}$", re.I)


def pep508_identifier(name: str) -> bool:
    return PEP508_IDENTIFIER_REGEX.match(name) is not None


try:
    try:
        from packaging import requirements as _req
    except ImportError:  # pragma: no cover
        # let's try setuptools vendored version
        from setuptools._vendor.packaging import requirements as _req  # type: ignore

    def pep508(value: str) -> bool:
        try:
            _req.Requirement(value)
            return True
        except _req.InvalidRequirement:
            return False

except ImportError:  # pragma: no cover
    _logger.warning(
        "Could not find an installation of `packaging`. Requirements, dependencies and "
        "versions might not be validated. "
        "To enforce validation, please install `packaging`."
    )

    def pep508(value: str) -> bool:
        return True


def pep508_versionspec(value: str) -> bool:
    """Expression that can be used to specify/lock versions (including ranges)"""
    if any(c in value for c in (";", "]", "@")):
        # In PEP 508:
        # conditional markers, extras and URL specs are not included in the
        # versionspec
        return False
    # Let's pretend we have a dependency called `requirement` with the given
    # version spec, then we can re-use the pep508 function for validation:
    return pep508(f"requirement{value}")


# -------------------------------------------------------------------------------------
# PEP 517


def pep517_backend_reference(value: str) -> bool:
    module, _, obj = value.partition(":")
    identifiers = (i.strip() for i in _chain(module.split("."), obj.split(".")))
    return all(python_identifier(i) for i in identifiers if i)


# -------------------------------------------------------------------------------------
# Classifiers - PEP 301


def _download_classifiers() -> str:
    import ssl
    from email.message import Message
    from urllib.request import urlopen

    url = "https://pypi.org/pypi?:action=list_classifiers"
    context = ssl.create_default_context()
    with urlopen(url, context=context) as response:
        headers = Message()
        headers["content_type"] = response.getheader("content-type", "text/plain")
        return response.read().decode(headers.get_param("charset", "utf-8"))


class _TroveClassifier:
    """The ``trove_classifiers`` package is the official way of validating classifiers,
    however this package might not be always available.
    As a workaround we can still download a list from PyPI.
    We also don't want to be over strict about it, so simply skipping silently is an
    option (classifiers will be validated anyway during the upload to PyPI).
    """

    def __init__(self):
        self.downloaded: typing.Union[None, False, typing.Set[str]] = None
        self._skip_download = False
        # None => not cached yet
        # False => cache not available
        self.__name__ = "trove_classifier"  # Emulate a public function

    def _disable_download(self):
        # This is a private API. Only setuptools has the consent of using it.
        self._skip_download = True

    def __call__(self, value: str) -> bool:
        if self.downloaded is False or self._skip_download is True:
            return True

        if os.getenv("NO_NETWORK") or os.getenv("VALIDATE_PYPROJECT_NO_NETWORK"):
            self.downloaded = False
            msg = (
                "Install ``trove-classifiers`` to ensure proper validation. "
                "Skipping download of classifiers list from PyPI (NO_NETWORK)."
            )
            _logger.debug(msg)
            return True

        if self.downloaded is None:
            msg = (
                "Install ``trove-classifiers`` to ensure proper validation. "
                "Meanwhile a list of classifiers will be downloaded from PyPI."
            )
            _logger.debug(msg)
            try:
                self.downloaded = set(_download_classifiers().splitlines())
            except Exception:
                self.downloaded = False
                _logger.debug("Problem with download, skipping validation")
                return True

        return value in self.downloaded or value.lower().startswith("private ::")


try:
    from trove_classifiers import classifiers as _trove_classifiers

    def trove_classifier(value: str) -> bool:
        return value in _trove_classifiers or value.lower().startswith("private ::")

except ImportError:  # pragma: no cover
    trove_classifier = _TroveClassifier()


# -------------------------------------------------------------------------------------
# Non-PEP related


def url(value: str) -> bool:
    from urllib.parse import urlparse

    try:
        parts = urlparse(value)
        if not parts.scheme:
            _logger.warning(
                "For maximum compatibility please make sure to include a "
                "`scheme` prefix in your URL (e.g. 'http://'). "
                f"Given value: {value}"
            )
            if not (value.startswith("/") or value.startswith("\\") or "@" in value):
                parts = urlparse(f"http://{value}")

        return bool(parts.scheme and parts.netloc)
    except Exception:
        return False


# https://packaging.python.org/specifications/entry-points/
ENTRYPOINT_PATTERN = r"[^\[\s=]([^=]*[^\s=])?"
ENTRYPOINT_REGEX = re.compile(f"^{ENTRYPOINT_PATTERN}$", re.I)
RECOMMEDED_ENTRYPOINT_PATTERN = r"[\w.-]+"
RECOMMEDED_ENTRYPOINT_REGEX = re.compile(f"^{RECOMMEDED_ENTRYPOINT_PATTERN}$", re.I)
ENTRYPOINT_GROUP_PATTERN = r"\w+(\.\w+)*"
ENTRYPOINT_GROUP_REGEX = re.compile(f"^{ENTRYPOINT_GROUP_PATTERN}$", re.I)


def python_identifier(value: str) -> bool:
    return value.isidentifier()


def python_qualified_identifier(value: str) -> bool:
    if value.startswith(".") or value.endswith("."):
        return False
    return all(python_identifier(m) for m in value.split("."))


def python_module_name(value: str) -> bool:
    return python_qualified_identifier(value)


def python_entrypoint_group(value: str) -> bool:
    return ENTRYPOINT_GROUP_REGEX.match(value) is not None


def python_entrypoint_name(value: str) -> bool:
    if not ENTRYPOINT_REGEX.match(value):
        return False
    if not RECOMMEDED_ENTRYPOINT_REGEX.match(value):
        msg = f"Entry point `{value}` does not follow recommended pattern: "
        msg += RECOMMEDED_ENTRYPOINT_PATTERN
        _logger.warning(msg)
    return True


def python_entrypoint_reference(value: str) -> bool:
    module, _, rest = value.partition(":")
    if "[" in rest:
        obj, _, extras_ = rest.partition("[")
        if extras_.strip()[-1] != "]":
            return False
        extras = (x.strip() for x in extras_.strip(string.whitespace + "[]").split(","))
        if not all(pep508_identifier(e) for e in extras):
            return False
        _logger.warning(f"`{value}` - using extras for entry points is not recommended")
    else:
        obj = rest

    module_parts = module.split(".")
    identifiers = _chain(module_parts, obj.split(".")) if rest else module_parts
    return all(python_identifier(i.strip()) for i in identifiers)
PK{5ZN,,JLib/site-packages/setuptools/config/_validate_pyproject/error_reporting.pynuW+Aimport io
import json
import logging
import os
import re
from contextlib import contextmanager
from textwrap import indent, wrap
from typing import Any, Dict, Iterator, List, Optional, Sequence, Union, cast

from .fastjsonschema_exceptions import JsonSchemaValueException

_logger = logging.getLogger(__name__)

_MESSAGE_REPLACEMENTS = {
    "must be named by propertyName definition": "keys must be named by",
    "one of contains definition": "at least one item that matches",
    " same as const definition:": "",
    "only specified items": "only items matching the definition",
}

_SKIP_DETAILS = (
    "must not be empty",
    "is always invalid",
    "must not be there",
)

_NEED_DETAILS = {"anyOf", "oneOf", "anyOf", "contains", "propertyNames", "not", "items"}

_CAMEL_CASE_SPLITTER = re.compile(r"\W+|([A-Z][^A-Z\W]*)")
_IDENTIFIER = re.compile(r"^[\w_]+$", re.I)

_TOML_JARGON = {
    "object": "table",
    "property": "key",
    "properties": "keys",
    "property names": "keys",
}


class ValidationError(JsonSchemaValueException):
    """Report violations of a given JSON schema.

    This class extends :exc:`~fastjsonschema.JsonSchemaValueException`
    by adding the following properties:

    - ``summary``: an improved version of the ``JsonSchemaValueException`` error message
      with only the necessary information)

    - ``details``: more contextual information about the error like the failing schema
      itself and the value that violates the schema.

    Depending on the level of the verbosity of the ``logging`` configuration
    the exception message will be only ``summary`` (default) or a combination of
    ``summary`` and ``details`` (when the logging level is set to :obj:`logging.DEBUG`).
    """

    summary = ""
    details = ""
    _original_message = ""

    @classmethod
    def _from_jsonschema(cls, ex: JsonSchemaValueException):
        formatter = _ErrorFormatting(ex)
        obj = cls(str(formatter), ex.value, formatter.name, ex.definition, ex.rule)
        debug_code = os.getenv("JSONSCHEMA_DEBUG_CODE_GENERATION", "false").lower()
        if debug_code != "false":  # pragma: no cover
            obj.__cause__, obj.__traceback__ = ex.__cause__, ex.__traceback__
        obj._original_message = ex.message
        obj.summary = formatter.summary
        obj.details = formatter.details
        return obj


@contextmanager
def detailed_errors():
    try:
        yield
    except JsonSchemaValueException as ex:
        raise ValidationError._from_jsonschema(ex) from None


class _ErrorFormatting:
    def __init__(self, ex: JsonSchemaValueException):
        self.ex = ex
        self.name = f"`{self._simplify_name(ex.name)}`"
        self._original_message = self.ex.message.replace(ex.name, self.name)
        self._summary = ""
        self._details = ""

    def __str__(self) -> str:
        if _logger.getEffectiveLevel() <= logging.DEBUG and self.details:
            return f"{self.summary}\n\n{self.details}"

        return self.summary

    @property
    def summary(self) -> str:
        if not self._summary:
            self._summary = self._expand_summary()

        return self._summary

    @property
    def details(self) -> str:
        if not self._details:
            self._details = self._expand_details()

        return self._details

    def _simplify_name(self, name):
        x = len("data.")
        return name[x:] if name.startswith("data.") else name

    def _expand_summary(self):
        msg = self._original_message

        for bad, repl in _MESSAGE_REPLACEMENTS.items():
            msg = msg.replace(bad, repl)

        if any(substring in msg for substring in _SKIP_DETAILS):
            return msg

        schema = self.ex.rule_definition
        if self.ex.rule in _NEED_DETAILS and schema:
            summary = _SummaryWriter(_TOML_JARGON)
            return f"{msg}:\n\n{indent(summary(schema), '    ')}"

        return msg

    def _expand_details(self) -> str:
        optional = []
        desc_lines = self.ex.definition.pop("$$description", [])
        desc = self.ex.definition.pop("description", None) or " ".join(desc_lines)
        if desc:
            description = "\n".join(
                wrap(
                    desc,
                    width=80,
                    initial_indent="    ",
                    subsequent_indent="    ",
                    break_long_words=False,
                )
            )
            optional.append(f"DESCRIPTION:\n{description}")
        schema = json.dumps(self.ex.definition, indent=4)
        value = json.dumps(self.ex.value, indent=4)
        defaults = [
            f"GIVEN VALUE:\n{indent(value, '    ')}",
            f"OFFENDING RULE: {self.ex.rule!r}",
            f"DEFINITION:\n{indent(schema, '    ')}",
        ]
        return "\n\n".join(optional + defaults)


class _SummaryWriter:
    _IGNORE = {"description", "default", "title", "examples"}

    def __init__(self, jargon: Optional[Dict[str, str]] = None):
        self.jargon: Dict[str, str] = jargon or {}
        # Clarify confusing terms
        self._terms = {
            "anyOf": "at least one of the following",
            "oneOf": "exactly one of the following",
            "allOf": "all of the following",
            "not": "(*NOT* the following)",
            "prefixItems": f"{self._jargon('items')} (in order)",
            "items": "items",
            "contains": "contains at least one of",
            "propertyNames": (
                f"non-predefined acceptable {self._jargon('property names')}"
            ),
            "patternProperties": f"{self._jargon('properties')} named via pattern",
            "const": "predefined value",
            "enum": "one of",
        }
        # Attributes that indicate that the definition is easy and can be done
        # inline (e.g. string and number)
        self._guess_inline_defs = [
            "enum",
            "const",
            "maxLength",
            "minLength",
            "pattern",
            "format",
            "minimum",
            "maximum",
            "exclusiveMinimum",
            "exclusiveMaximum",
            "multipleOf",
        ]

    def _jargon(self, term: Union[str, List[str]]) -> Union[str, List[str]]:
        if isinstance(term, list):
            return [self.jargon.get(t, t) for t in term]
        return self.jargon.get(term, term)

    def __call__(
        self,
        schema: Union[dict, List[dict]],
        prefix: str = "",
        *,
        _path: Sequence[str] = (),
    ) -> str:
        if isinstance(schema, list):
            return self._handle_list(schema, prefix, _path)

        filtered = self._filter_unecessary(schema, _path)
        simple = self._handle_simple_dict(filtered, _path)
        if simple:
            return f"{prefix}{simple}"

        child_prefix = self._child_prefix(prefix, "  ")
        item_prefix = self._child_prefix(prefix, "- ")
        indent = len(prefix) * " "
        with io.StringIO() as buffer:
            for i, (key, value) in enumerate(filtered.items()):
                child_path = [*_path, key]
                line_prefix = prefix if i == 0 else indent
                buffer.write(f"{line_prefix}{self._label(child_path)}:")
                # ^  just the first item should receive the complete prefix
                if isinstance(value, dict):
                    filtered = self._filter_unecessary(value, child_path)
                    simple = self._handle_simple_dict(filtered, child_path)
                    buffer.write(
                        f" {simple}"
                        if simple
                        else f"\n{self(value, child_prefix, _path=child_path)}"
                    )
                elif isinstance(value, list) and (
                    key != "type" or self._is_property(child_path)
                ):
                    children = self._handle_list(value, item_prefix, child_path)
                    sep = " " if children.startswith("[") else "\n"
                    buffer.write(f"{sep}{children}")
                else:
                    buffer.write(f" {self._value(value, child_path)}\n")
            return buffer.getvalue()

    def _is_unecessary(self, path: Sequence[str]) -> bool:
        if self._is_property(path) or not path:  # empty path => instruction @ root
            return False
        key = path[-1]
        return any(key.startswith(k) for k in "$_") or key in self._IGNORE

    def _filter_unecessary(self, schema: dict, path: Sequence[str]):
        return {
            key: value
            for key, value in schema.items()
            if not self._is_unecessary([*path, key])
        }

    def _handle_simple_dict(self, value: dict, path: Sequence[str]) -> Optional[str]:
        inline = any(p in value for p in self._guess_inline_defs)
        simple = not any(isinstance(v, (list, dict)) for v in value.values())
        if inline or simple:
            return f"{{{', '.join(self._inline_attrs(value, path))}}}\n"
        return None

    def _handle_list(
        self, schemas: list, prefix: str = "", path: Sequence[str] = ()
    ) -> str:
        if self._is_unecessary(path):
            return ""

        repr_ = repr(schemas)
        if all(not isinstance(e, (dict, list)) for e in schemas) and len(repr_) < 60:
            return f"{repr_}\n"

        item_prefix = self._child_prefix(prefix, "- ")
        return "".join(
            self(v, item_prefix, _path=[*path, f"[{i}]"]) for i, v in enumerate(schemas)
        )

    def _is_property(self, path: Sequence[str]):
        """Check if the given path can correspond to an arbitrarily named property"""
        counter = 0
        for key in path[-2::-1]:
            if key not in {"properties", "patternProperties"}:
                break
            counter += 1

        # If the counter if even, the path correspond to a JSON Schema keyword
        # otherwise it can be any arbitrary string naming a property
        return counter % 2 == 1

    def _label(self, path: Sequence[str]) -> str:
        *parents, key = path
        if not self._is_property(path):
            norm_key = _separate_terms(key)
            return self._terms.get(key) or " ".join(self._jargon(norm_key))

        if parents[-1] == "patternProperties":
            return f"(regex {key!r})"
        return repr(key)  # property name

    def _value(self, value: Any, path: Sequence[str]) -> str:
        if path[-1] == "type" and not self._is_property(path):
            type_ = self._jargon(value)
            return (
                f"[{', '.join(type_)}]" if isinstance(value, list) else cast(str, type_)
            )
        return repr(value)

    def _inline_attrs(self, schema: dict, path: Sequence[str]) -> Iterator[str]:
        for key, value in schema.items():
            child_path = [*path, key]
            yield f"{self._label(child_path)}: {self._value(value, child_path)}"

    def _child_prefix(self, parent_prefix: str, child_prefix: str) -> str:
        return len(parent_prefix) * " " + child_prefix


def _separate_terms(word: str) -> List[str]:
    """
    >>> _separate_terms("FooBar-foo")
    ['foo', 'bar', 'foo']
    """
    return [w.lower() for w in _CAMEL_CASE_SPLITTER.split(word) if w]
PK{5Zv??-Lib/site-packages/setuptools/config/expand.pynuW+A"""Utility functions to expand configuration directives or special values
(such glob patterns).

We can split the process of interpreting configuration files into 2 steps:

1. The parsing the file contents from strings to value objects
   that can be understand by Python (for example a string with a comma
   separated list of keywords into an actual Python list of strings).

2. The expansion (or post-processing) of these values according to the
   semantics ``setuptools`` assign to them (for example a configuration field
   with the ``file:`` directive should be expanded from a list of file paths to
   a single string with the contents of those files concatenated)

This module focus on the second step, and therefore allow sharing the expansion
functions among several configuration file formats.

**PRIVATE MODULE**: API reserved for setuptools internal usage only.
"""
import ast
import importlib
import io
import os
import pathlib
import sys
import warnings
from glob import iglob
from configparser import ConfigParser
from importlib.machinery import ModuleSpec
from itertools import chain
from typing import (
    TYPE_CHECKING,
    Callable,
    Dict,
    Iterable,
    Iterator,
    List,
    Mapping,
    Optional,
    Tuple,
    TypeVar,
    Union,
    cast
)
from pathlib import Path
from types import ModuleType

from distutils.errors import DistutilsOptionError

from .._path import same_path as _same_path

if TYPE_CHECKING:
    from setuptools.dist import Distribution  # noqa
    from setuptools.discovery import ConfigDiscovery  # noqa
    from distutils.dist import DistributionMetadata  # noqa

chain_iter = chain.from_iterable
_Path = Union[str, os.PathLike]
_K = TypeVar("_K")
_V = TypeVar("_V", covariant=True)


class StaticModule:
    """Proxy to a module object that avoids executing arbitrary code."""

    def __init__(self, name: str, spec: ModuleSpec):
        module = ast.parse(pathlib.Path(spec.origin).read_bytes())
        vars(self).update(locals())
        del self.self

    def _find_assignments(self) -> Iterator[Tuple[ast.AST, ast.AST]]:
        for statement in self.module.body:
            if isinstance(statement, ast.Assign):
                yield from ((target, statement.value) for target in statement.targets)
            elif isinstance(statement, ast.AnnAssign) and statement.value:
                yield (statement.target, statement.value)

    def __getattr__(self, attr):
        """Attempt to load an attribute "statically", via :func:`ast.literal_eval`."""
        try:
            return next(
                ast.literal_eval(value)
                for target, value in self._find_assignments()
                if isinstance(target, ast.Name) and target.id == attr
            )
        except Exception as e:
            raise AttributeError(f"{self.name} has no attribute {attr}") from e


def glob_relative(
    patterns: Iterable[str], root_dir: Optional[_Path] = None
) -> List[str]:
    """Expand the list of glob patterns, but preserving relative paths.

    :param list[str] patterns: List of glob patterns
    :param str root_dir: Path to which globs should be relative
                         (current directory by default)
    :rtype: list
    """
    glob_characters = {'*', '?', '[', ']', '{', '}'}
    expanded_values = []
    root_dir = root_dir or os.getcwd()
    for value in patterns:

        # Has globby characters?
        if any(char in value for char in glob_characters):
            # then expand the glob pattern while keeping paths *relative*:
            glob_path = os.path.abspath(os.path.join(root_dir, value))
            expanded_values.extend(sorted(
                os.path.relpath(path, root_dir).replace(os.sep, "/")
                for path in iglob(glob_path, recursive=True)))

        else:
            # take the value as-is
            path = os.path.relpath(value, root_dir).replace(os.sep, "/")
            expanded_values.append(path)

    return expanded_values


def read_files(filepaths: Union[str, bytes, Iterable[_Path]], root_dir=None) -> str:
    """Return the content of the files concatenated using ``\n`` as str

    This function is sandboxed and won't reach anything outside ``root_dir``

    (By default ``root_dir`` is the current directory).
    """
    from setuptools.extern.more_itertools import always_iterable

    root_dir = os.path.abspath(root_dir or os.getcwd())
    _filepaths = (os.path.join(root_dir, path) for path in always_iterable(filepaths))
    return '\n'.join(
        _read_file(path)
        for path in _filter_existing_files(_filepaths)
        if _assert_local(path, root_dir)
    )


def _filter_existing_files(filepaths: Iterable[_Path]) -> Iterator[_Path]:
    for path in filepaths:
        if os.path.isfile(path):
            yield path
        else:
            warnings.warn(f"File {path!r} cannot be found")


def _read_file(filepath: Union[bytes, _Path]) -> str:
    with io.open(filepath, encoding='utf-8') as f:
        return f.read()


def _assert_local(filepath: _Path, root_dir: str):
    if Path(os.path.abspath(root_dir)) not in Path(os.path.abspath(filepath)).parents:
        msg = f"Cannot access {filepath!r} (or anything outside {root_dir!r})"
        raise DistutilsOptionError(msg)

    return True


def read_attr(
    attr_desc: str,
    package_dir: Optional[Mapping[str, str]] = None,
    root_dir: Optional[_Path] = None
):
    """Reads the value of an attribute from a module.

    This function will try to read the attributed statically first
    (via :func:`ast.literal_eval`), and only evaluate the module if it fails.

    Examples:
        read_attr("package.attr")
        read_attr("package.module.attr")

    :param str attr_desc: Dot-separated string describing how to reach the
        attribute (see examples above)
    :param dict[str, str] package_dir: Mapping of package names to their
        location in disk (represented by paths relative to ``root_dir``).
    :param str root_dir: Path to directory containing all the packages in
        ``package_dir`` (current directory by default).
    :rtype: str
    """
    root_dir = root_dir or os.getcwd()
    attrs_path = attr_desc.strip().split('.')
    attr_name = attrs_path.pop()
    module_name = '.'.join(attrs_path)
    module_name = module_name or '__init__'
    _parent_path, path, module_name = _find_module(module_name, package_dir, root_dir)
    spec = _find_spec(module_name, path)

    try:
        return getattr(StaticModule(module_name, spec), attr_name)
    except Exception:
        # fallback to evaluate module
        module = _load_spec(spec, module_name)
        return getattr(module, attr_name)


def _find_spec(module_name: str, module_path: Optional[_Path]) -> ModuleSpec:
    spec = importlib.util.spec_from_file_location(module_name, module_path)
    spec = spec or importlib.util.find_spec(module_name)

    if spec is None:
        raise ModuleNotFoundError(module_name)

    return spec


def _load_spec(spec: ModuleSpec, module_name: str) -> ModuleType:
    name = getattr(spec, "__name__", module_name)
    if name in sys.modules:
        return sys.modules[name]
    module = importlib.util.module_from_spec(spec)
    sys.modules[name] = module  # cache (it also ensures `==` works on loaded items)
    spec.loader.exec_module(module)  # type: ignore
    return module


def _find_module(
    module_name: str, package_dir: Optional[Mapping[str, str]], root_dir: _Path
) -> Tuple[_Path, Optional[str], str]:
    """Given a module (that could normally be imported by ``module_name``
    after the build is complete), find the path to the parent directory where
    it is contained and the canonical name that could be used to import it
    considering the ``package_dir`` in the build configuration and ``root_dir``
    """
    parent_path = root_dir
    module_parts = module_name.split('.')
    if package_dir:
        if module_parts[0] in package_dir:
            # A custom path was specified for the module we want to import
            custom_path = package_dir[module_parts[0]]
            parts = custom_path.rsplit('/', 1)
            if len(parts) > 1:
                parent_path = os.path.join(root_dir, parts[0])
                parent_module = parts[1]
            else:
                parent_module = custom_path
            module_name = ".".join([parent_module, *module_parts[1:]])
        elif '' in package_dir:
            # A custom parent directory was specified for all root modules
            parent_path = os.path.join(root_dir, package_dir[''])

    path_start = os.path.join(parent_path, *module_name.split("."))
    candidates = chain(
        (f"{path_start}.py", os.path.join(path_start, "__init__.py")),
        iglob(f"{path_start}.*")
    )
    module_path = next((x for x in candidates if os.path.isfile(x)), None)
    return parent_path, module_path, module_name


def resolve_class(
    qualified_class_name: str,
    package_dir: Optional[Mapping[str, str]] = None,
    root_dir: Optional[_Path] = None
) -> Callable:
    """Given a qualified class name, return the associated class object"""
    root_dir = root_dir or os.getcwd()
    idx = qualified_class_name.rfind('.')
    class_name = qualified_class_name[idx + 1 :]
    pkg_name = qualified_class_name[:idx]

    _parent_path, path, module_name = _find_module(pkg_name, package_dir, root_dir)
    module = _load_spec(_find_spec(module_name, path), module_name)
    return getattr(module, class_name)


def cmdclass(
    values: Dict[str, str],
    package_dir: Optional[Mapping[str, str]] = None,
    root_dir: Optional[_Path] = None
) -> Dict[str, Callable]:
    """Given a dictionary mapping command names to strings for qualified class
    names, apply :func:`resolve_class` to the dict values.
    """
    return {k: resolve_class(v, package_dir, root_dir) for k, v in values.items()}


def find_packages(
    *,
    namespaces=True,
    fill_package_dir: Optional[Dict[str, str]] = None,
    root_dir: Optional[_Path] = None,
    **kwargs
) -> List[str]:
    """Works similarly to :func:`setuptools.find_packages`, but with all
    arguments given as keyword arguments. Moreover, ``where`` can be given
    as a list (the results will be simply concatenated).

    When the additional keyword argument ``namespaces`` is ``True``, it will
    behave like :func:`setuptools.find_namespace_packages`` (i.e. include
    implicit namespaces as per :pep:`420`).

    The ``where`` argument will be considered relative to ``root_dir`` (or the current
    working directory when ``root_dir`` is not given).

    If the ``fill_package_dir`` argument is passed, this function will consider it as a
    similar data structure to the ``package_dir`` configuration parameter add fill-in
    any missing package location.

    :rtype: list
    """
    from setuptools.discovery import construct_package_dir
    from setuptools.extern.more_itertools import unique_everseen, always_iterable

    if namespaces:
        from setuptools.discovery import PEP420PackageFinder as PackageFinder
    else:
        from setuptools.discovery import PackageFinder  # type: ignore

    root_dir = root_dir or os.curdir
    where = kwargs.pop('where', ['.'])
    packages: List[str] = []
    fill_package_dir = {} if fill_package_dir is None else fill_package_dir
    search = list(unique_everseen(always_iterable(where)))

    if len(search) == 1 and all(not _same_path(search[0], x) for x in (".", root_dir)):
        fill_package_dir.setdefault("", search[0])

    for path in search:
        package_path = _nest_path(root_dir, path)
        pkgs = PackageFinder.find(package_path, **kwargs)
        packages.extend(pkgs)
        if pkgs and not (
            fill_package_dir.get("") == path
            or os.path.samefile(package_path, root_dir)
        ):
            fill_package_dir.update(construct_package_dir(pkgs, path))

    return packages


def _nest_path(parent: _Path, path: _Path) -> str:
    path = parent if path in {".", ""} else os.path.join(parent, path)
    return os.path.normpath(path)


def version(value: Union[Callable, Iterable[Union[str, int]], str]) -> str:
    """When getting the version directly from an attribute,
    it should be normalised to string.
    """
    if callable(value):
        value = value()

    value = cast(Iterable[Union[str, int]], value)

    if not isinstance(value, str):
        if hasattr(value, '__iter__'):
            value = '.'.join(map(str, value))
        else:
            value = '%s' % value

    return value


def canonic_package_data(package_data: dict) -> dict:
    if "*" in package_data:
        package_data[""] = package_data.pop("*")
    return package_data


def canonic_data_files(
    data_files: Union[list, dict], root_dir: Optional[_Path] = None
) -> List[Tuple[str, List[str]]]:
    """For compatibility with ``setup.py``, ``data_files`` should be a list
    of pairs instead of a dict.

    This function also expands glob patterns.
    """
    if isinstance(data_files, list):
        return data_files

    return [
        (dest, glob_relative(patterns, root_dir))
        for dest, patterns in data_files.items()
    ]


def entry_points(text: str, text_source="entry-points") -> Dict[str, dict]:
    """Given the contents of entry-points file,
    process it into a 2-level dictionary (``dict[str, dict[str, str]]``).
    The first level keys are entry-point groups, the second level keys are
    entry-point names, and the second level values are references to objects
    (that correspond to the entry-point value).
    """
    parser = ConfigParser(default_section=None, delimiters=("=",))  # type: ignore
    parser.optionxform = str  # case sensitive
    parser.read_string(text, text_source)
    groups = {k: dict(v.items()) for k, v in parser.items()}
    groups.pop(parser.default_section, None)
    return groups


class EnsurePackagesDiscovered:
    """Some expand functions require all the packages to already be discovered before
    they run, e.g. :func:`read_attr`, :func:`resolve_class`, :func:`cmdclass`.

    Therefore in some cases we will need to run autodiscovery during the evaluation of
    the configuration. However, it is better to postpone calling package discovery as
    much as possible, because some parameters can influence it (e.g. ``package_dir``),
    and those might not have been processed yet.
    """

    def __init__(self, distribution: "Distribution"):
        self._dist = distribution
        self._called = False

    def __call__(self):
        """Trigger the automatic package discovery, if it is still necessary."""
        if not self._called:
            self._called = True
            self._dist.set_defaults(name=False)  # Skip name, we can still be parsing

    def __enter__(self):
        return self

    def __exit__(self, _exc_type, _exc_value, _traceback):
        if self._called:
            self._dist.set_defaults.analyse_name()  # Now we can set a default name

    def _get_package_dir(self) -> Mapping[str, str]:
        self()
        pkg_dir = self._dist.package_dir
        return {} if pkg_dir is None else pkg_dir

    @property
    def package_dir(self) -> Mapping[str, str]:
        """Proxy to ``package_dir`` that may trigger auto-discovery when used."""
        return LazyMappingProxy(self._get_package_dir)


class LazyMappingProxy(Mapping[_K, _V]):
    """Mapping proxy that delays resolving the target object, until really needed.

    >>> def obtain_mapping():
    ...     print("Running expensive function!")
    ...     return {"key": "value", "other key": "other value"}
    >>> mapping = LazyMappingProxy(obtain_mapping)
    >>> mapping["key"]
    Running expensive function!
    'value'
    >>> mapping["other key"]
    'other value'
    """

    def __init__(self, obtain_mapping_value: Callable[[], Mapping[_K, _V]]):
        self._obtain = obtain_mapping_value
        self._value: Optional[Mapping[_K, _V]] = None

    def _target(self) -> Mapping[_K, _V]:
        if self._value is None:
            self._value = self._obtain()
        return self._value

    def __getitem__(self, key: _K) -> _V:
        return self._target()[key]

    def __len__(self) -> int:
        return len(self._target())

    def __iter__(self) -> Iterator[_K]:
        return iter(self._target())
PK{5ZTnbnb/Lib/site-packages/setuptools/config/setupcfg.pynuW+A"""
Load setuptools configuration from ``setup.cfg`` files.

**API will be made private in the future**
"""
import os

import contextlib
import functools
import warnings
from collections import defaultdict
from functools import partial
from functools import wraps
from typing import (TYPE_CHECKING, Callable, Any, Dict, Generic, Iterable, List,
                    Optional, Tuple, TypeVar, Union)

from distutils.errors import DistutilsOptionError, DistutilsFileError
from setuptools.extern.packaging.requirements import Requirement, InvalidRequirement
from setuptools.extern.packaging.version import Version, InvalidVersion
from setuptools.extern.packaging.specifiers import SpecifierSet
from setuptools._deprecation_warning import SetuptoolsDeprecationWarning

from . import expand

if TYPE_CHECKING:
    from setuptools.dist import Distribution  # noqa
    from distutils.dist import DistributionMetadata  # noqa

_Path = Union[str, os.PathLike]
SingleCommandOptions = Dict["str", Tuple["str", Any]]
"""Dict that associate the name of the options of a particular command to a
tuple. The first element of the tuple indicates the origin of the option value
(e.g. the name of the configuration file where it was read from),
while the second element of the tuple is the option value itself
"""
AllCommandOptions = Dict["str", SingleCommandOptions]  # cmd name => its options
Target = TypeVar("Target", bound=Union["Distribution", "DistributionMetadata"])


def read_configuration(
    filepath: _Path,
    find_others=False,
    ignore_option_errors=False
) -> dict:
    """Read given configuration file and returns options from it as a dict.

    :param str|unicode filepath: Path to configuration file
        to get options from.

    :param bool find_others: Whether to search for other configuration files
        which could be on in various places.

    :param bool ignore_option_errors: Whether to silently ignore
        options, values of which could not be resolved (e.g. due to exceptions
        in directives such as file:, attr:, etc.).
        If False exceptions are propagated as expected.

    :rtype: dict
    """
    from setuptools.dist import Distribution

    dist = Distribution()
    filenames = dist.find_config_files() if find_others else []
    handlers = _apply(dist, filepath, filenames, ignore_option_errors)
    return configuration_to_dict(handlers)


def apply_configuration(dist: "Distribution", filepath: _Path) -> "Distribution":
    """Apply the configuration from a ``setup.cfg`` file into an existing
    distribution object.
    """
    _apply(dist, filepath)
    dist._finalize_requires()
    return dist


def _apply(
    dist: "Distribution", filepath: _Path,
    other_files: Iterable[_Path] = (),
    ignore_option_errors: bool = False,
) -> Tuple["ConfigHandler", ...]:
    """Read configuration from ``filepath`` and applies to the ``dist`` object."""
    from setuptools.dist import _Distribution

    filepath = os.path.abspath(filepath)

    if not os.path.isfile(filepath):
        raise DistutilsFileError('Configuration file %s does not exist.' % filepath)

    current_directory = os.getcwd()
    os.chdir(os.path.dirname(filepath))
    filenames = [*other_files, filepath]

    try:
        _Distribution.parse_config_files(dist, filenames=filenames)
        handlers = parse_configuration(
            dist, dist.command_options, ignore_option_errors=ignore_option_errors
        )
        dist._finalize_license_files()
    finally:
        os.chdir(current_directory)

    return handlers


def _get_option(target_obj: Target, key: str):
    """
    Given a target object and option key, get that option from
    the target object, either through a get_{key} method or
    from an attribute directly.
    """
    getter_name = 'get_{key}'.format(**locals())
    by_attribute = functools.partial(getattr, target_obj, key)
    getter = getattr(target_obj, getter_name, by_attribute)
    return getter()


def configuration_to_dict(handlers: Tuple["ConfigHandler", ...]) -> dict:
    """Returns configuration data gathered by given handlers as a dict.

    :param list[ConfigHandler] handlers: Handlers list,
        usually from parse_configuration()

    :rtype: dict
    """
    config_dict: dict = defaultdict(dict)

    for handler in handlers:
        for option in handler.set_options:
            value = _get_option(handler.target_obj, option)
            config_dict[handler.section_prefix][option] = value

    return config_dict


def parse_configuration(
    distribution: "Distribution",
    command_options: AllCommandOptions,
    ignore_option_errors=False
) -> Tuple["ConfigMetadataHandler", "ConfigOptionsHandler"]:
    """Performs additional parsing of configuration options
    for a distribution.

    Returns a list of used option handlers.

    :param Distribution distribution:
    :param dict command_options:
    :param bool ignore_option_errors: Whether to silently ignore
        options, values of which could not be resolved (e.g. due to exceptions
        in directives such as file:, attr:, etc.).
        If False exceptions are propagated as expected.
    :rtype: list
    """
    with expand.EnsurePackagesDiscovered(distribution) as ensure_discovered:
        options = ConfigOptionsHandler(
            distribution,
            command_options,
            ignore_option_errors,
            ensure_discovered,
        )

        options.parse()
        if not distribution.package_dir:
            distribution.package_dir = options.package_dir  # Filled by `find_packages`

        meta = ConfigMetadataHandler(
            distribution.metadata,
            command_options,
            ignore_option_errors,
            ensure_discovered,
            distribution.package_dir,
            distribution.src_root,
        )
        meta.parse()

    return meta, options


def _warn_accidental_env_marker_misconfig(label: str, orig_value: str, parsed: list):
    """Because users sometimes misinterpret this configuration:

    [options.extras_require]
    foo = bar;python_version<"4"

    It looks like one requirement with an environment marker
    but because there is no newline, it's parsed as two requirements
    with a semicolon as separator.

    Therefore, if:
        * input string does not contain a newline AND
        * parsed result contains two requirements AND
        * parsing of the two parts from the result (";")
        leads in a valid Requirement with a valid marker
    a UserWarning is shown to inform the user about the possible problem.
    """
    if "\n" in orig_value or len(parsed) != 2:
        return

    with contextlib.suppress(InvalidRequirement):
        original_requirements_str = ";".join(parsed)
        req = Requirement(original_requirements_str)
        if req.marker is not None:
            msg = (
                f"One of the parsed requirements in `{label}` "
                f"looks like a valid environment marker: '{parsed[1]}'\n"
                "Make sure that the config is correct and check "
                "https://setuptools.pypa.io/en/latest/userguide/declarative_config.html#opt-2"  # noqa: E501
            )
            warnings.warn(msg, UserWarning)


class ConfigHandler(Generic[Target]):
    """Handles metadata supplied in configuration files."""

    section_prefix: str
    """Prefix for config sections handled by this handler.
    Must be provided by class heirs.

    """

    aliases: Dict[str, str] = {}
    """Options aliases.
    For compatibility with various packages. E.g.: d2to1 and pbr.
    Note: `-` in keys is replaced with `_` by config parser.

    """

    def __init__(
        self,
        target_obj: Target,
        options: AllCommandOptions,
        ignore_option_errors,
        ensure_discovered: expand.EnsurePackagesDiscovered,
    ):
        sections: AllCommandOptions = {}

        section_prefix = self.section_prefix
        for section_name, section_options in options.items():
            if not section_name.startswith(section_prefix):
                continue

            section_name = section_name.replace(section_prefix, '').strip('.')
            sections[section_name] = section_options

        self.ignore_option_errors = ignore_option_errors
        self.target_obj = target_obj
        self.sections = sections
        self.set_options: List[str] = []
        self.ensure_discovered = ensure_discovered

    @property
    def parsers(self):
        """Metadata item name to parser function mapping."""
        raise NotImplementedError(
            '%s must provide .parsers property' % self.__class__.__name__
        )

    def __setitem__(self, option_name, value):
        unknown = tuple()
        target_obj = self.target_obj

        # Translate alias into real name.
        option_name = self.aliases.get(option_name, option_name)

        current_value = getattr(target_obj, option_name, unknown)

        if current_value is unknown:
            raise KeyError(option_name)

        if current_value:
            # Already inhabited. Skipping.
            return

        skip_option = False
        parser = self.parsers.get(option_name)
        if parser:
            try:
                value = parser(value)

            except Exception:
                skip_option = True
                if not self.ignore_option_errors:
                    raise

        if skip_option:
            return

        setter = getattr(target_obj, 'set_%s' % option_name, None)
        if setter is None:
            setattr(target_obj, option_name, value)
        else:
            setter(value)

        self.set_options.append(option_name)

    @classmethod
    def _parse_list(cls, value, separator=','):
        """Represents value as a list.

        Value is split either by separator (defaults to comma) or by lines.

        :param value:
        :param separator: List items separator character.
        :rtype: list
        """
        if isinstance(value, list):  # _get_parser_compound case
            return value

        if '\n' in value:
            value = value.splitlines()
        else:
            value = value.split(separator)

        return [chunk.strip() for chunk in value if chunk.strip()]

    @classmethod
    def _parse_dict(cls, value):
        """Represents value as a dict.

        :param value:
        :rtype: dict
        """
        separator = '='
        result = {}
        for line in cls._parse_list(value):
            key, sep, val = line.partition(separator)
            if sep != separator:
                raise DistutilsOptionError(
                    'Unable to parse option value to dict: %s' % value
                )
            result[key.strip()] = val.strip()

        return result

    @classmethod
    def _parse_bool(cls, value):
        """Represents value as boolean.

        :param value:
        :rtype: bool
        """
        value = value.lower()
        return value in ('1', 'true', 'yes')

    @classmethod
    def _exclude_files_parser(cls, key):
        """Returns a parser function to make sure field inputs
        are not files.

        Parses a value after getting the key so error messages are
        more informative.

        :param key:
        :rtype: callable
        """

        def parser(value):
            exclude_directive = 'file:'
            if value.startswith(exclude_directive):
                raise ValueError(
                    'Only strings are accepted for the {0} field, '
                    'files are not accepted'.format(key)
                )
            return value

        return parser

    @classmethod
    def _parse_file(cls, value, root_dir: _Path):
        """Represents value as a string, allowing including text
        from nearest files using `file:` directive.

        Directive is sandboxed and won't reach anything outside
        directory with setup.py.

        Examples:
            file: README.rst, CHANGELOG.md, src/file.txt

        :param str value:
        :rtype: str
        """
        include_directive = 'file:'

        if not isinstance(value, str):
            return value

        if not value.startswith(include_directive):
            return value

        spec = value[len(include_directive) :]
        filepaths = (path.strip() for path in spec.split(','))
        return expand.read_files(filepaths, root_dir)

    def _parse_attr(self, value, package_dir, root_dir: _Path):
        """Represents value as a module attribute.

        Examples:
            attr: package.attr
            attr: package.module.attr

        :param str value:
        :rtype: str
        """
        attr_directive = 'attr:'
        if not value.startswith(attr_directive):
            return value

        attr_desc = value.replace(attr_directive, '')

        # Make sure package_dir is populated correctly, so `attr:` directives can work
        package_dir.update(self.ensure_discovered.package_dir)
        return expand.read_attr(attr_desc, package_dir, root_dir)

    @classmethod
    def _get_parser_compound(cls, *parse_methods):
        """Returns parser function to represents value as a list.

        Parses a value applying given methods one after another.

        :param parse_methods:
        :rtype: callable
        """

        def parse(value):
            parsed = value

            for method in parse_methods:
                parsed = method(parsed)

            return parsed

        return parse

    @classmethod
    def _parse_section_to_dict_with_key(cls, section_options, values_parser):
        """Parses section options into a dictionary.

        Applies a given parser to each option in a section.

        :param dict section_options:
        :param callable values_parser: function with 2 args corresponding to key, value
        :rtype: dict
        """
        value = {}
        for key, (_, val) in section_options.items():
            value[key] = values_parser(key, val)
        return value

    @classmethod
    def _parse_section_to_dict(cls, section_options, values_parser=None):
        """Parses section options into a dictionary.

        Optionally applies a given parser to each value.

        :param dict section_options:
        :param callable values_parser: function with 1 arg corresponding to option value
        :rtype: dict
        """
        parser = (lambda _, v: values_parser(v)) if values_parser else (lambda _, v: v)
        return cls._parse_section_to_dict_with_key(section_options, parser)

    def parse_section(self, section_options):
        """Parses configuration file section.

        :param dict section_options:
        """
        for (name, (_, value)) in section_options.items():
            with contextlib.suppress(KeyError):
                # Keep silent for a new option may appear anytime.
                self[name] = value

    def parse(self):
        """Parses configuration file items from one
        or more related sections.

        """
        for section_name, section_options in self.sections.items():

            method_postfix = ''
            if section_name:  # [section.option] variant
                method_postfix = '_%s' % section_name

            section_parser_method: Optional[Callable] = getattr(
                self,
                # Dots in section names are translated into dunderscores.
                ('parse_section%s' % method_postfix).replace('.', '__'),
                None,
            )

            if section_parser_method is None:
                raise DistutilsOptionError(
                    'Unsupported distribution option section: [%s.%s]'
                    % (self.section_prefix, section_name)
                )

            section_parser_method(section_options)

    def _deprecated_config_handler(self, func, msg, warning_class):
        """this function will wrap around parameters that are deprecated

        :param msg: deprecation message
        :param warning_class: class of warning exception to be raised
        :param func: function to be wrapped around
        """

        @wraps(func)
        def config_handler(*args, **kwargs):
            warnings.warn(msg, warning_class)
            return func(*args, **kwargs)

        return config_handler


class ConfigMetadataHandler(ConfigHandler["DistributionMetadata"]):

    section_prefix = 'metadata'

    aliases = {
        'home_page': 'url',
        'summary': 'description',
        'classifier': 'classifiers',
        'platform': 'platforms',
    }

    strict_mode = False
    """We need to keep it loose, to be partially compatible with
    `pbr` and `d2to1` packages which also uses `metadata` section.

    """

    def __init__(
        self,
        target_obj: "DistributionMetadata",
        options: AllCommandOptions,
        ignore_option_errors: bool,
        ensure_discovered: expand.EnsurePackagesDiscovered,
        package_dir: Optional[dict] = None,
        root_dir: _Path = os.curdir
    ):
        super().__init__(target_obj, options, ignore_option_errors, ensure_discovered)
        self.package_dir = package_dir
        self.root_dir = root_dir

    @property
    def parsers(self):
        """Metadata item name to parser function mapping."""
        parse_list = self._parse_list
        parse_file = partial(self._parse_file, root_dir=self.root_dir)
        parse_dict = self._parse_dict
        exclude_files_parser = self._exclude_files_parser

        return {
            'platforms': parse_list,
            'keywords': parse_list,
            'provides': parse_list,
            'requires': self._deprecated_config_handler(
                parse_list,
                "The requires parameter is deprecated, please use "
                "install_requires for runtime dependencies.",
                SetuptoolsDeprecationWarning,
            ),
            'obsoletes': parse_list,
            'classifiers': self._get_parser_compound(parse_file, parse_list),
            'license': exclude_files_parser('license'),
            'license_file': self._deprecated_config_handler(
                exclude_files_parser('license_file'),
                "The license_file parameter is deprecated, "
                "use license_files instead.",
                SetuptoolsDeprecationWarning,
            ),
            'license_files': parse_list,
            'description': parse_file,
            'long_description': parse_file,
            'version': self._parse_version,
            'project_urls': parse_dict,
        }

    def _parse_version(self, value):
        """Parses `version` option value.

        :param value:
        :rtype: str

        """
        version = self._parse_file(value, self.root_dir)

        if version != value:
            version = version.strip()
            # Be strict about versions loaded from file because it's easy to
            # accidentally include newlines and other unintended content
            try:
                Version(version)
            except InvalidVersion:
                tmpl = (
                    'Version loaded from {value} does not '
                    'comply with PEP 440: {version}'
                )
                raise DistutilsOptionError(tmpl.format(**locals()))

            return version

        return expand.version(self._parse_attr(value, self.package_dir, self.root_dir))


class ConfigOptionsHandler(ConfigHandler["Distribution"]):

    section_prefix = 'options'

    def __init__(
        self,
        target_obj: "Distribution",
        options: AllCommandOptions,
        ignore_option_errors: bool,
        ensure_discovered: expand.EnsurePackagesDiscovered,
    ):
        super().__init__(target_obj, options, ignore_option_errors, ensure_discovered)
        self.root_dir = target_obj.src_root
        self.package_dir: Dict[str, str] = {}  # To be filled by `find_packages`

    @classmethod
    def _parse_list_semicolon(cls, value):
        return cls._parse_list(value, separator=';')

    def _parse_file_in_root(self, value):
        return self._parse_file(value, root_dir=self.root_dir)

    def _parse_requirements_list(self, label: str, value: str):
        # Parse a requirements list, either by reading in a `file:`, or a list.
        parsed = self._parse_list_semicolon(self._parse_file_in_root(value))
        _warn_accidental_env_marker_misconfig(label, value, parsed)
        # Filter it to only include lines that are not comments. `parse_list`
        # will have stripped each line and filtered out empties.
        return [line for line in parsed if not line.startswith("#")]

    @property
    def parsers(self):
        """Metadata item name to parser function mapping."""
        parse_list = self._parse_list
        parse_bool = self._parse_bool
        parse_dict = self._parse_dict
        parse_cmdclass = self._parse_cmdclass

        return {
            'zip_safe': parse_bool,
            'include_package_data': parse_bool,
            'package_dir': parse_dict,
            'scripts': parse_list,
            'eager_resources': parse_list,
            'dependency_links': parse_list,
            'namespace_packages': self._deprecated_config_handler(
                parse_list,
                "The namespace_packages parameter is deprecated, "
                "consider using implicit namespaces instead (PEP 420).",
                SetuptoolsDeprecationWarning,
            ),
            'install_requires': partial(
                self._parse_requirements_list, "install_requires"
            ),
            'setup_requires': self._parse_list_semicolon,
            'tests_require': self._parse_list_semicolon,
            'packages': self._parse_packages,
            'entry_points': self._parse_file_in_root,
            'py_modules': parse_list,
            'python_requires': SpecifierSet,
            'cmdclass': parse_cmdclass,
        }

    def _parse_cmdclass(self, value):
        package_dir = self.ensure_discovered.package_dir
        return expand.cmdclass(self._parse_dict(value), package_dir, self.root_dir)

    def _parse_packages(self, value):
        """Parses `packages` option value.

        :param value:
        :rtype: list
        """
        find_directives = ['find:', 'find_namespace:']
        trimmed_value = value.strip()

        if trimmed_value not in find_directives:
            return self._parse_list(value)

        # Read function arguments from a dedicated section.
        find_kwargs = self.parse_section_packages__find(
            self.sections.get('packages.find', {})
        )

        find_kwargs.update(
            namespaces=(trimmed_value == find_directives[1]),
            root_dir=self.root_dir,
            fill_package_dir=self.package_dir,
        )

        return expand.find_packages(**find_kwargs)

    def parse_section_packages__find(self, section_options):
        """Parses `packages.find` configuration file section.

        To be used in conjunction with _parse_packages().

        :param dict section_options:
        """
        section_data = self._parse_section_to_dict(section_options, self._parse_list)

        valid_keys = ['where', 'include', 'exclude']

        find_kwargs = dict(
            [(k, v) for k, v in section_data.items() if k in valid_keys and v]
        )

        where = find_kwargs.get('where')
        if where is not None:
            find_kwargs['where'] = where[0]  # cast list to single val

        return find_kwargs

    def parse_section_entry_points(self, section_options):
        """Parses `entry_points` configuration file section.

        :param dict section_options:
        """
        parsed = self._parse_section_to_dict(section_options, self._parse_list)
        self['entry_points'] = parsed

    def _parse_package_data(self, section_options):
        package_data = self._parse_section_to_dict(section_options, self._parse_list)
        return expand.canonic_package_data(package_data)

    def parse_section_package_data(self, section_options):
        """Parses `package_data` configuration file section.

        :param dict section_options:
        """
        self['package_data'] = self._parse_package_data(section_options)

    def parse_section_exclude_package_data(self, section_options):
        """Parses `exclude_package_data` configuration file section.

        :param dict section_options:
        """
        self['exclude_package_data'] = self._parse_package_data(section_options)

    def parse_section_extras_require(self, section_options):
        """Parses `extras_require` configuration file section.

        :param dict section_options:
        """
        parsed = self._parse_section_to_dict_with_key(
            section_options,
            lambda k, v: self._parse_requirements_list(f"extras_require[{k}]", v)
        )

        self['extras_require'] = parsed

    def parse_section_data_files(self, section_options):
        """Parses `data_files` configuration file section.

        :param dict section_options:
        """
        parsed = self._parse_section_to_dict(section_options, self._parse_list)
        self['data_files'] = expand.canonic_data_files(parsed, self.root_dir)
PK{5Z;Lib/site-packages/setuptools/_distutils/versionpredicate.pynuW+A"""Module for parsing and testing package version predicate strings.
"""
import re
import distutils.version
import operator


re_validPackage = re.compile(r"(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)", re.ASCII)
# (package) (rest)

re_paren = re.compile(r"^\s*\((.*)\)\s*$")  # (list) inside of parentheses
re_splitComparison = re.compile(r"^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$")
# (comp) (version)


def splitUp(pred):
    """Parse a single version comparison.

    Return (comparison string, StrictVersion)
    """
    res = re_splitComparison.match(pred)
    if not res:
        raise ValueError("bad package restriction syntax: %r" % pred)
    comp, verStr = res.groups()
    with distutils.version.suppress_known_deprecation():
        other = distutils.version.StrictVersion(verStr)
    return (comp, other)


compmap = {
    "<": operator.lt,
    "<=": operator.le,
    "==": operator.eq,
    ">": operator.gt,
    ">=": operator.ge,
    "!=": operator.ne,
}


class VersionPredicate:
    """Parse and test package version predicates.

    >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)')

    The `name` attribute provides the full dotted name that is given::

    >>> v.name
    'pyepat.abc'

    The str() of a `VersionPredicate` provides a normalized
    human-readable version of the expression::

    >>> print(v)
    pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3)

    The `satisfied_by()` method can be used to determine with a given
    version number is included in the set described by the version
    restrictions::

    >>> v.satisfied_by('1.1')
    True
    >>> v.satisfied_by('1.4')
    True
    >>> v.satisfied_by('1.0')
    False
    >>> v.satisfied_by('4444.4')
    False
    >>> v.satisfied_by('1555.1b3')
    False

    `VersionPredicate` is flexible in accepting extra whitespace::

    >>> v = VersionPredicate(' pat( ==  0.1  )  ')
    >>> v.name
    'pat'
    >>> v.satisfied_by('0.1')
    True
    >>> v.satisfied_by('0.2')
    False

    If any version numbers passed in do not conform to the
    restrictions of `StrictVersion`, a `ValueError` is raised::

    >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)')
    Traceback (most recent call last):
      ...
    ValueError: invalid version number '1.2zb3'

    It the module or package name given does not conform to what's
    allowed as a legal module or package name, `ValueError` is
    raised::

    >>> v = VersionPredicate('foo-bar')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: '-bar'

    >>> v = VersionPredicate('foo bar (12.21)')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: 'bar (12.21)'

    """

    def __init__(self, versionPredicateStr):
        """Parse a version predicate string."""
        # Fields:
        #    name:  package name
        #    pred:  list of (comparison string, StrictVersion)

        versionPredicateStr = versionPredicateStr.strip()
        if not versionPredicateStr:
            raise ValueError("empty package restriction")
        match = re_validPackage.match(versionPredicateStr)
        if not match:
            raise ValueError("bad package name in %r" % versionPredicateStr)
        self.name, paren = match.groups()
        paren = paren.strip()
        if paren:
            match = re_paren.match(paren)
            if not match:
                raise ValueError("expected parenthesized list: %r" % paren)
            str = match.groups()[0]
            self.pred = [splitUp(aPred) for aPred in str.split(",")]
            if not self.pred:
                raise ValueError("empty parenthesized list in %r" % versionPredicateStr)
        else:
            self.pred = []

    def __str__(self):
        if self.pred:
            seq = [cond + " " + str(ver) for cond, ver in self.pred]
            return self.name + " (" + ", ".join(seq) + ")"
        else:
            return self.name

    def satisfied_by(self, version):
        """True if version is compatible with all the predicates in self.
        The parameter version must be acceptable to the StrictVersion
        constructor.  It may be either a string or StrictVersion.
        """
        for cond, ver in self.pred:
            if not compmap[cond](version, ver):
                return False
        return True


_provision_rx = None


def split_provision(value):
    """Return the name and optional version number of a provision.

    The version number, if given, will be returned as a `StrictVersion`
    instance, otherwise it will be `None`.

    >>> split_provision('mypkg')
    ('mypkg', None)
    >>> split_provision(' mypkg( 1.2 ) ')
    ('mypkg', StrictVersion ('1.2'))
    """
    global _provision_rx
    if _provision_rx is None:
        _provision_rx = re.compile(
            r"([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$", re.ASCII
        )
    value = value.strip()
    m = _provision_rx.match(value)
    if not m:
        raise ValueError("illegal provides specification: %r" % value)
    ver = m.group(2) or None
    if ver:
        with distutils.version.suppress_known_deprecation():
            ver = distutils.version.StrictVersion(ver)
    return m.group(1), ver
PK{5ZHL" " 4Lib/site-packages/setuptools/_distutils/file_util.pynuW+A"""distutils.file_util

Utility functions for operating on single files.
"""

import os
from distutils.errors import DistutilsFileError
from distutils import log

# for generating verbose output in 'copy_file()'
_copy_action = {None: 'copying', 'hard': 'hard linking', 'sym': 'symbolically linking'}


def _copy_file_contents(src, dst, buffer_size=16 * 1024):  # noqa: C901
    """Copy the file 'src' to 'dst'; both must be filenames.  Any error
    opening either file, reading from 'src', or writing to 'dst', raises
    DistutilsFileError.  Data is read/written in chunks of 'buffer_size'
    bytes (default 16k).  No attempt is made to handle anything apart from
    regular files.
    """
    # Stolen from shutil module in the standard library, but with
    # custom error-handling added.
    fsrc = None
    fdst = None
    try:
        try:
            fsrc = open(src, 'rb')
        except OSError as e:
            raise DistutilsFileError("could not open '{}': {}".format(src, e.strerror))

        if os.path.exists(dst):
            try:
                os.unlink(dst)
            except OSError as e:
                raise DistutilsFileError(
                    "could not delete '{}': {}".format(dst, e.strerror)
                )

        try:
            fdst = open(dst, 'wb')
        except OSError as e:
            raise DistutilsFileError(
                "could not create '{}': {}".format(dst, e.strerror)
            )

        while True:
            try:
                buf = fsrc.read(buffer_size)
            except OSError as e:
                raise DistutilsFileError(
                    "could not read from '{}': {}".format(src, e.strerror)
                )

            if not buf:
                break

            try:
                fdst.write(buf)
            except OSError as e:
                raise DistutilsFileError(
                    "could not write to '{}': {}".format(dst, e.strerror)
                )
    finally:
        if fdst:
            fdst.close()
        if fsrc:
            fsrc.close()


def copy_file(  # noqa: C901
    src,
    dst,
    preserve_mode=1,
    preserve_times=1,
    update=0,
    link=None,
    verbose=1,
    dry_run=0,
):
    """Copy a file 'src' to 'dst'.  If 'dst' is a directory, then 'src' is
    copied there with the same name; otherwise, it must be a filename.  (If
    the file exists, it will be ruthlessly clobbered.)  If 'preserve_mode'
    is true (the default), the file's mode (type and permission bits, or
    whatever is analogous on the current platform) is copied.  If
    'preserve_times' is true (the default), the last-modified and
    last-access times are copied as well.  If 'update' is true, 'src' will
    only be copied if 'dst' does not exist, or if 'dst' does exist but is
    older than 'src'.

    'link' allows you to make hard links (os.link) or symbolic links
    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
    None (the default), files are copied.  Don't set 'link' on systems that
    don't support it: 'copy_file()' doesn't check if hard or symbolic
    linking is available. If hardlink fails, falls back to
    _copy_file_contents().

    Under Mac OS, uses the native file copy function in macostools; on
    other systems, uses '_copy_file_contents()' to copy file contents.

    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
    the output file, and 'copied' is true if the file was copied (or would
    have been copied, if 'dry_run' true).
    """
    # XXX if the destination file already exists, we clobber it if
    # copying, but blow up if linking.  Hmmm.  And I don't know what
    # macostools.copyfile() does.  Should definitely be consistent, and
    # should probably blow up if destination exists and we would be
    # changing it (ie. it's not already a hard/soft link to src OR
    # (not update) and (src newer than dst).

    from distutils.dep_util import newer
    from stat import ST_ATIME, ST_MTIME, ST_MODE, S_IMODE

    if not os.path.isfile(src):
        raise DistutilsFileError(
            "can't copy '%s': doesn't exist or not a regular file" % src
        )

    if os.path.isdir(dst):
        dir = dst
        dst = os.path.join(dst, os.path.basename(src))
    else:
        dir = os.path.dirname(dst)

    if update and not newer(src, dst):
        if verbose >= 1:
            log.debug("not copying %s (output up-to-date)", src)
        return (dst, 0)

    try:
        action = _copy_action[link]
    except KeyError:
        raise ValueError("invalid value '%s' for 'link' argument" % link)

    if verbose >= 1:
        if os.path.basename(dst) == os.path.basename(src):
            log.info("%s %s -> %s", action, src, dir)
        else:
            log.info("%s %s -> %s", action, src, dst)

    if dry_run:
        return (dst, 1)

    # If linking (hard or symbolic), use the appropriate system call
    # (Unix only, of course, but that's the caller's responsibility)
    elif link == 'hard':
        if not (os.path.exists(dst) and os.path.samefile(src, dst)):
            try:
                os.link(src, dst)
                return (dst, 1)
            except OSError:
                # If hard linking fails, fall back on copying file
                # (some special filesystems don't support hard linking
                #  even under Unix, see issue #8876).
                pass
    elif link == 'sym':
        if not (os.path.exists(dst) and os.path.samefile(src, dst)):
            os.symlink(src, dst)
            return (dst, 1)

    # Otherwise (non-Mac, not linking), copy the file contents and
    # (optionally) copy the times and mode.
    _copy_file_contents(src, dst)
    if preserve_mode or preserve_times:
        st = os.stat(src)

        # According to David Ascher , utime() should be done
        # before chmod() (at least under NT).
        if preserve_times:
            os.utime(dst, (st[ST_ATIME], st[ST_MTIME]))
        if preserve_mode:
            os.chmod(dst, S_IMODE(st[ST_MODE]))

    return (dst, 1)


# XXX I suspect this is Unix-specific -- need porting help!
def move_file(src, dst, verbose=1, dry_run=0):  # noqa: C901

    """Move a file 'src' to 'dst'.  If 'dst' is a directory, the file will
    be moved into it with the same name; otherwise, 'src' is just renamed
    to 'dst'.  Return the new full name of the file.

    Handles cross-device moves on Unix using 'copy_file()'.  What about
    other systems???
    """
    from os.path import exists, isfile, isdir, basename, dirname
    import errno

    if verbose >= 1:
        log.info("moving %s -> %s", src, dst)

    if dry_run:
        return dst

    if not isfile(src):
        raise DistutilsFileError("can't move '%s': not a regular file" % src)

    if isdir(dst):
        dst = os.path.join(dst, basename(src))
    elif exists(dst):
        raise DistutilsFileError(
            "can't move '{}': destination '{}' already exists".format(src, dst)
        )

    if not isdir(dirname(dst)):
        raise DistutilsFileError(
            "can't move '{}': destination '{}' not a valid path".format(src, dst)
        )

    copy_it = False
    try:
        os.rename(src, dst)
    except OSError as e:
        (num, msg) = e.args
        if num == errno.EXDEV:
            copy_it = True
        else:
            raise DistutilsFileError(
                "couldn't move '{}' to '{}': {}".format(src, dst, msg)
            )

    if copy_it:
        copy_file(src, dst, verbose=verbose)
        try:
            os.unlink(src)
        except OSError as e:
            (num, msg) = e.args
            try:
                os.unlink(dst)
            except OSError:
                pass
            raise DistutilsFileError(
                "couldn't move '%s' to '%s' by copy/delete: "
                "delete '%s' failed: %s" % (src, dst, src, msg)
            )
    return dst


def write_file(filename, contents):
    """Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    """
    f = open(filename, "w")
    try:
        for line in contents:
            f.write(line + "\n")
    finally:
        f.close()
PK{5ZC
c5Lib/site-packages/setuptools/_distutils/py39compat.pynuW+Aimport sys
import platform


def add_ext_suffix_39(vars):
    """
    Ensure vars contains 'EXT_SUFFIX'. pypa/distutils#130
    """
    import _imp

    ext_suffix = _imp.extension_suffixes()[0]
    vars.update(
        EXT_SUFFIX=ext_suffix,
        # sysconfig sets SO to match EXT_SUFFIX, so maintain
        # that expectation.
        # https://github.com/python/cpython/blob/785cc6770588de087d09e89a69110af2542be208/Lib/sysconfig.py#L671-L673
        SO=ext_suffix,
    )


needs_ext_suffix = sys.version_info < (3, 10) and platform.system() == 'Windows'
add_ext_suffix = add_ext_suffix_39 if needs_ext_suffix else lambda vars: None
PK{5Z997Lib/site-packages/setuptools/_distutils/bcppcompiler.pynuW+A"""distutils.bcppcompiler

Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
"""

# This implementation by Lyle Johnson, based on the original msvccompiler.py
# module and using the directions originally published by Gordon Williams.

# XXX looks like there's a LOT of overlap between these two classes:
# someone should sit down and factor out the common code as
# WindowsCCompiler!  --GPW


import os
import warnings

from distutils.errors import (
    DistutilsExecError,
    CompileError,
    LibError,
    LinkError,
    UnknownFileError,
)
from distutils.ccompiler import CCompiler, gen_preprocess_options
from distutils.file_util import write_file
from distutils.dep_util import newer
from distutils import log


warnings.warn(
    "bcppcompiler is deprecated and slated to be removed "
    "in the future. Please discontinue use or file an issue "
    "with pypa/distutils describing your use case.",
    DeprecationWarning,
)


class BCPPCompiler(CCompiler):
    """Concrete class that implements an interface to the Borland C/C++
    compiler, as defined by the CCompiler abstract class.
    """

    compiler_type = 'bcpp'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = _c_extensions + _cpp_extensions
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'

    def __init__(self, verbose=0, dry_run=0, force=0):

        super().__init__(verbose, dry_run, force)

        # These executables are assumed to all be in the path.
        # Borland doesn't seem to use any special registry settings to
        # indicate their installation locations.

        self.cc = "bcc32.exe"
        self.linker = "ilink32.exe"
        self.lib = "tlib.exe"

        self.preprocess_options = None
        self.compile_options = ['/tWM', '/O2', '/q', '/g0']
        self.compile_options_debug = ['/tWM', '/Od', '/q', '/g0']

        self.ldflags_shared = ['/Tpd', '/Gn', '/q', '/x']
        self.ldflags_shared_debug = ['/Tpd', '/Gn', '/q', '/x']
        self.ldflags_static = []
        self.ldflags_exe = ['/Gn', '/q', '/x']
        self.ldflags_exe_debug = ['/Gn', '/q', '/x', '/r']

    # -- Worker methods ------------------------------------------------

    def compile(  # noqa: C901
        self,
        sources,
        output_dir=None,
        macros=None,
        include_dirs=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        depends=None,
    ):

        macros, objects, extra_postargs, pp_opts, build = self._setup_compile(
            output_dir, macros, include_dirs, sources, depends, extra_postargs
        )
        compile_opts = extra_preargs or []
        compile_opts.append('-c')
        if debug:
            compile_opts.extend(self.compile_options_debug)
        else:
            compile_opts.extend(self.compile_options)

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            # XXX why do the normpath here?
            src = os.path.normpath(src)
            obj = os.path.normpath(obj)
            # XXX _setup_compile() did a mkpath() too but before the normpath.
            # Is it possible to skip the normpath?
            self.mkpath(os.path.dirname(obj))

            if ext == '.res':
                # This is already a binary file -- skip it.
                continue  # the 'for' loop
            if ext == '.rc':
                # This needs to be compiled to a .res file -- do it now.
                try:
                    self.spawn(["brcc32", "-fo", obj, src])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue  # the 'for' loop

            # The next two are both for the real compiler.
            if ext in self._c_extensions:
                input_opt = ""
            elif ext in self._cpp_extensions:
                input_opt = "-P"
            else:
                # Unknown file type -- no extra options.  The compiler
                # will probably fail, but let it just in case this is a
                # file the compiler recognizes even if we don't.
                input_opt = ""

            output_opt = "-o" + obj

            # Compiler command line syntax is: "bcc32 [options] file(s)".
            # Note that the source file names must appear at the end of
            # the command line.
            try:
                self.spawn(
                    [self.cc]
                    + compile_opts
                    + pp_opts
                    + [input_opt, output_opt]
                    + extra_postargs
                    + [src]
                )
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects

    # compile ()

    def create_static_lib(
        self, objects, output_libname, output_dir=None, debug=0, target_lang=None
    ):

        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        output_filename = self.library_filename(output_libname, output_dir=output_dir)

        if self._need_link(objects, output_filename):
            lib_args = [output_filename, '/u'] + objects
            if debug:
                pass  # XXX what goes here?
            try:
                self.spawn([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    # create_static_lib ()

    def link(  # noqa: C901
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):

        # XXX this ignores 'build_temp'!  should follow the lead of
        # msvccompiler.py

        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        (libraries, library_dirs, runtime_library_dirs) = self._fix_lib_args(
            libraries, library_dirs, runtime_library_dirs
        )

        if runtime_library_dirs:
            log.warn(
                "I don't know what to do with 'runtime_library_dirs': %s",
                str(runtime_library_dirs),
            )

        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):

            # Figure out linker args based on type of target.
            if target_desc == CCompiler.EXECUTABLE:
                startup_obj = 'c0w32'
                if debug:
                    ld_args = self.ldflags_exe_debug[:]
                else:
                    ld_args = self.ldflags_exe[:]
            else:
                startup_obj = 'c0d32'
                if debug:
                    ld_args = self.ldflags_shared_debug[:]
                else:
                    ld_args = self.ldflags_shared[:]

            # Create a temporary exports file for use by the linker
            if export_symbols is None:
                def_file = ''
            else:
                head, tail = os.path.split(output_filename)
                modname, ext = os.path.splitext(tail)
                temp_dir = os.path.dirname(objects[0])  # preserve tree structure
                def_file = os.path.join(temp_dir, '%s.def' % modname)
                contents = ['EXPORTS']
                for sym in export_symbols or []:
                    contents.append('  {}=_{}'.format(sym, sym))
                self.execute(write_file, (def_file, contents), "writing %s" % def_file)

            # Borland C++ has problems with '/' in paths
            objects2 = map(os.path.normpath, objects)
            # split objects in .obj and .res files
            # Borland C++ needs them at different positions in the command line
            objects = [startup_obj]
            resources = []
            for file in objects2:
                (base, ext) = os.path.splitext(os.path.normcase(file))
                if ext == '.res':
                    resources.append(file)
                else:
                    objects.append(file)

            for ell in library_dirs:
                ld_args.append("/L%s" % os.path.normpath(ell))
            ld_args.append("/L.")  # we sometimes use relative paths

            # list of object files
            ld_args.extend(objects)

            # XXX the command-line syntax for Borland C++ is a bit wonky;
            # certain filenames are jammed together in one big string, but
            # comma-delimited.  This doesn't mesh too well with the
            # Unix-centric attitude (with a DOS/Windows quoting hack) of
            # 'spawn()', so constructing the argument list is a bit
            # awkward.  Note that doing the obvious thing and jamming all
            # the filenames and commas into one argument would be wrong,
            # because 'spawn()' would quote any filenames with spaces in
            # them.  Arghghh!.  Apparently it works fine as coded...

            # name of dll/exe file
            ld_args.extend([',', output_filename])
            # no map file and start libraries
            ld_args.append(',,')

            for lib in libraries:
                # see if we find it and if there is a bcpp specific lib
                # (xxx_bcpp.lib)
                libfile = self.find_library_file(library_dirs, lib, debug)
                if libfile is None:
                    ld_args.append(lib)
                    # probably a BCPP internal library -- don't warn
                else:
                    # full name which prefers bcpp_xxx.lib over xxx.lib
                    ld_args.append(libfile)

            # some default libraries
            ld_args.append('import32')
            ld_args.append('cw32mt')

            # def file for export symbols
            ld_args.extend([',', def_file])
            # add resource files
            ld_args.append(',')
            ld_args.extend(resources)

            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            self.mkpath(os.path.dirname(output_filename))
            try:
                self.spawn([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)

        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    # link ()

    # -- Miscellaneous methods -----------------------------------------

    def find_library_file(self, dirs, lib, debug=0):
        # List of effective library names to try, in order of preference:
        # xxx_bcpp.lib is better than xxx.lib
        # and xxx_d.lib is better than xxx.lib if debug is set
        #
        # The "_bcpp" suffix is to handle a Python installation for people
        # with multiple compilers (primarily Distutils hackers, I suspect
        # ;-).  The idea is they'd have one static library for each
        # compiler they care about, since (almost?) every Windows compiler
        # seems to have a different format for static libraries.
        if debug:
            dlib = lib + "_d"
            try_names = (dlib + "_bcpp", lib + "_bcpp", dlib, lib)
        else:
            try_names = (lib + "_bcpp", lib)

        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename(name))
                if os.path.exists(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None

    # overwrite the one from CCompiler to support rc and res-files
    def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
        if output_dir is None:
            output_dir = ''
        obj_names = []
        for src_name in source_filenames:
            # use normcase to make sure '.rc' is really '.rc' and not '.RC'
            (base, ext) = os.path.splitext(os.path.normcase(src_name))
            if ext not in (self.src_extensions + ['.rc', '.res']):
                raise UnknownFileError(
                    "unknown file type '{}' (from '{}')".format(ext, src_name)
                )
            if strip_dir:
                base = os.path.basename(base)
            if ext == '.res':
                # these can go unchanged
                obj_names.append(os.path.join(output_dir, base + ext))
            elif ext == '.rc':
                # these need to be compiled to .res-files
                obj_names.append(os.path.join(output_dir, base + '.res'))
            else:
                obj_names.append(os.path.join(output_dir, base + self.obj_extension))
        return obj_names

    # object_filenames ()

    def preprocess(
        self,
        source,
        output_file=None,
        macros=None,
        include_dirs=None,
        extra_preargs=None,
        extra_postargs=None,
    ):

        (_, macros, include_dirs) = self._fix_compile_args(None, macros, include_dirs)
        pp_opts = gen_preprocess_options(macros, include_dirs)
        pp_args = ['cpp32.exe'] + pp_opts
        if output_file is not None:
            pp_args.append('-o' + output_file)
        if extra_preargs:
            pp_args[:0] = extra_preargs
        if extra_postargs:
            pp_args.extend(extra_postargs)
        pp_args.append(source)

        # We need to preprocess: either we're being forced to, or the
        # source file is newer than the target (or the target doesn't
        # exist).
        if self.force or output_file is None or newer(source, output_file):
            if output_file:
                self.mkpath(os.path.dirname(output_file))
            try:
                self.spawn(pp_args)
            except DistutilsExecError as msg:
                print(msg)
                raise CompileError(msg)

    # preprocess()
PK{5Z= vK2\2\7Lib/site-packages/setuptools/_distutils/msvccompiler.pynuW+A"""distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
"""

# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
#   finding DevStudio (through the registry)

import sys
import os
import warnings
from distutils.errors import (
    DistutilsExecError,
    DistutilsPlatformError,
    CompileError,
    LibError,
    LinkError,
)
from distutils.ccompiler import CCompiler, gen_lib_options
from distutils import log

_can_read_reg = False
try:
    import winreg

    _can_read_reg = True
    hkey_mod = winreg

    RegOpenKeyEx = winreg.OpenKeyEx
    RegEnumKey = winreg.EnumKey
    RegEnumValue = winreg.EnumValue
    RegError = winreg.error

except ImportError:
    try:
        import win32api
        import win32con

        _can_read_reg = True
        hkey_mod = win32con

        RegOpenKeyEx = win32api.RegOpenKeyEx
        RegEnumKey = win32api.RegEnumKey
        RegEnumValue = win32api.RegEnumValue
        RegError = win32api.error
    except ImportError:
        log.info(
            "Warning: Can't read registry to find the "
            "necessary compiler setting\n"
            "Make sure that Python modules winreg, "
            "win32api or win32con are installed."
        )
        pass

if _can_read_reg:
    HKEYS = (
        hkey_mod.HKEY_USERS,
        hkey_mod.HKEY_CURRENT_USER,
        hkey_mod.HKEY_LOCAL_MACHINE,
        hkey_mod.HKEY_CLASSES_ROOT,
    )


warnings.warn(
    "msvccompiler is deprecated and slated to be removed "
    "in the future. Please discontinue use or file an issue "
    "with pypa/distutils describing your use case.",
    DeprecationWarning,
)


def read_keys(base, key):
    """Return list of registry keys."""
    try:
        handle = RegOpenKeyEx(base, key)
    except RegError:
        return None
    L = []
    i = 0
    while True:
        try:
            k = RegEnumKey(handle, i)
        except RegError:
            break
        L.append(k)
        i += 1
    return L


def read_values(base, key):
    """Return dict of registry keys and values.

    All names are converted to lowercase.
    """
    try:
        handle = RegOpenKeyEx(base, key)
    except RegError:
        return None
    d = {}
    i = 0
    while True:
        try:
            name, value, type = RegEnumValue(handle, i)
        except RegError:
            break
        name = name.lower()
        d[convert_mbcs(name)] = convert_mbcs(value)
        i += 1
    return d


def convert_mbcs(s):
    dec = getattr(s, "decode", None)
    if dec is not None:
        try:
            s = dec("mbcs")
        except UnicodeError:
            pass
    return s


class MacroExpander:
    def __init__(self, version):
        self.macros = {}
        self.load_macros(version)

    def set_macro(self, macro, path, key):
        for base in HKEYS:
            d = read_values(base, path)
            if d:
                self.macros["$(%s)" % macro] = d[key]
                break

    def load_macros(self, version):
        vsbase = r"Software\Microsoft\VisualStudio\%0.1f" % version
        self.set_macro("VCInstallDir", vsbase + r"\Setup\VC", "productdir")
        self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir")
        net = r"Software\Microsoft\.NETFramework"
        self.set_macro("FrameworkDir", net, "installroot")
        try:
            if version > 7.0:
                self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1")
            else:
                self.set_macro("FrameworkSDKDir", net, "sdkinstallroot")
        except KeyError:
            raise DistutilsPlatformError(
                """Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py."""
            )

        p = r"Software\Microsoft\NET Framework Setup\Product"
        for base in HKEYS:
            try:
                h = RegOpenKeyEx(base, p)
            except RegError:
                continue
            key = RegEnumKey(h, 0)
            d = read_values(base, r"{}\{}".format(p, key))
            self.macros["$(FrameworkVersion)"] = d["version"]

    def sub(self, s):
        for k, v in self.macros.items():
            s = s.replace(k, v)
        return s


def get_build_version():
    """Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    """
    prefix = "MSC v."
    i = sys.version.find(prefix)
    if i == -1:
        return 6
    i = i + len(prefix)
    s, rest = sys.version[i:].split(" ", 1)
    majorVersion = int(s[:-2]) - 6
    if majorVersion >= 13:
        # v13 was skipped and should be v14
        majorVersion += 1
    minorVersion = int(s[2:3]) / 10.0
    # I don't think paths are affected by minor version in version 6
    if majorVersion == 6:
        minorVersion = 0
    if majorVersion >= 6:
        return majorVersion + minorVersion
    # else we don't know what version of the compiler this is
    return None


def get_build_architecture():
    """Return the processor architecture.

    Possible results are "Intel" or "AMD64".
    """

    prefix = " bit ("
    i = sys.version.find(prefix)
    if i == -1:
        return "Intel"
    j = sys.version.find(")", i)
    return sys.version[i + len(prefix) : j]


def normalize_and_reduce_paths(paths):
    """Return a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    """
    # Paths are normalized so things like:  /a and /a/ aren't both preserved.
    reduced_paths = []
    for p in paths:
        np = os.path.normpath(p)
        # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set.
        if np not in reduced_paths:
            reduced_paths.append(np)
    return reduced_paths


class MSVCCompiler(CCompiler):
    """Concrete class that implements an interface to Microsoft Visual C++,
    as defined by the CCompiler abstract class."""

    compiler_type = 'msvc'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']
    _rc_extensions = ['.rc']
    _mc_extensions = ['.mc']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = _c_extensions + _cpp_extensions + _rc_extensions + _mc_extensions
    res_extension = '.res'
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'

    def __init__(self, verbose=0, dry_run=0, force=0):
        super().__init__(verbose, dry_run, force)
        self.__version = get_build_version()
        self.__arch = get_build_architecture()
        if self.__arch == "Intel":
            # x86
            if self.__version >= 7:
                self.__root = r"Software\Microsoft\VisualStudio"
                self.__macros = MacroExpander(self.__version)
            else:
                self.__root = r"Software\Microsoft\Devstudio"
            self.__product = "Visual Studio version %s" % self.__version
        else:
            # Win64. Assume this was built with the platform SDK
            self.__product = "Microsoft SDK compiler %s" % (self.__version + 6)

        self.initialized = False

    def initialize(self):
        self.__paths = []
        if (
            "DISTUTILS_USE_SDK" in os.environ
            and "MSSdk" in os.environ
            and self.find_exe("cl.exe")
        ):
            # Assume that the SDK set up everything alright; don't try to be
            # smarter
            self.cc = "cl.exe"
            self.linker = "link.exe"
            self.lib = "lib.exe"
            self.rc = "rc.exe"
            self.mc = "mc.exe"
        else:
            self.__paths = self.get_msvc_paths("path")

            if len(self.__paths) == 0:
                raise DistutilsPlatformError(
                    "Python was built with %s, "
                    "and extensions need to be built with the same "
                    "version of the compiler, but it isn't installed." % self.__product
                )

            self.cc = self.find_exe("cl.exe")
            self.linker = self.find_exe("link.exe")
            self.lib = self.find_exe("lib.exe")
            self.rc = self.find_exe("rc.exe")  # resource compiler
            self.mc = self.find_exe("mc.exe")  # message compiler
            self.set_path_env_var('lib')
            self.set_path_env_var('include')

        # extend the MSVC path with the current path
        try:
            for p in os.environ['path'].split(';'):
                self.__paths.append(p)
        except KeyError:
            pass
        self.__paths = normalize_and_reduce_paths(self.__paths)
        os.environ['path'] = ";".join(self.__paths)

        self.preprocess_options = None
        if self.__arch == "Intel":
            self.compile_options = ['/nologo', '/O2', '/MD', '/W3', '/GX', '/DNDEBUG']
            self.compile_options_debug = [
                '/nologo',
                '/Od',
                '/MDd',
                '/W3',
                '/GX',
                '/Z7',
                '/D_DEBUG',
            ]
        else:
            # Win64
            self.compile_options = ['/nologo', '/O2', '/MD', '/W3', '/GS-', '/DNDEBUG']
            self.compile_options_debug = [
                '/nologo',
                '/Od',
                '/MDd',
                '/W3',
                '/GS-',
                '/Z7',
                '/D_DEBUG',
            ]

        self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']
        if self.__version >= 7:
            self.ldflags_shared_debug = ['/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG']
        else:
            self.ldflags_shared_debug = [
                '/DLL',
                '/nologo',
                '/INCREMENTAL:no',
                '/pdb:None',
                '/DEBUG',
            ]
        self.ldflags_static = ['/nologo']

        self.initialized = True

    # -- Worker methods ------------------------------------------------

    def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
        # Copied from ccompiler.py, extended to return .res as 'object'-file
        # for .rc input file
        if output_dir is None:
            output_dir = ''
        obj_names = []
        for src_name in source_filenames:
            (base, ext) = os.path.splitext(src_name)
            base = os.path.splitdrive(base)[1]  # Chop off the drive
            base = base[os.path.isabs(base) :]  # If abs, chop off leading /
            if ext not in self.src_extensions:
                # Better to raise an exception instead of silently continuing
                # and later complain about sources and targets having
                # different lengths
                raise CompileError("Don't know how to compile %s" % src_name)
            if strip_dir:
                base = os.path.basename(base)
            if ext in self._rc_extensions:
                obj_names.append(os.path.join(output_dir, base + self.res_extension))
            elif ext in self._mc_extensions:
                obj_names.append(os.path.join(output_dir, base + self.res_extension))
            else:
                obj_names.append(os.path.join(output_dir, base + self.obj_extension))
        return obj_names

    def compile(  # noqa: C901
        self,
        sources,
        output_dir=None,
        macros=None,
        include_dirs=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        depends=None,
    ):

        if not self.initialized:
            self.initialize()
        compile_info = self._setup_compile(
            output_dir, macros, include_dirs, sources, depends, extra_postargs
        )
        macros, objects, extra_postargs, pp_opts, build = compile_info

        compile_opts = extra_preargs or []
        compile_opts.append('/c')
        if debug:
            compile_opts.extend(self.compile_options_debug)
        else:
            compile_opts.extend(self.compile_options)

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            if debug:
                # pass the full pathname to MSVC in debug mode,
                # this allows the debugger to find the source file
                # without asking the user to browse for it
                src = os.path.abspath(src)

            if ext in self._c_extensions:
                input_opt = "/Tc" + src
            elif ext in self._cpp_extensions:
                input_opt = "/Tp" + src
            elif ext in self._rc_extensions:
                # compile .RC to .RES file
                input_opt = src
                output_opt = "/fo" + obj
                try:
                    self.spawn([self.rc] + pp_opts + [output_opt] + [input_opt])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            elif ext in self._mc_extensions:
                # Compile .MC to .RC file to .RES file.
                #   * '-h dir' specifies the directory for the
                #     generated include file
                #   * '-r dir' specifies the target directory of the
                #     generated RC file and the binary message resource
                #     it includes
                #
                # For now (since there are no options to change this),
                # we use the source-directory for the include file and
                # the build directory for the RC file and message
                # resources. This works at least for win32all.
                h_dir = os.path.dirname(src)
                rc_dir = os.path.dirname(obj)
                try:
                    # first compile .MC to .RC and .H file
                    self.spawn([self.mc] + ['-h', h_dir, '-r', rc_dir] + [src])
                    base, _ = os.path.splitext(os.path.basename(src))
                    rc_file = os.path.join(rc_dir, base + '.rc')
                    # then compile .RC to .RES file
                    self.spawn([self.rc] + ["/fo" + obj] + [rc_file])

                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            else:
                # how to handle this file?
                raise CompileError(
                    "Don't know how to compile {} to {}".format(src, obj)
                )

            output_opt = "/Fo" + obj
            try:
                self.spawn(
                    [self.cc]
                    + compile_opts
                    + pp_opts
                    + [input_opt, output_opt]
                    + extra_postargs
                )
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects

    def create_static_lib(
        self, objects, output_libname, output_dir=None, debug=0, target_lang=None
    ):

        if not self.initialized:
            self.initialize()
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        output_filename = self.library_filename(output_libname, output_dir=output_dir)

        if self._need_link(objects, output_filename):
            lib_args = objects + ['/OUT:' + output_filename]
            if debug:
                pass  # XXX what goes here?
            try:
                self.spawn([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def link(  # noqa: C901
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):

        if not self.initialized:
            self.initialize()
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
        (libraries, library_dirs, runtime_library_dirs) = fixed_args

        if runtime_library_dirs:
            self.warn(
                "I don't know what to do with 'runtime_library_dirs': "
                + str(runtime_library_dirs)
            )

        lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            if target_desc == CCompiler.EXECUTABLE:
                if debug:
                    ldflags = self.ldflags_shared_debug[1:]
                else:
                    ldflags = self.ldflags_shared[1:]
            else:
                if debug:
                    ldflags = self.ldflags_shared_debug
                else:
                    ldflags = self.ldflags_shared

            export_opts = []
            for sym in export_symbols or []:
                export_opts.append("/EXPORT:" + sym)

            ld_args = (
                ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
            )

            # The MSVC linker generates .lib and .exp files, which cannot be
            # suppressed by any linker switches. The .lib files may even be
            # needed! Make sure they are generated in the temporary build
            # directory. Since they have different names for debug and release
            # builds, they can go into the same directory.
            if export_symbols is not None:
                (dll_name, dll_ext) = os.path.splitext(
                    os.path.basename(output_filename)
                )
                implib_file = os.path.join(
                    os.path.dirname(objects[0]), self.library_filename(dll_name)
                )
                ld_args.append('/IMPLIB:' + implib_file)

            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            self.mkpath(os.path.dirname(output_filename))
            try:
                self.spawn([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)

        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "/LIBPATH:" + dir

    def runtime_library_dir_option(self, dir):
        raise DistutilsPlatformError(
            "don't know how to set runtime library search path for MSVC++"
        )

    def library_option(self, lib):
        return self.library_filename(lib)

    def find_library_file(self, dirs, lib, debug=0):
        # Prefer a debugging library if found (and requested), but deal
        # with it if we don't have one.
        if debug:
            try_names = [lib + "_d", lib]
        else:
            try_names = [lib]
        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename(name))
                if os.path.exists(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None

    # Helper methods for using the MSVC registry settings

    def find_exe(self, exe):
        """Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        """
        for p in self.__paths:
            fn = os.path.join(os.path.abspath(p), exe)
            if os.path.isfile(fn):
                return fn

        # didn't find it; try existing path
        for p in os.environ['Path'].split(';'):
            fn = os.path.join(os.path.abspath(p), exe)
            if os.path.isfile(fn):
                return fn

        return exe

    def get_msvc_paths(self, path, platform='x86'):
        """Get a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        """
        if not _can_read_reg:
            return []

        path = path + " dirs"
        if self.__version >= 7:
            key = r"{}\{:0.1f}\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories".format(
                self.__root,
                self.__version,
            )
        else:
            key = (
                r"%s\6.0\Build System\Components\Platforms"
                r"\Win32 (%s)\Directories" % (self.__root, platform)
            )

        for base in HKEYS:
            d = read_values(base, key)
            if d:
                if self.__version >= 7:
                    return self.__macros.sub(d[path]).split(";")
                else:
                    return d[path].split(";")
        # MSVC 6 seems to create the registry entries we need only when
        # the GUI is run.
        if self.__version == 6:
            for base in HKEYS:
                if read_values(base, r"%s\6.0" % self.__root) is not None:
                    self.warn(
                        "It seems you have Visual Studio 6 installed, "
                        "but the expected registry settings are not present.\n"
                        "You must at least run the Visual Studio GUI once "
                        "so that these entries are created."
                    )
                    break
        return []

    def set_path_env_var(self, name):
        """Set environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        """

        if name == "lib":
            p = self.get_msvc_paths("library")
        else:
            p = self.get_msvc_paths(name)
        if p:
            os.environ[name] = ';'.join(p)


if get_build_version() >= 8.0:
    log.debug("Importing new compiler from distutils.msvc9compiler")
    OldMSVCCompiler = MSVCCompiler
    from distutils.msvc9compiler import MSVCCompiler

    # get_build_architecture not really relevant now we support cross-compile
    from distutils.msvc9compiler import MacroExpander  # noqa: F811
PK{5Z#q222Lib/site-packages/setuptools/_distutils/version.pynuW+A#
# distutils/version.py
#
# Implements multiple version numbering conventions for the
# Python Module Distribution Utilities.
#
# $Id$
#

"""Provides classes to represent module version numbers (one class for
each style of version numbering).  There are currently two such classes
implemented: StrictVersion and LooseVersion.

Every version number class implements the following interface:
  * the 'parse' method takes a string and parses it to some internal
    representation; if the string is an invalid version number,
    'parse' raises a ValueError exception
  * the class constructor takes an optional string argument which,
    if supplied, is passed to 'parse'
  * __str__ reconstructs the string that was passed to 'parse' (or
    an equivalent string -- ie. one that will generate an equivalent
    version number instance)
  * __repr__ generates Python code to recreate the version number instance
  * _cmp compares the current instance with either another instance
    of the same class or a string (which will be parsed to an instance
    of the same class, thus must follow the same rules)
"""

import re
import warnings
import contextlib


@contextlib.contextmanager
def suppress_known_deprecation():
    with warnings.catch_warnings(record=True) as ctx:
        warnings.filterwarnings(
            action='default',
            category=DeprecationWarning,
            message="distutils Version classes are deprecated.",
        )
        yield ctx


class Version:
    """Abstract base class for version numbering classes.  Just provides
    constructor (__init__) and reproducer (__repr__), because those
    seem to be the same for all version numbering classes; and route
    rich comparisons to _cmp.
    """

    def __init__(self, vstring=None):
        if vstring:
            self.parse(vstring)
        warnings.warn(
            "distutils Version classes are deprecated. "
            "Use packaging.version instead.",
            DeprecationWarning,
            stacklevel=2,
        )

    def __repr__(self):
        return "{} ('{}')".format(self.__class__.__name__, str(self))

    def __eq__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c == 0

    def __lt__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c < 0

    def __le__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c <= 0

    def __gt__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c > 0

    def __ge__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c >= 0


# Interface for version-number classes -- must be implemented
# by the following classes (the concrete ones -- Version should
# be treated as an abstract class).
#    __init__ (string) - create and take same action as 'parse'
#                        (string parameter is optional)
#    parse (string)    - convert a string representation to whatever
#                        internal representation is appropriate for
#                        this style of version numbering
#    __str__ (self)    - convert back to a string; should be very similar
#                        (if not identical to) the string supplied to parse
#    __repr__ (self)   - generate Python code to recreate
#                        the instance
#    _cmp (self, other) - compare two version numbers ('other' may
#                        be an unparsed version string, or another
#                        instance of your version class)


class StrictVersion(Version):

    """Version numbering for anal retentives and software idealists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of two or three
    dot-separated numeric components, with an optional "pre-release" tag
    on the end.  The pre-release tag consists of the letter 'a' or 'b'
    followed by a number.  If the numeric components of two version
    numbers are equal, then one with a pre-release tag will always
    be deemed earlier (lesser) than one without.

    The following are valid version numbers (shown in the order that
    would be obtained by sorting according to the supplied cmp function):

        0.4       0.4.0  (these two are equivalent)
        0.4.1
        0.5a1
        0.5b3
        0.5
        0.9.6
        1.0
        1.0.4a3
        1.0.4b1
        1.0.4

    The following are examples of invalid version numbers:

        1
        2.7.2.2
        1.3.a4
        1.3pl1
        1.3c4

    The rationale for this version numbering system will be explained
    in the distutils documentation.
    """

    version_re = re.compile(
        r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', re.VERBOSE | re.ASCII
    )

    def parse(self, vstring):
        match = self.version_re.match(vstring)
        if not match:
            raise ValueError("invalid version number '%s'" % vstring)

        (major, minor, patch, prerelease, prerelease_num) = match.group(1, 2, 4, 5, 6)

        if patch:
            self.version = tuple(map(int, [major, minor, patch]))
        else:
            self.version = tuple(map(int, [major, minor])) + (0,)

        if prerelease:
            self.prerelease = (prerelease[0], int(prerelease_num))
        else:
            self.prerelease = None

    def __str__(self):

        if self.version[2] == 0:
            vstring = '.'.join(map(str, self.version[0:2]))
        else:
            vstring = '.'.join(map(str, self.version))

        if self.prerelease:
            vstring = vstring + self.prerelease[0] + str(self.prerelease[1])

        return vstring

    def _cmp(self, other):  # noqa: C901
        if isinstance(other, str):
            with suppress_known_deprecation():
                other = StrictVersion(other)
        elif not isinstance(other, StrictVersion):
            return NotImplemented

        if self.version != other.version:
            # numeric versions don't match
            # prerelease stuff doesn't matter
            if self.version < other.version:
                return -1
            else:
                return 1

        # have to compare prerelease
        # case 1: neither has prerelease; they're equal
        # case 2: self has prerelease, other doesn't; other is greater
        # case 3: self doesn't have prerelease, other does: self is greater
        # case 4: both have prerelease: must compare them!

        if not self.prerelease and not other.prerelease:
            return 0
        elif self.prerelease and not other.prerelease:
            return -1
        elif not self.prerelease and other.prerelease:
            return 1
        elif self.prerelease and other.prerelease:
            if self.prerelease == other.prerelease:
                return 0
            elif self.prerelease < other.prerelease:
                return -1
            else:
                return 1
        else:
            assert False, "never get here"


# end class StrictVersion


# The rules according to Greg Stein:
# 1) a version number has 1 or more numbers separated by a period or by
#    sequences of letters. If only periods, then these are compared
#    left-to-right to determine an ordering.
# 2) sequences of letters are part of the tuple for comparison and are
#    compared lexicographically
# 3) recognize the numeric components may have leading zeroes
#
# The LooseVersion class below implements these rules: a version number
# string is split up into a tuple of integer and string components, and
# comparison is a simple tuple comparison.  This means that version
# numbers behave in a predictable and obvious way, but a way that might
# not necessarily be how people *want* version numbers to behave.  There
# wouldn't be a problem if people could stick to purely numeric version
# numbers: just split on period and compare the numbers as tuples.
# However, people insist on putting letters into their version numbers;
# the most common purpose seems to be:
#   - indicating a "pre-release" version
#     ('alpha', 'beta', 'a', 'b', 'pre', 'p')
#   - indicating a post-release patch ('p', 'pl', 'patch')
# but of course this can't cover all version number schemes, and there's
# no way to know what a programmer means without asking him.
#
# The problem is what to do with letters (and other non-numeric
# characters) in a version number.  The current implementation does the
# obvious and predictable thing: keep them as strings and compare
# lexically within a tuple comparison.  This has the desired effect if
# an appended letter sequence implies something "post-release":
# eg. "0.99" < "0.99pl14" < "1.0", and "5.001" < "5.001m" < "5.002".
#
# However, if letters in a version number imply a pre-release version,
# the "obvious" thing isn't correct.  Eg. you would expect that
# "1.5.1" < "1.5.2a2" < "1.5.2", but under the tuple/lexical comparison
# implemented here, this just isn't so.
#
# Two possible solutions come to mind.  The first is to tie the
# comparison algorithm to a particular set of semantic rules, as has
# been done in the StrictVersion class above.  This works great as long
# as everyone can go along with bondage and discipline.  Hopefully a
# (large) subset of Python module programmers will agree that the
# particular flavour of bondage and discipline provided by StrictVersion
# provides enough benefit to be worth using, and will submit their
# version numbering scheme to its domination.  The free-thinking
# anarchists in the lot will never give in, though, and something needs
# to be done to accommodate them.
#
# Perhaps a "moderately strict" version class could be implemented that
# lets almost anything slide (syntactically), and makes some heuristic
# assumptions about non-digits in version number strings.  This could
# sink into special-case-hell, though; if I was as talented and
# idiosyncratic as Larry Wall, I'd go ahead and implement a class that
# somehow knows that "1.2.1" < "1.2.2a2" < "1.2.2" < "1.2.2pl3", and is
# just as happy dealing with things like "2g6" and "1.13++".  I don't
# think I'm smart enough to do it right though.
#
# In any case, I've coded the test suite for this module (see
# ../test/test_version.py) specifically to fail on things like comparing
# "1.2a2" and "1.2".  That's not because the *code* is doing anything
# wrong, it's because the simple, obvious design doesn't match my
# complicated, hairy expectations for real-world version numbers.  It
# would be a snap to fix the test suite to say, "Yep, LooseVersion does
# the Right Thing" (ie. the code matches the conception).  But I'd rather
# have a conception that matches common notions about version numbers.


class LooseVersion(Version):

    """Version numbering for anarchists and software realists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of a series of numbers,
    separated by either periods or strings of letters.  When comparing
    version numbers, the numeric components will be compared
    numerically, and the alphabetic components lexically.  The following
    are all valid version numbers, in no particular order:

        1.5.1
        1.5.2b2
        161
        3.10a
        8.02
        3.4j
        1996.07.12
        3.2.pl0
        3.1.1.6
        2g6
        11g
        0.960923
        2.2beta29
        1.13++
        5.5.kw
        2.0b1pl0

    In fact, there is no such thing as an invalid version number under
    this scheme; the rules for comparison are simple and predictable,
    but may not always give the results you want (for some definition
    of "want").
    """

    component_re = re.compile(r'(\d+ | [a-z]+ | \.)', re.VERBOSE)

    def parse(self, vstring):
        # I've given up on thinking I can reconstruct the version string
        # from the parsed tuple -- so I just store the string here for
        # use by __str__
        self.vstring = vstring
        components = [x for x in self.component_re.split(vstring) if x and x != '.']
        for i, obj in enumerate(components):
            try:
                components[i] = int(obj)
            except ValueError:
                pass

        self.version = components

    def __str__(self):
        return self.vstring

    def __repr__(self):
        return "LooseVersion ('%s')" % str(self)

    def _cmp(self, other):
        if isinstance(other, str):
            other = LooseVersion(other)
        elif not isinstance(other, LooseVersion):
            return NotImplemented

        if self.version == other.version:
            return 0
        if self.version < other.version:
            return -1
        if self.version > other.version:
            return 1


# end class LooseVersion
PK{5Z$$/Lib/site-packages/setuptools/_distutils/core.pynuW+A"""distutils.core

The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script).  Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
"""

import os
import sys
import tokenize

from distutils.debug import DEBUG
from distutils.errors import (
    DistutilsSetupError,
    DistutilsError,
    CCompilerError,
    DistutilsArgError,
)

# Mainly import these so setup scripts can "from distutils.core import" them.
from distutils.dist import Distribution
from distutils.cmd import Command
from distutils.config import PyPIRCCommand
from distutils.extension import Extension


__all__ = ['Distribution', 'Command', 'PyPIRCCommand', 'Extension', 'setup']

# This is a barebones help message generated displayed when the user
# runs the setup script with no arguments at all.  More useful help
# is generated with various --help options: global help, list commands,
# and per-command help.
USAGE = """\
usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
"""


def gen_usage(script_name):
    script = os.path.basename(script_name)
    return USAGE % locals()


# Some mild magic to control the behaviour of 'setup()' from 'run_setup()'.
_setup_stop_after = None
_setup_distribution = None

# Legal keyword arguments for the setup() function
setup_keywords = (
    'distclass',
    'script_name',
    'script_args',
    'options',
    'name',
    'version',
    'author',
    'author_email',
    'maintainer',
    'maintainer_email',
    'url',
    'license',
    'description',
    'long_description',
    'keywords',
    'platforms',
    'classifiers',
    'download_url',
    'requires',
    'provides',
    'obsoletes',
)

# Legal keyword arguments for the Extension constructor
extension_keywords = (
    'name',
    'sources',
    'include_dirs',
    'define_macros',
    'undef_macros',
    'library_dirs',
    'libraries',
    'runtime_library_dirs',
    'extra_objects',
    'extra_compile_args',
    'extra_link_args',
    'swig_opts',
    'export_symbols',
    'depends',
    'language',
)


def setup(**attrs):  # noqa: C901
    """The gateway to the Distutils: do everything your setup script needs
    to do, in a highly flexible and user-driven way.  Briefly: create a
    Distribution instance; find and parse config files; parse the command
    line; run each Distutils command found there, customized by the options
    supplied to 'setup()' (as keyword arguments), in config files, and on
    the command line.

    The Distribution instance might be an instance of a class supplied via
    the 'distclass' keyword argument to 'setup'; if no such class is
    supplied, then the Distribution class (in dist.py) is instantiated.
    All other arguments to 'setup' (except for 'cmdclass') are used to set
    attributes of the Distribution instance.

    The 'cmdclass' argument, if supplied, is a dictionary mapping command
    names to command classes.  Each command encountered on the command line
    will be turned into a command class, which is in turn instantiated; any
    class found in 'cmdclass' is used in place of the default, which is
    (for command 'foo_bar') class 'foo_bar' in module
    'distutils.command.foo_bar'.  The command class must provide a
    'user_options' attribute which is a list of option specifiers for
    'distutils.fancy_getopt'.  Any command-line options between the current
    and the next command are used to set attributes of the current command
    object.

    When the entire command-line has been successfully parsed, calls the
    'run()' method on each command object in turn.  This method will be
    driven entirely by the Distribution object (which each command object
    has a reference to, thanks to its constructor), and the
    command-specific options that became attributes of each command
    object.
    """

    global _setup_stop_after, _setup_distribution

    # Determine the distribution class -- either caller-supplied or
    # our Distribution (see below).
    klass = attrs.get('distclass')
    if klass:
        del attrs['distclass']
    else:
        klass = Distribution

    if 'script_name' not in attrs:
        attrs['script_name'] = os.path.basename(sys.argv[0])
    if 'script_args' not in attrs:
        attrs['script_args'] = sys.argv[1:]

    # Create the Distribution instance, using the remaining arguments
    # (ie. everything except distclass) to initialize it
    try:
        _setup_distribution = dist = klass(attrs)
    except DistutilsSetupError as msg:
        if 'name' not in attrs:
            raise SystemExit("error in setup command: %s" % msg)
        else:
            raise SystemExit("error in {} setup command: {}".format(attrs['name'], msg))

    if _setup_stop_after == "init":
        return dist

    # Find and parse the config file(s): they will override options from
    # the setup script, but be overridden by the command line.
    dist.parse_config_files()

    if DEBUG:
        print("options (after parsing config files):")
        dist.dump_option_dicts()

    if _setup_stop_after == "config":
        return dist

    # Parse the command line and override config files; any
    # command-line errors are the end user's fault, so turn them into
    # SystemExit to suppress tracebacks.
    try:
        ok = dist.parse_command_line()
    except DistutilsArgError as msg:
        raise SystemExit(gen_usage(dist.script_name) + "\nerror: %s" % msg)

    if DEBUG:
        print("options (after parsing command line):")
        dist.dump_option_dicts()

    if _setup_stop_after == "commandline":
        return dist

    # And finally, run all the commands found on the command line.
    if ok:
        return run_commands(dist)

    return dist


# setup ()


def run_commands(dist):
    """Given a Distribution object run all the commands,
    raising ``SystemExit`` errors in the case of failure.

    This function assumes that either ``sys.argv`` or ``dist.script_args``
    is already set accordingly.
    """
    try:
        dist.run_commands()
    except KeyboardInterrupt:
        raise SystemExit("interrupted")
    except OSError as exc:
        if DEBUG:
            sys.stderr.write("error: {}\n".format(exc))
            raise
        else:
            raise SystemExit("error: {}".format(exc))

    except (DistutilsError, CCompilerError) as msg:
        if DEBUG:
            raise
        else:
            raise SystemExit("error: " + str(msg))

    return dist


def run_setup(script_name, script_args=None, stop_after="run"):
    """Run a setup script in a somewhat controlled environment, and
    return the Distribution instance that drives things.  This is useful
    if you need to find out the distribution meta-data (passed as
    keyword args from 'script' to 'setup()', or the contents of the
    config files or command-line.

    'script_name' is a file that will be read and run with 'exec()';
    'sys.argv[0]' will be replaced with 'script' for the duration of the
    call.  'script_args' is a list of strings; if supplied,
    'sys.argv[1:]' will be replaced by 'script_args' for the duration of
    the call.

    'stop_after' tells 'setup()' when to stop processing; possible
    values:
      init
        stop after the Distribution instance has been created and
        populated with the keyword arguments to 'setup()'
      config
        stop after config files have been parsed (and their data
        stored in the Distribution instance)
      commandline
        stop after the command-line ('sys.argv[1:]' or 'script_args')
        have been parsed (and the data stored in the Distribution)
      run [default]
        stop after all commands have been run (the same as if 'setup()'
        had been called in the usual way

    Returns the Distribution instance, which provides all information
    used to drive the Distutils.
    """
    if stop_after not in ('init', 'config', 'commandline', 'run'):
        raise ValueError("invalid value for 'stop_after': {!r}".format(stop_after))

    global _setup_stop_after, _setup_distribution
    _setup_stop_after = stop_after

    save_argv = sys.argv.copy()
    g = {'__file__': script_name, '__name__': '__main__'}
    try:
        try:
            sys.argv[0] = script_name
            if script_args is not None:
                sys.argv[1:] = script_args
            # tokenize.open supports automatic encoding detection
            with tokenize.open(script_name) as f:
                code = f.read().replace(r'\r\n', r'\n')
                exec(code, g)
        finally:
            sys.argv = save_argv
            _setup_stop_after = None
    except SystemExit:
        # Hmm, should we do something if exiting with a non-zero code
        # (ie. error)?
        pass

    if _setup_distribution is None:
        raise RuntimeError(
            (
                "'distutils.core.setup()' was never called -- "
                "perhaps '%s' is not a Distutils setup script?"
            )
            % script_name
        )

    # I wonder if the setup script's namespace -- g and l -- would be of
    # any interest to callers?
    # print "_setup_distribution:", _setup_distribution
    return _setup_distribution


# run_setup ()
PK{5Zf0y		4Lib/site-packages/setuptools/_distutils/ccompiler.pynuW+A"""distutils.ccompiler

Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model."""

import sys
import os
import re

from distutils.errors import (
    CompileError,
    LinkError,
    UnknownFileError,
    DistutilsPlatformError,
    DistutilsModuleError,
)
from distutils.spawn import spawn
from distutils.file_util import move_file
from distutils.dir_util import mkpath
from distutils.dep_util import newer_group
from distutils.util import split_quoted, execute
from distutils import log


class CCompiler:
    """Abstract base class to define the interface that must be implemented
    by real compiler classes.  Also has some utility methods used by
    several compiler classes.

    The basic idea behind a compiler abstraction class is that each
    instance can be used for all the compile/link steps in building a
    single project.  Thus, attributes common to all of those compile and
    link steps -- include directories, macros to define, libraries to link
    against, etc. -- are attributes of the compiler instance.  To allow for
    variability in how individual files are treated, most of those
    attributes may be varied on a per-compilation or per-link basis.
    """

    # 'compiler_type' is a class attribute that identifies this class.  It
    # keeps code that wants to know what kind of compiler it's dealing with
    # from having to import all possible compiler classes just to do an
    # 'isinstance'.  In concrete CCompiler subclasses, 'compiler_type'
    # should really, really be one of the keys of the 'compiler_class'
    # dictionary (see below -- used by the 'new_compiler()' factory
    # function) -- authors of new compiler interface classes are
    # responsible for updating 'compiler_class'!
    compiler_type = None

    # XXX things not handled by this compiler abstraction model:
    #   * client can't provide additional options for a compiler,
    #     e.g. warning, optimization, debugging flags.  Perhaps this
    #     should be the domain of concrete compiler abstraction classes
    #     (UnixCCompiler, MSVCCompiler, etc.) -- or perhaps the base
    #     class should have methods for the common ones.
    #   * can't completely override the include or library searchg
    #     path, ie. no "cc -I -Idir1 -Idir2" or "cc -L -Ldir1 -Ldir2".
    #     I'm not sure how widely supported this is even by Unix
    #     compilers, much less on other platforms.  And I'm even less
    #     sure how useful it is; maybe for cross-compiling, but
    #     support for that is a ways off.  (And anyways, cross
    #     compilers probably have a dedicated binary with the
    #     right paths compiled in.  I hope.)
    #   * can't do really freaky things with the library list/library
    #     dirs, e.g. "-Ldir1 -lfoo -Ldir2 -lfoo" to link against
    #     different versions of libfoo.a in different locations.  I
    #     think this is useless without the ability to null out the
    #     library search path anyways.

    # Subclasses that rely on the standard filename generation methods
    # implemented below should override these; see the comment near
    # those methods ('object_filenames()' et. al.) for details:
    src_extensions = None  # list of strings
    obj_extension = None  # string
    static_lib_extension = None
    shared_lib_extension = None  # string
    static_lib_format = None  # format string
    shared_lib_format = None  # prob. same as static_lib_format
    exe_extension = None  # string

    # Default language settings. language_map is used to detect a source
    # file or Extension target language, checking source filenames.
    # language_order is used to detect the language precedence, when deciding
    # what language to use when mixing source types. For example, if some
    # extension has two files with ".c" extension, and one with ".cpp", it
    # is still linked as c++.
    language_map = {
        ".c": "c",
        ".cc": "c++",
        ".cpp": "c++",
        ".cxx": "c++",
        ".m": "objc",
    }
    language_order = ["c++", "objc", "c"]

    include_dirs = []
    """
    include dirs specific to this compiler class
    """

    library_dirs = []
    """
    library dirs specific to this compiler class
    """

    def __init__(self, verbose=0, dry_run=0, force=0):
        self.dry_run = dry_run
        self.force = force
        self.verbose = verbose

        # 'output_dir': a common output directory for object, library,
        # shared object, and shared library files
        self.output_dir = None

        # 'macros': a list of macro definitions (or undefinitions).  A
        # macro definition is a 2-tuple (name, value), where the value is
        # either a string or None (no explicit value).  A macro
        # undefinition is a 1-tuple (name,).
        self.macros = []

        # 'include_dirs': a list of directories to search for include files
        self.include_dirs = []

        # 'libraries': a list of libraries to include in any link
        # (library names, not filenames: eg. "foo" not "libfoo.a")
        self.libraries = []

        # 'library_dirs': a list of directories to search for libraries
        self.library_dirs = []

        # 'runtime_library_dirs': a list of directories to search for
        # shared libraries/objects at runtime
        self.runtime_library_dirs = []

        # 'objects': a list of object files (or similar, such as explicitly
        # named library files) to include on any link
        self.objects = []

        for key in self.executables.keys():
            self.set_executable(key, self.executables[key])

    def set_executables(self, **kwargs):
        """Define the executables (and options for them) that will be run
        to perform the various stages of compilation.  The exact set of
        executables that may be specified here depends on the compiler
        class (via the 'executables' class attribute), but most will have:
          compiler      the C/C++ compiler
          linker_so     linker used to create shared objects and libraries
          linker_exe    linker used to create binary executables
          archiver      static library creator

        On platforms with a command-line (Unix, DOS/Windows), each of these
        is a string that will be split into executable name and (optional)
        list of arguments.  (Splitting the string is done similarly to how
        Unix shells operate: words are delimited by spaces, but quotes and
        backslashes can override this.  See
        'distutils.util.split_quoted()'.)
        """

        # Note that some CCompiler implementation classes will define class
        # attributes 'cpp', 'cc', etc. with hard-coded executable names;
        # this is appropriate when a compiler class is for exactly one
        # compiler/OS combination (eg. MSVCCompiler).  Other compiler
        # classes (UnixCCompiler, in particular) are driven by information
        # discovered at run-time, since there are many different ways to do
        # basically the same things with Unix C compilers.

        for key in kwargs:
            if key not in self.executables:
                raise ValueError(
                    "unknown executable '%s' for class %s"
                    % (key, self.__class__.__name__)
                )
            self.set_executable(key, kwargs[key])

    def set_executable(self, key, value):
        if isinstance(value, str):
            setattr(self, key, split_quoted(value))
        else:
            setattr(self, key, value)

    def _find_macro(self, name):
        i = 0
        for defn in self.macros:
            if defn[0] == name:
                return i
            i += 1
        return None

    def _check_macro_definitions(self, definitions):
        """Ensures that every element of 'definitions' is a valid macro
        definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
        nothing if all definitions are OK, raise TypeError otherwise.
        """
        for defn in definitions:
            if not (
                isinstance(defn, tuple)
                and (
                    len(defn) in (1, 2)
                    and (isinstance(defn[1], str) or defn[1] is None)
                )
                and isinstance(defn[0], str)
            ):
                raise TypeError(
                    ("invalid macro definition '%s': " % defn)
                    + "must be tuple (string,), (string, string), or "
                    + "(string, None)"
                )

    # -- Bookkeeping methods -------------------------------------------

    def define_macro(self, name, value=None):
        """Define a preprocessor macro for all compilations driven by this
        compiler object.  The optional parameter 'value' should be a
        string; if it is not supplied, then the macro will be defined
        without an explicit value and the exact outcome depends on the
        compiler used (XXX true? does ANSI say anything about this?)
        """
        # Delete from the list of macro definitions/undefinitions if
        # already there (so that this one will take precedence).
        i = self._find_macro(name)
        if i is not None:
            del self.macros[i]

        self.macros.append((name, value))

    def undefine_macro(self, name):
        """Undefine a preprocessor macro for all compilations driven by
        this compiler object.  If the same macro is defined by
        'define_macro()' and undefined by 'undefine_macro()' the last call
        takes precedence (including multiple redefinitions or
        undefinitions).  If the macro is redefined/undefined on a
        per-compilation basis (ie. in the call to 'compile()'), then that
        takes precedence.
        """
        # Delete from the list of macro definitions/undefinitions if
        # already there (so that this one will take precedence).
        i = self._find_macro(name)
        if i is not None:
            del self.macros[i]

        undefn = (name,)
        self.macros.append(undefn)

    def add_include_dir(self, dir):
        """Add 'dir' to the list of directories that will be searched for
        header files.  The compiler is instructed to search directories in
        the order in which they are supplied by successive calls to
        'add_include_dir()'.
        """
        self.include_dirs.append(dir)

    def set_include_dirs(self, dirs):
        """Set the list of directories that will be searched to 'dirs' (a
        list of strings).  Overrides any preceding calls to
        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
        to the list passed to 'set_include_dirs()'.  This does not affect
        any list of standard include directories that the compiler may
        search by default.
        """
        self.include_dirs = dirs[:]

    def add_library(self, libname):
        """Add 'libname' to the list of libraries that will be included in
        all links driven by this compiler object.  Note that 'libname'
        should *not* be the name of a file containing a library, but the
        name of the library itself: the actual filename will be inferred by
        the linker, the compiler, or the compiler class (depending on the
        platform).

        The linker will be instructed to link against libraries in the
        order they were supplied to 'add_library()' and/or
        'set_libraries()'.  It is perfectly valid to duplicate library
        names; the linker will be instructed to link against libraries as
        many times as they are mentioned.
        """
        self.libraries.append(libname)

    def set_libraries(self, libnames):
        """Set the list of libraries to be included in all links driven by
        this compiler object to 'libnames' (a list of strings).  This does
        not affect any standard system libraries that the linker may
        include by default.
        """
        self.libraries = libnames[:]

    def add_library_dir(self, dir):
        """Add 'dir' to the list of directories that will be searched for
        libraries specified to 'add_library()' and 'set_libraries()'.  The
        linker will be instructed to search for libraries in the order they
        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
        """
        self.library_dirs.append(dir)

    def set_library_dirs(self, dirs):
        """Set the list of library search directories to 'dirs' (a list of
        strings).  This does not affect any standard library search path
        that the linker may search by default.
        """
        self.library_dirs = dirs[:]

    def add_runtime_library_dir(self, dir):
        """Add 'dir' to the list of directories that will be searched for
        shared libraries at runtime.
        """
        self.runtime_library_dirs.append(dir)

    def set_runtime_library_dirs(self, dirs):
        """Set the list of directories to search for shared libraries at
        runtime to 'dirs' (a list of strings).  This does not affect any
        standard search path that the runtime linker may search by
        default.
        """
        self.runtime_library_dirs = dirs[:]

    def add_link_object(self, object):
        """Add 'object' to the list of object files (or analogues, such as
        explicitly named library files or the output of "resource
        compilers") to be included in every link driven by this compiler
        object.
        """
        self.objects.append(object)

    def set_link_objects(self, objects):
        """Set the list of object files (or analogues) to be included in
        every link to 'objects'.  This does not affect any standard object
        files that the linker may include by default (such as system
        libraries).
        """
        self.objects = objects[:]

    # -- Private utility methods --------------------------------------
    # (here for the convenience of subclasses)

    # Helper method to prep compiler in subclass compile() methods

    def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra):
        """Process arguments and decide which source files to compile."""
        outdir, macros, incdirs = self._fix_compile_args(outdir, macros, incdirs)

        if extra is None:
            extra = []

        # Get the list of expected output (object) files
        objects = self.object_filenames(sources, strip_dir=0, output_dir=outdir)
        assert len(objects) == len(sources)

        pp_opts = gen_preprocess_options(macros, incdirs)

        build = {}
        for i in range(len(sources)):
            src = sources[i]
            obj = objects[i]
            ext = os.path.splitext(src)[1]
            self.mkpath(os.path.dirname(obj))
            build[obj] = (src, ext)

        return macros, objects, extra, pp_opts, build

    def _get_cc_args(self, pp_opts, debug, before):
        # works for unixccompiler, cygwinccompiler
        cc_args = pp_opts + ['-c']
        if debug:
            cc_args[:0] = ['-g']
        if before:
            cc_args[:0] = before
        return cc_args

    def _fix_compile_args(self, output_dir, macros, include_dirs):
        """Typecheck and fix-up some of the arguments to the 'compile()'
        method, and return fixed-up values.  Specifically: if 'output_dir'
        is None, replaces it with 'self.output_dir'; ensures that 'macros'
        is a list, and augments it with 'self.macros'; ensures that
        'include_dirs' is a list, and augments it with 'self.include_dirs'.
        Guarantees that the returned values are of the correct type,
        i.e. for 'output_dir' either string or None, and for 'macros' and
        'include_dirs' either list or None.
        """
        if output_dir is None:
            output_dir = self.output_dir
        elif not isinstance(output_dir, str):
            raise TypeError("'output_dir' must be a string or None")

        if macros is None:
            macros = self.macros
        elif isinstance(macros, list):
            macros = macros + (self.macros or [])
        else:
            raise TypeError("'macros' (if supplied) must be a list of tuples")

        if include_dirs is None:
            include_dirs = self.include_dirs
        elif isinstance(include_dirs, (list, tuple)):
            include_dirs = list(include_dirs) + (self.include_dirs or [])
        else:
            raise TypeError("'include_dirs' (if supplied) must be a list of strings")

        # add include dirs for class
        include_dirs += self.__class__.include_dirs

        return output_dir, macros, include_dirs

    def _prep_compile(self, sources, output_dir, depends=None):
        """Decide which source files must be recompiled.

        Determine the list of object files corresponding to 'sources',
        and figure out which ones really need to be recompiled.
        Return a list of all object files and a dictionary telling
        which source files can be skipped.
        """
        # Get the list of expected output (object) files
        objects = self.object_filenames(sources, output_dir=output_dir)
        assert len(objects) == len(sources)

        # Return an empty dict for the "which source files can be skipped"
        # return value to preserve API compatibility.
        return objects, {}

    def _fix_object_args(self, objects, output_dir):
        """Typecheck and fix up some arguments supplied to various methods.
        Specifically: ensure that 'objects' is a list; if output_dir is
        None, replace with self.output_dir.  Return fixed versions of
        'objects' and 'output_dir'.
        """
        if not isinstance(objects, (list, tuple)):
            raise TypeError("'objects' must be a list or tuple of strings")
        objects = list(objects)

        if output_dir is None:
            output_dir = self.output_dir
        elif not isinstance(output_dir, str):
            raise TypeError("'output_dir' must be a string or None")

        return (objects, output_dir)

    def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
        """Typecheck and fix up some of the arguments supplied to the
        'link_*' methods.  Specifically: ensure that all arguments are
        lists, and augment them with their permanent versions
        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
        fixed versions of all arguments.
        """
        if libraries is None:
            libraries = self.libraries
        elif isinstance(libraries, (list, tuple)):
            libraries = list(libraries) + (self.libraries or [])
        else:
            raise TypeError("'libraries' (if supplied) must be a list of strings")

        if library_dirs is None:
            library_dirs = self.library_dirs
        elif isinstance(library_dirs, (list, tuple)):
            library_dirs = list(library_dirs) + (self.library_dirs or [])
        else:
            raise TypeError("'library_dirs' (if supplied) must be a list of strings")

        # add library dirs for class
        library_dirs += self.__class__.library_dirs

        if runtime_library_dirs is None:
            runtime_library_dirs = self.runtime_library_dirs
        elif isinstance(runtime_library_dirs, (list, tuple)):
            runtime_library_dirs = list(runtime_library_dirs) + (
                self.runtime_library_dirs or []
            )
        else:
            raise TypeError(
                "'runtime_library_dirs' (if supplied) " "must be a list of strings"
            )

        return (libraries, library_dirs, runtime_library_dirs)

    def _need_link(self, objects, output_file):
        """Return true if we need to relink the files listed in 'objects'
        to recreate 'output_file'.
        """
        if self.force:
            return True
        else:
            if self.dry_run:
                newer = newer_group(objects, output_file, missing='newer')
            else:
                newer = newer_group(objects, output_file)
            return newer

    def detect_language(self, sources):
        """Detect the language of a given file, or list of files. Uses
        language_map, and language_order to do the job.
        """
        if not isinstance(sources, list):
            sources = [sources]
        lang = None
        index = len(self.language_order)
        for source in sources:
            base, ext = os.path.splitext(source)
            extlang = self.language_map.get(ext)
            try:
                extindex = self.language_order.index(extlang)
                if extindex < index:
                    lang = extlang
                    index = extindex
            except ValueError:
                pass
        return lang

    # -- Worker methods ------------------------------------------------
    # (must be implemented by subclasses)

    def preprocess(
        self,
        source,
        output_file=None,
        macros=None,
        include_dirs=None,
        extra_preargs=None,
        extra_postargs=None,
    ):
        """Preprocess a single C/C++ source file, named in 'source'.
        Output will be written to file named 'output_file', or stdout if
        'output_file' not supplied.  'macros' is a list of macro
        definitions as for 'compile()', which will augment the macros set
        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
        list of directory names that will be added to the default list.

        Raises PreprocessError on failure.
        """
        pass

    def compile(
        self,
        sources,
        output_dir=None,
        macros=None,
        include_dirs=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        depends=None,
    ):
        """Compile one or more source files.

        'sources' must be a list of filenames, most likely C/C++
        files, but in reality anything that can be handled by a
        particular compiler and compiler class (eg. MSVCCompiler can
        handle resource files in 'sources').  Return a list of object
        filenames, one per source filename in 'sources'.  Depending on
        the implementation, not all source files will necessarily be
        compiled, but all corresponding object filenames will be
        returned.

        If 'output_dir' is given, object files will be put under it, while
        retaining their original path component.  That is, "foo/bar.c"
        normally compiles to "foo/bar.o" (for a Unix implementation); if
        'output_dir' is "build", then it would compile to
        "build/foo/bar.o".

        'macros', if given, must be a list of macro definitions.  A macro
        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
        The former defines a macro; if the value is None, the macro is
        defined without an explicit value.  The 1-tuple case undefines a
        macro.  Later definitions/redefinitions/ undefinitions take
        precedence.

        'include_dirs', if given, must be a list of strings, the
        directories to add to the default include file search path for this
        compilation only.

        'debug' is a boolean; if true, the compiler will be instructed to
        output debug symbols in (or alongside) the object file(s).

        'extra_preargs' and 'extra_postargs' are implementation- dependent.
        On platforms that have the notion of a command-line (e.g. Unix,
        DOS/Windows), they are most likely lists of strings: extra
        command-line arguments to prepend/append to the compiler command
        line.  On other platforms, consult the implementation class
        documentation.  In any event, they are intended as an escape hatch
        for those occasions when the abstract compiler framework doesn't
        cut the mustard.

        'depends', if given, is a list of filenames that all targets
        depend on.  If a source file is older than any file in
        depends, then the source file will be recompiled.  This
        supports dependency tracking, but only at a coarse
        granularity.

        Raises CompileError on failure.
        """
        # A concrete compiler class can either override this method
        # entirely or implement _compile().
        macros, objects, extra_postargs, pp_opts, build = self._setup_compile(
            output_dir, macros, include_dirs, sources, depends, extra_postargs
        )
        cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)

        # Return *all* object filenames, not just the ones we just built.
        return objects

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        """Compile 'src' to product 'obj'."""
        # A concrete compiler class that does not override compile()
        # should implement _compile().
        pass

    def create_static_lib(
        self, objects, output_libname, output_dir=None, debug=0, target_lang=None
    ):
        """Link a bunch of stuff together to create a static library file.
        The "bunch of stuff" consists of the list of object files supplied
        as 'objects', the extra object files supplied to
        'add_link_object()' and/or 'set_link_objects()', the libraries
        supplied to 'add_library()' and/or 'set_libraries()', and the
        libraries supplied as 'libraries' (if any).

        'output_libname' should be a library name, not a filename; the
        filename will be inferred from the library name.  'output_dir' is
        the directory where the library file will be put.

        'debug' is a boolean; if true, debugging information will be
        included in the library (note that on most platforms, it is the
        compile step where this matters: the 'debug' flag is included here
        just for consistency).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LibError on failure.
        """
        pass

    # values for target_desc parameter in link()
    SHARED_OBJECT = "shared_object"
    SHARED_LIBRARY = "shared_library"
    EXECUTABLE = "executable"

    def link(
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        """Link a bunch of stuff together to create an executable or
        shared library file.

        The "bunch of stuff" consists of the list of object files supplied
        as 'objects'.  'output_filename' should be a filename.  If
        'output_dir' is supplied, 'output_filename' is relative to it
        (i.e. 'output_filename' can provide directory components if
        needed).

        'libraries' is a list of libraries to link against.  These are
        library names, not filenames, since they're translated into
        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
        directory component, which means the linker will look in that
        specific directory rather than searching all the normal locations.

        'library_dirs', if supplied, should be a list of directories to
        search for libraries that were specified as bare library names
        (ie. no directory component).  These are on top of the system
        default and those supplied to 'add_library_dir()' and/or
        'set_library_dirs()'.  'runtime_library_dirs' is a list of
        directories that will be embedded into the shared library and used
        to search for other shared libraries that *it* depends on at
        run-time.  (This may only be relevant on Unix.)

        'export_symbols' is a list of symbols that the shared library will
        export.  (This appears to be relevant only on Windows.)

        'debug' is as for 'compile()' and 'create_static_lib()', with the
        slight distinction that it actually matters on most platforms (as
        opposed to 'create_static_lib()', which includes a 'debug' flag
        mostly for form's sake).

        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
        of course that they supply command-line arguments for the
        particular linker being used).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LinkError on failure.
        """
        raise NotImplementedError

    # Old 'link_*()' methods, rewritten to use the new 'link()' method.

    def link_shared_lib(
        self,
        objects,
        output_libname,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        self.link(
            CCompiler.SHARED_LIBRARY,
            objects,
            self.library_filename(output_libname, lib_type='shared'),
            output_dir,
            libraries,
            library_dirs,
            runtime_library_dirs,
            export_symbols,
            debug,
            extra_preargs,
            extra_postargs,
            build_temp,
            target_lang,
        )

    def link_shared_object(
        self,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        self.link(
            CCompiler.SHARED_OBJECT,
            objects,
            output_filename,
            output_dir,
            libraries,
            library_dirs,
            runtime_library_dirs,
            export_symbols,
            debug,
            extra_preargs,
            extra_postargs,
            build_temp,
            target_lang,
        )

    def link_executable(
        self,
        objects,
        output_progname,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        target_lang=None,
    ):
        self.link(
            CCompiler.EXECUTABLE,
            objects,
            self.executable_filename(output_progname),
            output_dir,
            libraries,
            library_dirs,
            runtime_library_dirs,
            None,
            debug,
            extra_preargs,
            extra_postargs,
            None,
            target_lang,
        )

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function; there is
    # no appropriate default implementation so subclasses should
    # implement all of these.

    def library_dir_option(self, dir):
        """Return the compiler option to add 'dir' to the list of
        directories searched for libraries.
        """
        raise NotImplementedError

    def runtime_library_dir_option(self, dir):
        """Return the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        """
        raise NotImplementedError

    def library_option(self, lib):
        """Return the compiler option to add 'lib' to the list of libraries
        linked into the shared library or executable.
        """
        raise NotImplementedError

    def has_function(  # noqa: C901
        self,
        funcname,
        includes=None,
        include_dirs=None,
        libraries=None,
        library_dirs=None,
    ):
        """Return a boolean indicating whether funcname is supported on
        the current platform.  The optional arguments can be used to
        augment the compilation environment.
        """
        # this can't be included at module scope because it tries to
        # import math which might not be available at that point - maybe
        # the necessary logic should just be inlined?
        import tempfile

        if includes is None:
            includes = []
        if include_dirs is None:
            include_dirs = []
        if libraries is None:
            libraries = []
        if library_dirs is None:
            library_dirs = []
        fd, fname = tempfile.mkstemp(".c", funcname, text=True)
        f = os.fdopen(fd, "w")
        try:
            for incl in includes:
                f.write("""#include "%s"\n""" % incl)
            f.write(
                """\
int main (int argc, char **argv) {
    %s();
    return 0;
}
"""
                % funcname
            )
        finally:
            f.close()
        try:
            objects = self.compile([fname], include_dirs=include_dirs)
        except CompileError:
            return False
        finally:
            os.remove(fname)

        try:
            self.link_executable(
                objects, "a.out", libraries=libraries, library_dirs=library_dirs
            )
        except (LinkError, TypeError):
            return False
        else:
            os.remove(os.path.join(self.output_dir or '', "a.out"))
        finally:
            for fn in objects:
                os.remove(fn)
        return True

    def find_library_file(self, dirs, lib, debug=0):
        """Search the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        """
        raise NotImplementedError

    # -- Filename generation methods -----------------------------------

    # The default implementation of the filename generating methods are
    # prejudiced towards the Unix/DOS/Windows view of the world:
    #   * object files are named by replacing the source file extension
    #     (eg. .c/.cpp -> .o/.obj)
    #   * library files (shared or static) are named by plugging the
    #     library name and extension into a format string, eg.
    #     "lib%s.%s" % (lib_name, ".a") for Unix static libraries
    #   * executables are named by appending an extension (possibly
    #     empty) to the program name: eg. progname + ".exe" for
    #     Windows
    #
    # To reduce redundant code, these methods expect to find
    # several attributes in the current object (presumably defined
    # as class attributes):
    #   * src_extensions -
    #     list of C/C++ source file extensions, eg. ['.c', '.cpp']
    #   * obj_extension -
    #     object file extension, eg. '.o' or '.obj'
    #   * static_lib_extension -
    #     extension for static library files, eg. '.a' or '.lib'
    #   * shared_lib_extension -
    #     extension for shared library/object files, eg. '.so', '.dll'
    #   * static_lib_format -
    #     format string for generating static library filenames,
    #     eg. 'lib%s.%s' or '%s.%s'
    #   * shared_lib_format
    #     format string for generating shared library filenames
    #     (probably same as static_lib_format, since the extension
    #     is one of the intended parameters to the format string)
    #   * exe_extension -
    #     extension for executable files, eg. '' or '.exe'

    def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
        if output_dir is None:
            output_dir = ''
        return list(
            self._make_out_path(output_dir, strip_dir, src_name)
            for src_name in source_filenames
        )

    @property
    def out_extensions(self):
        return dict.fromkeys(self.src_extensions, self.obj_extension)

    def _make_out_path(self, output_dir, strip_dir, src_name):
        base, ext = os.path.splitext(src_name)
        base = self._make_relative(base)
        try:
            new_ext = self.out_extensions[ext]
        except LookupError:
            raise UnknownFileError(
                "unknown file type '{}' (from '{}')".format(ext, src_name)
            )
        if strip_dir:
            base = os.path.basename(base)
        return os.path.join(output_dir, base + new_ext)

    @staticmethod
    def _make_relative(base):
        """
        In order to ensure that a filename always honors the
        indicated output_dir, make sure it's relative.
        Ref python/cpython#37775.
        """
        # Chop off the drive
        no_drive = os.path.splitdrive(base)[1]
        # If abs, chop off leading /
        return no_drive[os.path.isabs(no_drive) :]

    def shared_object_filename(self, basename, strip_dir=0, output_dir=''):
        assert output_dir is not None
        if strip_dir:
            basename = os.path.basename(basename)
        return os.path.join(output_dir, basename + self.shared_lib_extension)

    def executable_filename(self, basename, strip_dir=0, output_dir=''):
        assert output_dir is not None
        if strip_dir:
            basename = os.path.basename(basename)
        return os.path.join(output_dir, basename + (self.exe_extension or ''))

    def library_filename(
        self, libname, lib_type='static', strip_dir=0, output_dir=''  # or 'shared'
    ):
        assert output_dir is not None
        expected = '"static", "shared", "dylib", "xcode_stub"'
        if lib_type not in eval(expected):
            raise ValueError(f"'lib_type' must be {expected}")
        fmt = getattr(self, lib_type + "_lib_format")
        ext = getattr(self, lib_type + "_lib_extension")

        dir, base = os.path.split(libname)
        filename = fmt % (base, ext)
        if strip_dir:
            dir = ''

        return os.path.join(output_dir, dir, filename)

    # -- Utility methods -----------------------------------------------

    def announce(self, msg, level=1):
        log.debug(msg)

    def debug_print(self, msg):
        from distutils.debug import DEBUG

        if DEBUG:
            print(msg)

    def warn(self, msg):
        sys.stderr.write("warning: %s\n" % msg)

    def execute(self, func, args, msg=None, level=1):
        execute(func, args, msg, self.dry_run)

    def spawn(self, cmd, **kwargs):
        spawn(cmd, dry_run=self.dry_run, **kwargs)

    def move_file(self, src, dst):
        return move_file(src, dst, dry_run=self.dry_run)

    def mkpath(self, name, mode=0o777):
        mkpath(name, mode, dry_run=self.dry_run)


# Map a sys.platform/os.name ('posix', 'nt') to the default compiler
# type for that platform. Keys are interpreted as re match
# patterns. Order is important; platform mappings are preferred over
# OS names.
_default_compilers = (
    # Platform string mappings
    # on a cygwin built python we can use gcc like an ordinary UNIXish
    # compiler
    ('cygwin.*', 'unix'),
    # OS name mappings
    ('posix', 'unix'),
    ('nt', 'msvc'),
)


def get_default_compiler(osname=None, platform=None):
    """Determine the default compiler to use for the given platform.

    osname should be one of the standard Python OS names (i.e. the
    ones returned by os.name) and platform the common value
    returned by sys.platform for the platform in question.

    The default values are os.name and sys.platform in case the
    parameters are not given.
    """
    if osname is None:
        osname = os.name
    if platform is None:
        platform = sys.platform
    for pattern, compiler in _default_compilers:
        if (
            re.match(pattern, platform) is not None
            or re.match(pattern, osname) is not None
        ):
            return compiler
    # Default to Unix compiler
    return 'unix'


# Map compiler types to (module_name, class_name) pairs -- ie. where to
# find the code that implements an interface to this compiler.  (The module
# is assumed to be in the 'distutils' package.)
compiler_class = {
    'unix': ('unixccompiler', 'UnixCCompiler', "standard UNIX-style compiler"),
    'msvc': ('_msvccompiler', 'MSVCCompiler', "Microsoft Visual C++"),
    'cygwin': (
        'cygwinccompiler',
        'CygwinCCompiler',
        "Cygwin port of GNU C Compiler for Win32",
    ),
    'mingw32': (
        'cygwinccompiler',
        'Mingw32CCompiler',
        "Mingw32 port of GNU C Compiler for Win32",
    ),
    'bcpp': ('bcppcompiler', 'BCPPCompiler', "Borland C++ Compiler"),
}


def show_compilers():
    """Print list of available compilers (used by the "--help-compiler"
    options to "build", "build_ext", "build_clib").
    """
    # XXX this "knows" that the compiler option it's describing is
    # "--compiler", which just happens to be the case for the three
    # commands that use it.
    from distutils.fancy_getopt import FancyGetopt

    compilers = []
    for compiler in compiler_class.keys():
        compilers.append(("compiler=" + compiler, None, compiler_class[compiler][2]))
    compilers.sort()
    pretty_printer = FancyGetopt(compilers)
    pretty_printer.print_help("List of available compilers:")


def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0):
    """Generate an instance of some CCompiler subclass for the supplied
    platform/compiler combination.  'plat' defaults to 'os.name'
    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
    for that platform.  Currently only 'posix' and 'nt' are supported, and
    the default compilers are "traditional Unix interface" (UnixCCompiler
    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
    possible to ask for a Unix compiler object under Windows, and a
    Microsoft compiler object under Unix -- if you supply a value for
    'compiler', 'plat' is ignored.
    """
    if plat is None:
        plat = os.name

    try:
        if compiler is None:
            compiler = get_default_compiler(plat)

        (module_name, class_name, long_description) = compiler_class[compiler]
    except KeyError:
        msg = "don't know how to compile C/C++ code on platform '%s'" % plat
        if compiler is not None:
            msg = msg + " with '%s' compiler" % compiler
        raise DistutilsPlatformError(msg)

    try:
        module_name = "distutils." + module_name
        __import__(module_name)
        module = sys.modules[module_name]
        klass = vars(module)[class_name]
    except ImportError:
        raise DistutilsModuleError(
            "can't compile C/C++ code: unable to load module '%s'" % module_name
        )
    except KeyError:
        raise DistutilsModuleError(
            "can't compile C/C++ code: unable to find class '%s' "
            "in module '%s'" % (class_name, module_name)
        )

    # XXX The None is necessary to preserve backwards compatibility
    # with classes that expect verbose to be the first positional
    # argument.
    return klass(None, dry_run, force)


def gen_preprocess_options(macros, include_dirs):
    """Generate C pre-processor options (-D, -U, -I) as used by at least
    two types of compilers: the typical Unix compiler and Visual C++.
    'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
    means undefine (-U) macro 'name', and (name,value) means define (-D)
    macro 'name' to 'value'.  'include_dirs' is just a list of directory
    names to be added to the header file search path (-I).  Returns a list
    of command-line options suitable for either Unix compilers or Visual
    C++.
    """
    # XXX it would be nice (mainly aesthetic, and so we don't generate
    # stupid-looking command lines) to go over 'macros' and eliminate
    # redundant definitions/undefinitions (ie. ensure that only the
    # latest mention of a particular macro winds up on the command
    # line).  I don't think it's essential, though, since most (all?)
    # Unix C compilers only pay attention to the latest -D or -U
    # mention of a macro on their command line.  Similar situation for
    # 'include_dirs'.  I'm punting on both for now.  Anyways, weeding out
    # redundancies like this should probably be the province of
    # CCompiler, since the data structures used are inherited from it
    # and therefore common to all CCompiler classes.
    pp_opts = []
    for macro in macros:
        if not (isinstance(macro, tuple) and 1 <= len(macro) <= 2):
            raise TypeError(
                "bad macro definition '%s': "
                "each element of 'macros' list must be a 1- or 2-tuple" % macro
            )

        if len(macro) == 1:  # undefine this macro
            pp_opts.append("-U%s" % macro[0])
        elif len(macro) == 2:
            if macro[1] is None:  # define with no explicit value
                pp_opts.append("-D%s" % macro[0])
            else:
                # XXX *don't* need to be clever about quoting the
                # macro value here, because we're going to avoid the
                # shell at all costs when we spawn the command!
                pp_opts.append("-D%s=%s" % macro)

    for dir in include_dirs:
        pp_opts.append("-I%s" % dir)
    return pp_opts


def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries):
    """Generate linker options for searching library directories and
    linking with specific libraries.  'libraries' and 'library_dirs' are,
    respectively, lists of library names (not filenames!) and search
    directories.  Returns a list of command-line options suitable for use
    with some compiler (depending on the two format strings passed in).
    """
    lib_opts = []

    for dir in library_dirs:
        lib_opts.append(compiler.library_dir_option(dir))

    for dir in runtime_library_dirs:
        opt = compiler.runtime_library_dir_option(dir)
        if isinstance(opt, list):
            lib_opts = lib_opts + opt
        else:
            lib_opts.append(opt)

    # XXX it's important that we *not* remove redundant library mentions!
    # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to
    # resolve all symbols.  I just hope we never have to say "-lfoo obj.o
    # -lbar" to get things to work -- that's certainly a possibility, but a
    # pretty nasty way to arrange your C code.

    for lib in libraries:
        (lib_dir, lib_name) = os.path.split(lib)
        if lib_dir:
            lib_file = compiler.find_library_file([lib_dir], lib_name)
            if lib_file:
                lib_opts.append(lib_file)
            else:
                compiler.warn(
                    "no library file corresponding to " "'%s' found (skipping)" % lib
                )
        else:
            lib_opts.append(compiler.library_option(lib))
    return lib_opts
PK{5ZO5Lib/site-packages/setuptools/_distutils/_functools.pynuW+Aimport functools


# from jaraco.functools 3.5
def pass_none(func):
    """
    Wrap func so it's not called if its first param is None

    >>> print_text = pass_none(print)
    >>> print_text('text')
    text
    >>> print_text(None)
    """

    @functools.wraps(func)
    def wrapper(param, *args, **kwargs):
        if param is not None:
            return func(param, *args, **kwargs)

    return wrapper
PK{5ZeP3Lib/site-packages/setuptools/_distutils/dir_util.pynuW+A"""distutils.dir_util

Utility functions for manipulating directories and directory trees."""

import os
import errno
from distutils.errors import DistutilsInternalError, DistutilsFileError
from distutils import log

# cache for by mkpath() -- in addition to cheapening redundant calls,
# eliminates redundant "creating /foo/bar/baz" messages in dry-run mode
_path_created = {}


def mkpath(name, mode=0o777, verbose=1, dry_run=0):  # noqa: C901
    """Create a directory and any missing ancestor directories.

    If the directory already exists (or if 'name' is the empty string, which
    means the current directory, which of course exists), then do nothing.
    Raise DistutilsFileError if unable to create some directory along the way
    (eg. some sub-path exists, but is a file rather than a directory).
    If 'verbose' is true, print a one-line summary of each mkdir to stdout.
    Return the list of directories actually created.

    os.makedirs is not used because:

    a) It's new to Python 1.5.2, and
    b) it blows up if the directory already exists (in which case it should
       silently succeed).
    """

    global _path_created

    # Detect a common bug -- name is None
    if not isinstance(name, str):
        raise DistutilsInternalError(
            "mkpath: 'name' must be a string (got {!r})".format(name)
        )

    # XXX what's the better way to handle verbosity? print as we create
    # each directory in the path (the current behaviour), or only announce
    # the creation of the whole path? (quite easy to do the latter since
    # we're not using a recursive algorithm)

    name = os.path.normpath(name)
    created_dirs = []
    if os.path.isdir(name) or name == '':
        return created_dirs
    if _path_created.get(os.path.abspath(name)):
        return created_dirs

    (head, tail) = os.path.split(name)
    tails = [tail]  # stack of lone dirs to create

    while head and tail and not os.path.isdir(head):
        (head, tail) = os.path.split(head)
        tails.insert(0, tail)  # push next higher dir onto stack

    # now 'head' contains the deepest directory that already exists
    # (that is, the child of 'head' in 'name' is the highest directory
    # that does *not* exist)
    for d in tails:
        # print "head = %s, d = %s: " % (head, d),
        head = os.path.join(head, d)
        abs_head = os.path.abspath(head)

        if _path_created.get(abs_head):
            continue

        if verbose >= 1:
            log.info("creating %s", head)

        if not dry_run:
            try:
                os.mkdir(head, mode)
            except OSError as exc:
                if not (exc.errno == errno.EEXIST and os.path.isdir(head)):
                    raise DistutilsFileError(
                        "could not create '{}': {}".format(head, exc.args[-1])
                    )
            created_dirs.append(head)

        _path_created[abs_head] = 1
    return created_dirs


def create_tree(base_dir, files, mode=0o777, verbose=1, dry_run=0):
    """Create all the empty directories under 'base_dir' needed to put 'files'
    there.

    'base_dir' is just the name of a directory which doesn't necessarily
    exist yet; 'files' is a list of filenames to be interpreted relative to
    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
    will be created if it doesn't already exist.  'mode', 'verbose' and
    'dry_run' flags are as for 'mkpath()'.
    """
    # First get the list of directories to create
    need_dir = set()
    for file in files:
        need_dir.add(os.path.join(base_dir, os.path.dirname(file)))

    # Now create them
    for dir in sorted(need_dir):
        mkpath(dir, mode, verbose=verbose, dry_run=dry_run)


def copy_tree(  # noqa: C901
    src,
    dst,
    preserve_mode=1,
    preserve_times=1,
    preserve_symlinks=0,
    update=0,
    verbose=1,
    dry_run=0,
):
    """Copy an entire directory tree 'src' to a new location 'dst'.

    Both 'src' and 'dst' must be directory names.  If 'src' is not a
    directory, raise DistutilsFileError.  If 'dst' does not exist, it is
    created with 'mkpath()'.  The end result of the copy is that every
    file in 'src' is copied to 'dst', and directories under 'src' are
    recursively copied to 'dst'.  Return the list of files that were
    copied or might have been copied, using their output name.  The
    return value is unaffected by 'update' or 'dry_run': it is simply
    the list of all files under 'src', with the names changed to be
    under 'dst'.

    'preserve_mode' and 'preserve_times' are the same as for
    'copy_file'; note that they only apply to regular files, not to
    directories.  If 'preserve_symlinks' is true, symlinks will be
    copied as symlinks (on platforms that support them!); otherwise
    (the default), the destination of the symlink will be copied.
    'update' and 'verbose' are the same as for 'copy_file'.
    """
    from distutils.file_util import copy_file

    if not dry_run and not os.path.isdir(src):
        raise DistutilsFileError("cannot copy tree '%s': not a directory" % src)
    try:
        names = os.listdir(src)
    except OSError as e:
        if dry_run:
            names = []
        else:
            raise DistutilsFileError(
                "error listing files in '{}': {}".format(src, e.strerror)
            )

    if not dry_run:
        mkpath(dst, verbose=verbose)

    outputs = []

    for n in names:
        src_name = os.path.join(src, n)
        dst_name = os.path.join(dst, n)

        if n.startswith('.nfs'):
            # skip NFS rename files
            continue

        if preserve_symlinks and os.path.islink(src_name):
            link_dest = os.readlink(src_name)
            if verbose >= 1:
                log.info("linking %s -> %s", dst_name, link_dest)
            if not dry_run:
                os.symlink(link_dest, dst_name)
            outputs.append(dst_name)

        elif os.path.isdir(src_name):
            outputs.extend(
                copy_tree(
                    src_name,
                    dst_name,
                    preserve_mode,
                    preserve_times,
                    preserve_symlinks,
                    update,
                    verbose=verbose,
                    dry_run=dry_run,
                )
            )
        else:
            copy_file(
                src_name,
                dst_name,
                preserve_mode,
                preserve_times,
                update,
                verbose=verbose,
                dry_run=dry_run,
            )
            outputs.append(dst_name)

    return outputs


def _build_cmdtuple(path, cmdtuples):
    """Helper for remove_tree()."""
    for f in os.listdir(path):
        real_f = os.path.join(path, f)
        if os.path.isdir(real_f) and not os.path.islink(real_f):
            _build_cmdtuple(real_f, cmdtuples)
        else:
            cmdtuples.append((os.remove, real_f))
    cmdtuples.append((os.rmdir, path))


def remove_tree(directory, verbose=1, dry_run=0):
    """Recursively remove an entire directory tree.

    Any errors are ignored (apart from being reported to stdout if 'verbose'
    is true).
    """
    global _path_created

    if verbose >= 1:
        log.info("removing '%s' (and everything under it)", directory)
    if dry_run:
        return
    cmdtuples = []
    _build_cmdtuple(directory, cmdtuples)
    for cmd in cmdtuples:
        try:
            cmd[0](cmd[1])
            # remove dir from cache if it's already there
            abspath = os.path.abspath(cmd[1])
            if abspath in _path_created:
                del _path_created[abspath]
        except OSError as exc:
            log.warn("error removing %s: %s", directory, exc)


def ensure_relative(path):
    """Take the full path 'path', and make it a relative path.

    This is useful to make 'path' the second argument to os.path.join().
    """
    drive, path = os.path.splitdrive(path)
    if path[0:1] == os.sep:
        path = drive + path[1:]
    return path
PK{5Z<.Lib/site-packages/setuptools/_distutils/log.pynuW+A"""A simple log mechanism styled after PEP 282."""

# The class here is styled after PEP 282 so that it could later be
# replaced with a standard Python logging implementation.

import sys

DEBUG = 1
INFO = 2
WARN = 3
ERROR = 4
FATAL = 5


class Log:
    def __init__(self, threshold=WARN):
        self.threshold = threshold

    def _log(self, level, msg, args):
        if level not in (DEBUG, INFO, WARN, ERROR, FATAL):
            raise ValueError('%s wrong log level' % str(level))

        if level >= self.threshold:
            if args:
                msg = msg % args
            if level in (WARN, ERROR, FATAL):
                stream = sys.stderr
            else:
                stream = sys.stdout
            try:
                stream.write('%s\n' % msg)
            except UnicodeEncodeError:
                # emulate backslashreplace error handler
                encoding = stream.encoding
                msg = msg.encode(encoding, "backslashreplace").decode(encoding)
                stream.write('%s\n' % msg)
            stream.flush()

    def log(self, level, msg, *args):
        self._log(level, msg, args)

    def debug(self, msg, *args):
        self._log(DEBUG, msg, args)

    def info(self, msg, *args):
        self._log(INFO, msg, args)

    def warn(self, msg, *args):
        self._log(WARN, msg, args)

    def error(self, msg, *args):
        self._log(ERROR, msg, args)

    def fatal(self, msg, *args):
        self._log(FATAL, msg, args)


_global_log = Log()
log = _global_log.log
debug = _global_log.debug
info = _global_log.info
warn = _global_log.warn
error = _global_log.error
fatal = _global_log.fatal


def set_threshold(level):
    # return the old threshold for use from tests
    old = _global_log.threshold
    _global_log.threshold = level
    return old


def set_verbosity(v):
    if v <= 0:
        set_threshold(WARN)
    elif v == 1:
        set_threshold(INFO)
    elif v >= 2:
        set_threshold(DEBUG)
PK{5ZflLL8Lib/site-packages/setuptools/_distutils/_msvccompiler.pynuW+A"""distutils._msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for Microsoft Visual Studio 2015.

The module is compatible with VS 2015 and later. You can find legacy support
for older versions in distutils.msvc9compiler and distutils.msvccompiler.
"""

# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
#   finding DevStudio (through the registry)
# ported to VS 2005 and VS 2008 by Christian Heimes
# ported to VS 2015 by Steve Dower

import os
import subprocess
import contextlib
import warnings
import unittest.mock as mock

with contextlib.suppress(ImportError):
    import winreg

from distutils.errors import (
    DistutilsExecError,
    DistutilsPlatformError,
    CompileError,
    LibError,
    LinkError,
)
from distutils.ccompiler import CCompiler, gen_lib_options
from distutils import log
from distutils.util import get_platform

from itertools import count


def _find_vc2015():
    try:
        key = winreg.OpenKeyEx(
            winreg.HKEY_LOCAL_MACHINE,
            r"Software\Microsoft\VisualStudio\SxS\VC7",
            access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY,
        )
    except OSError:
        log.debug("Visual C++ is not registered")
        return None, None

    best_version = 0
    best_dir = None
    with key:
        for i in count():
            try:
                v, vc_dir, vt = winreg.EnumValue(key, i)
            except OSError:
                break
            if v and vt == winreg.REG_SZ and os.path.isdir(vc_dir):
                try:
                    version = int(float(v))
                except (ValueError, TypeError):
                    continue
                if version >= 14 and version > best_version:
                    best_version, best_dir = version, vc_dir
    return best_version, best_dir


def _find_vc2017():
    """Returns "15, path" based on the result of invoking vswhere.exe
    If no install is found, returns "None, None"

    The version is returned to avoid unnecessarily changing the function
    result. It may be ignored when the path is not None.

    If vswhere.exe is not available, by definition, VS 2017 is not
    installed.
    """
    root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles")
    if not root:
        return None, None

    try:
        path = subprocess.check_output(
            [
                os.path.join(
                    root, "Microsoft Visual Studio", "Installer", "vswhere.exe"
                ),
                "-latest",
                "-prerelease",
                "-requires",
                "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
                "-property",
                "installationPath",
                "-products",
                "*",
            ],
            encoding="mbcs",
            errors="strict",
        ).strip()
    except (subprocess.CalledProcessError, OSError, UnicodeDecodeError):
        return None, None

    path = os.path.join(path, "VC", "Auxiliary", "Build")
    if os.path.isdir(path):
        return 15, path

    return None, None


PLAT_SPEC_TO_RUNTIME = {
    'x86': 'x86',
    'x86_amd64': 'x64',
    'x86_arm': 'arm',
    'x86_arm64': 'arm64',
}


def _find_vcvarsall(plat_spec):
    # bpo-38597: Removed vcruntime return value
    _, best_dir = _find_vc2017()

    if not best_dir:
        best_version, best_dir = _find_vc2015()

    if not best_dir:
        log.debug("No suitable Visual C++ version found")
        return None, None

    vcvarsall = os.path.join(best_dir, "vcvarsall.bat")
    if not os.path.isfile(vcvarsall):
        log.debug("%s cannot be found", vcvarsall)
        return None, None

    return vcvarsall, None


def _get_vc_env(plat_spec):
    if os.getenv("DISTUTILS_USE_SDK"):
        return {key.lower(): value for key, value in os.environ.items()}

    vcvarsall, _ = _find_vcvarsall(plat_spec)
    if not vcvarsall:
        raise DistutilsPlatformError("Unable to find vcvarsall.bat")

    try:
        out = subprocess.check_output(
            f'cmd /u /c "{vcvarsall}" {plat_spec} && set',
            stderr=subprocess.STDOUT,
        ).decode('utf-16le', errors='replace')
    except subprocess.CalledProcessError as exc:
        log.error(exc.output)
        raise DistutilsPlatformError(f"Error executing {exc.cmd}")

    env = {
        key.lower(): value
        for key, _, value in (line.partition('=') for line in out.splitlines())
        if key and value
    }

    return env


def _find_exe(exe, paths=None):
    """Return path to an MSVC executable program.

    Tries to find the program in several places: first, one of the
    MSVC program search paths from the registry; next, the directories
    in the PATH environment variable.  If any of those work, return an
    absolute path that is known to exist.  If none of them work, just
    return the original program name, 'exe'.
    """
    if not paths:
        paths = os.getenv('path').split(os.pathsep)
    for p in paths:
        fn = os.path.join(os.path.abspath(p), exe)
        if os.path.isfile(fn):
            return fn
    return exe


# A map keyed by get_platform() return values to values accepted by
# 'vcvarsall.bat'. Always cross-compile from x86 to work with the
# lighter-weight MSVC installs that do not include native 64-bit tools.
PLAT_TO_VCVARS = {
    'win32': 'x86',
    'win-amd64': 'x86_amd64',
    'win-arm32': 'x86_arm',
    'win-arm64': 'x86_arm64',
}


class MSVCCompiler(CCompiler):
    """Concrete class that implements an interface to Microsoft Visual C++,
    as defined by the CCompiler abstract class."""

    compiler_type = 'msvc'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']
    _rc_extensions = ['.rc']
    _mc_extensions = ['.mc']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = _c_extensions + _cpp_extensions + _rc_extensions + _mc_extensions
    res_extension = '.res'
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'

    def __init__(self, verbose=0, dry_run=0, force=0):
        super().__init__(verbose, dry_run, force)
        # target platform (.plat_name is consistent with 'bdist')
        self.plat_name = None
        self.initialized = False

    @classmethod
    def _configure(cls, vc_env):
        """
        Set class-level include/lib dirs.
        """
        cls.include_dirs = cls._parse_path(vc_env.get('include', ''))
        cls.library_dirs = cls._parse_path(vc_env.get('lib', ''))

    @staticmethod
    def _parse_path(val):
        return [dir.rstrip(os.sep) for dir in val.split(os.pathsep) if dir]

    def initialize(self, plat_name=None):
        # multi-init means we would need to check platform same each time...
        assert not self.initialized, "don't init multiple times"
        if plat_name is None:
            plat_name = get_platform()
        # sanity check for platforms to prevent obscure errors later.
        if plat_name not in PLAT_TO_VCVARS:
            raise DistutilsPlatformError(
                f"--plat-name must be one of {tuple(PLAT_TO_VCVARS)}"
            )

        # Get the vcvarsall.bat spec for the requested platform.
        plat_spec = PLAT_TO_VCVARS[plat_name]

        vc_env = _get_vc_env(plat_spec)
        if not vc_env:
            raise DistutilsPlatformError(
                "Unable to find a compatible " "Visual Studio installation."
            )
        self._configure(vc_env)

        self._paths = vc_env.get('path', '')
        paths = self._paths.split(os.pathsep)
        self.cc = _find_exe("cl.exe", paths)
        self.linker = _find_exe("link.exe", paths)
        self.lib = _find_exe("lib.exe", paths)
        self.rc = _find_exe("rc.exe", paths)  # resource compiler
        self.mc = _find_exe("mc.exe", paths)  # message compiler
        self.mt = _find_exe("mt.exe", paths)  # message compiler

        self.preprocess_options = None
        # bpo-38597: Always compile with dynamic linking
        # Future releases of Python 3.x will include all past
        # versions of vcruntime*.dll for compatibility.
        self.compile_options = ['/nologo', '/O2', '/W3', '/GL', '/DNDEBUG', '/MD']

        self.compile_options_debug = [
            '/nologo',
            '/Od',
            '/MDd',
            '/Zi',
            '/W3',
            '/D_DEBUG',
        ]

        ldflags = ['/nologo', '/INCREMENTAL:NO', '/LTCG']

        ldflags_debug = ['/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL']

        self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1']
        self.ldflags_exe_debug = [*ldflags_debug, '/MANIFEST:EMBED,ID=1']
        self.ldflags_shared = [
            *ldflags,
            '/DLL',
            '/MANIFEST:EMBED,ID=2',
            '/MANIFESTUAC:NO',
        ]
        self.ldflags_shared_debug = [
            *ldflags_debug,
            '/DLL',
            '/MANIFEST:EMBED,ID=2',
            '/MANIFESTUAC:NO',
        ]
        self.ldflags_static = [*ldflags]
        self.ldflags_static_debug = [*ldflags_debug]

        self._ldflags = {
            (CCompiler.EXECUTABLE, None): self.ldflags_exe,
            (CCompiler.EXECUTABLE, False): self.ldflags_exe,
            (CCompiler.EXECUTABLE, True): self.ldflags_exe_debug,
            (CCompiler.SHARED_OBJECT, None): self.ldflags_shared,
            (CCompiler.SHARED_OBJECT, False): self.ldflags_shared,
            (CCompiler.SHARED_OBJECT, True): self.ldflags_shared_debug,
            (CCompiler.SHARED_LIBRARY, None): self.ldflags_static,
            (CCompiler.SHARED_LIBRARY, False): self.ldflags_static,
            (CCompiler.SHARED_LIBRARY, True): self.ldflags_static_debug,
        }

        self.initialized = True

    # -- Worker methods ------------------------------------------------

    @property
    def out_extensions(self):
        return {
            **super().out_extensions,
            **{
                ext: self.res_extension
                for ext in self._rc_extensions + self._mc_extensions
            },
        }

    def compile(  # noqa: C901
        self,
        sources,
        output_dir=None,
        macros=None,
        include_dirs=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        depends=None,
    ):

        if not self.initialized:
            self.initialize()
        compile_info = self._setup_compile(
            output_dir, macros, include_dirs, sources, depends, extra_postargs
        )
        macros, objects, extra_postargs, pp_opts, build = compile_info

        compile_opts = extra_preargs or []
        compile_opts.append('/c')
        if debug:
            compile_opts.extend(self.compile_options_debug)
        else:
            compile_opts.extend(self.compile_options)

        add_cpp_opts = False

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            if debug:
                # pass the full pathname to MSVC in debug mode,
                # this allows the debugger to find the source file
                # without asking the user to browse for it
                src = os.path.abspath(src)

            if ext in self._c_extensions:
                input_opt = "/Tc" + src
            elif ext in self._cpp_extensions:
                input_opt = "/Tp" + src
                add_cpp_opts = True
            elif ext in self._rc_extensions:
                # compile .RC to .RES file
                input_opt = src
                output_opt = "/fo" + obj
                try:
                    self.spawn([self.rc] + pp_opts + [output_opt, input_opt])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            elif ext in self._mc_extensions:
                # Compile .MC to .RC file to .RES file.
                #   * '-h dir' specifies the directory for the
                #     generated include file
                #   * '-r dir' specifies the target directory of the
                #     generated RC file and the binary message resource
                #     it includes
                #
                # For now (since there are no options to change this),
                # we use the source-directory for the include file and
                # the build directory for the RC file and message
                # resources. This works at least for win32all.
                h_dir = os.path.dirname(src)
                rc_dir = os.path.dirname(obj)
                try:
                    # first compile .MC to .RC and .H file
                    self.spawn([self.mc, '-h', h_dir, '-r', rc_dir, src])
                    base, _ = os.path.splitext(os.path.basename(src))
                    rc_file = os.path.join(rc_dir, base + '.rc')
                    # then compile .RC to .RES file
                    self.spawn([self.rc, "/fo" + obj, rc_file])

                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            else:
                # how to handle this file?
                raise CompileError(f"Don't know how to compile {src} to {obj}")

            args = [self.cc] + compile_opts + pp_opts
            if add_cpp_opts:
                args.append('/EHsc')
            args.append(input_opt)
            args.append("/Fo" + obj)
            args.extend(extra_postargs)

            try:
                self.spawn(args)
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects

    def create_static_lib(
        self, objects, output_libname, output_dir=None, debug=0, target_lang=None
    ):

        if not self.initialized:
            self.initialize()
        objects, output_dir = self._fix_object_args(objects, output_dir)
        output_filename = self.library_filename(output_libname, output_dir=output_dir)

        if self._need_link(objects, output_filename):
            lib_args = objects + ['/OUT:' + output_filename]
            if debug:
                pass  # XXX what goes here?
            try:
                log.debug('Executing "%s" %s', self.lib, ' '.join(lib_args))
                self.spawn([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def link(
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):

        if not self.initialized:
            self.initialize()
        objects, output_dir = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
        libraries, library_dirs, runtime_library_dirs = fixed_args

        if runtime_library_dirs:
            self.warn(
                "I don't know what to do with 'runtime_library_dirs': "
                + str(runtime_library_dirs)
            )

        lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            ldflags = self._ldflags[target_desc, debug]

            export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]

            ld_args = (
                ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
            )

            # The MSVC linker generates .lib and .exp files, which cannot be
            # suppressed by any linker switches. The .lib files may even be
            # needed! Make sure they are generated in the temporary build
            # directory. Since they have different names for debug and release
            # builds, they can go into the same directory.
            build_temp = os.path.dirname(objects[0])
            if export_symbols is not None:
                (dll_name, dll_ext) = os.path.splitext(
                    os.path.basename(output_filename)
                )
                implib_file = os.path.join(build_temp, self.library_filename(dll_name))
                ld_args.append('/IMPLIB:' + implib_file)

            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            output_dir = os.path.dirname(os.path.abspath(output_filename))
            self.mkpath(output_dir)
            try:
                log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
                self.spawn([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def spawn(self, cmd):
        env = dict(os.environ, PATH=self._paths)
        with self._fallback_spawn(cmd, env) as fallback:
            return super().spawn(cmd, env=env)
        return fallback.value

    @contextlib.contextmanager
    def _fallback_spawn(self, cmd, env):
        """
        Discovered in pypa/distutils#15, some tools monkeypatch the compiler,
        so the 'env' kwarg causes a TypeError. Detect this condition and
        restore the legacy, unsafe behavior.
        """
        bag = type('Bag', (), {})()
        try:
            yield bag
        except TypeError as exc:
            if "unexpected keyword argument 'env'" not in str(exc):
                raise
        else:
            return
        warnings.warn("Fallback spawn triggered. Please update distutils monkeypatch.")
        with mock.patch.dict('os.environ', env):
            bag.value = super().spawn(cmd)

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "/LIBPATH:" + dir

    def runtime_library_dir_option(self, dir):
        raise DistutilsPlatformError(
            "don't know how to set runtime library search path for MSVC"
        )

    def library_option(self, lib):
        return self.library_filename(lib)

    def find_library_file(self, dirs, lib, debug=0):
        # Prefer a debugging library if found (and requested), but deal
        # with it if we don't have one.
        if debug:
            try_names = [lib + "_d", lib]
        else:
            try_names = [lib]
        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename(name))
                if os.path.isfile(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None
PK{5ZGʛ!!7Lib/site-packages/setuptools/_distutils/archive_util.pynuW+A"""distutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing)."""

import os
from warnings import warn
import sys

try:
    import zipfile
except ImportError:
    zipfile = None


from distutils.errors import DistutilsExecError
from distutils.spawn import spawn
from distutils.dir_util import mkpath
from distutils import log

try:
    from pwd import getpwnam
except ImportError:
    getpwnam = None

try:
    from grp import getgrnam
except ImportError:
    getgrnam = None


def _get_gid(name):
    """Returns a gid, given a group name."""
    if getgrnam is None or name is None:
        return None
    try:
        result = getgrnam(name)
    except KeyError:
        result = None
    if result is not None:
        return result[2]
    return None


def _get_uid(name):
    """Returns an uid, given a user name."""
    if getpwnam is None or name is None:
        return None
    try:
        result = getpwnam(name)
    except KeyError:
        result = None
    if result is not None:
        return result[2]
    return None


def make_tarball(
    base_name, base_dir, compress="gzip", verbose=0, dry_run=0, owner=None, group=None
):
    """Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or
    None.  ("compress" will be deprecated in Python 3.2)

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_dir' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z").

    Returns the output filename.
    """
    tar_compression = {
        'gzip': 'gz',
        'bzip2': 'bz2',
        'xz': 'xz',
        None: '',
        'compress': '',
    }
    compress_ext = {'gzip': '.gz', 'bzip2': '.bz2', 'xz': '.xz', 'compress': '.Z'}

    # flags for compression program, each element of list will be an argument
    if compress is not None and compress not in compress_ext.keys():
        raise ValueError(
            "bad value for 'compress': must be None, 'gzip', 'bzip2', "
            "'xz' or 'compress'"
        )

    archive_name = base_name + '.tar'
    if compress != 'compress':
        archive_name += compress_ext.get(compress, '')

    mkpath(os.path.dirname(archive_name), dry_run=dry_run)

    # creating the tarball
    import tarfile  # late import so Python build itself doesn't break

    log.info('Creating tar archive')

    uid = _get_uid(owner)
    gid = _get_gid(group)

    def _set_uid_gid(tarinfo):
        if gid is not None:
            tarinfo.gid = gid
            tarinfo.gname = group
        if uid is not None:
            tarinfo.uid = uid
            tarinfo.uname = owner
        return tarinfo

    if not dry_run:
        tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress])
        try:
            tar.add(base_dir, filter=_set_uid_gid)
        finally:
            tar.close()

    # compression using `compress`
    if compress == 'compress':
        warn("'compress' is deprecated.", DeprecationWarning)
        # the option varies depending on the platform
        compressed_name = archive_name + compress_ext[compress]
        if sys.platform == 'win32':
            cmd = [compress, archive_name, compressed_name]
        else:
            cmd = [compress, '-f', archive_name]
        spawn(cmd, dry_run=dry_run)
        return compressed_name

    return archive_name


def make_zipfile(base_name, base_dir, verbose=0, dry_run=0):  # noqa: C901
    """Create a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises DistutilsExecError.  Returns the name of the output zip
    file.
    """
    zip_filename = base_name + ".zip"
    mkpath(os.path.dirname(zip_filename), dry_run=dry_run)

    # If zipfile module is not available, try spawning an external
    # 'zip' command.
    if zipfile is None:
        if verbose:
            zipoptions = "-r"
        else:
            zipoptions = "-rq"

        try:
            spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run)
        except DistutilsExecError:
            # XXX really should distinguish between "couldn't find
            # external 'zip' command" and "zip failed".
            raise DistutilsExecError(
                (
                    "unable to create zip file '%s': "
                    "could neither import the 'zipfile' module nor "
                    "find a standalone zip utility"
                )
                % zip_filename
            )

    else:
        log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir)

        if not dry_run:
            try:
                zip = zipfile.ZipFile(
                    zip_filename, "w", compression=zipfile.ZIP_DEFLATED
                )
            except RuntimeError:
                zip = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_STORED)

            with zip:
                if base_dir != os.curdir:
                    path = os.path.normpath(os.path.join(base_dir, ''))
                    zip.write(path, path)
                    log.info("adding '%s'", path)
                for dirpath, dirnames, filenames in os.walk(base_dir):
                    for name in dirnames:
                        path = os.path.normpath(os.path.join(dirpath, name, ''))
                        zip.write(path, path)
                        log.info("adding '%s'", path)
                    for name in filenames:
                        path = os.path.normpath(os.path.join(dirpath, name))
                        if os.path.isfile(path):
                            zip.write(path, path)
                            log.info("adding '%s'", path)

    return zip_filename


ARCHIVE_FORMATS = {
    'gztar': (make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"),
    'bztar': (make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"),
    'xztar': (make_tarball, [('compress', 'xz')], "xz'ed tar-file"),
    'ztar': (make_tarball, [('compress', 'compress')], "compressed tar file"),
    'tar': (make_tarball, [('compress', None)], "uncompressed tar file"),
    'zip': (make_zipfile, [], "ZIP file"),
}


def check_archive_formats(formats):
    """Returns the first format from the 'format' list that is unknown.

    If all formats are known, returns None
    """
    for format in formats:
        if format not in ARCHIVE_FORMATS:
            return format
    return None


def make_archive(
    base_name,
    format,
    root_dir=None,
    base_dir=None,
    verbose=0,
    dry_run=0,
    owner=None,
    group=None,
):
    """Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", "xztar", or "ztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    """
    save_cwd = os.getcwd()
    if root_dir is not None:
        log.debug("changing into '%s'", root_dir)
        base_name = os.path.abspath(base_name)
        if not dry_run:
            os.chdir(root_dir)

    if base_dir is None:
        base_dir = os.curdir

    kwargs = {'dry_run': dry_run}

    try:
        format_info = ARCHIVE_FORMATS[format]
    except KeyError:
        raise ValueError("unknown archive format '%s'" % format)

    func = format_info[0]
    for arg, val in format_info[1]:
        kwargs[arg] = val

    if format != 'zip':
        kwargs['owner'] = owner
        kwargs['group'] = group

    try:
        filename = func(base_name, base_dir, **kwargs)
    finally:
        if root_dir is not None:
            log.debug("changing back to '%s'", save_cwd)
            os.chdir(save_cwd)

    return filename
PK{5Z''b'bQLib/site-packages/setuptools/_distutils/__pycache__/_msvccompiler.cpython-311.pycnuW+A

`;dL6dZddlZddlZddlZddlZddlmZeje5ddl	Z	dddn#1swxYwYddl
mZmZm
Z
mZmZddlmZmZddlmZddlmZddlmZdZd	Zd
ddd
dZdZdZddZd
ddddZGddeZ dS)adistutils._msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for Microsoft Visual Studio 2015.

The module is compatible with VS 2015 and later. You can find legacy support
for older versions in distutils.msvc9compiler and distutils.msvccompiler.
N)DistutilsExecErrorDistutilsPlatformErrorCompileErrorLibError	LinkError)	CCompilergen_lib_options)log)get_platform)countcj	tjtjdtjtjz}n%#t
$rt
jdYdSwxYwd}d}|5tD]}	tj	||\}}}n#t
$rYn{wxYw|rt|tj
krdtj
|rE	tt|}n#t t"f$rYwxYw|dkr
||kr||}}dddn#1swxYwY||fS)Nz'Software\Microsoft\VisualStudio\SxS\VC7)accesszVisual C++ is not registeredNNr)winreg	OpenKeyExHKEY_LOCAL_MACHINEKEY_READKEY_WOW64_32KEYOSErrorr
debugr	EnumValueREG_SZospathisdirintfloat
ValueError	TypeError)keybest_versionbest_dirivvc_dirvtversions        rE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/_msvccompiler.py_find_vc2015r*'s%6?V%;;



	0111zzLH	==	=	=A
 & 0a 8 8
622




=R6=((RW]]6-B-B(!%((mmGG"I.Hb==W|%;%;-4f(L===============!!si8;AA&D&8BD&
B D&B  4D&C21D&2DD&DD&&D*-D*ctjdptjd}|sdS	tjtj|dddddd	d
ddd
dg	dd}n##tjttf$rYdSwxYwtj|ddd}tj|rd|fSdS)aJReturns "15, path" based on the result of invoking vswhere.exe
    If no install is found, returns "None, None"

    The version is returned to avoid unnecessarily changing the function
    result. It may be ignored when the path is not None.

    If vswhere.exe is not available, by definition, VS 2017 is not
    installed.
    zProgramFiles(x86)ProgramFilesrzMicrosoft Visual Studio	Installerzvswhere.exez-latestz-prereleasez	-requiresz1Microsoft.VisualStudio.Component.VC.Tools.x86.x64z	-propertyinstallationPathz	-products*mbcsstrict)encodingerrorsVC	AuxiliaryBuild)renvironget
subprocesscheck_outputrjoinstripCalledProcessErrorrUnicodeDecodeErrorr)rootrs  r)_find_vc2017rADs:>>-..P"*..2P2PDz&3[-C"



 %''!	
"
)74FGzz7<<dK99D	w}}T4x:sABB76B7x86x64armarm64)rB	x86_amd64x86_arm	x86_arm64c.t\}}|st\}}|stjddStj|d}tj|stjd|dS|dfS)Nz$No suitable Visual C++ version foundrz
vcvarsall.batz%s cannot be found)rAr*r
rrrr<isfile)	plat_spec_r#r"	vcvarsalls     r)_find_vcvarsallrNvs..KAx0!-h	8999zX77I
7>>)$$	&	222zd?ctjdr(dtjDSt	|\}}|std	t
jd|d|dtj	dd	
}nG#tj
$r5}tj|j
td|jd}~wwxYwdd
|DD}|S)NDISTUTILS_USE_SDKc>i|]\}}||Slower).0r!values   r)
z_get_vc_env..s&HHHzsE		UHHHrOzUnable to find vcvarsall.batzcmd /u /c "z" z && set)stderrzutf-16lereplace)r3zError executing cHi|]\}}}||
|| SrSrT)rVr!rLrWs    r)rXz_get_vc_env..sHCE		UrOc3@K|]}|dVdS)=N)	partition)rVlines  r)	z_get_vc_env..s.OOddnnS11OOOOOOrO)rgetenvr8itemsrNrr:r;STDOUTdecoder>r
erroroutputcmd
splitlines)rKrMrLoutexcenvs      r)_get_vc_envrlsB	y$%%IHHRZ5E5E5G5GHHHH"9--LIqE$%CDDDC%9)99y999$


&I&
.
.	(CCC	#*$%A%A%ABBBCOOcnn>N>NOOOCJs!>"	III	JrOrFrGrH)win32z	win-amd64z	win-arm32z	win-arm64cJeZdZdZdZiZdgZgdZdgZdgZ	eezeze	zZ
dZdZd	Z
d
ZdxZZdZdfd	ZedZedZddZefdZ							ddZ	d dZ										d!dZfdZejfdZ dZ!dZ"dZ#d"dZ$xZ%S)#MSVCCompilerztConcrete class that implements an interface to Microsoft Visual C++,
    as defined by the CCompiler abstract class.msvcz.c)z.ccz.cppz.cxx.rcz.mcz.resz.objz.libz.dllz%s%sz.exercjt|||d|_d|_dS)NF)super__init__	plat_nameinitialized)selfverbosedry_runforce	__class__s    r)r}zMSVCCompiler.__init__s4
'5111 rOc||dd|_||dd|_dS)z3
        Set class-level include/lib dirs.
        includelibN)_parse_pathr9include_dirslibrary_dirs)clsvc_envs  r)
_configurezMSVCCompiler._configuresN
??6::i+D+DEE??6::eR+@+@AArOcTd|tjDS)NcPg|]#}||tj$SrS)rstriprsep)rVdirs  r)
z,MSVCCompiler._parse_path..s+KKKssK

26""KKKrO)rnrro)vals r)rzMSVCCompiler._parse_paths$KKcii
.C.CKKKKrONc|jr
Jd|t}|tvr$tdt	tt|}t|}|std|||dd|_|j	tj}td||_
td||_td||_td	||_td
||_td||_d|_gd|_gd
|_gd}gd}g|d|_g|d|_g|ddd|_g|ddd|_g||_g||_t8jdf|jt8jdf|jt8jdf|jt8jdf|jt8jdf|jt8jdf|jt8jdf|jt8jdf|jt8jdf|ji	|_ d|_dS)Nzdon't init multiple timesz--plat-name must be one of z7Unable to find a compatible Visual Studio installation.rrzcl.exezlink.exezlib.exezrc.exezmc.exezmt.exe)/nologoz/O2/W3z/GLz/DNDEBUGz/MD)rz/Odz/MDdz/Zirz/D_DEBUG)r/INCREMENTAL:NO/LTCG)rrrz/DEBUG:FULLz/MANIFEST:EMBED,ID=1z/DLLz/MANIFEST:EMBED,ID=2z/MANIFESTUAC:NOFT)!rrPLAT_TO_VCVARSrtuplerlrr9_pathsrnrrorucclinkerrrcmcmtpreprocess_optionscompile_optionscompile_options_debugldflags_exeldflags_exe_debugldflags_sharedldflags_shared_debugldflags_staticldflags_static_debugr
EXECUTABLE
SHARED_OBJECTSHARED_LIBRARY_ldflags)rr~rKrrrldflags
ldflags_debugs       r)
initializezMSVCCompiler.initializes#@@%@@@@$IN**(EeN.C.CEE

#9-	Y''	(L
	
jj,,!!"*--He,,
E22Y..He,,He,,He,,"& SRR&
&
&
":99NNN
=W=&<=!I=!I2H!I




#

	
%

%
%

#%

	%
!)j$4m$4!
!4($*:

!5)4+;

!4($*@

$d+T-@

$e,d.A

$d+T-F

%t,d.A

%u-t/B

%t,d.G


 rOcfitjfdjjzDS)Nc i|]
}|jSrS)
res_extension)rVextrs  r)rXz/MSVCCompiler.out_extensions..Es.T'rO)r|out_extensions_rc_extensions_mc_extensions)rrs`r)rzMSVCCompiler.out_extensionsAsS
gg$
.1DD
	
rOc		$|js||||||||}	|	\}}
}}}|pg}
|
d|r|
|jn|
|jd}|
D]|}	||\}}n#t$rYwxYw|rtj	
|}||jvrd|z}n||jvr	d|z}d}n{||j
vrN|}d|z}	||jg|z||gzn!#t $r}t#|d}~wwxYw||jvrtj	|}tj	|}	||jd|d||gtj	tj	|\}}tj	||d	z}||jd|z|gn!#t $r}t#|d}~wwxYwt#d
|d||jg|
z|z}|r|d|||d
|z||	||]#t $r}t#|d}~wwxYw|
S)Nz/cFz/Tcz/TpTz/foz-hz-rrzzDon't know how to compile z to z/EHscz/Fo)rr_setup_compileappendextendrrKeyErrorrrrp
_c_extensions_cpp_extensionsrspawnrrrrdirnamersplitextbasenamer<r)rsources
output_dirmacrosrr
extra_preargsextra_postargsdependscompile_infoobjectspp_optsbuildcompile_optsadd_cpp_optsobjsrcr	input_opt
output_optmsgh_dirrc_dirbaserLrc_fileargss                           r)compilezMSVCCompiler.compileKs	OO**gw

;G7%$*D!!!	6 :;;;; 4555@	(@	(C
 :SS




+gooc**d(((!CK		,,,!CK	#+++	"S[
,JJy72j)5LLMMMM),,,&s+++,+++,,--	,JJudFCHIII g..rw/?/?/D/DEEGD! gll64%<@@GJJg>????),,,&s+++,##N#N#N#N#NOOOG9|+g5D
%G$$$KK	"""KK$$$KK'''
(

4    %
(
(
("3'''
(s[B""
B/.B/#D**
E4EEB"H88
IIIK//
L
9LL
c|js||||\}}|||}|||r||d|zgz}|r		tjd|jd||	|jg|zdS#t$r}t|d}~wwxYwtjd|dS)N)r/OUT:Executing "%s" %s skipping %s (up-to-date))rr_fix_object_argslibrary_filename
_need_linkr
rrr<rrr)	rroutput_libnamerrtarget_langoutput_filenamelib_argsrs	         r)create_static_libzMSVCCompiler.create_static_libs	OO"33GZHH//:/VV??7O44
	C'O";!<.sNNN:+NNNrOrrz/IMPLIB:rrr)rrr
_fix_lib_argswarnstrr	rrr<rrrrrrrrrpmkpathr
rrrrr)rtarget_descrrr	librariesrruntime_library_dirsexport_symbolsrrr
build_tempr
fixed_argslib_optsrexport_optsld_argsdll_namedll_extimplib_filers                       r)linkzMSVCCompiler.links"	OO"33GZHH''	W=XX
44J)&(g&6&6G$$_55''#7!gll:t7L7LX7V7VWWzK7888
,+
/~...)I)IJJJKK
###
%	-t{CHHWFallback spawn triggered. Please update distutils monkeypatch.z
os.environ)typer rwarningsrmockpatchrr|rrW)rrgrkbagrjrs     r)rzMSVCCompiler._fallback_spawns""d5"b!!##	III

F				2#c((BBCBBBB	
	
VWWW
Z__\3
/
/	+	+

c**CI	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+s&$
A
AA
'B55B9<B9cd|zS)Nz	/LIBPATH:rSrrs  r)library_dir_optionzMSVCCompiler.library_dir_option#s
S  rOc td)Nz:don't know how to set runtime library search path for MSVC)rr
s  r)runtime_library_dir_optionz'MSVCCompiler.runtime_library_dir_option&s$H

	
rOc,||SN)r)rrs  r)library_optionzMSVCCompiler.library_option+s$$S)))rOc|r|dz|g}n|g}|D]_}|D]Z}tj|||}tj|r|ccS[`dS)N_d)rrr<rrJ)rdirsrr	try_namesrnamelibfiles        r)find_library_filezMSVCCompiler.find_library_file.s	tS)III		C!
#
#',,sD,A,A$,G,GHH7>>'**#"NNNNN#
#4rO)rrrr)NNNrNNN)NrN)
NNNNNrNNNN)r)&__name__
__module____qualname____doc__
compiler_typeexecutablesrrrrsrc_extensionsr
obj_extensionstatic_lib_extensionshared_lib_extensionstatic_lib_formatshared_lib_format
exe_extensionr}classmethodrstaticmethodrrpropertyrrrrr
contextlibcontextmanagerrrr
rr
__classcell__)rs@r)rxrxs=33MKFM---OWNWN#_4~EVNMM!!,22)M!!!!!!BB[BLL\LN N N N d



X
^^^^BNRCCCC4!DCDCDCDCL+++++,!!!



***rOrxr)!rrr:r(r
unittest.mockrsuppressImportErrorrdistutils.errorsrrrrrdistutils.ccompilerrr		distutilsr
distutils.utilr	itertoolsrr*rAPLAT_SPEC_TO_RUNTIMErNrlrurrxrSrOr)r4s
			Z%%MMM;:::::::''''''""":'''V	&4,	|||||9|||||s
:>>PK{5Z7ILLib/site-packages/setuptools/_distutils/__pycache__/__init__.cpython-311.pycnuW+A

`;ddZddlZddlZejdejdZ	ejddS#e$rYdSwxYw)zdistutils

The main package for the Python Module Distribution Utilities.  Normally
used from a setup script as

   from distutils.core import setup

   setup (...)
N _distutils_system_mod)__doc__sys	importlibversionindex__version__
import_moduleImportErrormE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/__init__.pyrs


k2CK--c2223	
I344444			DD	sAA
APK{5ZZUC5C5SLib/site-packages/setuptools/_distutils/__pycache__/cygwinccompiler.cpython-311.pycnuW+A

`;d0dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
mZmZmZddlmZmZdZd	ZGd
de	ZGdd
eZdZdZdZdZdZdZdS)adistutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
N)check_output)
UnixCCompiler)
write_file)DistutilsExecErrorDistutilsPlatformErrorCCompilerErrorCompileError)LooseVersionsuppress_known_deprecationchtjd}|dkrtj|dz|dz}|dkrdgS|dkrdgS|d	krd
gS|dkrdgS|d
krdgS|dkrdgS|dkrdgSdt|cxkrdkrnnddgSt	d|zdS)zaInclude the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    zMSC v.
1300msvcr701310msvcr711400msvcr801500msvcr901600msvcr1001700msvcr1101800msvcr120iliucrtvcruntime140zUnknown MS Compiler version %s N)sysversionfindint
ValueError)msc_posmsc_vers  tE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/cygwinccompiler.py	get_msvcrr(skx((G"}}+gkGbL89f;


;


;


;


<


<


<
S\\
(
(
(
(D
(
(
(
(
(N++>HIII7}zxUnable to set runtime library search path on Windows, usually indicated by `runtime_library_dirs` parameter to ExtensionceZdZdZdZdZdZdZdZdZ	dZ
dZd	Zdfd	Z
edZd
Z										ddZdZfdZefdZxZS)CygwinCCompilerz9Handles the Cygwin port of the GNU C compiler to Windows.cygwinz.oz.az.dll.az.dllzlib%s%szcyg%s%sz.exerc
t|||t\}}|d|||t
ur|d|ztj	dd|_
tj	dd|_|j
|_d}|
d|j
zd	|j
zd|jzd
|j
zd|j|t|_dS)
Nz%Python's GCC status: {} (details: {})zPython's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.CCgccCXXzg++-sharedz%s -mcygwin -O -Wallz%s -mcygwin -mdll -O -Wallz%s -mcygwinz{} -mcygwin {}compilercompiler_socompiler_cxx
linker_exe	linker_so)super__init__check_config_hdebug_printformatCONFIG_H_OKwarnosenvirongetcccxx
linker_dllset_executablesr(
dll_libraries)selfverbosedry_runforcestatusdetails
shared_option	__class__s       r'r9zCygwinCCompiler.__init__Qs7
'5111(**3::67KK	
	
	
$$IIOQXY


*..u--:>>%//'!
+dg54tw>/$(:$tw.'..t
NN		
	
	
'[[r)ctjdtdt5t	dcdddS#1swxYwYdS)Nzgcc_version attribute of CygwinCCompiler is deprecated. Instead of returning actual gcc version a fixed value 11.2.0 is returned.)
stacklevelz11.2.0)warningsr>DeprecationWarningrr
)rGs r'gcc_versionzCygwinCCompiler.gcc_versionrs	

X		
	
	
	
(
)
)	*	*))	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*sAAAc*|dks|dkr>	|dd|d|gdS#t$r}t|d}~wwxYw	||j|z|d|gz|zdS#t$r}t|d}~wwxYw)z:Compiles the source by spawning GCC and windres if needed..rc.reswindresz-iz-oN)spawnrr	r4)rGobjsrcextcc_argsextra_postargspp_optsmsgs        r'_compilezCygwinCCompiler._compiles%<<3&==
(

ItS$<=====%
(
(
("3'''
(
(

$w.#tS1AANR&
(
(
("3'''
(s,*
AAA&A44
B>B

BNctj|
pg}
tj|pg}tj|pg}|r|t||j|||jks|jdkrtj	|d}tj
tj|\}}tj||dz}dtj|zdg}|D]}|
||t||fd|z|
||	s|

dt!j||||||||d|	|
|||
dS)	zLink the objects.Nr/rz.defz
LIBRARY %sEXPORTSz
writing %sz-s)copyr>_runtime_library_dirs_msgextendrF
EXECUTABLErDr?pathdirnamesplitextbasenamejoinappendexecuterrlink)rGtarget_descobjectsoutput_filename
output_dir	librarieslibrary_dirsruntime_library_dirsexport_symbolsdebug
extra_preargsr^
build_temptarget_langtemp_dirdll_name
dll_extensiondef_filecontentssyms                    r'rozCygwinCCompiler.links$	-"5266
Iio2..	)GMr**	1II/000	+,,,
&4?**do.F.Fwwqz22H(*(8(8  11))%X}
w||Hh.?@@H%rw'7'7'H'HH)TH%
%
%$$$$LLh%9<(;RSSS

NN8$$$	'  &&& 	
	
	
	
	
r)c:|tgSN)r>rerGdirs  r'runtime_library_dir_optionz*CygwinCCompiler.runtime_library_dir_options	
		+,,,	r)ctj|}t|||Sr)r?rhnormcaser8_make_out_path)rGrs	strip_dirsrc_name
norm_src_namerNs     r'rzCygwinCCompiler._make_out_paths4((22
ww%%j)]KKKr)cLitjfddDS)z3
        Add support for rc and res files.
        c&i|]
}||jzS)
obj_extension).0r\rGs  r'
z2CygwinCCompiler.out_extensions..s#HHHsC$,,HHHr))rWrV)r8out_extensions)rGrNs`r'rzCygwinCCompiler.out_extensionss9

gg$
HHHHHHH
	
r)rrr)
NNNNNrNNNN)__name__
__module____qualname____doc__
compiler_typerstatic_lib_extensionshared_lib_extensiondylib_lib_extensionstatic_lib_formatshared_lib_formatdylib_lib_format
exe_extensionr9propertyrTrarorrr
__classcell__rNs@r'r+r+Ds,CCMM# !! M))))))B**X*(((*!X
X
X
X
tLLLLL




X




r)r+c.eZdZdZdZdfd	ZdZxZS)Mingw32CCompilerz:Handles the Mingw32 port of the GNU C compiler to Windows.mingw32rc
rt|||d}t|jrt	d|d|jzd|jzd|jzd|jzd|j|g|_	t|_	dS)Nr1z1Cygwin gcc cannot be used with --compiler=mingw32z%s -O -Wallz%s -mdll -O -Wallz%sz{} {}r2)r8r9is_cygwinccrBrrErCr<rDrFr()rGrHrIrJrMrNs     r'r9zMingw32CCompiler.__init__
s
'5111!
tw	V !TUUU"TW,+dg5&1dg~nnT_mDD		
	
	
 '[[r)c*ttr)rrers  r'rz+Mingw32CCompiler.runtime_library_dir_option&s$%>???r)r)rrrrrr9rrrs@r'rrs^DDM))))))8@@@@@@@r)rokznot ok	uncertaincddlm}dtjvr	tdfSdtjvr	tdfS|}	t
|}	d|vr td|zf|Std	|zf|S#|wxYw#t$r,}td
||j
fcYd}~Sd}~wwxYw)awCheck if the current Python installation appears amenable to building
    extensions with GCC.

    Returns a tuple (status, details), where 'status' is one of the following
    constants:

    - CONFIG_H_OK: all is well, go ahead and compile
    - CONFIG_H_NOTOK: doesn't look good
    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h

    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    r)	sysconfigGCCzsys.version mentions 'GCC'Clangzsys.version mentions 'Clang'__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'zcouldn't read '{}': {}N)	distutilsrr r!r=get_config_h_filenameopenreadcloseCONFIG_H_NOTOKOSErrorCONFIG_H_UNCERTAINr<strerror)rfnconfig_hexcs    r'r:r:3s4*$#####
888#+:::
	(	(	*	*B
W88	X]]__,,"$>$CC
NN&'IB'NNNNHNNWWW"$<$C$CB$U$UVVVVVVVWsB
C	!B0;C	B0C	0CC		
C?!C:4C?:C?cttj|dgz}|dS)zCTry to determine if the compiler that would be used is from cygwin.z-dumpmachinescygwin)rshlexsplitstripendswith)rB
out_strings  r'rrbs?ek"oo0@@AAJ&&y111r))rr?r rdrrR
subprocessrdistutils.unixccompilerrdistutils.file_utilrdistutils.errorsrrrr	distutils.versionr
rr(rer+rr=rrr:rget_versionsrr)r'rs
			



######111111******GFFFFFFF J J JHI}
}
}
}
}
m}
}
}
B"@"@"@"@"@"@"@"@R ,W,W,W^222r)PK{5Z''HLib/site-packages/setuptools/_distutils/__pycache__/core.cpython-311.pycnuW+A

`;d$dZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
ddlmZddl
mZddlmZddlmZgd	Zd
ZdZdadadZd
ZdZdZddZdS)a#distutils.core

The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script).  Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
N)DEBUG)DistutilsSetupErrorDistutilsErrorCCompilerErrorDistutilsArgError)Distribution)Command)
PyPIRCCommand)	Extension)rr	r
rsetupzusage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
cltj|}tt	zS)N)ospathbasenameUSAGElocals)script_namescripts  iE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/core.py	gen_usager*s&
W

k
*
*F688)	distclassrscript_argsoptionsnameversionauthorauthor_email
maintainermaintainer_emailurllicensedescriptionlong_descriptionkeywords	platformsclassifiersdownload_urlrequiresprovides	obsoletes)rsourcesinclude_dirs
define_macrosundef_macroslibrary_dirs	librariesruntime_library_dirs
extra_objectsextra_compile_argsextra_link_args	swig_optsexport_symbolsdependslanguagec|d}|r|d=nt}d|vr2tjt
jd|d<d|vrt
jdd|d<	||xa}nQ#t$rD}d|vrtd|ztd	
|d|d}~wwxYwtd
kr|S|tr#td|tdkr|S	|}n9#t"$r,}tt%|jd
|zzd}~wwxYwtr#td|tdkr|S|rt)|S|S)aThe gateway to the Distutils: do everything your setup script needs
    to do, in a highly flexible and user-driven way.  Briefly: create a
    Distribution instance; find and parse config files; parse the command
    line; run each Distutils command found there, customized by the options
    supplied to 'setup()' (as keyword arguments), in config files, and on
    the command line.

    The Distribution instance might be an instance of a class supplied via
    the 'distclass' keyword argument to 'setup'; if no such class is
    supplied, then the Distribution class (in dist.py) is instantiated.
    All other arguments to 'setup' (except for 'cmdclass') are used to set
    attributes of the Distribution instance.

    The 'cmdclass' argument, if supplied, is a dictionary mapping command
    names to command classes.  Each command encountered on the command line
    will be turned into a command class, which is in turn instantiated; any
    class found in 'cmdclass' is used in place of the default, which is
    (for command 'foo_bar') class 'foo_bar' in module
    'distutils.command.foo_bar'.  The command class must provide a
    'user_options' attribute which is a list of option specifiers for
    'distutils.fancy_getopt'.  Any command-line options between the current
    and the next command are used to set attributes of the current command
    object.

    When the entire command-line has been successfully parsed, calls the
    'run()' method on each command object in turn.  This method will be
    driven entirely by the Distribution object (which each command object
    has a reference to, thanks to its constructor), and the
    command-specific options that became attributes of each command
    object.
    rrrrNrzerror in setup command: %szerror in {} setup command: {}initz%options (after parsing config files):configz

error: %sz%options (after parsing command line):commandline)getrrrrsysargv_setup_distributionr
SystemExitformat_setup_stop_afterparse_config_filesrprintdump_option_dictsparse_command_linerrrrun_commands)attrsklassdistmsgoks     rrr`sJ
IIk""E+E!!!w//<<mE!!"x|mY%*U5\\1ddYYY9C?@@@<CCE&MSVWWXXX	YF""	!
5666   H$$
L

$
$
&
&LLL4#344}s7JJKKKL
!
5666   M))
"D!!!Ks05
B
C
?CC-E
E8'E33E8c	|n#t$rtdt$ra}tr3t
jd|td|d}~wttf$r,}trtdt|zd}~wwxYw|S)zGiven a Distribution object run all the commands,
    raising ``SystemExit`` errors in the case of failure.

    This function assumes that either ``sys.argv`` or ``dist.script_args``
    is already set accordingly.
    interruptedz
error: {}
z	error: {}Nzerror: )rJKeyboardInterruptrCOSErrorrr@stderrwriterDrrstr)rMexcrNs   rrJrJs3((('''666	6J]11#66777[//44555N+333	3YS1222	3Ks!"CABC)'CCruncN|dvr"td||atj}|dd}		|tjd<||tjdd<t
j|5}|	dd	}t||dddn#1swxYwY|t_dan#|t_dawxYwn#t$rYnwxYwttd
|ztS)a.Run a setup script in a somewhat controlled environment, and
    return the Distribution instance that drives things.  This is useful
    if you need to find out the distribution meta-data (passed as
    keyword args from 'script' to 'setup()', or the contents of the
    config files or command-line.

    'script_name' is a file that will be read and run with 'exec()';
    'sys.argv[0]' will be replaced with 'script' for the duration of the
    call.  'script_args' is a list of strings; if supplied,
    'sys.argv[1:]' will be replaced by 'script_args' for the duration of
    the call.

    'stop_after' tells 'setup()' when to stop processing; possible
    values:
      init
        stop after the Distribution instance has been created and
        populated with the keyword arguments to 'setup()'
      config
        stop after config files have been parsed (and their data
        stored in the Distribution instance)
      commandline
        stop after the command-line ('sys.argv[1:]' or 'script_args')
        have been parsed (and the data stored in the Distribution)
      run [default]
        stop after all commands have been run (the same as if 'setup()'
        had been called in the usual way

    Returns the Distribution instance, which provides all information
    used to drive the Distutils.
    )r<r=r>rXz$invalid value for 'stop_after': {!r}__main__)__file____name__rNr;z\r\nz\nzZ'distutils.core.setup()' was never called -- perhaps '%s' is not a Distutils setup script?)
ValueErrorrDrEr@rAcopytokenizeopenreadreplaceexecrCrBRuntimeError)rr
stop_after	save_argvgfcodes       r	run_setuprjs>AAA?FFzRRSSS#

I j99A

	%%CHQK&*{++
qvvxx''77T1

















!CH $!CH $$$$$


	

"@	


	
sH6C#9C	=C#	C

C#C
C#C7#C33C77
DD)NrX)__doc__rr@r_distutils.debugrdistutils.errorsrrrrdistutils.distr
distutils.cmdr	distutils.configr
distutils.extensionr__all__rrrErBsetup_keywordsextension_keywordsrrJrjrrrvsK
			



!!!!!!('''''!!!!!!******))))))M
L
L	2&[[[B6DDDDDDrPK{5ZJLib/site-packages/setuptools/_distutils/__pycache__/errors.cpython-311.pycnuW+A

`;ddZGddeZGddeZGddeZGddeZGd	d
eZGddeZGd
deZGddeZ	GddeZ
GddeZGddeZGddeZ
GddeZGddeZGddeZGdd eZGd!d"eZGd#d$eZGd%d&eZd'S)(adistutils.errors

Provides exceptions used by the Distutils modules.  Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).

This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error".ceZdZdZdS)DistutilsErrorzThe root of all Distutils evil.N__name__
__module____qualname____doc__kE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/errors.pyrrs))Dr
rceZdZdZdS)DistutilsModuleErrorzUnable to load an expected module, or to find an expected class
    within some module (in particular, command modules and classes).Nrr	r
rr
r
sHH	Dr
r
ceZdZdZdS)DistutilsClassErrorzSome command class (or possibly distribution class, if anyone
    feels a need to subclass Distribution) is found not to be holding
    up its end of the bargain, ie. implementing some part of the
    "command "interface.Nrr	r
rrrs
	Dr
rceZdZdZdS)DistutilsGetoptErrorz7The option table provided to 'fancy_getopt()' is bogus.Nrr	r
rrr"sAADr
rceZdZdZdS)DistutilsArgErrorzaRaised by fancy_getopt in response to getopt.error -- ie. an
    error in the command line usage.Nrr	r
rrr(s((	Dr
rceZdZdZdS)DistutilsFileErrorzAny problems in the filesystem: expected file not found, etc.
    Typically this is for problems that we detect before OSError
    could be raised.Nrr	r
rrr/s	Dr
rceZdZdZdS)DistutilsOptionErroraSyntactic/semantic errors in command options, such as use of
    mutually conflicting options, or inconsistent options,
    badly-spelled values, etc.  No distinction is made between option
    values originating in the setup script, the command line, config
    files, or what-have-you -- but if we *know* something originated in
    the setup script, we'll raise DistutilsSetupError instead.Nrr	r
rrr7sBB	Dr
rceZdZdZdS)DistutilsSetupErrorzqFor errors that can be definitely blamed on the setup script,
    such as invalid keyword arguments to 'setup()'.Nrr	r
rrrBs77	Dr
rceZdZdZdS)DistutilsPlatformErrorzWe don't know how to do something on the current platform (but
    we do know how to do it on some platform) -- eg. trying to compile
    C files on a platform not supported by a CCompiler subclass.Nrr	r
rrrIsDD	Dr
rceZdZdZdS)DistutilsExecErrorz`Any problems executing an external program (such as the C
    compiler, when compiling C files).Nrr	r
rrrQs**	Dr
rceZdZdZdS)DistutilsInternalErrorzoInternal inconsistencies or impossibilities (obviously, this
    should never be seen if the code is working!).Nrr	r
rrrXs66	Dr
rceZdZdZdS)DistutilsTemplateErrorz%Syntax error in a file list template.Nrr	r
rr!r!_s////r
r!ceZdZdZdS)DistutilsByteCompileErrorzByte compile error.Nrr	r
rr#r#csr
r#ceZdZdZdS)CCompilerErrorz#Some compile/link operation failed.Nrr	r
rr%r%hs----r
r%ceZdZdZdS)PreprocessErrorz.Failure to preprocess one or more C/C++ files.Nrr	r
rr'r'ls8888r
r'ceZdZdZdS)CompileErrorz2Failure to compile one or more C/C++ source files.Nrr	r
rr)r)ps<<<r1s9DD					Y								>								.								>																								>								.								^																^			00000^000
.....Y...99999n999=====>===~

33333~33333r
PK{5Z<*QiiPLib/site-packages/setuptools/_distutils/__pycache__/msvccompiler.cpython-311.pycnuW+A

`;d2\ZdZddlZddlZddlZddlmZmZmZmZm	Z	ddl
mZmZddl
mZdZ	ddlZdZeZejZejZejZejZnP#e$rH	ddlZddlZdZeZejZejZejZejZn#e$rejdYnwxYwYnwxYwerejejej ej!fZ"ej#d	e$d
Z%dZ&dZ'Gd
dZ(dZ)dZ*dZ+GddeZ,e)dkr ej-de,Z.ddl/m,Z,ddl/m(Z(dSdS)zdistutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
N)DistutilsExecErrorDistutilsPlatformErrorCompileErrorLibError	LinkError)	CCompilergen_lib_options)logFTzWarning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.zmsvccompiler is deprecated and slated to be removed in the future. Please discontinue use or file an issue with pypa/distutils describing your use case.c	t||}n#t$rYdSwxYwg}d}		t||}n#t$rYnwxYw|||dz
}=|S)zReturn list of registry keys.NrT)RegOpenKeyExRegError
RegEnumKeyappend)basekeyhandleLiks      qE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/msvccompiler.py	read_keysrJsdC((tt
A	A	61%%AA			E			Q

Hs
!!;
AAc	t||}n#t$rYdSwxYwi}d}		t||\}}}n#t$rYn=wxYw|}t	||t	|<|dz
}_|S)zXReturn dict of registry keys and values.

    All names are converted to lowercase.
    NrTr)r
rRegEnumValuelowerconvert_mbcs)rrrdrnamevaluetypes        rread_valuesr!\s
dC((tt
A	A	 ,VQ 7 7D%			E	zz|| ,U 3 3,t

	Q
Hs
!!?
AAcft|dd}|	|d}n#t$rYnwxYw|S)Ndecodembcs)getattrUnicodeError)sdecs  rrrrsQ
!Xt
$
$C
	FAA			D	Hs!
..c&eZdZdZdZdZdZdS)
MacroExpanderc>i|_||dSN)macrosload_macros)selfversions  r__init__zMacroExpander.__init__}s#!!!!!cjtD]*}t||}|r|||jd|z<dS+dS)Nz$(%s))HKEYSr!r-)r/macropathrrrs      r	set_macrozMacroExpander.set_macrosR		DD$''A
/0vGeO,
		r2c6d|z}|d|dzd|d|dzdd}|d|d		|d
kr|d|dn|d|d
n#t$rtdwxYwd}tD]h}	t	||}n#t
$rY wxYwt
|d}t|d||}|d|j	d<idS)Nz%Software\Microsoft\VisualStudio\%0.1fVCInstallDirz	\Setup\VC
productdirVSInstallDirz	\Setup\VSz Software\Microsoft\.NETFrameworkFrameworkDirinstallrootg@FrameworkSDKDirzsdkinstallrootv1.1sdkinstallrootaPython was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.z.Software\Microsoft\NET Framework Setup\Productrz{}\{}r0z$(FrameworkVersion))
r7KeyErrorrr4r
rrr!formatr-)	r/r0vsbasenetprhrrs	         rr.zMacroExpander.load_macrossh9GC~v'	>	>D
 q))



Q""CD(//!S"9"9::A129DK-..	>	>s5B

B$3C
CCcp|jD]\}}|||}|Sr,)r-itemsreplace)r/r'rvs    rsubzMacroExpander.subs;K%%''	 	 DAq		!QAAr2N)__name__
__module____qualname__r1r7r.rJr2rr*r*|sP""">>>:r2r*cvd}tj|}|dkrdS|t|z}tj|ddd\}}t|dddz
}|dkr|dz
}t|d	d
dz}|dkrd}|dkr||zSdS)
zReturn the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.N r
g$@r)sysr0findlensplitint)prefixrr'restmajorVersionminorVersions      rget_build_versionr`sF  ABwwq	CKKAk!""o##C++GAtq"v;;?Lrq1v;;%Lqql**4r2cd}tj|}|dkrdStjd|}tj|t|z|S)zUReturn the processor architecture.

    Possible results are "Intel" or "AMD64".
    z bit (rPIntel))rWr0rXrY)r\rjs   rget_build_architectureres_F  ABwwwa  A;q3v;;*++r2cg}|D]:}tj|}||vr||;|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )osr6normpathr)paths
reduced_pathsrDnps    rnormalize_and_reduce_pathsrlsSM
%%
W

a
 
 
]""  $$$r2ceZdZdZdZiZdgZgdZdgZdgZ	eezeze	zZ
dZdZd	Z
d
ZdxZZdZdfd	ZdZddZ							d dZ	d!dZ										d"dZdZdZdZd#dZdZd$dZdZxZS)%MSVCCompilerztConcrete class that implements an interface to Microsoft Visual C++,
    as defined by the CCompiler abstract class.msvcz.c)z.ccz.cppz.cxx.rcz.mcz.resz.objz.libz.dllz%s%sz.exercht|||t|_t	|_|jdkrC|jdkr!d|_t|j|_nd|_d|jz|_	nd|jdzz|_	d|_
dS)	NrbzSoftware\Microsoft\VisualStudiozSoftware\Microsoft\DevstudiozVisual Studio version %szMicrosoft SDK compiler %srQF)superr1r`_MSVCCompiler__versionre_MSVCCompiler__arch_MSVCCompiler__rootr*_MSVCCompiler__macros_MSVCCompiler__productinitialized)r/verbosedry_runforce	__class__s    rr1zMSVCCompiler.__init__s
'5111*,,,..;'!!~""@ -dn = =

=7$.HDNN9DNQQ(X(X(XD%%)))D% )ksAF
F#"F#c|d}g}|D]s}tj|\}}tj|d}|tj|d}||jvrt
d|z|rtj|}||jvr<|	tj
|||jz||jvr=|	tj
|||jz8|	tj
|||j
zu|S)NrrzDon't know how to compile %s)rgr6splitext
splitdriveisabssrc_extensionsrbasename_rc_extensionsrr
res_extension_mc_extensions
obj_extension)r/source_filenames	strip_dir
output_dir	obj_namessrc_namerexts        robject_filenameszMSVCCompiler.object_filenamesdsfJ	(	V	VH'**844KT37%%d++A.D

d++--.D$---##AH#LMMM
.w''--d)))  j$AS:S!T!TUUUU+++  j$AS:S!T!TUUUU  j$AS:S!T!TUUUUr2Nc	|js||||||||}	|	\}}
}}}|pg}
|
d|r|
|jn|
|j|
D]I}	||\}}n#t$rYwxYw|rtj	
|}||jvrd|z}n||jvrd|z}n||j
vrQ|}d|z}	||jg|z|gz|gzn!#t $r}t#|d}~wwxYw||jvrtj	|}tj	|}	||jgd|d|gz|gztj	tj	|\}}tj	||dz}||jgd|zgz|gzn!#t $r}t#|d}~wwxYwt#d||d	|z}	||jg|
z|z||gz|z*#t $r}t#|d}~wwxYw|
S)
Nz/cz/Tcz/Tpz/foz-hz-rrpz"Don't know how to compile {} to {}z/Fo)ryr_setup_compilerextendrrr@rgr6abspath
_c_extensions_cpp_extensionsrspawnrrrrdirnamerrrrrAr)r/sourcesrr-include_dirsdebug
extra_preargsextra_postargsdependscompile_infoobjectspp_optsbuildcompile_optsobjsrcr	input_opt
output_optmsgh_dirrc_dirr_rc_files                         rcompilezMSVCCompiler.compile}sw	OO**gw

;G7%$*D!!!	6 :;;;; 4555A	(A	(C
 :SS




+gooc**d(((!CK		,,,!CK		+++	"S[
,JJy72j\AYKOPPPP),,,&s+++,+++,,--	,JJyD%v+FF#NOOO g..rw/?/?/D/DEEGD! gll64%<@@GJJyECK=8G9DEEEE),,,&s+++,#8??SIIJ	
(

WI"#!*-.%	%&
(
(
("3'''
(s[B  
B-,B-&D))
E3EEB.I
I!
II!)J::
KKKc|js||||\}}|||}|||rN|d|zgz}|r		||jg|zdS#t$r}t|d}~wwxYwtj
d|dS)N)r/OUT:skipping %s (up-to-date))ryr_fix_object_argslibrary_filename
_need_linkrrrrr
r)	r/routput_libnamerrtarget_langoutput_filenamelib_argsrs	         rcreate_static_libzMSVCCompiler.create_static_libs	OO $ 5 5gz J J*//:/VV??7O44		C'O";!<W=XX
)&(g&6&6G$$_55''#7!gllGOOGAJ//1F1Fx1P1PzK7888
,+
/~...KK88999
%

DK=7233333%
%
%
%nn$
%
I0/BBBBBs<I
I:&I55I:cd|zS)Nz	/LIBPATH:rNr/dirs  rlibrary_dir_optionzMSVCCompiler.library_dir_optionEs
S  r2c td)Nz>'**#"NNNNN#
#4r2c|jD]b}tjtj||}tj|r|cSctjddD]b}tjtj||}tj|r|cSc|S)aReturn path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        Pathr)rrgr6rrisfilerrZ)r/exerDfns    rrzMSVCCompiler.find_exebs		Abgooa00#66Bw~~b!!
			
F#))#..		Abgooa00#66Bw~~b!!
			

r2x86ctsgS|dz}|jdkr!d|j|j}n
|jd|d}tD]q}t||}|r]|jdkr5|j||dcS||dcSr|jdkr9tD]1}t|d|jz|	d
n2gS)zGet a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        z dirsrrz8{}\{:0.1f}\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesz.\6.0\Build System\Components\Platforms\Win32 (z
)\DirectoriesrrQz%s\6.0NzIt seems you have Visual Studio 6 installed, but the expected registry settings are not present.
You must at least run the Visual Studio GUI once so that these entries are created.)

_can_read_regrtrArvr4r!rwrJrZr)r/r6platformrrrs      rrzMSVCCompiler.get_msvc_pathsxsL	Ig~>QMTTCC/3kkk888E

	.	.DD#&&A
.>Q&&=,,QtW55;;C@@@@@T7==-----	
.>Q

tY%<==III=EJ	r2c|dkr|d}n||}|r$d|tj|<dSdS)zSet environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        rlibraryrN)rrrgr)r/rrDs   rrzMSVCCompiler.set_path_env_varsc5==##I..AA##D))A	+"xx{{BJt	+	+r2)rrr)rr)NNNrNNN)NrN)
NNNNNrNNNN)r)r) rKrLrM__doc__
compiler_typeexecutablesrrrrrrrstatic_lib_extensionshared_lib_extensionstatic_lib_formatshared_lib_format
exe_extensionr1rrrrrrrrrrrr
__classcell__)r}s@rrnrns33MKFM---OWNWN#_4~EVNMM!!,22)M!!!!!!$O O O f8]]]]@NRCCCC2!OCOCOCOCj!!!



***$,((((T+++++++r2rng @z3Importing new compiler from distutils.msvc9compiler)rn)r*)0r
rWrgwarningsdistutils.errorsrrrrrdistutils.ccompilerrr		distutilsr
r	winreghkey_mod	OpenKeyExr
EnumKeyr	EnumValuererrorrImportErrorwin32apiwin32coninfo
HKEY_USERSHKEY_CURRENT_USERHKEY_LOCAL_MACHINEHKEY_CLASSES_ROOTr4rDeprecationWarningrr!rr*r`rerlrnrOldMSVCCompilerdistutils.msvc9compilerrNr2rr+s


				;:::::::

MMMMH#LJ#L|HH




,(
,>



2	
	
	
	


*"#"	
E
4	


$


,


,,,,,,,,^4,,,L+L+L+L+L+9L+L+L+^#
CICDDD"O44444465555555
s5$AB (BB BB BB B PK{5ZXXILib/site-packages/setuptools/_distutils/__pycache__/debug.cpython-311.pycnuW+A

`;dBddlZejdZdS)NDISTUTILS_DEBUG)osenvirongetDEBUGjE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/debug.pyrs(					
())r	PK{5Z\*S))MLib/site-packages/setuptools/_distutils/__pycache__/file_util.cpython-311.pycnuW+A

`;d" `dZddlZddlmZddlmZddddZdd
Z						ddZdd
Z	dZ
dS)zFdistutils.file_util

Utility functions for operating on single files.
N)DistutilsFileError)logcopyingzhard linkingzsymbolically linking)Nhardsym@c.d}d}		t|d}n:#t$r-}td||jd}~wwxYwt
j|rP	tj|n:#t$r-}td||jd}~wwxYw	t|d}n:#t$r-}td||jd}~wwxYw		|	|}n:#t$r-}td||jd}~wwxYw|snR	|
|n:#t$r-}td	||jd}~wwxYw	|r||r|dSdS#|r||r|wwxYw)
a5Copy the file 'src' to 'dst'; both must be filenames.  Any error
    opening either file, reading from 'src', or writing to 'dst', raises
    DistutilsFileError.  Data is read/written in chunks of 'buffer_size'
    bytes (default 16k).  No attempt is made to handle anything apart from
    regular files.
    Nrbzcould not open '{}': {}zcould not delete '{}': {}wbzcould not create '{}': {}Tzcould not read from '{}': {}zcould not write to '{}': {})openOSErrorrformatstrerrorospathexistsunlinkreadwriteclose)srcdstbuffer_sizefsrcfdstebufs       nE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/file_util.py_copy_file_contentsrsDD*	XT??DD	X	X	X$%>%E%Ec1:%V%VWWW	X7>>#	
	#


(/66sAJGG

	T??DD			$+223
CC
	
	
ii,,


(299#qzJJ





3


(188ajII
		JJLLL	JJLLLLL			JJLLL	JJLLLL	sG%
A(A

A"G%2BG%
B>(B99B>>G%CG%
D
(DD

G%D%$G%%
E/(EEG%#E98G%9
F0(F++F00G%%/Hcddlm}ddlm}	m}
m}m}tj	|std|ztj|r@|}
tj|tj
|}ntj|}
|r+|||s|dkrtjd||dfS	t"|}n #t$$rt'd|zwxYw|dkrotj
|tj
|krtjd|||
ntjd||||r|dfS|d	krjtj|r tj||s*	tj|||dfS#t0$rYncwxYwn^|d
krXtj|r tj||stj|||dfSt5|||s|r_tj|}|r#tj|||	||
f|r$tj|||||dfS)aCopy a file 'src' to 'dst'.  If 'dst' is a directory, then 'src' is
    copied there with the same name; otherwise, it must be a filename.  (If
    the file exists, it will be ruthlessly clobbered.)  If 'preserve_mode'
    is true (the default), the file's mode (type and permission bits, or
    whatever is analogous on the current platform) is copied.  If
    'preserve_times' is true (the default), the last-modified and
    last-access times are copied as well.  If 'update' is true, 'src' will
    only be copied if 'dst' does not exist, or if 'dst' does exist but is
    older than 'src'.

    'link' allows you to make hard links (os.link) or symbolic links
    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
    None (the default), files are copied.  Don't set 'link' on systems that
    don't support it: 'copy_file()' doesn't check if hard or symbolic
    linking is available. If hardlink fails, falls back to
    _copy_file_contents().

    Under Mac OS, uses the native file copy function in macostools; on
    other systems, uses '_copy_file_contents()' to copy file contents.

    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
    the output file, and 'copied' is true if the file was copied (or would
    have been copied, if 'dry_run' true).
    r)newer)ST_ATIMEST_MTIMEST_MODES_IMODEz4can't copy '%s': doesn't exist or not a regular filer z"not copying %s (output up-to-date)z&invalid value '%s' for 'link' argumentz%s %s -> %srr)distutils.dep_utilr"statr#r$r%r&rrisfilerisdirjoinbasenamedirnamerdebug_copy_actionKeyError
ValueErrorinforsamefilelinkr
symlinkrutimechmod)rr
preserve_modepreserve_timesupdater4verbosedry_runr"r#r$r%r&diractionsts                r	copy_filer@FsR)(((((999999999999
7>>#
 BSH

	

w}}S#gll3 0 0 5 566gooc""
eeCooa<<I:C@@@QxJd#JJJADHIIIJ!||
7C  BG$4$4S$9$999H]FC5555H]FC555Qx
s##	(8(8c(B(B	
S!!!Qx


	
		
s##	(8(8c(B(B	JsC   8OS!!!00
WS\\	8HS2h<H6777	0HS''"W+..///8Os0
C>>DG88
HHcddlm}m}m}m}m}ddl}	|dkrtjd|||r|S||std|z||r*tj|||}n.||r#td
|||||s#td
||d	}
	tj||nS#t$rF}|j\}}
||	jkrd
}
n$td
|||
Yd}~nd}~wwxYw|
rt%|||	tj|n]#t$rP}|j\}}
	tj|n#t$rYnwxYwtd
|d|d|d|
d}~wwxYw|S)a%Move a file 'src' to 'dst'.  If 'dst' is a directory, the file will
    be moved into it with the same name; otherwise, 'src' is just renamed
    to 'dst'.  Return the new full name of the file.

    Handles cross-device moves on Unix using 'copy_file()'.  What about
    other systems???
    r)rr)r*r,r-Nr zmoving %s -> %sz#can't move '%s': not a regular filez0can't move '{}': destination '{}' already existsz2can't move '{}': destination '{}' not a valid pathFTzcouldn't move '{}' to '{}': {})r;zcouldn't move 'z' to 'z' by copy/delete: delete 'z
' failed: )os.pathrr)r*r,r-errnorr2rrrr+rrenamer
argsEXDEVr@r)rrr;r<rr)r*r,r-rCcopy_itrnummsgs              r	move_filerJsA@@@@@@@@@@@@@LLL!||"C---
6#;;N !F!LMMMuSzz
gll3

..	
 >EEc3OO

	
5
 @GGSQQ

	
G	
	#sV
c%+GG$077S#FF

GGGG
#sG,,,,	IcNNNN						JS#
	#



$$,/CCccc33@

		JsT-D
E
rXs

			////// @VWW5555v	


hhhhX;;;;|					rWPK{5Z5eJJQLib/site-packages/setuptools/_distutils/__pycache__/msvc9compiler.cpython-311.pycnuW+A

`;dvdZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZddlm
Z
mZddlmZddlmZddlZejdeejZejZejZejZejejej ej!fZ"ej#dko
ej$d	kZ%e%rd
Z&dZ'dZ(nd
Z&dZ'dZ(dddZ)GddZ*GddZ+dZ,dZ-dZ.dZ/ddZ0e,Z1Gdde
Z2dS)adistutils.msvc9compiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.

The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
N)DistutilsExecErrorDistutilsPlatformErrorCompileErrorLibError	LinkError)	CCompilergen_lib_options)log)get_platformzmsvc9compiler is deprecated and slated to be removed in the future. Please discontinue use or file an issue with pypa/distutils describing your use case.win32lz1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fz5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowsz,Software\Wow6432Node\Microsoft\.NETFrameworkz%Software\Microsoft\VisualStudio\%0.1fz)Software\Microsoft\Microsoft SDKs\Windowsz Software\Microsoft\.NETFrameworkx86amd64rz	win-amd64ceZdZdZdZeeZdZeeZdZeeZdZe	eZdS)Regz-Helper class to read values from the registryctD](}|||}|r||vr
||cS)t|N)HKEYSread_valuesKeyError)clspathkeybaseds     rE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/msvc9compiler.py	get_valuez
Reg.get_valueNsN		Dd++A
SAXXv


smmc	t||}n#t$rYdSwxYwg}d}		t||}n#t$rYnwxYw|||dz
}=|S)zReturn list of registry keys.NrT)RegOpenKeyExRegError
RegEnumKeyappend)rrrhandleLiks       r	read_keysz
Reg.read_keysWs	!$,,FF			44	
	
vq))




HHQKKK
FA
	s
!!;
AAc,	t||}n#t$rYdSwxYwi}d}		t||\}}}n#t$rYnIwxYw|}|||||<|dz
}k|S)z`Return dict of registry keys and values.

        All names are converted to lowercase.
        NrTr )r!r"RegEnumValuelowerconvert_mbcs)	rrrr%rr'namevaluetypes	         rrzReg.read_valuesjs
	!$,,FF			44	
	
$0$;$;!eTT



::<>NN-t{MJJJNN?K9OPPPPPAA
B
B$T1--AAH A&&MM$3(?(?@@56y\122
B
Bs2BB)8D		
DDcp|jD]\}}|||}|Sr)rBitemsreplace)rFr6r(vs    rsubzMacroExpander.subs;K%%''	 	 DAq		!QAArN)r8r9r:rHrKrEr`r>rrr@r@sV"""
@@@BBB>rr@cvd}tj|}|dkrdS|t|z}tj|ddd\}}t|dddz
}|dkr|dz
}t|d	d
dz}|dkrd}|dkr||zSdS)
zReturn the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.N r 
g$@r)sysrGfindlensplitint)prefixr'r6restmajorVersionminorVersions      rget_build_versionrrsF  ABwwq	CKKAk!""o##C++GAtq"v;;?Lrq1v;;%Lqql**4rcg}|D]:}tj|}||vr||;|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )osrnormpathr$)paths
reduced_pathsrZnps    rnormalize_and_reduce_pathsrysSM
%%
W

a
 
 
]""  $$$rc|tj}g}|D]}||vr||tj|}|S)z3Remove duplicate values of an environment variable.)rlrtpathsepr$join)variableoldListnewListr'newVariables     rremoveDuplicatesrs`nnRZ((GG
GNN1*//'**Krct|z}	td|zd}n&#t$rt	jdd}YnwxYw|rtj|sd|z}tj	
|d}|rtj|rtj|tjtjd}tj
|}tj|st	jd|zdSnt	jd|z|st	jd	dStj|d
}tj|r|St	jddS)zFind the vcvarsall.bat file

    At first it tries to find the productdir of VS 2008 in the registry. If
    that fails it falls back to the VS90COMNTOOLS env var.
    z%s\Setup\VCrNz%Unable to find productdir in registryNzVS%0.f0COMNTOOLSVCz%s is not a valid directoryz Env var %s is not set or invalidzNo productdir foundz
vcvarsall.batUnable to find vcvarsall.bat)rCrrrr
debugrtrisdirenvirongetr|pardirabspathisfile)rGrDrNtoolskeytoolsdir	vcvarsalls      rfind_vcvarsallrsw
F]]>F#:LII

	9:::


ERW]]:66E%/:>>(D11	E

h//	Eh	29dKKJ44J7==,,
	7*DEEEt

I88CDDD	'(((tZ99I	w~~i  I,---4s+ A
Act|}hd}i}|tdtjd||t	jd||tjtj}	|\}}|	dkr"t|
d|
d}|d	D]}t
|}d
|vr!|}|d
d\}	}
|	}	|	|vr;|
t"jr
|
dd}
t'|
||	<	|j|jn7#|j|jwxYwt/|t/|kr;t1t3t5||S)
z?Launch vcvarsall.bat and read the settings from its environment>librincludelibpathNrz'Calling 'vcvarsall.bat %s' (version=%s)z
"{}" {} & set)stdoutstderrrr3
=r rb)rrr
r
subprocessPopenrYPIPEcommunicatewaitr2rlrr-stripr,endswithrtr{rrcloserrk
ValueErrorstrlistkeys)rGarchrinterestingresultpopenrrlinerr/s           rquery_vcvarsallrs'w''I777K
F$%CDDDI7wGGGy$//


E
**,,::<<1(v)>)>???v&&LL&&
	6
	6D##D))D$::<>"*--'!#2#JE.u55s
	6	
	

6{{c+&&&&T&++--0011222Ms
=DG4HceZdZdZdZiZdgZgdZdgZdgZ	eezeze	zZ
dZdZd	Z
d
ZdxZZdZdfd	ZddZd dZ							d!dZ	d"dZ										d#dZdZdZdZdZdZdZd$dZdZxZ S)%MSVCCompilerztConcrete class that implements an interface to Microsoft Visual C++,
    as defined by the CCompiler abstract class.msvcz.c)z.ccz.cppz.cxx.rcz.mcz.resz.objz.libz.dllz%s%sz.exerct|||t|_d|_g|_d|_d|_d|_dS)NzSoftware\Microsoft\VisualStudioF)	superrHVERSION_MSVCCompiler__version_MSVCCompiler__root_MSVCCompiler__paths	plat_name_MSVCCompiler__archinitialized)rFverbosedry_runforce	__class__s    rrHzMSVCCompiler.__init__^sP
'5111 8 rNcJ|jr
Jd|jdkrtd|jz|t}d}||vr"td|dt
jvrHdt
jvr:|dr%d|_d	|_	d
|_
d|_d|_nj|tks|d
krt|}n*ttdzt|z}tt|}|dt
j|_|dt
jd<|dt
jd<t'|jdkrtd|jz|d|_|d	|_	|d
|_
|d|_|d|_	t
jddD]}|j|n#t,$rYnwxYwt/|j|_d|jt
jd<d|_|jdkrgd|_gd|_ngd|_gd|_gd|_|jdkr	gd|_dg|_d|_dS)Nzdon't init multiple timesrRz(VC %0.1f is not supported by this modulerz--plat-name must be one of {}DISTUTILS_USE_SDKMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer_rrrrzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.;r
)/nologo/O2/MD/W3/DNDEBUG)r/Od/MDdr/Z7/D_DEBUG)rrrr/GS-r)rrrrrrr)/DLLrz/INCREMENTAL:NO)rrz/INCREMENTAL:noz/DEBUGrT) rrrrrYrtrfind_execclinkerrrcmcPLAT_TO_VCVARSrrrlr{rrk_MSVCCompiler__productr$rryr|preprocess_optionsrcompile_optionscompile_options_debugldflags_sharedldflags_shared_debugldflags_static)rFrok_plats	plat_specvc_envrZs      r
initializezMSVCCompiler.initializeisB#@@%@@@@>C(:T^K
$I'H$$(/66x@@


 2:--2:%%

h''&
DG$DK DHDGDGGLNN**i7.B.B*95		#<>>2S8>);TT%Wi88F!&>//
;;DL &u
BJu$*9$5BJy!4<  A%%,GIMXmmH--DG--
33DK}}Y//DHmmH--DGmmH--DG
	Z'--c22
'
'##A&&&&
'			D	1$,?? XXdl33
6"&;%#O#O#OD ***D&&$X#W#WD ***D&EDD>Q(X(X(XD%(ks-AI00
I=<I=c|d}g}|D]s}tj|\}}tj|d}|tj|d}||jvrt
d|z|rtj|}||jvr<|	tj
|||jz||jvr=|	tj
|||jz8|	tj
|||j
zu|S)Nrr zDon't know how to compile %s)rtrsplitext
splitdriveisabssrc_extensionsrbasename_rc_extensionsr$r|
res_extension_mc_extensions
obj_extension)rFsource_filenames	strip_dir
output_dir	obj_namessrc_namerexts        robject_filenameszMSVCCompiler.object_filenamessfJ	(	V	VH'**844KT37%%d++A.D

d++--.D$---##AH#LMMM
.w''--d)))  j$AS:S!T!TUUUU+++  j$AS:S!T!TUUUU  j$AS:S!T!TUUUUrc	|js||||||||}	|	\}}
}}}|pg}
|
d|r|
|jn|
|j|
D]I}	||\}}n#t$rYwxYw|rtj	
|}||jvrd|z}n||jvrd|z}n||j
vrQ|}d|z}	||jg|z|gz|gzn!#t $r}t#|d}~wwxYw||jvrtj	|}tj	|}	||jgd|d|gz|gztj	tj	|\}}tj	||dz}||jgd|zgz|gzn!#t $r}t#|d}~wwxYwt#d||d	|z}	||jg|
z|z||gz|z*#t $r}t#|d}~wwxYw|
S)
Nz/cz/Tcz/Tpz/foz-hz-rrz"Don't know how to compile {} to {}z/Fo)rr_setup_compiler$extendrrrrtrr
_c_extensions_cpp_extensionsrspawnrrrrdirnamerrrr|rYr)rFsourcesrrBinclude_dirsr
extra_preargsextra_postargsdependscompile_infoobjectspp_optsbuildcompile_optsobjsrcr	input_opt
output_optmsgh_dirrc_dirrrrc_files                         rcompilezMSVCCompiler.compilesw	OO**gw

;G7%$*D!!!	6 :;;;; 4555A	(A	(C
 :SS




+gooc**d(((!CK		,,,!CK		+++	"S[
,JJy72j\AYKOPPPP),,,&s+++,+++,,--	,JJyD%v+FF#NOOO g..rw/?/?/D/DEEGD! gll64%<@@GJJyECK=8G9DEEEE),,,&s+++,#8??SIIJ	
(

WI"#!*-.%	%&
(
(
("3'''
(s[B  
B-,B-&D))
E3EEB.I
I!
II!)J::
KKKc|js||||\}}|||}|||rN|d|zgz}|r		||jg|zdS#t$r}t|d}~wwxYwtj
d|dS)N)r/OUT:skipping %s (up-to-date))rr_fix_object_argslibrary_filename
_need_linkrrrrr
r)	rFroutput_libnamerrtarget_langoutput_filenamelib_argsrs	         rcreate_static_libzMSVCCompiler.create_static_libJs	OO $ 5 5gz J J*//:/VV??7O44		C'O";!<|js||||\}}||||}|\}}}|r%|dt|zt
||||}| tj	||}|
||rD|tjkr"|	r|j
dd}n!|jdd}n|	r|j
}n|j}g}|pgD]}|d|z||z|z|zd|zgz}tj|d}|tjtj|\}}tj	|||}|d|z|||||
r|
|dd<|r|||tj|	||jg|zn!#t2$r}t5|d}~wwxYw|||}|Y|\}}d||}	|dd	d
||gdS#t2$r}t5|d}~wwxYwdSt;jd|dS)Nz5I don't know what to do with 'runtime_library_dirs': r z/EXPORT:r
rz/IMPLIB:z-outputresource:{};{}zmt.exez-nologoz	-manifestr)rrr
_fix_lib_argswarnrr	rtrr|rr
EXECUTABLErrr$rrrr
manifest_setup_ldargsrmkpathrrrrmanifest_get_embed_inforYr
r)rFtarget_descrrr	librarieslibrary_dirsruntime_library_dirsexport_symbolsrrr
build_tempr
fixed_argslib_optsldflagsexport_optssymld_argsdll_namedll_extimplib_filermfinfo
mffilenamemfidout_args                            rlinkzMSVCCompiler.link^sz"	OO $ 5 5gz J J*''	W=XX
44J)&(g&6&6G$$_55''#7!gll:t7L7LX7V7VWWzK7888&&
GLLL
,+
/~...KK88999
%

DK=723333%
%
%
%nn$
%11+wGGF!#) 
D188$OO)JJ)[*gVWWWWW))))#C..()"!
I0/BBBBBs0I44
J>J

J	K%%
L/K>>Lctj|tj|dz}|d|zdS)Nz	.manifest/MANIFESTFILE:)rtrr|rr$)rFrr r&
temp_manifests     rrz"MSVCCompiler.manifest_setup_ldargssS((99KG


	'-788888rc|D]5}|dr|ddd}n6dS|tjkrd}nd}||}|dS||fS)Nr0:r rg)
startswithrlrr_remove_visual_c_ref)rFrr&argr1r,s      rrz$MSVCCompiler.manifest_get_embed_infos
		C~~.//
 #		#q 1 1! 4


4)...DDD 55mDDM 4d""rcz	t|}	|}|n#|wxYwtjdtj}tj|d|}d}tj|d|}tjdtj}tj||dSt|d}	||||S#|wxYw#t$rYdSwxYw)NzU|)rz*\s*zI|)w)
openreadrrerDOTALLr`searchwriteOSError)rF
manifest_file
manifest_fmanifest_bufpatterns     rr5z!MSVCCompiler._remove_visual_c_refsP'	m,,J
#)00  """"
  """"jD	G
6'2|<D,D))D,,
D:9D:cd|zS)Nz	/LIBPATH:r>rFdirs  rlibrary_dir_optionzMSVCCompiler.library_dir_options
S  rc td)Nz>'**#"NNNNN#
#4rc|jD]b}tjtj||}tj|r|cSctjddD]b}tjtj||}tj|r|cSc|S)aReturn path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        Pathr)rrtrr|rrrrl)rFexerZfns    rrzMSVCCompiler.find_exe,s		Abgooa00#66Bw~~b!!
			
F#))#..		Abgooa00#66Bw~~b!!
			

r)rrrr)rr)NNNrNNN)NrN)
NNNNNrNNNN)r)!r8r9r:r;
compiler_typeexecutablesrrrrrrrstatic_lib_extensionshared_lib_extensionstatic_lib_formatshared_lib_format
exe_extensionrHrrrrr.rrr5rGrIrKrRr
__classcell__)rs@rrrAs33MKFM---OWNWN#_4~EVNMM!!,22)M	!	!	!	!	!	!e e e e R8]]]]@NRCCCC2!]C]C]C]C~
9
9
9###0(((\!!!



***$rr)r
)3r;rtrrir;warningsdistutils.errorsrrrrrdistutils.ccompilerrr		distutilsr
distutils.utilrwinregrDeprecationWarning	OpenKeyExr!EnumKeyr#	EnumValuer+errorr"
HKEY_USERSHKEY_CURRENT_USERHKEY_LOCAL_MACHINEHKEY_CLASSES_ROOTrplatformmaxsizeNATIVE_WIN64rCrXrWrrr@rrryrrrrrr>rrrqsz
			



				;:::::::''''''





4	
^
<


		|w&>3;+>
3CGJK>HH6G>K2H?.?.?.?.?.?.?.?.D++++++++\4   F''''V


9rPK{5Zc7DDLLib/site-packages/setuptools/_distutils/__pycache__/filelist.cpython-311.pycnuW+A

`;d5dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZGddZdZ
Gd	d
eZejfdZdZddZdS)zsdistutils.filelist

Provides the FileList class, used for poking about the filesystem
and building lists of files.
Nconvert_path)DistutilsTemplateErrorDistutilsInternalError)logcneZdZdZddZdZejfdZdZ	dZ
dZd	Zd
Z
dZdZddZddZdS)FileListaA list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.

    Instance attributes:
      dir
        directory from which files will be taken -- only used if
        'allfiles' not supplied to constructor
      files
        list of filenames currently being built/filtered/manipulated
      allfiles
        complete list of files under consideration (ie. without any
        filtering applied)
    Nc"d|_g|_dSN)allfilesfiles)selfwarndebug_prints   mE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/filelist.py__init__zFileList.__init__ s



c||_dSr)r)rrs  rset_allfileszFileList.set_allfiles&s
 


rc.t||_dSr)findallr)rdirs  rrzFileList.findall)s


rc8ddlm}|rt|dSdS)z~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        r)DEBUGN)distutils.debugrprint)rmsgrs   rrzFileList.debug_print,s7	*)))))	#JJJJJ		rc:|j|dSr)r
append)ritems  rrzFileList.append7s
$rc:|j|dSr)r
extend)ritemss  rr"zFileList.extend:s
%     rctttjj|j}g|_|D]-}|jtjj|.dSr)sortedmapospathsplitr
rjoin)rsortable_files
sort_tuples   rsortz
FileList.sort=saBGM4: > >??
(	9	9JJbglJ78888	9	9rctt|jdz
ddD])}|j||j|dz
kr|j|=*dS)Nr)rangelenr
)ris  rremove_duplicateszFileList.remove_duplicatesFsZs4:*Ar22	"	"Az!}
1q5 111JqM	"	"rc|}|d}dx}x}}|dvr:t|dkrtd|zd|ddD}n|dvrOt|dkrtd	|zt|d}d
|ddD}nQ|dvr;t|dkrtd|zt|d}ntd
|z||||fS)Nr)includeexcludeglobal-includeglobal-excludez&'%s' expects   ...c,g|]}t|Sr.0ws  r
z1FileList._parse_template_line..Y;;;AQ;;;rr/)recursive-includerecursive-excludez,'%s' expects    ...c,g|]}t|Sr<rr=s  rr@z1FileList._parse_template_line..`rAr)graftprunez#'%s' expects a single zunknown action '%s')r)r2rr)rlinewordsactionpatternsrdir_patterns       r_parse_template_linezFileList._parse_template_lineNsM

q'+++3OOO5zzA~~,)GHHH#{33rc||\}}}}|dkr^|dd|z|D].}||dst	jd|/dS|dkr^|dd|z|D].}||dst	jd	|/dS|d
kr^|dd|z|D].}||dst	jd
|/dS|dkr^|dd|z|D].}||dst	jd|/dS|dkrr|d|d||D]1}|||sd}t	j|||2dS|dkrp|d|d||D]/}|||st	jd||0dS|dkrH|d|z|d|st	jd|dSdS|dkrH|d|z|d|st	jd|dSdStd|z)Nr6zinclude  r/)anchorz%warning: no files found matching '%s'r7zexclude z9warning: no previously-included files found matching '%s'r8zglobal-include rz>warning: no files found matching '%s' anywhere in distributionr9zglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionrBzrecursive-include {} {})prefixz:warning: no files found matching '%s' under directory '%s'rCzrecursive-exclude {} {}zNwarning: no previously-included files matching '%s' found under directory '%s'rFzgraft z+warning: no directories found matching '%s'rGzprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')	rMrr*include_patternrrexclude_patternformatr)rrHrJrKrrLpatternrs        rprocess_template_linezFileList.process_template_linelsL04/H/H/N/N,3
YZ#((8*<*<<===#
O
O++GA+>>OHDgNNN
O
Oy
 
 Z#((8*<*<<===#

++GA+>>H2 

'
'
'.(1C1CCDDD#

++GA+>>H7 

'
'
'.(1C1CCDDD#

++GA+>>HB 

*
*
*6==c388HCUCUVVWWW#
0
0++GC+@@0WHS'3///
0
0*
*
*6==c388HCUCUVVWWW#	
	
++GC+@@H> 
	
	
w

X3444''['AA
UFTTTTT
U
Uw

X3444''['AA
P

)9FB
rr/rcDd}t||||}|d|jz|j||jD]K}||r4|d|z|j|d}L|S)aSelect strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.  Patterns
        are not quite the same as implemented by the 'fnmatch' module: '*'
        and '?'  match non-special characters, where "special" is platform-
        dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found, False otherwise.
        Fz%include_pattern: applying regex r'%s'Nz adding T)translate_patternrrUrrsearchr
r)rrUrPrQis_regexfiles_found
pattern_renames        rrRzFileList.include_patterns4&wII
@:CUUVVV= LLNNNM	#	#D  &&
#  d!2333
!!$'''"rcTd}t||||}|d|jztt	|jdz
ddD]O}||j|r-|d|j|z|j|=d}P|S)aRemove strings (presumably filenames) from 'files' that match
        'pattern'.  Other parameters are the same as for
        'include_pattern()', above.
        The list 'self.files' is modified in place.
        Return True if files are found, False otherwise.
        Fz%exclude_pattern: applying regex r'%s'r/r0z
 removing T)rXrrUr1r2r
rY)rrUrPrQrZr[r\r3s        rrSzFileList.exclude_patterns&wII
@:CUUVVVs4:*B33	#	#A  A//
#  
1
!=>>>JqM"r)NNr/Nr)__name__
__module____qualname____doc__rrr'curdirrrrr"r-r4rMrVrRrSr<rrr	r	s!!!)%%%%   !!!999"""444basedirsr
files     r	z#_find_all_simple..
s^%6T4QVIMT4  r)_UniqueDirsfilterr'walkr(isfile)r(
all_uniqueresultss   r_find_all_simplerrsZ##BGDd$C$C$CDDJ:DG"'.'***rc.eZdZdZdZedZdS)rlz
    Exclude previously-seen dirs from walk results,
    avoiding infinite recursion.
    Ref https://bugs.python.org/issue44497.
    c|\}}}tj|}|j|jf}||v}|r|dd=|||S)z
        Given an item from an os.walk result, determine
        if the item represents a unique dir for this instance
        and if not, prevent further traversal.
        N)r'statst_devst_inoadd)r	walk_itemrhrir
ru	candidatefounds        r__call__z_UniqueDirs.__call__sb&dEwt}}K,	T!	QQQyrc2t||Sr)rm)clsr#s  rrmz_UniqueDirs.filter)scceeU###rN)r`rarbrcr|classmethodrmr<rrrlrlsH


$$[$$$rrlct|}|tjkr5tjtjj|}t||}t|S)z
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    )start)	rrr'rd	functoolspartialr(relpathr&list)rr
make_rels   rrr.sR

S!!E
bi$RW_C@@@He$$;;rctj|}tj}tjdkrd}d|z}t	jd||}|S)zTranslate a shell-like glob pattern to a regular expression; return
    a string containing the regex.  Differs from 'fnmatch.translate()' in
    that '*' does not match "special characters" (which are
    platform-specific).
    \z\\\\z\1[^%s]z((?>CHH+DDE	f
6T>>CE

S__s3xx-G GH
&--eYZQTUU

	K"))%CJJLL1IJJJ
:j!!!rr_)rcr'rrrdistutils.utilrdistutils.errorsrr	distutilsrr	rrsetrlrdrrrXr<rrrs&
							''''''KKKKKKKKqqqqqqqqn+++$$$$$#$$$6					.""""""""""""rPK{5Zd	kppGLib/site-packages/setuptools/_distutils/__pycache__/log.cpython-311.pycnuW+A

`;ddZddlZdZdZdZdZdZGdd	ZeZej	Z	ej
Z
ejZejZej
Z
ejZd
ZdZdS)z,A simple log mechanism styled after PEP 282.NcBeZdZefdZdZdZdZdZdZ	dZ
dZd	S)
Logc||_dSN)	threshold)selfrs  hE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/log.py__init__zLog.__init__s
"c|tttttfvrtdt
|z||jkr|r||z}|tttfvr
tj	}ntj
}	|d|znX#t$rK|j
}||d|}|d|zYnwxYw|dSdS)Nz%s wrong log levelz%s
backslashreplace)DEBUGINFOWARNERRORFATAL
ValueErrorstrrsysstderrstdoutwriteUnicodeEncodeErrorencodingencodedecodeflush)r
levelmsgargsstreamrs      r_logzLog._logsdE59991CJJ>???DN""
!Djue,,,
+Vc\****%
+
+
+!?jj+=>>EEhOOVc\*****	
+

LLNNNNN#"sBAC21C2c4||||dSr)r')r
r#r$r%s    rlogzLog.log's		%d#####rc>|t||dSr)r'rr
r$r%s   rdebugz	Log.debug*		%d#####rc>|t||dSr)r'rr+s   rinfozLog.info-		$T"""""rc>|t||dSr)r'rr+s   rwarnzLog.warn0r0rc>|t||dSr)r'rr+s   rerrorz	Log.error3r-rc>|t||dSr)r'rr+s   rfatalz	Log.fatal6r-rN)__name__
__module____qualname__rrr'r)r,r/r2r4r6rrr	r	s!%####($$$$$$######$$$$$$$$rr	c6tj}|t_|Sr)_global_logr)r#olds  r
set_thresholdr>Cs

C!KJrc|dkrttdS|dkrttdS|dkrttdSdS)Nrrr)r>rrr)vs r
set_verbosityrAJs`Avvd	
ad	
ae
r)__doc__rrrrrrr	r<r)r,r/r2r4r6r>rAr:rrrCs22



			($($($($($($($($VceeorPK{5ZUw;IIGLib/site-packages/setuptools/_distutils/__pycache__/cmd.cpython-311.pycnuW+A

`;d5FpdZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZddlmZGddZ
dS)ztdistutils.cmd

Provides the Command class, the base class for the command classes
in the distutils.command package.
N)DistutilsOptionError)utildir_util	file_utilarchive_utildep_utillogceZdZdZgZdZdZdZdZdZ	d%d	Z
d
Zd&dZd
Z
d'dZd'dZdZd'dZdZdZdZdZd&dZd(dZdZdZdZd)dZd*dZ	d+dZ				d,d Zd&d!Zd-d"Z 	d.d#Z!	d/d$Z"dS)0Commanda}Abstract base class for defining command classes, the "worker bees"
    of the Distutils.  A useful analogy for command classes is to think of
    them as subroutines with local variables called "options".  The options
    are "declared" in 'initialize_options()' and "defined" (given their
    final values, aka "finalized") in 'finalize_options()', both of which
    must be defined by every command class.  The distinction between the
    two is necessary because option values might come from the outside
    world (command line, config file, ...), and any options dependent on
    other options must be computed *after* these outside influences have
    been processed -- hence 'finalize_options()'.  The "body" of the
    subroutine, where it does all its work based on the values of its
    options, is the 'run()' method, which must also be implemented by every
    command class.
    cddlm}t||std|jt
urt
d||_|d|_	|j
|_
d|_d|_d|_
dS)zCreate and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        r)Distributionz$dist must be a Distribution instancezCommand is an abstract classN)distutils.distr
isinstance	TypeError	__class__rRuntimeErrordistributioninitialize_options_dry_runverboseforcehelp	finalized)selfdistrs   hE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/cmd.py__init__zCommand.__init__1s	0/////$--	DBCCC>W$$=>>> !!!
|
	c|dkr,t|d|z}|t|j|S|St|)Ndry_run_)getattrrAttributeError)rattrmyvals   r__getattr__zCommand.__getattr__asK9D#*--E}t0$777 &&&rcJ|js|d|_dSN)rfinalize_optionsrs rensure_finalizedzCommand.ensure_finalizedks)~	$!!###rc0td|jz)aSet default values for all the options that this command
        supports.  Note that these defaults may be overridden by other
        commands, by the setup script, by config files, or by the
        command-line.  Thus, this is not the place to code dependencies
        between options; generally, 'initialize_options()' implementations
        are just a bunch of "self.foo = None" assignments.

        This method must be implemented by all command classes.
        ,abstract method -- subclass %s must overriderrr,s rrzCommand.initialize_options} :T^K

	
rc0td|jz)aSet final values for all the options that this command supports.
        This is always called as late as possible, ie.  after any option
        assignments from the command-line or from other commands have been
        done.  Thus, this is the place to code option dependencies: if
        'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as
        long as 'foo' still has the same value it was assigned in
        'initialize_options()'.

        This method must be implemented by all command classes.
        r/r0r,s rr+zCommand.finalize_optionss :T^K

	
rNcddlm}|d|z}|||ztj|dz}|jD]y\}}}||}|ddkr
|dd}t||}||d	||ztjzdS)	Nr)
longopt_xlatezcommand options for '%s':)levelz  =z{} = {})
distutils.fancy_getoptr5get_command_nameannouncer
INFOuser_options	translater#format)rheaderindentr5optionr"values       rdump_optionszCommand.dump_optionss888888>043H3H3J3JJF

fvoSX
666$"/	T	TNVQ%%m44FbzS  D&))EMM&9#3#3FE#B#BB#(MSSSS	T	Trc0td|jz)aA command's raison d'etre: carry out the action it exists to
        perform, controlled by the options initialized in
        'initialize_options()', customized by other commands, the setup
        script, the command-line, and config files, and finalized in
        'finalize_options()'.  All terminal output and filesystem
        interaction should be done by 'run()'.

        This method must be implemented by all command classes.
        r/r0r,s rrunzCommand.runr1rr*c0tj||dS)zmIf the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        Nr	)rmsgr6s   rr;zCommand.announces	srctddlm}|r/t|tjdSdS)z~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        r)DEBUGN)distutils.debugrJprintsysstdoutflush)rrHrJs   rdebug_printzCommand.debug_printsM	*)))))	#JJJJ		rct||}|t||||St|ts$t	d||||S)Nz'{}' must be a {} (got `{}`))r#setattrrstrrr?)rrBwhatdefaultvals     r_ensure_stringlikezCommand._ensure_stringlikesmdF##;D&'***NC%%	&.55fdCHH

rc4||d|dS)zWEnsure that 'option' is a string; if not defined, set it to
        'default'.
        stringN)rW)rrBrUs   r
ensure_stringzCommand.ensure_strings"	
':::::rcPt||}|dSt|tr&t||t	jd|dSt|trtd|D}nd}|s#td	||dS)zEnsure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].
        Nz,\s*|\s+c3@K|]}t|tVdSN)rrS).0vs  r	z-Command.ensure_string_list..s,99As++999999rFz)'{}' must be a list of strings (got {!r}))
r#rrSrRresplitlistallrr?)rrBrVoks    rensure_string_listzCommand.ensure_string_listsdF##;F
S
!
!
	D&"(;"<"<=====#t$$
99S99999
*?FFvsSS

rc||||}|"||std|z||fzdSdS)Nzerror in '%s' option: )rWr)rrBtesterrT	error_fmtrUrVs       r_ensure_tested_stringzCommand._ensure_tested_stringsX%%fdG<<?66#;;?&)I5&#F
???rcT||tjjdddS)z5Ensure that 'option' is the name of an existing file.filenamez$'%s' does not exist or is not a fileN)rjospathisfilerrBs  rensure_filenamezCommand.ensure_filenames2""BGNJ0V	
	
	
	
	
rcT||tjjdddS)Nzdirectory namez)'%s' does not exist or is not a directory)rjrmrnisdirrps  rensure_dirnamezCommand.ensure_dirnames4""GM7		
	
	
	
	
rcHt|dr|jS|jjS)Ncommand_name)hasattrrvr__name__r,s rr:zCommand.get_command_names(4((	+$$>**rc	|j|}||D]4\}}t||t	||t||5dS)a>Set the values of any "undefined" options from corresponding
        option values in some other command object.  "Undefined" here means
        "is None", which is the convention used to indicate that an option
        has not been changed between 'initialize_options()' and
        'finalize_options()'.  Usually called from 'finalize_options()' for
        options that depend on some other command rather than another
        option of the same command.  'src_cmd' is the other command from
        which option values will be taken (a command object will be created
        for it if necessary); the remaining arguments are
        '(src_option,dst_option)' tuples which mean "take the value of
        'src_option' in the 'src_cmd' command object, and copy it to
        'dst_option' in the current command object".
        N)rget_command_objr-r#rR)rsrc_cmdoption_pairssrc_cmd_obj
src_option
dst_options      rset_undefined_optionszCommand.set_undefined_optionss{'77@@$$&&&(4	L	L$ZtZ((0j'+z*J*JKKK	L	Lrcd|j||}||S)zWrapper around Distribution's 'get_command_obj()' method: find
        (create if necessary and 'create' is true) the command object for
        'command', call its 'ensure_finalized()' method, and return the
        finalized command object.
        )rrzr-)rcommandcreatecmd_objs    rget_finalized_commandzCommand.get_finalized_command+s3#33GVDD  """rrc8|j||Sr])rreinitialize_command)rrreinit_subcommandss   rrzCommand.reinitialize_command7s 55g?QRRRrc:|j|dS)zRun some other command: uses the 'run_command()' method of
        Distribution, which creates and finalizes the command object if
        necessary and then invokes its 'run()' method.
        N)rrun_command)rrs  rrzCommand.run_command:s!
	
%%g.....rchg}|jD]'\}}|||r||(|S)akDetermine the sub-commands that are relevant in the current
        distribution (ie., that need to be run).  This is based on the
        'sub_commands' class attribute: each tuple in that list may include
        a method that we call to determine if the subcommand needs to be
        run for the current distribution.  Return a list of command names.
        )sub_commandsappend)rcommandscmd_namemethods    rget_sub_commandszCommand.get_sub_commandsAsI"&"3	*	*Xv~~)))rcVtjd||dS)Nzwarning: %s: %s
)r
warnr:)rrHs  rrzCommand.warnPs)$d&;&;&=&=sCCCCCrc@tj||||jdSNr!)rexecuter!)rfuncargsrHr6s     rrzCommand.executeSs#T4dl;;;;;;rc>tj|||jdSr)rmkpathr!)rnamemodes   rrzCommand.mkpathVs!dDL999999rc	Ntj|||||j||jS)zCopy a file respecting verbose, dry-run and force flags.  (The
        former two default to whatever is in the Distribution object, and
        the latter defaults to false for commands that don't define it.)r)r	copy_filerr!)rinfileoutfile
preserve_modepreserve_timeslinkr6s       rrzCommand.copy_fileYs9"
NL


	
rc	Ntj||||||j|jS)z\Copy an entire directory tree respecting verbose, dry-run,
        and force flags.
        r)r	copy_treerr!)rrrrrpreserve_symlinksr6s       rrzCommand.copy_treeis9!
NL


	
rc:tj|||jS)z$Move a file respecting dry-run flag.r)r	move_filer!)rsrcdstr6s    rrzCommand.move_files"3T\BBBBrc8ddlm}||||jdS)z2Spawn an external command respecting dry-run flag.r)spawnrN)distutils.spawnrr!)rcmdsearch_pathr6rs     rrz
Command.spawns3))))))
c;555555rc	Btj|||||j||S)N)r!ownergroup)rmake_archiver!)r	base_namer?root_dirbase_dirrrs       rrzCommand.make_archives5(L


	
rc|d|z}t|tr|f}n+t|ttfst	d|)d|d|}|jstj	||r|
||||dStj|dS)aSpecial case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        Nzskipping %s (inputs unchanged)z9'infiles' must be a string, or a list or tuple of stringszgenerating {} from {}z, )
rrSrctuplerr?joinrrnewer_grouprr
debug)rinfilesrrrexec_msgskip_msgr6s        r	make_filezCommand.make_files7'AHgs##	YjGGGdE]33	YWXXX.55gtyy?Q?QRRH
:	 -gw??	 LLtXu55555
Ihr)Nr3)r*r])rr))r)r*r*Nr*)r*r*rr*)r*r*)NNNN)NNr*)#rx
__module____qualname____doc__rrr'r-rr+rDrFr;rPrWrZrfrjrqrtr:rrrrrrrrrrrrrrrrrrsh

:L---`'''$








TTTT


.				;;;;*





+++LLL*SSSS///DDD<<<<::::TU



(



,CCCC6666RV



QR      rr)rrMrmradistutils.errorsr	distutilsrrrrrr
rrrrrs


								111111GGGGGGGGGGGGGGe e e e e e e e e e rPK{5ZR+@@QLib/site-packages/setuptools/_distutils/__pycache__/unixccompiler.cpython-311.pycnuW+A

b;d=dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZm
Z
ddlmZmZmZmZddlmZdd	lmZd
ZdZdZGd
deZdS)a9distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
N)	sysconfig)newer)	CCompilergen_preprocess_optionsgen_lib_options)DistutilsExecErrorCompileErrorLibError	LinkError)log)compiler_fixupcd}tj|ddkrd}d||vr|dz
}d||v|d|||dfS)z
    For macOS, split command into 'env' portion (if any)
    and the rest of the linker command.

    >>> _split_env(['a', 'b', 'c'])
    ([], ['a', 'b', 'c'])
    >>> _split_env(['/usr/bin/env', 'A=3', 'gcc'])
    (['/usr/bin/env', 'A=3'], ['gcc'])
    renvr
=Nospathbasenamecmdpivots  rE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/unixccompiler.py
_split_envr-sq
E	wA5((SZQJESZvv;EFF##c|tj|ddk}|d|||dfS)a
    AIX platforms prefix the compiler with the ld_so_aix
    script, so split that from the linker command.

    >>> _split_aix(['a', 'b', 'c'])
    ([], ['a', 'b', 'c'])
    >>> _split_aix(['/bin/foo/ld_so_aix', 'gcc'])
    (['/bin/foo/ld_so_aix'], ['gcc'])
    r	ld_so_aixNrrs  r
_split_aixr?s=
GSV$$3Evv;EFF##rcXt|}|d||kr|nd}||dS)a
    The linker command usually begins with the compiler
    command (possibly multiple elements), followed by zero or more
    params for shared library building.

    If the LDSHARED env variable overrides the linker command,
    however, the commands may not match.

    Return the best guess of the linker parameters by stripping
    the linker command. If the compiler command does not
    match the linker command, assume the linker command is
    just the first element.

    >>> _linker_params('gcc foo bar'.split(), ['gcc'])
    ['foo', 'bar']
    >>> _linker_params('gcc foo bar'.split(), ['other'])
    ['foo', 'bar']
    >>> _linker_params('ccache gcc foo bar'.split(), 'ccache gcc'.split())
    ['foo', 'bar']
    >>> _linker_params(['gcc'], ['gcc'])
    []
    Nr
)len)
linker_cmdcompiler_cmdc_lenrs    r_linker_paramsr$Ms<.
E'<77EEQEeffrc	$eZdZdZddgdgdgddgdgddgddZejddd	krd
ged
<gdZdZd
Z	dZ
dZdZdxZ
xZZeZejdkrdZ					ddZdZ	d dZ										d!dZdZdZdZdZedZd"dZdS)#
UnixCCompilerunixNccz-sharedarz-cr)preprocessorcompilercompiler_socompiler_cxx	linker_so
linker_exearchiverranlibdarwinr1)z.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%scygwinz.exec$|d||}|\}}}t||}	|j|	z}
|r|
d|g|r||
dd<|r|
||
||jp|dupt
||}|sdS|r2|tj	
|	||
dS#t$r}t|d}~wwxYw)N-or)_fix_compile_argsrr*extendappendforcermkpathrrdirnamespawnrr	)
selfsourceoutput_filemacrosinclude_dirs
extra_preargsextra_postargs
fixed_argsignorepp_optspp_args
preprocessmsgs
             rrIzUnixCCompiler.preprocesssD++D&,GG
'1$(>>#g-	0NND+.///	('GBQBK	+NN>***vZT;$#6T%:T:T
	F	6KK44555	$JJw!	$	$	$s###	$sC11
D;D

Dct|j||z}	|||z|d|gz|zdS#t$r}t	|d}~wwxYw)Nr6)rr,r=rr	)	r>objsrcextcc_argsrDrGr,rJs	         r_compilezUnixCCompiler._compilesy$T%5w7OPP	$JJ{W,T3/??.PQQQQQ!	$	$	$s###	$s!=
AAArc|||\}}|||}|||r|tj|||j|gz|z|j	z|j
rB	||j
|gzdS#t$r}t|d}~wwxYwdStjd|dS)N)
output_dirskipping %s (up-to-date))_fix_object_argslibrary_filename
_need_linkr;rrr<r=r0objectsr1rr
rdebug)r>rWoutput_libnamerRrXtarget_langoutput_filenamerJs        rcreate_static_libzUnixCCompiler.create_static_libs#33GZHH//:/VV??7O44	CKK88999JJt}'887BT\QRRR{
((JJt{o->>?????)((("3--'(
(
(
I0/BBBBBs*C


C(C##C(cP|||\}}||||}|\}}}t||||}t|ttdfst
d| tj	||}|
||r\||jz|zd|gz}|	rdg|dd<|
r|
|dd<|r|||
tj|	|tjk}|r|jn|jdd}|
dkrt|jrmt)|\}}t+|\}}t)|j\}}t)|j\}}t-||}||z|z|z}t/||}|||zdS#t2$r}t5|d}~wwxYwt7jd|dS)Nz%'output_dir' must be a string or Noner6z-grzc++rS)rT
_fix_lib_argsr
isinstancestrtype	TypeErrorrrjoinrVrWr8r;r<r
EXECUTABLEr/r.r-rrr$rr=rrrrX)r>target_descrWr[rR	librarieslibrary_dirsruntime_library_dirsexport_symbolsrXrCrD
build_temprZrElib_optsld_argsbuilding_exelinkerr	linker_neaix	linker_na_compiler_cxx_ne
linker_exe_neparamsrJs                            rlinkzUnixCCompiler.linksX #33GZHH''	dirs  rlibrary_dir_optionz UnixCCompiler.library_dir_optionczrctjd}tjtj|d}d|vpd|vS)NCCrgcczg++)rget_config_varrrrshlexsplit)r>cc_varr+s   r_is_gcczUnixCCompiler._is_gccsK)$//7##EK$7$7$:;; 5EX$55rcxtjdddkr/ddlm}m}|}|r||ddgkrd|zSd|zStjdd	d
krd|zStjdddkr|rd
ndd|zgSt
jddkrd|zSd|zS)Nr2r3r)get_macosx_target_ver
split_version
z-Wl,-rpath,rxfreebsdz-Wl,-rpath=zhp-uxz-Wl,+sz+sGNULDyesz-Wl,--enable-new-dtags,-Rz-Wl,-R)sysplatformdistutils.utilrrrrr)r>rzrrmacosx_target_vers     rruntime_library_dir_optionz(UnixCCompiler.runtime_library_dir_options<x''KKKKKKKK 5 5 7 7 
"]]3D%E%E"a%P%P$s**cz!
\"1"

*
* 3&&
\"1"

(
( LLNN4s

#G,,55/44c>!rcd|zS)Nz-lry)r>libs  rlibrary_optionzUnixCCompiler.library_optionEr|rcvtjd}tjd|}tjdkoA|o?|dp*|do|d}|r;tj	|
d|ddn|S)	a
        macOS users can specify an alternate SDK using'-isysroot'.
        Calculate the SDK root if it is specified.

        Note that, as of Xcode 7, Apple SDKs may contain textual stub
        libraries with .tbd extensions rather than the normal .dylib
        shared libraries installed in /.  The Apple compiler tool
        chain handles this transparently but it can cause problems
        for programs that are being built with an SDK and searching
        for specific libraries.  Callers of find_library_file need to
        keep in mind that the base filename of the returned SDK library
        file might have a different extension from that of the library
        file installed on the running system, for example:
          /Applications/Xcode.app/Contents/Developer/Platforms/
              MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
              usr/lib/libedit.tbd
        vs
          /usr/lib/libedit.dylib
        CFLAGSz-isysroot\s*(\S+)r3z/System/z/usr/z/usr/local/r
N)rrresearchrr
startswithrrrcgroup)rzcflagsmatch
apply_roots    r
_library_rootzUnixCCompiler._library_rootHs*)(33	.77
LH$

z**SNN7++QCNN=4Q4Q0Q	9CKrw||EKKNNCG444KrcfddD}tj|}dtj||D}ttjj|}t|dS)a/
        Second-guess the linker with not much hard
        data to go on: GCC seems to prefer the shared library, so
        assume that *all* Unix C compilers do,
        ignoring even GCC's "-static" option.

        >>> compiler = UnixCCompiler()
        >>> compiler._library_root = lambda dir: dir
        >>> monkeypatch = getfixture('monkeypatch')
        >>> monkeypatch.setattr(os.path, 'exists', lambda d: 'existing' in d)
        >>> dirs = ('/foo/bar/missing', '/foo/bar/existing')
        >>> compiler.find_library_file(dirs, 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.dylib'
        >>> compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.dylib'
        >>> monkeypatch.setattr(os.path, 'exists',
        ...     lambda d: 'existing' in d and '.a' in d)
        >>> compiler.find_library_file(dirs, 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.a'
        >>> compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.a'
        c3FK|]}|VdS))lib_typeN)rU).0rarr>s  r	z2UnixCCompiler.find_library_file..sJ


!!#!55





rzdylib xcode_stub shared staticc3\K|]'\}}tj||V(dS)N)rrrc)rrootlib_names   rrz2UnixCCompiler.find_library_file..sJ

h
GLLx((





rN)
rmapr	itertoolsproductfilterrrexistsnext)r>dirsrrX	lib_namesrootssearchedfounds` `     rfind_library_filezUnixCCompiler.find_library_fileks.




8>>@@


	
D&--

"+"3E9"E"E



rw~x00E4   r)NNNNN)NrN)
NNNNNrNNNN)r)__name__
__module____qualname__
compiler_typeexecutablesrrsrc_extensions
obj_extensionstatic_lib_extensionshared_lib_extensiondylib_lib_extensionxcode_stub_lib_extensionstatic_lib_formatshared_lib_formatdylib_lib_formatxcode_stub_lib_format
exe_extensionrIrPr\rvr{rrrstaticmethodrrryrrr&r&isMFvI&f5M		K|BQB8##!)
H?>>NM "%?HHH),<,
|x
#$#$#$#$J$$$NRCCCC:!9C9C9C9C~666
&"&"&"P L L\ LD&!&!&!&!&!&!rr&)__doc__rrrrr	distutilsrdistutils.dep_utilrdistutils.ccompilerrrrdistutils.errorsrr	r
rr
_macos_compatrrrr$r&ryrrrs6


			



				$$$$$$RRRRRRRRRRRRRRRRRRRRRR))))))$$$$$$$$8h!h!h!h!h!Ih!h!h!h!h!rPK{5Zbi,i,KLib/site-packages/setuptools/_distutils/__pycache__/version.cpython-311.pycnuW+A

b;d2dZddlZddlZddlZejdZGddZGddeZGdd	eZdS)
aProvides classes to represent module version numbers (one class for
each style of version numbering).  There are currently two such classes
implemented: StrictVersion and LooseVersion.

Every version number class implements the following interface:
  * the 'parse' method takes a string and parses it to some internal
    representation; if the string is an invalid version number,
    'parse' raises a ValueError exception
  * the class constructor takes an optional string argument which,
    if supplied, is passed to 'parse'
  * __str__ reconstructs the string that was passed to 'parse' (or
    an equivalent string -- ie. one that will generate an equivalent
    version number instance)
  * __repr__ generates Python code to recreate the version number instance
  * _cmp compares the current instance with either another instance
    of the same class or a string (which will be parsed to an instance
    of the same class, thus must follow the same rules)
Nc#Ktjd5}tjdtd|VddddS#1swxYwYdS)NT)recorddefaultz)distutils Version classes are deprecated.)actioncategorymessage)warningscatch_warningsfilterwarningsDeprecationWarning)ctxs lE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/version.pysuppress_known_deprecationr"s		 	-	-	-'?	
	
	
	

			
s!AA

A
c>eZdZdZd
dZdZdZdZdZdZ	d	Z
dS)VersionzAbstract base class for version numbering classes.  Just provides
    constructor (__init__) and reproducer (__repr__), because those
    seem to be the same for all version numbering classes; and route
    rich comparisons to _cmp.
    Ncl|r||tjdtddS)NzHdistutils Version classes are deprecated. Use packaging.version instead.)
stacklevel)parser	warnrselfvstrings  r__init__zVersion.__init__4sJ	 JJw

-		
	
	
	
	
	
c\d|jjt|S)Nz	{} ('{}'))format	__class____name__strrs r__repr__zVersion.__repr__>s#!!$."93t99EEErcN||}|tur|S|dkSNr_cmpNotImplementedrothercs   r__eq__zVersion.__eq__A,IIeHAv
rcN||}|tur|S|dkSr$r%r(s   r__lt__zVersion.__lt__G,IIeH1urcN||}|tur|S|dkSr$r%r(s   r__le__zVersion.__le__Mr,rcN||}|tur|S|dkSr$r%r(s   r__gt__zVersion.__gt__Sr/rcN||}|tur|S|dkSr$r%r(s   r__ge__zVersion.__ge__Yr,rN)r
__module____qualname____doc__rr"r+r.r1r3r5rrrr-s



FFFrrc`eZdZdZejdejejzZdZ	dZ
dZdS)
StrictVersiona?Version numbering for anal retentives and software idealists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of two or three
    dot-separated numeric components, with an optional "pre-release" tag
    on the end.  The pre-release tag consists of the letter 'a' or 'b'
    followed by a number.  If the numeric components of two version
    numbers are equal, then one with a pre-release tag will always
    be deemed earlier (lesser) than one without.

    The following are valid version numbers (shown in the order that
    would be obtained by sorting according to the supplied cmp function):

        0.4       0.4.0  (these two are equivalent)
        0.4.1
        0.5a1
        0.5b3
        0.5
        0.9.6
        1.0
        1.0.4a3
        1.0.4b1
        1.0.4

    The following are examples of invalid version numbers:

        1
        2.7.2.2
        1.3.a4
        1.3pl1
        1.3c4

    The rationale for this version numbering system will be explained
    in the distutils documentation.
    z)^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$c|j|}|std|z|ddddd\}}}}}|r+t	tt|||g|_n,t	tt||gdz|_|r|dt
|f|_dSd|_dS)	Nzinvalid version number '%s'r)rr)	
version_rematch
ValueErrorgrouptuplemapintversion
prerelease)rrrCmajorminorpatchrJprerelease_nums        rrzStrictVersion.parses%%g..	F:WDEEE)rIjoinrGr rJrs  r__str__zStrictVersion.__str__s<?ahhs3QqS(9::;;GGhhs35566G?	M 22S9K5L5LLGrct|tr6t5t|}dddn#1swxYwYnt|tstS|j|jkr|j|jkrdSdS|js	|jsdS|jr	|jsdS|js	|jrdS|jr-|jr&|j|jkrdS|j|jkrdSdSJd)Nr>rFznever get here)
isinstancer rr<r'rIrJrr)s  rr&zStrictVersion._cmpsdeS!!	"+--
-
-%e,,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-E=11	"!!<5=((|em++rq	+u'7	+1
_	+U%5	+2
	+U%5
	+1
_	+!1	+%"222q5#333rq*****sAAAN)rr7r8r9recompileVERBOSEASCIIrBrrRr&r:rrr<r<qso!!F4bj286KJ###"


#+#+#+#+#+rr<cVeZdZdZejdejZdZdZ	dZ
dZdS)LooseVersionaVersion numbering for anarchists and software realists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of a series of numbers,
    separated by either periods or strings of letters.  When comparing
    version numbers, the numeric components will be compared
    numerically, and the alphabetic components lexically.  The following
    are all valid version numbers, in no particular order:

        1.5.1
        1.5.2b2
        161
        3.10a
        8.02
        3.4j
        1996.07.12
        3.2.pl0
        3.1.1.6
        2g6
        11g
        0.960923
        2.2beta29
        1.13++
        5.5.kw
        2.0b1pl0

    In fact, there is no such thing as an invalid version number under
    this scheme; the rules for comparison are simple and predictable,
    but may not always give the results you want (for some definition
    of "want").
    z(\d+ | [a-z]+ | \.)c||_d|j|D}t|D](\}}	t	|||<#t
$rY%wxYw||_dS)Nc"g|]}||dk
|
S)rPr:).0xs  r
z&LooseVersion.parse..Is#TTTAQT1PS88a888r)rcomponent_resplit	enumeraterHrDrI)rr
componentsiobjs     rrzLooseVersion.parseDsTT!2!8!8!A!ATTT

++		FAs
 #C
1





"sA
A! A!c|jSr6)rr!s rrRzLooseVersion.__str__Rs
|rc&dt|zS)NzLooseVersion ('%s'))r r!s rr"zLooseVersion.__repr__Us$s4yy00rct|trt|}nt|tstS|j|jkrdS|j|jkrdS|j|jkrdSdS)NrrTr>)rUr r\r'rIrVs  rr&zLooseVersion._cmpXseS!!	" ''EEE<00	"!!<5=((1<%-''2<%-''1('rN)rr7r8r9rWrXrYrbrrRr"r&r:rrr\r\!sr>2:4bjAAL"""111rr\)	r9rWr	
contextlibcontextmanagerrrr<r\r:rrrms&
			00000000Hi+i+i+i+i+Gi+i+i+`BBBBB7BBBBBrPK{5ZcQssNLib/site-packages/setuptools/_distutils/__pycache__/_functools.cpython-311.pycnuW+A

`;dddlZdZdS)NcFtjfd}|S)z
    Wrap func so it's not called if its first param is None

    >>> print_text = pass_none(print)
    >>> print_text('text')
    text
    >>> print_text(None)
    c$||g|Ri|SdS)N)paramargskwargsfuncs   oE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/_functools.pywrapperzpass_none..wrappers14///////)	functoolswraps)r	rs` r
	pass_noners:_T00000Nr)r
rrrr
rs*rPK{5Z|QQHLib/site-packages/setuptools/_distutils/__pycache__/util.cpython-311.pycnuW+A

b;dFRdZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZmZddl
mZddlmZddlmZdZdZejd	krdad
ZdZdZd
ZdZdZdZe	jdZdZ dZ!ddZ"dxa#xa$a%dZ&dZ'ddZ(dZ)							ddZ*dZ+dS) zudistutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
N)DistutilsPlatformErrorDistutilsByteCompileError)newer)spawn)logctjdkrTtjdkrDdtjvrdSdtjvrdStjdkr_tjdkrOt
td	r:tj\}}}}}|d
ddkrd
dlm	}||||StjS)z
    Return a string that identifies the current platform. Use this
    function to distinguish platform-specific build directories and
    platform-specific built distributions.
    )ntz(arm)	win-arm32z(arm64)	win-arm64)r		posixunameNr	aix)aix_platform)sysversion_infoosnameversionlowerhasattrr
py38compatr	sysconfigget_platform)osnamehostreleasermachiners      iE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/util.pyget_host_platformr#s&  
7d??#+++----"{CK--////"{
&  
7g'"g"6"668hjj3FD'7GbqbzU""444444#|FGW===!###ctjdkrIddddd}tjd}||p
t	St	S)Nrwin32z	win-amd64rr
)x86x64armarm64VSCMD_ARG_TGT_ARCH)rrenvirongetr#)TARGET_TO_PLATtargets  r"rr3sg	w$ 	

 455!!&))@->-@-@@r$darwinMACOSX_DEPLOYMENT_TARGETc
dadS)zFor testing only. Do not call.N)_syscfg_macosx_verr$r"_clear_cached_macosx_verr5Esr$c`t!ddlm}|jtpd}|r|atS)zGet the version of macOS latched in the Python interpreter configuration.
    Returns the version as a string or None if can't obtain one. Cached.Nr)r)r3	distutilsrget_config_varMACOSX_VERSION_VAR)rvers  r"!get_macosx_target_ver_from_syscfgr<KsH!''''''&i&'9::@b	%!$r$ct}tjt}|rQ|rMt|ddgkr8t|ddgkr#dtzd|d|dz}t
||S|S)aReturn the version of macOS for which we are building.

    The target version defaults to the version in sysconfig latched at time
    the Python interpreter was built, unless overridden by an environment
    variable. If neither source has a value, then None is returned
r	$z mismatch: now "z" but "z*" during configure; must use 10.3 or later)r<rr,r-r:
split_versionr)
syscfg_verenv_vermy_msgs   r"get_macosx_target_verrDXs344Jjnn/00G

	1j))b!W44g&&"a00(((,3GGZZZ,AA

)000r$c@d|dDS)zEConvert a dot-separated string into a list of numbers for comparisonsc,g|]}t|Sr4)int).0ns  r"
z!split_version..zs)))qCFF)))r$.)split)ss r"r@r@xs ))AGGCLL))))r$cLtjdkr|S|s|S|ddkrtd|z|ddkrtd|z|d}d|vr|dd|v|stjStjj|S)aReturn 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    /rzpath '%s' cannot be absolutezpath '%s' cannot end with '/'rK)rsep
ValueErrorrLremovecurdirpathjoin)pathnamepathss  r"convert_pathrY}s
v}}{c7(BCCC|s88CDDDNN3E

,,
S,,y
7<r$ctjdkrgtj|s tj||Stj||ddStjdkrXtj|\}}|ddkr
|dd}tj||St
dtjd)	a	Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    rrNrr\znothing known about platform '')rrrUisabsrV
splitdriver)new_rootrWdriverUs    r"change_rootras
w'w}}X&&	87<<(3337<<(122,777	D**844
7d??8Dw||Hd+++
 !L"'!L!L!L
M
MMr$cDtjdkrddtjvrV	ddl}|tjdtjd<n#ttf$rYnwxYwdtjvrttjd<dSdS)aLEnsure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    rHOMErNPLAT)	rrr,pwdgetpwuidgetuidImportErrorKeyErrorr)rfs r"
check_environrks
w'fBJ66	JJJ!$bikk!:!:1!=BJvX&			
D	
RZ)^^
6 s=AA21A2c@tttj}|d|D	t
||S#t$r}td|d}~wwxYw)a
    Perform variable substitution on 'string'.
    Variables are indicated by format-style braces ("{var}").
    Variable is substituted by the value found in the 'local_vars'
    dictionary or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    c3>K|]\}}|t|fVdSNstr)rHrvalues   r"	zsubst_vars..s1KKu4U$KKKKKKr$zinvalid variable N)
rkdictrr,updateitems
_subst_compat
format_maprjrR)rM
local_varslookupvars    r"
subst_varsr{sOOO
"*

F
MMKK
8H8H8J8JKKKKKK4Q**62224442S223334s!A<<
BBBcd}tjd||}||krddl}|dt|S)zb
    Replace shell/Perl-style variable substitution with
    format-style. For compatibility.
    c4d|ddS)N{r})group)matchs r"_substz_subst_compat.._substs&EKKNN&&&&r$z\$([a-zA-Z_][a-zA-Z_0-9]*)rNz+shell/Perl-style substitions are deprecated)resubwarningswarnDeprecationWarning)rMrreplrs    r"rvrvs\'''6/;;Dqyy

9	
	
	
Kr$error: c&|t|zSrnro)excprefixs  r"grok_environment_errorrsCHHr$ctjdtjzatjdatjdadS)Nz
[^\\\'\"%s ]*z'(?:[^'\\]|\\.)*'z"(?:[^"\\]|\\.)*")rcompilestring
whitespace
_wordchars_re
_squote_re
_dquote_rer4r$r"_init_regexrs>J/&2CCDDM011J011JJJr$c"tt|}g}d}|rt||}|}|t|kr||d|n}||tjvr=||d|||d	}d}n||dkr|d|||dzdz}|dz}n||dkrt||}n@||dkrt||}ntd||z|td||z|\}}|d|||dz|dz
z||dz}|d	z
}|t|kr||n||S)
aSplit a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    Nrr[rr\"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?))rrstriprendlenappendrrlstriprrRuntimeErrorrRspan)rMwordsposmrbegs      r"split_quotedrs



			AE
C
%3''eegg#a&&==LL4C4!!!S6V&&&
LL4C4!!!#$$  ACC
sVt^^$3$!C!GII,&A'CCv}}$$Q,,33$$Q,,"#F3#OPPPy !E#!NOOOJS#$3$!C!GcAg-..3448A%%''A+C#a&&==LLOOOK%NLr$c|6d|j|}|dddkr
|dddz}tj||s||dSdS)aPerform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    Nz{}{!r}z,)r))format__name__rinfo)funcargsmsgverbosedry_runs     r"executerAsp{oodmT22rss8tad)c/CHSMMMdr$c|}|dvrdS|dvrdStd|)zConvert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    )yyesttrueon1r)rInoffalseoff0rzinvalid truth value {!r})rrRr)vals r"	strtoboolrTsP))++C
222q	5	5	5q3::3??@@@r$rctjrtd||dk}|s	ddlm}|d\}	}
n##t
$rddlm}d|d}
}	YnwxYwtjd|
|s|	tj
|	d	}nt|
d	}|5|d
|d
tt|dz|d
|d|d|d|d|ddddn#1swxYwYtjg}
|
t%j|
|
t+|
|t-tj|
fd|
z|dSddlm}|D]@}|dddkr|dkr,|dkrdn|}t4j||}nt4j|}|}|rG|dt;||krt=d|d||t;|d}|r tj
||}tj |}|rO|stC||r'tjd|||s
||||*tj"d||BdS)a~Byte-compile a collection of Python source files to .pyc
    files in a __pycache__ subdirectory.  'py_files' is a list
    of files to compile; any files that don't end in ".py" are silently
    skipped.  'optimize' must be one of the following:
      0 - don't optimize
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    zbyte-compiling is disabled.NTr)mkstempz.py)mktempz$writing byte-compilation script '%s'wz2from distutils.util import byte_compile
files = [
z,
z]
z
byte_compile(files, optimize=z, force=z,
             prefix=z, base_dir=z,
             verbose=z$, dry_run=0,
             direct=1)
)rzremoving %s)rr7)optimizationzinvalid prefix: filename z doesn't start with zbyte-compiling %s to %sz%skipping byte-compilation of %s to %s)#rdont_write_bytecodertempfilerrirrrrfdopenopenwriterVmaprepr
executableextend
subprocess"_optim_args_from_interpreter_flagsrrrrS
py_compiler	importlibutilcache_from_sourcerrRrUbasenamerdebug)py_filesoptimizeforcerbase_dirrrdirectr	script_fdscript_namerscriptcmdrfileoptcfiledfile
cfile_bases                    r"byte_compilerdsPG'(EFFF~'1}ZY	;(((((('.wu~~$Y	;	;	;'''''''+VVE]]YYY	;	7EEE!	$9c22k3//

"UZZD((;(;<=;+FPWXXXXXX	'&&&&& 	Y 	YDBCCyE!!
1}}$MMbbx!88C8PP!88>>E
-
#f++
&&00$*44)c&kkmm,
6Xu55))%00J
YYE$..YH6jIII"4eU333IEtZXXXA 	Y 	Ys"=AA!A9D&&D*-D*cZ|d}d}||S)zReturn a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    
z	
        )rLrV)headerlinesrQs   r"
rfc822_escapers*
LLE
C88E??r$)r)Nrr)rrNNrrN),__doc__importlib.utilrrrrrrr	functoolsdistutils.errorsrrdistutils.dep_utilrdistutils.spawnrr8rr#rplatformr3r:r5r<rDr@rYra	lru_cacherkr{rvrrrrrrrrrrr4r$r"rsF								







NNNNNNNN$$$$$$!!!!!!$$$:


<8/


@***
   :NNN*,,,,444&(+/.
.
Z222<<<D&
A
A
A$



TYTYTYTYnr$PK{5Zw((LLib/site-packages/setuptools/_distutils/__pycache__/dir_util.cpython-311.pycnuW+A

`;drdZddlZddlZddlmZmZddlmZiad
dZ	d
dZ
						dd	Zd
ZddZ
dZdS)zWdistutils.dir_util

Utility functions for manipulating directories and directory trees.N)DistutilsInternalErrorDistutilsFileError)logc	t|ts"td|tj|}g}tj|s|dkr|St	tj
|r|Stj|\}}|g}|r||rztj|s[tj|\}}|d||r!|rtj|[|D])}tj
||}tj
|}	t	|	r]|dkrtjd||s	t	j||ny#t"$rl}
|
jt$jkrtj|s.t)d||
jdYd}
~
nd}
~
wwxYw||dt|	<+|S)	aCreate a directory and any missing ancestor directories.

    If the directory already exists (or if 'name' is the empty string, which
    means the current directory, which of course exists), then do nothing.
    Raise DistutilsFileError if unable to create some directory along the way
    (eg. some sub-path exists, but is a file rather than a directory).
    If 'verbose' is true, print a one-line summary of each mkdir to stdout.
    Return the list of directories actually created.

    os.makedirs is not used because:

    a) It's new to Python 1.5.2, and
    b) it blows up if the directory already exists (in which case it should
       silently succeed).
    z*mkpath: 'name' must be a string (got {!r})rrzcreating %szcould not create '{}': {}N)
isinstancestrrformatospathnormpathisdir
_path_createdgetabspathsplitinsertjoinrinfomkdirOSErrorerrnoEEXISTrargsappend)namemodeverbosedry_runcreated_dirsheadtailtailsdabs_headexcs           mE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/dir_util.pymkpathr+sk(dC  
$8??EE

	
7D!!DL	w}}Tdbjj..//7==&<4
FE
4

d 3 3w}}T**t
Q4

d 3 3$$w||D!$$7??4((X&&	a<<H]D)))	&
t$$$$


	U\11bgmmD6I6I1,3::4"NN21111


%%%"#
hsG//
I%9A"I  I%c	t}|D]R}|tj|tj|St
|D]}t||||dS)aCreate all the empty directories under 'base_dir' needed to put 'files'
    there.

    'base_dir' is just the name of a directory which doesn't necessarily
    exist yet; 'files' is a list of filenames to be interpreted relative to
    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
    will be created if it doesn't already exist.  'mode', 'verbose' and
    'dry_run' flags are as for 'mkpath()'.
    r!r"N)setaddrrrdirnamesortedr+)base_dirfilesr r!r"need_dirfiledirs        r*create_treer7WsuuHDDRW\\(BGOOD,A,ABBCCCCh<<sD'7;;;;;<<c
ddlm}|s1tj|std|z	tj|}	nD#t$r7}
|rg}	n(td||
j	Yd}
~
nd}
~
wwxYw|st||g}|	D]I}tj||}
tj||}|drY|r|tj
|
r]tj|
}|dkrtjd	|||stj||||tj|
r,|t)|
|||||||
"||
||||||
||K|S)aCopy an entire directory tree 'src' to a new location 'dst'.

    Both 'src' and 'dst' must be directory names.  If 'src' is not a
    directory, raise DistutilsFileError.  If 'dst' does not exist, it is
    created with 'mkpath()'.  The end result of the copy is that every
    file in 'src' is copied to 'dst', and directories under 'src' are
    recursively copied to 'dst'.  Return the list of files that were
    copied or might have been copied, using their output name.  The
    return value is unaffected by 'update' or 'dry_run': it is simply
    the list of all files under 'src', with the names changed to be
    under 'dst'.

    'preserve_mode' and 'preserve_times' are the same as for
    'copy_file'; note that they only apply to regular files, not to
    directories.  If 'preserve_symlinks' is true, symlinks will be
    copied as symlinks (on platforms that support them!); otherwise
    (the default), the destination of the symlink will be copied.
    'update' and 'verbose' are the same as for 'copy_file'.
    r)	copy_filez&cannot copy tree '%s': not a directoryzerror listing files in '{}': {}N)r!z.nfsrzlinking %s -> %sr-)distutils.file_utilr:rrrrlistdirrr
strerrorr+r
startswithislinkreadlinkrrsymlinkrextend	copy_tree)srcdst
preserve_modepreserve_timespreserve_symlinksupdater!r"r:nameseoutputsnsrc_namedst_name	link_dests                r*rCrCksQ:.-----Q27==--Q !IC!OPPP
3	EE$188ajII

EEEE%sG$$$$G
'%'%7<<Q''7<<Q''<<		%!9!9	%H--I!||+XyAAA
0
9h///NN8$$$$
W]]8
$
$	%NN!"%##			




I




NN8$$$$NsA
B-BBctj|D]}tj||}tj|r0tj|st
||q|tj|f|tj	|fdS)zHelper for remove_tree().N)
rr<rrrr?_build_cmdtuplerremovermdir)r	cmdtuplesfreal_fs    r*rRrRs
Z

22dA&&
7==  	2)?)?	2FI....bi01111
bh%&&&&&r8ch|dkrtjd||rdSg}t|||D]}}	|d|dtj|d}|tvrt|=Q#t$r }tjd||Yd}~vd}~wwxYwdS)zRecursively remove an entire directory tree.

    Any errors are ignored (apart from being reported to stdout if 'verbose'
    is true).
    rz'removing '%s' (and everything under it)Nrzerror removing %s: %s)	rrrRrrrrrwarn)	directoryr!r"rUcmdrr)s       r*remove_treer\s!||:IFFFIIy)))>>	>CF3q6NNNgooc!f--G-''!'*	>	>	>H,i========	>>>sA
B
B/B**B/ctj|\}}|ddtjkr
||ddz}|S)zTake the full path 'path', and make it a relative path.

    This is useful to make 'path' the second argument to os.path.join().
    rrN)rr
splitdrivesep)rdrives  r*ensure_relativerasI
'$$T**KE4AaCyBFtABBxKr8)rrr)rrrrrr)rr)__doc__rrdistutils.errorsrr	distutilsrrr+r7rCrRr\rar8r*rfsGG
			GGGGGGGG
EEEEP<<<<.

YYYYx'''>>>>2r8PK{5Z9lmJLib/site-packages/setuptools/_distutils/__pycache__/config.cpython-311.pycnuW+A

`;d8JdZddlZddlmZddlmZdZGddeZdS)zdistutils.pypirc

Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
N)RawConfigParser)CommandzE[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
c`eZdZdZdZdZdZdZdddezfdgZd	gZ	d
Z
dZdZd
Z
dZdZdS)
PyPIRCCommandz6Base command that knows how to handle the .pypirc filezhttps://upload.pypi.org/legacy/pypiNzrepository=rzurl of repository [default: %s])
show-responseNz&display full response text from serverr	c|tjtjddS)zReturns rc file path.~z.pypirc)ospathjoin
expanduserselfs kE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/config.py_get_rc_filezPyPIRCCommand._get_rc_file%s(w||BG..s33Y???c|}tjtj|tjtjzdd5}|t||fzddddS#1swxYwYdS)zCreates a default .pypirc file.iwN)rrfdopenopenO_CREATO_WRONLYwriteDEFAULT_PYPIRC)rusernamepasswordrcfs     r
_store_pypirczPyPIRCCommand._store_pypirc)s



 
 
Yrwr2:#;UCCS
I
I	;Q
GGNh%99:::	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;s BB	Bc|}tj|r|d|z|jp|j}t}|||	}d|vr|
dd}d|dD}|gkr
d|vrdg}niS|D]}d|i}|
|d|d<d	|jfd
|jfdfD]:\}	}
|
||	r|
||	||	<5|
||	<;|dkr||jdfvr|j|d	<|cS|d|ks|d	|kr|cSnod|vrkd}|
|d	r|
|d	}n|j}|
|d|
|d
|||jdSiS)zReads the .pypirc file.zUsing PyPI login from %s	distutilsz
index-serverscfg|].}|dk|/S))strip).0servers  r
z.PyPIRCCommand._read_pypirc..<s=||~~++LLNN+++r
rr(r
repositoryrealm)rNzserver-loginr)rrr+r(r,)rrr
existsannouncer+DEFAULT_REPOSITORYrreadsectionsgetsplit
DEFAULT_REALM
has_option)rrr+configr1
index_servers_serversr(currentkeydefaults           r_read_pypirczPyPIRCCommand._read_pypirc/s



 
 
7>>"B	MM4r9:::CD,CJ$&&FKKOOO((Hh&& &

; H H
"/"5"5d";";
r>>))$*8 "	&''F'0G*0**VZ*H*HGJ'&t'>? $"45*)33W
",,VS993+1::fc+B+BGCLL+2GCLL
''J/;--150G-& )Z77"<0J>>&?7'< 8++'$$V\::9!'FL!A!AJJ!%!8J &

6: > > &

6: > >",$!/	rcddl}|dd}||ddd}||S)z%Read and decode a PyPI HTTP response.rNzcontent-typez
text/plaincharsetascii)cgi	getheaderparse_headerr2r0decode)rresponserAcontent_typeencodings     r_read_pypi_responsez!PyPIRCCommand._read_pypi_responsexsd


)).,GG##L11!488GLL}}%%h///rc0d|_d|_d|_dS)zInitialize options.Nr)r+r,
show_responsers rinitialize_optionsz PyPIRCCommand.initialize_optionss
rcV|j|j|_|j|j|_dSdS)zFinalizes options.N)r+r/r,r4rs rfinalize_optionszPyPIRCCommand.finalize_optionss2?""5DO:+DJJJr)__name__
__module____qualname____doc__r/r4r+r,user_optionsboolean_optionsrr!r<rHrKrMrrrrs@@:MJE
>ASSTIL
''O@@@;;;GGGR000,,,,,rr)rQrconfigparserr
distutils.cmdrrrrTrrrWs

			((((((!!!!!!u,u,u,u,u,Gu,u,u,u,u,rPK{5ZVIBUUMLib/site-packages/setuptools/_distutils/__pycache__/sysconfig.cpython-311.pycnuW+A

`;dIdZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZdejvZ
ejejZejejZejejZejejZdejvr&ejejdZnNejr8ejejejZnejZd	Zeed
dZ dZ!ej"dkr!ed
Z#e#eZe#e Z dZ$e$Z%dZ&	e%sej'Z&n#e($rYnwxYwdZ)d$dZ*dZ+dZ,dZ-dZ.dZ/dZ0d%dZ1dZ2dZ3dZ4d&dZ5ej6dZ7ej6dZ8ej6dZ9d&d Z:d!Z;dadS)'aProvide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        
N)DistutilsPlatformError)
py39compat)	pass_none__pypy___PYTHON_PROJECT_BASEctj|dtfddDS)z]
    Return True if the target directory appears to point to an
    un-installed Python.
    Modulesc3fK|]+}|V,dSN)joinpathis_file).0fnmoduless  nE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/sysconfig.py	z(_is_python_source_dir..2s=QQ"w##++--QQQQQQ)SetupzSetup.local)pathlibPathr
any)drs @r_is_python_source_dirr,sD
l1oo&&y11GQQQQ8PQQQQQQr_homectj|tj|S)z,
    Return True if a is a parent of b.
    )ospathnormcase
startswith)dir_adir_bs  r
_is_parentr#8s87E""--bg.>.>u.E.EFFFrntc\ttf}fd|D}t|S)Nc3xK|]4}ttj|d0|V5dS)PCbuildN)r#rrjoin)rprefixrs  rrz_fix_pcbuild..EsW

!RW\\&)<<==






r)PREFIXBASE_PREFIXnext)rprefixesmatcheds`  r_fix_pcbuildr/AsI;&



"



GQrc`trttSttSr)	_sys_homerproject_baserr
_python_buildr4Ps&0$Y/// ...rc0dtjddzS)zReturn a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    z%d.%dN)sysversion_infor3rrget_python_versionr:fs
S%bqb)))rc|rtnt}||n|}	tdtj}n*#t
$rt
dtjzwxYw||||S)aReturn the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    N_get_python_inc_zFI don't know where Python installs its C header files on platform '%s')BASE_EXEC_PREFIXr+globalsrnameKeyErrorr)
plat_specificr)default_prefixresolved_prefixgetters     rget_python_incrEns*7G%%KN & 2ffO
7bg778


$
!#
)

	


6/6=999s	!:'A!ctr0tjdkr tj|dSt
|pt||pt|S)Ninclude)	IS_PYPYr8r9rrr(_get_python_inc_posix_python_get_python_inc_from_config_get_python_inc_posix_prefixr)spec_prefixrAs   r_get_python_inc_posixrQs_/3#f,,w||FI...$]33	0&}kBB	0'//rctsdS|rtptStjt
dd}tj|S)z
    Assume the executable is in the build directory. The
    pyconfig.h file should be in the same directory. Since
    the build directory may not be the source directory,
    use "srcdir" from the makefile to find the "Include"
    directory.
    NsrcdirInclude)python_buildr1r2rrr(get_config_varnormpath)rAincdirs  rrLrLsW)(L(
W\\.22I
>
>F
7F###rc4|td|zdzSdS)aj
    If no prefix was explicitly specified, provide the include
    directory from the config vars. Useful when
    cross-compiling, since the config vars may come from
    the host
    platform Python installation, while the current Python
    executable is from the build platform installation.

    >>> monkeypatch = getfixture('monkeypatch')
    >>> gpifc = _get_python_inc_from_config
    >>> monkeypatch.setitem(gpifc.__globals__, 'get_config_var', str.lower)
    >>> gpifc(False, '/usr/bin/')
    >>> gpifc(False, '')
    >>> gpifc(False, None)
    'includepy'
    >>> gpifc(True, None)
    'confincludepy'
    NCONF	INCLUDEPY)rV)rArPs  rrMrMs*&f}4{BCCCrctrdnd}|tztz}tj|d|S)NpypypythonrJ)rKr:build_flagsrrr()r)implementation
python_dirs   rrNrNs>&4VVHN"4"6"66DJ
7<<	:666rctrStj|dtjjztj|dzStj|dS)NrJPC)rUrrr(pathseprOs   r_get_python_inc_ntres`

GLL++go
gll64((
)	

7<<	***rcJ|r|Stj|dS)N
site-packages)rrr()standard_lib	libpythonearly_prefixr)s    r
_posix_librks&8w||I777rctrltjdkr\|t}|r1tj|dtjdStj|dS|}|#|r|rtpt}n|rtpt}tjdkrj|s|rttdd}nd}trd	nd
}tj|||tz}t||||StjdkrC|r tj|dStj|ddStd
tjz)aSReturn the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    rGNz
lib-pythonrrgposix
platlibdirlibr]r^r$Libz?I don't know where Python installs its library on platform '%s')rKr8r9r*rrr(versionr=r+EXEC_PREFIXr?getattrr:rkr)rArhr)rjlibdirr`ris       rget_python_libruss53#f,,>F	F7<<ck!nEEEw||FO444L
~	="7'7F;FF"2{>H2:D!B
""Cx"*Y"77HHCx(*HcF"  x/	!	
	
	
rz!!h&:&>&>x&N&N!$$BJx,@$AAA(4%%%g('rctrktjdkr-tjt
ptd}nt
pt}tj|dStjS)z2Return full pathname of installed pyconfig.h file.r$rcz
pyconfig.h)	rUrr?rr(r1r2	sysconfigget_config_h_filename)inc_dirs rrrbs`1
7d??gll9#<dCCGG/O2O2O!g-- % #4	?33%''DGd3!!%%'')),E!+AGGII+.5=Ee||(-

/$'JJE*/DJJ *777).DJJJ7$DM??5113d122hBS6S6S#'8D#4//-2T
DMMa0"dHHJJJ

  1a	 ggiiDGHHTNNNHs$!B66#CC-I!I&%I&c$	t|pt|}|rV|\}}|d|||dz||dz}nn|S)aExpand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    TrrN)rrrspanrr)srrbegrs     rexpand_makefile_varsrs""tjat	jt|r6g}|D]/}|t|0|StS)aWith no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    )rrrcopyradd_ext_suffixappendr)argsvalsr?s   rrr
s 0227799!,///	0	0DKK((..////rc|dkr ddl}|dtdt|S)zReturn the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    SOrNz SO is deprecated, use EXT_SUFFIXr7)warningswarnDeprecationWarningrr)r?rs  rrVrV%sH
t||

8:LaPPP  &&&r)rN)rrNr)?__doc__rrer8rrrrr5r
_functoolsrbuiltin_module_namesrKrrWr)r*exec_prefixrrbase_prefixr+base_exec_prefixr=rabspathr2
executabledirnamegetcwdrrsr1r#r?r/r4rUr_abiflagsAttributeErrorr:rErQrLrMrNrerkrurrrrcompilerrrrrrrrVr3rrrs		
							



******!!!!!!
0
0
		#*	%	%gs//gs//7##C$899
RZ''7??2:.D#EFFLL
~#wrws~'F'FGG!ry{{RRR
GC$''	GGG7d??  Y  <--LY''I///}	#l				D	***::::.
$
$
$ DDD.777	+	+	+8883
3
3
3
lY5Y5Y5x	1	1	1---
0000rz?@@rz:;;rz899j
j
j
j
Z


20	'	'	'	'	's:	FFFPK{5ZjZn,,MLib/site-packages/setuptools/_distutils/__pycache__/text_file.cpython-311.pycnuW+A

b;d@/,dZddlZGddZdS)ztext_file

provides the TextFile class, which gives an interface to text files
that (optionally) takes care of stripping comments, ignoring blank
lines, and joining lines with backslashes.NcdeZdZdZddddddddZddZdZd	Zdd
ZddZ	ddZ
d
ZdZdZ
dS)TextFileaeProvides a file-like object that takes care of all the things you
    commonly want to do when processing a text file that has some
    line-by-line syntax: strip comments (as long as "#" is your
    comment character), skip blank lines, join adjacent lines by
    escaping the newline (ie. backslash at end of line), strip
    leading and/or trailing whitespace.  All of these are optional
    and independently controllable.

    Provides a 'warn()' method so you can generate warning messages that
    report physical line number, even if the logical line in question
    spans multiple physical lines.  Also provides 'unreadline()' for
    implementing line-at-a-time lookahead.

    Constructor is called as:

        TextFile (filename=None, file=None, **options)

    It bombs (RuntimeError) if both 'filename' and 'file' are None;
    'filename' should be a string, and 'file' a file object (or
    something that provides 'readline()' and 'close()' methods).  It is
    recommended that you supply at least 'filename', so that TextFile
    can include it in warning messages.  If 'file' is not supplied,
    TextFile creates its own using 'io.open()'.

    The options are all boolean, and affect the value returned by
    'readline()':
      strip_comments [default: true]
        strip from "#" to end-of-line, as well as any whitespace
        leading up to the "#" -- unless it is escaped by a backslash
      lstrip_ws [default: false]
        strip leading whitespace from each line before returning it
      rstrip_ws [default: true]
        strip trailing whitespace (including line terminator!) from
        each line before returning it
      skip_blanks [default: true}
        skip lines that are empty *after* stripping comments and
        whitespace.  (If both lstrip_ws and rstrip_ws are false,
        then some lines may consist of solely whitespace: these will
        *not* be skipped, even if 'skip_blanks' is true.)
      join_lines [default: false]
        if a backslash is the last non-newline character on a line
        after stripping comments and whitespace, join the following line
        to it to form one "logical line"; if N consecutive lines end
        with a backslash, then N+1 physical lines will be joined to
        form one logical line.
      collapse_join [default: false]
        strip leading whitespace from lines that are joined to their
        predecessor; only matters if (join_lines and not lstrip_ws)
      errors [default: 'strict']
        error handler used to decode the file content

    Note that since 'rstrip_ws' can strip the trailing newline, the
    semantics of 'readline()' must differ from those of the builtin file
    object's 'readline()' method!  In particular, 'readline()' returns
    None for end-of-file: an empty string might just be a blank line (or
    an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is
    not.rstrict)strip_commentsskip_blanks	lstrip_ws	rstrip_ws
join_lines
collapse_joinerrorsNc||td|jD]:}||vrt||||t|||j|;|D]}||jvrt	d|z|||n||_||_d|_g|_	dS)zConstruct a new TextFile object.  At least one of 'filename'
        (a string) and 'file' (a file-like object) must be supplied.
        They keyword argument options are described above and affect
        the values returned by 'readline()'.Nz7you must supply either or both of 'filename' and 'file'zinvalid TextFile option '%s'r)
RuntimeErrordefault_optionskeyssetattrKeyErroropenfilenamefilecurrent_linelinebuf)selfrroptionsopts     nE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/text_file.py__init__zTextFile.__init__Os
I
',,..	>	>Cg~~c73<0000c4#7#<====<<>>	E	EC$...=CDDD/<IIh$DMDI !D
cb||_t|j|j|_d|_dS)zvOpen a new file named 'filename'.  This overrides both the
        'filename' and 'file' arguments to the constructor.)r
rN)rrr
rr)rrs  rrz
TextFile.openrs1!
t{;;;	rcf|j}d|_d|_d|_|dS)zfClose the current file and forget everything we know about it
        (filename, current line number).N)rrrclose)rrs  rr!zTextFile.closeys2y	
 

rctg}||j}||jdzt|tt
fr&|dt|zn|d|z|t
|d|S)Nz, z
lines %d-%d: z	line %d: )rappendr
isinstancelisttuplestrjoin)rmsglineoutmsgs    r	gen_errorzTextFile.gen_errors<$D

dmd*+++dT5M**	.MM/E$KK78888MM+,---

c#hhwwvrcNtd|||z)Nzerror: )
ValueErrorr-rr*r+s   rerrorzTextFile.errors#T^^C%>%>>???rcxtjd|||zdzdS)aPrint (to stderr) a warning message tied to the current logical
        line in the current file.  If the current logical line in the
        file spans multiple physical lines, the warning refers to the
        whole range, eg. "lines 3-5".  If 'line' supplied, it overrides
        the current line number; it may be a list or tuple to indicate a
        range of physical lines, or an integer for a single physical
        line.z	warning: 
N)sysstderrwriter-r0s   rwarnz
TextFile.warns8	
t~~c4'@'@@4GHHHHHrc|jr|jd}|jd=|Sd}	|j}|dkrd}|jr|r~|d}|dkrnb|dks||dz
dkr7|dd	krd	pd}|d||z}|dkrn|d
d}|jr|r||d|S|j	r|
}||z}t|jtr|jddz|jd<nZ|j|jdzg|_nC|dSt|jtr|jddz|_n|jdz|_|jr|jr|}n7|jr|
}n|jr|}|dks|d	kr	|jr|jr5|ddkr|dd}|ddd
kr|ddd	z}#|S)a=Read and return a single logical line from the current file (or
        from an internal buffer if lines have previously been "unread"
        with 'unreadline()').  If the 'join_lines' option is true, this
        may involve reading multiple physical lines concatenated into a
        single string.  Updates the current line number, so calling
        'warn()' after 'readline()' emits a warning about the physical
        line(s) just read.  Returns None on end-of-file, since the empty
        string can occur if 'rstrip_ws' is true but 'strip_blanks' is
        not.r#TN#rr\r3z\#z2continuation line immediately precedes end-of-filez\
)rrreadlinerfindstripreplacerr7rlstripr%rr&r	r
rstripr)rr+buildup_lineposeols     rr=zTextFile.readlines<	<#DR K_	9%%''Drzz"$
4t$
4iinn"99AXXcAg$!6!6 8t+5;C#;,Dzz||r)) * <<s33D
><
><IIUVVV''%);;==D#d*d/66S+/+(,(9!(rPsV..


U"U"U"U"U"U"U"U"U"U"rPK{5ZaHLib/site-packages/setuptools/_distutils/__pycache__/dist.cpython-311.pycnuW+A

`;d
dZddlZddlZddlZddlZddlZddlmZ	ddlZn
#e	$rdZYnwxYwddl
mZmZm
Z
mZddlmZmZddlmZmZmZddlmZddlmZejd	Zd
ZGddZGd
dZdZdS)z}distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
N)message_from_file)DistutilsOptionErrorDistutilsModuleErrorDistutilsArgErrorDistutilsClassError)FancyGetopttranslate_longopt)
check_environ	strtobool
rfc822_escapelog)DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$ct|trnrt|ts]t|j}d}|jdit
}tjtj|t|}|S)Nz>Warning: '{fieldname}' should be a list, got type '{typename}')	
isinstancestrlisttype__name__formatlocalsrWARN)value	fieldnametypenamemsgs    iE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/dist.py_ensure_listr%s}%
	

t
$
$;;'Ncj$$688$$#ULc"eZdZdZgdZdZgdZdeDZddiZd+d	Z	d
Z
d,dZd
ZdZ
d+dZdZdZdZdZddgfdZdZdZdZdZdZdZd-dZd+dZd.dZejfd Zd!Z d"Z!d#Z"d$Z#d%Z$d&Z%d'Z&d(Z'd)Z(d*Z)dS)/DistributionaThe core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.

    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    ))verbosevzrun verbosely (default))quietqz!run quietly (turns verbosity off))zdry-runnzdon't actually do anything)helphzshow detailed help message)zno-user-cfgNz-ignore pydistutils.cfg in your home directoryzCommon commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
))z
help-commandsNzlist all available commands)nameNzprint package name)versionVzprint package version)fullnameNzprint -)authorNzprint the author's name)author-emailNz print the author's email address)
maintainerNzprint the maintainer's name)zmaintainer-emailNz$print the maintainer's email address)contactNz7print the maintainer's name if known, else the author's)z
contact-emailNz@print the maintainer's email address if known, else the author's)urlNzprint the URL for this package)licenseNz print the license of the package)licenceNzalias for --license)descriptionNzprint the package description)zlong-descriptionNz"print the long package description)	platformsNzprint the list of platforms)classifiersNzprint the list of classifiers)keywordsNzprint the list of keywords)providesNz+print the list of packages/modules provided)requiresNz+print the list of packages/modules required)	obsoletesNz0print the list of packages/modules made obsoletec8g|]}t|dSrr	).0xs  r
zDistribution.ws%MMM-ad33MMMr r&r#Nc	d|_d|_d|_|jD]}t	||dt|_|jjD]+}d|z}t	||t|j|,i|_	d|_
d|_d|_i|_
g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|r|d}|S|d=|D];\}}| |}|D]\}	}
d|
f||	<
>*Wk#33G<>
c)7(=

>E!!#(#3i )$R'M#&&&&J$$S4Z000$kkmm	
'	
'
c4=&3,77'8GDM6C<88====T]C00'DM34444T3'''D#s++++;d3iiGCM#&&&&"''

~~c**E/))).D&E*	
r cV|j|}|ix}|j|<|S)zGet the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        )rUrf)rsrxdicts   rrhzDistribution.get_option_dicts6#''00<355D4'0r rEcddlm}|&t|j}||||z|dz}|s||dzdS|D]}|j|}|||d|zz:||d|zz||}|dD]}||dz|zdS)Nr)pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:rG)pprintrsortedrUkeysannouncerfsplit)	rsheadercommandsindentrcmd_namerzoutlines	         rdump_option_dictszDistribution.dump_option_dicts's=""""""d27799::HMM&6/***d]F	MM&#::;;;F 	8	8H+//99H

f'H8'SSTTTT

f'F'QQRRRgh''IIdOO88DMM&4-$"677778	8	8r ctd|D}tr+|dd|z|S)aFind as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).

        There are multiple possible config files:
        - distutils.cfg in the Distutils installation directory (i.e.
          where the top-level Distutils __inst__.py file lives)
        - a file in the user's home directory named .pydistutils.cfg
          on Unix and pydistutils.cfg on Windows/Mac; may be disabled
          with the ``--no-user-cfg`` option
        - setup.cfg in the current directory
        - a file named by an environment variable
        cjg|]0}tj|!t|1Sr)ospathisfiler)r@rs  rrBz2Distribution.find_config_files..Qs1QQQtBGNN4>>>>	?	?	?	?	?	?	?	?	?	?	?	?	?	?	?	?	?	?s1)C''C+.C+cddlm}tjtjkrgd}ng}t|}||}tr|d|}|D]}tr|d|z|	||
D]n}||}||}|D]?}	|	dkr7|	|vr3|
||	}
|	dd}	||
f||	<@o|d	|jvr|jd	D]\}	\}}
|j
|	}	|r t'||t)|
n4|	d
vrt'||	t)|
nt'||	|
z#t*$r}
t-|
d}
~
wwxYwdSdS)Nr)ConfigParser)
zinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-datarzexec-prefixhomeuserrootz"Distribution.parse_config_files():z  reading %srrI_global)r#rJ)configparserrrkrbase_prefix	frozensetrrrreadsectionsrFrhrfreplacerrUrgnegative_optrLr
ValueErrorr)rs	filenamesrignore_optionsparserrsectionrFrzr{r|srcaliasrs              rparse_config_fileszDistribution.parse_config_filesjso------:((NN  N">22..00I	@MM>???!		H
9

nx7888KK!!!!??,,
8
8 ..11//88"88Cj((S-F-F$jj#66!kk#s33)13
	8
OO
t+++%)%9(%C%I%I%K%K

4

4!jsC)--c2240e3-?@@@@ 666c9S>>::::c3///!444.s3334,+

4

4sAG%%
H/G>>Hcl|}g|_t||jz}||j|ddi||j|}|	}tj|j|
|rdS|r|||}|dS||jr5||t#|jdk|jdS|jst%ddS)	aParse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        r5r4)argsobjectNrdisplay_optionsrzno commands suppliedT)_get_toplevel_optionsrrrset_negative_aliasesrset_aliasesgetoptrTget_option_orderr
set_verbosityr#handle_display_options_parse_command_optsr)
_show_helplenr)rstoplevel_optionsrroption_orders     rparse_command_linezDistribution.parse_command_linesW. 5577
-0DDEE##D$5666Iy1222}}$"24}@@..00$,'''&&|44	F	++FD99D|	9	OODM(:(:a(?$-




F}	<#$:;;;tr c|jdgzS)zReturn the non-display options recognized at the top level.

        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        )zcommand-packages=Nz0list of packages that provide distutils commands)global_optionsrss rrz"Distribution._get_toplevel_optionss"
&

	
r cddlm}|d}t|st	d|z|j|	||}n!#t$r}t|d}~wwxYwt||std|zt|drt|jtsd}t||z|j}t|dr.|}||jt|d	r/t|jtrt)|j}ng}||j|jz|z||||d
d\}}	t|	dr"|	jr||d|gdSt|d	rt|jtrjd}
|jD]\\}}}
}t|	||r2d
}
t9|r|Ftd
|d|d]|
rdS||}t=|	D]\}}d|f||<
|S)aParse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        rCommandzinvalid command name '%s'Nz&command class %s must subclass Commanduser_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)rhelp_optionsr%r)rzinvalid help function z for help option 'z-': must be a callable object (function, etc.)zcommand line) 
distutils.cmdr
command_rematch
SystemExitrappendget_command_classrr
issubclassrrnrrrrcopyupdaterfix_help_optionsset_option_tablerrrr)r
get_attr_namecallablerhvarsrg)rsrrrrx	cmd_classrrroptshelp_option_foundhelp_optionshortdescfuncrzr+rs                  rrz Distribution._parse_command_optss]	*)))))q'((	D87BCCC
W%%%
	)..w77II#	)	)	)#C(((	)
)W--	%89D

I~..	791488	7
>
&cIo666(9n--	8',,..L	 67779n--	*"D3
3
	,I,BCCLLL	)"88<G	
	
	
	##L111}}T!""X..t4  	TY	OOFAOLLLF9n--	*"D3
3
	!"4=4J



0eT44!5!5k!B!BCC	()%~~11 $tt[[[2	!
''00!$ZZ--//	5	5MT5,e4HTNNsA,,
B
6BB
cdD]d}t|j|}|t|tr5d|dD}t|j||edS)zSet final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        r9r7Nc6g|]}|Srstrip)r@elms  rrBz1Distribution.finalize_options..ls AAAAAAr ,)rPrNrrrrL)rsrurs   rrrzDistribution.finalize_optionsbs|
.	4	4DDM400E}%%%
4AAC0@0@AAA
tU333
	4	4r r%chddlm}ddlm}|r_|r|}n|j}||||jdztd|r>||j
|dtd|jD]}t|trt||r|}	n||}	t!|	drJt|	jt$r0||	jt)|	jzn||	j|d|	jztdt||jd	S)
abShow help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.

        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        r	gen_usagerz
Global options:rEzKInformation display options (just display information, ignore any commands)rzOptions for '%s' command:N)distutils.corerrrrrr
print_helpcommon_usageprintrrrrrrrnrrrrrrS)
rsrrrrrrrFrxklasss
          rrzDistribution._show_helpos	-,,,,,))))))	
.4466-##G,,,d/2EEFFF"III	##D$89996



"III}		G'4((
8Z-I-I
8..w77un--
<*U=OQU2V2V
<''&)9%:L)M)MM''(:;;;9ENJKKK"IIII
ii())*****r c0ddlm}|jrB|t	dt	||jdSd}i}|jD]
}d||d<|D]\}}|r||rt|}t|j
d|z}|dvr#t	d|n6|dvr#t	d	|nt	|d}|S)
zIf there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        rrrEr%rDrr)r8r:r;r<rG)rr
help_commandsprint_commandsrrSrrfr	rPrNr)	rsrrany_display_optionsis_display_optionoptionr{r|rs	         rrz#Distribution.handle_display_optionssU	-,,,,,
	!!!"III))D,--...1
 *	-	-F+,fQi((&
	(
	(JS#	
((,,S11	
(',,<
v|<<>>333#((5//****PPP$))E**++++%LLL&'#""r ct|dz|D]c}|j|}|s||}	|j}n#t
$rd}YnwxYwtd|||fzddS)zZPrint a subset of the list of all commands -- used by
        'print_commands()'.
        :(no description available)z
  %-*s  %sN)rrQrfrr6AttributeError)rsrr
max_lengthcmdrr6s       rprint_command_listzDistribution.print_command_lists	fsl		A		ACM%%c**E
4..s33
;#/!
;
;
;:
;
,*c;!??@@@@		A		As	AA A cddl}|jj}i}|D]}d||<g}|jD],}||s||-d}||zD]$}t||krt|}%||d||r't||d|dSdS)anPrint out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        rNr%zStandard commandszExtra commands)
distutils.commandrx__all__rQrrfrrrr)rsrstd_commandsis_stdrextra_commandsr
s       rrzDistribution.print_commandss	!    (0		CF3KK=%%''	+	+C::c??
+%%c***
.0	&	&C3xx*$$ XX
.A:NNN	RGGG##N4DjQQQQQ	R	Rr cddl}|jj}i}|D]}d||<g}|jD],}||s||-g}||zD]e}|j|}|s||}	|j}n#t$rd}YnwxYw|||ff|S)a>Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        rNr%r)
rrxrrQrrfrrr6r	)	rsrrrrrrvrr6s	         rget_command_listzDistribution.get_command_lists	!    (0		CF3KK=%%''	+	+C::c??
+%%c***
.0	*	*CM%%c**E
4..s33
;#/!
;
;
;:
;IIsK())))	s B((B76B7c|j}t|tsD|d}d|dD}d|vr|dd||_|S)z9Return a list of packages from which commands are loaded.NrEcBg|]}|dk|S)rEr)r@pkgs  rrBz5Distribution.get_command_packages.. s%HHHCcRiiCIIKKiiir rzdistutils.commandr)rRrrrinsert)rspkgss  rget_command_packagesz!Distribution.get_command_packagessp$$%%	)|HH4::c??HHHD"$..A2333$(D!r c|j|}|r|S|D]}d||}|}	t	|t
j|}n#t$rYIwxYw	t||}n'#t$rtd|d|d|dwxYw||j|<|cStd|z)aoReturn the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.

        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        z{}.{}zinvalid command 'z
' (no class 'z
' in module 'z')zinvalid command '%s')rQrfrr
__import__rkrImportErrorrPr	r)rsrxrpkgnamemodule_name
klass_namemodules       rrzDistribution.get_command_class&s#
!!'**	L0022		G!..'::K J
;'''[1





33!


**ww


KKK9
&+DM'"LLL"#9G#CDDDs!A00
A=<A=B$B6cL|j|}|s|rtr|d|z||}||x}|j|<d|j|<|j|}|r||||S)aReturn the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        z.}s!WWWa.q11WWWr z	error in z: command 'z' has no such option '')get_command_namerhrrrgrboolean_optionsr	rrrrLrrnrr)rsrdoption_dictcommand_namersourcer	bool_optsneg_opt	is_stringrs           rr$z!Distribution._set_command_optionsjs#3355..|<N>N:NOOOOy((Y(K51A1ABBBB[&11K7777..!66<<<9
0
0
0*3///
03	0	0s=B,,B;:B;?CCCB!E==
FFFrcnddlm}t||s|}||}n|}|js|S|d|_d|j|<|||r-|	D]}|
|||S)aReinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.

        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.

        Returns the reinitialized command object.
        rr)rrrr'r,	finalizedinitialize_optionsrer$get_sub_commandsreinitialize_command)rsrxreinit_subcommandsrr/subs      rr8z!Distribution.reinitialize_commands&	*)))))'7++	6"L**<88GG"3355L 	N""$$$&'
l#!!'***	C//11
C
C))#/ABBBBr c0tj||dSNr
)rsrlevels   rrzDistribution.announcessr cD|jD]}||dS)zRun each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        N)rrun_command)rsrs  rrun_commandszDistribution.run_commandss6
=	"	"CS!!!!	"	"r c|j|rdStjd|||}||d|j|<dS)aDo whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        Nz
running %sr%)rerfrinfor'ensure_finalizedrun)rsrxr&s   rr?zDistribution.run_commandsw=W%%	Fw'''&&w//  """


!"
gr cDt|jp|jpgdkSNr)rrWrZrs rhas_pure_moduleszDistribution.has_pure_moduless#4=9DO9r::Q>>r c@|jot|jdkSrF)r]rrs rhas_ext_moduleszDistribution.has_ext_moduless =C(8$9$9A$==r c@|jot|jdkSrF)r[rrs rhas_c_librarieszDistribution.has_c_librariess~9#dn"5"5"99r cR|p|Sr<)rGrIrs rhas_moduleszDistribution.has_moduless%$$&&@$*>*>*@*@@r c@|jot|jdkSrF)r\rrs rhas_headerszDistribution.has_headers|5DL 1 1A 55r c@|jot|jdkSrF)rarrs rhas_scriptszDistribution.has_scriptsrPr c@|jot|jdkSrF)rbrrs rhas_data_fileszDistribution.has_data_filess;3t#7#7!#;;r c~|o)|o|Sr<)rGrIrKrs ris_purezDistribution.is_puresD!!##
+((***
+((***	
r r<)NNrE)r%r>)*r
__module____qualname____doc__rrrrKrrrhrrrrrrrrrrrrrrrrr'r$r8rINFOrr@r?rGrIrKrMrOrRrTrVrr rr"r"4s*NLO6NM_MMMY'L\ \ \ \ |			88884.???$@4@4@4@4HAAAF


aaaF444121r0+0+0+0+d%#%#%#NAAA"RRR<F


%E%E%EN:)0)0)0)0V&&&&T#&("""###(???>>>:::AAA666666<<<




r r"ceZdZdZdZd#dZdZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZdZdZdZdZdZeZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$dS)$rMz]Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    )r+r,r/author_emailr1maintainer_emailr3r4r6long_descriptionr9r7r.r2
contact_emailr8download_urlr:r;r<Nc@|$|t|dSd|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_dSr<)
read_pkg_fileopenr+r,r/r\r1r]r3r4r6r^r9r7r8r`r:r;r<)rsrs  rrzDistributionMetadata.__init__!stDzz*****DIDLDK $D"DO$(D!DHDL#D$(D! DM!DN#D $D DM DM!DNNNr ct|fd}fd}d}|d|_|d|_|d|_|d|_d|_|d	|_d|_|d
|_|d|_	dvr|d|_
nd|_
|d
|_|d|_dvr#|dd|_
|d|_|d|_|dkr2|d|_|d|_|d|_dSd|_d|_d|_dS)z-Reads the metadata values from a file object.c0|}|r|dkr|SdSdSNUNKNOWNr)r+rrs  r_read_fieldz7DistributionMetadata.read_pkg_file.._read_field<s3IE
)++

++r cD|d}|gkrdS|Sr<)get_all)r+valuesrs  r
_read_listz6DistributionMetadata.read_pkg_file.._read_listAs)[[t,,F||tMr zmetadata-versionr+r,summaryr/Nr0z	home-pager4zdownload-urlr6r9rplatform
classifier1.1r;r:r<)rr+r,r6r/r1r\r]r3r4r`r^rr9r7r8r;r:r<)rsfilerhrlmetadata_versionrs     @rrbz"DistributionMetadata.read_pkg_file8s%%					
					12K''	"{9--&;y11!k(++'K77 $;{++"{9--S   +N ; ;D $D +M : :&;y11'K
3399#>>DM#J//%:l33u$$&Jz22DM&Jz22DM'Z44DNNN DM DM!DNNNr cttj|ddd5}||ddddS#1swxYwYdS)z.Write the PKG-INFO file into the release tree.zPKG-INFOwzUTF-8)encodingN)rcrrrwrite_pkg_file)rsbase_dirpkg_infos   rwrite_pkg_infoz#DistributionMetadata.write_pkg_infoks
GLL:..g


	*
)))	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*sAAAcd}|js|js|js|js|jrd}d|zd|zd|zfd}|d||d|	|d	|
|d
||d||d|j|d
t|pd|dd||d||d||d||d||d|dS)z0Write the PKG-INFO format data to a file object.z1.0rpzMetadata-Version: %s
z	Name: %s
zVersion: %s
cF|r|d|ddSdS)Nz: rG)rm)rr|rqs  rmaybe_writez8DistributionMetadata.write_pkg_file..maybe_writes>
1

f/////00000
1
1r Summaryz	Home-pageAuthorzAuthor-emailLicensezDownload-URLDescriptionrEKeywordsrPlatform
ClassifierRequiresProvides	ObsoletesN)r:r;r<r8r`rmget_nameget_versionget_descriptionget_urlget_contactget_contact_emailget_licenserget_long_descriptionrget_keywords_write_list
get_platformsget_classifiersget_requiresget_provides
get_obsoletes)rsrqr,r|s `  rrvz#DistributionMetadata.write_pkg_filersyM	}	~			
 	G	

+g5666

<$--//1222

?T%5%5%7%77888	1	1	1	1	1
	It3355666K000Hd..00111ND$:$:$<$<===It//11222ND$5666M=1J1J1L1L1RPR#S#STTTJ):):)<)< = =>>>z4+=+=+?+?@@@|T-A-A-C-CDDD	
z4+<+<+>+>???z4+<+<+>+>???{D,>,>,@,@AAAAAr cj|pg}|D]+}|d||,dS)Nz{}: {}
)rmr)rsrqr+rkrs     rrz DistributionMetadata._write_listsI2	7	7EJJz((u556666	7	7r c|jpdSrf)r+rs rrzDistributionMetadata.get_namesy%I%r c|jpdS)Nz0.0.0)r,rs rrz DistributionMetadata.get_versions|&w&r cvd||S)Nz{}-{})rrrrs rget_fullnamez!DistributionMetadata.get_fullnames*~~dmmoot/?/?/A/ABBBr c|jSr<)r/rs r
get_authorzDistributionMetadata.get_authors
{r c|jSr<)r\rs rget_author_emailz%DistributionMetadata.get_author_email  r c|jSr<)r1rs rget_maintainerz#DistributionMetadata.get_maintainers
r c|jSr<)r]rs rget_maintainer_emailz)DistributionMetadata.get_maintainer_email$$r c|jp|jSr<)r1r/rs rrz DistributionMetadata.get_contacts-$+-r c|jp|jSr<)r]r\rs rrz&DistributionMetadata.get_contact_emails$9(99r c|jSr<)r3rs rrzDistributionMetadata.get_urls	xr c|jSr<)r4rs rrz DistributionMetadata.get_licenses
|r c|jSr<)r6rs rrz$DistributionMetadata.get_descriptionsr c|jSr<)r^rs rrz)DistributionMetadata.get_long_descriptionrr c|jpgSr<)r9rs rrz!DistributionMetadata.get_keywords}""r c0t|d|_dS)Nr9)rr9rsrs  rset_keywordsz!DistributionMetadata.set_keywordss$UJ77


r c|jSr<)r7rs rrz"DistributionMetadata.get_platformss
~r c0t|d|_dS)Nr7)rr7rs  r
set_platformsz"DistributionMetadata.set_platformss%e[99r c|jpgSr<)r8rs rrz$DistributionMetadata.get_classifierss%2%r c0t|d|_dS)Nr8)rr8rs  rset_classifiersz$DistributionMetadata.set_classifierss'}==r c|jSr<)r`rs rget_download_urlz%DistributionMetadata.get_download_urlrr c|jpgSr<)r;rs rrz!DistributionMetadata.get_requiresrr ctddl}|D]}|j|t||_dSrF)distutils.versionpredicateversionpredicateVersionPredicaterr;rsrrr$s    rset_requiresz!DistributionMetadata.set_requiressH))))	;	;A&77::::U


r c|jpgSr<)r:rs rrz!DistributionMetadata.get_providesrr crd|D}|D] }ddl}|j|!||_dS)Nc6g|]}|Srr)r@r$s  rrBz5DistributionMetadata.set_provides..s ***q***r r)rrsplit_provisionr:)rsrr$rs    rset_providesz!DistributionMetadata.set_providessU**E***	:	:A----&66q9999


r c|jpgSr<)r<rs rrz"DistributionMetadata.get_obsoletess~##r ctddl}|D]}|j|t||_dSrF)rrrrr<rs    r
set_obsoletesz"DistributionMetadata.set_obsoletessH))))	;	;A&77::::er r<)%rrWrXrYrOrrbryrvrrrrrrrrrrrrget_licencerrrrrrrrrrrrrrrrr rrMrMs0"""".1"1"1"f***%B%B%BN777&&&'''CCC!!!%%%...:::K   %%%###888:::&&&>>>!!!###$$$###$$$%%%%%r rMcNg}|D]}||dd |S)zConvert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    r)r)rFnew_options
help_tuples   rrrs=K,,
:ac?++++r ) rYrkrrerremailrrirdistutils.errorsrrrrdistutils.fancy_getoptrr	distutils.utilr
rrrrdistutils.debugrcompilerrr"rMrrr rrs


								######OOOOHHHBAAAAAAABBBBBBBBBB!!!!!!RZ4
5
5
F
F
F
F
F
F
F
F
`x%x%x%x%x%x%x%x%vs#--PK{5Z{PPQLib/site-packages/setuptools/_distutils/__pycache__/_macos_compat.cpython-311.pycnuW+A

`;ddddlZddlZdZejdkrejdjZdSeZdS)Nc|S)N)cmdargss  rE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/_macos_compat.pybypass_compiler_fixuprsJdarwin_osx_support)sys	importlibrplatform
import_modulecompiler_fixuprr	rrsZ



<8,Y,^<<KNNN*NNNr	PK{5Z`
LLib/site-packages/setuptools/_distutils/__pycache__/dep_util.cpython-311.pycnuW+A

`;d_
2dZddlZddlmZdZdZddZdS)	zdistutils.dep_util

Utility functions for simple, timestamp-based dependency of files
and groups of files; also, function based entirely on such
timestamp dependency analysis.N)DistutilsFileErrorc`tj|s/tdtj|ztj|sdSddlm}tj||}tj||}||kS)aReturn true if 'source' exists and is more recently modified than
    'target', or if 'source' exists and 'target' doesn't.  Return false if
    both exist and 'target' is the same age or younger than 'source'.
    Raise DistutilsFileError if 'source' does not exist.
    zfile '%s' does not existrST_MTIME)ospathexistsrabspathstatr)sourcetargetrmtime1mtime2s     mE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/dep_util.pynewerrs7>>&!!W !;bgoof>U>U!UVVV
7>>&!!q
WV__X
&F
WV__X
&FF?cRt|t|krtdg}g}tt|D]T}t||||r6||||||U||fS)zWalk two filename lists in parallel, testing if each source is newer
    than its corresponding target.  Return a pair of lists (sources,
    targets) where source is newer than target, according to the semantics
    of 'newer()'.
    z+'sources' and 'targets' must be same length)len
ValueErrorrangerappend)sourcestargets	n_sources	n_targetsis     rnewer_pairwiser!s7||s7||##FGGGII
3w<<
 
 ))WQZ((	)WQZ(((WQZ(((y!!rerrorcDtj|sdSddlm}tj||}|D][}tj|s|dkrn|dkr/|dkrdStj||}||krdS\dS)aReturn true if 'target' is out-of-date with respect to any file
    listed in 'sources'.  In other words, if 'target' exists and is newer
    than every file in 'sources', return false; otherwise return true.
    'missing' controls what we do when a source file is missing; the
    default ("error") is to blow up with an OSError from inside 'stat()';
    if it is "ignore", we silently drop any missing source files; if it is
    "newer", any missing source files make us assume that 'target' is
    out-of-date (this is handy in "dry-run" mode: it'll make you pretend to
    carry out commands that wouldn't work because inputs are missing, but
    that doesn't matter because you're not actually going to run the
    commands).
    rrrrignorer)rr	r
rr)rrmissingrtarget_mtimer
source_mtimes       rnewer_groupr%8s7>>&!!q76??8,L

w~~f%%	'!!H$$G##qqwvx0,&&11'qr)r)__doc__rdistutils.errorsrrrr%rrr)sh""
			//////,""".%%%%%%rPK{5ZYNLib/site-packages/setuptools/_distutils/__pycache__/py38compat.cpython-311.pycnuW+A

`;ddZdS)c	ddl}|S#t$rYnwxYwd|||S)Nz{}-{}.{})_aix_supportaix_platformImportErrorformat)osnameversionreleasers    oE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/py38compat.pyrrs]
((***



VWg666s
''N)rrrs77777r
PK{5ZYYTLib/site-packages/setuptools/_distutils/__pycache__/versionpredicate.cpython-311.pycnuW+A

b;ddZddlZddlZddlZejdejZejdZejdZ	dZ
ejejej
ejejejdZGdd	Zdad
ZdS)zBModule for parsing and testing package version predicate strings.
Nz'(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)z^\s*\((.*)\)\s*$z%^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$c>t|}|std|z|\}}tj5tj|}dddn#1swxYwY||fS)zVParse a single version comparison.

    Return (comparison string, StrictVersion)
    z"bad package restriction syntax: %rN)re_splitComparisonmatch
ValueErrorgroups	distutilsversionsuppress_known_deprecation
StrictVersion)predrescompverStrothers     uE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/versionpredicate.pysplitUprs

"
"4
(
(CF=DEEE::<z>=z!=c$eZdZdZdZdZdZdS)VersionPredicateaParse and test package version predicates.

    >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)')

    The `name` attribute provides the full dotted name that is given::

    >>> v.name
    'pyepat.abc'

    The str() of a `VersionPredicate` provides a normalized
    human-readable version of the expression::

    >>> print(v)
    pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3)

    The `satisfied_by()` method can be used to determine with a given
    version number is included in the set described by the version
    restrictions::

    >>> v.satisfied_by('1.1')
    True
    >>> v.satisfied_by('1.4')
    True
    >>> v.satisfied_by('1.0')
    False
    >>> v.satisfied_by('4444.4')
    False
    >>> v.satisfied_by('1555.1b3')
    False

    `VersionPredicate` is flexible in accepting extra whitespace::

    >>> v = VersionPredicate(' pat( ==  0.1  )  ')
    >>> v.name
    'pat'
    >>> v.satisfied_by('0.1')
    True
    >>> v.satisfied_by('0.2')
    False

    If any version numbers passed in do not conform to the
    restrictions of `StrictVersion`, a `ValueError` is raised::

    >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)')
    Traceback (most recent call last):
      ...
    ValueError: invalid version number '1.2zb3'

    It the module or package name given does not conform to what's
    allowed as a legal module or package name, `ValueError` is
    raised::

    >>> v = VersionPredicate('foo-bar')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: '-bar'

    >>> v = VersionPredicate('foo bar (12.21)')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: 'bar (12.21)'

    c,|}|stdt|}|std|z|\|_}|}|rt|}|std|z|d}d|dD|_|jstd|zdSg|_dS)	z!Parse a version predicate string.zempty package restrictionzbad package name in %rzexpected parenthesized list: %rrc,g|]}t|S)r).0aPreds  r
z-VersionPredicate.__init__..|sDDDEDDD,zempty parenthesized list in %rN)	striprre_validPackagerrnamere_parensplitr)selfversionPredicateStrrparenstrs     r__init__zVersionPredicate.__init__is 27799"	:8999%%&9::	M58KKLLL <<>>	5

		NN5))E
L !BU!JKKK,,..#CDDSYYs^^DDDDI9
Y !ADW!WXXX
Y
YDIIIrc|jr4d|jD}|jdzd|zdzS|jS)Nc>g|]\}}|dzt|zS) )r')rcondvers   rrz,VersionPredicate.__str__..s+DDDYT34#:C(DDDrz (z, ))rr!join)r$seqs  r__str__zVersionPredicate.__str__sJ9	DD$)DDDC9t#diinn4s::9rcR|jD]\}}t|||sdSdS)zTrue if version is compatible with all the predicates in self.
        The parameter version must be acceptable to the StrictVersion
        constructor.  It may be either a string or StrictVersion.
        FT)rcompmap)r$r	r,r-s    rsatisfied_byzVersionPredicate.satisfied_bys@
		ID#4=#..
uu
trN)__name__
__module____qualname____doc__r(r1r4rrrrr(sL>>@2rrcttjdtja|}t|}|st
d|z|dpd}|rUtj	
5tj	|}dddn#1swxYwY|d|fS)a9Return the name and optional version number of a provision.

    The version number, if given, will be returned as a `StrictVersion`
    instance, otherwise it will be `None`.

    >>> split_provision('mypkg')
    ('mypkg', None)
    >>> split_provision(' mypkg( 1.2 ) ')
    ('mypkg', StrictVersion ('1.2'))
    Nz=([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$z"illegal provides specification: %r)
_provision_rxrecompileASCIIrrrgrouprr	r
r)valuemr-s   rsplit_provisionrCs
Lbh



KKMMEE""AG=EFFF
''!**
C
7


9
9
;
;	7	7#11#66C	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7771::s?s  CCC)r8r=distutils.versionroperatorr>r?r r"rrltleeqgtgener3rr<rCrrrrLs				"*GRR2:)**RZ HII

+
+	
+
+
iiiiiiiiX
rPK{5ZDDMLib/site-packages/setuptools/_distutils/__pycache__/ccompiler.cpython-311.pycnuW+A

`;d	dZddlZddlZddlZddlmZmZmZmZm	Z	ddl
mZddlm
Z
ddlmZddlmZddlmZmZdd	lmZGd
dZdZdd
ZddddddZdZddZdZdZdS)zdistutils.ccompiler

Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model.N)CompileError	LinkErrorUnknownFileErrorDistutilsPlatformErrorDistutilsModuleError)spawn)	move_file)mkpath)newer_group)split_quotedexecute)logcPeZdZdZdZdZdZdZdZdZ	dZ
dZddddddZgdZ
gZ	gZ	dDd	Zd
ZdZdZd
ZdEdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dEdZ$dZ%dZ&d Z'd!Z(					dFd"Z)							dGd#Z*d$Z+	dHd%Z,d&Z-d'Z.d(Z/										dId)Z0										dId*Z1										dId+Z2								dJd,Z3d-Z4d.Z5d/Z6				dKd0Z7dLd1Z8dMd3Z9e:d4Z;d5ZdMd7Z?dMd8Z@	dNd:ZAdOd<ZBd=ZCd>ZDdPd?ZEd@ZFdAZGdQdCZHdS)R	CCompileraAbstract base class to define the interface that must be implemented
    by real compiler classes.  Also has some utility methods used by
    several compiler classes.

    The basic idea behind a compiler abstraction class is that each
    instance can be used for all the compile/link steps in building a
    single project.  Thus, attributes common to all of those compile and
    link steps -- include directories, macros to define, libraries to link
    against, etc. -- are attributes of the compiler instance.  To allow for
    variability in how individual files are treated, most of those
    attributes may be varied on a per-compilation or per-link basis.
    Ncc++objc).cz.ccz.cppz.cxxz.m)rrrrc||_||_||_d|_g|_g|_g|_g|_g|_g|_	|j
D]#}|||j
|$dSN)
dry_runforceverbose
output_dirmacrosinclude_dirs	librarieslibrary_dirsruntime_library_dirsobjectsexecutableskeysset_executable)selfrrrkeys     nE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/ccompiler.py__init__zCCompiler.__init__is
%'!#((**	<	
K		DAw$
FAAtr(c|D]~}t|trOt|dvr>t|dts|dt|dtst	d|zdzdzdS)zEnsures that every element of 'definitions' is a valid macro
        definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
        nothing if all definitions are OK, raise TypeError otherwise.
        )r5r5Nrzinvalid macro definition '%s': z.must be tuple (string,), (string, string), or z(string, None))r0tuplelenr1	TypeError)r$definitionsr8s   r&_check_macro_definitionsz"CCompiler._check_macro_definitionss
 
	
	D4''
II''#DGS11(59!W_tAw,,6E 6=FG&'	6E
	
	r(c|||}||j|=|j||fdS)a_Define a preprocessor macro for all compilations driven by this
        compiler object.  The optional parameter 'value' should be a
        string; if it is not supplied, then the macro will be defined
        without an explicit value and the exact outcome depends on the
        compiler used (XXX true? does ANSI say anything about this?)
        Nr9rappend)r$r6r3r7s    r&define_macrozCCompiler.define_macrosE
T""=AD%=)))))r(c~||}||j|=|f}|j|dS)aUndefine a preprocessor macro for all compilations driven by
        this compiler object.  If the same macro is defined by
        'define_macro()' and undefined by 'undefine_macro()' the last call
        takes precedence (including multiple redefinitions or
        undefinitions).  If the macro is redefined/undefined on a
        per-compilation basis (ie. in the call to 'compile()'), then that
        takes precedence.
        NrB)r$r6r7undefns    r&undefine_macrozCCompiler.undefine_macrosH
T""=A6"""""r(c:|j|dS)zAdd 'dir' to the list of directories that will be searched for
        header files.  The compiler is instructed to search directories in
        the order in which they are supplied by successive calls to
        'add_include_dir()'.
        N)rrCr$dirs  r&add_include_dirzCCompiler.add_include_dir!	
  %%%%%r(c$|dd|_dS)aySet the list of directories that will be searched to 'dirs' (a
        list of strings).  Overrides any preceding calls to
        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
        to the list passed to 'set_include_dirs()'.  This does not affect
        any list of standard include directories that the compiler may
        search by default.
        Nrr$dirss  r&set_include_dirszCCompiler.set_include_dirss!Gr(c:|j|dS)aAdd 'libname' to the list of libraries that will be included in
        all links driven by this compiler object.  Note that 'libname'
        should *not* be the name of a file containing a library, but the
        name of the library itself: the actual filename will be inferred by
        the linker, the compiler, or the compiler class (depending on the
        platform).

        The linker will be instructed to link against libraries in the
        order they were supplied to 'add_library()' and/or
        'set_libraries()'.  It is perfectly valid to duplicate library
        names; the linker will be instructed to link against libraries as
        many times as they are mentioned.
        N)rrC)r$libnames  r&add_libraryzCCompiler.add_librarys 	
g&&&&&r(c$|dd|_dS)zSet the list of libraries to be included in all links driven by
        this compiler object to 'libnames' (a list of strings).  This does
        not affect any standard system libraries that the linker may
        include by default.
        N)r)r$libnamess  r&
set_librarieszCCompiler.set_librariess"!!!r(c:|j|dS)a'Add 'dir' to the list of directories that will be searched for
        libraries specified to 'add_library()' and 'set_libraries()'.  The
        linker will be instructed to search for libraries in the order they
        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
        N)rrCrIs  r&add_library_dirzCCompiler.add_library_dirrLr(c$|dd|_dS)zSet the list of library search directories to 'dirs' (a list of
        strings).  This does not affect any standard library search path
        that the linker may search by default.
        N)rrOs  r&set_library_dirszCCompiler.set_library_dirs&s
!Gr(c:|j|dS)zlAdd 'dir' to the list of directories that will be searched for
        shared libraries at runtime.
        N)rrCrIs  r&add_runtime_library_dirz!CCompiler.add_runtime_library_dir-s!	
!((-----r(c$|dd|_dS)zSet the list of directories to search for shared libraries at
        runtime to 'dirs' (a list of strings).  This does not affect any
        standard search path that the runtime linker may search by
        default.
        N)rrOs  r&set_runtime_library_dirsz"CCompiler.set_runtime_library_dirs3s%)G!!!r(c:|j|dS)zAdd 'object' to the list of object files (or analogues, such as
        explicitly named library files or the output of "resource
        compilers") to be included in every link driven by this compiler
        object.
        N)r rC)r$objects  r&add_link_objectzCCompiler.add_link_object;s 	
F#####r(c$|dd|_dS)zSet the list of object files (or analogues) to be included in
        every link to 'objects'.  This does not affect any standard object
        files that the linker may include by default (such as system
        libraries).
        N)r )r$r s  r&set_link_objectszCCompiler.set_link_objectsCsqqqzr(c||||\}}}|g}||d|}t|t|ksJt||}i}	t	t|D]p}
||
}||
}t
j|d}
|t
j	|||
f|	|<q|||||	fS)z;Process arguments and decide which source files to compile.Nr)	strip_dirrr5)
_fix_compile_argsobject_filenamesr=gen_preprocess_optionsrangeospathsplitextr
dirname)r$outdirrincdirssourcesdependsextrar pp_optsbuildr7srcobjexts              r&_setup_compilezCCompiler._setup_compilePs"&"8"8"Q"Q=E''1'PP7||s7||++++(99s7||$$	$	$A!*C!*C'""3''*CKK,,---sE#JJww55r(c8|dgz}|rdg|dd<|r||dd<|S)Nz-cz-gr)r$rtdebugbeforecc_argss     r&_get_cc_argszCCompiler._get_cc_argsgs?TF"	!&GBQBK	! GBQBKr(c||j}n$t|tstd||j}n1t|t
r
||jpgz}ntd||j}nEt|t
tfrt||jpgz}ntd||jjz
}|||fS)a'Typecheck and fix-up some of the arguments to the 'compile()'
        method, and return fixed-up values.  Specifically: if 'output_dir'
        is None, replaces it with 'self.output_dir'; ensures that 'macros'
        is a list, and augments it with 'self.macros'; ensures that
        'include_dirs' is a list, and augments it with 'self.include_dirs'.
        Guarantees that the returned values are of the correct type,
        i.e. for 'output_dir' either string or None, and for 'macros' and
        'include_dirs' either list or None.
        N%'output_dir' must be a string or Nonez/'macros' (if supplied) must be a list of tuplesz6'include_dirs' (if supplied) must be a list of strings)	rr0r1r>rlistrr<r+)r$rrrs    r&rgzCCompiler._fix_compile_argspsJJJ,,	ECDDD>[FF

%
%	Ot{0b1FFMNNN,LL
tUm
4
4	V--1B1HbILLTUUU	336<//r(c||||}t|t|ksJ|ifS)a,Decide which source files must be recompiled.

        Determine the list of object files corresponding to 'sources',
        and figure out which ones really need to be recompiled.
        Return a list of all object files and a dictionary telling
        which source files can be skipped.
        )r)rhr=)r$rqrrrr s     r&
_prep_compilezCCompiler._prep_compilesE''J'GG7||s7||++++{r(ct|ttfstdt|}||j}n$t|t
std||fS)zTypecheck and fix up some arguments supplied to various methods.
        Specifically: ensure that 'objects' is a list; if output_dir is
        None, replace with self.output_dir.  Return fixed versions of
        'objects' and 'output_dir'.
        z,'objects' must be a list or tuple of stringsNr)r0rr<r>rr1)r$r rs   r&_fix_object_argszCCompiler._fix_object_argssq'D%=11	LJKKKw--JJJ,,	ECDDD$$r(c||j}nEt|ttfrt||jpgz}nt	d||j}nEt|ttfrt||jpgz}nt	d||jjz
}||j}nEt|ttfrt||jpgz}nt	d|||fS)a;Typecheck and fix up some of the arguments supplied to the
        'link_*' methods.  Specifically: ensure that all arguments are
        lists, and augment them with their permanent versions
        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
        fixed versions of all arguments.
        Nz3'libraries' (if supplied) must be a list of stringsz6'library_dirs' (if supplied) must be a list of stringsz>'runtime_library_dirs' (if supplied) must be a list of strings)rr0rr<r>rr+r)r$rrrs    r&
_fix_lib_argszCCompiler._fix_lib_argss'II
	D%=
1
1	SY4>+?R@IIQRRR,LL
tUm
4
4	V--1B1HbILLTUUU	33'#'#<  
,tUm
<
<	#'(<#=#=)/R$  S
<)=>>r(cl|jrdS|jrt||d}nt||}|S)zjReturn true if we need to relink the files listed in 'objects'
        to recreate 'output_file'.
        Tnewer)missing)rrr)r$r output_filers    r&
_need_linkzCCompiler._need_linksG:	4|
:#G['JJJ#G[99Lr(cNt|ts|g}d}t|j}|D]s}tj|\}}|j|}	|j	|}||kr|}|}d#t$rYpwxYw|S)z|Detect the language of a given file, or list of files. Uses
        language_map, and language_order to do the job.
        N)r0rr=language_orderrkrlrmlanguage_mapgetindexr*)	r$rqlangrsourcebaserxextlangextindexs	         r&detect_languagezCCompiler.detect_languages'4((	 iGD'((				F((00ID#'++C00G
.44W==e##"D$E



s0$B
B"!B"cdS)aPreprocess a single C/C++ source file, named in 'source'.
        Output will be written to file named 'output_file', or stdout if
        'output_file' not supplied.  'macros' is a list of macro
        definitions as for 'compile()', which will augment the macros set
        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
        list of directory names that will be added to the default list.

        Raises PreprocessError on failure.
        Nr{)r$rrrr
extra_preargsextra_postargss       r&
preprocesszCCompiler.preprocesss	$	
r(c		|||||||\}}	}}
}||
||}|	D]9}
	||
\}}n#t$rYwxYw||
|||||
:|	S)aK	Compile one or more source files.

        'sources' must be a list of filenames, most likely C/C++
        files, but in reality anything that can be handled by a
        particular compiler and compiler class (eg. MSVCCompiler can
        handle resource files in 'sources').  Return a list of object
        filenames, one per source filename in 'sources'.  Depending on
        the implementation, not all source files will necessarily be
        compiled, but all corresponding object filenames will be
        returned.

        If 'output_dir' is given, object files will be put under it, while
        retaining their original path component.  That is, "foo/bar.c"
        normally compiles to "foo/bar.o" (for a Unix implementation); if
        'output_dir' is "build", then it would compile to
        "build/foo/bar.o".

        'macros', if given, must be a list of macro definitions.  A macro
        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
        The former defines a macro; if the value is None, the macro is
        defined without an explicit value.  The 1-tuple case undefines a
        macro.  Later definitions/redefinitions/ undefinitions take
        precedence.

        'include_dirs', if given, must be a list of strings, the
        directories to add to the default include file search path for this
        compilation only.

        'debug' is a boolean; if true, the compiler will be instructed to
        output debug symbols in (or alongside) the object file(s).

        'extra_preargs' and 'extra_postargs' are implementation- dependent.
        On platforms that have the notion of a command-line (e.g. Unix,
        DOS/Windows), they are most likely lists of strings: extra
        command-line arguments to prepend/append to the compiler command
        line.  On other platforms, consult the implementation class
        documentation.  In any event, they are intended as an escape hatch
        for those occasions when the abstract compiler framework doesn't
        cut the mustard.

        'depends', if given, is a list of filenames that all targets
        depend on.  If a source file is older than any file in
        depends, then the source file will be recompiled.  This
        supports dependency tracking, but only at a coarse
        granularity.

        Raises CompileError on failure.
        )ryrKeyError_compile)r$rqrrrr|rrrrr rtrur~rwrvrxs                r&compilezCCompiler.compilesz;?:M:Mgw;
;
7%##GUMBB	K	KC
 :SS



MM#sC.'JJJJsA		
AAcdS)zCompile 'src' to product 'obj'.Nr{)r$rwrvrxr~rrts       r&rzCCompiler._compile\s		
r(cdS)a&Link a bunch of stuff together to create a static library file.
        The "bunch of stuff" consists of the list of object files supplied
        as 'objects', the extra object files supplied to
        'add_link_object()' and/or 'set_link_objects()', the libraries
        supplied to 'add_library()' and/or 'set_libraries()', and the
        libraries supplied as 'libraries' (if any).

        'output_libname' should be a library name, not a filename; the
        filename will be inferred from the library name.  'output_dir' is
        the directory where the library file will be put.

        'debug' is a boolean; if true, debugging information will be
        included in the library (note that on most platforms, it is the
        compile step where this matters: the 'debug' flag is included here
        just for consistency).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LibError on failure.
        Nr{)r$r output_libnamerr|target_langs      r&create_static_libzCCompiler.create_static_libbs	2	
r(
shared_objectshared_library
executablect)auLink a bunch of stuff together to create an executable or
        shared library file.

        The "bunch of stuff" consists of the list of object files supplied
        as 'objects'.  'output_filename' should be a filename.  If
        'output_dir' is supplied, 'output_filename' is relative to it
        (i.e. 'output_filename' can provide directory components if
        needed).

        'libraries' is a list of libraries to link against.  These are
        library names, not filenames, since they're translated into
        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
        directory component, which means the linker will look in that
        specific directory rather than searching all the normal locations.

        'library_dirs', if supplied, should be a list of directories to
        search for libraries that were specified as bare library names
        (ie. no directory component).  These are on top of the system
        default and those supplied to 'add_library_dir()' and/or
        'set_library_dirs()'.  'runtime_library_dirs' is a list of
        directories that will be embedded into the shared library and used
        to search for other shared libraries that *it* depends on at
        run-time.  (This may only be relevant on Unix.)

        'export_symbols' is a list of symbols that the shared library will
        export.  (This appears to be relevant only on Windows.)

        'debug' is as for 'compile()' and 'create_static_lib()', with the
        slight distinction that it actually matters on most platforms (as
        opposed to 'create_static_lib()', which includes a 'debug' flag
        mostly for form's sake).

        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
        of course that they supply command-line arguments for the
        particular linker being used).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LinkError on failure.
        NotImplementedError)r$target_descr output_filenamerrrrexport_symbolsr|rr
build_temprs              r&linkzCCompiler.linksv"!r(c
|tj|||d|||||||	|
||

dS)Nshared)lib_type)rrSHARED_LIBRARYlibrary_filename)
r$r rrrrrrr|rrrrs
             r&link_shared_libzCCompiler.link_shared_libsa	
		$!!.8!DD 	
	
	
	
	
r(c
\|tj|||||||||	|
||

dSr)rr
SHARED_OBJECT)
r$r rrrrrrr|rrrrs
             r&link_shared_objectzCCompiler.link_shared_objectsN	
		# 	
	
	
	
	
r(c|tj|||||||d|||	d|


dSr)rr
EXECUTABLEexecutable_filename)r$r output_prognamerrrrr|rrrs           r&link_executablezCCompiler.link_executables\	
		 $$_55 	
	
	
	
	
r(ct)zkReturn the compiler option to add 'dir' to the list of
        directories searched for libraries.
        rrIs  r&library_dir_optionzCCompiler.library_dir_option!
"!r(ct)zsReturn the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        rrIs  r&runtime_library_dir_optionz$CCompiler.runtime_library_dir_option'rr(ct)zReturn the compiler option to add 'lib' to the list of libraries
        linked into the shared library or executable.
        r)r$libs  r&library_optionzCCompiler.library_option-rr(cddl}|g}|g}|g}|g}|d|d\}}tj|d}		|D]}
|	d|
z|	d|z|	n#|	wxYw	||g|	}n%#t$rYtj|d
SwxYw	tj|n#tj|wxYw	|	|d||tjtj
|jpd
dn1#ttf$rY|D]}tj|d
SwxYw	|D]}tj|n#|D]}tj|wxYwdS)zReturn a boolean indicating whether funcname is supported on
        the current platform.  The optional arguments can be used to
        augment the compilation environment.
        rNrT)textwz#include "%s"
z=int main (int argc, char **argv) {
    %s();
    return 0;
}
rNFza.out)rr)tempfilemkstemprkfdopenwritecloserrremoverrljoinrrr>)
r$funcnameincludesrrrrfdfnamefinclr fns
             r&has_functionzCCompiler.has_function3s[	HLIL$$T8$$??	EIb#
	 
6
6-45555
GG




GGIIIIAGGIIII	llE7lFFGG			Ie	

IeBIe
	  IL
!



Ibgll4?#8b'BBCCCC9%			

	"





	
D

	"




g

	"




ts`5BB&*CC>
C%
C>$C%%C>>DE+1:F7+F<F7FF77Gct)aHSearch the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        r)r$rPrr|s    r&find_library_filezCCompiler.find_library_fileps
"!r(rcJdtfd|DS)Nrc3FK|]}|VdSr)_make_out_path).0src_namerr$rfs  r&	z-CCompiler.object_filenames..sI



Ix@@





r()r)r$source_filenamesrfrs` ``r&rhzCCompiler.object_filenamessRJ





,




	
r(cLt|j|jSr)dictfromkeyssrc_extensions
obj_extension)r$s r&out_extensionszCCompiler.out_extensionss}}T0$2DEEEr(cxtj|\}}||}	|j|}n1#t
$r$t
d||wxYw|rtj|}tj	|||zS)Nz"unknown file type '{}' (from '{}'))
rkrlrm_make_relativerLookupErrorrformatbasenamer)r$rrfrrrxnew_exts       r&rzCCompiler._make_out_pathsG$$X..	c""4((	)#.GG			"4;;CJJ
		*7##D))Dw||Jw777s
A.A5ctj|d}|tj|dS)z
        In order to ensure that a filename always honors the
        indicated output_dir, make sure it's relative.
        Ref python/cpython#37775.
        r5N)rkrl
splitdriveisabs)rno_drives  r&rzCCompiler._make_relatives=7%%d++A.

h//1122r(c|J|rtj|}tj|||jzSr)rkrlrrshared_lib_extensionr$rrfrs    r&shared_object_filenamez CCompiler.shared_object_filenamesI%%%	2w''11Hw||J43L(LMMMr(c|J|rtj|}tj|||jpdzS)Nr)rkrlrr
exe_extensionrs    r&rzCCompiler.executable_filenamesN%%%	2w''11Hw||JD4F4L"(MNNNr(staticc<|Jd}|t|vrtd|t||dz}t||dz}tj|\}}	||	|fz}
|rd}tj|||
S)Nz)"static", "shared", "dylib", "xcode_stub"z'lib_type' must be _lib_format_lib_extensionr)evalr*getattrrkrlsplitr)r$rSrrfrexpectedfmtrxrJrfilenames           r&rzCCompiler.library_filenames%%%>4>>))=8==>>>dH}455dH'7788GMM'**	T$$	Cw||JX666r(r5c.tj|dSr)rr|)r$msglevels   r&announcezCCompiler.announces	#r(c8ddlm}|rt|dSdS)Nr)DEBUG)distutils.debugrprint)r$rrs   r&debug_printzCCompiler.debug_prints5))))))	#JJJJJ		r(cJtjd|zdS)Nzwarning: %s
)sysstderrr)r$rs  r&warnzCCompiler.warns#
3./////r(c4t||||jdSr)r
r)r$funcargsrrs     r&r
zCCompiler.executesdC.....r(c.t|fd|ji|dS)Nr)rr)r$cmdr-s   r&rzCCompiler.spawns%
c224<2622222r(c0t|||jSN)r)r	r)r$rvdsts   r&r	zCCompiler.move_filesc4<8888r(c4t|||jdSr)r
r)r$r6modes   r&r
zCCompiler.mkpathstT4<000000r()rrrr)NNNNN)NNNrNNN)NrN)
NNNNNrNNNN)NNNNrNNN)NNNN)r)rr)rrr)r5)Nr5)r)Ir,
__module____qualname____doc__
compiler_typerrstatic_lib_extensionrstatic_lib_formatshared_lib_formatrrrrrr'r.r#r9r@rDrGrKrQrTrWrYr[r]r_rbrdryrrgrrrrrrrrrrrrrrrrrrrrrrhpropertyrrstaticmethodrrrrrrrr
rr	r
r{r(r&rrs*M2NMML*))NLL"<"<"<"compiler_classr"rCsort
print_help)r>	compilersr/pretty_printers    r&show_compilersrE3s322222I"''))VV+0$x8PQR8STUUUU
NN [++N<=====r(c|tj}	|t|}t|\}}}n,#t$rd|z}||d|zz}t|wxYw	d|z}t
|tj|}	t|	|}
n?#t$rtd|zt$rtd|d|dwxYw|
d||S)	a[Generate an instance of some CCompiler subclass for the supplied
    platform/compiler combination.  'plat' defaults to 'os.name'
    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
    for that platform.  Currently only 'posix' and 'nt' are supported, and
    the default compilers are "traditional Unix interface" (UnixCCompiler
    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
    possible to ask for a Unix compiler object under Windows, and a
    Microsoft compiler object under Unix -- if you supply a value for
    'compiler', 'plat' is ignored.
    Nz5don't know how to compile C/C++ code on platform '%s'z with '%s' compilerz
distutils.z4can't compile C/C++ code: unable to load module '%s'z0can't compile C/C++ code: unable to find class 'z
' in module '')rkr6r0r@rr
__import__r
modulesvarsImportErrorr)platr/rrrmodule_name
class_namelong_descriptionrmoduleklasss           r&new_compilerrRDsG|w	*+D11H6DX6N3j"2"2***EL-88C$S)))	*

"[0;[)VZ(


"B[P

	



"" *

KKK
9

	

5w&&&s"3)A ;BrC)rrrtmacrorJs     r&ririrs*G225%((	Q#e**-A-A-A-A-A-A-A-AHJOP

u::??NN6E!H,----
ZZ1__Qxva01111
y50111%%v|$$$$Nr(c*g}|D]*}|||+|D]G}||}t|tr||z}2||H|D]}t
j|\}}	|rH||g|	}
|
r||
U|	d|zn||
||S)acGenerate linker options for searching library directories and
    linking with specific libraries.  'libraries' and 'library_dirs' are,
    respectively, lists of library names (not filenames!) and search
    directories.  Returns a list of command-line options suitable for use
    with some compiler (depending on the two format strings passed in).
    z6no library file corresponding to '%s' found (skipping))rCrrr0rrkrlrrrr)r/rrrlib_optsrJoptrlib_dirlib_namelib_files           r&gen_lib_optionsr[sBH::33C889999#!!11#66c4  	!#~HHOOC    :: gmmC00(		:117)XFFH
))))

ORUU
OOH33C889999Or()NN)NNrrr)rr
rkr+distutils.errorsrrrrrdistutils.spawnrdistutils.file_utilr	distutils.dir_utilr
distutils.dep_utilrdistutils.utilrr
	distutilsrrr*r0r@rErRrir[r{r(r&rcs11



								"!!!!!))))))%%%%%%******00000000\1\1\1\1\1\1\1\1F8
OE


E">>>"+'+'+'+'\***Z%%%%%r(PK{5Z[44PLib/site-packages/setuptools/_distutils/__pycache__/bcppcompiler.cpython-311.pycnuW+A

`;d9dZddlZddlZddlmZmZmZmZmZddl	m
Z
mZddlm
Z
ddlmZddlmZejdeGd	d
e
ZdS)zdistutils.bcppcompiler

Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
N)DistutilsExecErrorCompileErrorLibError	LinkErrorUnknownFileError)	CCompilergen_preprocess_options)
write_file)newer)logzbcppcompiler is deprecated and slated to be removed in the future. Please discontinue use or file an issue with pypa/distutils describing your use case.ceZdZdZdZiZdgZgdZeezZdZ	dZ
dZdxZZ
d	Zdfd	Z							dd
Z	ddZ										ddZddZddZ					ddZxZS)BCPPCompilerzConcrete class that implements an interface to the Borland C/C++
    compiler, as defined by the CCompiler abstract class.
    bcppz.c)z.ccz.cppz.cxxz.objz.libz.dllz%s%sz.exerct|||d|_d|_d|_d|_gd|_gd|_gd|_gd|_	g|_
gd|_gd|_dS)	Nz	bcc32.exezilink32.exeztlib.exe)/tWMz/O2/q/g0)rz/Odrr)z/Tpd/Gnr/x)rrr)rrrz/r)
super__init__cclinkerlibpreprocess_optionscompile_optionscompile_options_debugldflags_sharedldflags_shared_debugldflags_staticldflags_exeldflags_exe_debug)selfverbosedry_runforce	__class__s    qE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/bcppcompiler.pyrzBCPPCompiler.__init__Bs
'5111#"&;;;%A%A%A"999$?$?$?! ...!:!:!:Nc	~|||||||\}}	}}
}|pg}|d|r||jn||j|	D]H}
	||
\}}n#t
$rYwxYwtj|}tj|
}
|	tj
|
|dkr|dkr=	|dd|
|gn!#t$r}t|d}~wwxYw||jvrd}n||jvrd}nd}d|
z}	||jg|z|
z||gz|z|gz)#t$r}t|d}~wwxYw|	S)	Nz-c.res.rcbrcc32z-foz-P-o)_setup_compileappendextendrrKeyErrorospathnormpathmkpathdirnamespawnrr
_c_extensions_cpp_extensionsr)r#sources
output_dirmacrosinclude_dirsdebug
extra_preargsextra_postargsdependsobjectspp_optsbuildcompile_optsobjsrcextmsg	input_opt
output_opts                   r(compilezBCPPCompiler.compileZsQ;?:M:Mgw;
;
7%%*D!!!	6 :;;;; 45551	(1	(C
 :SS



'""3''C'""3''C
KK,,---f}}e||,JJ%c:;;;;),,,&s+++,d(((		,,, 		
	J


(

WI"#!*-.%	%
e&
(
(
("3'''
(sB7B
BBD++
E	5EE	--F
F:&F55F:cT|||\}}|||}|||rL|dg|z}|r		||jg|zdS#t
$r}t
|d}~wwxYwtjd|dS)N)r=z/uskipping %s (up-to-date))	_fix_object_argslibrary_filename
_need_linkr9rrrrr@)	r#rDoutput_libnamer=r@target_langoutput_filenamelib_argsrKs	         r(create_static_libzBCPPCompiler.create_static_libs!% 5 5gz J J*//:/VV??7O44		C'.8H

$

DH:011111%
$
$
$smm#
$
I0/BBBBBsA22
B<BBc|||\}}||||\}}}|r"tjdt	|| t
j||}|||r|tj
kr$d}|	r|jdd}n3|jdd}n#d}|	r|j
dd}n|jdd}|d}nt
j|\}}t
j|\}}t
j|d}t
j|d|z}dg}|pgD]+}|d||,|t*||fd	|zt-t
jj|}|g}g}|D]r}t
jt
j|\}}|d
kr||]||s|D]7}|dt
j|z8|d|||d
|g|d|D]F}||||	}|||1||G|d|d|d
|g|d
|||
r|
|dd<|r|||t
j|	||jg|zdS#t<$r}t?|d}~wwxYwtj d|dS)Nz7I don't know what to do with 'runtime_library_dirs': %sc0w32c0d32r.rz%s.defEXPORTSz  {}=_{}z
writing %sr+z/L%sz/L.,z,,import32cw32mtrP)!rQ
_fix_lib_argsrwarnstrr4r5joinrSr
EXECUTABLEr"r!rrsplitsplitextr8r1formatexecuter
mapr6normcaser2find_library_filer7r9rrrr@) r#target_descrDrVr=	librarieslibrary_dirsruntime_library_dirsexport_symbolsr@rArB
build_temprUstartup_objld_argsdef_fileheadtailmodnamerJtemp_dircontentssymobjects2	resourcesfilebaseellrlibfilerKs                                 r(linkzBCPPCompiler.links|(!% 5 5gz J J*:>:L:L|%9;
;
7L"6 	HI())



! gll:GGO??7O44a	Ci222%2"4QQQ7GG".qqq1GG%5"7:GG"1!!!4G%W]]?;;
d!w//557??71:667<<(W2DEE%;)/RAACOOJ$5$5c3$?$?@@@@Z(H)=|h?VWWW27+W55H#mGI 
)
) g..rw/?/?/E/EFFs&==$$T****NN4((((#
?
?v(8(8(=(==>>>>NN5!!!
NN7###
NNC1222NN4    	
,	
,00sEJJ?NN3''''NN7++++
NN:&&&NN8$$$
NNC?+++NN3NN9%%%
,+
/~...KK88999
%

DK=7233333%
%
%
%nn$
%
I0/BBBBBs>P
P<(P77P<c|r|dz}|dz|dz||f}n|dz|f}|D]_}|D]Z}tj|||}tj|r|ccS[`dS)N_d_bcpp)r4r5rcrRexists)	r#dirsrr@dlib	try_namesdirnamers	         r(rkzBCPPCompiler.find_library_fileDs	-:DwcBIIw,I		C!
#
#',,sD,A,A$,G,GHH7>>'**#"NNNNN#
#4r)r.c|d}g}|D]J}tjtj|\}}||jddgzvr#td|||rtj|}|dkr7|tj	|||z|dkr8|tj	||dz|tj	|||j
zL|S)Nr.r,r+z"unknown file type '{}' (from '{}'))r4r5rfrjsrc_extensionsrrgbasenamer1rc
obj_extension)r#source_filenames	strip_dirr=	obj_namessrc_namer~rJs        r(object_filenameszBCPPCompiler.object_filenames^sDJ	(	V	VH'**27+;+;H+E+EFFKT34.%@AA&8??XNN
.w''--f}}  j$*!E!EFFFF  j$-!H!HIIII  j$AS:S!T!TUUUUr)c0|d||\}}}t||}dg|z}	||	d|z|r||	dd<|r|	||	||js|t||r||r2|tj	|	|
|	dS#t$r#}
t|
t|
d}
~
wwxYwdS)Nz	cpp32.exer/r)_fix_compile_argsr	r1r2r&rr7r4r5r8r9rprintr)r#sourceoutput_filer>r?rArB_rEpp_argsrKs           r(
preprocesszBCPPCompiler.preprocessws@%)$:$:4$V$V!FL(>>-')"NN4+-...	('GBQBK	+NN>***v
:	(,fk0J0J,
:BGOOK88999
(

7#####%
(
(
(c


"3'''
(-,sC&&
D0DD)rrr)NNNrNNN)NrN)
NNNNNrNNNN)r)rr.)NNNNN)__name__
__module____qualname____doc__
compiler_typeexecutablesr:r;rrstatic_lib_extensionshared_lib_extensionstatic_lib_formatshared_lib_format
exe_extensionrrNrXrrkrr
__classcell__)r's@r(rr'spMKFM---O#_4NM!!,22)M;;;;;;6IIII\NRCCCC2!CCCCCCCCR48((((((((r)r)rr4warningsdistutils.errorsrrrrrdistutils.ccompilerrr	distutils.file_utilr
distutils.dep_utilr	distutilsrraDeprecationWarningrr)r(rs
			BAAAAAAA******$$$$$$
4	o(o(o(o(o(9o(o(o(o(o(r)PK{5Z5o8ILib/site-packages/setuptools/_distutils/__pycache__/spawn.cpython-311.pycnuW+A

`;d
VdZddlZddlZddlZddlmZddlmZddlm	Z	d	dZ
d
dZdS)zdistutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
N)DistutilsExecError)DEBUG)logct|}tjtj||rdS|rt|d}|||d<||nt
tj}tj
dkrddlm}m
}|}|r|||<	tj||}	|	|	j}
nP#t"$rC}t$s|d}t'd||jd|d}~wwxYw|
r2t$s|d}t'd||
dS)	aRun another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    Nrdarwin)MACOSX_VERSION_VARget_macosx_target_ver)envzcommand {!r} failed: {}z%command {!r} failed with exit code {})listrinfo
subprocesslist2cmdlinefind_executabledictosenvironsysplatformdistutils.utilr	r
Popenwait
returncodeOSErrorrrformatargs)cmdsearch_pathverbosedry_runr
executabler	r
macosx_target_verprocexitcodeexcs            jE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/spawn.pyspawnr(s$s))CHZ
$S
)
)*** $SV,,
!CF##d2:&6&6C
|xLLLLLLLL1133	8&7C"#	---		?	a&C %,,S#(2,??

	
	a&C 3::3II

	


s1C
D>DDcRtj|\}}tjdkr|dkr|dz}tj|r|S|[tjdd}|9	tjd}n##ttf$rtj}YnwxYw|sdS|tj
}|D]E}tj||}tj|r|cSFdS)zTries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    win32z.exeNPATHCS_PATH)rpathsplitextrrisfilergetconfstrAttributeError
ValueErrordefpathsplitpathsepjoin)r"r-_extpathspfs       r'rrKs)W

j
)
)FAscVmm&(
	w~~j!!|z~~fd++<
"z),,"J/
"
"
"z
"tJJrz""E
GLLJ''
7>>!	HHH	4sBB98B9)rrrN)N)__doc__rrrdistutils.errorsrdistutils.debugr	distutilsrr(rr'rCs


				//////!!!!!!6
6
6
6
r""""""rBPK{5Z+')}~~PLib/site-packages/setuptools/_distutils/__pycache__/_collections.cpython-311.pycnuW+A

`;d2HddlZddlZGddeejjZdS)Nc8eZdZdZdZdZejZdZ	dZ
dS)	DictStacka
    A stack of dictionaries that behaves as a view on those dictionaries,
    giving preference to the last.

    >>> stack = DictStack([dict(a=1, c=2), dict(b=2, a=2)])
    >>> stack['a']
    2
    >>> stack['b']
    2
    >>> stack['c']
    2
    >>> len(stack)
    3
    >>> stack.push(dict(a=3))
    >>> stack['a']
    3
    >>> set(stack.keys()) == set(['a', 'b', 'c'])
    True
    >>> set(stack.items()) == set([('a', 3), ('b', 2), ('c', 2)])
    True
    >>> dict(**stack) == dict(stack) == dict(a=3, c=2, b=2)
    True
    >>> d = stack.pop()
    >>> stack['a']
    2
    >>> d = stack.pop()
    >>> stack['a']
    1
    >>> stack.get('b', None)
    >>> 'c' in stack
    True
    ct|}tttjd|DS)Nc3>K|]}|VdSN)keys).0cs  qE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/_collections.py	z%DictStack.__iter__..*s*5N5N1affhh5N5N5N5N5N5N)list__iter__iterset	itertoolschain
from_iterable)selfdictss  rrzDictStack.__iter__(sH

d##C	555N5N5N5N5NNNOOPPPr
cttt|D]}||vr
||cSt	|r)reversedtuplerrKeyError)rkeyscopes   r__getitem__zDictStack.__getitem__,sWeDMM$$7$78899	"	"Ee||Sz!!!smmr
cLtjj||Sr)collectionsabcMapping__contains__)rothers  rr"zDictStack.__contains__4s&33D%@@@r
cTttt|Sr)lenrr)rs r__len__zDictStack.__len__7s4T

##$$$r
N)__name__
__module____qualname____doc__rrrappendpushr"r&r
rrrsjBQQQ;DAAA%%%%%r
r)rrrr r!rr-r
rr.sX2%2%2%2%2%ko-2%2%2%2%2%r
PK{5Zk,nCnCPLib/site-packages/setuptools/_distutils/__pycache__/fancy_getopt.cpython-311.pycnuW+A

`;dE	dZddlZddlZddlZddlZddlmZmZdZej	dezZ
ej	deeZe
ddZGd	d
ZdZdejDZd
ZdZGddZedkrGdZdD]DZedezedeeeeCdSdS)a6distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
N)DistutilsGetoptErrorDistutilsArgErrorz[a-zA-Z](?:[a-zA-Z0-9-]*)z^%s$z^({})=!({})$-_cpeZdZdZddZdZdZddZdZdZ	d	Z
d
ZdZdZ
dd
ZdZddZddZdS)FancyGetoptaWrapper around the standard 'getopt()' module that provides some
    handy extra functionality:
      * short and long options are tied together
      * options have help strings, and help text can be assembled
        from them
      * options set attributes of a passed-in object
      * boolean options can have "negative aliases" -- eg. if
        --quiet is the "negative alias" of --verbose, then "--quiet"
        on the command line sets 'verbose' to false
    Nc||_i|_|jr|i|_i|_g|_g|_i|_i|_i|_	g|_
dSN)option_tableoption_index_build_indexaliasnegative_alias
short_opts	long_opts
short2long	attr_name	takes_argoption_orderselfrs  qE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/fancy_getopt.py__init__zFancyGetopt.__init__,s{)	 
!
cl|j|jD]}||j|d<dS)Nr)rclearr)roptions  rr
zFancyGetopt._build_indexTsG!!!'	2	2F+1DfQi((	2	2rc<||_|dSr
)rr
rs  rset_option_tablezFancyGetopt.set_option_tableYs"(rc||jvrtd|z|||f}|j|||j|<dS)Nz'option conflict: already an option '%s')rrrappend)rlong_optionshort_optionhelp_stringrs     r
add_optionzFancyGetopt.add_option]sb$+++&9KG
"<=F$$V,,,-3Dk***rc||jvS)zcReturn true if the option table for this parser has an
        option with long name 'long_option'.)rrr"s  r
has_optionzFancyGetopt.has_optiongsd///rc6|tS)zTranslate long option name 'long_option' to the form it
        has as an attribute of some object: ie., translate hyphens
        to underscores.	translate
longopt_xlater's  r
get_attr_namezFancyGetopt.get_attr_namels$$]333rc
t|tsJ|D]I\}}||jvrt	d|d|d|d||jvrt	d|d|d|dJdS)Nzinvalid z 'z': option 'z
' not defined': aliased option ')
isinstancedictitemsrr)raliaseswhatropts     r_check_alias_dictzFancyGetopt._check_alias_dictrs'4(((((#MMOO
	
	LUCD---**ttUUUEEE+$+++**ttUUUCCC),
	
	rc@||d||_dS)z'Set the aliases for this option parser.rN)r6r)rrs  rset_aliaseszFancyGetopt.set_aliasess#ug...


rc@||d||_dS)zSet the negative aliases for this option parser.
        'negative_alias' should be a dictionary mapping option names to
        option names, both the key and value must already be defined
        in the option table.znegative aliasN)r6r)rrs  rset_negative_aliasesz FancyGetopt.set_negative_aliasess)
	
~/?@@@,rcg|_g|_|ji|_|jD]4}t
|dkr	|\}}}d}n=t
|dkr|\}}}}n"td|t|trt
|dkrtd|z|:t|trt
|dkstd	|z||j|<|j||d
dkr|r|dz}|dd
}d|j
|<nS|j|}|-|j
|rtd
|d|d||jd
<d|j
|<|j|}|2|j
||j
|krtd|d|dt"|std|z|||j|<|r*|j|||j|d<6dS)zPopulate the various data structures that keep tabs on the
        option table.  Called by 'getopt()' before it can do anything
        worthwhile.
        rzinvalid option tuple: {!r}z9invalid long option '%s': must be a string of length >= 2Nz:invalid short option '%s': must a single character or None=:zinvalid negative alias 'r/z' takes a valuezinvalid alias 'z%': inconsistent with aliased option 'z/' (one of them takes a value, the other doesn'tzEinvalid long option name '%s' (must be letters, numbers, hyphens only)rrrrrepeatrlen
ValueErrorformatr0strrr!rrgetr
longopt_rematchr-r)rrlongshorthelprCalias_tos       r_grok_option_tablezFancyGetopt._grok_option_tables
'F	1F	1F6{{a$*!eTV!!,2)eT66!!=!D!DV!L!LMMMdC((
CIIMM*S
]
5#(>(>]3u::QR??*68=>
!'DKN!!$'''Bx3(!CKEAbDz'(t$$ .22488'~h/22CG44S
*.DN2&'(t$z~~d++H#>$'4>(+CCC..04ttXXX?##D))
*>@DE
$(#5#5d#;#;DN4 
1&&u---,0a)MF	1F	1rc|tjdd}|t}d}nd}|d|j}	t
j|||j\}}n&#tj$r}t|d}~wwxYw|D].\}}t|dkr |ddkr|j|d}n-t|dkr|ddd	ksJ|dd}|j
|}	|	r|	}|j|s3|d
ks
Jd|j
|}	|	r|	}d}nd}|j|}
|r.|j
|
t%||
ddz}t'||
||j||f0|r||fS|S)aParse command-line options in args. Store as attributes on object.

        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
        'object' is None or not supplied, creates a new OptionDummy
        object, stores option values there, and returns a tuple (args,
        object).  If 'object' is supplied, it is modified in place and
        'getopt()' just returns 'args'; in both cases, the returned
        'args' is a modified copy of the passed-in 'args' list, which
        is left untouched.
        Nr?TF r>rrz--zboolean option can't have value)sysargvOptionDummyrOjoinrgetoptrerrorrrDrrrHrrrrCgetattrsetattrrr!)rargsobjectcreated_objectroptsmsgr5valrattrs           rrWzFancyGetopt.getopts<8ABB ]]F!NN"N!!!XXdo..
	)tZHHJD$$|	)	)	)#C(((	)	1	1HC3xx1}}Q3oc!f-3xx!||BQB4!""gJNN3''E
>#&
byyy"Cyyy+//44CCCC>#&D
3t{t,,8fdA..2FD#&&&$$c3Z0000	<KsA::B	BBc<|jtd|jS)zReturns the list of (option, value) tuples processed by the
        previous run of 'getopt()'.  Raises RuntimeError if
        'getopt()' hasn't been called yet.
        Nz!'getopt()' hasn't been called yet)rRuntimeError)rs rget_option_orderzFancyGetopt.get_option_orders%
$BCCC$$rcd}|jD]A}|d}|d}t|}|ddkr|dz
}||dz}||kr|}B|dzdzdz}d}||z
}	d	|z}
|r|g}nd
g}|jD]}|dd\}}}t||	}
|ddkr
|dd}|?|
r"|d|||
dfznm|d
||fznRd||}|
r"|d|||
dfzn|d|z|
ddD]}||
|z|S)zGenerate help text (a list of strings, one per suggested line of
        output) from the option table for this FancyGetopt object.
        rr?r@rANr>NrQzOption summary:r<z  --%-*s  %sz
  --%-*s  z{} (-{})z  --%-*s)rrD	wrap_textr!rF)rheadermax_optrrKrLell	opt_width
line_width
text_width
big_indentlinesrMtext	opt_namess               r
generate_helpzFancyGetopt.generate_help&s'				F!9D1IEd))CBx3Ag AgW}}aK!Oa'	0
)+
9_
	(HEE&'E'	/	/F &rr
D%T:..DBx3AbDz}ALL7D$q'2J!JKKKKLL$!?@@@@
'--dE::	9LL7ItAw2O!OPPPPLLi!7888ABBx
/
/Z#-....
/rc|tj}||D]}||dzdS)N
)rSstdoutrswrite)rrifilelines    r
print_helpzFancyGetopt.print_helptsN<:D&&v..	$	$DJJtd{####	$	$rr
)NN)__name__
__module____qualname____doc__rr
rr%r(r-r6r8r:rOrWrdrsrzrrrr s		&&&&P222
4444000
444
---P1P1P1d;;;;z%%%LLLL\$$$$$$rrcvt|}|||||Sr
)rr:rW)optionsnegative_optr\r[parsers     rfancy_getoptr{s7

!
!F
---==v&&&rc.i|]}t|dS)rQ)ord).0_wschars  r
rs ???'CLL#???rc|gSt||kr|gS|}|t}t	jd|}d|D}g}|rg}d}|r\t|d}||z|kr$||d|d=||z}n|r|dddkr|d=n|\|rQ|dkr6||dd||d|d|d<|dddkr|d=|d|||S)zwrap_text(text : string, width : int) -> [string]

    Split 'text' into multiple lines of no more than 'width' characters
    each, and return the list of strings that results.
    Nz( +|-+)cg|]}||Srr)rchs  r
zwrap_text..s
(
(
(RR
(b
(
(
(rrr@rQrR)rD
expandtabsr+WS_TRANSresplitr!rV)rqwidthchunksrpcur_linecur_lenrks       rrhrhs|	
4yyEv
??D>>(##D
Xj$
'
'F
(
(6
(
(
(FE
 (
	fQi..C}%%q	***1I!C-%Q3 6 6 
		!||q	!E' 2333"1Ieff-q	
ay|s""1I	RWWX&&'''A (DLrc6|tS)zXConvert a long option name to a valid Python identifier by
    changing "-" to "_".
    r*)r5s rtranslate_longoptrs=='''rceZdZdZgfdZdS)rUz_Dummy class just used as a place to hold command-line option
    values as instance attributes.c2|D]}t||ddS)zkCreate a new OptionDummy instance.  The attributes listed in
        'options' will be initialized to None.N)rZ)rrr5s   rrzOptionDummy.__init__s2	%	%CD#t$$$$	%	%rN)r{r|r}r~rrrrrUrUs7&& "%%%%%%rrU__main__zTra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].))
(z	width: %dru)r~rSstringrrWdistutils.errorsrrlongopt_patcompilerIrFneg_alias_rerG	maketransr,rr
whitespacerrhrrUr{rqwprintrVrrrrs






				



DDDDDDDD+
RZ+-
.
.
rz.//[IIJJ

c3''
X$X$X$X$X$X$X$X$v
'''@?V->???333l(((%%%%%%%%z D
kAo
dii		$**++,,,
rPK{5Z%͋))PLib/site-packages/setuptools/_distutils/__pycache__/archive_util.cpython-311.pycnuW+A

`;d!HdZddlZddlmZddlZ	ddlZn
#e$rdZYnwxYwddlmZddl	m
Z
ddlmZddl
mZ	ddlmZn
#e$rdZYnwxYw	dd	lmZn
#e$rdZYnwxYwd
ZdZ	dd
ZddZedgdfedgdfedgdfedgdfedgdfegdfdZdZ						ddZdS) zodistutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing).N)warn)DistutilsExecError)spawn)mkpath)log)getpwnam)getgrnamcvt|dS	t|}n#t$rd}YnwxYw||dSdS)z"Returns a gid, given a group name.N)r	KeyErrornameresults  qE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/archive_util.py_get_gidr \4<t$
ay4,,cvt|dS	t|}n#t$rd}YnwxYw||dSdS)z"Returns an uid, given a user name.Nr)rrr
s  r_get_uidr-rrgzipcdddddd}dddd	d
}|%||vrtd|d
z}	|dkr|	||dz
}	ttj|	|ddl}
tj	dttfd}|se|
|	d||z}	|
|||n#|wxYw|dkrNtdt |	||z}
t"jdkr||	|
g}n|d|	g}t'|||
S|	S)a=Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or
    None.  ("compress" will be deprecated in Python 3.2)

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_dir' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z").

    Returns the output filename.
    gzbz2xz)rbzip2rNcompressz.gzz.bz2z.xzz.Z)rrrrNzKbad value for 'compress': must be None, 'gzip', 'bzip2', 'xz' or 'compress'z.tarrdry_runrzCreating tar archivecH|_|_|_|_|S)N)gidgnameuiduname)tarinfor!groupownerr#s r_set_uid_gidz"make_tarball.._set_uid_gidjs.?GK!GM?GK!GMzw|%s)filterz'compress' is deprecated.win32z-f)keys
ValueErrorgetrospathdirnametarfilerinforropenaddcloserDeprecationWarningsysplatformr)	base_namebase_dirrverboserr'r&tar_compressioncompress_extarchive_namer2r(tarcompressed_namecmdr!r#s     ``        @@rmake_tarballrC:s&O"F%TRRL0A0A0C0C C C
!

	

v%L:((2666
27??<(('::::NNNH
#$$$
5//C
5//Cll</(2K)KLL	GGH\G222IIKKKKCIIKKKK:
(*<===&h)??<7""\?;CCT<0C
c7####s-DD/c
&|dz}ttj||t?|rd}nd}	td|||g|n7#t$rt
d|zwxYwtjd|||s	t	j	|d	tj

}n1#t$r$t	j	|d	tj
}YnwxYw|5|tj
krhtjtj|d}|||tjd|tj|D]\}}	}
|	D]k}tjtj||d}|||tjd|l|
D]}tjtj||}tj|r+|||tjd|	dddn#1swxYwY|S)
avCreate a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises DistutilsExecError.  Returns the name of the output zip
    file.
    z.ziprNz-rz-rqzipzkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilityz#creating '%s' and adding '%s' to itw)compressionrzadding '%s')rr/r0r1zipfilerrrr3ZipFileZIP_DEFLATEDRuntimeError
ZIP_STOREDcurdirnormpathjoinwritewalkisfile)r:r;r<rzip_filename
zipoptionsrEr0dirpathdirnames	filenamesrs            rmake_zipfilerXsv%L
27??<(('::::	JJJ	5*lH=wOOOOO!
	
	
	%4

		6hOOO	:
Yo #73G 
Y
Y
YolCWEWXXX
Y
:
:ry((7++BGLL2,F,FGGDIIdD)))H]D11146GH4E4E	:	:0GXy (66!w//WdB0O0OPP		$---5555 )::!w//Wd0K0KLL7>>$//:IIdD111H]D999	:	:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
: s1AA7!B66+C$#C$)FJJ

J
)rrzgzip'ed tar-file)rrzbzip2'ed tar-file)rrzxz'ed tar-file)rrzcompressed tar file)rNzuncompressed tar filezZIP file)gztarbztarxztarztarr@rEc*|D]}|tvr|cSdS)zqReturns the first format from the 'format' list that is unknown.

    If all formats are known, returns None
    N)ARCHIVE_FORMATS)formatsformats  rcheck_archive_formatsras1
((MMM)4r)cltj}|Jtjd|tj|}|stj||tj}d|i}		t|}
n #t$rtd|zwxYw|
d}|
dD]
\}}
|
|	|<|dkr
||	d<||	d	<	|||fi|	}|)tjd
|tj|n1#|*tjd
|tj|wwxYw|S)aCreate an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", "xztar", or "ztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    Nzchanging into '%s'rzunknown archive format '%s'rrEr'r&zchanging back to '%s')r/getcwdrdebugr0abspathchdirrMr^rr-)r:r`root_dirr;r<rr'r&save_cwdkwargsformat_infofuncargvalfilenames               rmake_archiverps}4y{{H	&111GOOI..		HX9
!FA%f-AAA6?@@@Aq>DNSs
ww4	866v66I-x888HXI-x888HX Os3
BB
D.D1)rrrNN)rr)NNrrNN)__doc__r/warningsrr8rHImportErrordistutils.errorsrdistutils.spawnrdistutils.dir_utilr	distutilsrpwdrgrpr	rrrCrXr^rarpr)rr{s&

			



NNNNGGG0/////!!!!!!%%%%%%HHHHHH





SWLLLL^====B124F
G235H
I/02B
C
457LM-.0GH"j)




::::::s/!!AA
AAA#"A#PK{5Zb]''MLib/site-packages/setuptools/_distutils/__pycache__/extension.cpython-311.pycnuW+A

`;d(:dZddlZddlZGddZdZdS)zmdistutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts.Nc<eZdZdZ														ddZdZdS)	ExtensionaJust a collection of attributes that describes an extension
    module and everything needed to build it (hopefully in a portable
    way, but there are hooks that let you be as unportable as you need).

    Instance attributes:
      name : string
        the full name of the extension, including any packages -- ie.
        *not* a filename or pathname, but Python dotted name
      sources : [string]
        list of source filenames, relative to the distribution root
        (where the setup script lives), in Unix form (slash-separated)
        for portability.  Source files may be C, C++, SWIG (.i),
        platform-specific resource files, or whatever else is recognized
        by the "build_ext" command as source for a Python extension.
      include_dirs : [string]
        list of directories to search for C/C++ header files (in Unix
        form for portability)
      define_macros : [(name : string, value : string|None)]
        list of macros to define; each macro is defined using a 2-tuple,
        where 'value' is either the string to define it to or None to
        define it without a particular value (equivalent of "#define
        FOO" in source or -DFOO on Unix C compiler command line)
      undef_macros : [string]
        list of macros to undefine explicitly
      library_dirs : [string]
        list of directories to search for C/C++ libraries at link time
      libraries : [string]
        list of library names (not filenames or paths) to link against
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)
      extra_objects : [string]
        list of extra files to link with (eg. object files not implied
        by 'sources', static library that must be explicitly specified,
        binary resource files, etc.)
      extra_compile_args : [string]
        any extra platform- and compiler-specific information to use
        when compiling the source files in 'sources'.  For platforms and
        compilers where "command line" makes sense, this is typically a
        list of command-line arguments, but for other platforms it could
        be anything.
      extra_link_args : [string]
        any extra platform- and compiler-specific information to use
        when linking object files together to create the extension (or
        to create a new static Python interpreter).  Similar
        interpretation as for 'extra_compile_args'.
      export_symbols : [string]
        list of symbols to be exported from a shared extension.  Not
        used on all platforms, and not generally necessary for Python
        extensions, which typically export exactly one symbol: "init" +
        extension_name.
      swig_opts : [string]
        any extra options to pass to SWIG if a source file has the .i
        extension.
      depends : [string]
        list of files that the extension depends on
      language : string
        extension language (i.e. "c", "c++", "objc"). Will be detected
        from the source extensions if not provided.
      optional : boolean
        specifies that a build failure in the extension should not abort the
        build process, but simply not install the failing extension.
    Nct|tstdt|trt	d|Dstd||_||_|pg|_|pg|_|pg|_	|pg|_
|pg|_|pg|_|	pg|_
|
pg|_|pg|_|pg|_|
pg|_|pg|_||_||_t+|dkrId|D}dt/|}d|z}t1j|dSdS)Nz'name' must be a stringc3@K|]}t|tVdS)N)
isinstancestr).0vs  nE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/extension.py	z%Extension.__init__..ms,1V1V*Q2D2D1V1V1V1V1V1Vz#'sources' must be a list of stringsrc,g|]}t|S)repr)r	options  r
z&Extension.__init__..s555tF||555r
z, zUnknown Extension options: %s)rrAssertionErrorlistallnamesourcesinclude_dirs
define_macrosundef_macroslibrary_dirs	librariesruntime_library_dirs
extra_objectsextra_compile_argsextra_link_argsexport_symbols	swig_optsdependslanguageoptionallenjoinsortedwarningswarn)selfrrrrrrrrrrr r!r"r#r$r%kwoptionsmsgs                    r__init__zExtension.__init__Wsz($$$	< !:;;;7D))	Hc1V1Vg1V1V1V.V.V	H !FGGG	(.B*0b(.B(.B"b$8$>B!*0b"4":.4",2"b}" 
 
r77Q;;55"555Giiw00G1G;CM#	;r
c~d|jj|jj|jt|S)Nz<{}.{}({!r}) at {:#x}>)format	__class__
__module____qualname__rid)r+s r__repr__zExtension.__repr__s8'..N%N'ItHH	

	
r
)NNNNNNNNNNNNNN)__name__r3r4__doc__r/r6rr
rrrso>>L!#////b




r
rcddlm}m}m}ddlm}ddlm}||}||ddddd}	g}	|}	|	n|	|	r/|	d|	d	cxkrd
krnn|
d|	zd||	|}	||	}
|
d}t|g}d}
|
ddD]?}|
|
|d}
tj|d}|dd}|dd}|d
vr|j|u|dkr|j||dkri|d}|d	kr|j|df|j|d|||dzdf|dkr|j|'|dkr|j|I|dkr|j|k|dkr|j||dkr|j||dkr	|j}
|dkr	|j}
|dkr	|j}
|dkr%|j||s|j}
|dvr|j|'|
d|zA||	|n#|wxYw|S)z3Reads a Setup file and returns Extension instances.r)parse_makefileexpand_makefile_vars_variable_rx)TextFile)split_quoted)strip_commentsskip_blanks
join_lines	lstrip_ws	rstrip_wsTN*z'%s' lines not handled yet)z.cz.ccz.cppz.cxxz.c++z.mz.mmz-Iz-D=z-Uz-Cz-lz-Lz-Rz-rpathz-Xlinkerz
-Xcompilerz-u)z.az.soz.slz.oz.dylibzunrecognized argument '%s')distutils.sysconfigr:r;r<distutils.text_filer=distutils.utilr>readlinematchr*rappendospathsplitextrrfindrrrrrrr rclose)filenamer:r;r<r=r>varsfile
extensionslinewordsmoduleextappend_next_wordwordsuffixswitchvalueequalss                   rread_setup_filerbs$VVVVVVVVVV,,,,,,++++++>(##D8
DQ
L	#==??D|!!$''
Aw$r())))c)))))		6=>>>''d33D L&&E1XFFB''C#abb	2
C2
C#/$++D111'+$))$//2acQRROOOK&&t,,,,t^^$++E2222t^^"ZZ__F||)00%????)00%&/5RSCV1WXXXXt^^$++E2222t^^*11$7777t^^M((////t^^$++E2222t^^,33E::::X%%'*'?$$Z'''*':$$\))'*'=$$t^^'..t444 ?+.+>(CCC
%,,T2222II:TABBBBc"""YL	#V	



sK9MM)r8rOr)rrbrr
rrcsr

			z
z
z
z
z
z
z
z
zgggggr
PK{5ZGTDNLib/site-packages/setuptools/_distutils/__pycache__/py39compat.cpython-311.pycnuW+A

`;dfddlZddlZdZejdkoejdkZerendZdS)Ncpddl}|d}|||dS)z?
    Ensure vars contains 'EXT_SUFFIX'. pypa/distutils#130
    rN)
EXT_SUFFIXSO)_impextension_suffixesupdate)varsr
ext_suffixs   oE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/py39compat.pyadd_ext_suffix_39rsPKKK((**1-JKK)
WindowscdS)N)r	s rrsr
)sysplatformrversion_infosystemneeds_ext_suffixadd_ext_suffixrr
rrsb






 #g-P/(/2C2Cy2P&6M""/dumb", "build/bdist./rpm", etc.)
        if self.bdist_base is None:
            build_base = self.get_finalized_command('build').build_base
            self.bdist_base = os.path.join(build_base, 'bdist.' + self.plat_name)

        self.ensure_string_list('formats')
        if self.formats is None:
            try:
                self.formats = [self.default_format[os.name]]
            except KeyError:
                raise DistutilsPlatformError(
                    "don't know how to create built distributions "
                    "on platform %s" % os.name
                )

        if self.dist_dir is None:
            self.dist_dir = "dist"

    def run(self):
        # Figure out which sub-commands we need to run.
        commands = []
        for format in self.formats:
            try:
                commands.append(self.format_commands[format][0])
            except KeyError:
                raise DistutilsOptionError("invalid format '%s'" % format)

        # Reinitialize and run each command.
        for i in range(len(self.formats)):
            cmd_name = commands[i]
            sub_cmd = self.reinitialize_command(cmd_name)
            if cmd_name not in self.no_format_option:
                sub_cmd.format = self.formats[i]

            # passing the owner and group names for tar archiving
            if cmd_name == 'bdist_dumb':
                sub_cmd.owner = self.owner
                sub_cmd.group = self.group

            # If we're going to need to run this command again, tell it to
            # keep its temporary files around so subsequent runs go faster.
            if cmd_name in commands[i + 1 :]:
                sub_cmd.keep_temp = 1
            self.run_command(cmd_name)
PK{5Z<@@;Lib/site-packages/setuptools/_distutils/command/build_py.pynuW+A"""distutils.command.build_py

Implements the Distutils 'build_py' command."""

import os
import importlib.util
import sys
import glob

from distutils.core import Command
from distutils.errors import DistutilsOptionError, DistutilsFileError
from distutils.util import convert_path
from distutils import log


class build_py(Command):

    description = "\"build\" pure Python modules (copy to build directory)"

    user_options = [
        ('build-lib=', 'd', "directory to \"build\" (copy) to"),
        ('compile', 'c', "compile .py to .pyc"),
        ('no-compile', None, "don't compile .py files [default]"),
        (
            'optimize=',
            'O',
            "also compile with optimization: -O1 for \"python -O\", "
            "-O2 for \"python -OO\", and -O0 to disable [default: -O0]",
        ),
        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
    ]

    boolean_options = ['compile', 'force']
    negative_opt = {'no-compile': 'compile'}

    def initialize_options(self):
        self.build_lib = None
        self.py_modules = None
        self.package = None
        self.package_data = None
        self.package_dir = None
        self.compile = 0
        self.optimize = 0
        self.force = None

    def finalize_options(self):
        self.set_undefined_options(
            'build', ('build_lib', 'build_lib'), ('force', 'force')
        )

        # Get the distribution options that are aliases for build_py
        # options -- list of packages and list of modules.
        self.packages = self.distribution.packages
        self.py_modules = self.distribution.py_modules
        self.package_data = self.distribution.package_data
        self.package_dir = {}
        if self.distribution.package_dir:
            for name, path in self.distribution.package_dir.items():
                self.package_dir[name] = convert_path(path)
        self.data_files = self.get_data_files()

        # Ick, copied straight from install_lib.py (fancy_getopt needs a
        # type system!  Hell, *everything* needs a type system!!!)
        if not isinstance(self.optimize, int):
            try:
                self.optimize = int(self.optimize)
                assert 0 <= self.optimize <= 2
            except (ValueError, AssertionError):
                raise DistutilsOptionError("optimize must be 0, 1, or 2")

    def run(self):
        # XXX copy_file by default preserves atime and mtime.  IMHO this is
        # the right thing to do, but perhaps it should be an option -- in
        # particular, a site administrator might want installed files to
        # reflect the time of installation rather than the last
        # modification time before the installed release.

        # XXX copy_file by default preserves mode, which appears to be the
        # wrong thing to do: if a file is read-only in the working
        # directory, we want it to be installed read/write so that the next
        # installation of the same module distribution can overwrite it
        # without problems.  (This might be a Unix-specific issue.)  Thus
        # we turn off 'preserve_mode' when copying to the build directory,
        # since the build directory is supposed to be exactly what the
        # installation will look like (ie. we preserve mode when
        # installing).

        # Two options control which modules will be installed: 'packages'
        # and 'py_modules'.  The former lets us work with whole packages, not
        # specifying individual modules at all; the latter is for
        # specifying modules one-at-a-time.

        if self.py_modules:
            self.build_modules()
        if self.packages:
            self.build_packages()
            self.build_package_data()

        self.byte_compile(self.get_outputs(include_bytecode=0))

    def get_data_files(self):
        """Generate list of '(package,src_dir,build_dir,filenames)' tuples"""
        data = []
        if not self.packages:
            return data
        for package in self.packages:
            # Locate package source directory
            src_dir = self.get_package_dir(package)

            # Compute package build directory
            build_dir = os.path.join(*([self.build_lib] + package.split('.')))

            # Length of path to strip from found files
            plen = 0
            if src_dir:
                plen = len(src_dir) + 1

            # Strip directory from globbed filenames
            filenames = [file[plen:] for file in self.find_data_files(package, src_dir)]
            data.append((package, src_dir, build_dir, filenames))
        return data

    def find_data_files(self, package, src_dir):
        """Return filenames for package's data files in 'src_dir'"""
        globs = self.package_data.get('', []) + self.package_data.get(package, [])
        files = []
        for pattern in globs:
            # Each pattern has to be converted to a platform-specific path
            filelist = glob.glob(
                os.path.join(glob.escape(src_dir), convert_path(pattern))
            )
            # Files that match more than one pattern are only added once
            files.extend(
                [fn for fn in filelist if fn not in files and os.path.isfile(fn)]
            )
        return files

    def build_package_data(self):
        """Copy data files into build directory"""
        for package, src_dir, build_dir, filenames in self.data_files:
            for filename in filenames:
                target = os.path.join(build_dir, filename)
                self.mkpath(os.path.dirname(target))
                self.copy_file(
                    os.path.join(src_dir, filename), target, preserve_mode=False
                )

    def get_package_dir(self, package):
        """Return the directory, relative to the top of the source
        distribution, where package 'package' should be found
        (at least according to the 'package_dir' option, if any)."""
        path = package.split('.')

        if not self.package_dir:
            if path:
                return os.path.join(*path)
            else:
                return ''
        else:
            tail = []
            while path:
                try:
                    pdir = self.package_dir['.'.join(path)]
                except KeyError:
                    tail.insert(0, path[-1])
                    del path[-1]
                else:
                    tail.insert(0, pdir)
                    return os.path.join(*tail)
            else:
                # Oops, got all the way through 'path' without finding a
                # match in package_dir.  If package_dir defines a directory
                # for the root (nameless) package, then fallback on it;
                # otherwise, we might as well have not consulted
                # package_dir at all, as we just use the directory implied
                # by 'tail' (which should be the same as the original value
                # of 'path' at this point).
                pdir = self.package_dir.get('')
                if pdir is not None:
                    tail.insert(0, pdir)

                if tail:
                    return os.path.join(*tail)
                else:
                    return ''

    def check_package(self, package, package_dir):
        # Empty dir name means current directory, which we can probably
        # assume exists.  Also, os.path.exists and isdir don't know about
        # my "empty string means current dir" convention, so we have to
        # circumvent them.
        if package_dir != "":
            if not os.path.exists(package_dir):
                raise DistutilsFileError(
                    "package directory '%s' does not exist" % package_dir
                )
            if not os.path.isdir(package_dir):
                raise DistutilsFileError(
                    "supposed package directory '%s' exists, "
                    "but is not a directory" % package_dir
                )

        # Directories without __init__.py are namespace packages (PEP 420).
        if package:
            init_py = os.path.join(package_dir, "__init__.py")
            if os.path.isfile(init_py):
                return init_py

        # Either not in a package at all (__init__.py not expected), or
        # __init__.py doesn't exist -- so don't return the filename.
        return None

    def check_module(self, module, module_file):
        if not os.path.isfile(module_file):
            log.warn("file %s (for module %s) not found", module_file, module)
            return False
        else:
            return True

    def find_package_modules(self, package, package_dir):
        self.check_package(package, package_dir)
        module_files = glob.glob(os.path.join(glob.escape(package_dir), "*.py"))
        modules = []
        setup_script = os.path.abspath(self.distribution.script_name)

        for f in module_files:
            abs_f = os.path.abspath(f)
            if abs_f != setup_script:
                module = os.path.splitext(os.path.basename(f))[0]
                modules.append((package, module, f))
            else:
                self.debug_print("excluding %s" % setup_script)
        return modules

    def find_modules(self):
        """Finds individually-specified Python modules, ie. those listed by
        module name in 'self.py_modules'.  Returns a list of tuples (package,
        module_base, filename): 'package' is a tuple of the path through
        package-space to the module; 'module_base' is the bare (no
        packages, no dots) module name, and 'filename' is the path to the
        ".py" file (relative to the distribution root) that implements the
        module.
        """
        # Map package names to tuples of useful info about the package:
        #    (package_dir, checked)
        # package_dir - the directory where we'll find source files for
        #   this package
        # checked - true if we have checked that the package directory
        #   is valid (exists, contains __init__.py, ... ?)
        packages = {}

        # List of (package, module, filename) tuples to return
        modules = []

        # We treat modules-in-packages almost the same as toplevel modules,
        # just the "package" for a toplevel is empty (either an empty
        # string or empty list, depending on context).  Differences:
        #   - don't check for __init__.py in directory for empty package
        for module in self.py_modules:
            path = module.split('.')
            package = '.'.join(path[0:-1])
            module_base = path[-1]

            try:
                (package_dir, checked) = packages[package]
            except KeyError:
                package_dir = self.get_package_dir(package)
                checked = 0

            if not checked:
                init_py = self.check_package(package, package_dir)
                packages[package] = (package_dir, 1)
                if init_py:
                    modules.append((package, "__init__", init_py))

            # XXX perhaps we should also check for just .pyc files
            # (so greedy closed-source bastards can distribute Python
            # modules too)
            module_file = os.path.join(package_dir, module_base + ".py")
            if not self.check_module(module, module_file):
                continue

            modules.append((package, module_base, module_file))

        return modules

    def find_all_modules(self):
        """Compute the list of all modules that will be built, whether
        they are specified one-module-at-a-time ('self.py_modules') or
        by whole packages ('self.packages').  Return a list of tuples
        (package, module, module_file), just like 'find_modules()' and
        'find_package_modules()' do."""
        modules = []
        if self.py_modules:
            modules.extend(self.find_modules())
        if self.packages:
            for package in self.packages:
                package_dir = self.get_package_dir(package)
                m = self.find_package_modules(package, package_dir)
                modules.extend(m)
        return modules

    def get_source_files(self):
        return [module[-1] for module in self.find_all_modules()]

    def get_module_outfile(self, build_dir, package, module):
        outfile_path = [build_dir] + list(package) + [module + ".py"]
        return os.path.join(*outfile_path)

    def get_outputs(self, include_bytecode=1):
        modules = self.find_all_modules()
        outputs = []
        for (package, module, module_file) in modules:
            package = package.split('.')
            filename = self.get_module_outfile(self.build_lib, package, module)
            outputs.append(filename)
            if include_bytecode:
                if self.compile:
                    outputs.append(
                        importlib.util.cache_from_source(filename, optimization='')
                    )
                if self.optimize > 0:
                    outputs.append(
                        importlib.util.cache_from_source(
                            filename, optimization=self.optimize
                        )
                    )

        outputs += [
            os.path.join(build_dir, filename)
            for package, src_dir, build_dir, filenames in self.data_files
            for filename in filenames
        ]

        return outputs

    def build_module(self, module, module_file, package):
        if isinstance(package, str):
            package = package.split('.')
        elif not isinstance(package, (list, tuple)):
            raise TypeError(
                "'package' must be a string (dot-separated), list, or tuple"
            )

        # Now put the module source file into the "build" area -- this is
        # easy, we just copy it somewhere under self.build_lib (the build
        # directory for Python source).
        outfile = self.get_module_outfile(self.build_lib, package, module)
        dir = os.path.dirname(outfile)
        self.mkpath(dir)
        return self.copy_file(module_file, outfile, preserve_mode=0)

    def build_modules(self):
        modules = self.find_modules()
        for (package, module, module_file) in modules:
            # Now "build" the module -- ie. copy the source file to
            # self.build_lib (the build directory for Python source).
            # (Actually, it gets copied to the directory for this package
            # under self.build_lib.)
            self.build_module(module, module_file, package)

    def build_packages(self):
        for package in self.packages:
            # Get list of (package, module, module_file) tuples based on
            # scanning the package directory.  'package' is only included
            # in the tuple so that 'find_modules()' and
            # 'find_package_tuples()' have a consistent interface; it's
            # ignored here (apart from a sanity check).  Also, 'module' is
            # the *unqualified* module name (ie. no dots, no package -- we
            # already know its package!), and 'module_file' is the path to
            # the .py file, relative to the current directory
            # (ie. including 'package_dir').
            package_dir = self.get_package_dir(package)
            modules = self.find_package_modules(package, package_dir)

            # Now loop over the modules we found, "building" each one (just
            # copy it to self.build_lib).
            for (package_, module, module_file) in modules:
                assert package == package_
                self.build_module(module, module_file, package)

    def byte_compile(self, files):
        if sys.dont_write_bytecode:
            self.warn('byte-compiling is disabled, skipping.')
            return

        from distutils.util import byte_compile

        prefix = self.build_lib
        if prefix[-1] != os.sep:
            prefix = prefix + os.sep

        # XXX this code is essentially the same as the 'byte_compile()
        # method of the "install_lib" command, except for the determination
        # of the 'prefix' string.  Hmmm.
        if self.compile:
            byte_compile(
                files, optimize=0, force=self.force, prefix=prefix, dry_run=self.dry_run
            )
        if self.optimize > 0:
            byte_compile(
                files,
                optimize=self.optimize,
                force=self.force,
                prefix=prefix,
                dry_run=self.dry_run,
            )
PK{5ZTeBLib/site-packages/setuptools/_distutils/command/install_headers.pynuW+A"""distutils.command.install_headers

Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory."""

from distutils.core import Command


# XXX force is never used
class install_headers(Command):

    description = "install C/C++ header files"

    user_options = [
        ('install-dir=', 'd', "directory to install header files to"),
        ('force', 'f', "force installation (overwrite existing files)"),
    ]

    boolean_options = ['force']

    def initialize_options(self):
        self.install_dir = None
        self.force = 0
        self.outfiles = []

    def finalize_options(self):
        self.set_undefined_options(
            'install', ('install_headers', 'install_dir'), ('force', 'force')
        )

    def run(self):
        headers = self.distribution.headers
        if not headers:
            return

        self.mkpath(self.install_dir)
        for header in headers:
            (out, _) = self.copy_file(header, self.install_dir)
            self.outfiles.append(out)

    def get_inputs(self):
        return self.distribution.headers or []

    def get_outputs(self):
        return self.outfiles
PK{5ZRxc8Lib/site-packages/setuptools/_distutils/command/build.pynuW+A"""distutils.command.build

Implements the Distutils 'build' command."""

import sys
import os
from distutils.core import Command
from distutils.errors import DistutilsOptionError
from distutils.util import get_platform


def show_compilers():
    from distutils.ccompiler import show_compilers

    show_compilers()


class build(Command):

    description = "build everything needed to install"

    user_options = [
        ('build-base=', 'b', "base directory for build library"),
        ('build-purelib=', None, "build directory for platform-neutral distributions"),
        ('build-platlib=', None, "build directory for platform-specific distributions"),
        (
            'build-lib=',
            None,
            "build directory for all distribution (defaults to either "
            + "build-purelib or build-platlib",
        ),
        ('build-scripts=', None, "build directory for scripts"),
        ('build-temp=', 't', "temporary build directory"),
        (
            'plat-name=',
            'p',
            "platform name to build for, if supported "
            "(default: %s)" % get_platform(),
        ),
        ('compiler=', 'c', "specify the compiler type"),
        ('parallel=', 'j', "number of parallel build jobs"),
        ('debug', 'g', "compile extensions and libraries with debugging information"),
        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
        ('executable=', 'e', "specify final destination interpreter path (build.py)"),
    ]

    boolean_options = ['debug', 'force']

    help_options = [
        ('help-compiler', None, "list available compilers", show_compilers),
    ]

    def initialize_options(self):
        self.build_base = 'build'
        # these are decided only after 'build_base' has its final value
        # (unless overridden by the user or client)
        self.build_purelib = None
        self.build_platlib = None
        self.build_lib = None
        self.build_temp = None
        self.build_scripts = None
        self.compiler = None
        self.plat_name = None
        self.debug = None
        self.force = 0
        self.executable = None
        self.parallel = None

    def finalize_options(self):  # noqa: C901
        if self.plat_name is None:
            self.plat_name = get_platform()
        else:
            # plat-name only supported for windows (other platforms are
            # supported via ./configure flags, if at all).  Avoid misleading
            # other platforms.
            if os.name != 'nt':
                raise DistutilsOptionError(
                    "--plat-name only supported on Windows (try "
                    "using './configure --help' on your platform)"
                )

        plat_specifier = ".{}-{}".format(self.plat_name, sys.implementation.cache_tag)

        # Make it so Python 2.x and Python 2.x with --with-pydebug don't
        # share the same build directories. Doing so confuses the build
        # process for C modules
        if hasattr(sys, 'gettotalrefcount'):
            plat_specifier += '-pydebug'

        # 'build_purelib' and 'build_platlib' just default to 'lib' and
        # 'lib.' under the base build directory.  We only use one of
        # them for a given distribution, though --
        if self.build_purelib is None:
            self.build_purelib = os.path.join(self.build_base, 'lib')
        if self.build_platlib is None:
            self.build_platlib = os.path.join(self.build_base, 'lib' + plat_specifier)

        # 'build_lib' is the actual directory that we will use for this
        # particular module distribution -- if user didn't supply it, pick
        # one of 'build_purelib' or 'build_platlib'.
        if self.build_lib is None:
            if self.distribution.has_ext_modules():
                self.build_lib = self.build_platlib
            else:
                self.build_lib = self.build_purelib

        # 'build_temp' -- temporary directory for compiler turds,
        # "build/temp."
        if self.build_temp is None:
            self.build_temp = os.path.join(self.build_base, 'temp' + plat_specifier)
        if self.build_scripts is None:
            self.build_scripts = os.path.join(
                self.build_base, 'scripts-%d.%d' % sys.version_info[:2]
            )

        if self.executable is None and sys.executable:
            self.executable = os.path.normpath(sys.executable)

        if isinstance(self.parallel, str):
            try:
                self.parallel = int(self.parallel)
            except ValueError:
                raise DistutilsOptionError("parallel should be an integer")

    def run(self):
        # Run all relevant sub-commands.  This will be some subset of:
        #  - build_py      - pure Python modules
        #  - build_clib    - standalone C libraries
        #  - build_ext     - Python extensions
        #  - build_scripts - (Python) scripts
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

    # -- Predicates for the sub-command list ---------------------------

    def has_pure_modules(self):
        return self.distribution.has_pure_modules()

    def has_c_libraries(self):
        return self.distribution.has_c_libraries()

    def has_ext_modules(self):
        return self.distribution.has_ext_modules()

    def has_scripts(self):
        return self.distribution.has_scripts()

    sub_commands = [
        ('build_py', has_pure_modules),
        ('build_clib', has_c_libraries),
        ('build_ext', has_ext_modules),
        ('build_scripts', has_scripts),
    ]
PK{5Z

?Lib/site-packages/setuptools/_distutils/command/install_data.pynuW+A"""distutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files."""

# contributed by Bastian Kleineidam

import os
from distutils.core import Command
from distutils.util import change_root, convert_path


class install_data(Command):

    description = "install data files"

    user_options = [
        (
            'install-dir=',
            'd',
            "base directory for installing data files "
            "(default: installation base dir)",
        ),
        ('root=', None, "install everything relative to this alternate root directory"),
        ('force', 'f', "force installation (overwrite existing files)"),
    ]

    boolean_options = ['force']

    def initialize_options(self):
        self.install_dir = None
        self.outfiles = []
        self.root = None
        self.force = 0
        self.data_files = self.distribution.data_files
        self.warn_dir = 1

    def finalize_options(self):
        self.set_undefined_options(
            'install',
            ('install_data', 'install_dir'),
            ('root', 'root'),
            ('force', 'force'),
        )

    def run(self):
        self.mkpath(self.install_dir)
        for f in self.data_files:
            if isinstance(f, str):
                # it's a simple file, so copy it
                f = convert_path(f)
                if self.warn_dir:
                    self.warn(
                        "setup script did not provide a directory for "
                        "'%s' -- installing right in '%s'" % (f, self.install_dir)
                    )
                (out, _) = self.copy_file(f, self.install_dir)
                self.outfiles.append(out)
            else:
                # it's a tuple with path to install to and a list of files
                dir = convert_path(f[0])
                if not os.path.isabs(dir):
                    dir = os.path.join(self.install_dir, dir)
                elif self.root:
                    dir = change_root(self.root, dir)
                self.mkpath(dir)

                if f[1] == []:
                    # If there are no files listed, the user must be
                    # trying to create an empty directory, so add the
                    # directory to the list of output files.
                    self.outfiles.append(dir)
                else:
                    # Copy files, adding them to the list of output files.
                    for data in f[1]:
                        data = convert_path(data)
                        (out, _) = self.copy_file(data, dir)
                        self.outfiles.append(out)

    def get_inputs(self):
        return self.data_files or []

    def get_outputs(self):
        return self.outfiles
PK{5ZP)K)K8Lib/site-packages/setuptools/_distutils/command/sdist.pynuW+A"""distutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution)."""

import os
import sys
from glob import glob
from warnings import warn

from distutils.core import Command
from distutils import dir_util
from distutils import file_util
from distutils import archive_util
from distutils.text_file import TextFile
from distutils.filelist import FileList
from distutils import log
from distutils.util import convert_path
from distutils.errors import DistutilsOptionError, DistutilsTemplateError


def show_formats():
    """Print all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    """
    from distutils.fancy_getopt import FancyGetopt
    from distutils.archive_util import ARCHIVE_FORMATS

    formats = []
    for format in ARCHIVE_FORMATS.keys():
        formats.append(("formats=" + format, None, ARCHIVE_FORMATS[format][2]))
    formats.sort()
    FancyGetopt(formats).print_help("List of available source distribution formats:")


class sdist(Command):

    description = "create a source distribution (tarball, zip file, etc.)"

    def checking_metadata(self):
        """Callable used for the check sub-command.

        Placed here so user_options can view it"""
        return self.metadata_check

    user_options = [
        ('template=', 't', "name of manifest template file [default: MANIFEST.in]"),
        ('manifest=', 'm', "name of manifest file [default: MANIFEST]"),
        (
            'use-defaults',
            None,
            "include the default file set in the manifest "
            "[default; disable with --no-defaults]",
        ),
        ('no-defaults', None, "don't include the default file set"),
        (
            'prune',
            None,
            "specifically exclude files/directories that should not be "
            "distributed (build tree, RCS/CVS dirs, etc.) "
            "[default; disable with --no-prune]",
        ),
        ('no-prune', None, "don't automatically exclude anything"),
        (
            'manifest-only',
            'o',
            "just regenerate the manifest and then stop " "(implies --force-manifest)",
        ),
        (
            'force-manifest',
            'f',
            "forcibly regenerate the manifest and carry on as usual. "
            "Deprecated: now the manifest is always regenerated.",
        ),
        ('formats=', None, "formats for source distribution (comma-separated list)"),
        (
            'keep-temp',
            'k',
            "keep the distribution tree around after creating " + "archive file(s)",
        ),
        (
            'dist-dir=',
            'd',
            "directory to put the source distribution archive(s) in " "[default: dist]",
        ),
        (
            'metadata-check',
            None,
            "Ensure that all required elements of meta-data "
            "are supplied. Warn if any missing. [default]",
        ),
        (
            'owner=',
            'u',
            "Owner name used when creating a tar file [default: current user]",
        ),
        (
            'group=',
            'g',
            "Group name used when creating a tar file [default: current group]",
        ),
    ]

    boolean_options = [
        'use-defaults',
        'prune',
        'manifest-only',
        'force-manifest',
        'keep-temp',
        'metadata-check',
    ]

    help_options = [
        ('help-formats', None, "list available distribution formats", show_formats),
    ]

    negative_opt = {'no-defaults': 'use-defaults', 'no-prune': 'prune'}

    sub_commands = [('check', checking_metadata)]

    READMES = ('README', 'README.txt', 'README.rst')

    def initialize_options(self):
        # 'template' and 'manifest' are, respectively, the names of
        # the manifest template and manifest file.
        self.template = None
        self.manifest = None

        # 'use_defaults': if true, we will include the default file set
        # in the manifest
        self.use_defaults = 1
        self.prune = 1

        self.manifest_only = 0
        self.force_manifest = 0

        self.formats = ['gztar']
        self.keep_temp = 0
        self.dist_dir = None

        self.archive_files = None
        self.metadata_check = 1
        self.owner = None
        self.group = None

    def finalize_options(self):
        if self.manifest is None:
            self.manifest = "MANIFEST"
        if self.template is None:
            self.template = "MANIFEST.in"

        self.ensure_string_list('formats')

        bad_format = archive_util.check_archive_formats(self.formats)
        if bad_format:
            raise DistutilsOptionError("unknown archive format '%s'" % bad_format)

        if self.dist_dir is None:
            self.dist_dir = "dist"

    def run(self):
        # 'filelist' contains the list of files that will make up the
        # manifest
        self.filelist = FileList()

        # Run sub commands
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        # Do whatever it takes to get the list of files to process
        # (process the manifest template, read an existing manifest,
        # whatever).  File list is accumulated in 'self.filelist'.
        self.get_file_list()

        # If user just wanted us to regenerate the manifest, stop now.
        if self.manifest_only:
            return

        # Otherwise, go ahead and create the source distribution tarball,
        # or zipfile, or whatever.
        self.make_distribution()

    def check_metadata(self):
        """Deprecated API."""
        warn(
            "distutils.command.sdist.check_metadata is deprecated, \
              use the check command instead",
            PendingDeprecationWarning,
        )
        check = self.distribution.get_command_obj('check')
        check.ensure_finalized()
        check.run()

    def get_file_list(self):
        """Figure out the list of files to include in the source
        distribution, and put it in 'self.filelist'.  This might involve
        reading the manifest template (and writing the manifest), or just
        reading the manifest, or just using the default file set -- it all
        depends on the user's options.
        """
        # new behavior when using a template:
        # the file list is recalculated every time because
        # even if MANIFEST.in or setup.py are not changed
        # the user might have added some files in the tree that
        # need to be included.
        #
        #  This makes --force the default and only behavior with templates.
        template_exists = os.path.isfile(self.template)
        if not template_exists and self._manifest_is_not_generated():
            self.read_manifest()
            self.filelist.sort()
            self.filelist.remove_duplicates()
            return

        if not template_exists:
            self.warn(
                ("manifest template '%s' does not exist " + "(using default file list)")
                % self.template
            )
        self.filelist.findall()

        if self.use_defaults:
            self.add_defaults()

        if template_exists:
            self.read_template()

        if self.prune:
            self.prune_file_list()

        self.filelist.sort()
        self.filelist.remove_duplicates()
        self.write_manifest()

    def add_defaults(self):
        """Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        """
        self._add_defaults_standards()
        self._add_defaults_optional()
        self._add_defaults_python()
        self._add_defaults_data_files()
        self._add_defaults_ext()
        self._add_defaults_c_libs()
        self._add_defaults_scripts()

    @staticmethod
    def _cs_path_exists(fspath):
        """
        Case-sensitive path existence check

        >>> sdist._cs_path_exists(__file__)
        True
        >>> sdist._cs_path_exists(__file__.upper())
        False
        """
        if not os.path.exists(fspath):
            return False
        # make absolute so we always have a directory
        abspath = os.path.abspath(fspath)
        directory, filename = os.path.split(abspath)
        return filename in os.listdir(directory)

    def _add_defaults_standards(self):
        standards = [self.READMES, self.distribution.script_name]
        for fn in standards:
            if isinstance(fn, tuple):
                alts = fn
                got_it = False
                for fn in alts:
                    if self._cs_path_exists(fn):
                        got_it = True
                        self.filelist.append(fn)
                        break

                if not got_it:
                    self.warn(
                        "standard file not found: should have one of " + ', '.join(alts)
                    )
            else:
                if self._cs_path_exists(fn):
                    self.filelist.append(fn)
                else:
                    self.warn("standard file '%s' not found" % fn)

    def _add_defaults_optional(self):
        optional = ['test/test*.py', 'setup.cfg']
        for pattern in optional:
            files = filter(os.path.isfile, glob(pattern))
            self.filelist.extend(files)

    def _add_defaults_python(self):
        # build_py is used to get:
        #  - python modules
        #  - files defined in package_data
        build_py = self.get_finalized_command('build_py')

        # getting python files
        if self.distribution.has_pure_modules():
            self.filelist.extend(build_py.get_source_files())

        # getting package_data files
        # (computed in build_py.data_files by build_py.finalize_options)
        for pkg, src_dir, build_dir, filenames in build_py.data_files:
            for filename in filenames:
                self.filelist.append(os.path.join(src_dir, filename))

    def _add_defaults_data_files(self):
        # getting distribution.data_files
        if self.distribution.has_data_files():
            for item in self.distribution.data_files:
                if isinstance(item, str):
                    # plain file
                    item = convert_path(item)
                    if os.path.isfile(item):
                        self.filelist.append(item)
                else:
                    # a (dirname, filenames) tuple
                    dirname, filenames = item
                    for f in filenames:
                        f = convert_path(f)
                        if os.path.isfile(f):
                            self.filelist.append(f)

    def _add_defaults_ext(self):
        if self.distribution.has_ext_modules():
            build_ext = self.get_finalized_command('build_ext')
            self.filelist.extend(build_ext.get_source_files())

    def _add_defaults_c_libs(self):
        if self.distribution.has_c_libraries():
            build_clib = self.get_finalized_command('build_clib')
            self.filelist.extend(build_clib.get_source_files())

    def _add_defaults_scripts(self):
        if self.distribution.has_scripts():
            build_scripts = self.get_finalized_command('build_scripts')
            self.filelist.extend(build_scripts.get_source_files())

    def read_template(self):
        """Read and parse manifest template file named by self.template.

        (usually "MANIFEST.in") The parsing and processing is done by
        'self.filelist', which updates itself accordingly.
        """
        log.info("reading manifest template '%s'", self.template)
        template = TextFile(
            self.template,
            strip_comments=1,
            skip_blanks=1,
            join_lines=1,
            lstrip_ws=1,
            rstrip_ws=1,
            collapse_join=1,
        )

        try:
            while True:
                line = template.readline()
                if line is None:  # end of file
                    break

                try:
                    self.filelist.process_template_line(line)
                # the call above can raise a DistutilsTemplateError for
                # malformed lines, or a ValueError from the lower-level
                # convert_path function
                except (DistutilsTemplateError, ValueError) as msg:
                    self.warn(
                        "%s, line %d: %s"
                        % (template.filename, template.current_line, msg)
                    )
        finally:
            template.close()

    def prune_file_list(self):
        """Prune off branches that might slip into the file list as created
        by 'read_template()', but really don't belong there:
          * the build tree (typically "build")
          * the release tree itself (only an issue if we ran "sdist"
            previously with --keep-temp, or it aborted)
          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
        """
        build = self.get_finalized_command('build')
        base_dir = self.distribution.get_fullname()

        self.filelist.exclude_pattern(None, prefix=build.build_base)
        self.filelist.exclude_pattern(None, prefix=base_dir)

        if sys.platform == 'win32':
            seps = r'/|\\'
        else:
            seps = '/'

        vcs_dirs = ['RCS', 'CVS', r'\.svn', r'\.hg', r'\.git', r'\.bzr', '_darcs']
        vcs_ptrn = r'(^|{})({})({}).*'.format(seps, '|'.join(vcs_dirs), seps)
        self.filelist.exclude_pattern(vcs_ptrn, is_regex=1)

    def write_manifest(self):
        """Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        """
        if self._manifest_is_not_generated():
            log.info(
                "not writing to manually maintained "
                "manifest file '%s'" % self.manifest
            )
            return

        content = self.filelist.files[:]
        content.insert(0, '# file GENERATED by distutils, do NOT edit')
        self.execute(
            file_util.write_file,
            (self.manifest, content),
            "writing manifest file '%s'" % self.manifest,
        )

    def _manifest_is_not_generated(self):
        # check for special comment used in 3.1.3 and higher
        if not os.path.isfile(self.manifest):
            return False

        fp = open(self.manifest)
        try:
            first_line = fp.readline()
        finally:
            fp.close()
        return first_line != '# file GENERATED by distutils, do NOT edit\n'

    def read_manifest(self):
        """Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        """
        log.info("reading manifest file '%s'", self.manifest)
        with open(self.manifest) as manifest:
            for line in manifest:
                # ignore comments and blank lines
                line = line.strip()
                if line.startswith('#') or not line:
                    continue
                self.filelist.append(line)

    def make_release_tree(self, base_dir, files):
        """Create the directory tree that will become the source
        distribution archive.  All directories implied by the filenames in
        'files' are created under 'base_dir', and then we hard link or copy
        (if hard linking is unavailable) those files into place.
        Essentially, this duplicates the developer's source tree, but in a
        directory named after the distribution, containing only the files
        to be distributed.
        """
        # Create all the directories under 'base_dir' necessary to
        # put 'files' there; the 'mkpath()' is just so we don't die
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)

        # And walk over the list of files, either making a hard link (if
        # os.link exists) to each one that doesn't already exist in its
        # corresponding location under 'base_dir', or copying each file
        # that's out-of-date in 'base_dir'.  (Usually, all files will be
        # out-of-date, because by default we blow away 'base_dir' when
        # we're done making the distribution archives.)

        if hasattr(os, 'link'):  # can make hard links on this system
            link = 'hard'
            msg = "making hard links in %s..." % base_dir
        else:  # nope, have to copy
            link = None
            msg = "copying files to %s..." % base_dir

        if not files:
            log.warn("no files to distribute -- empty manifest?")
        else:
            log.info(msg)
        for file in files:
            if not os.path.isfile(file):
                log.warn("'%s' not a regular file -- skipping", file)
            else:
                dest = os.path.join(base_dir, file)
                self.copy_file(file, dest, link=link)

        self.distribution.metadata.write_pkg_info(base_dir)

    def make_distribution(self):
        """Create the source distribution(s).  First, we create the release
        tree with 'make_release_tree()'; then, we create all required
        archive files (according to 'self.formats') from the release tree.
        Finally, we clean up by blowing away the release tree (unless
        'self.keep_temp' is true).  The list of archive files created is
        stored so it can be retrieved later by 'get_archive_files()'.
        """
        # Don't warn about missing meta-data here -- should be (and is!)
        # done elsewhere.
        base_dir = self.distribution.get_fullname()
        base_name = os.path.join(self.dist_dir, base_dir)

        self.make_release_tree(base_dir, self.filelist.files)
        archive_files = []  # remember names of files we create
        # tar archive must be created last to avoid overwrite and remove
        if 'tar' in self.formats:
            self.formats.append(self.formats.pop(self.formats.index('tar')))

        for fmt in self.formats:
            file = self.make_archive(
                base_name, fmt, base_dir=base_dir, owner=self.owner, group=self.group
            )
            archive_files.append(file)
            self.distribution.dist_files.append(('sdist', '', file))

        self.archive_files = archive_files

        if not self.keep_temp:
            dir_util.remove_tree(base_dir, dry_run=self.dry_run)

    def get_archive_files(self):
        """Return the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        """
        return self.archive_files
PK{5ZK@Lib/site-packages/setuptools/_distutils/command/build_scripts.pynuW+A"""distutils.command.build_scripts

Implements the Distutils 'build_scripts' command."""

import os
import re
from stat import ST_MODE
from distutils import sysconfig
from distutils.core import Command
from distutils.dep_util import newer
from distutils.util import convert_path
from distutils import log
import tokenize

shebang_pattern = re.compile('^#!.*python[0-9.]*([ \t].*)?$')
"""
Pattern matching a Python interpreter indicated in first line of a script.
"""

# for Setuptools compatibility
first_line_re = shebang_pattern


class build_scripts(Command):

    description = "\"build\" scripts (copy and fixup #! line)"

    user_options = [
        ('build-dir=', 'd', "directory to \"build\" (copy) to"),
        ('force', 'f', "forcibly build everything (ignore file timestamps"),
        ('executable=', 'e', "specify final destination interpreter path"),
    ]

    boolean_options = ['force']

    def initialize_options(self):
        self.build_dir = None
        self.scripts = None
        self.force = None
        self.executable = None

    def finalize_options(self):
        self.set_undefined_options(
            'build',
            ('build_scripts', 'build_dir'),
            ('force', 'force'),
            ('executable', 'executable'),
        )
        self.scripts = self.distribution.scripts

    def get_source_files(self):
        return self.scripts

    def run(self):
        if not self.scripts:
            return
        self.copy_scripts()

    def copy_scripts(self):
        """
        Copy each script listed in ``self.scripts``.

        If a script is marked as a Python script (first line matches
        'shebang_pattern', i.e. starts with ``#!`` and contains
        "python"), then adjust in the copy the first line to refer to
        the current Python interpreter.
        """
        self.mkpath(self.build_dir)
        outfiles = []
        updated_files = []
        for script in self.scripts:
            self._copy_script(script, outfiles, updated_files)

        self._change_modes(outfiles)

        return outfiles, updated_files

    def _copy_script(self, script, outfiles, updated_files):  # noqa: C901
        shebang_match = None
        script = convert_path(script)
        outfile = os.path.join(self.build_dir, os.path.basename(script))
        outfiles.append(outfile)

        if not self.force and not newer(script, outfile):
            log.debug("not copying %s (up-to-date)", script)
            return

        # Always open the file, but ignore failures in dry-run mode
        # in order to attempt to copy directly.
        try:
            f = tokenize.open(script)
        except OSError:
            if not self.dry_run:
                raise
            f = None
        else:
            first_line = f.readline()
            if not first_line:
                self.warn("%s is an empty file (skipping)" % script)
                return

            shebang_match = shebang_pattern.match(first_line)

        updated_files.append(outfile)
        if shebang_match:
            log.info("copying and adjusting %s -> %s", script, self.build_dir)
            if not self.dry_run:
                if not sysconfig.python_build:
                    executable = self.executable
                else:
                    executable = os.path.join(
                        sysconfig.get_config_var("BINDIR"),
                        "python%s%s"
                        % (
                            sysconfig.get_config_var("VERSION"),
                            sysconfig.get_config_var("EXE"),
                        ),
                    )
                post_interp = shebang_match.group(1) or ''
                shebang = "#!" + executable + post_interp + "\n"
                self._validate_shebang(shebang, f.encoding)
                with open(outfile, "w", encoding=f.encoding) as outf:
                    outf.write(shebang)
                    outf.writelines(f.readlines())
            if f:
                f.close()
        else:
            if f:
                f.close()
            self.copy_file(script, outfile)

    def _change_modes(self, outfiles):
        if os.name != 'posix':
            return

        for file in outfiles:
            self._change_mode(file)

    def _change_mode(self, file):
        if self.dry_run:
            log.info("changing mode of %s", file)
            return

        oldmode = os.stat(file)[ST_MODE] & 0o7777
        newmode = (oldmode | 0o555) & 0o7777
        if newmode != oldmode:
            log.info("changing mode of %s from %o to %o", file, oldmode, newmode)
            os.chmod(file, newmode)

    @staticmethod
    def _validate_shebang(shebang, encoding):
        # Python parser starts to read a script using UTF-8 until
        # it gets a #coding:xxx cookie. The shebang has to be the
        # first line of a file, the #coding:xxx cookie cannot be
        # written before. So the shebang has to be encodable to
        # UTF-8.
        try:
            shebang.encode('utf-8')
        except UnicodeEncodeError:
            raise ValueError(
                "The shebang ({!r}) is not encodable " "to utf-8".format(shebang)
            )

        # If the script is encoded to a custom encoding (use a
        # #coding:xxx cookie), the shebang has to be encodable to
        # the script encoding too.
        try:
            shebang.encode(encoding)
        except UnicodeEncodeError:
            raise ValueError(
                "The shebang ({!r}) is not encodable "
                "to the script encoding ({})".format(shebang, encoding)
            )
PK{5Z	  >Lib/site-packages/setuptools/_distutils/command/install_lib.pynuW+A"""distutils.command.install_lib

Implements the Distutils 'install_lib' command
(install all Python modules)."""

import os
import importlib.util
import sys

from distutils.core import Command
from distutils.errors import DistutilsOptionError


# Extension for Python source files.
PYTHON_SOURCE_EXTENSION = ".py"


class install_lib(Command):

    description = "install all Python modules (extensions and pure Python)"

    # The byte-compilation options are a tad confusing.  Here are the
    # possible scenarios:
    #   1) no compilation at all (--no-compile --no-optimize)
    #   2) compile .pyc only (--compile --no-optimize; default)
    #   3) compile .pyc and "opt-1" .pyc (--compile --optimize)
    #   4) compile "opt-1" .pyc only (--no-compile --optimize)
    #   5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
    #   6) compile "opt-2" .pyc only (--no-compile --optimize-more)
    #
    # The UI for this is two options, 'compile' and 'optimize'.
    # 'compile' is strictly boolean, and only decides whether to
    # generate .pyc files.  'optimize' is three-way (0, 1, or 2), and
    # decides both whether to generate .pyc files and what level of
    # optimization to use.

    user_options = [
        ('install-dir=', 'd', "directory to install to"),
        ('build-dir=', 'b', "build directory (where to install from)"),
        ('force', 'f', "force installation (overwrite existing files)"),
        ('compile', 'c', "compile .py to .pyc [default]"),
        ('no-compile', None, "don't compile .py files"),
        (
            'optimize=',
            'O',
            "also compile with optimization: -O1 for \"python -O\", "
            "-O2 for \"python -OO\", and -O0 to disable [default: -O0]",
        ),
        ('skip-build', None, "skip the build steps"),
    ]

    boolean_options = ['force', 'compile', 'skip-build']
    negative_opt = {'no-compile': 'compile'}

    def initialize_options(self):
        # let the 'install' command dictate our installation directory
        self.install_dir = None
        self.build_dir = None
        self.force = 0
        self.compile = None
        self.optimize = None
        self.skip_build = None

    def finalize_options(self):
        # Get all the information we need to install pure Python modules
        # from the umbrella 'install' command -- build (source) directory,
        # install (target) directory, and whether to compile .py files.
        self.set_undefined_options(
            'install',
            ('build_lib', 'build_dir'),
            ('install_lib', 'install_dir'),
            ('force', 'force'),
            ('compile', 'compile'),
            ('optimize', 'optimize'),
            ('skip_build', 'skip_build'),
        )

        if self.compile is None:
            self.compile = True
        if self.optimize is None:
            self.optimize = False

        if not isinstance(self.optimize, int):
            try:
                self.optimize = int(self.optimize)
                if self.optimize not in (0, 1, 2):
                    raise AssertionError
            except (ValueError, AssertionError):
                raise DistutilsOptionError("optimize must be 0, 1, or 2")

    def run(self):
        # Make sure we have built everything we need first
        self.build()

        # Install everything: simply dump the entire contents of the build
        # directory to the installation directory (that's the beauty of
        # having a build directory!)
        outfiles = self.install()

        # (Optionally) compile .py to .pyc
        if outfiles is not None and self.distribution.has_pure_modules():
            self.byte_compile(outfiles)

    # -- Top-level worker functions ------------------------------------
    # (called from 'run()')

    def build(self):
        if not self.skip_build:
            if self.distribution.has_pure_modules():
                self.run_command('build_py')
            if self.distribution.has_ext_modules():
                self.run_command('build_ext')

    def install(self):
        if os.path.isdir(self.build_dir):
            outfiles = self.copy_tree(self.build_dir, self.install_dir)
        else:
            self.warn(
                "'%s' does not exist -- no Python modules to install" % self.build_dir
            )
            return
        return outfiles

    def byte_compile(self, files):
        if sys.dont_write_bytecode:
            self.warn('byte-compiling is disabled, skipping.')
            return

        from distutils.util import byte_compile

        # Get the "--root" directory supplied to the "install" command,
        # and use it as a prefix to strip off the purported filename
        # encoded in bytecode files.  This is far from complete, but it
        # should at least generate usable bytecode in RPM distributions.
        install_root = self.get_finalized_command('install').root

        if self.compile:
            byte_compile(
                files,
                optimize=0,
                force=self.force,
                prefix=install_root,
                dry_run=self.dry_run,
            )
        if self.optimize > 0:
            byte_compile(
                files,
                optimize=self.optimize,
                force=self.force,
                prefix=install_root,
                verbose=self.verbose,
                dry_run=self.dry_run,
            )

    # -- Utility methods -----------------------------------------------

    def _mutate_outputs(self, has_any, build_cmd, cmd_option, output_dir):
        if not has_any:
            return []

        build_cmd = self.get_finalized_command(build_cmd)
        build_files = build_cmd.get_outputs()
        build_dir = getattr(build_cmd, cmd_option)

        prefix_len = len(build_dir) + len(os.sep)
        outputs = []
        for file in build_files:
            outputs.append(os.path.join(output_dir, file[prefix_len:]))

        return outputs

    def _bytecode_filenames(self, py_filenames):
        bytecode_files = []
        for py_file in py_filenames:
            # Since build_py handles package data installation, the
            # list of outputs can contain more than just .py files.
            # Make sure we only report bytecode for the .py files.
            ext = os.path.splitext(os.path.normcase(py_file))[1]
            if ext != PYTHON_SOURCE_EXTENSION:
                continue
            if self.compile:
                bytecode_files.append(
                    importlib.util.cache_from_source(py_file, optimization='')
                )
            if self.optimize > 0:
                bytecode_files.append(
                    importlib.util.cache_from_source(
                        py_file, optimization=self.optimize
                    )
                )

        return bytecode_files

    # -- External interface --------------------------------------------
    # (called by outsiders)

    def get_outputs(self):
        """Return the list of files that would be installed if this command
        were actually run.  Not affected by the "dry-run" flag or whether
        modules have actually been built yet.
        """
        pure_outputs = self._mutate_outputs(
            self.distribution.has_pure_modules(),
            'build_py',
            'build_lib',
            self.install_dir,
        )
        if self.compile:
            bytecode_outputs = self._bytecode_filenames(pure_outputs)
        else:
            bytecode_outputs = []

        ext_outputs = self._mutate_outputs(
            self.distribution.has_ext_modules(),
            'build_ext',
            'build_lib',
            self.install_dir,
        )

        return pure_outputs + bytecode_outputs + ext_outputs

    def get_inputs(self):
        """Get the list of files that are input to this command, ie. the
        files that get installed as they are named in the build tree.
        The files in this list correspond one-to-one to the output
        filenames returned by 'get_outputs()'.
        """
        inputs = []

        if self.distribution.has_pure_modules():
            build_py = self.get_finalized_command('build_py')
            inputs.extend(build_py.get_outputs())

        if self.distribution.has_ext_modules():
            build_ext = self.get_finalized_command('build_ext')
            inputs.extend(build_ext.get_outputs())

        return inputs
PK{5Zg00=Lib/site-packages/setuptools/_distutils/command/build_clib.pynuW+A"""distutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module."""


# XXX this module has *lots* of code ripped-off quite transparently from
# build_ext.py -- not surprisingly really, as the work required to build
# a static library from a collection of C source files is not really all
# that different from what's required to build a shared object file from
# a collection of C source files.  Nevertheless, I haven't done the
# necessary refactoring to account for the overlap in code between the
# two modules, mainly because a number of subtle details changed in the
# cut 'n paste.  Sigh.

import os
from distutils.core import Command
from distutils.errors import DistutilsSetupError
from distutils.sysconfig import customize_compiler
from distutils import log


def show_compilers():
    from distutils.ccompiler import show_compilers

    show_compilers()


class build_clib(Command):

    description = "build C/C++ libraries used by Python extensions"

    user_options = [
        ('build-clib=', 'b', "directory to build C/C++ libraries to"),
        ('build-temp=', 't', "directory to put temporary build by-products"),
        ('debug', 'g', "compile with debugging information"),
        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
        ('compiler=', 'c', "specify the compiler type"),
    ]

    boolean_options = ['debug', 'force']

    help_options = [
        ('help-compiler', None, "list available compilers", show_compilers),
    ]

    def initialize_options(self):
        self.build_clib = None
        self.build_temp = None

        # List of libraries to build
        self.libraries = None

        # Compilation options for all libraries
        self.include_dirs = None
        self.define = None
        self.undef = None
        self.debug = None
        self.force = 0
        self.compiler = None

    def finalize_options(self):
        # This might be confusing: both build-clib and build-temp default
        # to build-temp as defined by the "build" command.  This is because
        # I think that C libraries are really just temporary build
        # by-products, at least from the point of view of building Python
        # extensions -- but I want to keep my options open.
        self.set_undefined_options(
            'build',
            ('build_temp', 'build_clib'),
            ('build_temp', 'build_temp'),
            ('compiler', 'compiler'),
            ('debug', 'debug'),
            ('force', 'force'),
        )

        self.libraries = self.distribution.libraries
        if self.libraries:
            self.check_library_list(self.libraries)

        if self.include_dirs is None:
            self.include_dirs = self.distribution.include_dirs or []
        if isinstance(self.include_dirs, str):
            self.include_dirs = self.include_dirs.split(os.pathsep)

        # XXX same as for build_ext -- what about 'self.define' and
        # 'self.undef' ?

    def run(self):
        if not self.libraries:
            return

        # Yech -- this is cut 'n pasted from build_ext.py!
        from distutils.ccompiler import new_compiler

        self.compiler = new_compiler(
            compiler=self.compiler, dry_run=self.dry_run, force=self.force
        )
        customize_compiler(self.compiler)

        if self.include_dirs is not None:
            self.compiler.set_include_dirs(self.include_dirs)
        if self.define is not None:
            # 'define' option is a list of (name,value) tuples
            for (name, value) in self.define:
                self.compiler.define_macro(name, value)
        if self.undef is not None:
            for macro in self.undef:
                self.compiler.undefine_macro(macro)

        self.build_libraries(self.libraries)

    def check_library_list(self, libraries):
        """Ensure that the list of libraries is valid.

        `library` is presumably provided as a command option 'libraries'.
        This method checks that it is a list of 2-tuples, where the tuples
        are (library_name, build_info_dict).

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        """
        if not isinstance(libraries, list):
            raise DistutilsSetupError("'libraries' option must be a list of tuples")

        for lib in libraries:
            if not isinstance(lib, tuple) and len(lib) != 2:
                raise DistutilsSetupError("each element of 'libraries' must a 2-tuple")

            name, build_info = lib

            if not isinstance(name, str):
                raise DistutilsSetupError(
                    "first element of each tuple in 'libraries' "
                    "must be a string (the library name)"
                )

            if '/' in name or (os.sep != '/' and os.sep in name):
                raise DistutilsSetupError(
                    "bad library name '%s': "
                    "may not contain directory separators" % lib[0]
                )

            if not isinstance(build_info, dict):
                raise DistutilsSetupError(
                    "second element of each tuple in 'libraries' "
                    "must be a dictionary (build info)"
                )

    def get_library_names(self):
        # Assume the library list is valid -- 'check_library_list()' is
        # called from 'finalize_options()', so it should be!
        if not self.libraries:
            return None

        lib_names = []
        for (lib_name, build_info) in self.libraries:
            lib_names.append(lib_name)
        return lib_names

    def get_source_files(self):
        self.check_library_list(self.libraries)
        filenames = []
        for (lib_name, build_info) in self.libraries:
            sources = build_info.get('sources')
            if sources is None or not isinstance(sources, (list, tuple)):
                raise DistutilsSetupError(
                    "in 'libraries' option (library '%s'), "
                    "'sources' must be present and must be "
                    "a list of source filenames" % lib_name
                )

            filenames.extend(sources)
        return filenames

    def build_libraries(self, libraries):
        for (lib_name, build_info) in libraries:
            sources = build_info.get('sources')
            if sources is None or not isinstance(sources, (list, tuple)):
                raise DistutilsSetupError(
                    "in 'libraries' option (library '%s'), "
                    "'sources' must be present and must be "
                    "a list of source filenames" % lib_name
                )
            sources = list(sources)

            log.info("building '%s' library", lib_name)

            # First, compile the source code to object files in the library
            # directory.  (This should probably change to putting object
            # files in a temporary build directory.)
            macros = build_info.get('macros')
            include_dirs = build_info.get('include_dirs')
            objects = self.compiler.compile(
                sources,
                output_dir=self.build_temp,
                macros=macros,
                include_dirs=include_dirs,
                debug=self.debug,
            )

            # Now "link" the object files together into a static library.
            # (On Unix at least, this isn't really linking -- it just
            # builds an archive.  Whatever.)
            self.compiler.create_static_lib(
                objects, lib_name, output_dir=self.build_clib, debug=self.debug
            )
PK{5ZSOVNNDLib/site-packages/setuptools/_distutils/command/_framework_compat.pynuW+A"""
Backward compatibility for homebrew builds on macOS.
"""


import sys
import os
import functools
import subprocess
import sysconfig


@functools.lru_cache()
def enabled():
    """
    Only enabled for Python 3.9 framework homebrew builds
    except ensurepip and venv.
    """
    PY39 = (3, 9) < sys.version_info < (3, 10)
    framework = sys.platform == 'darwin' and sys._framework
    homebrew = "Cellar" in sysconfig.get_config_var('projectbase')
    venv = sys.prefix != sys.base_prefix
    ensurepip = os.environ.get("ENSUREPIP_OPTIONS")
    return PY39 and framework and homebrew and not venv and not ensurepip


schemes = dict(
    osx_framework_library=dict(
        stdlib='{installed_base}/{platlibdir}/python{py_version_short}',
        platstdlib='{platbase}/{platlibdir}/python{py_version_short}',
        purelib='{homebrew_prefix}/lib/python{py_version_short}/site-packages',
        platlib='{homebrew_prefix}/{platlibdir}/python{py_version_short}/site-packages',
        include='{installed_base}/include/python{py_version_short}{abiflags}',
        platinclude='{installed_platbase}/include/python{py_version_short}{abiflags}',
        scripts='{homebrew_prefix}/bin',
        data='{homebrew_prefix}',
    )
)


@functools.lru_cache()
def vars():
    if not enabled():
        return {}
    homebrew_prefix = subprocess.check_output(['brew', '--prefix'], text=True).strip()
    return locals()


def scheme(name):
    """
    Override the selected scheme for posix_prefix.
    """
    if not enabled() or not name.endswith('_prefix'):
        return name
    return 'osx_framework_library'
PK{5ZBLib/site-packages/setuptools/_distutils/command/install_scripts.pynuW+A"""distutils.command.install_scripts

Implements the Distutils 'install_scripts' command, for installing
Python scripts."""

# contributed by Bastian Kleineidam

import os
from distutils.core import Command
from distutils import log
from stat import ST_MODE


class install_scripts(Command):

    description = "install scripts (Python or otherwise)"

    user_options = [
        ('install-dir=', 'd', "directory to install scripts to"),
        ('build-dir=', 'b', "build directory (where to install from)"),
        ('force', 'f', "force installation (overwrite existing files)"),
        ('skip-build', None, "skip the build steps"),
    ]

    boolean_options = ['force', 'skip-build']

    def initialize_options(self):
        self.install_dir = None
        self.force = 0
        self.build_dir = None
        self.skip_build = None

    def finalize_options(self):
        self.set_undefined_options('build', ('build_scripts', 'build_dir'))
        self.set_undefined_options(
            'install',
            ('install_scripts', 'install_dir'),
            ('force', 'force'),
            ('skip_build', 'skip_build'),
        )

    def run(self):
        if not self.skip_build:
            self.run_command('build_scripts')
        self.outfiles = self.copy_tree(self.build_dir, self.install_dir)
        if os.name == 'posix':
            # Set the executable bits (owner, group, and world) on
            # all the scripts we just installed.
            for file in self.get_outputs():
                if self.dry_run:
                    log.info("changing mode of %s", file)
                else:
                    mode = ((os.stat(file)[ST_MODE]) | 0o555) & 0o7777
                    log.info("changing mode of %s to %o", file, mode)
                    os.chmod(file, mode)

    def get_inputs(self):
        return self.distribution.scripts or []

    def get_outputs(self):
        return self.outfiles or []
PK{5Zp44TLib/site-packages/setuptools/_distutils/command/__pycache__/__init__.cpython-311.pycnuW+A

b;ddZgdZdS)z\distutils.command

Package containing implementation of all the standard Distutils
commands.)buildbuild_py	build_ext
build_clib
build_scriptscleaninstallinstall_libinstall_headersinstall_scriptsinstall_datasdistregisterbdist
bdist_dumb	bdist_rpmcheckuploadN)__doc____all__uE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/__init__.pyrs$

rPK{5Zݻ<<TLib/site-packages/setuptools/_distutils/command/__pycache__/register.cpython-311.pycnuW+A

b;d-jdZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZGdde	ZdS)zhdistutils.command.register

Implements the Distutils 'register' command (register with the repository).
N)warn)
PyPIRCCommand)logceZdZdZejddgzZejgdzZddfgZdZdZ	d	Z
d
ZdZdZ
d
ZdZdZddZdS)registerz7register the distribution with the Python package index)list-classifiersNz list the valid Trove classifiers)strictNzBWill stop the registering if the meta-data are not fully compliant)verifyrr	checkcdS)NTselfs uE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/register.pyzregister.#s4cJtj|d|_d|_dS)Nr)rinitialize_optionslist_classifiersr	rs rrzregister.initialize_options%s&(... !rcdtj|d|jfdd}||jjd<dS)Nr)r)r	restructuredtextr)rfinalize_optionsr	distributioncommand_options)r
check_optionss  rrzregister.finalize_options*sG&t,,,"4;/ /


6C)'222rcJ|||D]}|||jr|dS|jr|dS|dSN)	r_set_configget_sub_commandsrun_commanddry_runverify_metadatarclassifiers
send_metadata)rcmd_names  rrunzregister.run3s--//	'	'HX&&&&<	!  """""

"	!     rctdt|jd}||j|_d|_|dS)zDeprecated API.zVdistutils.command.register.check_metadata is deprecated; use the check command insteadrrN)rDeprecationWarningrget_command_objensure_finalizedr	rr')rrs  rcheck_metadatazregister.check_metadataBsh
,	
	
	

!11'::
   {!"
		rc>|}|ikr=|d|_|d|_|d|_|d|_d|_d	S|jd|jfvrtd|jz|jdkr|j|_d|_d	S)
z0Reads the configuration file and set attributes.usernamepassword
repositoryrealmTpypiz%s not found in .pypircFN)_read_pypircr.r/r0r1
has_configDEFAULT_REPOSITORY
ValueError)rconfigs  rrzregister._set_configOs""$$R<<":.DM":.DM$\2DODJ"DOOOvt/F&GGG !:T_!LMMM&(("&"9#DOOOrc|jdz}tj|}t	j||dS)z.Fetch the list of classifiers from the server.z?:action=list_classifiersN)r0urllibrequesturlopenrinfo_read_pypi_response)rurlresponses   rr$zregister.classifiers_sHo ;;>))#..))(3344444rc||d\}}tjd||dS)z???G##"S==
/ ..
/
9"?<88
9>1133D<((99!>>>>/{,-,s]]v&D>@@DL@4
+d7m"DO6l
3$\22V6l
3z"d9o55z*E'.|'D'DD$z*Ey/D&-ol&C&CDOy/D
#tI66')D$&*DO=>>>z"d9o557m
4 %l 3 3W
7m
4..t44LD&s{{3T6BBBBB=>>>UVVVVV
s]]/0DDM7m
> %&< = =W
7m
>..t44LD&H/v>>>>>
]rc|jj}id|ddd|d|d|d|d|d	|d
|d|	d|
d
|d|d|
d|d|d|}|ds|ds|drd|d<|S)NrQmetadata_versionz1.0rSversionsummary	home_pageauthorauthor_emaillicensedescriptionkeywordsplatformr$download_urlprovidesrequires	obsoletesz1.1)rmetadataget_nameget_versionget_descriptionget_urlget_contactget_contact_emailget_licenceget_long_descriptionget_keywords
get_platformsget_classifiersget_download_urlget_providesget_requires
get_obsoletes)ractionmetarjs    rrCzregister.build_post_datas )
v


DMMOO

t''))	


t++--




d&&((

D2244

t''))

44466

))++

**,,

4//11

D1133
 
))++!
"
))++#
$
++--%
(
	-tJ/	-43D	-',D#$rNc
d|vr?|d|d|jtjd}d|z}|dz}tj}|D]\}}t|tgtdfvr|g}|D]}t|}|
||
d|z|
d|
||r!|d	d
kr|
d|
||
d|d}d
|ztt|d}	tj|j||	}
tjtj|}d}	||
}|jr||}d}n|#tjj$r8}
|jr|
j}|
j|
jf}Yd}
~
n5d}
~
wtjj$r}
dt|
f}Yd}
~
nd}
~
wwxYw|jr8dd|df}||tj|S)z9Post a query to the server, and return a string response.rSzRegistering {} to {}z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z
--z--r
z*
Content-Disposition: form-data; name="%s"z



zutf-8z/multipart/form-data; boundary=%s; charset=utf-8)zContent-typezContent-length)password_mgrrI)rKOKNizK---------------------------------------------------------------------------)rYrbr0rrZioStringIOitemstypestrwritegetvalueencodelenr9r:Requestbuild_openerHTTPBasicAuthHandleropen
show_responser=error	HTTPErrorfpreadrDmsgURLErrorjoin)rrjrhboundarysep_boundaryend_boundarybodykeyvalueheadersreqopenerrEers               rrBzregister.post_to_serversT>>MM&--d6lDOLLch


I(#d*{}}**,,	%	%JCE{{488T"XX"666
%
%E



<(((

H3NOOO

6"""

5!!!%U2Y$..JJt$$$
%	

<   

4}}%%g..N!#d))nn


n$$T_dGDD,,N//T/BB

	[[%%F!
8//77FF|%	#	#	#!
#tyy{{VQU]FFFFFF|$	!	!	!#a&&[FFFFFF	!	)))XtX677CMM#sx(((
s$IK.JK&J<<Kr)__name__
__module____qualname__rsruser_optionsboolean_optionssub_commandsrrr'r,rr$r#r%rCrBr
rrrrsKK -F	
1L$3777O//01L
CCC
!
!
!$$$ 555;;;???B8777777rr)
__doc__r]rurllib.parser9urllib.requestwarningsrdistutils.corer	distutilsrrr
rrrs				((((((mmmmm}mmmmmrPK{5ZT4jj\Lib/site-packages/setuptools/_distutils/command/__pycache__/install_egg_info.cpython-311.pycnuW+A

b;d
ldZddlZddlZddlZddlmZddlmZmZGddeZ	dZ
dZd	ZdS)
z
distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.
N)Command)logdir_utilcJeZdZdZdZdgZdZedZdZ	dZ
dZd	S)
install_egg_infoz)Install an .egg-info file for the packagez8Install package's PKG-INFO metadata as an .egg-info file)zinstall-dir=dzdirectory to install tocd|_dSN)install_dirselfs }E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/install_egg_info.pyinitialize_optionsz#install_egg_info.initialize_optionsscdtt|jtt	|jgtjddRzS)z_
        Allow basename to be overridden by child class.
        Ref pypa/distutils#2.
        z%s-%s-py%d.%d.egg-infoN)to_filename	safe_namedistributionget_namesafe_versionget_versionsysversion_infors rbasenamezinstall_egg_info.basenamesu(	$"3"<"<">">??@@T%6%B%B%D%DEEFF+

bqb
!+
+

	
rc|ddtj|j|j|_|jg|_dS)Ninstall_lib)rr)set_undefined_optionsospathjoinrrtargetoutputsrs rfinalize_optionsz!install_egg_info.finalize_options'sD""=2PQQQgll4#3T]CC}rc|j}tj|r;tj|stj||jntj|r+|	tj
|jfd|znStj|js/|	tj|jfd|jztjd||jsLt|dd5}|jj|ddddS#1swxYwYdSdS)N)dry_runz	Removing z	Creating z
Writing %swzUTF-8)encoding)r"rr isdirislinkrremove_treer&existsexecuteunlinkrmakedirsrinfoopenrmetadatawrite_pkg_file)r
r"fs   rrunzinstall_egg_info.run,s
7==  	)?)?	 >>>>>
W^^F
#
#	LLT[NK&4HIIIIt/00	LLd.0+@P2P


	v&&&|	=fcG444
=!*99!<<<
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=	=	=s- EE!Ec|jSr
)r#rs rget_outputszinstall_egg_info.get_outputs;s
|rN)__name__
__module____qualname____doc__descriptionuser_optionsrpropertyrr$r5r7rrrrs33LK8L   	
	
X	
%%%

=
=
=rrc.tjdd|S)zConvert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    [^A-Za-z0-9.]+-)resubnames rrrDs
6"C...rcZ|dd}tjdd|S)zConvert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
     .rArB)replacerCrD)versions rrrLs,ooc3''G
6"C111rc.|ddS)z|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    rB_)rJrEs rrrVs
<<S!!!r)
r;rrrC
distutils.cmdr	distutilsrrrrrrr?rrrPs
			



				!!!!!!########,,,,,w,,,h///222"""""rPK{5Z0QLib/site-packages/setuptools/_distutils/command/__pycache__/clean.cpython-311.pycnuW+A

b;d+
RdZddlZddlmZddlmZddlmZGddeZdS)zBdistutils.command.clean

Implements the Distutils 'clean' command.N)Command)remove_tree)logc2eZdZdZgdZdgZdZdZdZdS)cleanz-clean up temporary files from 'build' command))zbuild-base=bz2base build directory (default: 'build.build-base'))z
build-lib=Nz>$/**	P>>>>>I=tOOO8	Q"ndot?QR
Q
Q	7>>),,Q	4<@@@@@HDiPPPP|	
)))$/:::::



			s3D
DDN)	__name__
__module____qualname__descriptionuser_optionsboolean_optionsrrr'rrrr
scAKL"gOJJJrr)	__doc__rdistutils.corerdistutils.dir_utilr	distutilsrrr.rrr3s--
			""""""******?????G?????rPK|5ZTO	O	[Lib/site-packages/setuptools/_distutils/command/__pycache__/install_headers.cpython-311.pycnuW+A

b;d2dZddlmZGddeZdS)zdistutils.command.install_headers

Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory.)Commandc>eZdZdZddgZdgZdZdZdZdZ	d	Z
d
S)install_headerszinstall C/C++ header files)zinstall-dir=dz$directory to install header files to)forcefz-force installation (overwrite existing files)rc0d|_d|_g|_dS)Nr)install_dirroutfilesselfs |E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/install_headers.pyinitialize_optionsz"install_headers.initialize_optionss



c4|ddddS)Ninstall)rr
)rr)set_undefined_optionsrs rfinalize_optionsz install_headers.finalize_optionss-""9;M	
	
	
	
	
rc|jj}|sdS||j|D]:}|||j\}}|j|;dSN)distributionheadersmkpathr
	copy_filerappend)r
rheaderout_s     rrunzinstall_headers.runs{#+	FD$%%%	&	&F~~fd.>??HS!M  %%%%	&	&rc|jjpgSr)rrrs r
get_inputszinstall_headers.get_inputs)s (.B.rc|jSr)rrs rget_outputszinstall_headers.get_outputs,s
}rN)__name__
__module____qualname__descriptionuser_optionsboolean_optionsrrrr!r#rrrr
s}.K	FGL
iO




&&&///rrN)__doc__distutils.corerrr*rrr-sW**
#"""""#####g#####rPK|5Z%|/]/]QLib/site-packages/setuptools/_distutils/command/__pycache__/sdist.cpython-311.pycnuW+A

b;d)KdZddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZdd	lm
Z
dd
lmZddlmZddlmZdd
lmZmZdZGddeZdS)zadistutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution).N)glob)warn)Command)dir_util)	file_util)archive_util)TextFile)FileList)log)convert_path)DistutilsOptionErrorDistutilsTemplateErrorcddlm}ddlm}g}|D])}|d|zd||df*|||ddS)zoPrint all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    r)FancyGetopt)ARCHIVE_FORMATSformats=Nz.List of available source distribution formats:)distutils.fancy_getoptrdistutils.archive_utilrkeysappendsort
print_help)rrformatsformats    rE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/sdist.pyshow_formatsrs322222666666G!&&((PP
V+T?63J13MNOOOOLLNNNK##$TUUUUUceZdZdZdZgdZgdZdddefgZdd	d
Z	defgZ
dZd
ZdZ
dZdZdZdZedZdZdZdZdZdZdZdZdZdZdZdZdZd Z d!Z!d"Z"dS)#sdistz6create a source distribution (tarball, zip file, etc.)c|jS)zYCallable used for the check sub-command.

        Placed here so user_options can view it)metadata_checkselfs rchecking_metadatazsdist.checking_metadata's
""r))z	template=tz5name of manifest template file [default: MANIFEST.in])z	manifest=mz)name of manifest file [default: MANIFEST])use-defaultsNzRinclude the default file set in the manifest [default; disable with --no-defaults])no-defaultsNz"don't include the default file set)pruneNzspecifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune])no-pruneNz$don't automatically exclude anything)
manifest-onlyozEjust regenerate the manifest and then stop (implies --force-manifest))force-manifestfzkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.)rNz6formats for source distribution (comma-separated list))	keep-tempkz@keep the distribution tree around after creating archive file(s))z	dist-dir=dzFdirectory to put the source distribution archive(s) in [default: dist])metadata-checkNz[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default])zowner=uz@Owner name used when creating a tar file [default: current user])zgroup=gzAGroup name used when creating a tar file [default: current group])r(r*r,r.r0r3zhelp-formatsNz#list available distribution formatsr(r*)r)r+check)READMEz
README.txtz
README.rstcd|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_	d|_
d|_d|_dS)Nrgztar)
templatemanifestuse_defaultsr*
manifest_onlyforce_manifestr	keep_tempdist_dir
archive_filesr"ownergroupr#s rinitialize_optionszsdist.initialize_optionszsl


y
!



rc|jd|_|jd|_|dtj|j}|rt
d|z|j	d|_dSdS)NMANIFESTzMANIFEST.inrzunknown archive format '%s'dist)r<r;ensure_string_listrcheck_archive_formatsrr
rA)r$
bad_formats  rfinalize_optionszsdist.finalize_optionss~= &DM= )DM	***!7EE
	S&'Dz'QRRR= "DMMM! rct|_|D]}||||jrdS|dSN)r
filelistget_sub_commandsrun_command
get_file_listr>make_distribution)r$cmd_names  rrunz	sdist.runs!


--//	'	'HX&&&&
	
	F	
     rctdt|jd}||dS)zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated,               use the check command insteadr6N)rPendingDeprecationWarningdistributionget_command_objensure_finalizedrU)r$r6s  rcheck_metadatazsdist.check_metadatasW
-%	
	
	

!11'::
   
		rctj|j}|s\|rH||j|jdS|s|	d|jz|j
|jr||r|
|jr||j|j|dS)aCFigure out the list of files to include in the source
        distribution, and put it in 'self.filelist'.  This might involve
        reading the manifest template (and writing the manifest), or just
        reading the manifest, or just using the default file set -- it all
        depends on the user's options.
        Nz?manifest template '%s' does not exist (using default file list))ospathisfiler;_manifest_is_not_generated
read_manifestrOrremove_duplicatesrfindallr=add_defaults
read_templater*prune_file_listwrite_manifest)r$template_existss  rrRzsdist.get_file_listsG'..77	4#B#B#D#D	   M   M++---F	IIW- 


	

	 	!   :	#  """

'')))rc|||||||dS)a9Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        N)_add_defaults_standards_add_defaults_optional_add_defaults_python_add_defaults_data_files_add_defaults_ext_add_defaults_c_libs_add_defaults_scriptsr#s rrdzsdist.add_defaultss	
$$&&&##%%%!!###%%'''   !!###""$$$$$rctj|sdStj|}tj|\}}|tj|vS)z
        Case-sensitive path existence check

        >>> sdist._cs_path_exists(__file__)
        True
        >>> sdist._cs_path_exists(__file__.upper())
        False
        F)r]r^existsabspathsplitlistdir)fspathrs	directoryfilenames    r_cs_path_existszsdist._cs_path_existss_w~~f%%	5'//&)) gmmG44	82:i0000rc|j|jjg}|D]}t|trj|}d}|D]5}||rd}|j|n6|s+|dd	|z||r|j||d|zdS)NFTz,standard file not found: should have one of z, zstandard file '%s' not found)
READMESrXscript_name
isinstancetupleryrOrrjoin)r$	standardsfnaltsgot_its     rrjzsdist._add_defaults_standardss\4#4#@A		C	CB"e$$
CB++B//!%
,,R000
IIFSWX''++CM((,,,,II4==99EM  ''''	(	(rcR|d}|jr,|j||jD]D\}}}}|D]:}|jtj	
||;EdS)Nbuild_py)get_finalized_commandrXhas_pure_modulesrOrget_source_files
data_filesrr]r^r)r$rpkgsrc_dir	build_dir	filenamesrxs       rrlzsdist._add_defaults_python-s--j99--//	>M  !:!:!>!,,4 M003334
	4
	4
4
4rc|jrC|d}|j|dSdS)N	build_ext)rXhas_ext_modulesrrOrr)r$rs  rrnzsdist._add_defaults_extNs^,,..	?22;??IM  !;!;!=!=>>>>>	?	?rc|jrC|d}|j|dSdS)N
build_clib)rXhas_c_librariesrrOrr)r$rs  rrozsdist._add_defaults_c_libsSsa,,..	@33LAAJM  !!>?????	@	@rc|jrC|d}|j|dSdS)N
build_scripts)rXhas_scriptsrrOrr)r$rs  rrpzsdist._add_defaults_scriptsXsa((**	C 66GGMM  !?!?!A!ABBBBB	C	Crc	tjd|jt|jdddddd}		|}|n`	|j|nC#ttf$r/}|	d|j
|j|fzYd}~nd}~wwxYww	|dS#|wxYw)zRead and parse manifest template file named by self.template.

        (usually "MANIFEST.in") The parsing and processing is done by
        'self.filelist', which updates itself accordingly.
        zreading manifest template '%s'r9)strip_commentsskip_blanks
join_lines	lstrip_ws	rstrip_ws
collapse_joinTNz%s, line %d: %s)
rinfor;r	readlinerOprocess_template_liner
ValueErrorrrxcurrent_lineclose)r$r;linemsgs    rrezsdist.read_template]s+	14=AAAM


	
((**<	M77====/
;II)#,h.CSIJ

NNHNNs5CA+*C+B+<%B&!C&B++CCc|d}|j}|jd|j|jd|tjdkrd}nd}gd}d|d		||}|j|d
dS)avPrune off branches that might slip into the file list as created
        by 'read_template()', but really don't belong there:
          * the build tree (typically "build")
          * the release tree itself (only an issue if we ran "sdist"
            previously with --keep-temp, or it aborted)
          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
        buildN)prefixwin32z/|\\/)RCSCVSz\.svnz\.hgz\.gitz\.bzr_darcsz(^|{})({})({}).*|r9)is_regex)
rrXget_fullnamerOexclude_pattern
build_basesysplatformrr)r$rbase_dirsepsvcs_dirsvcs_ptrns      rrfzsdist.prune_file_lists**733$1133
%%d53C%DDD
%%d8%<<<<7""DDDRRR&--dCHHX4F4FMM
%%h%;;;;;rc|rtjd|jzdS|jjdd}|dd|tj	|j|fd|jzdS)zWrite the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        z5not writing to manually maintained manifest file '%s'Nrz*# file GENERATED by distutils, do NOT editzwriting manifest file '%s')
r`rrr<rOrinsertexecuter
write_file)r$contents  rrgzsdist.write_manifests
**,,	H%'+}5



F-%aaa(qFGGG 
]G$(4=8	
	
	
	
	
rctj|jsdSt	|j}	|}|n#|wxYw|dkS)NFz+# file GENERATED by distutils, do NOT edit
)r]r^r_r<openrr)r$fp
first_lines   rr`z sdist._manifest_is_not_generatedsmw~~dm,,	5
$-
 
 	JHHJJJJBHHJJJJKKKsA%%A;c,tjd|jt|j5}|D]H}|}|ds|s.|j|I	ddddS#1swxYwYdS)zRead the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        zreading manifest file '%s'#N)rrr<rstrip
startswithrOr)r$r<rs   rrazsdist.read_manifests
	-t}===
$-
 
 	+H 
+
+zz||??3''t
$$T****
+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+sAB		B
B
c(||tj|||jt	t
drd}d|z}nd}d|z}|st
jdnt
j||D]o}t
j	
|st
jd|7t
j	||}||||	p|j
j|dS)
aCreate the directory tree that will become the source
        distribution archive.  All directories implied by the filenames in
        'files' are created under 'base_dir', and then we hard link or copy
        (if hard linking is unavailable) those files into place.
        Essentially, this duplicates the developer's source tree, but in a
        directory named after the distribution, containing only the files
        to be distributed.
        dry_runlinkhardzmaking hard links in %s...Nzcopying files to %s...z)no files to distribute -- empty manifest?z#'%s' not a regular file -- skipping)r)mkpathrcreate_treerhasattrr]rrrr^r_r	copy_filerXmetadatawrite_pkg_info)r$rrrrfiledests       rmake_release_treezsdist.make_release_trees	
HXudlCCCC2v	6D.9CCD*X5C	H@AAAAHSMMM	6	6D7>>$''
6>EEEEw||Hd33tT5555"11(;;;;;rc|j}tj|j|}|||jjg}d|j	vrJ|j	
|j	|j	d|j	D]]}|
||||j|j}|
||jj
dd|f^||_|jst'j||jdSdS)aCreate the source distribution(s).  First, we create the release
        tree with 'make_release_tree()'; then, we create all required
        archive files (according to 'self.formats') from the release tree.
        Finally, we clean up by blowing away the release tree (unless
        'self.keep_temp' is true).  The list of archive files created is
        stored so it can be retrieved later by 'get_archive_files()'.
        tar)rrCrDr rN)rXrr]r^rrArrOrrrpopindexmake_archiverCrD
dist_filesrBr@rremove_treer)r$r	base_namerBfmtrs      rrSzsdist.make_distributionsE$1133GLL99	x)<===
DL  L 0 01C1CE1J1J K KLLL<	E	EC$$34:%D
  &&&(//"d0CDDDD*~	A 4<@@@@@@	A	Arc|jS)zzReturn the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        )rBr#s rget_archive_fileszsdist.get_archive_filess
!!r)#__name__
__module____qualname__descriptionr%user_optionsboolean_optionsrhelp_optionsnegative_optsub_commandsr{rErLrUr[rRrdstaticmethodryrjrkrlrmrnrorprerfrgr`rarrSrrrr r #sJK###888LtO
DlSL$2wGGL/01L4G.
#
#
#!!!,			'''R%%%,11\1 CCC,(((FFF 444"???
@@@
CCC
"""H<<<.


(
L
L
L+++(<(<("""""rr )__doc__r]rrwarningsrdistutils.corer	distutilsrrrdistutils.text_filer	distutils.filelistr
rdistutils.utilrdistutils.errorsr
rrr rrrrsALL
			



""""""""""""((((((''''''''''''IIIIIIIIVVVp"p"p"p"p"Gp"p"p"p"p"rPK|5Z3TpYLib/site-packages/setuptools/_distutils/command/__pycache__/build_scripts.cpython-311.pycnuW+A

b;ddZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddlm
Z
ddlZejd	Z	eZGd
deZdS)zRdistutils.command.build_scripts

Implements the Distutils 'build_scripts' command.N)ST_MODE)	sysconfig)Command)newer)convert_path)logz^#!.*python[0-9.]*([ 	].*)?$cfeZdZdZgdZdgZdZdZdZdZ	dZ
d	Zd
ZdZ
edZd
S)
build_scriptsz("build" scripts (copy and fixup #! line)))z
build-dir=dzdirectory to "build" (copy) to)forcefz1forcibly build everything (ignore file timestamps)zexecutable=ez*specify final destination interpreter pathrc>d|_d|_d|_d|_dSN)	build_dirscriptsr
executableselfs zE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/build_scripts.pyinitialize_optionsz build_scripts.initialize_options$s"
cX|dddd|jj|_dS)Nbuild)r
r)rr)rr)set_undefined_optionsdistributionrrs rfinalize_optionszbuild_scripts.finalize_options*s9""*(		
	
	
(0rc|jSr)rrs rget_source_fileszbuild_scripts.get_source_files3s
|rc@|jsdS|dSr)rcopy_scriptsrs rrunzbuild_scripts.run6s)|	Frc||jg}g}|jD]}||||||||fS)a2
        Copy each script listed in ``self.scripts``.

        If a script is marked as a Python script (first line matches
        'shebang_pattern', i.e. starts with ``#!`` and contains
        "python"), then adjust in the copy the first line to refer to
        the current Python interpreter.
        )mkpathrr_copy_script
_change_modes)routfiles
updated_filesscripts    rr!zbuild_scripts.copy_scripts;sm	
DN###
l	?	?Ffh
>>>>8$$$&&rcVd}t|}tj|jtj|}|||js't||stj
d|dS	tj|}|
}|s|d|zdSt|}n#t"$r
|jsd}YnwxYw|||rTtjd||j|jst(js|j}n[tjt)jddt)jdt)jd}|dpd	}	d
|z|	zdz}
||
|jt|d|j
5}||
||dddn#1swxYwY|r|dSdS|r||||dS)Nznot copying %s (up-to-date)z%s is an empty file (skipping)zcopying and adjusting %s -> %sBINDIRpythonVERSIONEXEz#!
w)encoding) rospathjoinrbasenameappendrrrdebugtokenizeopenreadlinewarnshebang_patternmatchOSErrordry_runinforpython_buildrget_config_vargroup_validate_shebangr3write
writelines	readlinesclose	copy_file)rr)r'r(
shebang_matchoutfiler

first_linerpost_interpshebangoutfs            rr%zbuild_scripts._copy_scriptNs
f%%',,t~rw/?/?/G/GHH   z	%"8"8	I3V<<<F	>
f%%AJ
		:VCDDD+11*==MM			<
AAA		W%%%	,H5vt~NNN<
3 -
!%JJ!#!0:::&4Y???%4U;;;""J,11!44:+k9D@&&w
;;;'3<<<3JJw'''OOAKKMM222333333333333333
					


			NN67+++++s$C77D
D=IIIc^tjdkrdS|D]}||dS)Nposix)r4name_change_mode)rr'files   rr&zbuild_scripts._change_modessD
7gF	$	$Dd####	$	$rc|jrtjd|dStj|t
dz}|dzdz}||kr.tjd|||tj||dSdS)Nzchanging mode of %siimz!changing mode of %s from %o to %o)rArrBr4statrchmod)rrVoldmodenewmodes    rrUzbuild_scripts._change_modes<	H*D111F'$--(61U?f,gH8$QQQHT7#####rc"	|dn0#t$r#td|wxYw	||dS#t$r$td||wxYw)Nzutf-8z,The shebang ({!r}) is not encodable to utf-8z?The shebang ({!r}) is not encodable to the script encoding ({}))encodeUnicodeEncodeError
ValueErrorformat)rPr3s  rrFzbuild_scripts._validate_shebangs	NN7####!			AHHQQ
		NN8$$$$$!			..4fWh.G.G
	s-A	A  .BN)__name__
__module____qualname__descriptionuser_optionsboolean_optionsrrrr"r!r%r&rUstaticmethodrFrrr
r
s>KLiO111
'''&4,4,4,l$$$	$	$	$\rr
)__doc__r4rerXr	distutilsrdistutils.corerdistutils.dep_utilrdistutils.utilrrr:compiler>
first_line_rer
rhrrrqs55
							""""""$$$$$$''''''"*<==
 
UUUUUGUUUUUrPK|5Z(ohVLib/site-packages/setuptools/_distutils/command/__pycache__/build_clib.cpython-311.pycnuW+A

b;d0ddZddlZddlmZddlmZddlmZddlm	Z	dZ
Gdd	eZdS)
zdistutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module.N)Command)DistutilsSetupError)customize_compiler)logc&ddlm}|dS)Nrshow_compilers)distutils.ccompilerr	rs wE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/build_clib.pyr	r	s(222222NcZeZdZdZgdZddgZdddefgZdZd	Z	d
Z
dZdZd
Z
dZdS)
build_clibz/build C/C++ libraries used by Python extensions))zbuild-clib=bz%directory to build C/C++ libraries to)zbuild-temp=tz,directory to put temporary build by-products)debuggz"compile with debugging information)forcefz2forcibly build everything (ignore file timestamps))z	compiler=czspecify the compiler typerrz
help-compilerNzlist available compilerscd|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	r
build_temp	librariesinclude_dirsdefineundefrrcompilerselfs rinitialize_optionszbuild_clib.initialize_options0sJ!





rc\|dddddd|jj|_|jr||j|j|jjpg|_t|jtr+|jtj	|_dSdS)Nbuild)rr)rr)rr)rr)rr)
set_undefined_optionsdistributionrcheck_library_listr
isinstancestrsplitospathseprs rfinalize_optionszbuild_clib.finalize_options?s	
""(($
	
	
	
*4>	4##DN333$ $ 1 > D"Dd'--	D $ 1 7 7
 C CD	D	Drc|jsdSddlm}||j|j|j|_t
|j|j|j|j|j	(|j	D] \}}|j
||!|j$|jD]}|j||
|jdS)Nr)new_compiler)rdry_runr)rr
r,rr-rrrset_include_dirsrdefine_macrorundefine_macrobuild_libraries)rr,namevaluemacros     rrunzbuild_clib.runZs~	F	544444$]DL




	4=)))(M**4+<===;"!%
8
8
u
**47777:!
4
4
,,U3333T^,,,,,rct|tstd|D]}t|ts"t	|dkrtd|\}}t|t
stdd|vstjdkr&tj|vrtd|dzt|tstdd	S)
a`Ensure that the list of libraries is valid.

        `library` is presumably provided as a command option 'libraries'.
        This method checks that it is a list of 2-tuples, where the tuples
        are (library_name, build_info_dict).

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z+'libraries' option must be a list of tuplesz*each element of 'libraries' must a 2-tuplezNfirst element of each tuple in 'libraries' must be a string (the library name)/z;bad library name '%s': may not contain directory separatorsrzMsecond element of each tuple in 'libraries' must be a dictionary (build info)N)	r%listrtuplelenr&r(sepdict)rrlibr2
build_infos     rr$zbuild_clib.check_library_listrs)T**	U%&STTT		Cc5))
Xc#hh!mm)*VWWW"D*dC((
):
d{{rv}}4);=@VD
j$//
)8
%		rc`|jsdSg}|jD]\}}|||S)N)rappend)r	lib_nameslib_namer?s    rget_library_nameszbuild_clib.get_library_namessK~	4	&*n	'	'"XzX&&&&rc||jg}|jD]_\}}|d}|t|tt
fst
d|z||`|S)Nsourcesfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)r$rgetr%r9r:rextend)r	filenamesrCr?rFs     rget_source_fileszbuild_clib.get_source_filess///	&*n		&		&"Xz nnY//Gj4-&H&H)13;<
W%%%%rc|D]\}}|d}|t|ttfst	d|zt|}tjd||d}|d}|j||j	|||j
}|j|||j|j
dS)NrFrGzbuilding '%s' librarymacrosr)
output_dirrMrr)rNr)
rHr%r9r:rrinforcompilerrcreate_static_libr)rrrCr?rFrMrobjectss        rr1zbuild_clib.build_librariess
&/		"Xz nnY//Gj4-&H&H)13;<
7mmGH,h777
 ^^H--F%>>.99Lm++?)j,G
M++doTZ
,



9		r)__name__
__module____qualname__descriptionuser_optionsboolean_optionsr	help_optionsrr*r5r$rDrKr1rrrrsCKL(O
$ :NKL


DDD6---0###J			


rr)__doc__r(distutils.corerdistutils.errorsrdistutils.sysconfigr	distutilsrr	rrZrrr`s 
			""""""000000222222rrrrrrrrrrrPK|5ZXLvQLib/site-packages/setuptools/_distutils/command/__pycache__/bdist.cpython-311.pycnuW+A

b;dAdZddlZddlZddlmZddlmZmZddlm	Z	dZ
GddeZGd	d
eZ
dS)zidistutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution).N)Command)DistutilsPlatformErrorDistutilsOptionError)get_platformcddlm}g}tjD]3}|d|zdtj|df4||}|ddS)zAPrint list of available formats (arguments to "--format" option).r)FancyGetoptformats=Nz'List of available distribution formats:)distutils.fancy_getoptrbdistformat_commandsappend
print_help)rformatsformatpretty_printers    rE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/bdist.pyshow_formatsrs222222G'VV
V+T53H3PQR3STUUUU [))NGHHHHHceZdZdZdS)
ListCompatc>tjdtddS)Nz4format_commands is now a dict. append is deprecated.)
stacklevel)warningswarnDeprecationWarning)selfitems  rrzListCompat.appends.
F	
	
	
	
	
	
rN)__name__
__module____qualname__rrrrrs#




rrc
eZdZdZddddezfdddd	d
gZdgZdd
defgZdZ	dddZ
eddddddddZeZ
dZdZdZd
S)rz$create a built (binary) distribution)zbdist-base=bz4temporary directory for creating built distributionsz
plat-name=pz;platform name to embed in generated filenames (default: %s))r	Nz/formats for distribution (comma-separated list))z	dist-dir=dz=directory to put final built distributions in [default: dist])
skip-buildNz2skip rebuilding everything (for testing/debugging))zowner=uz@Owner name used when creating a tar file [default: current user])zgroup=gzAGroup name used when creating a tar file [default: current group]r(zhelp-formatsNz$lists available distribution formats)	bdist_rpmgztarzip)posixnt)r+zRPM distribution)
bdist_dumbzgzip'ed tar file)r0zbzip2'ed tar file)r0zxz'ed tar file)r0zcompressed tar file)r0ztar file)r0zZIP file)rpmr,bztarxztarztartarr-chd|_d|_d|_d|_d|_d|_d|_dS)Nr)
bdist_base	plat_namerdist_dir
skip_buildgroupowner)rs rinitialize_optionszbdist.initialize_options_s7




rc|j:|jrt|_n|dj|_|jG|dj}tj|d|jz|_|	d|j
I	|jtjg|_
n*#t$rtdtjzwxYw|j	d|_dSdS)Nbuildzbdist.rz;don't know how to create built distributions on platform %sdist)r8r:rget_finalized_commandr7
build_baseospathjoinensure_string_listrdefault_formatnameKeyErrorrr9)rrBs  rfinalize_optionszbdist.finalize_optionshs>!
O!-!%!;!;G!D!D!N
?"33G<<GJ gll:x$.7PQQDO	***<
 $ 3BG <=


,%')w/
= "DMMM! s-C'C2cg}|jD]I}	||j|d*#t$rt	d|zwxYwtt
|jD]}||}||}||jvr|j||_	|dkr|j
|_
|j|_|||dzdvrd|_|
|dS)Nrzinvalid format '%s'r0r
)rrr
rIrrangelenreinitialize_commandno_format_optionrr<r;	keep_temprun_command)rcommandsricmd_namesub_cmds      rrunz	bdist.runs1l	K	KF
K 4V ras

			""""""IIIIIIII''''''III







z'z'z'z'z'Gz'z'z'z'z'rPK|5Zd[[ULib/site-packages/setuptools/_distutils/command/__pycache__/bdist_rpm.cpython-311.pycnuW+A

b;d#VdZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZm
Z
mZddlmZddlmZGd	d
eZdS)zwdistutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions).N)Command)DEBUG)
write_file)DistutilsOptionErrorDistutilsPlatformErrorDistutilsFileErrorDistutilsExecError)get_python_version)logcXeZdZdZgdZgdZddddZdZd	Zd
Z	dZ
dZd
ZdZ
dS)	bdist_rpmzcreate an RPM distribution)))zbdist-base=Nz/base directory for creating built distributions)z	rpm-base=Nzdbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2))z	dist-dir=dzDdirectory to put final RPM files in (and .spec files if --spec-only))zpython=NzMpath to Python interpreter to hard-code in the .spec file (default: "python"))z
fix-pythonNzLhard-code the exact path to the current Python interpreter in the .spec file)z	spec-onlyNzonly regenerate spec file)zsource-onlyNzonly generate source RPM)zbinary-onlyNzonly generate binary RPM)z	use-bzip2Nz7use bzip2 instead of gzip to create source distribution)zdistribution-name=Nzgname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!))zgroup=Nz9package classification [default: "Development/Libraries"])zrelease=NzRPM release number)zserial=NzRPM serial number)zvendor=NzaRPM "vendor" (eg. "Joe Blow ") [default: maintainer or author from setup script])z	packager=NzBRPM packager (eg. "Jane Doe ") [default: vendor])z
doc-files=Nz6list of documentation files (space or comma-separated))z
changelog=Nz
RPM changelog)zicon=Nzname of icon file)z	provides=Nz%capabilities provided by this package)z	requires=Nz%capabilities required by this package)z
conflicts=Nz-capabilities which conflict with this package)zbuild-requires=Nz+capabilities required to build this package)z
obsoletes=Nz*capabilities made obsolete by this package)
no-autoreqNz+do not automatically calculate dependencies)	keep-tempkz"don't clean up RPM build directory)no-keep-tempNz&clean up RPM build directory [default])use-rpm-opt-flagsNz8compile with RPM_OPT_FLAGS when building from source RPM)no-rpm-opt-flagsNz&do not pass any RPM CFLAGS to compiler)	rpm3-modeNz"RPM 3 compatibility mode (default))	rpm2-modeNzRPM 2 compatibility mode)zprep-script=Nz3Specify a script for the PREP phase of RPM building)z
build-script=Nz4Specify a script for the BUILD phase of RPM building)zpre-install=Nz:Specify a script for the pre-INSTALL phase of RPM building)zinstall-script=Nz6Specify a script for the INSTALL phase of RPM building)z
post-install=Nz;Specify a script for the post-INSTALL phase of RPM building)zpre-uninstall=Nzrospathjoinrrrsys
executablenamerr!r"distributionhas_ext_modulesr=finalize_package_datarAs rCfinalize_optionszbdist_rpm.finalize_optionssB""7,HIII= >
X*+VWWWGLL%@@DM;
(!n'
_	&J
7g(NQSQXX
	 0	&H

 0022	'%&D"""7,DEEE""$$$$$rEcd|dd|d|jd|jd|d|dt|jtrGdD]D}tj	
|r#||jvr|j|E|d	d
|d|d|d
||j
|_
|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|ddS)Nr%zDevelopment/Librariesr(z <>r)r*)READMEz
README.txtr&1r'r$r+r,r-r.r/r0r1r2r3r4r5r7r8r9r:r;r@)
ensure_stringrRget_contactget_contact_emailensure_string_list
isinstancer*listrLrMexistsappend_format_changelogr+ensure_filename)rBreadmes  rCrTzbdist_rpm.finalize_package_datas7$;<<< ,,....0A0S0S0U0U0U0U
W	
	
	

	
:&&&,,,dnd++	22
2
27>>&))2fDN.J.JN))&1119c***8$$$.///;'''//??V$$$]+++^,,,-...^,,,_---]+++^,,,_----...	

+++
+++,,, 0111,,,<(((((rEctrctdtd|jtd|jtd|jtd|j|jr|j}||nRi}dD]E}tj
|j|||<|||F|d}tj
|d|j
z}|t ||fd	|z|jrdS|j
jdd}|d
}|jr	dg|_ndg|_|d
||j
_|d
}|d}||||jrWtj
|jr||j|nt7d|jzt9jddg}	|jr|	dn2|j r|	dn|	d|	!dd|j"zg|j#r<|	!ddtj
$|jzg|j%s|	d|j&r|	d|	|d}
|
dz}d|
zdz}d'|||}
tj(|
}	g}d}	|)}|sna|*+}tY|d ksJ||d!||d
}x|-}|rt]d"t_|
z	|-n#|-wxYw|0|	|j1s|j
2rtg}nd#}|j stj
|d$|}tj
|sJ|4||jtj
|j|}|j
jd%||f|js|D]}tj
|d&|}tj
|r|4||jtj
|jtj
5|}|j
jd%||fdSdSdS)'Nzbefore _get_package_data():zvendor =z
packager =zdoc_files =zchangelog =)SOURCESSPECSBUILDRPMSSRPMSrgz%s.speczwriting '%s'sdistbztargztarrrfzicon file '%s' does not existz
building RPMsrpmbuildz-bsz-bbz-baz--definez__python %sz
_topdir %sz--cleanz--quietz%{name}-%{version}-%{release}z.src.rpmz%{arch}/z.%{arch}.rpmz%rpm -q --qf '{} {}\n' --specfile '{}'TrzFailed to execute: %sanyrjr
ri)6rprintr(r)r*r+r rmkpathrLrMrNrrRget_nameexecuter_make_spec_file
dist_filesreinitialize_commandr#formatsrun_commandget_archive_files	copy_filer,r`rrinfor"rar!extendrr>abspathr<rformatpopenreadlinestripsplitlencloser	reprspawndry_runrSr
	move_filebasename)rBspec_dirrpm_dirr	spec_pathsaved_dist_filesrksource
source_dirrpm_cmd
nvr_stringsrc_rpmnon_src_rpmq_cmdoutbinary_rpms
source_rpmlineellstatus	pyversionsrpmfilenamerHs                        rCrunz
bdist_rpm.runs	1/000*dk***,
...-000-000>	(}HKK!!!!GC
(
(W\\$-;;
GAJ''''w'HGLL9t7H7Q7Q7S7S+STT	D$8$8$:$:;^i=W	
	
	
>	F ,7:))'22>	&$IEMM$IEM!!!'7$((**1-Y'
vz***9	Vw~~di((
Vty*5555()H49)TUUU	!!!,	"NN5!!!!

	"NN5!!!!NN5!!!
MDK$?@AAA>	XNNJrwt}7U7U(UVWWW~	&NN9%%%:	&NN9%%%y!!!
5
z) :->8??

huoo	KJ	
(||~~jjll((**3xx1}}}}""3q6***%!$QJ	
(YY[[F
P()@4;;)NOOO
P
IIKKKKCIIKKKK

7|	 0022
".00		!	#
Xw||GG$4jAAw~~d+++++tT]3337<<
zBB!,33[)X4VWWW#
&C',,wv<'		

s
B2Q''Q=ctj|jtj|S)N)rLrMrNrr)rBrMs  rC
_dist_pathzbdist_rpm._dist_paths*w||DM27+;+;D+A+ABBBrEc	d|jzd|jddzd|jzd|jddzdd|jpd	zg}t
jd
}dd|	D}d
}d}|||}||kr0|
d|
d|zdz|gd|jr|
dn|
d|d|j
pd	zd|jzddg|js/|js|
dn|
d|jzdD]}t#||}t'|t(r=|
d|d|v|)|
d|||jr/|
d|jz|jr|
d|jz|jr0|
d d|jz|jr:|
d!t4j|jz|jr|
d"|dd#|jpdgd$|jt4jt@j!d%}d&|z}	|j"rd'|	z}	d(|z}
d)d*d+|	fd,d-|
fd.d/d0d1d2d3g	}|D]\}}
}t#||
}|s|r|dd4|zg|rbtG|5}||$%ddddn#1swxYwY|
||gd5|j&r0|
d6d|j&z|j'r1|dd7g||j'|S)8ziGenerate the text of an RPM spec file and return it as a
        list of strings (one per line).
        z
%define name z%define version -_z%define unmangled_version z%define release z	Summary: UNKNOWNzrpm --eval %{__os_install_post}
c<g|]}d|zS)z  %s \)r).0rs  rC
z-bdist_rpm._make_spec_file..s%KKK$Y
%KKKrEzbrp-python-bytecompile \
z%brp-python-bytecompile %{__python} \
z2# Workaround for http://bugs.python.org/issue14443z%define __os_install_post )z
Name: %{name}zVersion: %{version}zRelease: %{release}z-Source0: %{name}-%{unmangled_version}.tar.bz2z,Source0: %{name}-%{unmangled_version}.tar.gzz	License: zGroup: z>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootzPrefix: %{_prefix}zBuildArch: noarchz
BuildArch: %s)VendorPackagerProvidesRequires	Conflicts	Obsoletesz{}: {} NzUrl: zDistribution: zBuildRequires: zIcon: z
AutoReq: 0z%descriptionz{} {}rz%s buildzenv CFLAGS="$RPM_OPT_FLAGS" z>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES)r6r-z&%setup -n %{name}-%{unmangled_version}buildr.installr/)cleanr0zrm -rf $RPM_BUILD_ROOT)verifyscriptr1N)prer2N)postr3N)preunr4N)postunr5N%)rz%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z
%changelog)(rRrsget_versionreplacer&get_description
subprocess	getoutputrN
splitlinesrar}r#get_licenser%r@rSgetattrlowerr^r_rget_urlr$r:r,rLrMrr?get_long_descriptionrrOargvr=openreadrr*r+)rB	spec_filevendor_hookproblemfixed
fixed_hookfieldvaldef_setup_call	def_buildinstall_cmdscript_optionsrpm_optattrdefaultfs                rCruzbdist_rpm._make_spec_files>
d/88:::!2!>!>!@!@!H!Hc!R!RR(4+<+H+H+J+JJ!5!5c3!?!??4,<<>>K)L

	!*+LMMiiKK+2H2H2J2JKKK

09 ((%88
$$QRRR9JFMNNN	


	
	
	
>	MLMMMMKLLLt0<<>>K)LDJ&P$	
	
	
	
	@$4466
6  !4555_t>???
	>	>E$

..C#t$$
>  

!F!FGGGG  !B
	
	
	
(!RW5E5Echqk5R5RSS/	!	C6BI
P

N
ni0
(+6?3(*,.

)7	.	.$WdG$%%C
.g
.  g
.c?a!(()=)=>>>???????????????$$W---	


	
	
	
>	AWsxx'?'??@@@>	- 



T^,,,s;S##S'	*S'	c`|s|Sg}|dD]t}|}|ddkr|d|g:|ddkr||\|d|zu|ds|d=|S)zBFormat the changelog correctly and convert it to a list of stringsrr*rrz  )rrr}ra)rBr+
new_changelogrs    rCrbzbdist_rpm._format_changelogUs	
OO%%++D11	2	2D::<rs




				""""""!!!!!!******322222P	P	P	P	P	P	P	P	P	P	rEPK|5ZO{{{QLib/site-packages/setuptools/_distutils/command/__pycache__/check.cpython-311.pycnuW+A

b;ddZddlZddlmZddlmZeje5ddlZ	ddl
Z	ddlZ	ddlZ	Gdde	j
jZdddn#1swxYwYGddeZdS)	zCdistutils.command.check

Implements the Distutils 'check' command.
N)Command)DistutilsSetupErrorc.eZdZ				dfd	ZdZxZS)SilentReporterNrasciireplacec	dg|_t|||||||dSN)messagessuper__init__)	selfsourcereport_level
halt_levelstreamdebugencoding
error_handler	__class__s	        rE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/check.pyr
zSilentReporter.__init__sADMGGj&%=




c|j||||ftjj|g|R||j|d|S)N)leveltype)rappenddocutilsnodessystem_messagelevels)rrmessagechildrenkwargss     rrzSilentReporter.system_message sfM  %(F!CDDD>0@H$4;u+=LR
r)Nrrr)__name__
__module____qualname__r
r
__classcell__)rs@rrrsZ#
	
	
	
	
	
								rrcPeZdZdZdZgdZgdZdZdZdZ	dZ
d	Zd
ZdZ
dS)
checkz1This command checks the meta-data of the package.z"perform some checks on the package))metadatamzVerify meta-data)restructuredtextrzEChecks if long string meta-data syntax are reStructuredText-compliant)strictsz(Will exit with an error if a check fails)r*r,r.c>d|_d|_d|_d|_dS)z Sets default values for options.rN)r,r*r.	_warningsrs rinitialize_optionszcheck.initialize_options:s# !
rcdSr
r3s rfinalize_optionszcheck.finalize_optionsAsrcL|xjdz
c_tj||S)z*Counts the number of warnings that occurs.r1)r2rwarn)rmsgs  rr9z
check.warnDs$!|D#&&&rcd|jr||jrjdtvrD	|nD#t
$r!}t
t|d}~wwxYw|jrt
d|jr|j	dkrt
ddSdS)zRuns the command.rNzThe docutils package is needed.rzPlease correct your package.)
r*check_metadatar,globalscheck_restructuredtext	TypeErrorrstrr.r2)rexcs  rrunz	check.runIs=	"!!! 	MWYY&&8//1111 888-c#hh7778
M)*KLLL;	F4>A--%&DEEE	F	F--sA		
A4A//A4c|jj}g}dD](}t||ds||)|r-|dd|zdSdS)zEnsures that all required elements of meta-data are supplied.

        Required fields:
            name, version

        Warns if any are missing.
        )nameversionNzmissing required meta-data: %sz, )distributionr*getattrrr9join)rr*missingattrs    rr<zcheck.check_metadata\s$-%	%	%D8T400
%t$$$	MII679K9KKLLLLL	M	Mrc|j}||D]Y}|dd}|	|d}nd|d|}||ZdS)z4Checks if the long string fields are reST-compliant.lineNr1z{} (line {}))rFget_long_description_check_rst_datagetformatr9)rdatawarningrMs    rr>zcheck.check_restructuredtextns 5577++D11		G2;??6**D|!!*(//
DAAIIg
		rc	|jjpd}tjj}tjtjjjf}d|_	d|_
d|_t||j
|j|j|j|j|j}tj|||}||d	|||n8#t.$r+}|jdd|zd	ifYd}~nd}~wwxYw|jS)
z8Returns warnings when the provided data doesn't compile.zsetup.py)
componentsN)rrrr)rrLz!Could not finish the parsing: %s.)rFscript_namerparsersrstParserfrontendOptionParserget_default_values	tab_widthpep_referencesrfc_referencesrrrwarning_streamrerror_encodingerror_encoding_error_handlerrdocumentnote_sourceparseAttributeErrorrr)rrRsource_pathparsersettingsreporterrees        rrOzcheck._check_rst_dataysz'3Az!%,,..$11 (,352





	"&"&!!*.,"?


>**8Xk*RR["---	LLx((((			$$81rOr6rrr)r)'s;;6KLA@@O


'''
FFF&MMM$			!!!!!rr))rn
contextlibdistutils.corerdistutils.errorsrsuppressImportErrordocutils.utilsrdocutils.parsers.rstdocutils.frontenddocutils.nodesutilsReporterrr)r6rrr}sF""""""000000Z%%0
:p!p!p!p!p!Gp!p!p!p!p!s)AAAPK|5Za

]Lib/site-packages/setuptools/_distutils/command/__pycache__/_framework_compat.cpython-311.pycnuW+A

b;dNdZddlZddlZddlZddlZddlZejdZeedddddd	d
d
Z	ejdZ
dZdS)z6
Backward compatibility for homebrew builds on macOS.
Nc$dtjcxkodknc}tjdkotj}dt	jdv}tjtjk}tj	
d}|o	|o|o|o|S)z^
    Only enabled for Python 3.9 framework homebrew builds
    except ensurepip and venv.
    )	)r
darwinCellarprojectbaseENSUREPIP_OPTIONS)sysversion_infoplatform
_framework	sysconfigget_config_varprefixbase_prefixosenvironget)PY39	frameworkhomebrewvenv	ensurepips     ~E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/_framework_compat.pyenabledr
sC$....w....D(;S^I93MBBBH:(D
233IIII(I4xI	MIz6{installed_base}/{platlibdir}/python{py_version_short}z0{platbase}/{platlibdir}/python{py_version_short}z<{homebrew_prefix}/lib/python{py_version_short}/site-packageszE{homebrew_prefix}/{platlibdir}/python{py_version_short}/site-packagesz;{installed_base}/include/python{py_version_short}{abiflags}z?{installed_platbase}/include/python{py_version_short}{abiflags}z{homebrew_prefix}/binz{homebrew_prefix})stdlib
platstdlibpurelibplatlibincludeplatincludescriptsdata)osx_framework_libraryctsiStjddgd}t	S)Nbrewz--prefixT)text)r
subprocesscheck_outputstriplocals)homebrew_prefixs rvarsr/)sB99	 -vz.BNNNTTVVO88OrcPtr|ds|SdS)z8
    Override the selected scheme for posix_prefix.
    _prefixr&)rendswith)names rschemer41s.99DMM)44""r)__doc__rr	functoolsr*r	lru_cacherdictschemesr/r4rrr;s



				
J
J
J$$GENWMU'
 			#####rPK|5ZhtĖ??RLib/site-packages/setuptools/_distutils/command/__pycache__/config.cpython-311.pycnuW+A

b;dQ3xdZddlZddlZddlmZddlmZddlmZddl	m
Z
ddd	ZGd
deZd
dZ
dS)adistutils.command.config

Implements the Distutils 'config' command, a (mostly) empty command class
that exists mainly to be sub-classed by specific module distributions and
applications.  The idea is that while every "config" command is different,
at least they're all named the same, and users always see "config" in the
list of standard commands.  Also, this is a good place to put common
configure-like tasks: "try to compile this C code", or "figure out where
this header file lives".
N)Command)DistutilsExecError)customize_compiler)logz.cz.cxx)czc++ceZdZdZgdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
ddZddZddZ					ddZ					ddZ						ddZdddgfdZddZdS)configzprepare to build)	)z	compiler=Nzspecify the compiler type)zcc=Nzspecify the compiler executable)z
include-dirs=Iz.list of directories to search for header files)zdefine=DzC preprocessor macros to define)zundef=Uz!C preprocessor macros to undefine)z
libraries=lz!external C libraries to link with)z
library-dirs=Lz.directories to search for external C libraries)noisyNz1show every action (compile, link, run, ...) taken)zdump-sourceNz=dump generated source files before attempting to compile themcvd|_d|_d|_d|_d|_d|_d|_g|_dS)N)compilerccinclude_dirs	librarieslibrary_dirsrdump_source
temp_filesselfs sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/config.pyinitialize_optionszconfig.initialize_options.sE
  
c|j|jjpg|_nCt|jtr)|jt
j|_|jg|_n't|jtr
|jg|_|j	g|_dSt|jtr+|jt
j|_dSdSN)	rdistribution
isinstancestrsplitospathseprrrs rfinalize_optionszconfig.finalize_options=s$ $ 1 > D"D
)3
/
/	D $ 1 7 7
 C CD>!DNN

,
,	."n-DN$ "D
)3
/
/	D $ 1 7 7
 C CD	D	DrcdSrrs rrunz
config.runMsrcddlm}m}t|j|s||j|jd|_t
|j|jr|j|j|j	r|j
|j	|jr#|j|jdSdSdS)z^Check that 'self.compiler' really is a CCompiler object;
        if not, make it one.
        r)	CCompilernew_compilerr)rdry_runforceN)
distutils.ccompilerr+r,r!rr-rrset_include_dirsr
set_librariesrset_library_dirs)rr+r,s   r_check_compilerzconfig._check_compilerTs	@???????$-33
	B(LADM
t}--- 
B
..t/@AAA~
<
++DN;;; 
B
..t/@AAAAA
	B
	B
B
BrcJdt|z}t|d5}|r2|D]}|d|z|d|||ddkr|ddddn#1swxYwY|S)N_configtestwz#include <%s>

)LANG_EXTopenwrite)rbodyheaderslangfilenamefileheaders       r_gen_temp_sourcefilezconfig._gen_temp_sourcefilehs 8D>1
(C
 
 	!D
!%;;FJJ069::::

4   JJtBx4

4   	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!sA+BBBc||||}d}|j||g|j|||||fS)Nz
_configtest.ir)rBrextendr
preprocess)rr<r=rr>srcouts       r_preprocesszconfig._preprocessts_''gt<<Sz***
  c EEESzrc||||}|jrt|d|z|j|g\}|j||g|j|g|||fS)Nzcompiling '%s':rD)rBr	dump_filerobject_filenamesrrEcompile)rr<r=rr>rGobjs       r_compilezconfig._compile{s''gt<<	4c,s2333//66Sz***
se,???Szrcp|||||\}}tjtj|d}	|j|g|	||||jj|	|jjz}	|j	|	|||	fS)Nr)rrtarget_lang)
rOr$pathsplitextbasenamerlink_executable
exe_extensionrappend)
rr<r=rrrr>rGrNprogs
          r_linkzconfig._links]]4,EE
cw 0 0 5 566q9
%%
E%	&	
	
	
=&2$-55Dt$$$S$rc|s|j}g|_tjdd||D]'}	t	j|#t$rY$wxYwdS)Nzremoving: %s )rrinfojoinr$removeOSError)r	filenamesr?s   r_cleanz
config._cleans	!I DO)!4!4555!		H
	(####



		sA
A A Nrcddlm}|d}	|||||n
#|$rd}YnwxYw||S)aQConstruct a source file from 'body' (a string containing lines
        of C/C++ code) and 'headers' (a list of header files to include)
        and run it through the preprocessor.  Return true if the
        preprocessor succeeded, false if there were any errors.
        ('body' probably isn't of much use, but what the heck.)
        rCompileErrorTF)r/rdr3rIrarr<r=rr>rdoks       rtry_cppzconfig.try_cpps	544444
	T7L$????			BBB		



	s7AAc||||||\}}t|trt	j|}t
|5}d}		|}
|
dkrn||
rd}	n4dddn#1swxYwY|	|	S)aConstruct a source file (just like 'try_cpp()'), run it through
        the preprocessor, and return true if any line of the output matches
        'pattern'.  'pattern' should either be a compiled regex object or a
        string containing a regex.  If both 'body' and 'headers' are None,
        preprocesses an empty file -- which can be useful to determine the
        symbols the preprocessor and compiler set by default.
        FTN)
r3rIr!r"rerMr:readlinesearchra)rpatternr<r=rr>rGrHr@matchlines           r
search_cppzconfig.search_cpps
	
##D'<FFSgs##	*j))G
#YY	$E
}}2::>>$'' E

																



s(8B,,B03B0cddlm}|	|||||d}n
#|$rd}YnwxYwt	j|rdpd||S)zwTry to compile a source file built from 'body' and 'headers'.
        Return true on success, false otherwise.
        rrcTFsuccess!failure.)r/rdr3rOrr\rares       rtry_compilezconfig.try_compiles	544444	MM$t<<<BB			BBB		"
0j111


	s7AAcddlm}m}|	|||||||d}	n#||f$rd}	YnwxYwtj|	rdpd||	S)zTry to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        rrd	LinkErrorTFrrrs)r/rdrwr3rYrr\ra)
rr<r=rrrr>rdrwrfs
          rtry_linkzconfig.try_links	@???????	JJtWlI|TRRRBBi(			BBB		"
0j111


	s;	AAc0ddlm}m}|	|||||||\}	}
}||gd}n#||tf$rd}YnwxYwtj|rdpd|	|S)zTry to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        rrvTFrrrs)
r/rdrwr3rYspawnrrr\ra)
rr<r=rrrr>rdrwrGrNexerfs
             rtry_runzconfig.try_runs	@???????	 JJg|YdMCc
JJuBBi);<			BBB		"
0j111


	s6AA'&A'rc~|g}|r|d|z|d|r|d|zn|d|z|dd|dz}||||||S)aDetermine if function 'func' is available by constructing a
        source file that refers to 'func', and compiles and links it.
        If everything succeeds, returns true; otherwise returns false.

        The constructed source file starts out by including the header
        files listed in 'headers'.  If 'decl' is true, it then declares
        'func' (as "int func()"); you probably shouldn't supply 'headers'
        and set 'decl' true in the same call, or you might get errors about
        a conflicting declarations for 'func'.  Finally, the constructed
        'main()' function either references 'func' or (if 'call' is true)
        calls it.  'libraries' and 'library_dirs' are used when
        linking.
        z
int %s ();z
int main () {z  %s();z  %s;}r7)r3rWr]rx)	rfuncr=rrrdeclcallr<s	         r
check_funczconfig.check_func$s.	
	-KKt+,,,O$$$	(KK	D())))KK$'''Cyy%}}T7L)\RRRrcd||d|||g|z|S)aDetermine if 'library' is available to be linked against,
        without actually checking that any particular symbols are provided
        by it.  'headers' will be used in constructing the source file to
        be compiled, but the only effect of this is to check if all the
        header files listed are available.  Any libraries listed in
        'other_libraries' will be included in the link, in case 'library'
        has symbols that depend on other libraries.
        zint main (void) { })r3rx)rlibraryrr=rother_librariess      r	check_libzconfig.check_libIsB 	
}}!
I'

	
rc4|d|g|S)zDetermine if the system header file named by 'header_file'
        exists and can be found by the preprocessor; return true if so,
        false otherwise.
        z
/* No body */)r<r=r)rg)rrArrr>s     rcheck_headerzconfig.check_headerbs(
|| 6(

	
r)NNNr)NNr)NNNNr)NNNNrr)__name__
__module____qualname__descriptionuser_optionsrr&r)r3rBrIrOrYrargrprtrxr|rrrr(rrr	r	s$KL&


DDD 


BBB(


   "			*&6(
:
H

#S#S#S#SP




2





rr	c$|tjd|ntj|t|}	tj||dS#|wxYw)zjDumps a file content into log.info.

    If head is not None, will be dumped before the file content.
    Nz%s)rr\r:readclose)r?headr@s   rrKrKlsv
|x    >>D



s&A99Br)__doc__r$rjdistutils.corerdistutils.errorsrdistutils.sysconfigr	distutilsrr9r	rKr(rrrs		
							""""""//////222222f%%R
R
R
R
R
WR
R
R
j






rPK|5ZssSLib/site-packages/setuptools/_distutils/command/__pycache__/install.cpython-311.pycnuW+A

b;d
v
dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZmZmZdd	lmZdd
lmZmZddlmZd
dlmZddlmZddlmZdZddddddZ dddddddddddde ddddddddddddd Z!erd!d!d"d#d$de!d%<d!d!d&d'd$de!d(<e!"ej#dZ$d)Z%d*Z&d+Z'd,Z(d-Z)d.Z*d/Z+d0Z,d1Z-d2Z.Gd3d4e	Z/dS)5zFdistutils.command.install

Implements the Distutils 'install' command.N)log)Command)DEBUG)get_config_vars)
write_file)convert_path
subst_varschange_root)get_platform)DistutilsOptionErrorDistutilsPlatformError)_framework_compat)_collections)	USER_BASE)	USER_SITETz{base}/Lib/site-packagesz{base}/Include/{dist_name}z{base}/Scriptsz{base})purelibplatlibheadersscriptsdatazA{base}/lib/{implementation_lower}{py_version_short}/site-packageszN{platbase}/{platlibdir}/{implementation_lower}{py_version_short}/site-packageszM{base}/include/{implementation_lower}{py_version_short}{abiflags}/{dist_name}z
{base}/binz!{base}/lib/{implementation_lower}z*{base}/{platlibdir}/{implementation_lower}z1{base}/include/{implementation_lower}/{dist_name}z{base}/site-packagesz{base}/include/{dist_name})posix_prefix
posix_homentpypypypy_ntz
{usersite}zF{userbase}/{implementation}{py_version_nodot_plat}/Include/{dist_name}z:{userbase}/{implementation}{py_version_nodot_plat}/Scriptsz
{userbase}nt_userzQ{userbase}/include/{implementation_lower}{py_version_short}{abiflags}/{dist_name}z{userbase}/bin
posix_userctjt5dtjDcdddS#1swxYwYdS)Nc<i|]}|tj|dS)F)expand)	sysconfig	get_paths).0schemes  tE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/install.py
z+_load_sysconfig_schemes..es:



I'u===


)
contextlibsuppressAttributeErrorr#get_scheme_namesr)r'_load_sysconfig_schemesr/cs		^	,	,



#466




















sAAActpifdttjtDS)z=
    Extend default schemes with schemes from sysconfig.
    cxi|]6}|it|i|i7Sr.)INSTALL_SCHEMESget)r%r&sysconfig_schemess  r'r(z!_load_schemes..rs`

		
!!&"--
##FB//
r))r/set	itertoolschainr2)r4s@r'
_load_schemesr8ksX
0117R
)//;LMMNNr)c4ttdrdSdS)Npypy_version_infoPyPyPython)hasattrsysr.r)r'_get_implementationr?{ss'((vxr)ct|tt|}t|t|t
|dSN)_inject_headers_load_scheme_resolve_schemevarsupdate_remove_set
_scheme_attrs)obnamer&s   r'_select_schemerKsQ
T<0E0E#F#F
G
GFHHOOKM&$9$9::;;;;;r)cDfd|DS)z1
    Include only attrs that are None in ob.
    c<i|]\}}t|||SrA)getattr)r%keyvaluerIs   r'r(z_remove_set..s.SSS:3'"c:J:J:RC:R:R:Rr))items)rIattrss` r'rGrGs(TSSSSSSSr)c|d\}}}	tj|}n1#t$r$t	jt
|}YnwxYw|S)N_)	partitionr#get_preferred_scheme	Exceptionfwr&
_pypy_hack)rJos_nameseprOresolveds     r'rDrDsls++GS#/1#66///9Z--../Os0+AAc*t|SrA)r8)rJs r'rCrCs??4  r)cvtt|}|d|d|S)z
    Given a scheme name and the resolved scheme,
    if the scheme does not include headers, resolve
    the fallback scheme for the name and use headers
    from it. pypa/distutils#88
    r)rCrY
setdefault)rJr&fallbacks   r'rBrBs9Jt,,--H
i)!4555Mr)c*fdtDS)z.s(AAAcsfSkAAAr))SCHEME_KEYS)r&s`r'rHrHsAAAA[AAAAr)ctjdk}ttdo|}|d}ddtjdkzz}|r|r|n|S)N)r:)_user_homer_ntr)r>version_infor=endswithosrJ)rJPY37old_pypyprefix	pypy_names     r'rYrYsbf$Ds/009TH122
2F"'T/22I 5V5995r)c0eZdZdZgdZgdZer0edddezfedddiZ	d	Z
d
ZdZdZ
d
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdefdefd efd!efd"d#fgZdS)$installz'install everything from build directory))zprefix=Nzinstallation prefix)zexec-prefix=Nz.(Unix only) prefix for platform-specific files)zhome=Nz+(Unix only) home directory to install under)z
install-base=Nz;base installation directory (instead of --prefix or --home))zinstall-platbase=Nz\base installation directory for platform-specific files (instead of --exec-prefix or --home))zroot=Nzversionsplitrrr,distributionget_nameget_versionget_fullnamerkrNr?lowerdictreplace
HAS_USER_SITErrr	DictStackrXrEr#config_varsexpand_basedirsrrprintexpand_dirscreate_home_pathrhas_ext_modulesrr
convert_pathshandle_extra_pathinstall_libbasepathjoin
extra_dirsrchange_rootsset_undefined_options)rrrpr}r
local_varscompat_varsrs        r'finalize_optionszinstall.finalize_optionsMs 
K	4+	ty		!%!6	'>

9	$+	)9	&K
9
	K
	
	y
	 	
	
$
	':
7g
(		GHHH#' 	
2333
7g    !!!5666[&&((+
 /- H H	|HH			HHH	*3355 -99;;!.;;==$ '#*:2A2*> > &)9"1")= = *& !#|U;;$7$9$9$?$?$A$A133


$")#x"<"<"D"DS""M"M



	;%)%:Jz"%)%:Jz"'1
WYYY%>%@%@*M

	
/000".
6!%!6
:	+%%%%%%.!!!F4())***	
+,,,9	$!!#### 0022
8#'#7  #'#7 	
		
		
		
 	
   #/7<<(8$/JJ9 5)Y	69


	
.///	
""13M	
	
	
	
	
sE++E:9E:ctsdSddlm}tj|dz|jD]}|d}|ddkr
|dd}||jvr4|j|}||}t||}n%||}t||}tjd||dS)zDumps the list of user options.Nr)
longopt_xlate:=z  %s: %s)	rdistutils.fancy_getoptrrdebuguser_optionsnegative_opt	translaterN)rmsgroptopt_namevals      r'rzinstall.dump_dirss	F888888	#)$	1	1C1vH|s""#AbD>4,,,,X6#--m<<!$111#--m<<dH--Ij(C0000	1	1r)cP|j|jI|jduo|jduo|jdup|jdup|jdup|jdu}|rtddS|j	r@|j
td|j
x|_|_|ddS|j
*|j
x|_|_|ddS|j|jtdt!t"dd}t$jt*j|z|_t$jt*j|z|_n|j|j|_|j|_|j|_|d	dS)
z&Finalizes options for posix platforms.NzPinstall-base or install-platbase supplied, but installation scheme is incomplete$User base directory is not specifiedrrz*must not supply exec-prefix without prefix_prefix_additionrr)rrrrrrrrrr{rr

select_schemer~rpr}rNr#rmrnormpathr>)rincomplete_schemers   r'rzinstall.finalize_unixs(D,A,M$,5,45,4-
'4/-'4/
-$,
!
*8
F9	/$,,-STTT8<8MMD 5|,,,,,
Y
"8<	AD 5|,,,,,{"#/.D
$+96H"#M#M  g..sz::=MM#%7#3#3CO#D#DGW#W  #+'+{D$ $D$($4D!~.....r)c4|jrM|jtd|jx|_|_|tjdzdS|j*|jx|_|_|ddS|j	.tj
tj	|_	|j	x|_|_	|tjdS#t$rtdtjzwxYw)z)Finalizes options for non-posix platformsNrrhrz)I don't know how to install stuff on '%s')r{rr
rrrrmrJr~rprrr>KeyErrorrs r'rzinstall.finalize_otherGs9	$,,-STTT8<8MMD 5rw011111
Y
"8<	AD 5|,,,,,{" g..sz::8<CD 5
""27+++++


,?"'I
sC00'Dc&t||dSrA)rK)rrJs  r'rzinstall.select_scheme]stT"""""r)c|D]y}t||}|etjdkstjdkrtj|}t||j}t|||zdS)Nrr)rNrmrJr
expanduserr	rsetattr)rrRattrrs    r'
_expand_attrszinstall._expand_attrs`s	)	)D$%%C7g%%D',,S11C d&677dC(((
	)	)r)c4|gddS)zNCalls `os.path.expanduser` on install_base, install_platbase and
        root.)rrrNrrs r'rzinstall.expand_basedirsis%	
GGGHHHHHr)c4|gddS)z+Calls `os.path.expanduser` on install dirs.)rrrrrrNrrs r'rzinstall.expand_dirsns3


		
		
		
		
		
r)cr|D]3}d|z}t||tt||4dS)z!Call `convert_path` over `names`.rcN)rrrNrnamesrJrs    r'rzinstall.convert_paths{sP	C	CD$DD$WT4-@-@ A ABBBB	C	Cr)c|j|jj|_|jtjdt	|jt
r|jd|_t|jdkr|jdx}}n2t|jdkr|j\}}ntdt|}nd}d}||_
||_dS)	z4Set `path_file` and `extra_dirs` using `extra_path`.NzIDistribution option extra_path is deprecated. See issue27919 for details.,rrrzY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsr)rrrr
isinstancestrrlenrr	path_filer)rrrs   r'rzinstall.handle_extra_paths?""/:DO?&H.


$/3//
="&/"7"7"<"<4?##q(()-);;	JJT_%%**(,%	::*B&j11JJIJ#$r)c~|D]9}d|z}t||t|jt||:dS)z:Change the install directories pointed by name using root.rcN)rr
rrNrs    r'rzinstall.change_rootssT	M	MD$DD$DIwtT7J7J K KLLLL	M	Mr)c|jsdSttjd}|jD]s\}}t||rLtj	|s-|
d|ztj|dtdS)zCreate directories under ~.N~zos.makedirs('%s', 0o700)i)r{rrmrrrrQr
startswithisdirdebug_printmakedirs)rr~rJrs    r'rzinstall.create_home_pathsy	FBG..s3344*0022	)	)JD$4yy##D))
)"'--2E2E
)  !;d!BCCCD%(((	)	)r)c|js\|d|jdj}|jr!|t
krtd|D]}|||j	r|
|jr|}|j
rFt|j
}tt|D]}|||d||<|t"|j|fd|jzt%t&jjt,j}t%t&jj|}t&jt&j|j}|jr.|j	r|js$||vrt5jd|jdSdSdSdS)zRuns the command.rz"Can't install when cross-compilingNz'writing list of installed files to '%s'zmodules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)rrun_commandrget_command_obj	plat_namerrr
get_sub_commandsrcreate_path_filerget_outputsrrrangeexecutermaprmrrr>normcaserrrr)r
build_platcmd_nameoutputsroot_lencountersys_pathrs        r'runzinstall.runs	VW%%%*::7CCMJ}
V|~~!=!=,-TUUU--//	'	'HX&&&&>	$!!###;
	&&((Gy
Cty>>$S\\22CCG'.w'7		'BGG$$LLg&9DKG


rw'22rw'22g&&rw'7'78H'I'IJJM	^	(,(>	8++IE 





		,+		r)ctj|j|jdz}|jr)|t||jgfd|zdS|	d|zdS)zCreates the .pth file.pthzcreating %szpath file '%s' not createdN)
rmrrrrrrrrr)rfilenames  r'rzinstall.create_path_files7<< 4dnv6MNN!	?LLX'89=8;S





II2X=>>>>>r)c^g}|D]G}||}|D]}||vr||H|jrG|jr@|tj|j	|jdz|S)z.Assembles the outputs of all the sub-commands.r)
rget_finalized_commandrappendrrrmrrr)rrr
cmdrs     r'rzinstall.get_outputss--//	-	-H,,X66C OO--
-
-7**NN8,,,
->	Xd4	XNN27<<(UVVWWWr)cg}|D]>}||}||?|S)z*Returns the inputs of all the sub-commands)rrextend
get_inputs)rinputsr
rs    r'rzinstall.get_inputss[--//	,	,H,,X66CMM#..**++++
r)cf|jp|jS)zSReturns true if the current distribution has any Python
        modules to install.)rhas_pure_modulesrrs r'has_libzinstall.has_libs/
..00WD4E4U4U4W4W	
r)c4|jS)zLReturns true if the current distribution has any headers to
        install.)rhas_headersrs r'rzinstall.has_headers ,,...r)c4|jS)zMReturns true if the current distribution has any scripts to.
        install.)rhas_scriptsrs r'r"zinstall.has_scriptsr r)c4|jS)zJReturns true if the current distribution has any data to.
        install.)rhas_data_filesrs r'has_datazinstall.has_data!s //111r)rrrrinstall_egg_infocdS)NTr.rs r'zinstall.-s$r)) __name__
__module____qualname__descriptionrboolean_optionsrrrrrrrrrrrrrrrrrrrrrrrr"r%sub_commandsr.r)r'rsrss;K:::Lx988O'
T>JK	
	
	
	v&&& ),LEEEZp
p
p
j111(//////b,###)))III



CCC!%!%!%FMMM)))000d??? 


///
///
222
 	K(	K(	"	../LLLr)rs)0__doc__r>rmr*r#r6	distutilsrdistutils.corerdistutils.debugrdistutils.sysconfigrdistutils.file_utilrdistutils.utilrr	r
rdistutils.errorsrr
rrrXrsiterrrWINDOWS_SCHEMEr2rFschemesrdr/r8r?rKrGrDrCrBrHrYrsr.r)r'r:s//


				""""""!!!!!!//////******@@@@@@@@@@''''''IIIIIIII%%%%%%
*)+W+37?F))/

*)/#3  FO
""OI 3#
%%OL!rz"""C





 <<<
TTT!!!BBB
666x	x	x	x	x	gx	x	x	x	x	r)PK|5ZX*/XLib/site-packages/setuptools/_distutils/command/__pycache__/install_data.cpython-311.pycnuW+A

b;d
JdZddlZddlmZddlmZmZGddeZdS)zdistutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files.N)Command)change_rootconvert_pathc>eZdZdZgdZdgZdZdZdZdZ	dZ
d	S)
install_datazinstall data files))zinstall-dir=dzIbase directory for installing data files (default: installation base dir))zroot=Nz?aaAQAQAQS >>!T-=>>a
$$S))))#1Q4((w}}S))6',,t'7==CCY6%di55CC   Q42::M((----!"!22+D11#'>>$#<#<a
,,S111127	2	2rc|jpgSN)rrs r
get_inputszinstall_data.get_inputsPs$"$rc|jSr.)rrs rget_outputszinstall_data.get_outputsSs
}rN)__name__
__module____qualname__descriptionuser_optionsboolean_optionsrrr,r/r1rrrr
s&K			LiO


 2 2 2D%%%rr)__doc__r$distutils.corerdistutils.utilrrrr8rrr<s$$
			""""""44444444GGGGG7GGGGGrPK|5ZDVLib/site-packages/setuptools/_distutils/command/__pycache__/bdist_dumb.cpython-311.pycnuW+A

b;d]zdZddlZddlmZddlmZddlmZmZddl	m
Z
ddlmZddl
mZGd	d
eZdS)zdistutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix).N)Command)get_platform)remove_treeensure_relative)DistutilsPlatformError)get_python_version)logc	heZdZdZddddezfdddd	d
ddg	Zgd
ZdddZdZdZ	dZ
dS)
bdist_dumbz"create a "dumb" built distribution)z
bdist-dir=dz1temporary directory for creating the distributionz
plat-name=pz;platform name to embed in generated filenames (default: %s))zformat=fz>archive format to create (tar, gztar, bztar, xztar, ztar, zip))	keep-tempkzPkeep the pseudo-installation tree around after creating the distribution archive)z	dist-dir=rz-directory to put final built distributions in)
skip-buildNz2skip rebuilding everything (for testing/debugging))relativeNz7build the archive using relative paths (default: false))zowner=uz@Owner name used when creating a tar file [default: current user])zgroup=gzAGroup name used when creating a tar file [default: current group])rrrgztarzip)posixntcd|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)		bdist_dir	plat_nameformat	keep_tempdist_dir
skip_buildrownergroup)selfs wE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/bdist_dumb.pyinitialize_optionszbdist_dumb.initialize_options>sE





c`|j?|dj}tj|d|_|jH	|jtj|_n*#t$rtdtjzwxYw|dddddS)Nbdistdumbz@don't know how to create dumb built distributions on platform %s)rr)rr)rr)rget_finalized_command
bdist_baseospathjoinrdefault_formatnameKeyErrorrset_undefined_options)r"r*s  r#finalize_optionszbdist_dumb.finalize_optionsIs>!33G<<GJW\\*f==DN;
"1"':


,%')w/
	
""$&(		
	
	
	
	
sA,,'Bc:|js|d|dd}|j|_|j|_d|_t
jd|j|dd|j	
|j}tj
|j|}|js|j}n|j	rJ|j|jkr:t)dt+|jd	t+|jd
tj
|jt-|j}|||j||j|j}|j	rt5}nd}|j	jd
||f|jst=|j|jdSdS)Nbuildinstall)reinit_subcommandsrzinstalling to %sz{}.{}zLcan't make a dumb built distribution where base and platbase are different (z, ))root_dirr r!anyr)dry_run) rrun_commandreinitialize_commandrrootwarn_dirr	infordistributionget_fullnamerr+r,r-rrhas_ext_modulesinstall_baseinstall_platbaserreprrmake_archiver r!r
dist_filesappendrrr;)r"r5archive_basenamepseudoinstall_rootarchive_rootfilename	pyversions       r#runzbdist_dumb.run^s	&W%%%++I!+LL~!_#T^444####>>**,,dn

 W\\$-9IJJ}	>LL 0022
$(@@@,,G0111148P3Q3Q3Q3QS "w||NOG4H$I$I  
$$K!**%

,,..	*,,III$++\9h,OPPP~	>======	>	>r%N)__name__
__module____qualname__descriptionruser_optionsboolean_optionsr.r$r2rOr%r#rrs8K	Q
*lnn
-	
	

	
	LR	

	

	
?$LL>==O&e44N			


*2>2>2>2>2>r%r)__doc__r+distutils.corerdistutils.utilrdistutils.dir_utilrrdistutils.errorsrdistutils.sysconfigr	distutilsr	rrVr%r#r^s
			""""""'''''';;;;;;;;333333222222@>@>@>@>@>@>@>@>@>@>r%PK|5ZaVLib/site-packages/setuptools/_distutils/command/__pycache__/py37compat.cpython-311.pycnuW+A

b;dddlZdZdZejdkr*ejdkrejdddkreeeneZdS)Nc#Kddlm}|dsdSdtjdz	tjdz	dz|d	VdS)
zj
    On Python 3.7 and earlier, distutils would include the Python
    library. See pypa/distutils#9.
    r	sysconfigPy_ENABLED_SHAREDNz
python{}.{}{}ABIFLAGS)	distutilsrget_config_varformatsys
hexversionrs wE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/py37compat.py_pythonlib_compatrs
$#######$788

 
 "	2	%  ,,cfdS)Nc&|i|S)N)argskwargsf1f2s  rzcompose..s 22bb$&9&&9&9#:#:rr)rrs``rcomposers::::::r)darwinraix)rrrversion_infoplatformlist	pythonlibrrrr$s



";;;&    RaRE!!GD#$$$

		rPK|5ZDDTLib/site-packages/setuptools/_distutils/command/__pycache__/build_py.cpython-311.pycnuW+A

b;d@zdZddlZddlZddlZddlZddlmZddlm	Z	m
Z
ddlmZddl
mZGddeZdS)	zHdistutils.command.build_py

Implements the Distutils 'build_py' command.N)Command)DistutilsOptionErrorDistutilsFileError)convert_path)logceZdZdZgdZddgZddiZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZdZdZdZdZdZddZdZdZdZdZdS)build_pyz5"build" pure Python modules (copy to build directory)))z
build-lib=dzdirectory to "build" (copy) to)compileczcompile .py to .pyc)
no-compileNz!don't compile .py files [default])z	optimize=Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])forcefz2forcibly build everything (ignore file timestamps)rrr
cvd|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	build_lib
py_modulespackagepackage_datapackage_dirroptimizerselfs uE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/build_py.pyinitialize_optionszbuild_py.initialize_options$s@ 



cH|ddd|jj|_|jj|_|jj|_i|_|jjr;|jjD]\}}t||j|<||_	t|jtsV	t|j|_d|jcxkrdksnJdS#ttf$rtdwxYwdS)Nbuild)rr)rrrzoptimize must be 0, 1, or 2)set_undefined_optionsdistributionpackagesrrritemsrget_data_files
data_files
isinstancerint
ValueErrorAssertionErrorr)rnamepaths   rfinalize_optionszbuild_py.finalize_options.sM""/1C	
	
	
)2
+6 -:(	<"/;AACC
<
<
d)5d);); &&--//$---	J
J #DM 2 2
DM....Q......../
J
J
J*+HIII
J		J	Js
/C>>!Dc|jr||jr(||||ddS)Nr)include_bytecode)r
build_modulesr"build_packagesbuild_package_databyte_compileget_outputsrs rrunzbuild_py.runGsy,?	!   =	&!!!##%%%$**A*>>?????rc\g}|js|S|jD]}||}tjj|jg|dz}d|rt|dzfd|||D}|	||||f|S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples.rc$g|]}|d
SN).0fileplens  r
z+build_py.get_data_files..ws!XXXdeeXXXr)
r"get_package_dirosr+joinrsplitlenfind_data_filesappend)rdatarsrc_dir	build_dir	filenamesr=s      @rr$zbuild_py.get_data_fileses}	K}	B	BG**733G'7'--:L:L'LNID
(7||a'YXXX1E1Egw1W1WXXXIKK'9i@AAAArc	h|jdg|j|gz}g|D]t}tjtjtj|t|}fd|DuS)z6Return filenames for package's data files in 'src_dir'cZg|]'}|vtj|%|(Sr:)r@r+isfile)r;fnfiless  rr>z,build_py.find_data_files..s0QQQ"E//bgnnR>P>P////r)	rgetglobr@r+rAescaperextend)rrrGglobspatternfilelistrOs      @rrDzbuild_py.find_data_files{s!%%b"--0A0E0Egr0R0RR		GyT[11<3H3HIIH
LLQQQQhQQQ



rc>|jD]\}}}}|D]}tj||}|tj||tj|||ddS)z$Copy data files into build directoryF
preserve_modeN)r%r@r+rAmkpathdirname	copy_file)rrrGrHrIfilenametargets       rr1zbuild_py.build_package_datas6:o		2GWi%

i::BGOOF33444GLL(33V5
		rc|d}|js|rtjj|SdSg}|r{	|jd|}|d|tjj|S#t$r"|d|d|d=YnwxYw|{|jd}||d||rtjj|SdS)zReturn the directory, relative to the top of the source
        distribution, where package 'package' should be found
        (at least according to the 'package_dir' option, if any).r6rKr)rBrr@r+rAinsertKeyErrorrP)rrr+tailpdirs     rr?zbuild_py.get_package_dirs"}}S!!	
w|T**rD
/+CHHTNN;D
KK4(((7<.. !!!KK48,,,R!
"'++B//#KK4(((7<..2s B)B.-B.c\|dkrbtj|std|ztj|std|z|rAtj|d}tj|r|SdS)NrKz%package directory '%s' does not existz>supposed package directory '%s' exists, but is not a directoryz__init__.py)r@r+existsrisdirrArM)rrrinit_pys    r
check_packagezbuild_py.check_packages
"7>>+..
(;kI7==--
(-/:;	gll;
>>Gw~~g&&
trcttj|stjd||dSdS)Nz!file %s (for module %s) not foundFT)r@r+rMrwarn)rmodulemodule_files   rcheck_modulezbuild_py.check_modules7w~~k**	H8+vNNN54rcJ|||tjtjtj|d}g}tj|jj}|D]}tj|}||kr[tj	tj
|d}||||f|d|z|S)Nz*.pyrzexcluding %s)
rirQr@r+rArRabspathr!script_namesplitextbasenamerEdebug_print)	rrrmodule_filesmodulessetup_scriptrabs_frls	         rfind_package_moduleszbuild_py.find_package_moduless7K000ydk+.F.F!O!OPPwt'8'DEE	@	@AGOOA&&E$$))"'*:*:1*=*=>>qA34444  ,!>????rci}g}|jD]}|d}d|dd}|d}	||\}}n'#t$r||}d}YnwxYw|s7|||}	|df||<|	r||d|	ftj||dz}
|	||
s||||
f|S)aFinds individually-specified Python modules, ie. those listed by
        module name in 'self.py_modules'.  Returns a list of tuples (package,
        module_base, filename): 'package' is a tuple of the path through
        package-space to the module; 'module_base' is the bare (no
        packages, no dots) module name, and 'filename' is the path to the
        ".py" file (relative to the distribution root) that implements the
        module.
        r6rr`r7__init__.py)
rrBrArbr?rirEr@r+rn)rr"rvrlr+rmodule_basercheckedrhrms           rfind_moduleszbuild_py.find_modulessNo	@	@F<<$$DhhtAbDz**Gr(K
)1'):&gg


"227;;

C,,WkBB%0!$4!CNNGZ#ABBB
',,{K%4GHHK$$V[99
NNG[+>????s	A!A98A9cg}|jr'|||jrJ|jD]B}||}|||}||C|S)a4Compute the list of all modules that will be built, whether
        they are specified one-module-at-a-time ('self.py_modules') or
        by whole packages ('self.packages').  Return a list of tuples
        (package, module, module_file), just like 'find_modules()' and
        'find_package_modules()' do.)rrSrr"r?ry)rrvrrms     rfind_all_moduleszbuild_py.find_all_moduless?	0NN4,,..///=	"=
"
""227;;--g{CCq!!!!rc>d|DS)Ncg|]
}|dS)r`r:)r;rls  rr>z-build_py.get_source_files..0sAAAvr
AAAr)rrs rget_source_fileszbuild_py.get_source_files/s"AA)>)>)@)@AAAArc\|gt|z|dzgz}tjj|S)Nr|)listr@r+rA)rrHrrloutfile_paths     rget_module_outfilezbuild_py.get_module_outfile2s/!{T']]2fun5EEw|\**rr7c|}g}|D]\}}}|d}||j||}|||r|jr4|tj|d|j	dkr9|tj||j	|d|j
Dz
}|S)Nr6rK)optimizationrcbg|],\}}}}|D]"}tj||#-Sr:)r@r+rA)r;rrGrHrIr]s      rr>z(build_py.get_outputs..IsW


6)Y%


GLLH--



r)rrBrrrEr	importlibutilcache_from_sourcerr%)rr.rvoutputsrrlrmr]s        rr3zbuild_py.get_outputs6s#'')).5		*WfkmmC((G..t~wOOHNN8$$$

<NN!88PR8SS=1$$NN!88$4=9	

:>/


	
rc~t|tr|d}n+t|ttfstd||j||}tj	
|}|||||dS)Nr6z:'package' must be a string (dot-separated), list, or tuplerrX)
r&strrBrtuple	TypeErrorrrr@r+r[rZr\)rrlrmroutfiledirs      rbuild_modulezbuild_py.build_moduleQsgs##	mmC((GGGdE]33	L
))$.'6JJgoog&&C~~k7!~DDDrcn|}|D]\}}}||||dSr9)rr)rrvrrlrms     rr/zbuild_py.build_modulesasP##%%.5	<	<*Wfk

fk7;;;;	<	>>F//////":bf_F
<	LFDL



=1Lj





rN)r7)__name__
__module____qualname__descriptionuser_optionsboolean_optionsnegative_optrr,r4r$rDr1r?rirnryrrrrr3rr/r0r2r:rrr	r	ssKKL!'*O ),LJJJ2@@@<,


%%%N4


222h BBB+++6EEE <<<@@@(rr	)__doc__r@importlib.utilrrrQdistutils.corerdistutils.errorsrrrr	distutilsrr	r:rrrs00
			



""""""EEEEEEEE''''''GGGGGwGGGGGrPK|5Z""WLib/site-packages/setuptools/_distutils/command/__pycache__/install_lib.cpython-311.pycnuW+A

b;d ZdZddlZddlZddlZddlmZddlmZdZ	GddeZ
dS)zkdistutils.command.install_lib

Implements the Distutils 'install_lib' command
(install all Python modules).N)Command)DistutilsOptionErrorz.pycfeZdZdZgdZgdZddiZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZdZdS)install_libz7install all Python modules (extensions and pure Python)))zinstall-dir=dzdirectory to install to)z
build-dir=bz'build directory (where to install from))forcefz-force installation (overwrite existing files))compileczcompile .py to .pyc [default])
no-compileNzdon't compile .py files)z	optimize=Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])
skip-buildNzskip the build steps)r	rrr
rcZd|_d|_d|_d|_d|_d|_dS)Nr)install_dir	build_dirr	roptimize
skip_buildselfs xE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/install_lib.pyinitialize_optionszinstall_lib.initialize_options7s1

c	H|ddddddd|jd|_|jd	|_t|jtsP	t	|j|_|jd
vrt
dS#tt
f$rtdwxYwdS)Ninstall)	build_libr)rr)r	r	)rr)rr)rrTF)rzoptimize must be 0, 1, or 2)set_undefined_optionsrr
isinstanceintAssertionError
ValueErrorrrs rfinalize_optionszinstall_lib.finalize_options@s	
""&*"$(	
	
	
<DL= !DM$---	J
J #DM 2 2
=	11((21/
J
J
J*+HIII
J	J	Js)A>>!Bc||}|0|jr||dSdSdSN)buildrdistributionhas_pure_modulesbyte_compileroutfiless  rrunzinstall_lib.run[sb


<<>>D$5$F$F$H$Hh''''' rc|js^|jr|d|jr|ddSdSdS)Nbuild_py	build_ext)rr(r)run_commandhas_ext_modulesrs rr'zinstall_lib.buildks|	. 1133
-  ,,, 0022
.  -----		.	.
.
.rctj|jr!||j|j}n|d|jzdS|S)Nz3'%s' does not exist -- no Python modules to install)ospathisdirr	copy_treerwarnr+s  rrzinstall_lib.installrs`
7==((	~~dnd6FGGHHIIEV



Frc2tjr|ddSddlm}|dj}|jr||d|j||j	|j
dkr'|||j
|j||j|j	dSdS)Nz%byte-compiling is disabled, skipping.r)r*r)rr	prefixdry_run)rr	r:verboser;)sysdont_write_bytecoder8distutils.utilr*get_finalized_commandrootrr	r;rr<)rfilesr*install_roots    rr*zinstall_lib.byte_compile|s"	II=>>>F//////11)<<A<	Lj#



=1Lj#






rc	V|sgS||}|}t||}t|ttjz}g}|D]=}	|tj||	|d>|Sr&)	r@get_outputsgetattrlenr4sepappendr5join)
rhas_any	build_cmd
cmd_option
output_dirbuild_filesr
prefix_lenoutputsfiles
          r_mutate_outputszinstall_lib._mutate_outputss	I..y99	++--Iz22	^^c"&kk1
	H	HDNN27<<
D4EFFGGGGrcg}|D]}tjtj|d}|tkrP|jr4|tj	|d|j
dkr9|tj	||j
|S)Nr)optimizationr)r4r5splitextnormcasePYTHON_SOURCE_EXTENSIONrrI	importlibutilcache_from_sourcer)rpy_filenamesbytecode_filespy_fileexts     r_bytecode_filenameszinstall_lib._bytecode_filenamess#		G'""27#3#3G#<#<==a@C---|
%%N44W24NN}q  %%N44dm5rc ||jdd|j}|jr||}ng}||jdd|j}||z|zS)zReturn the list of files that would be installed if this command
        were actually run.  Not affected by the "dry-run" flag or whether
        modules have actually been built yet.
        r/rr0)rSr(r)rrrar2)rpure_outputsbytecode_outputsext_outputss    rrEzinstall_lib.get_outputss
++..00	

<	"#77EE!**--//	

..<rvs!!

			



""""""111111 \\\\\'\\\\\rPK|5Z/ll[Lib/site-packages/setuptools/_distutils/command/__pycache__/install_scripts.cpython-311.pycnuW+A

b;dRdZddlZddlmZddlmZddlmZGddeZdS)zudistutils.command.install_scripts

Implements the Distutils 'install_scripts' command, for installing
Python scripts.N)Command)log)ST_MODEc@eZdZdZgdZddgZdZdZdZdZ	d	Z
d
S)install_scriptsz%install scripts (Python or otherwise)))zinstall-dir=dzdirectory to install scripts to)z
build-dir=bz'build directory (where to install from))forcefz-force installation (overwrite existing files))
skip-buildNzskip the build stepsr
rc>d|_d|_d|_d|_dS)Nr)install_dirr
	build_dir
skip_buildselfs |E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/install_scripts.pyinitialize_optionsz"install_scripts.initialize_optionss#
cb|dd|dddddS)Nbuild)
build_scriptsrinstall)rr)r
r
)rr)set_undefined_optionsrs rfinalize_optionsz install_scripts.finalize_options!sG""7,JKKK"".(		
	
	
	
	
rc|js|d||j|j|_tjdkr|D]q}|j	rtjd|t
j|tdzdz}tjd||t
j||pdSdS)Nrposixzchanging mode of %simizchanging mode of %s to %o)rrun_command	copy_treerroutfilesosnameget_outputsdry_runrinfostatrchmod)rfilemodes   rrunzinstall_scripts.run*s	._---t~t7GHH

7g((**
)
)<)H2D9999WT]]73u<FDH8$EEEHT4((((
)
)rc|jjpgSN)distributionscriptsrs r
get_inputszinstall_scripts.get_inputs9s (.B.rc|jpgSr,)r rs rr#zinstall_scripts.get_outputs<s}""rN)__name__
__module____qualname__descriptionuser_optionsboolean_optionsrrr*r/r#rrrrs9KL-O



)
)
)///#####rr)	__doc__r!distutils.corer	distutilsrr&rrr7rrr;s
			""""""/#/#/#/#/#g/#/#/#/#/#rPK|5ZQ~vvULib/site-packages/setuptools/_distutils/command/__pycache__/build_ext.cpython-311.pycnuW+A

b;dF{dZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZmZm
Z
ddlmZmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZdd
lmZejdZdZ GddeZ!dS)zdistutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP).N)Command)DistutilsOptionErrorDistutilsSetupErrorCCompilerErrorDistutilsErrorCompileErrorDistutilsPlatformError)customize_compilerget_python_version)get_config_h_filename)newer_group)	Extension)get_platform)log)
py37compat)	USER_BASEz3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$c&ddlm}|dS)Nrshow_compilers)distutils.ccompilerrrs vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/build_ext.pyrr#s(222222Nc eZdZdZdejzZdddddezfdd	d
dezfdd
ddddezfddddddddddgZgdZ	ddde
fgZd Zd!Z
d"Zd#Zd$Zd%Zd&Zd'Zd(Zejd)Zd*Zd+Zd,Zd-Zd.Zd/Zd0Zd1ZdS)2	build_extz8build C/C++ extensions (compile/link to build directory)z (separated by '%s'))z
build-lib=bz(directory for compiled extension modules)zbuild-temp=tz1directory for temporary files (build by-products)z
plat-name=pz>platform name to cross-compile for, if supported (default: %s))inplaceiziignore build-lib and put compiled extensions into the source directory alongside your pure Python modulesz
include-dirs=Iz.list of directories to search for header files)zdefine=DzC preprocessor macros to define)zundef=Uz!C preprocessor macros to undefine)z
libraries=lz!external C libraries to link withz
library-dirs=Lz.directories to search for external C libraries)zrpath=Rz7directories to search for shared C libraries at runtime)z
link-objects=Oz2extra explicit link objects to include in the link)debuggz'compile/link with debugging information)forcefz2forcibly build everything (ignore file timestamps))z	compiler=czspecify the compiler type)z	parallel=jznumber of parallel build jobs)swig-cppNz)make SWIG create C++ files (default is C))z
swig-opts=Nz!list of SWIG command line options)zswig=Nzpath to the SWIG executable)userNz#add user include, library and rpath)rr(r*r.r/z
help-compilerNzlist available compilersc,d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_dS)Nr)
extensions	build_lib	plat_name
build_temprpackageinclude_dirsdefineundef	librarieslibrary_dirsrpathlink_objectsr(r*compilerswigswig_cpp	swig_optsr/parallelselfs rinitialize_optionszbuild_ext.initialize_optionsns 
 
 


	
	


rc
Nddlm}|ddddddd	d
|j|jj|_|jj|_|}|d}|j	|jj	pg|_	t|j	tr)|j	tj|_	tjtjkrB|j	tjtjd
|j	|tjj||kr<|j	|tjj|d|d|jg|_|jg|_nCt|jtr)|jtj|_|jg|_nCt|jtr)|jtj|_tjdkr|jtjtjdtjtjkrB|jtjtjd|jr+tj|jd|_n*tj|jd|_|j	tjt?|jtj|j dkrd}n|j dd}tjtjd}|r tj||}|j|tj!dddkru|j"sT|jtjtjddtGzdn|jd|$drO|j"s.|j|$dn|jd|j%r+|j%d}d |D|_%|j&r|j&d|_&|j'g|_'n|j'd!|_'|j(rtjtRd
}tjtRd}tj*|r|j	|tj*|r4|j||j|t|j+tr9	tY|j+|_+dS#tZ$rt]d"wxYwdS)#Nr)	sysconfigbuild)r2r2)r4r4)r=r=)r(r()r*r*)rArA)r3r3r)
plat_specificincluder9r<ntlibsDebugReleasewin32PCbuildcygwinlibpythonconfig.Py_ENABLE_SHAREDLIBDIR,cg|]}|dfS)1).0symbols  r
z.build_ext.finalize_options..s???VFC=???r zparallel should be an integer)/	distutilsrFset_undefined_optionsr5distributionext_packageext_modulesr1get_python_incr6
isinstancestrsplitospathsepsysexec_prefixbase_exec_prefixappendpathjoinextendensure_string_listr9r:r;nameprefixr(r4dirnamerr3platformpython_buildrget_config_varr7r8r@r/risdirrAint
ValueErrorr)	rCrF
py_includeplat_py_includesuffixnew_libdefinesuser_includeuser_libs	         rfinalize_optionszbuild_ext.finalize_optionss''''''""&($$&		
		
		
<,8DL+7--//
#222CC$ $ 1 > D"Dd'--	D $ 1 7 7
 C CD?c222$$RW\\#/9%M%MNNN	
  !1!1"'/!B!BCCCj(($$_%:%:27?%K%KLLL,,,///>!DN$ "D
)3
/
/	D $ 1 7 7
 C CD:DJJ

C
(
(	6))"*55DJ
7d??
$$RW\\#/6%J%JKKK#sz11!((c6JF)S)STTTz
K"$',,t"H"H"$',,t	"J"J
$$RW__5J5L5L%M%MNNN$$S%9:::~(( +gll3?I>>G
8',,w77$$W---<x'')	
.!((GLL
E86H6J6J+JH!((---
##$677	.)
.!(()A)A()K)KLLLL!((---;	@k'',,G??w???DK
:	/))#..DJ>!DNN!^11#66DN9	,7<<	9==Lw||Iu55Hw}}\**
7!((666w}}X&&
,!((222
!!(+++dmS))	L
L #DM 2 2



L
L
L*+JKKK
L	L	Ls-\\"cvddlm}|jsdS|jrb|d}|j|pg|j	
|j||j|j
|j|j|_t!|jt"jdkr6|jt)kr|j|j|j|j|j|j(|jD] \}}|j||!|j$|jD]}|j||j|j|j|j	|j|j	|j|j|j|j |j!|j |"dS)Nr)new_compiler
build_clib)r=verbosedry_runr*rJ)#rrr1rchas_c_librariesget_finalized_commandr9rrget_library_namesr:rorr=rrr*r
rjrtr3r
initializer6set_include_dirsr7define_macror8undefine_macro
set_librariesset_library_dirsr;set_runtime_library_dirsr<set_link_objectsbuild_extensions)rCrrrtvaluemacros      rrunz
build_ext.runs3444444	F
,,..	<33LAAJN!!*">">"@"@"FBGGG$$Z%:;;;%]LL*	



	4=)))7d??t~??M$$T^444(M**4+<===;"!%
8
8
u
**47777:!
4
4
,,U3333>%M''777(M**4+<===:!M224:>>>(M**4+<===	
rct|tstdt|D]	\}}t|trt|t
rt
|dkrtd|\}}tjd|t|trt|stdt|tstdt	||d}dD]*}|
|}|t|||+|
d
|_d|vrtjd|
d
}|rg|_g|_|D]}	t|	t
rt
|	dvstdt
|	dkr!|j|	dkt
|	dkr|j|	|||<d	S)aEnsure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z:'ext_modules' option must be a list of Extension instanceszMeach element of 'ext_modules' option must be an Extension instance or 2-tuplezvold-style (ext_name, build_info) tuple found in ext_modules for extension '%s' -- please convert to Extension instancezRfirst element of each tuple in 'ext_modules' must be the extension name (a string)zOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)sources)r6r:r9
extra_objectsextra_compile_argsextra_link_argsNr;def_filez9'def_file' element of build info dict no longer supportedmacros)rrz9'macros' element of build info dict must be 1- or 2-tuplerr)rglistr	enumeratertuplelenrwarnrhextension_name_rematchdictgetsetattrruntime_library_dirs
define_macrosundef_macrosro)
rCr1r extext_name
build_infokeyvalrrs
          rcheck_extensions_listzbuild_ext.check_extensions_list\s*d++	%L
 
++H	 H	 FAs#y))
c5))
SXX]])4
$' HjH:	


x--
2C2I2I(2S2S
)<
j$//
)8Hj&;<'>C$Z''WXXX ^^H--F
8$&!#% #	8	8E&ue44Uv9M9M145zzQ(//a9999Uq)00777JqMMQH	 H	 rc||jg}|jD]}||j|SN)rr1rrr)rC	filenamesrs   rget_source_fileszbuild_ext.get_source_filessO""4?333	?	*	*CS[))))rc||jg}|jD]/}|||j0|Sr)rr1roget_ext_fullpathrt)rCoutputsrs   rget_outputszbuild_ext.get_outputss\	
""4?333
?	<	.s7?B 4c::r)rArj	cpu_countconcurrent.futuresrImportErrorrr1zip_filter_build_errorsresult)rCworkersrfuturesrfutrs`     @rrz$build_ext._build_extensions_parallels-=D  lnnG	=======			GGG	?))+++F

G
4
4
4	!FJoG 99
!
!S..s33!!JJLLL!!!!!!!!!!!!!!!
!		!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!sC.==$AC#(C	=C#	C

C#C
C##C'*C'c|jD]D}||5||dddn#1swxYwYEdSr)r1rr)rCrs  rrz"build_ext._build_extensions_serials?	*	*C**3//
*
*$$S)))
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*	*	*sAA	A	c#K	dVdS#tttf$rA}|js|d|j|Yd}~dSd}~wwxYw)Nz"building extension "{}" failed: {})rrroptionalrformatrt)rCres   rrzbuild_ext._filter_build_errorss	PEEEEE=	P	P	P<
II:AA#(ANNOOOOOOOOO	Ps
A"6AA"c|j}|t|ttfst	d|jzt
|}||j}||jz}|j	s-t||dstjd|jdStj
d|j|||}|jpg}|jdd}|jD]}||f|j||j||j|j||j}|dd|_|jr||j|jpg}|jp|j|}	|j|||||j|j ||!||j|j|	

dS)Nzjin 'ext_modules' option (extension '%s'), 'sources' must be present and must be a list of source filenamesnewerz$skipping '%s' extension (up-to-date)zbuilding '%s' extension)
output_dirrr6r(extra_postargsdepends)r9r:rrexport_symbolsr(r4target_lang)"rrgrrrrtsortedrrr*r
rr(infoswig_sourcesrrrror=compiler4r6_built_objectsrrrrlanguagedetect_languagelink_shared_object
get_librariesr:rget_export_symbols)
rCrrext_pathr
extra_argsrr8objectsrs
          rrzbuild_ext.build_extensions!+?*WtUm"D"D?%-/2x8
//((22CK'
	:k'8WEE	:I	find_swigrrrspawn)rCr	extensionnew_sourcesrswig_targets
target_extsourcebaserr>swig_cmdotargets              rrzbuild_ext.swig_sourcesHs=	HHFGGG
M	$.(()---JJJ	+	+F'**622KT3d{{""4'>J#>???##F+++'22V$$""6****	y,DNN,,)$'''=	$OOF###~	#(
#
#"""""	:	:F!&)FH(&&999JJx4"889999rctjdkrdStjdkrMdD]H}tjd|zd}tj|r|cSIdStdtjz)zReturn the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        posixr>rJ)z1.3z1.2z1.1z	c:\swig%szswig.exez>I don't know how to find (much less run) SWIG on platform '%s')rjrtrprqisfiler	)rCversfns   rrzbuild_ext.find_swigs
7g6
W__.
"
"W\\,"5zBB7>>"%%III"z(#%'W-
rc*||}|d}||d}|jsDt	jj|dd|gz}tj|j|Sd|dd}|d}tj	|
|}tj||S)zReturns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        rVrNrbuild_py)get_ext_fullnameriget_ext_filenamerrjrprqr2rabspathget_package_dir)rCrfullnamemodpathfilenamer5rpackage_dirs        rrzbuild_ext.get_ext_fullpaths((22..%%((55|	:w|WSbS\XJ%>?H7<<999((71R4=))--j99gooh&>&>w&G&GHHw||K222rc.|j|S|jdz|zS)zSReturns the fullname of a given extension name.

        Adds the `package.` prefixNrV)r5)rCrs  rrzbuild_ext.get_ext_fullnames#<O<#%00rczddlm}|d}|d}tjj||zS)zConvert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        rryrV
EXT_SUFFIX)distutils.sysconfigryrirjrprq)rCrryr
ext_suffixs     rrzbuild_ext.get_ext_filenamesJ
	766666>>#&&#^L11
w|X&33rcv|jdd}	|dd|z}nO#t$rBd|ddddz}YnwxYwd	|z}||jvr|j||jS)
aReturn the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "PyInit_" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "PyInit_" function.
        rVrascii_U_punycode-_PyInit)rtriencodeUnicodeEncodeErrorreplacedecoderro)rCrrtr
initfunc_names     rrzbuild_ext.get_export_symbolssx~~c""2&	 
KK   4ZFF"	X	X	XDKK
33;;D$GGNNwWWWFFF	X
!6)
 222%%m444!!s=A	B	B	ctjdkrYddlm}t	|j|s=d}|jr|dz}|tjdz	tjdz	dzfz}|j|gzSndd	l	m
}d
}|dr\ttdrd
}nDtjdkrd
}n1dtj
vr#|ddkrd
}n|ddkrd
}|r|d}|jd|zgzS|jtjzS)zReturn the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows, we add the Python library (eg. python20.dll).
        rNr)MSVCCompilerz
python%d%d_drFrWgetandroidapilevelTrR_PYTHON_HOST_PLATFORMANDROID_API_LEVELMACHDEP	LDVERSIONrT)rlrwdistutils._msvccompilerrrgr=r(
hexversionr9r
ryhasattrrjenvironr	pythonlib)rCrrtemplater(rylink_libpython	ldversions        rrzbuild_ext.get_librariessm<7""<<<<<<dm\::

3':/'$H$Nb(^r)T1(	}	{22

3(
;:::::"N~011
.3 455	.%)NN\X--%)NN,
::%~&9::a??)-'	22h>>)-
>*N;77	}9(<'===}z35555r) __name__
__module____qualname__descriptionrjrksep_byruser_optionsboolean_optionsrhelp_optionsrDrrrrrrrr
contextlibcontextmanagerrrrrrrrrrr\rrrr)sLK($bj
0FGQ
*lnn
-	
	

r?s								



""""""GFFFFFFF555555******))))))''''''BJUVVj6j6j6j6j6j6j6j6j6j6rPK|5Z=t))RLib/site-packages/setuptools/_distutils/command/__pycache__/upload.cpython-311.pycnuW+A

b;d5dZddlZddlZddlZddlmZddlmZmZm	Z	ddl
mZddlm
Z
mZddlmZddlmZdd	lmZeed
deeddeeddd
ZGddeZdS)zm
distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to a package
index).
N)standard_b64encode)urlopenRequest	HTTPError)urlparse)DistutilsErrorDistutilsOptionError)
PyPIRCCommand)spawn)logmd5sha256blake2b)
md5_digest
sha256_digestblake2_256_digestcXeZdZdZejddgzZejdgzZdZdZdZ	dZ
d	S)
uploadzupload binary package to PyPI)signszsign files to upload using gpg)z	identity=izGPG identity used to sign filesrcttj|d|_d|_d|_d|_d|_dS)NrF)r
initialize_optionsusernamepassword
show_responseridentity)selfs sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/upload.pyrzupload.initialize_options(s;(...

	


cTtj||jr|jst	d|}|ikr4|d|_|d|_|d|_|d|_	|js|j
jr|j
j|_dSdSdS)Nz.Must use --sign for --identity to have meaningrr
repositoryrealm)r
finalize_optionsrrr	_read_pypircrrr#r$distribution)rconfigs  r r%zupload.finalize_options0s&t,,,=	Y	Y&'WXXX""$$R<<":.DM":.DM$\2DODJ}	7!2!;	7 -6DMMM	7	7	7	7r!c|jjsd}t||jjD]\}}}||||dS)NzHMust create and upload files in one command (e.g. setup.py sdist upload))r'
dist_filesr	upload_file)rmsgcommand	pyversionfilenames     r runz
upload.run@sk +	,/
's+++,0,=,H	;	;(GYWi::::	;	;r!c
t|j\}}}}}}	|s|s|	rtd|jz|dvrtd|z|jr1ddd|g}
|jrd|jg|
dd<t|
|j	t|d
}	|}|	n#|	wxYw|j
j}
iddd
dd|
d|

dtj||fd|d|ddd|
d|
d|
d|
d|
d|
d|
d|
d|
|
|
|
|
d}d |d!<t<D]9\}}|	|| ||<*#tB$rY6wxYw|jrdt|d"zd
5}tj|d"z|f|d#<dddn#1swxYwY|j"d$z|j#z$d%}d&tK|&d%z}d'}d(|$d%z}|d)z}tOj(}|D]\}}d*|z}tS|tTs|g}|D]}tW|tXur|d+|d,zz
}|d-}n"t[|$d.}|.||.|$d.|.d/|.||.||/}d00||j}|1|tdj3d1|zt[ti||d2}tk|j||3}	tm|}|7}|j8}n`#tr$r} | j:}| j8}Yd} ~ nCd} ~ wtv$r3} |1t[| tdj<d} ~ wwxYw|d4kr|1d50||tdj3|j=rO|>|}!d6?d7|!d7f}|1|tdj3dSdSd80||}|1|tdj<t|)9NzIncompatible url %s)httphttpszunsupported schema gpgz
--detach-signz-az--local-user)dry_runrbz:actionfile_uploadprotocol_version1nameversioncontentfiletyper.metadata_versionz1.0summary	home_pageauthorauthor_emaillicensedescriptionkeywordsplatformclassifiers)download_urlprovidesrequires	obsoletesrcommentz.asc
gpg_signature:asciizBasic z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
z+
Content-Disposition: form-data; name="%s"z; filename="%s"rzutf-8s

zSubmitting {} to {}z multipart/form-data; boundary=%s)zContent-typezContent-length
Authorization)dataheaderszServer response ({}): {}
zK---------------------------------------------------------------------------zUpload failed ({}): {})Arr#AssertionErrorrrrr6openreadcloser'metadataget_nameget_versionospathbasenameget_descriptionget_urlget_contactget_contact_emailget_licenceget_long_descriptionget_keywords
get_platformsget_classifiersget_download_urlget_providesget_requires
get_obsoletes_FILE_CONTENT_DIGESTSitems	hexdigest
ValueErrorrrencoderdecodeioBytesIO
isinstancelisttypetuplestrwritegetvalueformatannouncerINFOlenrrgetcoder,rcodeOSErrorERRORr_read_pypi_responsejoinr)"rr-r.r/schemanetlocurlparamsquery	fragmentsgpg_argsfr=metarSdigest_namedigest_cons	user_passauthboundarysep_boundaryend_boundarybodykeyvaluetitler,rTrequestresultstatusreasonetexts"                                  r r+zupload.upload_fileJs?8@8Q8Q5VUI	JU	Ji	J !6!HIII*** !6!?@@@9	2h?H}
@!/ ?1
(DL1111
4  	ffhhG
GGIIIIAGGIIII )
}




DMMOO

t''))


((22G<







t++--



d&&((
 
D2244!
"
t''))#
$
44466%
&
))++'
(
**,,)
*
4//11+
,!1133))++))++++--5


:Y)>(C(C(E(E		$K"
$/K$8$8$B$B$D$D[!!



9	Xh'..
X!)+)9)9()C)Cf)Laffhh(W_%
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X]S(4=8@@II	,Y77>>wGGGI 8??7#;#;;#i/z||**,,	"	"JCCcIEeT**
 	
"	
";;%''.q99E!!HEEJJ--g66E

<(((

5<<00111

;'''

5!!!!	
"	

<   }}#**8T_EE

c38$$$?I!#d))nn!

$/gFFF		W%%F^^%%FZFF			VFUFFFFFF			MM#a&&#),,,	S==MM4;;FFKKSXVVV!
-//77ii4 :;;

c38,,,,,
-
-
+11&&AACMM#sy))) %%%sTCC6 J
J$#J$:LLL*U


V'U''
V'4.V""V'N)__name__
__module____qualname__rEr
user_optionsboolean_optionsrr%r0r+r!r rrs1K -7=1L
$3vh>O777 ;;;C&C&C&C&C&r!r)__doc__r^rthashlibbase64rurllib.requestrrrurllib.parserdistutils.errorsrr	distutils.corer
distutils.spawnr	distutilsrgetattrrnrrr!r rs<
							%%%%%%6666666666!!!!!!AAAAAAAA((((((!!!!!!''5$//WWh55 )T::p&p&p&p&p&]p&p&p&p&p&r!PK|5ZQLib/site-packages/setuptools/_distutils/command/__pycache__/build.cpython-311.pycnuW+A

b;d`dZddlZddlZddlmZddlmZddlmZdZ	GddeZ
dS)	zBdistutils.command.build

Implements the Distutils 'build' command.N)Command)DistutilsOptionError)get_platformc&ddlm}|dS)Nrshow_compilers)distutils.ccompilerrrs rE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\setuptools/_distutils/command/build.pyrrs(222222NceZdZdZdddddddd	d
ezfddd
ddgZddgZdddefgZdZ	dZ
dZdZdZ
dZdZdefde
fdefdefgZdS) buildz"build everything needed to install)zbuild-base=bz base directory for build library)zbuild-purelib=Nz2build directory for platform-neutral distributions)zbuild-platlib=Nz3build directory for platform-specific distributions)z
build-lib=NzWbuild directory for all distribution (defaults to either build-purelib or build-platlib)zbuild-scripts=Nzbuild directory for scripts)zbuild-temp=tztemporary build directoryz
plat-name=pz6platform name to build for, if supported (default: %s))z	compiler=czspecify the compiler type)z	parallel=jznumber of parallel build jobs)debuggz;compile extensions and libraries with debugging information)forcefz2forcibly build everything (ignore file timestamps))zexecutable=ez5specify final destination interpreter path (build.py)rrz
help-compilerNzlist available compilerscd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_dS)Nr
r)
build_base
build_purelib
build_platlib	build_lib
build_temp
build_scriptscompiler	plat_namerr
executableparallelselfs r
initialize_optionszbuild.initialize_options5s_!"!!





rcZ|jt|_ntjdkrt	dd|jtjj}ttdr|dz
}|j
*tj|j
d|_
|j-tj|j
d|z|_|j2|jr
|j|_n|j
|_|j-tj|j
d|z|_|j?tj|j
dtjdd	z|_|j:tjr.tjtj|_t/|jt2r9	t5|j|_dS#t6$rt	d
wxYwdS)NntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z.{}-{}gettotalrefcountz-pydebuglibtempz
scripts-%d.%dzparallel should be an integer)r rosnamerformatsysimplementation	cache_taghasattrrpathjoinrrrdistributionhas_ext_modulesrrversion_infor!normpath
isinstancer"strint
ValueError)r$plat_specifiers  r
finalize_optionszbuild.finalize_optionsEs>!)^^DNN
w$*C
"9K9UVV
3*++	)j(N
%!#dou!E!ED%!#dou~?U!V!VD
>! 0022
4!%!3!%!3?" gll4?F^>DOdmS))	L
L #DM 2 2



L
L
L*+JKKK
L	L	Ls3HH(c^|D]}||dSN)get_sub_commandsrun_command)r$cmd_names  r
runz	build.run}s@--//	'	'HX&&&&	'	'rc4|jSr@)r5has_pure_modulesr#s r
rFzbuild.has_pure_moduless 11333rc4|jSr@)r5has_c_librariesr#s r
rHzbuild.has_c_libraries 00222rc4|jSr@)r5r6r#s r
r6zbuild.has_ext_modulesrIrc4|jSr@)r5has_scriptsr#s r
rLzbuild.has_scriptss ,,...rbuild_py
build_clib	build_extr)__name__
__module____qualname__descriptionruser_optionsboolean_optionsrhelp_optionsr%r>rDrFrHr6rLsub_commandsrr
r
r
s6K	AVW	
	@9
*lnn
-	
	8;ULU-L2(O
$ :NKL 6L6L6Lp'''444333333///
%&	'	o&	+&	LLLrr
)__doc__r/r,distutils.corerdistutils.errorsrdistutils.utilrrr
rXrr
r]s--


				""""""111111''''''GGGGGGGGGGGrPK|5ZoѴ+
+
8Lib/site-packages/setuptools/_distutils/command/clean.pynuW+A"""distutils.command.clean

Implements the Distutils 'clean' command."""

# contributed by Bastian Kleineidam , added 2000-03-18

import os
from distutils.core import Command
from distutils.dir_util import remove_tree
from distutils import log


class clean(Command):

    description = "clean up temporary files from 'build' command"
    user_options = [
        ('build-base=', 'b', "base build directory (default: 'build.build-base')"),
        (
            'build-lib=',
            None,
            "build directory for all modules (default: 'build.build-lib')",
        ),
        ('build-temp=', 't', "temporary build directory (default: 'build.build-temp')"),
        (
            'build-scripts=',
            None,
            "build directory for scripts (default: 'build.build-scripts')",
        ),
        ('bdist-base=', None, "temporary directory for built distributions"),
        ('all', 'a', "remove all build output, not just temporary by-products"),
    ]

    boolean_options = ['all']

    def initialize_options(self):
        self.build_base = None
        self.build_lib = None
        self.build_temp = None
        self.build_scripts = None
        self.bdist_base = None
        self.all = None

    def finalize_options(self):
        self.set_undefined_options(
            'build',
            ('build_base', 'build_base'),
            ('build_lib', 'build_lib'),
            ('build_scripts', 'build_scripts'),
            ('build_temp', 'build_temp'),
        )
        self.set_undefined_options('bdist', ('bdist_base', 'bdist_base'))

    def run(self):
        # remove the build/temp. directory (unless it's already
        # gone)
        if os.path.exists(self.build_temp):
            remove_tree(self.build_temp, dry_run=self.dry_run)
        else:
            log.debug("'%s' does not exist -- can't clean it", self.build_temp)

        if self.all:
            # remove build directories
            for directory in (self.build_lib, self.bdist_base, self.build_scripts):
                if os.path.exists(directory):
                    remove_tree(directory, dry_run=self.dry_run)
                else:
                    log.warn("'%s' does not exist -- can't clean it", directory)

        # just for the heck of it, try to remove the base build directory:
        # we might have emptied it right now, but if not we don't care
        if not self.dry_run:
            try:
                os.rmdir(self.build_base)
                log.info("removing '%s'", self.build_base)
            except OSError:
                pass
PK|5Z9

CLib/site-packages/setuptools/_distutils/command/install_egg_info.pynuW+A"""
distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.
"""

import os
import sys
import re

from distutils.cmd import Command
from distutils import log, dir_util


class install_egg_info(Command):
    """Install an .egg-info file for the package"""

    description = "Install package's PKG-INFO metadata as an .egg-info file"
    user_options = [
        ('install-dir=', 'd', "directory to install to"),
    ]

    def initialize_options(self):
        self.install_dir = None

    @property
    def basename(self):
        """
        Allow basename to be overridden by child class.
        Ref pypa/distutils#2.
        """
        return "%s-%s-py%d.%d.egg-info" % (
            to_filename(safe_name(self.distribution.get_name())),
            to_filename(safe_version(self.distribution.get_version())),
            *sys.version_info[:2],
        )

    def finalize_options(self):
        self.set_undefined_options('install_lib', ('install_dir', 'install_dir'))
        self.target = os.path.join(self.install_dir, self.basename)
        self.outputs = [self.target]

    def run(self):
        target = self.target
        if os.path.isdir(target) and not os.path.islink(target):
            dir_util.remove_tree(target, dry_run=self.dry_run)
        elif os.path.exists(target):
            self.execute(os.unlink, (self.target,), "Removing " + target)
        elif not os.path.isdir(self.install_dir):
            self.execute(
                os.makedirs, (self.install_dir,), "Creating " + self.install_dir
            )
        log.info("Writing %s", target)
        if not self.dry_run:
            with open(target, 'w', encoding='UTF-8') as f:
                self.distribution.metadata.write_pkg_file(f)

    def get_outputs(self):
        return self.outputs


# The following routines are taken from setuptools' pkg_resources module and
# can be replaced by importing them from pkg_resources once it is included
# in the stdlib.


def safe_name(name):
    """Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    """
    return re.sub('[^A-Za-z0-9.]+', '-', name)


def safe_version(version):
    """Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    """
    version = version.replace(' ', '.')
    return re.sub('[^A-Za-z0-9.]+', '-', version)


def to_filename(name):
    """Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    """
    return name.replace('-', '_')
PK|5Z)	;Lib/site-packages/setuptools/_distutils/command/__init__.pynuW+A"""distutils.command

Package containing implementation of all the standard Distutils
commands."""

__all__ = [  # noqa: F822
    'build',
    'build_py',
    'build_ext',
    'build_clib',
    'build_scripts',
    'clean',
    'install',
    'install_lib',
    'install_headers',
    'install_scripts',
    'install_data',
    'sdist',
    'register',
    'bdist',
    'bdist_dumb',
    'bdist_rpm',
    'check',
    'upload',
]
PK|5Zi!--;Lib/site-packages/setuptools/_distutils/command/register.pynuW+A"""distutils.command.register

Implements the Distutils 'register' command (register with the repository).
"""

# created 2002/10/21, Richard Jones

import getpass
import io
import urllib.parse
import urllib.request
from warnings import warn

from distutils.core import PyPIRCCommand
from distutils import log


class register(PyPIRCCommand):

    description = "register the distribution with the Python package index"
    user_options = PyPIRCCommand.user_options + [
        ('list-classifiers', None, 'list the valid Trove classifiers'),
        (
            'strict',
            None,
            'Will stop the registering if the meta-data are not fully compliant',
        ),
    ]
    boolean_options = PyPIRCCommand.boolean_options + [
        'verify',
        'list-classifiers',
        'strict',
    ]

    sub_commands = [('check', lambda self: True)]

    def initialize_options(self):
        PyPIRCCommand.initialize_options(self)
        self.list_classifiers = 0
        self.strict = 0

    def finalize_options(self):
        PyPIRCCommand.finalize_options(self)
        # setting options for the `check` subcommand
        check_options = {
            'strict': ('register', self.strict),
            'restructuredtext': ('register', 1),
        }
        self.distribution.command_options['check'] = check_options

    def run(self):
        self.finalize_options()
        self._set_config()

        # Run sub commands
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        if self.dry_run:
            self.verify_metadata()
        elif self.list_classifiers:
            self.classifiers()
        else:
            self.send_metadata()

    def check_metadata(self):
        """Deprecated API."""
        warn(
            "distutils.command.register.check_metadata is deprecated; "
            "use the check command instead",
            DeprecationWarning,
        )
        check = self.distribution.get_command_obj('check')
        check.ensure_finalized()
        check.strict = self.strict
        check.restructuredtext = 1
        check.run()

    def _set_config(self):
        '''Reads the configuration file and set attributes.'''
        config = self._read_pypirc()
        if config != {}:
            self.username = config['username']
            self.password = config['password']
            self.repository = config['repository']
            self.realm = config['realm']
            self.has_config = True
        else:
            if self.repository not in ('pypi', self.DEFAULT_REPOSITORY):
                raise ValueError('%s not found in .pypirc' % self.repository)
            if self.repository == 'pypi':
                self.repository = self.DEFAULT_REPOSITORY
            self.has_config = False

    def classifiers(self):
        '''Fetch the list of classifiers from the server.'''
        url = self.repository + '?:action=list_classifiers'
        response = urllib.request.urlopen(url)
        log.info(self._read_pypi_response(response))

    def verify_metadata(self):
        '''Send the metadata to the package index server to be checked.'''
        # send the info to the server and report the result
        (code, result) = self.post_to_server(self.build_post_data('verify'))
        log.info('Server response (%s): %s', code, result)

    def send_metadata(self):  # noqa: C901
        '''Send the metadata to the package index server.

        Well, do the following:
        1. figure who the user is, and then
        2. send the data as a Basic auth'ed POST.

        First we try to read the username/password from $HOME/.pypirc,
        which is a ConfigParser-formatted file with a section
        [distutils] containing username and password entries (both
        in clear text). Eg:

            [distutils]
            index-servers =
                pypi

            [pypi]
            username: fred
            password: sekrit

        Otherwise, to figure who the user is, we offer the user three
        choices:

         1. use existing login,
         2. register as a new user, or
         3. set the password to a random string and email the user.

        '''
        # see if we can short-cut and get the username/password from the
        # config
        if self.has_config:
            choice = '1'
            username = self.username
            password = self.password
        else:
            choice = 'x'
            username = password = ''

        # get the user's login info
        choices = '1 2 3 4'.split()
        while choice not in choices:
            self.announce(
                '''\
We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: ''',
                log.INFO,
            )
            choice = input()
            if not choice:
                choice = '1'
            elif choice not in choices:
                print('Please choose one of the four options!')

        if choice == '1':
            # get the username and password
            while not username:
                username = input('Username: ')
            while not password:
                password = getpass.getpass('Password: ')

            # set up the authentication
            auth = urllib.request.HTTPPasswordMgr()
            host = urllib.parse.urlparse(self.repository)[1]
            auth.add_password(self.realm, host, username, password)
            # send the info to the server and report the result
            code, result = self.post_to_server(self.build_post_data('submit'), auth)
            self.announce('Server response ({}): {}'.format(code, result), log.INFO)

            # possibly save the login
            if code == 200:
                if self.has_config:
                    # sharing the password in the distribution instance
                    # so the upload command can reuse it
                    self.distribution.password = password
                else:
                    self.announce(
                        (
                            'I can store your PyPI login so future '
                            'submissions will be faster.'
                        ),
                        log.INFO,
                    )
                    self.announce(
                        '(the login will be stored in %s)' % self._get_rc_file(),
                        log.INFO,
                    )
                    choice = 'X'
                    while choice.lower() not in 'yn':
                        choice = input('Save your login (y/N)?')
                        if not choice:
                            choice = 'n'
                    if choice.lower() == 'y':
                        self._store_pypirc(username, password)

        elif choice == '2':
            data = {':action': 'user'}
            data['name'] = data['password'] = data['email'] = ''
            data['confirm'] = None
            while not data['name']:
                data['name'] = input('Username: ')
            while data['password'] != data['confirm']:
                while not data['password']:
                    data['password'] = getpass.getpass('Password: ')
                while not data['confirm']:
                    data['confirm'] = getpass.getpass(' Confirm: ')
                if data['password'] != data['confirm']:
                    data['password'] = ''
                    data['confirm'] = None
                    print("Password and confirm don't match!")
            while not data['email']:
                data['email'] = input('   EMail: ')
            code, result = self.post_to_server(data)
            if code != 200:
                log.info('Server response (%s): %s', code, result)
            else:
                log.info('You will receive an email shortly.')
                log.info('Follow the instructions in it to ' 'complete registration.')
        elif choice == '3':
            data = {':action': 'password_reset'}
            data['email'] = ''
            while not data['email']:
                data['email'] = input('Your email address: ')
            code, result = self.post_to_server(data)
            log.info('Server response (%s): %s', code, result)

    def build_post_data(self, action):
        # figure the data to send - the metadata plus some additional
        # information used by the package server
        meta = self.distribution.metadata
        data = {
            ':action': action,
            'metadata_version': '1.0',
            'name': meta.get_name(),
            'version': meta.get_version(),
            'summary': meta.get_description(),
            'home_page': meta.get_url(),
            'author': meta.get_contact(),
            'author_email': meta.get_contact_email(),
            'license': meta.get_licence(),
            'description': meta.get_long_description(),
            'keywords': meta.get_keywords(),
            'platform': meta.get_platforms(),
            'classifiers': meta.get_classifiers(),
            'download_url': meta.get_download_url(),
            # PEP 314
            'provides': meta.get_provides(),
            'requires': meta.get_requires(),
            'obsoletes': meta.get_obsoletes(),
        }
        if data['provides'] or data['requires'] or data['obsoletes']:
            data['metadata_version'] = '1.1'
        return data

    def post_to_server(self, data, auth=None):  # noqa: C901
        '''Post a query to the server, and return a string response.'''
        if 'name' in data:
            self.announce(
                'Registering {} to {}'.format(data['name'], self.repository), log.INFO
            )
        # Build up the MIME payload for the urllib2 POST data
        boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
        sep_boundary = '\n--' + boundary
        end_boundary = sep_boundary + '--'
        body = io.StringIO()
        for key, value in data.items():
            # handle multiple entries for the same name
            if type(value) not in (type([]), type(())):
                value = [value]
            for value in value:
                value = str(value)
                body.write(sep_boundary)
                body.write('\nContent-Disposition: form-data; name="%s"' % key)
                body.write("\n\n")
                body.write(value)
                if value and value[-1] == '\r':
                    body.write('\n')  # write an extra newline (lurve Macs)
        body.write(end_boundary)
        body.write("\n")
        body = body.getvalue().encode("utf-8")

        # build the Request
        headers = {
            'Content-type': 'multipart/form-data; boundary=%s; charset=utf-8'
            % boundary,
            'Content-length': str(len(body)),
        }
        req = urllib.request.Request(self.repository, body, headers)

        # handle HTTP and include the Basic Auth handler
        opener = urllib.request.build_opener(
            urllib.request.HTTPBasicAuthHandler(password_mgr=auth)
        )
        data = ''
        try:
            result = opener.open(req)
        except urllib.error.HTTPError as e:
            if self.show_response:
                data = e.fp.read()
            result = e.code, e.msg
        except urllib.error.URLError as e:
            result = 500, str(e)
        else:
            if self.show_response:
                data = self._read_pypi_response(result)
            result = 200, 'OK'
        if self.show_response:
            msg = '\n'.join(('-' * 75, data, '-' * 75))
            self.announce(msg, log.INFO)
        return result
PK|5Zj559Lib/site-packages/setuptools/_distutils/command/upload.pynuW+A"""
distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to a package
index).
"""

import os
import io
import hashlib
from base64 import standard_b64encode
from urllib.request import urlopen, Request, HTTPError
from urllib.parse import urlparse
from distutils.errors import DistutilsError, DistutilsOptionError
from distutils.core import PyPIRCCommand
from distutils.spawn import spawn
from distutils import log


# PyPI Warehouse supports MD5, SHA256, and Blake2 (blake2-256)
# https://bugs.python.org/issue40698
_FILE_CONTENT_DIGESTS = {
    "md5_digest": getattr(hashlib, "md5", None),
    "sha256_digest": getattr(hashlib, "sha256", None),
    "blake2_256_digest": getattr(hashlib, "blake2b", None),
}


class upload(PyPIRCCommand):

    description = "upload binary package to PyPI"

    user_options = PyPIRCCommand.user_options + [
        ('sign', 's', 'sign files to upload using gpg'),
        ('identity=', 'i', 'GPG identity used to sign files'),
    ]

    boolean_options = PyPIRCCommand.boolean_options + ['sign']

    def initialize_options(self):
        PyPIRCCommand.initialize_options(self)
        self.username = ''
        self.password = ''
        self.show_response = 0
        self.sign = False
        self.identity = None

    def finalize_options(self):
        PyPIRCCommand.finalize_options(self)
        if self.identity and not self.sign:
            raise DistutilsOptionError("Must use --sign for --identity to have meaning")
        config = self._read_pypirc()
        if config != {}:
            self.username = config['username']
            self.password = config['password']
            self.repository = config['repository']
            self.realm = config['realm']

        # getting the password from the distribution
        # if previously set by the register command
        if not self.password and self.distribution.password:
            self.password = self.distribution.password

    def run(self):
        if not self.distribution.dist_files:
            msg = (
                "Must create and upload files in one command "
                "(e.g. setup.py sdist upload)"
            )
            raise DistutilsOptionError(msg)
        for command, pyversion, filename in self.distribution.dist_files:
            self.upload_file(command, pyversion, filename)

    def upload_file(self, command, pyversion, filename):  # noqa: C901
        # Makes sure the repository URL is compliant
        schema, netloc, url, params, query, fragments = urlparse(self.repository)
        if params or query or fragments:
            raise AssertionError("Incompatible url %s" % self.repository)

        if schema not in ('http', 'https'):
            raise AssertionError("unsupported schema " + schema)

        # Sign if requested
        if self.sign:
            gpg_args = ["gpg", "--detach-sign", "-a", filename]
            if self.identity:
                gpg_args[2:2] = ["--local-user", self.identity]
            spawn(gpg_args, dry_run=self.dry_run)

        # Fill in the data - send all the meta-data in case we need to
        # register a new release
        f = open(filename, 'rb')
        try:
            content = f.read()
        finally:
            f.close()

        meta = self.distribution.metadata
        data = {
            # action
            ':action': 'file_upload',
            'protocol_version': '1',
            # identify release
            'name': meta.get_name(),
            'version': meta.get_version(),
            # file content
            'content': (os.path.basename(filename), content),
            'filetype': command,
            'pyversion': pyversion,
            # additional meta-data
            'metadata_version': '1.0',
            'summary': meta.get_description(),
            'home_page': meta.get_url(),
            'author': meta.get_contact(),
            'author_email': meta.get_contact_email(),
            'license': meta.get_licence(),
            'description': meta.get_long_description(),
            'keywords': meta.get_keywords(),
            'platform': meta.get_platforms(),
            'classifiers': meta.get_classifiers(),
            'download_url': meta.get_download_url(),
            # PEP 314
            'provides': meta.get_provides(),
            'requires': meta.get_requires(),
            'obsoletes': meta.get_obsoletes(),
        }

        data['comment'] = ''

        # file content digests
        for digest_name, digest_cons in _FILE_CONTENT_DIGESTS.items():
            if digest_cons is None:
                continue
            try:
                data[digest_name] = digest_cons(content).hexdigest()
            except ValueError:
                # hash digest not available or blocked by security policy
                pass

        if self.sign:
            with open(filename + ".asc", "rb") as f:
                data['gpg_signature'] = (os.path.basename(filename) + ".asc", f.read())

        # set up the authentication
        user_pass = (self.username + ":" + self.password).encode('ascii')
        # The exact encoding of the authentication string is debated.
        # Anyway PyPI only accepts ascii for both username or password.
        auth = "Basic " + standard_b64encode(user_pass).decode('ascii')

        # Build up the MIME payload for the POST data
        boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
        sep_boundary = b'\r\n--' + boundary.encode('ascii')
        end_boundary = sep_boundary + b'--\r\n'
        body = io.BytesIO()
        for key, value in data.items():
            title = '\r\nContent-Disposition: form-data; name="%s"' % key
            # handle multiple entries for the same name
            if not isinstance(value, list):
                value = [value]
            for value in value:
                if type(value) is tuple:
                    title += '; filename="%s"' % value[0]
                    value = value[1]
                else:
                    value = str(value).encode('utf-8')
                body.write(sep_boundary)
                body.write(title.encode('utf-8'))
                body.write(b"\r\n\r\n")
                body.write(value)
        body.write(end_boundary)
        body = body.getvalue()

        msg = "Submitting {} to {}".format(filename, self.repository)
        self.announce(msg, log.INFO)

        # build the Request
        headers = {
            'Content-type': 'multipart/form-data; boundary=%s' % boundary,
            'Content-length': str(len(body)),
            'Authorization': auth,
        }

        request = Request(self.repository, data=body, headers=headers)
        # send the data
        try:
            result = urlopen(request)
            status = result.getcode()
            reason = result.msg
        except HTTPError as e:
            status = e.code
            reason = e.msg
        except OSError as e:
            self.announce(str(e), log.ERROR)
            raise

        if status == 200:
            self.announce('Server response ({}): {}'.format(status, reason), log.INFO)
            if self.show_response:
                text = self._read_pypi_response(result)
                msg = '\n'.join(('-' * 75, text, '-' * 75))
                self.announce(msg, log.INFO)
        else:
            msg = 'Upload failed ({}): {}'.format(status, reason)
            self.announce(msg, log.ERROR)
            raise DistutilsError(msg)
PK|5Z`N8Lib/site-packages/setuptools/_distutils/command/check.pynuW+A"""distutils.command.check

Implements the Distutils 'check' command.
"""
import contextlib

from distutils.core import Command
from distutils.errors import DistutilsSetupError

with contextlib.suppress(ImportError):
    import docutils.utils
    import docutils.parsers.rst
    import docutils.frontend
    import docutils.nodes

    class SilentReporter(docutils.utils.Reporter):
        def __init__(
            self,
            source,
            report_level,
            halt_level,
            stream=None,
            debug=0,
            encoding='ascii',
            error_handler='replace',
        ):
            self.messages = []
            super().__init__(
                source, report_level, halt_level, stream, debug, encoding, error_handler
            )

        def system_message(self, level, message, *children, **kwargs):
            self.messages.append((level, message, children, kwargs))
            return docutils.nodes.system_message(
                message, level=level, type=self.levels[level], *children, **kwargs
            )


class check(Command):
    """This command checks the meta-data of the package."""

    description = "perform some checks on the package"
    user_options = [
        ('metadata', 'm', 'Verify meta-data'),
        (
            'restructuredtext',
            'r',
            (
                'Checks if long string meta-data syntax '
                'are reStructuredText-compliant'
            ),
        ),
        ('strict', 's', 'Will exit with an error if a check fails'),
    ]

    boolean_options = ['metadata', 'restructuredtext', 'strict']

    def initialize_options(self):
        """Sets default values for options."""
        self.restructuredtext = 0
        self.metadata = 1
        self.strict = 0
        self._warnings = 0

    def finalize_options(self):
        pass

    def warn(self, msg):
        """Counts the number of warnings that occurs."""
        self._warnings += 1
        return Command.warn(self, msg)

    def run(self):
        """Runs the command."""
        # perform the various tests
        if self.metadata:
            self.check_metadata()
        if self.restructuredtext:
            if 'docutils' in globals():
                try:
                    self.check_restructuredtext()
                except TypeError as exc:
                    raise DistutilsSetupError(str(exc))
            elif self.strict:
                raise DistutilsSetupError('The docutils package is needed.')

        # let's raise an error in strict mode, if we have at least
        # one warning
        if self.strict and self._warnings > 0:
            raise DistutilsSetupError('Please correct your package.')

    def check_metadata(self):
        """Ensures that all required elements of meta-data are supplied.

        Required fields:
            name, version

        Warns if any are missing.
        """
        metadata = self.distribution.metadata

        missing = []
        for attr in 'name', 'version':
            if not getattr(metadata, attr, None):
                missing.append(attr)

        if missing:
            self.warn("missing required meta-data: %s" % ', '.join(missing))

    def check_restructuredtext(self):
        """Checks if the long string fields are reST-compliant."""
        data = self.distribution.get_long_description()
        for warning in self._check_rst_data(data):
            line = warning[-1].get('line')
            if line is None:
                warning = warning[1]
            else:
                warning = '{} (line {})'.format(warning[1], line)
            self.warn(warning)

    def _check_rst_data(self, data):
        """Returns warnings when the provided data doesn't compile."""
        # the include and csv_table directives need this to be a path
        source_path = self.distribution.script_name or 'setup.py'
        parser = docutils.parsers.rst.Parser()
        settings = docutils.frontend.OptionParser(
            components=(docutils.parsers.rst.Parser,)
        ).get_default_values()
        settings.tab_width = 4
        settings.pep_references = None
        settings.rfc_references = None
        reporter = SilentReporter(
            source_path,
            settings.report_level,
            settings.halt_level,
            stream=settings.warning_stream,
            debug=settings.debug,
            encoding=settings.error_encoding,
            error_handler=settings.error_encoding_error_handler,
        )

        document = docutils.nodes.document(settings, reporter, source=source_path)
        document.note_source(source_path, -1)
        try:
            parser.parse(data, document)
        except AttributeError as e:
            reporter.messages.append(
                (-1, 'Could not finish the parsing: %s.' % e, '', {})
            )

        return reporter.messages
PK|5Z"
v
v:Lib/site-packages/setuptools/_distutils/command/install.pynuW+A"""distutils.command.install

Implements the Distutils 'install' command."""

import sys
import os
import contextlib
import sysconfig
import itertools

from distutils import log
from distutils.core import Command
from distutils.debug import DEBUG
from distutils.sysconfig import get_config_vars
from distutils.file_util import write_file
from distutils.util import convert_path, subst_vars, change_root
from distutils.util import get_platform
from distutils.errors import DistutilsOptionError, DistutilsPlatformError
from . import _framework_compat as fw
from .. import _collections

from site import USER_BASE
from site import USER_SITE

HAS_USER_SITE = True

WINDOWS_SCHEME = {
    'purelib': '{base}/Lib/site-packages',
    'platlib': '{base}/Lib/site-packages',
    'headers': '{base}/Include/{dist_name}',
    'scripts': '{base}/Scripts',
    'data': '{base}',
}

INSTALL_SCHEMES = {
    'posix_prefix': {
        'purelib': '{base}/lib/{implementation_lower}{py_version_short}/site-packages',
        'platlib': '{platbase}/{platlibdir}/{implementation_lower}'
        '{py_version_short}/site-packages',
        'headers': '{base}/include/{implementation_lower}'
        '{py_version_short}{abiflags}/{dist_name}',
        'scripts': '{base}/bin',
        'data': '{base}',
    },
    'posix_home': {
        'purelib': '{base}/lib/{implementation_lower}',
        'platlib': '{base}/{platlibdir}/{implementation_lower}',
        'headers': '{base}/include/{implementation_lower}/{dist_name}',
        'scripts': '{base}/bin',
        'data': '{base}',
    },
    'nt': WINDOWS_SCHEME,
    'pypy': {
        'purelib': '{base}/site-packages',
        'platlib': '{base}/site-packages',
        'headers': '{base}/include/{dist_name}',
        'scripts': '{base}/bin',
        'data': '{base}',
    },
    'pypy_nt': {
        'purelib': '{base}/site-packages',
        'platlib': '{base}/site-packages',
        'headers': '{base}/include/{dist_name}',
        'scripts': '{base}/Scripts',
        'data': '{base}',
    },
}

# user site schemes
if HAS_USER_SITE:
    INSTALL_SCHEMES['nt_user'] = {
        'purelib': '{usersite}',
        'platlib': '{usersite}',
        'headers': '{userbase}/{implementation}{py_version_nodot_plat}'
        '/Include/{dist_name}',
        'scripts': '{userbase}/{implementation}{py_version_nodot_plat}/Scripts',
        'data': '{userbase}',
    }

    INSTALL_SCHEMES['posix_user'] = {
        'purelib': '{usersite}',
        'platlib': '{usersite}',
        'headers': '{userbase}/include/{implementation_lower}'
        '{py_version_short}{abiflags}/{dist_name}',
        'scripts': '{userbase}/bin',
        'data': '{userbase}',
    }


INSTALL_SCHEMES.update(fw.schemes)


# The keys to an installation scheme; if any new types of files are to be
# installed, be sure to add an entry to every installation scheme above,
# and to SCHEME_KEYS here.
SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data')


def _load_sysconfig_schemes():
    with contextlib.suppress(AttributeError):
        return {
            scheme: sysconfig.get_paths(scheme, expand=False)
            for scheme in sysconfig.get_scheme_names()
        }


def _load_schemes():
    """
    Extend default schemes with schemes from sysconfig.
    """

    sysconfig_schemes = _load_sysconfig_schemes() or {}

    return {
        scheme: {
            **INSTALL_SCHEMES.get(scheme, {}),
            **sysconfig_schemes.get(scheme, {}),
        }
        for scheme in set(itertools.chain(INSTALL_SCHEMES, sysconfig_schemes))
    }


def _get_implementation():
    if hasattr(sys, 'pypy_version_info'):
        return 'PyPy'
    else:
        return 'Python'


def _select_scheme(ob, name):
    scheme = _inject_headers(name, _load_scheme(_resolve_scheme(name)))
    vars(ob).update(_remove_set(ob, _scheme_attrs(scheme)))


def _remove_set(ob, attrs):
    """
    Include only attrs that are None in ob.
    """
    return {key: value for key, value in attrs.items() if getattr(ob, key) is None}


def _resolve_scheme(name):
    os_name, sep, key = name.partition('_')
    try:
        resolved = sysconfig.get_preferred_scheme(key)
    except Exception:
        resolved = fw.scheme(_pypy_hack(name))
    return resolved


def _load_scheme(name):
    return _load_schemes()[name]


def _inject_headers(name, scheme):
    """
    Given a scheme name and the resolved scheme,
    if the scheme does not include headers, resolve
    the fallback scheme for the name and use headers
    from it. pypa/distutils#88
    """
    # Bypass the preferred scheme, which may not
    # have defined headers.
    fallback = _load_scheme(_pypy_hack(name))
    scheme.setdefault('headers', fallback['headers'])
    return scheme


def _scheme_attrs(scheme):
    """Resolve install directories by applying the install schemes."""
    return {f'install_{key}': scheme[key] for key in SCHEME_KEYS}


def _pypy_hack(name):
    PY37 = sys.version_info < (3, 8)
    old_pypy = hasattr(sys, 'pypy_version_info') and PY37
    prefix = not name.endswith(('_user', '_home'))
    pypy_name = 'pypy' + '_nt' * (os.name == 'nt')
    return pypy_name if old_pypy and prefix else name


class install(Command):

    description = "install everything from build directory"

    user_options = [
        # Select installation scheme and set base director(y|ies)
        ('prefix=', None, "installation prefix"),
        ('exec-prefix=', None, "(Unix only) prefix for platform-specific files"),
        ('home=', None, "(Unix only) home directory to install under"),
        # Or, just set the base director(y|ies)
        (
            'install-base=',
            None,
            "base installation directory (instead of --prefix or --home)",
        ),
        (
            'install-platbase=',
            None,
            "base installation directory for platform-specific files "
            + "(instead of --exec-prefix or --home)",
        ),
        ('root=', None, "install everything relative to this alternate root directory"),
        # Or, explicitly set the installation scheme
        (
            'install-purelib=',
            None,
            "installation directory for pure Python module distributions",
        ),
        (
            'install-platlib=',
            None,
            "installation directory for non-pure module distributions",
        ),
        (
            'install-lib=',
            None,
            "installation directory for all module distributions "
            + "(overrides --install-purelib and --install-platlib)",
        ),
        ('install-headers=', None, "installation directory for C/C++ headers"),
        ('install-scripts=', None, "installation directory for Python scripts"),
        ('install-data=', None, "installation directory for data files"),
        # Byte-compilation options -- see install_lib.py for details, as
        # these are duplicated from there (but only install_lib does
        # anything with them).
        ('compile', 'c', "compile .py to .pyc [default]"),
        ('no-compile', None, "don't compile .py files"),
        (
            'optimize=',
            'O',
            "also compile with optimization: -O1 for \"python -O\", "
            "-O2 for \"python -OO\", and -O0 to disable [default: -O0]",
        ),
        # Miscellaneous control options
        ('force', 'f', "force installation (overwrite any existing files)"),
        ('skip-build', None, "skip rebuilding everything (for testing/debugging)"),
        # Where to install documentation (eventually!)
        # ('doc-format=', None, "format of documentation to generate"),
        # ('install-man=', None, "directory for Unix man pages"),
        # ('install-html=', None, "directory for HTML documentation"),
        # ('install-info=', None, "directory for GNU info files"),
        ('record=', None, "filename in which to record list of installed files"),
    ]

    boolean_options = ['compile', 'force', 'skip-build']

    if HAS_USER_SITE:
        user_options.append(
            ('user', None, "install in user site-package '%s'" % USER_SITE)
        )
        boolean_options.append('user')

    negative_opt = {'no-compile': 'compile'}

    def initialize_options(self):
        """Initializes options."""
        # High-level options: these select both an installation base
        # and scheme.
        self.prefix = None
        self.exec_prefix = None
        self.home = None
        self.user = 0

        # These select only the installation base; it's up to the user to
        # specify the installation scheme (currently, that means supplying
        # the --install-{platlib,purelib,scripts,data} options).
        self.install_base = None
        self.install_platbase = None
        self.root = None

        # These options are the actual installation directories; if not
        # supplied by the user, they are filled in using the installation
        # scheme implied by prefix/exec-prefix/home and the contents of
        # that installation scheme.
        self.install_purelib = None  # for pure module distributions
        self.install_platlib = None  # non-pure (dists w/ extensions)
        self.install_headers = None  # for C/C++ headers
        self.install_lib = None  # set to either purelib or platlib
        self.install_scripts = None
        self.install_data = None
        self.install_userbase = USER_BASE
        self.install_usersite = USER_SITE

        self.compile = None
        self.optimize = None

        # Deprecated
        # These two are for putting non-packagized distributions into their
        # own directory and creating a .pth file if it makes sense.
        # 'extra_path' comes from the setup file; 'install_path_file' can
        # be turned off if it makes no sense to install a .pth file.  (But
        # better to install it uselessly than to guess wrong and not
        # install it when it's necessary and would be used!)  Currently,
        # 'install_path_file' is always true unless some outsider meddles
        # with it.
        self.extra_path = None
        self.install_path_file = 1

        # 'force' forces installation, even if target files are not
        # out-of-date.  'skip_build' skips running the "build" command,
        # handy if you know it's not necessary.  'warn_dir' (which is *not*
        # a user option, it's just there so the bdist_* commands can turn
        # it off) determines whether we warn about installing to a
        # directory not in sys.path.
        self.force = 0
        self.skip_build = 0
        self.warn_dir = 1

        # These are only here as a conduit from the 'build' command to the
        # 'install_*' commands that do the real work.  ('build_base' isn't
        # actually used anywhere, but it might be useful in future.)  They
        # are not user options, because if the user told the install
        # command where the build directory is, that wouldn't affect the
        # build command.
        self.build_base = None
        self.build_lib = None

        # Not defined yet because we don't know anything about
        # documentation yet.
        # self.install_man = None
        # self.install_html = None
        # self.install_info = None

        self.record = None

    # -- Option finalizing methods -------------------------------------
    # (This is rather more involved than for most commands,
    # because this is where the policy for installing third-
    # party Python modules on various platforms given a wide
    # array of user input is decided.  Yes, it's quite complex!)

    def finalize_options(self):  # noqa: C901
        """Finalizes options."""
        # This method (and its helpers, like 'finalize_unix()',
        # 'finalize_other()', and 'select_scheme()') is where the default
        # installation directories for modules, extension modules, and
        # anything else we care to install from a Python module
        # distribution.  Thus, this code makes a pretty important policy
        # statement about how third-party stuff is added to a Python
        # installation!  Note that the actual work of installation is done
        # by the relatively simple 'install_*' commands; they just take
        # their orders from the installation directory options determined
        # here.

        # Check for errors/inconsistencies in the options; first, stuff
        # that's wrong on any platform.

        if (self.prefix or self.exec_prefix or self.home) and (
            self.install_base or self.install_platbase
        ):
            raise DistutilsOptionError(
                "must supply either prefix/exec-prefix/home or "
                + "install-base/install-platbase -- not both"
            )

        if self.home and (self.prefix or self.exec_prefix):
            raise DistutilsOptionError(
                "must supply either home or prefix/exec-prefix -- not both"
            )

        if self.user and (
            self.prefix
            or self.exec_prefix
            or self.home
            or self.install_base
            or self.install_platbase
        ):
            raise DistutilsOptionError(
                "can't combine user with prefix, "
                "exec_prefix/home, or install_(plat)base"
            )

        # Next, stuff that's wrong (or dubious) only on certain platforms.
        if os.name != "posix":
            if self.exec_prefix:
                self.warn("exec-prefix option ignored on this platform")
                self.exec_prefix = None

        # Now the interesting logic -- so interesting that we farm it out
        # to other methods.  The goal of these methods is to set the final
        # values for the install_{lib,scripts,data,...}  options, using as
        # input a heady brew of prefix, exec_prefix, home, install_base,
        # install_platbase, user-supplied versions of
        # install_{purelib,platlib,lib,scripts,data,...}, and the
        # install schemes.  Phew!

        self.dump_dirs("pre-finalize_{unix,other}")

        if os.name == 'posix':
            self.finalize_unix()
        else:
            self.finalize_other()

        self.dump_dirs("post-finalize_{unix,other}()")

        # Expand configuration variables, tilde, etc. in self.install_base
        # and self.install_platbase -- that way, we can use $base or
        # $platbase in the other installation directories and not worry
        # about needing recursive variable expansion (shudder).

        py_version = sys.version.split()[0]
        (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
        try:
            abiflags = sys.abiflags
        except AttributeError:
            # sys.abiflags may not be defined on all platforms.
            abiflags = ''
        local_vars = {
            'dist_name': self.distribution.get_name(),
            'dist_version': self.distribution.get_version(),
            'dist_fullname': self.distribution.get_fullname(),
            'py_version': py_version,
            'py_version_short': '%d.%d' % sys.version_info[:2],
            'py_version_nodot': '%d%d' % sys.version_info[:2],
            'sys_prefix': prefix,
            'prefix': prefix,
            'sys_exec_prefix': exec_prefix,
            'exec_prefix': exec_prefix,
            'abiflags': abiflags,
            'platlibdir': getattr(sys, 'platlibdir', 'lib'),
            'implementation_lower': _get_implementation().lower(),
            'implementation': _get_implementation(),
        }

        # vars for compatibility on older Pythons
        compat_vars = dict(
            # Python 3.9 and earlier
            py_version_nodot_plat=getattr(sys, 'winver', '').replace('.', ''),
        )

        if HAS_USER_SITE:
            local_vars['userbase'] = self.install_userbase
            local_vars['usersite'] = self.install_usersite

        self.config_vars = _collections.DictStack(
            [fw.vars(), compat_vars, sysconfig.get_config_vars(), local_vars]
        )

        self.expand_basedirs()

        self.dump_dirs("post-expand_basedirs()")

        # Now define config vars for the base directories so we can expand
        # everything else.
        local_vars['base'] = self.install_base
        local_vars['platbase'] = self.install_platbase

        if DEBUG:
            from pprint import pprint

            print("config vars:")
            pprint(dict(self.config_vars))

        # Expand "~" and configuration variables in the installation
        # directories.
        self.expand_dirs()

        self.dump_dirs("post-expand_dirs()")

        # Create directories in the home dir:
        if self.user:
            self.create_home_path()

        # Pick the actual directory to install all modules to: either
        # install_purelib or install_platlib, depending on whether this
        # module distribution is pure or not.  Of course, if the user
        # already specified install_lib, use their selection.
        if self.install_lib is None:
            if self.distribution.has_ext_modules():  # has extensions: non-pure
                self.install_lib = self.install_platlib
            else:
                self.install_lib = self.install_purelib

        # Convert directories from Unix /-separated syntax to the local
        # convention.
        self.convert_paths(
            'lib',
            'purelib',
            'platlib',
            'scripts',
            'data',
            'headers',
            'userbase',
            'usersite',
        )

        # Deprecated
        # Well, we're not actually fully completely finalized yet: we still
        # have to deal with 'extra_path', which is the hack for allowing
        # non-packagized module distributions (hello, Numerical Python!) to
        # get their own directories.
        self.handle_extra_path()
        self.install_libbase = self.install_lib  # needed for .pth file
        self.install_lib = os.path.join(self.install_lib, self.extra_dirs)

        # If a new root directory was supplied, make all the installation
        # dirs relative to it.
        if self.root is not None:
            self.change_roots(
                'libbase', 'lib', 'purelib', 'platlib', 'scripts', 'data', 'headers'
            )

        self.dump_dirs("after prepending root")

        # Find out the build directories, ie. where to install from.
        self.set_undefined_options(
            'build', ('build_base', 'build_base'), ('build_lib', 'build_lib')
        )

        # Punt on doc directories for now -- after all, we're punting on
        # documentation completely!

    def dump_dirs(self, msg):
        """Dumps the list of user options."""
        if not DEBUG:
            return
        from distutils.fancy_getopt import longopt_xlate

        log.debug(msg + ":")
        for opt in self.user_options:
            opt_name = opt[0]
            if opt_name[-1] == "=":
                opt_name = opt_name[0:-1]
            if opt_name in self.negative_opt:
                opt_name = self.negative_opt[opt_name]
                opt_name = opt_name.translate(longopt_xlate)
                val = not getattr(self, opt_name)
            else:
                opt_name = opt_name.translate(longopt_xlate)
                val = getattr(self, opt_name)
            log.debug("  %s: %s", opt_name, val)

    def finalize_unix(self):
        """Finalizes options for posix platforms."""
        if self.install_base is not None or self.install_platbase is not None:
            incomplete_scheme = (
                (
                    self.install_lib is None
                    and self.install_purelib is None
                    and self.install_platlib is None
                )
                or self.install_headers is None
                or self.install_scripts is None
                or self.install_data is None
            )
            if incomplete_scheme:
                raise DistutilsOptionError(
                    "install-base or install-platbase supplied, but "
                    "installation scheme is incomplete"
                )
            return

        if self.user:
            if self.install_userbase is None:
                raise DistutilsPlatformError("User base directory is not specified")
            self.install_base = self.install_platbase = self.install_userbase
            self.select_scheme("posix_user")
        elif self.home is not None:
            self.install_base = self.install_platbase = self.home
            self.select_scheme("posix_home")
        else:
            if self.prefix is None:
                if self.exec_prefix is not None:
                    raise DistutilsOptionError(
                        "must not supply exec-prefix without prefix"
                    )

                # Allow Fedora to add components to the prefix
                _prefix_addition = getattr(sysconfig, '_prefix_addition', "")

                self.prefix = os.path.normpath(sys.prefix) + _prefix_addition
                self.exec_prefix = os.path.normpath(sys.exec_prefix) + _prefix_addition

            else:
                if self.exec_prefix is None:
                    self.exec_prefix = self.prefix

            self.install_base = self.prefix
            self.install_platbase = self.exec_prefix
            self.select_scheme("posix_prefix")

    def finalize_other(self):
        """Finalizes options for non-posix platforms"""
        if self.user:
            if self.install_userbase is None:
                raise DistutilsPlatformError("User base directory is not specified")
            self.install_base = self.install_platbase = self.install_userbase
            self.select_scheme(os.name + "_user")
        elif self.home is not None:
            self.install_base = self.install_platbase = self.home
            self.select_scheme("posix_home")
        else:
            if self.prefix is None:
                self.prefix = os.path.normpath(sys.prefix)

            self.install_base = self.install_platbase = self.prefix
            try:
                self.select_scheme(os.name)
            except KeyError:
                raise DistutilsPlatformError(
                    "I don't know how to install stuff on '%s'" % os.name
                )

    def select_scheme(self, name):
        _select_scheme(self, name)

    def _expand_attrs(self, attrs):
        for attr in attrs:
            val = getattr(self, attr)
            if val is not None:
                if os.name == 'posix' or os.name == 'nt':
                    val = os.path.expanduser(val)
                val = subst_vars(val, self.config_vars)
                setattr(self, attr, val)

    def expand_basedirs(self):
        """Calls `os.path.expanduser` on install_base, install_platbase and
        root."""
        self._expand_attrs(['install_base', 'install_platbase', 'root'])

    def expand_dirs(self):
        """Calls `os.path.expanduser` on install dirs."""
        self._expand_attrs(
            [
                'install_purelib',
                'install_platlib',
                'install_lib',
                'install_headers',
                'install_scripts',
                'install_data',
            ]
        )

    def convert_paths(self, *names):
        """Call `convert_path` over `names`."""
        for name in names:
            attr = "install_" + name
            setattr(self, attr, convert_path(getattr(self, attr)))

    def handle_extra_path(self):
        """Set `path_file` and `extra_dirs` using `extra_path`."""
        if self.extra_path is None:
            self.extra_path = self.distribution.extra_path

        if self.extra_path is not None:
            log.warn(
                "Distribution option extra_path is deprecated. "
                "See issue27919 for details."
            )
            if isinstance(self.extra_path, str):
                self.extra_path = self.extra_path.split(',')

            if len(self.extra_path) == 1:
                path_file = extra_dirs = self.extra_path[0]
            elif len(self.extra_path) == 2:
                path_file, extra_dirs = self.extra_path
            else:
                raise DistutilsOptionError(
                    "'extra_path' option must be a list, tuple, or "
                    "comma-separated string with 1 or 2 elements"
                )

            # convert to local form in case Unix notation used (as it
            # should be in setup scripts)
            extra_dirs = convert_path(extra_dirs)
        else:
            path_file = None
            extra_dirs = ''

        # XXX should we warn if path_file and not extra_dirs? (in which
        # case the path file would be harmless but pointless)
        self.path_file = path_file
        self.extra_dirs = extra_dirs

    def change_roots(self, *names):
        """Change the install directories pointed by name using root."""
        for name in names:
            attr = "install_" + name
            setattr(self, attr, change_root(self.root, getattr(self, attr)))

    def create_home_path(self):
        """Create directories under ~."""
        if not self.user:
            return
        home = convert_path(os.path.expanduser("~"))
        for name, path in self.config_vars.items():
            if str(path).startswith(home) and not os.path.isdir(path):
                self.debug_print("os.makedirs('%s', 0o700)" % path)
                os.makedirs(path, 0o700)

    # -- Command execution methods -------------------------------------

    def run(self):
        """Runs the command."""
        # Obviously have to build before we can install
        if not self.skip_build:
            self.run_command('build')
            # If we built for any other platform, we can't install.
            build_plat = self.distribution.get_command_obj('build').plat_name
            # check warn_dir - it is a clue that the 'install' is happening
            # internally, and not to sys.path, so we don't check the platform
            # matches what we are running.
            if self.warn_dir and build_plat != get_platform():
                raise DistutilsPlatformError("Can't install when " "cross-compiling")

        # Run all sub-commands (at least those that need to be run)
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        if self.path_file:
            self.create_path_file()

        # write list of installed files, if requested.
        if self.record:
            outputs = self.get_outputs()
            if self.root:  # strip any package prefix
                root_len = len(self.root)
                for counter in range(len(outputs)):
                    outputs[counter] = outputs[counter][root_len:]
            self.execute(
                write_file,
                (self.record, outputs),
                "writing list of installed files to '%s'" % self.record,
            )

        sys_path = map(os.path.normpath, sys.path)
        sys_path = map(os.path.normcase, sys_path)
        install_lib = os.path.normcase(os.path.normpath(self.install_lib))
        if (
            self.warn_dir
            and not (self.path_file and self.install_path_file)
            and install_lib not in sys_path
        ):
            log.debug(
                (
                    "modules installed to '%s', which is not in "
                    "Python's module search path (sys.path) -- "
                    "you'll have to change the search path yourself"
                ),
                self.install_lib,
            )

    def create_path_file(self):
        """Creates the .pth file"""
        filename = os.path.join(self.install_libbase, self.path_file + ".pth")
        if self.install_path_file:
            self.execute(
                write_file, (filename, [self.extra_dirs]), "creating %s" % filename
            )
        else:
            self.warn("path file '%s' not created" % filename)

    # -- Reporting methods ---------------------------------------------

    def get_outputs(self):
        """Assembles the outputs of all the sub-commands."""
        outputs = []
        for cmd_name in self.get_sub_commands():
            cmd = self.get_finalized_command(cmd_name)
            # Add the contents of cmd.get_outputs(), ensuring
            # that outputs doesn't contain duplicate entries
            for filename in cmd.get_outputs():
                if filename not in outputs:
                    outputs.append(filename)

        if self.path_file and self.install_path_file:
            outputs.append(os.path.join(self.install_libbase, self.path_file + ".pth"))

        return outputs

    def get_inputs(self):
        """Returns the inputs of all the sub-commands"""
        # XXX gee, this looks familiar ;-(
        inputs = []
        for cmd_name in self.get_sub_commands():
            cmd = self.get_finalized_command(cmd_name)
            inputs.extend(cmd.get_inputs())

        return inputs

    # -- Predicates for sub-command list -------------------------------

    def has_lib(self):
        """Returns true if the current distribution has any Python
        modules to install."""
        return (
            self.distribution.has_pure_modules() or self.distribution.has_ext_modules()
        )

    def has_headers(self):
        """Returns true if the current distribution has any headers to
        install."""
        return self.distribution.has_headers()

    def has_scripts(self):
        """Returns true if the current distribution has any scripts to.
        install."""
        return self.distribution.has_scripts()

    def has_data(self):
        """Returns true if the current distribution has any data to.
        install."""
        return self.distribution.has_data_files()

    # 'sub_commands': a list of commands this command might have to run to
    # get its work done.  See cmd.py for more info.
    sub_commands = [
        ('install_lib', has_lib),
        ('install_headers', has_headers),
        ('install_scripts', has_scripts),
        ('install_data', has_data),
        ('install_egg_info', lambda self: True),
    ]
PK|5Z\n" % header)
                file.write("\n")
            file.write(body)
            if body[-1] != "\n":
                file.write("\n")
        return filename

    def _preprocess(self, body, headers, include_dirs, lang):
        src = self._gen_temp_sourcefile(body, headers, lang)
        out = "_configtest.i"
        self.temp_files.extend([src, out])
        self.compiler.preprocess(src, out, include_dirs=include_dirs)
        return (src, out)

    def _compile(self, body, headers, include_dirs, lang):
        src = self._gen_temp_sourcefile(body, headers, lang)
        if self.dump_source:
            dump_file(src, "compiling '%s':" % src)
        (obj,) = self.compiler.object_filenames([src])
        self.temp_files.extend([src, obj])
        self.compiler.compile([src], include_dirs=include_dirs)
        return (src, obj)

    def _link(self, body, headers, include_dirs, libraries, library_dirs, lang):
        (src, obj) = self._compile(body, headers, include_dirs, lang)
        prog = os.path.splitext(os.path.basename(src))[0]
        self.compiler.link_executable(
            [obj],
            prog,
            libraries=libraries,
            library_dirs=library_dirs,
            target_lang=lang,
        )

        if self.compiler.exe_extension is not None:
            prog = prog + self.compiler.exe_extension
        self.temp_files.append(prog)

        return (src, obj, prog)

    def _clean(self, *filenames):
        if not filenames:
            filenames = self.temp_files
            self.temp_files = []
        log.info("removing: %s", ' '.join(filenames))
        for filename in filenames:
            try:
                os.remove(filename)
            except OSError:
                pass

    # XXX these ignore the dry-run flag: what to do, what to do? even if
    # you want a dry-run build, you still need some sort of configuration
    # info.  My inclination is to make it up to the real config command to
    # consult 'dry_run', and assume a default (minimal) configuration if
    # true.  The problem with trying to do it here is that you'd have to
    # return either true or false from all the 'try' methods, neither of
    # which is correct.

    # XXX need access to the header search path and maybe default macros.

    def try_cpp(self, body=None, headers=None, include_dirs=None, lang="c"):
        """Construct a source file from 'body' (a string containing lines
        of C/C++ code) and 'headers' (a list of header files to include)
        and run it through the preprocessor.  Return true if the
        preprocessor succeeded, false if there were any errors.
        ('body' probably isn't of much use, but what the heck.)
        """
        from distutils.ccompiler import CompileError

        self._check_compiler()
        ok = True
        try:
            self._preprocess(body, headers, include_dirs, lang)
        except CompileError:
            ok = False

        self._clean()
        return ok

    def search_cpp(self, pattern, body=None, headers=None, include_dirs=None, lang="c"):
        """Construct a source file (just like 'try_cpp()'), run it through
        the preprocessor, and return true if any line of the output matches
        'pattern'.  'pattern' should either be a compiled regex object or a
        string containing a regex.  If both 'body' and 'headers' are None,
        preprocesses an empty file -- which can be useful to determine the
        symbols the preprocessor and compiler set by default.
        """
        self._check_compiler()
        src, out = self._preprocess(body, headers, include_dirs, lang)

        if isinstance(pattern, str):
            pattern = re.compile(pattern)

        with open(out) as file:
            match = False
            while True:
                line = file.readline()
                if line == '':
                    break
                if pattern.search(line):
                    match = True
                    break

        self._clean()
        return match

    def try_compile(self, body, headers=None, include_dirs=None, lang="c"):
        """Try to compile a source file built from 'body' and 'headers'.
        Return true on success, false otherwise.
        """
        from distutils.ccompiler import CompileError

        self._check_compiler()
        try:
            self._compile(body, headers, include_dirs, lang)
            ok = True
        except CompileError:
            ok = False

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok

    def try_link(
        self,
        body,
        headers=None,
        include_dirs=None,
        libraries=None,
        library_dirs=None,
        lang="c",
    ):
        """Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        """
        from distutils.ccompiler import CompileError, LinkError

        self._check_compiler()
        try:
            self._link(body, headers, include_dirs, libraries, library_dirs, lang)
            ok = True
        except (CompileError, LinkError):
            ok = False

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok

    def try_run(
        self,
        body,
        headers=None,
        include_dirs=None,
        libraries=None,
        library_dirs=None,
        lang="c",
    ):
        """Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        """
        from distutils.ccompiler import CompileError, LinkError

        self._check_compiler()
        try:
            src, obj, exe = self._link(
                body, headers, include_dirs, libraries, library_dirs, lang
            )
            self.spawn([exe])
            ok = True
        except (CompileError, LinkError, DistutilsExecError):
            ok = False

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok

    # -- High-level methods --------------------------------------------
    # (these are the ones that are actually likely to be useful
    # when implementing a real-world config command!)

    def check_func(
        self,
        func,
        headers=None,
        include_dirs=None,
        libraries=None,
        library_dirs=None,
        decl=0,
        call=0,
    ):
        """Determine if function 'func' is available by constructing a
        source file that refers to 'func', and compiles and links it.
        If everything succeeds, returns true; otherwise returns false.

        The constructed source file starts out by including the header
        files listed in 'headers'.  If 'decl' is true, it then declares
        'func' (as "int func()"); you probably shouldn't supply 'headers'
        and set 'decl' true in the same call, or you might get errors about
        a conflicting declarations for 'func'.  Finally, the constructed
        'main()' function either references 'func' or (if 'call' is true)
        calls it.  'libraries' and 'library_dirs' are used when
        linking.
        """
        self._check_compiler()
        body = []
        if decl:
            body.append("int %s ();" % func)
        body.append("int main () {")
        if call:
            body.append("  %s();" % func)
        else:
            body.append("  %s;" % func)
        body.append("}")
        body = "\n".join(body) + "\n"

        return self.try_link(body, headers, include_dirs, libraries, library_dirs)

    def check_lib(
        self,
        library,
        library_dirs=None,
        headers=None,
        include_dirs=None,
        other_libraries=[],
    ):
        """Determine if 'library' is available to be linked against,
        without actually checking that any particular symbols are provided
        by it.  'headers' will be used in constructing the source file to
        be compiled, but the only effect of this is to check if all the
        header files listed are available.  Any libraries listed in
        'other_libraries' will be included in the link, in case 'library'
        has symbols that depend on other libraries.
        """
        self._check_compiler()
        return self.try_link(
            "int main (void) { }",
            headers,
            include_dirs,
            [library] + other_libraries,
            library_dirs,
        )

    def check_header(self, header, include_dirs=None, library_dirs=None, lang="c"):
        """Determine if the system header file named by 'header_file'
        exists and can be found by the preprocessor; return true if so,
        false otherwise.
        """
        return self.try_cpp(
            body="/* No body */", headers=[header], include_dirs=include_dirs
        )


def dump_file(filename, head=None):
    """Dumps a file content into log.info.

    If head is not None, will be dumped before the file content.
    """
    if head is None:
        log.info('%s', filename)
    else:
        log.info(head)
    file = open(filename)
    try:
        log.info(file.read())
    finally:
        file.close()
PK|5Z>q=Lib/site-packages/setuptools/_distutils/command/py37compat.pynuW+Aimport sys


def _pythonlib_compat():
    """
    On Python 3.7 and earlier, distutils would include the Python
    library. See pypa/distutils#9.
    """
    from distutils import sysconfig

    if not sysconfig.get_config_var('Py_ENABLED_SHARED'):
        return

    yield 'python{}.{}{}'.format(
        sys.hexversion >> 24,
        (sys.hexversion >> 16) & 0xFF,
        sysconfig.get_config_var('ABIFLAGS'),
    )


def compose(f1, f2):
    return lambda *args, **kwargs: f1(f2(*args, **kwargs))


pythonlib = (
    compose(list, _pythonlib_compat)
    if sys.version_info < (3, 8)
    and sys.platform != 'darwin'
    and sys.platform[:3] != 'aix'
    else list
)
PK|5Z4]]=Lib/site-packages/setuptools/_distutils/command/bdist_dumb.pynuW+A"""distutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix)."""

import os
from distutils.core import Command
from distutils.util import get_platform
from distutils.dir_util import remove_tree, ensure_relative
from distutils.errors import DistutilsPlatformError
from distutils.sysconfig import get_python_version
from distutils import log


class bdist_dumb(Command):

    description = "create a \"dumb\" built distribution"

    user_options = [
        ('bdist-dir=', 'd', "temporary directory for creating the distribution"),
        (
            'plat-name=',
            'p',
            "platform name to embed in generated filenames "
            "(default: %s)" % get_platform(),
        ),
        (
            'format=',
            'f',
            "archive format to create (tar, gztar, bztar, xztar, " "ztar, zip)",
        ),
        (
            'keep-temp',
            'k',
            "keep the pseudo-installation tree around after "
            + "creating the distribution archive",
        ),
        ('dist-dir=', 'd', "directory to put final built distributions in"),
        ('skip-build', None, "skip rebuilding everything (for testing/debugging)"),
        (
            'relative',
            None,
            "build the archive using relative paths " "(default: false)",
        ),
        (
            'owner=',
            'u',
            "Owner name used when creating a tar file" " [default: current user]",
        ),
        (
            'group=',
            'g',
            "Group name used when creating a tar file" " [default: current group]",
        ),
    ]

    boolean_options = ['keep-temp', 'skip-build', 'relative']

    default_format = {'posix': 'gztar', 'nt': 'zip'}

    def initialize_options(self):
        self.bdist_dir = None
        self.plat_name = None
        self.format = None
        self.keep_temp = 0
        self.dist_dir = None
        self.skip_build = None
        self.relative = 0
        self.owner = None
        self.group = None

    def finalize_options(self):
        if self.bdist_dir is None:
            bdist_base = self.get_finalized_command('bdist').bdist_base
            self.bdist_dir = os.path.join(bdist_base, 'dumb')

        if self.format is None:
            try:
                self.format = self.default_format[os.name]
            except KeyError:
                raise DistutilsPlatformError(
                    "don't know how to create dumb built distributions "
                    "on platform %s" % os.name
                )

        self.set_undefined_options(
            'bdist',
            ('dist_dir', 'dist_dir'),
            ('plat_name', 'plat_name'),
            ('skip_build', 'skip_build'),
        )

    def run(self):
        if not self.skip_build:
            self.run_command('build')

        install = self.reinitialize_command('install', reinit_subcommands=1)
        install.root = self.bdist_dir
        install.skip_build = self.skip_build
        install.warn_dir = 0

        log.info("installing to %s", self.bdist_dir)
        self.run_command('install')

        # And make an archive relative to the root of the
        # pseudo-installation tree.
        archive_basename = "{}.{}".format(
            self.distribution.get_fullname(), self.plat_name
        )

        pseudoinstall_root = os.path.join(self.dist_dir, archive_basename)
        if not self.relative:
            archive_root = self.bdist_dir
        else:
            if self.distribution.has_ext_modules() and (
                install.install_base != install.install_platbase
            ):
                raise DistutilsPlatformError(
                    "can't make a dumb built distribution where "
                    "base and platbase are different (%s, %s)"
                    % (repr(install.install_base), repr(install.install_platbase))
                )
            else:
                archive_root = os.path.join(
                    self.bdist_dir, ensure_relative(install.install_base)
                )

        # Make the archive
        filename = self.make_archive(
            pseudoinstall_root,
            self.format,
            root_dir=archive_root,
            owner=self.owner,
            group=self.group,
        )
        if self.distribution.has_ext_modules():
            pyversion = get_python_version()
        else:
            pyversion = 'any'
        self.distribution.dist_files.append(('bdist_dumb', pyversion, filename))

        if not self.keep_temp:
            remove_tree(self.bdist_dir, dry_run=self.dry_run)
PK|5Z3F#V#V<Lib/site-packages/setuptools/_distutils/command/bdist_rpm.pynuW+A"""distutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions)."""

import subprocess
import sys
import os

from distutils.core import Command
from distutils.debug import DEBUG
from distutils.file_util import write_file
from distutils.errors import (
    DistutilsOptionError,
    DistutilsPlatformError,
    DistutilsFileError,
    DistutilsExecError,
)
from distutils.sysconfig import get_python_version
from distutils import log


class bdist_rpm(Command):

    description = "create an RPM distribution"

    user_options = [
        ('bdist-base=', None, "base directory for creating built distributions"),
        (
            'rpm-base=',
            None,
            "base directory for creating RPMs (defaults to \"rpm\" under "
            "--bdist-base; must be specified for RPM 2)",
        ),
        (
            'dist-dir=',
            'd',
            "directory to put final RPM files in " "(and .spec files if --spec-only)",
        ),
        (
            'python=',
            None,
            "path to Python interpreter to hard-code in the .spec file "
            "(default: \"python\")",
        ),
        (
            'fix-python',
            None,
            "hard-code the exact path to the current Python interpreter in "
            "the .spec file",
        ),
        ('spec-only', None, "only regenerate spec file"),
        ('source-only', None, "only generate source RPM"),
        ('binary-only', None, "only generate binary RPM"),
        ('use-bzip2', None, "use bzip2 instead of gzip to create source distribution"),
        # More meta-data: too RPM-specific to put in the setup script,
        # but needs to go in the .spec file -- so we make these options
        # to "bdist_rpm".  The idea is that packagers would put this
        # info in setup.cfg, although they are of course free to
        # supply it on the command line.
        (
            'distribution-name=',
            None,
            "name of the (Linux) distribution to which this "
            "RPM applies (*not* the name of the module distribution!)",
        ),
        ('group=', None, "package classification [default: \"Development/Libraries\"]"),
        ('release=', None, "RPM release number"),
        ('serial=', None, "RPM serial number"),
        (
            'vendor=',
            None,
            "RPM \"vendor\" (eg. \"Joe Blow \") "
            "[default: maintainer or author from setup script]",
        ),
        (
            'packager=',
            None,
            "RPM packager (eg. \"Jane Doe \") " "[default: vendor]",
        ),
        ('doc-files=', None, "list of documentation files (space or comma-separated)"),
        ('changelog=', None, "RPM changelog"),
        ('icon=', None, "name of icon file"),
        ('provides=', None, "capabilities provided by this package"),
        ('requires=', None, "capabilities required by this package"),
        ('conflicts=', None, "capabilities which conflict with this package"),
        ('build-requires=', None, "capabilities required to build this package"),
        ('obsoletes=', None, "capabilities made obsolete by this package"),
        ('no-autoreq', None, "do not automatically calculate dependencies"),
        # Actions to take when building RPM
        ('keep-temp', 'k', "don't clean up RPM build directory"),
        ('no-keep-temp', None, "clean up RPM build directory [default]"),
        (
            'use-rpm-opt-flags',
            None,
            "compile with RPM_OPT_FLAGS when building from source RPM",
        ),
        ('no-rpm-opt-flags', None, "do not pass any RPM CFLAGS to compiler"),
        ('rpm3-mode', None, "RPM 3 compatibility mode (default)"),
        ('rpm2-mode', None, "RPM 2 compatibility mode"),
        # Add the hooks necessary for specifying custom scripts
        ('prep-script=', None, "Specify a script for the PREP phase of RPM building"),
        ('build-script=', None, "Specify a script for the BUILD phase of RPM building"),
        (
            'pre-install=',
            None,
            "Specify a script for the pre-INSTALL phase of RPM building",
        ),
        (
            'install-script=',
            None,
            "Specify a script for the INSTALL phase of RPM building",
        ),
        (
            'post-install=',
            None,
            "Specify a script for the post-INSTALL phase of RPM building",
        ),
        (
            'pre-uninstall=',
            None,
            "Specify a script for the pre-UNINSTALL phase of RPM building",
        ),
        (
            'post-uninstall=',
            None,
            "Specify a script for the post-UNINSTALL phase of RPM building",
        ),
        ('clean-script=', None, "Specify a script for the CLEAN phase of RPM building"),
        (
            'verify-script=',
            None,
            "Specify a script for the VERIFY phase of the RPM build",
        ),
        # Allow a packager to explicitly force an architecture
        ('force-arch=', None, "Force an architecture onto the RPM build process"),
        ('quiet', 'q', "Run the INSTALL phase of RPM building in quiet mode"),
    ]

    boolean_options = [
        'keep-temp',
        'use-rpm-opt-flags',
        'rpm3-mode',
        'no-autoreq',
        'quiet',
    ]

    negative_opt = {
        'no-keep-temp': 'keep-temp',
        'no-rpm-opt-flags': 'use-rpm-opt-flags',
        'rpm2-mode': 'rpm3-mode',
    }

    def initialize_options(self):
        self.bdist_base = None
        self.rpm_base = None
        self.dist_dir = None
        self.python = None
        self.fix_python = None
        self.spec_only = None
        self.binary_only = None
        self.source_only = None
        self.use_bzip2 = None

        self.distribution_name = None
        self.group = None
        self.release = None
        self.serial = None
        self.vendor = None
        self.packager = None
        self.doc_files = None
        self.changelog = None
        self.icon = None

        self.prep_script = None
        self.build_script = None
        self.install_script = None
        self.clean_script = None
        self.verify_script = None
        self.pre_install = None
        self.post_install = None
        self.pre_uninstall = None
        self.post_uninstall = None
        self.prep = None
        self.provides = None
        self.requires = None
        self.conflicts = None
        self.build_requires = None
        self.obsoletes = None

        self.keep_temp = 0
        self.use_rpm_opt_flags = 1
        self.rpm3_mode = 1
        self.no_autoreq = 0

        self.force_arch = None
        self.quiet = 0

    def finalize_options(self):
        self.set_undefined_options('bdist', ('bdist_base', 'bdist_base'))
        if self.rpm_base is None:
            if not self.rpm3_mode:
                raise DistutilsOptionError("you must specify --rpm-base in RPM 2 mode")
            self.rpm_base = os.path.join(self.bdist_base, "rpm")

        if self.python is None:
            if self.fix_python:
                self.python = sys.executable
            else:
                self.python = "python3"
        elif self.fix_python:
            raise DistutilsOptionError(
                "--python and --fix-python are mutually exclusive options"
            )

        if os.name != 'posix':
            raise DistutilsPlatformError(
                "don't know how to create RPM " "distributions on platform %s" % os.name
            )
        if self.binary_only and self.source_only:
            raise DistutilsOptionError(
                "cannot supply both '--source-only' and '--binary-only'"
            )

        # don't pass CFLAGS to pure python distributions
        if not self.distribution.has_ext_modules():
            self.use_rpm_opt_flags = 0

        self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))
        self.finalize_package_data()

    def finalize_package_data(self):
        self.ensure_string('group', "Development/Libraries")
        self.ensure_string(
            'vendor',
            "%s <%s>"
            % (self.distribution.get_contact(), self.distribution.get_contact_email()),
        )
        self.ensure_string('packager')
        self.ensure_string_list('doc_files')
        if isinstance(self.doc_files, list):
            for readme in ('README', 'README.txt'):
                if os.path.exists(readme) and readme not in self.doc_files:
                    self.doc_files.append(readme)

        self.ensure_string('release', "1")
        self.ensure_string('serial')  # should it be an int?

        self.ensure_string('distribution_name')

        self.ensure_string('changelog')
        # Format changelog correctly
        self.changelog = self._format_changelog(self.changelog)

        self.ensure_filename('icon')

        self.ensure_filename('prep_script')
        self.ensure_filename('build_script')
        self.ensure_filename('install_script')
        self.ensure_filename('clean_script')
        self.ensure_filename('verify_script')
        self.ensure_filename('pre_install')
        self.ensure_filename('post_install')
        self.ensure_filename('pre_uninstall')
        self.ensure_filename('post_uninstall')

        # XXX don't forget we punted on summaries and descriptions -- they
        # should be handled here eventually!

        # Now *this* is some meta-data that belongs in the setup script...
        self.ensure_string_list('provides')
        self.ensure_string_list('requires')
        self.ensure_string_list('conflicts')
        self.ensure_string_list('build_requires')
        self.ensure_string_list('obsoletes')

        self.ensure_string('force_arch')

    def run(self):  # noqa: C901
        if DEBUG:
            print("before _get_package_data():")
            print("vendor =", self.vendor)
            print("packager =", self.packager)
            print("doc_files =", self.doc_files)
            print("changelog =", self.changelog)

        # make directories
        if self.spec_only:
            spec_dir = self.dist_dir
            self.mkpath(spec_dir)
        else:
            rpm_dir = {}
            for d in ('SOURCES', 'SPECS', 'BUILD', 'RPMS', 'SRPMS'):
                rpm_dir[d] = os.path.join(self.rpm_base, d)
                self.mkpath(rpm_dir[d])
            spec_dir = rpm_dir['SPECS']

        # Spec file goes into 'dist_dir' if '--spec-only specified',
        # build/rpm. otherwise.
        spec_path = os.path.join(spec_dir, "%s.spec" % self.distribution.get_name())
        self.execute(
            write_file, (spec_path, self._make_spec_file()), "writing '%s'" % spec_path
        )

        if self.spec_only:  # stop if requested
            return

        # Make a source distribution and copy to SOURCES directory with
        # optional icon.
        saved_dist_files = self.distribution.dist_files[:]
        sdist = self.reinitialize_command('sdist')
        if self.use_bzip2:
            sdist.formats = ['bztar']
        else:
            sdist.formats = ['gztar']
        self.run_command('sdist')
        self.distribution.dist_files = saved_dist_files

        source = sdist.get_archive_files()[0]
        source_dir = rpm_dir['SOURCES']
        self.copy_file(source, source_dir)

        if self.icon:
            if os.path.exists(self.icon):
                self.copy_file(self.icon, source_dir)
            else:
                raise DistutilsFileError("icon file '%s' does not exist" % self.icon)

        # build package
        log.info("building RPMs")
        rpm_cmd = ['rpmbuild']

        if self.source_only:  # what kind of RPMs?
            rpm_cmd.append('-bs')
        elif self.binary_only:
            rpm_cmd.append('-bb')
        else:
            rpm_cmd.append('-ba')
        rpm_cmd.extend(['--define', '__python %s' % self.python])
        if self.rpm3_mode:
            rpm_cmd.extend(['--define', '_topdir %s' % os.path.abspath(self.rpm_base)])
        if not self.keep_temp:
            rpm_cmd.append('--clean')

        if self.quiet:
            rpm_cmd.append('--quiet')

        rpm_cmd.append(spec_path)
        # Determine the binary rpm names that should be built out of this spec
        # file
        # Note that some of these may not be really built (if the file
        # list is empty)
        nvr_string = "%{name}-%{version}-%{release}"
        src_rpm = nvr_string + ".src.rpm"
        non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm"
        q_cmd = r"rpm -q --qf '{} {}\n' --specfile '{}'".format(
            src_rpm,
            non_src_rpm,
            spec_path,
        )

        out = os.popen(q_cmd)
        try:
            binary_rpms = []
            source_rpm = None
            while True:
                line = out.readline()
                if not line:
                    break
                ell = line.strip().split()
                assert len(ell) == 2
                binary_rpms.append(ell[1])
                # The source rpm is named after the first entry in the spec file
                if source_rpm is None:
                    source_rpm = ell[0]

            status = out.close()
            if status:
                raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd))

        finally:
            out.close()

        self.spawn(rpm_cmd)

        if not self.dry_run:
            if self.distribution.has_ext_modules():
                pyversion = get_python_version()
            else:
                pyversion = 'any'

            if not self.binary_only:
                srpm = os.path.join(rpm_dir['SRPMS'], source_rpm)
                assert os.path.exists(srpm)
                self.move_file(srpm, self.dist_dir)
                filename = os.path.join(self.dist_dir, source_rpm)
                self.distribution.dist_files.append(('bdist_rpm', pyversion, filename))

            if not self.source_only:
                for rpm in binary_rpms:
                    rpm = os.path.join(rpm_dir['RPMS'], rpm)
                    if os.path.exists(rpm):
                        self.move_file(rpm, self.dist_dir)
                        filename = os.path.join(self.dist_dir, os.path.basename(rpm))
                        self.distribution.dist_files.append(
                            ('bdist_rpm', pyversion, filename)
                        )

    def _dist_path(self, path):
        return os.path.join(self.dist_dir, os.path.basename(path))

    def _make_spec_file(self):  # noqa: C901
        """Generate the text of an RPM spec file and return it as a
        list of strings (one per line).
        """
        # definitions and headers
        spec_file = [
            '%define name ' + self.distribution.get_name(),
            '%define version ' + self.distribution.get_version().replace('-', '_'),
            '%define unmangled_version ' + self.distribution.get_version(),
            '%define release ' + self.release.replace('-', '_'),
            '',
            'Summary: ' + (self.distribution.get_description() or "UNKNOWN"),
        ]

        # Workaround for #14443 which affects some RPM based systems such as
        # RHEL6 (and probably derivatives)
        vendor_hook = subprocess.getoutput('rpm --eval %{__os_install_post}')
        # Generate a potential replacement value for __os_install_post (whilst
        # normalizing the whitespace to simplify the test for whether the
        # invocation of brp-python-bytecompile passes in __python):
        vendor_hook = '\n'.join(
            ['  %s \\' % line.strip() for line in vendor_hook.splitlines()]
        )
        problem = "brp-python-bytecompile \\\n"
        fixed = "brp-python-bytecompile %{__python} \\\n"
        fixed_hook = vendor_hook.replace(problem, fixed)
        if fixed_hook != vendor_hook:
            spec_file.append('# Workaround for http://bugs.python.org/issue14443')
            spec_file.append('%define __os_install_post ' + fixed_hook + '\n')

        # put locale summaries into spec file
        # XXX not supported for now (hard to put a dictionary
        # in a config file -- arg!)
        # for locale in self.summaries.keys():
        #    spec_file.append('Summary(%s): %s' % (locale,
        #                                          self.summaries[locale]))

        spec_file.extend(
            [
                'Name: %{name}',
                'Version: %{version}',
                'Release: %{release}',
            ]
        )

        # XXX yuck! this filename is available from the "sdist" command,
        # but only after it has run: and we create the spec file before
        # running "sdist", in case of --spec-only.
        if self.use_bzip2:
            spec_file.append('Source0: %{name}-%{unmangled_version}.tar.bz2')
        else:
            spec_file.append('Source0: %{name}-%{unmangled_version}.tar.gz')

        spec_file.extend(
            [
                'License: ' + (self.distribution.get_license() or "UNKNOWN"),
                'Group: ' + self.group,
                'BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot',
                'Prefix: %{_prefix}',
            ]
        )

        if not self.force_arch:
            # noarch if no extension modules
            if not self.distribution.has_ext_modules():
                spec_file.append('BuildArch: noarch')
        else:
            spec_file.append('BuildArch: %s' % self.force_arch)

        for field in (
            'Vendor',
            'Packager',
            'Provides',
            'Requires',
            'Conflicts',
            'Obsoletes',
        ):
            val = getattr(self, field.lower())
            if isinstance(val, list):
                spec_file.append('{}: {}'.format(field, ' '.join(val)))
            elif val is not None:
                spec_file.append('{}: {}'.format(field, val))

        if self.distribution.get_url():
            spec_file.append('Url: ' + self.distribution.get_url())

        if self.distribution_name:
            spec_file.append('Distribution: ' + self.distribution_name)

        if self.build_requires:
            spec_file.append('BuildRequires: ' + ' '.join(self.build_requires))

        if self.icon:
            spec_file.append('Icon: ' + os.path.basename(self.icon))

        if self.no_autoreq:
            spec_file.append('AutoReq: 0')

        spec_file.extend(
            [
                '',
                '%description',
                self.distribution.get_long_description() or "",
            ]
        )

        # put locale descriptions into spec file
        # XXX again, suppressed because config file syntax doesn't
        # easily support this ;-(
        # for locale in self.descriptions.keys():
        #    spec_file.extend([
        #        '',
        #        '%description -l ' + locale,
        #        self.descriptions[locale],
        #        ])

        # rpm scripts
        # figure out default build script
        def_setup_call = "{} {}".format(self.python, os.path.basename(sys.argv[0]))
        def_build = "%s build" % def_setup_call
        if self.use_rpm_opt_flags:
            def_build = 'env CFLAGS="$RPM_OPT_FLAGS" ' + def_build

        # insert contents of files

        # XXX this is kind of misleading: user-supplied options are files
        # that we open and interpolate into the spec file, but the defaults
        # are just text that we drop in as-is.  Hmmm.

        install_cmd = (
            '%s install -O1 --root=$RPM_BUILD_ROOT ' '--record=INSTALLED_FILES'
        ) % def_setup_call

        script_options = [
            ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"),
            ('build', 'build_script', def_build),
            ('install', 'install_script', install_cmd),
            ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"),
            ('verifyscript', 'verify_script', None),
            ('pre', 'pre_install', None),
            ('post', 'post_install', None),
            ('preun', 'pre_uninstall', None),
            ('postun', 'post_uninstall', None),
        ]

        for (rpm_opt, attr, default) in script_options:
            # Insert contents of file referred to, if no file is referred to
            # use 'default' as contents of script
            val = getattr(self, attr)
            if val or default:
                spec_file.extend(
                    [
                        '',
                        '%' + rpm_opt,
                    ]
                )
                if val:
                    with open(val) as f:
                        spec_file.extend(f.read().split('\n'))
                else:
                    spec_file.append(default)

        # files section
        spec_file.extend(
            [
                '',
                '%files -f INSTALLED_FILES',
                '%defattr(-,root,root)',
            ]
        )

        if self.doc_files:
            spec_file.append('%doc ' + ' '.join(self.doc_files))

        if self.changelog:
            spec_file.extend(
                [
                    '',
                    '%changelog',
                ]
            )
            spec_file.extend(self.changelog)

        return spec_file

    def _format_changelog(self, changelog):
        """Format the changelog correctly and convert it to a list of strings"""
        if not changelog:
            return changelog
        new_changelog = []
        for line in changelog.strip().split('\n'):
            line = line.strip()
            if line[0] == '*':
                new_changelog.extend(['', line])
            elif line[0] == '-':
                new_changelog.append(line)
            else:
                new_changelog.append('  ' + line)

        # strip trailing newline inserted by first changelog entry
        if not new_changelog[0]:
            del new_changelog[0]

        return new_changelog
PK|5Z*F{F{<Lib/site-packages/setuptools/_distutils/command/build_ext.pynuW+A"""distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP)."""

import contextlib
import os
import re
import sys
from distutils.core import Command
from distutils.errors import (
    DistutilsOptionError,
    DistutilsSetupError,
    CCompilerError,
    DistutilsError,
    CompileError,
    DistutilsPlatformError,
)
from distutils.sysconfig import customize_compiler, get_python_version
from distutils.sysconfig import get_config_h_filename
from distutils.dep_util import newer_group
from distutils.extension import Extension
from distutils.util import get_platform
from distutils import log
from . import py37compat

from site import USER_BASE

# An extension name is just a dot-separated list of Python NAMEs (ie.
# the same as a fully-qualified module name).
extension_name_re = re.compile(r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$')


def show_compilers():
    from distutils.ccompiler import show_compilers

    show_compilers()


class build_ext(Command):

    description = "build C/C++ extensions (compile/link to build directory)"

    # XXX thoughts on how to deal with complex command-line options like
    # these, i.e. how to make it so fancy_getopt can suck them off the
    # command line and make it look like setup.py defined the appropriate
    # lists of tuples of what-have-you.
    #   - each command needs a callback to process its command-line options
    #   - Command.__init__() needs access to its share of the whole
    #     command line (must ultimately come from
    #     Distribution.parse_command_line())
    #   - it then calls the current command class' option-parsing
    #     callback to deal with weird options like -D, which have to
    #     parse the option text and churn out some custom data
    #     structure
    #   - that data structure (in this case, a list of 2-tuples)
    #     will then be present in the command object by the time
    #     we get to finalize_options() (i.e. the constructor
    #     takes care of both command-line and client options
    #     in between initialize_options() and finalize_options())

    sep_by = " (separated by '%s')" % os.pathsep
    user_options = [
        ('build-lib=', 'b', "directory for compiled extension modules"),
        ('build-temp=', 't', "directory for temporary files (build by-products)"),
        (
            'plat-name=',
            'p',
            "platform name to cross-compile for, if supported "
            "(default: %s)" % get_platform(),
        ),
        (
            'inplace',
            'i',
            "ignore build-lib and put compiled extensions into the source "
            + "directory alongside your pure Python modules",
        ),
        (
            'include-dirs=',
            'I',
            "list of directories to search for header files" + sep_by,
        ),
        ('define=', 'D', "C preprocessor macros to define"),
        ('undef=', 'U', "C preprocessor macros to undefine"),
        ('libraries=', 'l', "external C libraries to link with"),
        (
            'library-dirs=',
            'L',
            "directories to search for external C libraries" + sep_by,
        ),
        ('rpath=', 'R', "directories to search for shared C libraries at runtime"),
        ('link-objects=', 'O', "extra explicit link objects to include in the link"),
        ('debug', 'g', "compile/link with debugging information"),
        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
        ('compiler=', 'c', "specify the compiler type"),
        ('parallel=', 'j', "number of parallel build jobs"),
        ('swig-cpp', None, "make SWIG create C++ files (default is C)"),
        ('swig-opts=', None, "list of SWIG command line options"),
        ('swig=', None, "path to the SWIG executable"),
        ('user', None, "add user include, library and rpath"),
    ]

    boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user']

    help_options = [
        ('help-compiler', None, "list available compilers", show_compilers),
    ]

    def initialize_options(self):
        self.extensions = None
        self.build_lib = None
        self.plat_name = None
        self.build_temp = None
        self.inplace = 0
        self.package = None

        self.include_dirs = None
        self.define = None
        self.undef = None
        self.libraries = None
        self.library_dirs = None
        self.rpath = None
        self.link_objects = None
        self.debug = None
        self.force = None
        self.compiler = None
        self.swig = None
        self.swig_cpp = None
        self.swig_opts = None
        self.user = None
        self.parallel = None

    def finalize_options(self):  # noqa: C901
        from distutils import sysconfig

        self.set_undefined_options(
            'build',
            ('build_lib', 'build_lib'),
            ('build_temp', 'build_temp'),
            ('compiler', 'compiler'),
            ('debug', 'debug'),
            ('force', 'force'),
            ('parallel', 'parallel'),
            ('plat_name', 'plat_name'),
        )

        if self.package is None:
            self.package = self.distribution.ext_package

        self.extensions = self.distribution.ext_modules

        # Make sure Python's include directories (for Python.h, pyconfig.h,
        # etc.) are in the include search path.
        py_include = sysconfig.get_python_inc()
        plat_py_include = sysconfig.get_python_inc(plat_specific=1)
        if self.include_dirs is None:
            self.include_dirs = self.distribution.include_dirs or []
        if isinstance(self.include_dirs, str):
            self.include_dirs = self.include_dirs.split(os.pathsep)

        # If in a virtualenv, add its include directory
        # Issue 16116
        if sys.exec_prefix != sys.base_exec_prefix:
            self.include_dirs.append(os.path.join(sys.exec_prefix, 'include'))

        # Put the Python "system" include dir at the end, so that
        # any local include dirs take precedence.
        self.include_dirs.extend(py_include.split(os.path.pathsep))
        if plat_py_include != py_include:
            self.include_dirs.extend(plat_py_include.split(os.path.pathsep))

        self.ensure_string_list('libraries')
        self.ensure_string_list('link_objects')

        # Life is easier if we're not forever checking for None, so
        # simplify these options to empty lists if unset
        if self.libraries is None:
            self.libraries = []
        if self.library_dirs is None:
            self.library_dirs = []
        elif isinstance(self.library_dirs, str):
            self.library_dirs = self.library_dirs.split(os.pathsep)

        if self.rpath is None:
            self.rpath = []
        elif isinstance(self.rpath, str):
            self.rpath = self.rpath.split(os.pathsep)

        # for extensions under windows use different directories
        # for Release and Debug builds.
        # also Python's library directory must be appended to library_dirs
        if os.name == 'nt':
            # the 'libs' directory is for binary installs - we assume that
            # must be the *native* platform.  But we don't really support
            # cross-compiling via a binary install anyway, so we let it go.
            self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs'))
            if sys.base_exec_prefix != sys.prefix:  # Issue 16116
                self.library_dirs.append(os.path.join(sys.base_exec_prefix, 'libs'))
            if self.debug:
                self.build_temp = os.path.join(self.build_temp, "Debug")
            else:
                self.build_temp = os.path.join(self.build_temp, "Release")

            # Append the source distribution include and library directories,
            # this allows distutils on windows to work in the source tree
            self.include_dirs.append(os.path.dirname(get_config_h_filename()))
            self.library_dirs.append(sys.base_exec_prefix)

            # Use the .lib files for the correct architecture
            if self.plat_name == 'win32':
                suffix = 'win32'
            else:
                # win-amd64
                suffix = self.plat_name[4:]
            new_lib = os.path.join(sys.exec_prefix, 'PCbuild')
            if suffix:
                new_lib = os.path.join(new_lib, suffix)
            self.library_dirs.append(new_lib)

        # For extensions under Cygwin, Python's library directory must be
        # appended to library_dirs
        if sys.platform[:6] == 'cygwin':
            if not sysconfig.python_build:
                # building third party extensions
                self.library_dirs.append(
                    os.path.join(
                        sys.prefix, "lib", "python" + get_python_version(), "config"
                    )
                )
            else:
                # building python standard extensions
                self.library_dirs.append('.')

        # For building extensions with a shared Python library,
        # Python's library directory must be appended to library_dirs
        # See Issues: #1600860, #4366
        if sysconfig.get_config_var('Py_ENABLE_SHARED'):
            if not sysconfig.python_build:
                # building third party extensions
                self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
            else:
                # building python standard extensions
                self.library_dirs.append('.')

        # The argument parsing will result in self.define being a string, but
        # it has to be a list of 2-tuples.  All the preprocessor symbols
        # specified by the 'define' option will be set to '1'.  Multiple
        # symbols can be separated with commas.

        if self.define:
            defines = self.define.split(',')
            self.define = [(symbol, '1') for symbol in defines]

        # The option for macros to undefine is also a string from the
        # option parsing, but has to be a list.  Multiple symbols can also
        # be separated with commas here.
        if self.undef:
            self.undef = self.undef.split(',')

        if self.swig_opts is None:
            self.swig_opts = []
        else:
            self.swig_opts = self.swig_opts.split(' ')

        # Finally add the user include and library directories if requested
        if self.user:
            user_include = os.path.join(USER_BASE, "include")
            user_lib = os.path.join(USER_BASE, "lib")
            if os.path.isdir(user_include):
                self.include_dirs.append(user_include)
            if os.path.isdir(user_lib):
                self.library_dirs.append(user_lib)
                self.rpath.append(user_lib)

        if isinstance(self.parallel, str):
            try:
                self.parallel = int(self.parallel)
            except ValueError:
                raise DistutilsOptionError("parallel should be an integer")

    def run(self):  # noqa: C901
        from distutils.ccompiler import new_compiler

        # 'self.extensions', as supplied by setup.py, is a list of
        # Extension instances.  See the documentation for Extension (in
        # distutils.extension) for details.
        #
        # For backwards compatibility with Distutils 0.8.2 and earlier, we
        # also allow the 'extensions' list to be a list of tuples:
        #    (ext_name, build_info)
        # where build_info is a dictionary containing everything that
        # Extension instances do except the name, with a few things being
        # differently named.  We convert these 2-tuples to Extension
        # instances as needed.

        if not self.extensions:
            return

        # If we were asked to build any C/C++ libraries, make sure that the
        # directory where we put them is in the library search path for
        # linking extensions.
        if self.distribution.has_c_libraries():
            build_clib = self.get_finalized_command('build_clib')
            self.libraries.extend(build_clib.get_library_names() or [])
            self.library_dirs.append(build_clib.build_clib)

        # Setup the CCompiler object that we'll use to do all the
        # compiling and linking
        self.compiler = new_compiler(
            compiler=self.compiler,
            verbose=self.verbose,
            dry_run=self.dry_run,
            force=self.force,
        )
        customize_compiler(self.compiler)
        # If we are cross-compiling, init the compiler now (if we are not
        # cross-compiling, init would not hurt, but people may rely on
        # late initialization of compiler even if they shouldn't...)
        if os.name == 'nt' and self.plat_name != get_platform():
            self.compiler.initialize(self.plat_name)

        # And make sure that any compile/link-related options (which might
        # come from the command-line or from the setup script) are set in
        # that CCompiler object -- that way, they automatically apply to
        # all compiling and linking done here.
        if self.include_dirs is not None:
            self.compiler.set_include_dirs(self.include_dirs)
        if self.define is not None:
            # 'define' option is a list of (name,value) tuples
            for (name, value) in self.define:
                self.compiler.define_macro(name, value)
        if self.undef is not None:
            for macro in self.undef:
                self.compiler.undefine_macro(macro)
        if self.libraries is not None:
            self.compiler.set_libraries(self.libraries)
        if self.library_dirs is not None:
            self.compiler.set_library_dirs(self.library_dirs)
        if self.rpath is not None:
            self.compiler.set_runtime_library_dirs(self.rpath)
        if self.link_objects is not None:
            self.compiler.set_link_objects(self.link_objects)

        # Now actually compile and link everything.
        self.build_extensions()

    def check_extensions_list(self, extensions):  # noqa: C901
        """Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        """
        if not isinstance(extensions, list):
            raise DistutilsSetupError(
                "'ext_modules' option must be a list of Extension instances"
            )

        for i, ext in enumerate(extensions):
            if isinstance(ext, Extension):
                continue  # OK! (assume type-checking done
                # by Extension constructor)

            if not isinstance(ext, tuple) or len(ext) != 2:
                raise DistutilsSetupError(
                    "each element of 'ext_modules' option must be an "
                    "Extension instance or 2-tuple"
                )

            ext_name, build_info = ext

            log.warn(
                "old-style (ext_name, build_info) tuple found in "
                "ext_modules for extension '%s' "
                "-- please convert to Extension instance",
                ext_name,
            )

            if not (isinstance(ext_name, str) and extension_name_re.match(ext_name)):
                raise DistutilsSetupError(
                    "first element of each tuple in 'ext_modules' "
                    "must be the extension name (a string)"
                )

            if not isinstance(build_info, dict):
                raise DistutilsSetupError(
                    "second element of each tuple in 'ext_modules' "
                    "must be a dictionary (build info)"
                )

            # OK, the (ext_name, build_info) dict is type-safe: convert it
            # to an Extension instance.
            ext = Extension(ext_name, build_info['sources'])

            # Easy stuff: one-to-one mapping from dict elements to
            # instance attributes.
            for key in (
                'include_dirs',
                'library_dirs',
                'libraries',
                'extra_objects',
                'extra_compile_args',
                'extra_link_args',
            ):
                val = build_info.get(key)
                if val is not None:
                    setattr(ext, key, val)

            # Medium-easy stuff: same syntax/semantics, different names.
            ext.runtime_library_dirs = build_info.get('rpath')
            if 'def_file' in build_info:
                log.warn("'def_file' element of build info dict " "no longer supported")

            # Non-trivial stuff: 'macros' split into 'define_macros'
            # and 'undef_macros'.
            macros = build_info.get('macros')
            if macros:
                ext.define_macros = []
                ext.undef_macros = []
                for macro in macros:
                    if not (isinstance(macro, tuple) and len(macro) in (1, 2)):
                        raise DistutilsSetupError(
                            "'macros' element of build info dict "
                            "must be 1- or 2-tuple"
                        )
                    if len(macro) == 1:
                        ext.undef_macros.append(macro[0])
                    elif len(macro) == 2:
                        ext.define_macros.append(macro)

            extensions[i] = ext

    def get_source_files(self):
        self.check_extensions_list(self.extensions)
        filenames = []

        # Wouldn't it be neat if we knew the names of header files too...
        for ext in self.extensions:
            filenames.extend(ext.sources)
        return filenames

    def get_outputs(self):
        # Sanity check the 'extensions' list -- can't assume this is being
        # done in the same run as a 'build_extensions()' call (in fact, we
        # can probably assume that it *isn't*!).
        self.check_extensions_list(self.extensions)

        # And build the list of output (built) filenames.  Note that this
        # ignores the 'inplace' flag, and assumes everything goes in the
        # "build" tree.
        outputs = []
        for ext in self.extensions:
            outputs.append(self.get_ext_fullpath(ext.name))
        return outputs

    def build_extensions(self):
        # First, sanity-check the 'extensions' list
        self.check_extensions_list(self.extensions)
        if self.parallel:
            self._build_extensions_parallel()
        else:
            self._build_extensions_serial()

    def _build_extensions_parallel(self):
        workers = self.parallel
        if self.parallel is True:
            workers = os.cpu_count()  # may return None
        try:
            from concurrent.futures import ThreadPoolExecutor
        except ImportError:
            workers = None

        if workers is None:
            self._build_extensions_serial()
            return

        with ThreadPoolExecutor(max_workers=workers) as executor:
            futures = [
                executor.submit(self.build_extension, ext) for ext in self.extensions
            ]
            for ext, fut in zip(self.extensions, futures):
                with self._filter_build_errors(ext):
                    fut.result()

    def _build_extensions_serial(self):
        for ext in self.extensions:
            with self._filter_build_errors(ext):
                self.build_extension(ext)

    @contextlib.contextmanager
    def _filter_build_errors(self, ext):
        try:
            yield
        except (CCompilerError, DistutilsError, CompileError) as e:
            if not ext.optional:
                raise
            self.warn('building extension "{}" failed: {}'.format(ext.name, e))

    def build_extension(self, ext):
        sources = ext.sources
        if sources is None or not isinstance(sources, (list, tuple)):
            raise DistutilsSetupError(
                "in 'ext_modules' option (extension '%s'), "
                "'sources' must be present and must be "
                "a list of source filenames" % ext.name
            )
        # sort to make the resulting .so file build reproducible
        sources = sorted(sources)

        ext_path = self.get_ext_fullpath(ext.name)
        depends = sources + ext.depends
        if not (self.force or newer_group(depends, ext_path, 'newer')):
            log.debug("skipping '%s' extension (up-to-date)", ext.name)
            return
        else:
            log.info("building '%s' extension", ext.name)

        # First, scan the sources for SWIG definition files (.i), run
        # SWIG on 'em to create .c files, and modify the sources list
        # accordingly.
        sources = self.swig_sources(sources, ext)

        # Next, compile the source code to object files.

        # XXX not honouring 'define_macros' or 'undef_macros' -- the
        # CCompiler API needs to change to accommodate this, and I
        # want to do one thing at a time!

        # Two possible sources for extra compiler arguments:
        #   - 'extra_compile_args' in Extension object
        #   - CFLAGS environment variable (not particularly
        #     elegant, but people seem to expect it and I
        #     guess it's useful)
        # The environment variable should take precedence, and
        # any sensible compiler will give precedence to later
        # command line args.  Hence we combine them in order:
        extra_args = ext.extra_compile_args or []

        macros = ext.define_macros[:]
        for undef in ext.undef_macros:
            macros.append((undef,))

        objects = self.compiler.compile(
            sources,
            output_dir=self.build_temp,
            macros=macros,
            include_dirs=ext.include_dirs,
            debug=self.debug,
            extra_postargs=extra_args,
            depends=ext.depends,
        )

        # XXX outdated variable, kept here in case third-part code
        # needs it.
        self._built_objects = objects[:]

        # Now link the object files together into a "shared object" --
        # of course, first we have to figure out all the other things
        # that go into the mix.
        if ext.extra_objects:
            objects.extend(ext.extra_objects)
        extra_args = ext.extra_link_args or []

        # Detect target language, if not provided
        language = ext.language or self.compiler.detect_language(sources)

        self.compiler.link_shared_object(
            objects,
            ext_path,
            libraries=self.get_libraries(ext),
            library_dirs=ext.library_dirs,
            runtime_library_dirs=ext.runtime_library_dirs,
            extra_postargs=extra_args,
            export_symbols=self.get_export_symbols(ext),
            debug=self.debug,
            build_temp=self.build_temp,
            target_lang=language,
        )

    def swig_sources(self, sources, extension):
        """Walk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        """
        new_sources = []
        swig_sources = []
        swig_targets = {}

        # XXX this drops generated C/C++ files into the source tree, which
        # is fine for developers who want to distribute the generated
        # source -- but there should be an option to put SWIG output in
        # the temp dir.

        if self.swig_cpp:
            log.warn("--swig-cpp is deprecated - use --swig-opts=-c++")

        if (
            self.swig_cpp
            or ('-c++' in self.swig_opts)
            or ('-c++' in extension.swig_opts)
        ):
            target_ext = '.cpp'
        else:
            target_ext = '.c'

        for source in sources:
            (base, ext) = os.path.splitext(source)
            if ext == ".i":  # SWIG interface file
                new_sources.append(base + '_wrap' + target_ext)
                swig_sources.append(source)
                swig_targets[source] = new_sources[-1]
            else:
                new_sources.append(source)

        if not swig_sources:
            return new_sources

        swig = self.swig or self.find_swig()
        swig_cmd = [swig, "-python"]
        swig_cmd.extend(self.swig_opts)
        if self.swig_cpp:
            swig_cmd.append("-c++")

        # Do not override commandline arguments
        if not self.swig_opts:
            for o in extension.swig_opts:
                swig_cmd.append(o)

        for source in swig_sources:
            target = swig_targets[source]
            log.info("swigging %s to %s", source, target)
            self.spawn(swig_cmd + ["-o", target, source])

        return new_sources

    def find_swig(self):
        """Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        """
        if os.name == "posix":
            return "swig"
        elif os.name == "nt":
            # Look for SWIG in its standard installation directory on
            # Windows (or so I presume!).  If we find it there, great;
            # if not, act like Unix and assume it's in the PATH.
            for vers in ("1.3", "1.2", "1.1"):
                fn = os.path.join("c:\\swig%s" % vers, "swig.exe")
                if os.path.isfile(fn):
                    return fn
            else:
                return "swig.exe"
        else:
            raise DistutilsPlatformError(
                "I don't know how to find (much less run) SWIG "
                "on platform '%s'" % os.name
            )

    # -- Name generators -----------------------------------------------
    # (extension names, filenames, whatever)
    def get_ext_fullpath(self, ext_name):
        """Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        """
        fullname = self.get_ext_fullname(ext_name)
        modpath = fullname.split('.')
        filename = self.get_ext_filename(modpath[-1])

        if not self.inplace:
            # no further work needed
            # returning :
            #   build_dir/package/path/filename
            filename = os.path.join(*modpath[:-1] + [filename])
            return os.path.join(self.build_lib, filename)

        # the inplace option requires to find the package directory
        # using the build_py command for that
        package = '.'.join(modpath[0:-1])
        build_py = self.get_finalized_command('build_py')
        package_dir = os.path.abspath(build_py.get_package_dir(package))

        # returning
        #   package_dir/filename
        return os.path.join(package_dir, filename)

    def get_ext_fullname(self, ext_name):
        """Returns the fullname of a given extension name.

        Adds the `package.` prefix"""
        if self.package is None:
            return ext_name
        else:
            return self.package + '.' + ext_name

    def get_ext_filename(self, ext_name):
        r"""Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        """
        from distutils.sysconfig import get_config_var

        ext_path = ext_name.split('.')
        ext_suffix = get_config_var('EXT_SUFFIX')
        return os.path.join(*ext_path) + ext_suffix

    def get_export_symbols(self, ext):
        """Return the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "PyInit_" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "PyInit_" function.
        """
        name = ext.name.split('.')[-1]
        try:
            # Unicode module name support as defined in PEP-489
            # https://www.python.org/dev/peps/pep-0489/#export-hook-name
            name.encode('ascii')
        except UnicodeEncodeError:
            suffix = 'U_' + name.encode('punycode').replace(b'-', b'_').decode('ascii')
        else:
            suffix = "_" + name

        initfunc_name = "PyInit" + suffix
        if initfunc_name not in ext.export_symbols:
            ext.export_symbols.append(initfunc_name)
        return ext.export_symbols

    def get_libraries(self, ext):  # noqa: C901
        """Return the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows, we add the Python library (eg. python20.dll).
        """
        # The python library is always needed on Windows.  For MSVC, this
        # is redundant, since the library is mentioned in a pragma in
        # pyconfig.h that MSVC groks.  The other Windows compilers all seem
        # to need it mentioned explicitly, though, so that's what we do.
        # Append '_d' to the python import library on debug builds.
        if sys.platform == "win32":
            from distutils._msvccompiler import MSVCCompiler

            if not isinstance(self.compiler, MSVCCompiler):
                template = "python%d%d"
                if self.debug:
                    template = template + '_d'
                pythonlib = template % (
                    sys.hexversion >> 24,
                    (sys.hexversion >> 16) & 0xFF,
                )
                # don't extend ext.libraries, it may be shared with other
                # extensions, it is a reference to the original list
                return ext.libraries + [pythonlib]
        else:
            # On Android only the main executable and LD_PRELOADs are considered
            # to be RTLD_GLOBAL, all the dependencies of the main executable
            # remain RTLD_LOCAL and so the shared libraries must be linked with
            # libpython when python is built with a shared python library (issue
            # bpo-21536).
            # On Cygwin (and if required, other POSIX-like platforms based on
            # Windows like MinGW) it is simply necessary that all symbols in
            # shared libraries are resolved at link time.
            from distutils.sysconfig import get_config_var

            link_libpython = False
            if get_config_var('Py_ENABLE_SHARED'):
                # A native build on an Android device or on Cygwin
                if hasattr(sys, 'getandroidapilevel'):
                    link_libpython = True
                elif sys.platform == 'cygwin':
                    link_libpython = True
                elif '_PYTHON_HOST_PLATFORM' in os.environ:
                    # We are cross-compiling for one of the relevant platforms
                    if get_config_var('ANDROID_API_LEVEL') != 0:
                        link_libpython = True
                    elif get_config_var('MACHDEP') == 'cygwin':
                        link_libpython = True

            if link_libpython:
                ldversion = get_config_var('LDVERSION')
                return ext.libraries + ['python' + ldversion]

        return ext.libraries + py37compat.pythonlib()
PK|5ZteiFF/Lib/site-packages/setuptools/_distutils/util.pynuW+A"""distutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
"""

import importlib.util
import os
import re
import string
import subprocess
import sys
import sysconfig
import functools

from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError
from distutils.dep_util import newer
from distutils.spawn import spawn
from distutils import log


def get_host_platform():
    """
    Return a string that identifies the current platform. Use this
    function to distinguish platform-specific build directories and
    platform-specific built distributions.
    """

    # This function initially exposed platforms as defined in Python 3.9
    # even with older Python versions when distutils was split out.
    # Now it delegates to stdlib sysconfig, but maintains compatibility.

    if sys.version_info < (3, 8):
        if os.name == 'nt':
            if '(arm)' in sys.version.lower():
                return 'win-arm32'
            if '(arm64)' in sys.version.lower():
                return 'win-arm64'

    if sys.version_info < (3, 9):
        if os.name == "posix" and hasattr(os, 'uname'):
            osname, host, release, version, machine = os.uname()
            if osname[:3] == "aix":
                from .py38compat import aix_platform

                return aix_platform(osname, version, release)

    return sysconfig.get_platform()


def get_platform():
    if os.name == 'nt':
        TARGET_TO_PLAT = {
            'x86': 'win32',
            'x64': 'win-amd64',
            'arm': 'win-arm32',
            'arm64': 'win-arm64',
        }
        target = os.environ.get('VSCMD_ARG_TGT_ARCH')
        return TARGET_TO_PLAT.get(target) or get_host_platform()
    return get_host_platform()


if sys.platform == 'darwin':
    _syscfg_macosx_ver = None  # cache the version pulled from sysconfig
MACOSX_VERSION_VAR = 'MACOSX_DEPLOYMENT_TARGET'


def _clear_cached_macosx_ver():
    """For testing only. Do not call."""
    global _syscfg_macosx_ver
    _syscfg_macosx_ver = None


def get_macosx_target_ver_from_syscfg():
    """Get the version of macOS latched in the Python interpreter configuration.
    Returns the version as a string or None if can't obtain one. Cached."""
    global _syscfg_macosx_ver
    if _syscfg_macosx_ver is None:
        from distutils import sysconfig

        ver = sysconfig.get_config_var(MACOSX_VERSION_VAR) or ''
        if ver:
            _syscfg_macosx_ver = ver
    return _syscfg_macosx_ver


def get_macosx_target_ver():
    """Return the version of macOS for which we are building.

    The target version defaults to the version in sysconfig latched at time
    the Python interpreter was built, unless overridden by an environment
    variable. If neither source has a value, then None is returned"""

    syscfg_ver = get_macosx_target_ver_from_syscfg()
    env_ver = os.environ.get(MACOSX_VERSION_VAR)

    if env_ver:
        # Validate overridden version against sysconfig version, if have both.
        # Ensure that the deployment target of the build process is not less
        # than 10.3 if the interpreter was built for 10.3 or later.  This
        # ensures extension modules are built with correct compatibility
        # values, specifically LDSHARED which can use
        # '-undefined dynamic_lookup' which only works on >= 10.3.
        if (
            syscfg_ver
            and split_version(syscfg_ver) >= [10, 3]
            and split_version(env_ver) < [10, 3]
        ):
            my_msg = (
                '$' + MACOSX_VERSION_VAR + ' mismatch: '
                'now "%s" but "%s" during configure; '
                'must use 10.3 or later' % (env_ver, syscfg_ver)
            )
            raise DistutilsPlatformError(my_msg)
        return env_ver
    return syscfg_ver


def split_version(s):
    """Convert a dot-separated string into a list of numbers for comparisons"""
    return [int(n) for n in s.split('.')]


def convert_path(pathname):
    """Return 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    """
    if os.sep == '/':
        return pathname
    if not pathname:
        return pathname
    if pathname[0] == '/':
        raise ValueError("path '%s' cannot be absolute" % pathname)
    if pathname[-1] == '/':
        raise ValueError("path '%s' cannot end with '/'" % pathname)

    paths = pathname.split('/')
    while '.' in paths:
        paths.remove('.')
    if not paths:
        return os.curdir
    return os.path.join(*paths)


# convert_path ()


def change_root(new_root, pathname):
    """Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    """
    if os.name == 'posix':
        if not os.path.isabs(pathname):
            return os.path.join(new_root, pathname)
        else:
            return os.path.join(new_root, pathname[1:])

    elif os.name == 'nt':
        (drive, path) = os.path.splitdrive(pathname)
        if path[0] == '\\':
            path = path[1:]
        return os.path.join(new_root, path)

    raise DistutilsPlatformError(f"nothing known about platform '{os.name}'")


@functools.lru_cache()
def check_environ():
    """Ensure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    """
    if os.name == 'posix' and 'HOME' not in os.environ:
        try:
            import pwd

            os.environ['HOME'] = pwd.getpwuid(os.getuid())[5]
        except (ImportError, KeyError):
            # bpo-10496: if the current user identifier doesn't exist in the
            # password database, do nothing
            pass

    if 'PLAT' not in os.environ:
        os.environ['PLAT'] = get_platform()


def subst_vars(s, local_vars):
    """
    Perform variable substitution on 'string'.
    Variables are indicated by format-style braces ("{var}").
    Variable is substituted by the value found in the 'local_vars'
    dictionary or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    """
    check_environ()
    lookup = dict(os.environ)
    lookup.update((name, str(value)) for name, value in local_vars.items())
    try:
        return _subst_compat(s).format_map(lookup)
    except KeyError as var:
        raise ValueError(f"invalid variable {var}")


def _subst_compat(s):
    """
    Replace shell/Perl-style variable substitution with
    format-style. For compatibility.
    """

    def _subst(match):
        return f'{{{match.group(1)}}}'

    repl = re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s)
    if repl != s:
        import warnings

        warnings.warn(
            "shell/Perl-style substitions are deprecated",
            DeprecationWarning,
        )
    return repl


def grok_environment_error(exc, prefix="error: "):
    # Function kept for backward compatibility.
    # Used to try clever things with EnvironmentErrors,
    # but nowadays str(exception) produces good messages.
    return prefix + str(exc)


# Needed by 'split_quoted()'
_wordchars_re = _squote_re = _dquote_re = None


def _init_regex():
    global _wordchars_re, _squote_re, _dquote_re
    _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
    _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
    _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"')


def split_quoted(s):
    """Split a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    """

    # This is a nice algorithm for splitting up a single string, since it
    # doesn't require character-by-character examination.  It was a little
    # bit of a brain-bender to get it working right, though...
    if _wordchars_re is None:
        _init_regex()

    s = s.strip()
    words = []
    pos = 0

    while s:
        m = _wordchars_re.match(s, pos)
        end = m.end()
        if end == len(s):
            words.append(s[:end])
            break

        if s[end] in string.whitespace:
            # unescaped, unquoted whitespace: now
            # we definitely have a word delimiter
            words.append(s[:end])
            s = s[end:].lstrip()
            pos = 0

        elif s[end] == '\\':
            # preserve whatever is being escaped;
            # will become part of the current word
            s = s[:end] + s[end + 1 :]
            pos = end + 1

        else:
            if s[end] == "'":  # slurp singly-quoted string
                m = _squote_re.match(s, end)
            elif s[end] == '"':  # slurp doubly-quoted string
                m = _dquote_re.match(s, end)
            else:
                raise RuntimeError("this can't happen (bad char '%c')" % s[end])

            if m is None:
                raise ValueError("bad string (mismatched %s quotes?)" % s[end])

            (beg, end) = m.span()
            s = s[:beg] + s[beg + 1 : end - 1] + s[end:]
            pos = m.end() - 2

        if pos >= len(s):
            words.append(s)
            break

    return words


# split_quoted ()


def execute(func, args, msg=None, verbose=0, dry_run=0):
    """Perform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    """
    if msg is None:
        msg = "{}{!r}".format(func.__name__, args)
        if msg[-2:] == ',)':  # correct for singleton tuple
            msg = msg[0:-2] + ')'

    log.info(msg)
    if not dry_run:
        func(*args)


def strtobool(val):
    """Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    """
    val = val.lower()
    if val in ('y', 'yes', 't', 'true', 'on', '1'):
        return 1
    elif val in ('n', 'no', 'f', 'false', 'off', '0'):
        return 0
    else:
        raise ValueError("invalid truth value {!r}".format(val))


def byte_compile(  # noqa: C901
    py_files,
    optimize=0,
    force=0,
    prefix=None,
    base_dir=None,
    verbose=1,
    dry_run=0,
    direct=None,
):
    """Byte-compile a collection of Python source files to .pyc
    files in a __pycache__ subdirectory.  'py_files' is a list
    of files to compile; any files that don't end in ".py" are silently
    skipped.  'optimize' must be one of the following:
      0 - don't optimize
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    """

    # nothing is done if sys.dont_write_bytecode is True
    if sys.dont_write_bytecode:
        raise DistutilsByteCompileError('byte-compiling is disabled.')

    # First, if the caller didn't force us into direct or indirect mode,
    # figure out which mode we should be in.  We take a conservative
    # approach: choose direct mode *only* if the current interpreter is
    # in debug mode and optimize is 0.  If we're not in debug mode (-O
    # or -OO), we don't know which level of optimization this
    # interpreter is running with, so we can't do direct
    # byte-compilation and be certain that it's the right thing.  Thus,
    # always compile indirectly if the current interpreter is in either
    # optimize mode, or if either optimization level was requested by
    # the caller.
    if direct is None:
        direct = __debug__ and optimize == 0

    # "Indirect" byte-compilation: write a temporary script and then
    # run it with the appropriate flags.
    if not direct:
        try:
            from tempfile import mkstemp

            (script_fd, script_name) = mkstemp(".py")
        except ImportError:
            from tempfile import mktemp

            (script_fd, script_name) = None, mktemp(".py")
        log.info("writing byte-compilation script '%s'", script_name)
        if not dry_run:
            if script_fd is not None:
                script = os.fdopen(script_fd, "w")
            else:
                script = open(script_name, "w")

            with script:
                script.write(
                    """\
from distutils.util import byte_compile
files = [
"""
                )

                # XXX would be nice to write absolute filenames, just for
                # safety's sake (script should be more robust in the face of
                # chdir'ing before running it).  But this requires abspath'ing
                # 'prefix' as well, and that breaks the hack in build_lib's
                # 'byte_compile()' method that carefully tacks on a trailing
                # slash (os.sep really) to make sure the prefix here is "just
                # right".  This whole prefix business is rather delicate -- the
                # problem is that it's really a directory, but I'm treating it
                # as a dumb string, so trailing slashes and so forth matter.

                script.write(",\n".join(map(repr, py_files)) + "]\n")
                script.write(
                    """
byte_compile(files, optimize=%r, force=%r,
             prefix=%r, base_dir=%r,
             verbose=%r, dry_run=0,
             direct=1)
"""
                    % (optimize, force, prefix, base_dir, verbose)
                )

        cmd = [sys.executable]
        cmd.extend(subprocess._optim_args_from_interpreter_flags())
        cmd.append(script_name)
        spawn(cmd, dry_run=dry_run)
        execute(os.remove, (script_name,), "removing %s" % script_name, dry_run=dry_run)

    # "Direct" byte-compilation: use the py_compile module to compile
    # right here, right now.  Note that the script generated in indirect
    # mode simply calls 'byte_compile()' in direct mode, a weird sort of
    # cross-process recursion.  Hey, it works!
    else:
        from py_compile import compile

        for file in py_files:
            if file[-3:] != ".py":
                # This lets us be lazy and not filter filenames in
                # the "install_lib" command.
                continue

            # Terminology from the py_compile module:
            #   cfile - byte-compiled file
            #   dfile - purported source filename (same as 'file' by default)
            if optimize >= 0:
                opt = '' if optimize == 0 else optimize
                cfile = importlib.util.cache_from_source(file, optimization=opt)
            else:
                cfile = importlib.util.cache_from_source(file)
            dfile = file
            if prefix:
                if file[: len(prefix)] != prefix:
                    raise ValueError(
                        "invalid prefix: filename %r doesn't start with %r"
                        % (file, prefix)
                    )
                dfile = dfile[len(prefix) :]
            if base_dir:
                dfile = os.path.join(base_dir, dfile)

            cfile_base = os.path.basename(cfile)
            if direct:
                if force or newer(file, cfile):
                    log.info("byte-compiling %s to %s", file, cfile_base)
                    if not dry_run:
                        compile(file, cfile, dfile)
                else:
                    log.debug("skipping byte-compilation of %s to %s", file, cfile_base)


def rfc822_escape(header):
    """Return a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    """
    lines = header.split('\n')
    sep = '\n' + 8 * ' '
    return sep.join(lines)
PK|5ZF881Lib/site-packages/setuptools/_distutils/config.pynuW+A"""distutils.pypirc

Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
"""
import os
from configparser import RawConfigParser

from distutils.cmd import Command

DEFAULT_PYPIRC = """\
[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
"""


class PyPIRCCommand(Command):
    """Base command that knows how to handle the .pypirc file"""

    DEFAULT_REPOSITORY = 'https://upload.pypi.org/legacy/'
    DEFAULT_REALM = 'pypi'
    repository = None
    realm = None

    user_options = [
        ('repository=', 'r', "url of repository [default: %s]" % DEFAULT_REPOSITORY),
        ('show-response', None, 'display full response text from server'),
    ]

    boolean_options = ['show-response']

    def _get_rc_file(self):
        """Returns rc file path."""
        return os.path.join(os.path.expanduser('~'), '.pypirc')

    def _store_pypirc(self, username, password):
        """Creates a default .pypirc file."""
        rc = self._get_rc_file()
        with os.fdopen(os.open(rc, os.O_CREAT | os.O_WRONLY, 0o600), 'w') as f:
            f.write(DEFAULT_PYPIRC % (username, password))

    def _read_pypirc(self):  # noqa: C901
        """Reads the .pypirc file."""
        rc = self._get_rc_file()
        if os.path.exists(rc):
            self.announce('Using PyPI login from %s' % rc)
            repository = self.repository or self.DEFAULT_REPOSITORY

            config = RawConfigParser()
            config.read(rc)
            sections = config.sections()
            if 'distutils' in sections:
                # let's get the list of servers
                index_servers = config.get('distutils', 'index-servers')
                _servers = [
                    server.strip()
                    for server in index_servers.split('\n')
                    if server.strip() != ''
                ]
                if _servers == []:
                    # nothing set, let's try to get the default pypi
                    if 'pypi' in sections:
                        _servers = ['pypi']
                    else:
                        # the file is not properly defined, returning
                        # an empty dict
                        return {}
                for server in _servers:
                    current = {'server': server}
                    current['username'] = config.get(server, 'username')

                    # optional params
                    for key, default in (
                        ('repository', self.DEFAULT_REPOSITORY),
                        ('realm', self.DEFAULT_REALM),
                        ('password', None),
                    ):
                        if config.has_option(server, key):
                            current[key] = config.get(server, key)
                        else:
                            current[key] = default

                    # work around people having "repository" for the "pypi"
                    # section of their config set to the HTTP (rather than
                    # HTTPS) URL
                    if server == 'pypi' and repository in (
                        self.DEFAULT_REPOSITORY,
                        'pypi',
                    ):
                        current['repository'] = self.DEFAULT_REPOSITORY
                        return current

                    if (
                        current['server'] == repository
                        or current['repository'] == repository
                    ):
                        return current
            elif 'server-login' in sections:
                # old format
                server = 'server-login'
                if config.has_option(server, 'repository'):
                    repository = config.get(server, 'repository')
                else:
                    repository = self.DEFAULT_REPOSITORY
                return {
                    'username': config.get(server, 'username'),
                    'password': config.get(server, 'password'),
                    'repository': repository,
                    'server': server,
                    'realm': self.DEFAULT_REALM,
                }

        return {}

    def _read_pypi_response(self, response):
        """Read and decode a PyPI HTTP response."""
        import cgi

        content_type = response.getheader('content-type', 'text/plain')
        encoding = cgi.parse_header(content_type)[1].get('charset', 'ascii')
        return response.read().decode(encoding)

    def initialize_options(self):
        """Initialize options."""
        self.repository = None
        self.realm = None
        self.show_response = 0

    def finalize_options(self):
        """Finalizes options."""
        if self.repository is None:
            self.repository = self.DEFAULT_REPOSITORY
        if self.realm is None:
            self.realm = self.DEFAULT_REALM
PK|5ZdX1Lib/site-packages/setuptools/_distutils/errors.pynuW+A"""distutils.errors

Provides exceptions used by the Distutils modules.  Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).

This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error"."""


class DistutilsError(Exception):
    """The root of all Distutils evil."""

    pass


class DistutilsModuleError(DistutilsError):
    """Unable to load an expected module, or to find an expected class
    within some module (in particular, command modules and classes)."""

    pass


class DistutilsClassError(DistutilsError):
    """Some command class (or possibly distribution class, if anyone
    feels a need to subclass Distribution) is found not to be holding
    up its end of the bargain, ie. implementing some part of the
    "command "interface."""

    pass


class DistutilsGetoptError(DistutilsError):
    """The option table provided to 'fancy_getopt()' is bogus."""

    pass


class DistutilsArgError(DistutilsError):
    """Raised by fancy_getopt in response to getopt.error -- ie. an
    error in the command line usage."""

    pass


class DistutilsFileError(DistutilsError):
    """Any problems in the filesystem: expected file not found, etc.
    Typically this is for problems that we detect before OSError
    could be raised."""

    pass


class DistutilsOptionError(DistutilsError):
    """Syntactic/semantic errors in command options, such as use of
    mutually conflicting options, or inconsistent options,
    badly-spelled values, etc.  No distinction is made between option
    values originating in the setup script, the command line, config
    files, or what-have-you -- but if we *know* something originated in
    the setup script, we'll raise DistutilsSetupError instead."""

    pass


class DistutilsSetupError(DistutilsError):
    """For errors that can be definitely blamed on the setup script,
    such as invalid keyword arguments to 'setup()'."""

    pass


class DistutilsPlatformError(DistutilsError):
    """We don't know how to do something on the current platform (but
    we do know how to do it on some platform) -- eg. trying to compile
    C files on a platform not supported by a CCompiler subclass."""

    pass


class DistutilsExecError(DistutilsError):
    """Any problems executing an external program (such as the C
    compiler, when compiling C files)."""

    pass


class DistutilsInternalError(DistutilsError):
    """Internal inconsistencies or impossibilities (obviously, this
    should never be seen if the code is working!)."""

    pass


class DistutilsTemplateError(DistutilsError):
    """Syntax error in a file list template."""


class DistutilsByteCompileError(DistutilsError):
    """Byte compile error."""


# Exception classes used by the CCompiler implementation classes
class CCompilerError(Exception):
    """Some compile/link operation failed."""


class PreprocessError(CCompilerError):
    """Failure to preprocess one or more C/C++ files."""


class CompileError(CCompilerError):
    """Failure to compile one or more C/C++ source files."""


class LibError(CCompilerError):
    """Failure to create a static library from one or more C/C++ object
    files."""


class LinkError(CCompilerError):
    """Failure to link one or more C/C++ object files into an executable
    or shared library file."""


class UnknownFileError(CCompilerError):
    """Attempt to process an unknown file type."""
PK|5Z];F8Lib/site-packages/setuptools/_distutils/_macos_compat.pynuW+Aimport sys
import importlib


def bypass_compiler_fixup(cmd, args):
    return cmd


if sys.platform == 'darwin':
    compiler_fixup = importlib.import_module('_osx_support').compiler_fixup
else:
    compiler_fixup = bypass_compiler_fixup
PK|5ZAvv8Lib/site-packages/setuptools/_distutils/msvc9compiler.pynuW+A"""distutils.msvc9compiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.

The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
"""

# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
#   finding DevStudio (through the registry)
# ported to VS2005 and VS 2008 by Christian Heimes

import os
import subprocess
import sys
import re
import warnings

from distutils.errors import (
    DistutilsExecError,
    DistutilsPlatformError,
    CompileError,
    LibError,
    LinkError,
)
from distutils.ccompiler import CCompiler, gen_lib_options
from distutils import log
from distutils.util import get_platform

import winreg

warnings.warn(
    "msvc9compiler is deprecated and slated to be removed "
    "in the future. Please discontinue use or file an issue "
    "with pypa/distutils describing your use case.",
    DeprecationWarning,
)

RegOpenKeyEx = winreg.OpenKeyEx
RegEnumKey = winreg.EnumKey
RegEnumValue = winreg.EnumValue
RegError = winreg.error

HKEYS = (
    winreg.HKEY_USERS,
    winreg.HKEY_CURRENT_USER,
    winreg.HKEY_LOCAL_MACHINE,
    winreg.HKEY_CLASSES_ROOT,
)

NATIVE_WIN64 = sys.platform == 'win32' and sys.maxsize > 2**32
if NATIVE_WIN64:
    # Visual C++ is a 32-bit application, so we need to look in
    # the corresponding registry branch, if we're running a
    # 64-bit Python on Win64
    VS_BASE = r"Software\Wow6432Node\Microsoft\VisualStudio\%0.1f"
    WINSDK_BASE = r"Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows"
    NET_BASE = r"Software\Wow6432Node\Microsoft\.NETFramework"
else:
    VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
    WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
    NET_BASE = r"Software\Microsoft\.NETFramework"

# A map keyed by get_platform() return values to values accepted by
# 'vcvarsall.bat'.  Note a cross-compile may combine these (eg, 'x86_amd64' is
# the param to cross-compile on x86 targeting amd64.)
PLAT_TO_VCVARS = {
    'win32': 'x86',
    'win-amd64': 'amd64',
}


class Reg:
    """Helper class to read values from the registry"""

    def get_value(cls, path, key):
        for base in HKEYS:
            d = cls.read_values(base, path)
            if d and key in d:
                return d[key]
        raise KeyError(key)

    get_value = classmethod(get_value)

    def read_keys(cls, base, key):
        """Return list of registry keys."""
        try:
            handle = RegOpenKeyEx(base, key)
        except RegError:
            return None
        L = []
        i = 0
        while True:
            try:
                k = RegEnumKey(handle, i)
            except RegError:
                break
            L.append(k)
            i += 1
        return L

    read_keys = classmethod(read_keys)

    def read_values(cls, base, key):
        """Return dict of registry keys and values.

        All names are converted to lowercase.
        """
        try:
            handle = RegOpenKeyEx(base, key)
        except RegError:
            return None
        d = {}
        i = 0
        while True:
            try:
                name, value, type = RegEnumValue(handle, i)
            except RegError:
                break
            name = name.lower()
            d[cls.convert_mbcs(name)] = cls.convert_mbcs(value)
            i += 1
        return d

    read_values = classmethod(read_values)

    def convert_mbcs(s):
        dec = getattr(s, "decode", None)
        if dec is not None:
            try:
                s = dec("mbcs")
            except UnicodeError:
                pass
        return s

    convert_mbcs = staticmethod(convert_mbcs)


class MacroExpander:
    def __init__(self, version):
        self.macros = {}
        self.vsbase = VS_BASE % version
        self.load_macros(version)

    def set_macro(self, macro, path, key):
        self.macros["$(%s)" % macro] = Reg.get_value(path, key)

    def load_macros(self, version):
        self.set_macro("VCInstallDir", self.vsbase + r"\Setup\VC", "productdir")
        self.set_macro("VSInstallDir", self.vsbase + r"\Setup\VS", "productdir")
        self.set_macro("FrameworkDir", NET_BASE, "installroot")
        try:
            if version >= 8.0:
                self.set_macro("FrameworkSDKDir", NET_BASE, "sdkinstallrootv2.0")
            else:
                raise KeyError("sdkinstallrootv2.0")
        except KeyError:
            raise DistutilsPlatformError(
                """Python was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py."""
            )

        if version >= 9.0:
            self.set_macro("FrameworkVersion", self.vsbase, "clr version")
            self.set_macro("WindowsSdkDir", WINSDK_BASE, "currentinstallfolder")
        else:
            p = r"Software\Microsoft\NET Framework Setup\Product"
            for base in HKEYS:
                try:
                    h = RegOpenKeyEx(base, p)
                except RegError:
                    continue
                key = RegEnumKey(h, 0)
                d = Reg.get_value(base, r"{}\{}".format(p, key))
                self.macros["$(FrameworkVersion)"] = d["version"]

    def sub(self, s):
        for k, v in self.macros.items():
            s = s.replace(k, v)
        return s


def get_build_version():
    """Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    """
    prefix = "MSC v."
    i = sys.version.find(prefix)
    if i == -1:
        return 6
    i = i + len(prefix)
    s, rest = sys.version[i:].split(" ", 1)
    majorVersion = int(s[:-2]) - 6
    if majorVersion >= 13:
        # v13 was skipped and should be v14
        majorVersion += 1
    minorVersion = int(s[2:3]) / 10.0
    # I don't think paths are affected by minor version in version 6
    if majorVersion == 6:
        minorVersion = 0
    if majorVersion >= 6:
        return majorVersion + minorVersion
    # else we don't know what version of the compiler this is
    return None


def normalize_and_reduce_paths(paths):
    """Return a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    """
    # Paths are normalized so things like:  /a and /a/ aren't both preserved.
    reduced_paths = []
    for p in paths:
        np = os.path.normpath(p)
        # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set.
        if np not in reduced_paths:
            reduced_paths.append(np)
    return reduced_paths


def removeDuplicates(variable):
    """Remove duplicate values of an environment variable."""
    oldList = variable.split(os.pathsep)
    newList = []
    for i in oldList:
        if i not in newList:
            newList.append(i)
    newVariable = os.pathsep.join(newList)
    return newVariable


def find_vcvarsall(version):
    """Find the vcvarsall.bat file

    At first it tries to find the productdir of VS 2008 in the registry. If
    that fails it falls back to the VS90COMNTOOLS env var.
    """
    vsbase = VS_BASE % version
    try:
        productdir = Reg.get_value(r"%s\Setup\VC" % vsbase, "productdir")
    except KeyError:
        log.debug("Unable to find productdir in registry")
        productdir = None

    if not productdir or not os.path.isdir(productdir):
        toolskey = "VS%0.f0COMNTOOLS" % version
        toolsdir = os.environ.get(toolskey, None)

        if toolsdir and os.path.isdir(toolsdir):
            productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC")
            productdir = os.path.abspath(productdir)
            if not os.path.isdir(productdir):
                log.debug("%s is not a valid directory" % productdir)
                return None
        else:
            log.debug("Env var %s is not set or invalid" % toolskey)
    if not productdir:
        log.debug("No productdir found")
        return None
    vcvarsall = os.path.join(productdir, "vcvarsall.bat")
    if os.path.isfile(vcvarsall):
        return vcvarsall
    log.debug("Unable to find vcvarsall.bat")
    return None


def query_vcvarsall(version, arch="x86"):
    """Launch vcvarsall.bat and read the settings from its environment"""
    vcvarsall = find_vcvarsall(version)
    interesting = {"include", "lib", "libpath", "path"}
    result = {}

    if vcvarsall is None:
        raise DistutilsPlatformError("Unable to find vcvarsall.bat")
    log.debug("Calling 'vcvarsall.bat %s' (version=%s)", arch, version)
    popen = subprocess.Popen(
        '"{}" {} & set'.format(vcvarsall, arch),
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
    )
    try:
        stdout, stderr = popen.communicate()
        if popen.wait() != 0:
            raise DistutilsPlatformError(stderr.decode("mbcs"))

        stdout = stdout.decode("mbcs")
        for line in stdout.split("\n"):
            line = Reg.convert_mbcs(line)
            if '=' not in line:
                continue
            line = line.strip()
            key, value = line.split('=', 1)
            key = key.lower()
            if key in interesting:
                if value.endswith(os.pathsep):
                    value = value[:-1]
                result[key] = removeDuplicates(value)

    finally:
        popen.stdout.close()
        popen.stderr.close()

    if len(result) != len(interesting):
        raise ValueError(str(list(result.keys())))

    return result


# More globals
VERSION = get_build_version()
# MACROS = MacroExpander(VERSION)


class MSVCCompiler(CCompiler):
    """Concrete class that implements an interface to Microsoft Visual C++,
    as defined by the CCompiler abstract class."""

    compiler_type = 'msvc'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']
    _rc_extensions = ['.rc']
    _mc_extensions = ['.mc']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = _c_extensions + _cpp_extensions + _rc_extensions + _mc_extensions
    res_extension = '.res'
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'

    def __init__(self, verbose=0, dry_run=0, force=0):
        super().__init__(verbose, dry_run, force)
        self.__version = VERSION
        self.__root = r"Software\Microsoft\VisualStudio"
        # self.__macros = MACROS
        self.__paths = []
        # target platform (.plat_name is consistent with 'bdist')
        self.plat_name = None
        self.__arch = None  # deprecated name
        self.initialized = False

    def initialize(self, plat_name=None):  # noqa: C901
        # multi-init means we would need to check platform same each time...
        assert not self.initialized, "don't init multiple times"
        if self.__version < 8.0:
            raise DistutilsPlatformError(
                "VC %0.1f is not supported by this module" % self.__version
            )
        if plat_name is None:
            plat_name = get_platform()
        # sanity check for platforms to prevent obscure errors later.
        ok_plats = 'win32', 'win-amd64'
        if plat_name not in ok_plats:
            raise DistutilsPlatformError(
                "--plat-name must be one of {}".format(ok_plats)
            )

        if (
            "DISTUTILS_USE_SDK" in os.environ
            and "MSSdk" in os.environ
            and self.find_exe("cl.exe")
        ):
            # Assume that the SDK set up everything alright; don't try to be
            # smarter
            self.cc = "cl.exe"
            self.linker = "link.exe"
            self.lib = "lib.exe"
            self.rc = "rc.exe"
            self.mc = "mc.exe"
        else:
            # On x86, 'vcvars32.bat amd64' creates an env that doesn't work;
            # to cross compile, you use 'x86_amd64'.
            # On AMD64, 'vcvars32.bat amd64' is a native build env; to cross
            # compile use 'x86' (ie, it runs the x86 compiler directly)
            if plat_name == get_platform() or plat_name == 'win32':
                # native build or cross-compile to win32
                plat_spec = PLAT_TO_VCVARS[plat_name]
            else:
                # cross compile from win32 -> some 64bit
                plat_spec = (
                    PLAT_TO_VCVARS[get_platform()] + '_' + PLAT_TO_VCVARS[plat_name]
                )

            vc_env = query_vcvarsall(VERSION, plat_spec)

            self.__paths = vc_env['path'].split(os.pathsep)
            os.environ['lib'] = vc_env['lib']
            os.environ['include'] = vc_env['include']

            if len(self.__paths) == 0:
                raise DistutilsPlatformError(
                    "Python was built with %s, "
                    "and extensions need to be built with the same "
                    "version of the compiler, but it isn't installed." % self.__product
                )

            self.cc = self.find_exe("cl.exe")
            self.linker = self.find_exe("link.exe")
            self.lib = self.find_exe("lib.exe")
            self.rc = self.find_exe("rc.exe")  # resource compiler
            self.mc = self.find_exe("mc.exe")  # message compiler
            # self.set_path_env_var('lib')
            # self.set_path_env_var('include')

        # extend the MSVC path with the current path
        try:
            for p in os.environ['path'].split(';'):
                self.__paths.append(p)
        except KeyError:
            pass
        self.__paths = normalize_and_reduce_paths(self.__paths)
        os.environ['path'] = ";".join(self.__paths)

        self.preprocess_options = None
        if self.__arch == "x86":
            self.compile_options = ['/nologo', '/O2', '/MD', '/W3', '/DNDEBUG']
            self.compile_options_debug = [
                '/nologo',
                '/Od',
                '/MDd',
                '/W3',
                '/Z7',
                '/D_DEBUG',
            ]
        else:
            # Win64
            self.compile_options = ['/nologo', '/O2', '/MD', '/W3', '/GS-', '/DNDEBUG']
            self.compile_options_debug = [
                '/nologo',
                '/Od',
                '/MDd',
                '/W3',
                '/GS-',
                '/Z7',
                '/D_DEBUG',
            ]

        self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']
        if self.__version >= 7:
            self.ldflags_shared_debug = ['/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG']
        self.ldflags_static = ['/nologo']

        self.initialized = True

    # -- Worker methods ------------------------------------------------

    def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
        # Copied from ccompiler.py, extended to return .res as 'object'-file
        # for .rc input file
        if output_dir is None:
            output_dir = ''
        obj_names = []
        for src_name in source_filenames:
            (base, ext) = os.path.splitext(src_name)
            base = os.path.splitdrive(base)[1]  # Chop off the drive
            base = base[os.path.isabs(base) :]  # If abs, chop off leading /
            if ext not in self.src_extensions:
                # Better to raise an exception instead of silently continuing
                # and later complain about sources and targets having
                # different lengths
                raise CompileError("Don't know how to compile %s" % src_name)
            if strip_dir:
                base = os.path.basename(base)
            if ext in self._rc_extensions:
                obj_names.append(os.path.join(output_dir, base + self.res_extension))
            elif ext in self._mc_extensions:
                obj_names.append(os.path.join(output_dir, base + self.res_extension))
            else:
                obj_names.append(os.path.join(output_dir, base + self.obj_extension))
        return obj_names

    def compile(  # noqa: C901
        self,
        sources,
        output_dir=None,
        macros=None,
        include_dirs=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        depends=None,
    ):

        if not self.initialized:
            self.initialize()
        compile_info = self._setup_compile(
            output_dir, macros, include_dirs, sources, depends, extra_postargs
        )
        macros, objects, extra_postargs, pp_opts, build = compile_info

        compile_opts = extra_preargs or []
        compile_opts.append('/c')
        if debug:
            compile_opts.extend(self.compile_options_debug)
        else:
            compile_opts.extend(self.compile_options)

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            if debug:
                # pass the full pathname to MSVC in debug mode,
                # this allows the debugger to find the source file
                # without asking the user to browse for it
                src = os.path.abspath(src)

            if ext in self._c_extensions:
                input_opt = "/Tc" + src
            elif ext in self._cpp_extensions:
                input_opt = "/Tp" + src
            elif ext in self._rc_extensions:
                # compile .RC to .RES file
                input_opt = src
                output_opt = "/fo" + obj
                try:
                    self.spawn([self.rc] + pp_opts + [output_opt] + [input_opt])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            elif ext in self._mc_extensions:
                # Compile .MC to .RC file to .RES file.
                #   * '-h dir' specifies the directory for the
                #     generated include file
                #   * '-r dir' specifies the target directory of the
                #     generated RC file and the binary message resource
                #     it includes
                #
                # For now (since there are no options to change this),
                # we use the source-directory for the include file and
                # the build directory for the RC file and message
                # resources. This works at least for win32all.
                h_dir = os.path.dirname(src)
                rc_dir = os.path.dirname(obj)
                try:
                    # first compile .MC to .RC and .H file
                    self.spawn([self.mc] + ['-h', h_dir, '-r', rc_dir] + [src])
                    base, _ = os.path.splitext(os.path.basename(src))
                    rc_file = os.path.join(rc_dir, base + '.rc')
                    # then compile .RC to .RES file
                    self.spawn([self.rc] + ["/fo" + obj] + [rc_file])

                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            else:
                # how to handle this file?
                raise CompileError(
                    "Don't know how to compile {} to {}".format(src, obj)
                )

            output_opt = "/Fo" + obj
            try:
                self.spawn(
                    [self.cc]
                    + compile_opts
                    + pp_opts
                    + [input_opt, output_opt]
                    + extra_postargs
                )
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects

    def create_static_lib(
        self, objects, output_libname, output_dir=None, debug=0, target_lang=None
    ):

        if not self.initialized:
            self.initialize()
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        output_filename = self.library_filename(output_libname, output_dir=output_dir)

        if self._need_link(objects, output_filename):
            lib_args = objects + ['/OUT:' + output_filename]
            if debug:
                pass  # XXX what goes here?
            try:
                self.spawn([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def link(  # noqa: C901
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):

        if not self.initialized:
            self.initialize()
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
        (libraries, library_dirs, runtime_library_dirs) = fixed_args

        if runtime_library_dirs:
            self.warn(
                "I don't know what to do with 'runtime_library_dirs': "
                + str(runtime_library_dirs)
            )

        lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            if target_desc == CCompiler.EXECUTABLE:
                if debug:
                    ldflags = self.ldflags_shared_debug[1:]
                else:
                    ldflags = self.ldflags_shared[1:]
            else:
                if debug:
                    ldflags = self.ldflags_shared_debug
                else:
                    ldflags = self.ldflags_shared

            export_opts = []
            for sym in export_symbols or []:
                export_opts.append("/EXPORT:" + sym)

            ld_args = (
                ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
            )

            # The MSVC linker generates .lib and .exp files, which cannot be
            # suppressed by any linker switches. The .lib files may even be
            # needed! Make sure they are generated in the temporary build
            # directory. Since they have different names for debug and release
            # builds, they can go into the same directory.
            build_temp = os.path.dirname(objects[0])
            if export_symbols is not None:
                (dll_name, dll_ext) = os.path.splitext(
                    os.path.basename(output_filename)
                )
                implib_file = os.path.join(build_temp, self.library_filename(dll_name))
                ld_args.append('/IMPLIB:' + implib_file)

            self.manifest_setup_ldargs(output_filename, build_temp, ld_args)

            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            self.mkpath(os.path.dirname(output_filename))
            try:
                self.spawn([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)

            # embed the manifest
            # XXX - this is somewhat fragile - if mt.exe fails, distutils
            # will still consider the DLL up-to-date, but it will not have a
            # manifest.  Maybe we should link to a temp file?  OTOH, that
            # implies a build environment error that shouldn't go undetected.
            mfinfo = self.manifest_get_embed_info(target_desc, ld_args)
            if mfinfo is not None:
                mffilename, mfid = mfinfo
                out_arg = '-outputresource:{};{}'.format(output_filename, mfid)
                try:
                    self.spawn(['mt.exe', '-nologo', '-manifest', mffilename, out_arg])
                except DistutilsExecError as msg:
                    raise LinkError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def manifest_setup_ldargs(self, output_filename, build_temp, ld_args):
        # If we need a manifest at all, an embedded manifest is recommended.
        # See MSDN article titled
        # "How to: Embed a Manifest Inside a C/C++ Application"
        # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx)
        # Ask the linker to generate the manifest in the temp dir, so
        # we can check it, and possibly embed it, later.
        temp_manifest = os.path.join(
            build_temp, os.path.basename(output_filename) + ".manifest"
        )
        ld_args.append('/MANIFESTFILE:' + temp_manifest)

    def manifest_get_embed_info(self, target_desc, ld_args):
        # If a manifest should be embedded, return a tuple of
        # (manifest_filename, resource_id).  Returns None if no manifest
        # should be embedded.  See http://bugs.python.org/issue7833 for why
        # we want to avoid any manifest for extension modules if we can)
        for arg in ld_args:
            if arg.startswith("/MANIFESTFILE:"):
                temp_manifest = arg.split(":", 1)[1]
                break
        else:
            # no /MANIFESTFILE so nothing to do.
            return None
        if target_desc == CCompiler.EXECUTABLE:
            # by default, executables always get the manifest with the
            # CRT referenced.
            mfid = 1
        else:
            # Extension modules try and avoid any manifest if possible.
            mfid = 2
            temp_manifest = self._remove_visual_c_ref(temp_manifest)
        if temp_manifest is None:
            return None
        return temp_manifest, mfid

    def _remove_visual_c_ref(self, manifest_file):
        try:
            # Remove references to the Visual C runtime, so they will
            # fall through to the Visual C dependency of Python.exe.
            # This way, when installed for a restricted user (e.g.
            # runtimes are not in WinSxS folder, but in Python's own
            # folder), the runtimes do not need to be in every folder
            # with .pyd's.
            # Returns either the filename of the modified manifest or
            # None if no manifest should be embedded.
            manifest_f = open(manifest_file)
            try:
                manifest_buf = manifest_f.read()
            finally:
                manifest_f.close()
            pattern = re.compile(
                r"""|)""",
                re.DOTALL,
            )
            manifest_buf = re.sub(pattern, "", manifest_buf)
            pattern = r"\s*"
            manifest_buf = re.sub(pattern, "", manifest_buf)
            # Now see if any other assemblies are referenced - if not, we
            # don't want a manifest embedded.
            pattern = re.compile(
                r"""|)""",
                re.DOTALL,
            )
            if re.search(pattern, manifest_buf) is None:
                return None

            manifest_f = open(manifest_file, 'w')
            try:
                manifest_f.write(manifest_buf)
                return manifest_file
            finally:
                manifest_f.close()
        except OSError:
            pass

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "/LIBPATH:" + dir

    def runtime_library_dir_option(self, dir):
        raise DistutilsPlatformError(
            "don't know how to set runtime library search path for MSVC++"
        )

    def library_option(self, lib):
        return self.library_filename(lib)

    def find_library_file(self, dirs, lib, debug=0):
        # Prefer a debugging library if found (and requested), but deal
        # with it if we don't have one.
        if debug:
            try_names = [lib + "_d", lib]
        else:
            try_names = [lib]
        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename(name))
                if os.path.exists(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None

    # Helper methods for using the MSVC registry settings

    def find_exe(self, exe):
        """Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        """
        for p in self.__paths:
            fn = os.path.join(os.path.abspath(p), exe)
            if os.path.isfile(fn):
                return fn

        # didn't find it; try existing path
        for p in os.environ['Path'].split(';'):
            fn = os.path.join(os.path.abspath(p), exe)
            if os.path.isfile(fn):
                return fn

        return exe
PK|5Z]00:Lib/site-packages/setuptools/_distutils/cygwinccompiler.pynuW+A"""distutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
"""

import os
import sys
import copy
import shlex
import warnings
from subprocess import check_output

from distutils.unixccompiler import UnixCCompiler
from distutils.file_util import write_file
from distutils.errors import (
    DistutilsExecError,
    DistutilsPlatformError,
    CCompilerError,
    CompileError,
)
from distutils.version import LooseVersion, suppress_known_deprecation


def get_msvcr():
    """Include the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    """
    msc_pos = sys.version.find('MSC v.')
    if msc_pos != -1:
        msc_ver = sys.version[msc_pos + 6 : msc_pos + 10]
        if msc_ver == '1300':
            # MSVC 7.0
            return ['msvcr70']
        elif msc_ver == '1310':
            # MSVC 7.1
            return ['msvcr71']
        elif msc_ver == '1400':
            # VS2005 / MSVC 8.0
            return ['msvcr80']
        elif msc_ver == '1500':
            # VS2008 / MSVC 9.0
            return ['msvcr90']
        elif msc_ver == '1600':
            # VS2010 / MSVC 10.0
            return ['msvcr100']
        elif msc_ver == '1700':
            # VS2012 / MSVC 11.0
            return ['msvcr110']
        elif msc_ver == '1800':
            # VS2013 / MSVC 12.0
            return ['msvcr120']
        elif 1900 <= int(msc_ver) < 2000:
            # VS2015 / MSVC 14.0
            return ['ucrt', 'vcruntime140']
        else:
            raise ValueError("Unknown MS Compiler version %s " % msc_ver)


_runtime_library_dirs_msg = (
    "Unable to set runtime library search path on Windows, "
    "usually indicated by `runtime_library_dirs` parameter to Extension"
)


class CygwinCCompiler(UnixCCompiler):
    """Handles the Cygwin port of the GNU C compiler to Windows."""

    compiler_type = 'cygwin'
    obj_extension = ".o"
    static_lib_extension = ".a"
    shared_lib_extension = ".dll.a"
    dylib_lib_extension = ".dll"
    static_lib_format = "lib%s%s"
    shared_lib_format = "lib%s%s"
    dylib_lib_format = "cyg%s%s"
    exe_extension = ".exe"

    def __init__(self, verbose=0, dry_run=0, force=0):

        super().__init__(verbose, dry_run, force)

        status, details = check_config_h()
        self.debug_print(
            "Python's GCC status: {} (details: {})".format(status, details)
        )
        if status is not CONFIG_H_OK:
            self.warn(
                "Python's pyconfig.h doesn't seem to support your compiler. "
                "Reason: %s. "
                "Compiling may fail because of undefined preprocessor macros." % details
            )

        self.cc = os.environ.get('CC', 'gcc')
        self.cxx = os.environ.get('CXX', 'g++')

        self.linker_dll = self.cc
        shared_option = "-shared"

        self.set_executables(
            compiler='%s -mcygwin -O -Wall' % self.cc,
            compiler_so='%s -mcygwin -mdll -O -Wall' % self.cc,
            compiler_cxx='%s -mcygwin -O -Wall' % self.cxx,
            linker_exe='%s -mcygwin' % self.cc,
            linker_so=('{} -mcygwin {}'.format(self.linker_dll, shared_option)),
        )

        # Include the appropriate MSVC runtime library if Python was built
        # with MSVC 7.0 or later.
        self.dll_libraries = get_msvcr()

    @property
    def gcc_version(self):
        # Older numpy dependend on this existing to check for ancient
        # gcc versions. This doesn't make much sense with clang etc so
        # just hardcode to something recent.
        # https://github.com/numpy/numpy/pull/20333
        warnings.warn(
            "gcc_version attribute of CygwinCCompiler is deprecated. "
            "Instead of returning actual gcc version a fixed value 11.2.0 is returned.",
            DeprecationWarning,
            stacklevel=2,
        )
        with suppress_known_deprecation():
            return LooseVersion("11.2.0")

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        """Compiles the source by spawning GCC and windres if needed."""
        if ext == '.rc' or ext == '.res':
            # gcc needs '.res' and '.rc' compiled to object files !!!
            try:
                self.spawn(["windres", "-i", src, "-o", obj])
            except DistutilsExecError as msg:
                raise CompileError(msg)
        else:  # for other files use the C-compiler
            try:
                self.spawn(
                    self.compiler_so + cc_args + [src, '-o', obj] + extra_postargs
                )
            except DistutilsExecError as msg:
                raise CompileError(msg)

    def link(
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        """Link the objects."""
        # use separate copies, so we can modify the lists
        extra_preargs = copy.copy(extra_preargs or [])
        libraries = copy.copy(libraries or [])
        objects = copy.copy(objects or [])

        if runtime_library_dirs:
            self.warn(_runtime_library_dirs_msg)

        # Additional libraries
        libraries.extend(self.dll_libraries)

        # handle export symbols by creating a def-file
        # with executables this only works with gcc/ld as linker
        if (export_symbols is not None) and (
            target_desc != self.EXECUTABLE or self.linker_dll == "gcc"
        ):
            # (The linker doesn't do anything if output is up-to-date.
            # So it would probably better to check if we really need this,
            # but for this we had to insert some unchanged parts of
            # UnixCCompiler, and this is not what we want.)

            # we want to put some files in the same directory as the
            # object files are, build_temp doesn't help much
            # where are the object files
            temp_dir = os.path.dirname(objects[0])
            # name of dll to give the helper files the same base name
            (dll_name, dll_extension) = os.path.splitext(
                os.path.basename(output_filename)
            )

            # generate the filenames for these files
            def_file = os.path.join(temp_dir, dll_name + ".def")

            # Generate .def file
            contents = ["LIBRARY %s" % os.path.basename(output_filename), "EXPORTS"]
            for sym in export_symbols:
                contents.append(sym)
            self.execute(write_file, (def_file, contents), "writing %s" % def_file)

            # next add options for def-file

            # for gcc/ld the def-file is specified as any object files
            objects.append(def_file)

        # end: if ((export_symbols is not None) and
        #        (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):

        # who wants symbols and a many times larger output file
        # should explicitly switch the debug mode on
        # otherwise we let ld strip the output file
        # (On my machine: 10KiB < stripped_file < ??100KiB
        #   unstripped_file = stripped_file + XXX KiB
        #  ( XXX=254 for a typical python extension))
        if not debug:
            extra_preargs.append("-s")

        UnixCCompiler.link(
            self,
            target_desc,
            objects,
            output_filename,
            output_dir,
            libraries,
            library_dirs,
            runtime_library_dirs,
            None,  # export_symbols, we do this in our def-file
            debug,
            extra_preargs,
            extra_postargs,
            build_temp,
            target_lang,
        )

    def runtime_library_dir_option(self, dir):
        # cygwin doesn't support rpath. While in theory we could error
        # out like MSVC does, code might expect it to work like on Unix, so
        # just warn and hope for the best.
        self.warn(_runtime_library_dirs_msg)
        return []

    # -- Miscellaneous methods -----------------------------------------

    def _make_out_path(self, output_dir, strip_dir, src_name):
        # use normcase to make sure '.rc' is really '.rc' and not '.RC'
        norm_src_name = os.path.normcase(src_name)
        return super()._make_out_path(output_dir, strip_dir, norm_src_name)

    @property
    def out_extensions(self):
        """
        Add support for rc and res files.
        """
        return {
            **super().out_extensions,
            **{ext: ext + self.obj_extension for ext in ('.res', '.rc')},
        }


# the same as cygwin plus some additional parameters
class Mingw32CCompiler(CygwinCCompiler):
    """Handles the Mingw32 port of the GNU C compiler to Windows."""

    compiler_type = 'mingw32'

    def __init__(self, verbose=0, dry_run=0, force=0):

        super().__init__(verbose, dry_run, force)

        shared_option = "-shared"

        if is_cygwincc(self.cc):
            raise CCompilerError('Cygwin gcc cannot be used with --compiler=mingw32')

        self.set_executables(
            compiler='%s -O -Wall' % self.cc,
            compiler_so='%s -mdll -O -Wall' % self.cc,
            compiler_cxx='%s -O -Wall' % self.cxx,
            linker_exe='%s' % self.cc,
            linker_so='{} {}'.format(self.linker_dll, shared_option),
        )

        # Maybe we should also append -mthreads, but then the finished
        # dlls need another dll (mingwm10.dll see Mingw32 docs)
        # (-mthreads: Support thread-safe exception handling on `Mingw32')

        # no additional libraries needed
        self.dll_libraries = []

        # Include the appropriate MSVC runtime library if Python was built
        # with MSVC 7.0 or later.
        self.dll_libraries = get_msvcr()

    def runtime_library_dir_option(self, dir):
        raise DistutilsPlatformError(_runtime_library_dirs_msg)


# Because these compilers aren't configured in Python's pyconfig.h file by
# default, we should at least warn the user if he is using an unmodified
# version.

CONFIG_H_OK = "ok"
CONFIG_H_NOTOK = "not ok"
CONFIG_H_UNCERTAIN = "uncertain"


def check_config_h():
    """Check if the current Python installation appears amenable to building
    extensions with GCC.

    Returns a tuple (status, details), where 'status' is one of the following
    constants:

    - CONFIG_H_OK: all is well, go ahead and compile
    - CONFIG_H_NOTOK: doesn't look good
    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h

    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    """

    # XXX since this function also checks sys.version, it's not strictly a
    # "pyconfig.h" check -- should probably be renamed...

    from distutils import sysconfig

    # if sys.version contains GCC then python was compiled with GCC, and the
    # pyconfig.h file should be OK
    if "GCC" in sys.version:
        return CONFIG_H_OK, "sys.version mentions 'GCC'"

    # Clang would also work
    if "Clang" in sys.version:
        return CONFIG_H_OK, "sys.version mentions 'Clang'"

    # let's see if __GNUC__ is mentioned in python.h
    fn = sysconfig.get_config_h_filename()
    try:
        config_h = open(fn)
        try:
            if "__GNUC__" in config_h.read():
                return CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn
            else:
                return CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn
        finally:
            config_h.close()
    except OSError as exc:
        return (CONFIG_H_UNCERTAIN, "couldn't read '{}': {}".format(fn, exc.strerror))


def is_cygwincc(cc):
    '''Try to determine if the compiler that would be used is from cygwin.'''
    out_string = check_output(shlex.split(cc) + ['-dumpmachine'])
    return out_string.strip().endswith(b'cygwin')


get_versions = None
"""
A stand-in for the previous get_versions() function to prevent failures
when monkeypatched. See pypa/setuptools#2969.
"""
PK|5Zz9

/Lib/site-packages/setuptools/_distutils/dist.pynuW+A"""distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
"""

import sys
import os
import re
import pathlib
import contextlib
from email import message_from_file

try:
    import warnings
except ImportError:
    warnings = None

from distutils.errors import (
    DistutilsOptionError,
    DistutilsModuleError,
    DistutilsArgError,
    DistutilsClassError,
)
from distutils.fancy_getopt import FancyGetopt, translate_longopt
from distutils.util import check_environ, strtobool, rfc822_escape
from distutils import log
from distutils.debug import DEBUG

# Regex to define acceptable Distutils command names.  This is not *quite*
# the same as a Python NAME -- I don't allow leading underscores.  The fact
# that they're very similar is no coincidence; the default naming scheme is
# to look for a Python module named after the command.
command_re = re.compile(r'^[a-zA-Z]([a-zA-Z0-9_]*)$')


def _ensure_list(value, fieldname):
    if isinstance(value, str):
        # a string containing comma separated values is okay.  It will
        # be converted to a list by Distribution.finalize_options().
        pass
    elif not isinstance(value, list):
        # passing a tuple or an iterator perhaps, warn and convert
        typename = type(value).__name__
        msg = "Warning: '{fieldname}' should be a list, got type '{typename}'"
        msg = msg.format(**locals())
        log.log(log.WARN, msg)
        value = list(value)
    return value


class Distribution:
    """The core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.

    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    """

    # 'global_options' describes the command-line options that may be
    # supplied to the setup script prior to any actual commands.
    # Eg. "./setup.py -n" or "./setup.py --quiet" both take advantage of
    # these global options.  This list should be kept to a bare minimum,
    # since every global option is also valid as a command option -- and we
    # don't want to pollute the commands with too many options that they
    # have minimal control over.
    # The fourth entry for verbose means that it can be repeated.
    global_options = [
        ('verbose', 'v', "run verbosely (default)", 1),
        ('quiet', 'q', "run quietly (turns verbosity off)"),
        ('dry-run', 'n', "don't actually do anything"),
        ('help', 'h', "show detailed help message"),
        ('no-user-cfg', None, 'ignore pydistutils.cfg in your home directory'),
    ]

    # 'common_usage' is a short (2-3 line) string describing the common
    # usage of the setup script.
    common_usage = """\
Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
"""

    # options that are not propagated to the commands
    display_options = [
        ('help-commands', None, "list all available commands"),
        ('name', None, "print package name"),
        ('version', 'V', "print package version"),
        ('fullname', None, "print -"),
        ('author', None, "print the author's name"),
        ('author-email', None, "print the author's email address"),
        ('maintainer', None, "print the maintainer's name"),
        ('maintainer-email', None, "print the maintainer's email address"),
        ('contact', None, "print the maintainer's name if known, else the author's"),
        (
            'contact-email',
            None,
            "print the maintainer's email address if known, else the author's",
        ),
        ('url', None, "print the URL for this package"),
        ('license', None, "print the license of the package"),
        ('licence', None, "alias for --license"),
        ('description', None, "print the package description"),
        ('long-description', None, "print the long package description"),
        ('platforms', None, "print the list of platforms"),
        ('classifiers', None, "print the list of classifiers"),
        ('keywords', None, "print the list of keywords"),
        ('provides', None, "print the list of packages/modules provided"),
        ('requires', None, "print the list of packages/modules required"),
        ('obsoletes', None, "print the list of packages/modules made obsolete"),
    ]
    display_option_names = [translate_longopt(x[0]) for x in display_options]

    # negative options are options that exclude other options
    negative_opt = {'quiet': 'verbose'}

    # -- Creation/initialization methods -------------------------------

    def __init__(self, attrs=None):  # noqa: C901
        """Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
        'attrs' will be assigned to some null value: 0, None, an empty list
        or dictionary, etc.)  Most importantly, initialize the
        'command_obj' attribute to the empty dictionary; this will be
        filled in with real command objects by 'parse_command_line()'.
        """

        # Default values for our command-line options
        self.verbose = 1
        self.dry_run = 0
        self.help = 0
        for attr in self.display_option_names:
            setattr(self, attr, 0)

        # Store the distribution meta-data (name, version, author, and so
        # forth) in a separate object -- we're getting to have enough
        # information here (and enough command-line options) that it's
        # worth it.  Also delegate 'get_XXX()' methods to the 'metadata'
        # object in a sneaky and underhanded (but efficient!) way.
        self.metadata = DistributionMetadata()
        for basename in self.metadata._METHOD_BASENAMES:
            method_name = "get_" + basename
            setattr(self, method_name, getattr(self.metadata, method_name))

        # 'cmdclass' maps command names to class objects, so we
        # can 1) quickly figure out which class to instantiate when
        # we need to create a new command object, and 2) have a way
        # for the setup script to override command classes
        self.cmdclass = {}

        # 'command_packages' is a list of packages in which commands
        # are searched for.  The factory for command 'foo' is expected
        # to be named 'foo' in the module 'foo' in one of the packages
        # named here.  This list is searched from the left; an error
        # is raised if no named package provides the command being
        # searched for.  (Always access using get_command_packages().)
        self.command_packages = None

        # 'script_name' and 'script_args' are usually set to sys.argv[0]
        # and sys.argv[1:], but they can be overridden when the caller is
        # not necessarily a setup script run from the command-line.
        self.script_name = None
        self.script_args = None

        # 'command_options' is where we store command options between
        # parsing them (from config files, the command-line, etc.) and when
        # they are actually needed -- ie. when the command in question is
        # instantiated.  It is a dictionary of dictionaries of 2-tuples:
        #   command_options = { command_name : { option : (source, value) } }
        self.command_options = {}

        # 'dist_files' is the list of (command, pyversion, file) that
        # have been created by any dist commands run so far. This is
        # filled regardless of whether the run is dry or not. pyversion
        # gives sysconfig.get_python_version() if the dist file is
        # specific to a Python version, 'any' if it is good for all
        # Python versions on the target platform, and '' for a source
        # file. pyversion should not be used to specify minimum or
        # maximum required Python versions; use the metainfo for that
        # instead.
        self.dist_files = []

        # These options are really the business of various commands, rather
        # than of the Distribution itself.  We provide aliases for them in
        # Distribution as a convenience to the developer.
        self.packages = None
        self.package_data = {}
        self.package_dir = None
        self.py_modules = None
        self.libraries = None
        self.headers = None
        self.ext_modules = None
        self.ext_package = None
        self.include_dirs = None
        self.extra_path = None
        self.scripts = None
        self.data_files = None
        self.password = ''

        # And now initialize bookkeeping stuff that can't be supplied by
        # the caller at all.  'command_obj' maps command names to
        # Command instances -- that's how we enforce that every command
        # class is a singleton.
        self.command_obj = {}

        # 'have_run' maps command names to boolean values; it keeps track
        # of whether we have actually run a particular command, to make it
        # cheap to "run" a command whenever we think we might need to -- if
        # it's already been done, no need for expensive filesystem
        # operations, we just check the 'have_run' dictionary and carry on.
        # It's only safe to query 'have_run' for a command class that has
        # been instantiated -- a false value will be inserted when the
        # command object is created, and replaced with a true value when
        # the command is successfully run.  Thus it's probably best to use
        # '.get()' rather than a straight lookup.
        self.have_run = {}

        # Now we'll use the attrs dictionary (ultimately, keyword args from
        # the setup script) to possibly override any or all of these
        # distribution options.

        if attrs:
            # Pull out the set of command options and work on them
            # specifically.  Note that this order guarantees that aliased
            # command options will override any supplied redundantly
            # through the general options dictionary.
            options = attrs.get('options')
            if options is not None:
                del attrs['options']
                for (command, cmd_options) in options.items():
                    opt_dict = self.get_option_dict(command)
                    for (opt, val) in cmd_options.items():
                        opt_dict[opt] = ("setup script", val)

            if 'licence' in attrs:
                attrs['license'] = attrs['licence']
                del attrs['licence']
                msg = "'licence' distribution option is deprecated; use 'license'"
                if warnings is not None:
                    warnings.warn(msg)
                else:
                    sys.stderr.write(msg + "\n")

            # Now work on the rest of the attributes.  Any attribute that's
            # not already defined is invalid!
            for (key, val) in attrs.items():
                if hasattr(self.metadata, "set_" + key):
                    getattr(self.metadata, "set_" + key)(val)
                elif hasattr(self.metadata, key):
                    setattr(self.metadata, key, val)
                elif hasattr(self, key):
                    setattr(self, key, val)
                else:
                    msg = "Unknown distribution option: %s" % repr(key)
                    warnings.warn(msg)

        # no-user-cfg is handled before other command line args
        # because other args override the config files, and this
        # one is needed before we can load the config files.
        # If attrs['script_args'] wasn't passed, assume false.
        #
        # This also make sure we just look at the global options
        self.want_user_cfg = True

        if self.script_args is not None:
            for arg in self.script_args:
                if not arg.startswith('-'):
                    break
                if arg == '--no-user-cfg':
                    self.want_user_cfg = False
                    break

        self.finalize_options()

    def get_option_dict(self, command):
        """Get the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        """
        dict = self.command_options.get(command)
        if dict is None:
            dict = self.command_options[command] = {}
        return dict

    def dump_option_dicts(self, header=None, commands=None, indent=""):
        from pprint import pformat

        if commands is None:  # dump all command option dicts
            commands = sorted(self.command_options.keys())

        if header is not None:
            self.announce(indent + header)
            indent = indent + "  "

        if not commands:
            self.announce(indent + "no commands known yet")
            return

        for cmd_name in commands:
            opt_dict = self.command_options.get(cmd_name)
            if opt_dict is None:
                self.announce(indent + "no option dict for '%s' command" % cmd_name)
            else:
                self.announce(indent + "option dict for '%s' command:" % cmd_name)
                out = pformat(opt_dict)
                for line in out.split('\n'):
                    self.announce(indent + "  " + line)

    # -- Config file finding/parsing methods ---------------------------

    def find_config_files(self):
        """Find as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).

        There are multiple possible config files:
        - distutils.cfg in the Distutils installation directory (i.e.
          where the top-level Distutils __inst__.py file lives)
        - a file in the user's home directory named .pydistutils.cfg
          on Unix and pydistutils.cfg on Windows/Mac; may be disabled
          with the ``--no-user-cfg`` option
        - setup.cfg in the current directory
        - a file named by an environment variable
        """
        check_environ()
        files = [str(path) for path in self._gen_paths() if os.path.isfile(path)]

        if DEBUG:
            self.announce("using config files: %s" % ', '.join(files))

        return files

    def _gen_paths(self):
        # The system-wide Distutils config file
        sys_dir = pathlib.Path(sys.modules['distutils'].__file__).parent
        yield sys_dir / "distutils.cfg"

        # The per-user config file
        prefix = '.' * (os.name == 'posix')
        filename = prefix + 'pydistutils.cfg'
        if self.want_user_cfg:
            yield pathlib.Path('~').expanduser() / filename

        # All platforms support local setup.cfg
        yield pathlib.Path('setup.cfg')

        # Additional config indicated in the environment
        with contextlib.suppress(TypeError):
            yield pathlib.Path(os.getenv("DIST_EXTRA_CONFIG"))

    def parse_config_files(self, filenames=None):  # noqa: C901
        from configparser import ConfigParser

        # Ignore install directory options if we have a venv
        if sys.prefix != sys.base_prefix:
            ignore_options = [
                'install-base',
                'install-platbase',
                'install-lib',
                'install-platlib',
                'install-purelib',
                'install-headers',
                'install-scripts',
                'install-data',
                'prefix',
                'exec-prefix',
                'home',
                'user',
                'root',
            ]
        else:
            ignore_options = []

        ignore_options = frozenset(ignore_options)

        if filenames is None:
            filenames = self.find_config_files()

        if DEBUG:
            self.announce("Distribution.parse_config_files():")

        parser = ConfigParser()
        for filename in filenames:
            if DEBUG:
                self.announce("  reading %s" % filename)
            parser.read(filename)
            for section in parser.sections():
                options = parser.options(section)
                opt_dict = self.get_option_dict(section)

                for opt in options:
                    if opt != '__name__' and opt not in ignore_options:
                        val = parser.get(section, opt)
                        opt = opt.replace('-', '_')
                        opt_dict[opt] = (filename, val)

            # Make the ConfigParser forget everything (so we retain
            # the original filenames that options come from)
            parser.__init__()

        # If there was a "global" section in the config file, use it
        # to set Distribution options.

        if 'global' in self.command_options:
            for (opt, (src, val)) in self.command_options['global'].items():
                alias = self.negative_opt.get(opt)
                try:
                    if alias:
                        setattr(self, alias, not strtobool(val))
                    elif opt in ('verbose', 'dry_run'):  # ugh!
                        setattr(self, opt, strtobool(val))
                    else:
                        setattr(self, opt, val)
                except ValueError as msg:
                    raise DistutilsOptionError(msg)

    # -- Command-line parsing methods ----------------------------------

    def parse_command_line(self):
        """Parse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        """
        #
        # We now have enough information to show the Macintosh dialog
        # that allows the user to interactively specify the "command line".
        #
        toplevel_options = self._get_toplevel_options()

        # We have to parse the command line a bit at a time -- global
        # options, then the first command, then its options, and so on --
        # because each command will be handled by a different class, and
        # the options that are valid for a particular class aren't known
        # until we have loaded the command class, which doesn't happen
        # until we know what the command is.

        self.commands = []
        parser = FancyGetopt(toplevel_options + self.display_options)
        parser.set_negative_aliases(self.negative_opt)
        parser.set_aliases({'licence': 'license'})
        args = parser.getopt(args=self.script_args, object=self)
        option_order = parser.get_option_order()
        log.set_verbosity(self.verbose)

        # for display options we return immediately
        if self.handle_display_options(option_order):
            return
        while args:
            args = self._parse_command_opts(parser, args)
            if args is None:  # user asked for help (and got it)
                return

        # Handle the cases of --help as a "global" option, ie.
        # "setup.py --help" and "setup.py --help command ...".  For the
        # former, we show global options (--verbose, --dry-run, etc.)
        # and display-only options (--name, --version, etc.); for the
        # latter, we omit the display-only options and show help for
        # each command listed on the command line.
        if self.help:
            self._show_help(
                parser, display_options=len(self.commands) == 0, commands=self.commands
            )
            return

        # Oops, no commands found -- an end-user error
        if not self.commands:
            raise DistutilsArgError("no commands supplied")

        # All is well: return true
        return True

    def _get_toplevel_options(self):
        """Return the non-display options recognized at the top level.

        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        """
        return self.global_options + [
            (
                "command-packages=",
                None,
                "list of packages that provide distutils commands",
            ),
        ]

    def _parse_command_opts(self, parser, args):  # noqa: C901
        """Parse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        """
        # late import because of mutual dependence between these modules
        from distutils.cmd import Command

        # Pull the current command from the head of the command line
        command = args[0]
        if not command_re.match(command):
            raise SystemExit("invalid command name '%s'" % command)
        self.commands.append(command)

        # Dig up the command class that implements this command, so we
        # 1) know that it's a valid command, and 2) know which options
        # it takes.
        try:
            cmd_class = self.get_command_class(command)
        except DistutilsModuleError as msg:
            raise DistutilsArgError(msg)

        # Require that the command class be derived from Command -- want
        # to be sure that the basic "command" interface is implemented.
        if not issubclass(cmd_class, Command):
            raise DistutilsClassError(
                "command class %s must subclass Command" % cmd_class
            )

        # Also make sure that the command object provides a list of its
        # known options.
        if not (
            hasattr(cmd_class, 'user_options')
            and isinstance(cmd_class.user_options, list)
        ):
            msg = (
                "command class %s must provide "
                "'user_options' attribute (a list of tuples)"
            )
            raise DistutilsClassError(msg % cmd_class)

        # If the command class has a list of negative alias options,
        # merge it in with the global negative aliases.
        negative_opt = self.negative_opt
        if hasattr(cmd_class, 'negative_opt'):
            negative_opt = negative_opt.copy()
            negative_opt.update(cmd_class.negative_opt)

        # Check for help_options in command class.  They have a different
        # format (tuple of four) so we need to preprocess them here.
        if hasattr(cmd_class, 'help_options') and isinstance(
            cmd_class.help_options, list
        ):
            help_options = fix_help_options(cmd_class.help_options)
        else:
            help_options = []

        # All commands support the global options too, just by adding
        # in 'global_options'.
        parser.set_option_table(
            self.global_options + cmd_class.user_options + help_options
        )
        parser.set_negative_aliases(negative_opt)
        (args, opts) = parser.getopt(args[1:])
        if hasattr(opts, 'help') and opts.help:
            self._show_help(parser, display_options=0, commands=[cmd_class])
            return

        if hasattr(cmd_class, 'help_options') and isinstance(
            cmd_class.help_options, list
        ):
            help_option_found = 0
            for (help_option, short, desc, func) in cmd_class.help_options:
                if hasattr(opts, parser.get_attr_name(help_option)):
                    help_option_found = 1
                    if callable(func):
                        func()
                    else:
                        raise DistutilsClassError(
                            "invalid help function %r for help option '%s': "
                            "must be a callable object (function, etc.)"
                            % (func, help_option)
                        )

            if help_option_found:
                return

        # Put the options from the command-line into their official
        # holding pen, the 'command_options' dictionary.
        opt_dict = self.get_option_dict(command)
        for (name, value) in vars(opts).items():
            opt_dict[name] = ("command line", value)

        return args

    def finalize_options(self):
        """Set final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        """
        for attr in ('keywords', 'platforms'):
            value = getattr(self.metadata, attr)
            if value is None:
                continue
            if isinstance(value, str):
                value = [elm.strip() for elm in value.split(',')]
                setattr(self.metadata, attr, value)

    def _show_help(self, parser, global_options=1, display_options=1, commands=[]):
        """Show help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.

        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        """
        # late import because of mutual dependence between these modules
        from distutils.core import gen_usage
        from distutils.cmd import Command

        if global_options:
            if display_options:
                options = self._get_toplevel_options()
            else:
                options = self.global_options
            parser.set_option_table(options)
            parser.print_help(self.common_usage + "\nGlobal options:")
            print('')

        if display_options:
            parser.set_option_table(self.display_options)
            parser.print_help(
                "Information display options (just display "
                + "information, ignore any commands)"
            )
            print('')

        for command in self.commands:
            if isinstance(command, type) and issubclass(command, Command):
                klass = command
            else:
                klass = self.get_command_class(command)
            if hasattr(klass, 'help_options') and isinstance(klass.help_options, list):
                parser.set_option_table(
                    klass.user_options + fix_help_options(klass.help_options)
                )
            else:
                parser.set_option_table(klass.user_options)
            parser.print_help("Options for '%s' command:" % klass.__name__)
            print('')

        print(gen_usage(self.script_name))

    def handle_display_options(self, option_order):
        """If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        """
        from distutils.core import gen_usage

        # User just wants a list of commands -- we'll print it out and stop
        # processing now (ie. if they ran "setup --help-commands foo bar",
        # we ignore "foo bar").
        if self.help_commands:
            self.print_commands()
            print('')
            print(gen_usage(self.script_name))
            return 1

        # If user supplied any of the "display metadata" options, then
        # display that metadata in the order in which the user supplied the
        # metadata options.
        any_display_options = 0
        is_display_option = {}
        for option in self.display_options:
            is_display_option[option[0]] = 1

        for (opt, val) in option_order:
            if val and is_display_option.get(opt):
                opt = translate_longopt(opt)
                value = getattr(self.metadata, "get_" + opt)()
                if opt in ['keywords', 'platforms']:
                    print(','.join(value))
                elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'):
                    print('\n'.join(value))
                else:
                    print(value)
                any_display_options = 1

        return any_display_options

    def print_command_list(self, commands, header, max_length):
        """Print a subset of the list of all commands -- used by
        'print_commands()'.
        """
        print(header + ":")

        for cmd in commands:
            klass = self.cmdclass.get(cmd)
            if not klass:
                klass = self.get_command_class(cmd)
            try:
                description = klass.description
            except AttributeError:
                description = "(no description available)"

            print("  %-*s  %s" % (max_length, cmd, description))

    def print_commands(self):
        """Print out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        """
        import distutils.command

        std_commands = distutils.command.__all__
        is_std = {}
        for cmd in std_commands:
            is_std[cmd] = 1

        extra_commands = []
        for cmd in self.cmdclass.keys():
            if not is_std.get(cmd):
                extra_commands.append(cmd)

        max_length = 0
        for cmd in std_commands + extra_commands:
            if len(cmd) > max_length:
                max_length = len(cmd)

        self.print_command_list(std_commands, "Standard commands", max_length)
        if extra_commands:
            print()
            self.print_command_list(extra_commands, "Extra commands", max_length)

    def get_command_list(self):
        """Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        """
        # Currently this is only used on Mac OS, for the Mac-only GUI
        # Distutils interface (by Jack Jansen)
        import distutils.command

        std_commands = distutils.command.__all__
        is_std = {}
        for cmd in std_commands:
            is_std[cmd] = 1

        extra_commands = []
        for cmd in self.cmdclass.keys():
            if not is_std.get(cmd):
                extra_commands.append(cmd)

        rv = []
        for cmd in std_commands + extra_commands:
            klass = self.cmdclass.get(cmd)
            if not klass:
                klass = self.get_command_class(cmd)
            try:
                description = klass.description
            except AttributeError:
                description = "(no description available)"
            rv.append((cmd, description))
        return rv

    # -- Command class/object methods ----------------------------------

    def get_command_packages(self):
        """Return a list of packages from which commands are loaded."""
        pkgs = self.command_packages
        if not isinstance(pkgs, list):
            if pkgs is None:
                pkgs = ''
            pkgs = [pkg.strip() for pkg in pkgs.split(',') if pkg != '']
            if "distutils.command" not in pkgs:
                pkgs.insert(0, "distutils.command")
            self.command_packages = pkgs
        return pkgs

    def get_command_class(self, command):
        """Return the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.

        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        """
        klass = self.cmdclass.get(command)
        if klass:
            return klass

        for pkgname in self.get_command_packages():
            module_name = "{}.{}".format(pkgname, command)
            klass_name = command

            try:
                __import__(module_name)
                module = sys.modules[module_name]
            except ImportError:
                continue

            try:
                klass = getattr(module, klass_name)
            except AttributeError:
                raise DistutilsModuleError(
                    "invalid command '%s' (no class '%s' in module '%s')"
                    % (command, klass_name, module_name)
                )

            self.cmdclass[command] = klass
            return klass

        raise DistutilsModuleError("invalid command '%s'" % command)

    def get_command_obj(self, command, create=1):
        """Return the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        """
        cmd_obj = self.command_obj.get(command)
        if not cmd_obj and create:
            if DEBUG:
                self.announce(
                    "Distribution.get_command_obj(): "
                    "creating '%s' command object" % command
                )

            klass = self.get_command_class(command)
            cmd_obj = self.command_obj[command] = klass(self)
            self.have_run[command] = 0

            # Set any options that were supplied in config files
            # or on the command line.  (NB. support for error
            # reporting is lame here: any errors aren't reported
            # until 'finalize_options()' is called, which means
            # we won't report the source of the error.)
            options = self.command_options.get(command)
            if options:
                self._set_command_options(cmd_obj, options)

        return cmd_obj

    def _set_command_options(self, command_obj, option_dict=None):  # noqa: C901
        """Set the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').
        """
        command_name = command_obj.get_command_name()
        if option_dict is None:
            option_dict = self.get_option_dict(command_name)

        if DEBUG:
            self.announce("  setting options for '%s' command:" % command_name)
        for (option, (source, value)) in option_dict.items():
            if DEBUG:
                self.announce("    {} = {} (from {})".format(option, value, source))
            try:
                bool_opts = [translate_longopt(o) for o in command_obj.boolean_options]
            except AttributeError:
                bool_opts = []
            try:
                neg_opt = command_obj.negative_opt
            except AttributeError:
                neg_opt = {}

            try:
                is_string = isinstance(value, str)
                if option in neg_opt and is_string:
                    setattr(command_obj, neg_opt[option], not strtobool(value))
                elif option in bool_opts and is_string:
                    setattr(command_obj, option, strtobool(value))
                elif hasattr(command_obj, option):
                    setattr(command_obj, option, value)
                else:
                    raise DistutilsOptionError(
                        "error in %s: command '%s' has no such option '%s'"
                        % (source, command_name, option)
                    )
            except ValueError as msg:
                raise DistutilsOptionError(msg)

    def reinitialize_command(self, command, reinit_subcommands=0):
        """Reinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.

        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.

        Returns the reinitialized command object.
        """
        from distutils.cmd import Command

        if not isinstance(command, Command):
            command_name = command
            command = self.get_command_obj(command_name)
        else:
            command_name = command.get_command_name()

        if not command.finalized:
            return command
        command.initialize_options()
        command.finalized = 0
        self.have_run[command_name] = 0
        self._set_command_options(command)

        if reinit_subcommands:
            for sub in command.get_sub_commands():
                self.reinitialize_command(sub, reinit_subcommands)

        return command

    # -- Methods that operate on the Distribution ----------------------

    def announce(self, msg, level=log.INFO):
        log.log(level, msg)

    def run_commands(self):
        """Run each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        """
        for cmd in self.commands:
            self.run_command(cmd)

    # -- Methods that operate on its Commands --------------------------

    def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1

    # -- Distribution query methods ------------------------------------

    def has_pure_modules(self):
        return len(self.packages or self.py_modules or []) > 0

    def has_ext_modules(self):
        return self.ext_modules and len(self.ext_modules) > 0

    def has_c_libraries(self):
        return self.libraries and len(self.libraries) > 0

    def has_modules(self):
        return self.has_pure_modules() or self.has_ext_modules()

    def has_headers(self):
        return self.headers and len(self.headers) > 0

    def has_scripts(self):
        return self.scripts and len(self.scripts) > 0

    def has_data_files(self):
        return self.data_files and len(self.data_files) > 0

    def is_pure(self):
        return (
            self.has_pure_modules()
            and not self.has_ext_modules()
            and not self.has_c_libraries()
        )

    # -- Metadata query methods ----------------------------------------

    # If you're looking for 'get_name()', 'get_version()', and so forth,
    # they are defined in a sneaky way: the constructor binds self.get_XXX
    # to self.metadata.get_XXX.  The actual code is in the
    # DistributionMetadata class, below.


class DistributionMetadata:
    """Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    """

    _METHOD_BASENAMES = (
        "name",
        "version",
        "author",
        "author_email",
        "maintainer",
        "maintainer_email",
        "url",
        "license",
        "description",
        "long_description",
        "keywords",
        "platforms",
        "fullname",
        "contact",
        "contact_email",
        "classifiers",
        "download_url",
        # PEP 314
        "provides",
        "requires",
        "obsoletes",
    )

    def __init__(self, path=None):
        if path is not None:
            self.read_pkg_file(open(path))
        else:
            self.name = None
            self.version = None
            self.author = None
            self.author_email = None
            self.maintainer = None
            self.maintainer_email = None
            self.url = None
            self.license = None
            self.description = None
            self.long_description = None
            self.keywords = None
            self.platforms = None
            self.classifiers = None
            self.download_url = None
            # PEP 314
            self.provides = None
            self.requires = None
            self.obsoletes = None

    def read_pkg_file(self, file):
        """Reads the metadata values from a file object."""
        msg = message_from_file(file)

        def _read_field(name):
            value = msg[name]
            if value and value != "UNKNOWN":
                return value

        def _read_list(name):
            values = msg.get_all(name, None)
            if values == []:
                return None
            return values

        metadata_version = msg['metadata-version']
        self.name = _read_field('name')
        self.version = _read_field('version')
        self.description = _read_field('summary')
        # we are filling author only.
        self.author = _read_field('author')
        self.maintainer = None
        self.author_email = _read_field('author-email')
        self.maintainer_email = None
        self.url = _read_field('home-page')
        self.license = _read_field('license')

        if 'download-url' in msg:
            self.download_url = _read_field('download-url')
        else:
            self.download_url = None

        self.long_description = _read_field('description')
        self.description = _read_field('summary')

        if 'keywords' in msg:
            self.keywords = _read_field('keywords').split(',')

        self.platforms = _read_list('platform')
        self.classifiers = _read_list('classifier')

        # PEP 314 - these fields only exist in 1.1
        if metadata_version == '1.1':
            self.requires = _read_list('requires')
            self.provides = _read_list('provides')
            self.obsoletes = _read_list('obsoletes')
        else:
            self.requires = None
            self.provides = None
            self.obsoletes = None

    def write_pkg_info(self, base_dir):
        """Write the PKG-INFO file into the release tree."""
        with open(
            os.path.join(base_dir, 'PKG-INFO'), 'w', encoding='UTF-8'
        ) as pkg_info:
            self.write_pkg_file(pkg_info)

    def write_pkg_file(self, file):
        """Write the PKG-INFO format data to a file object."""
        version = '1.0'
        if (
            self.provides
            or self.requires
            or self.obsoletes
            or self.classifiers
            or self.download_url
        ):
            version = '1.1'

        # required fields
        file.write('Metadata-Version: %s\n' % version)
        file.write('Name: %s\n' % self.get_name())
        file.write('Version: %s\n' % self.get_version())

        def maybe_write(header, val):
            if val:
                file.write(f"{header}: {val}\n")

        # optional fields
        maybe_write("Summary", self.get_description())
        maybe_write("Home-page", self.get_url())
        maybe_write("Author", self.get_contact())
        maybe_write("Author-email", self.get_contact_email())
        maybe_write("License", self.get_license())
        maybe_write("Download-URL", self.download_url)
        maybe_write("Description", rfc822_escape(self.get_long_description() or ""))
        maybe_write("Keywords", ",".join(self.get_keywords()))

        self._write_list(file, 'Platform', self.get_platforms())
        self._write_list(file, 'Classifier', self.get_classifiers())

        # PEP 314
        self._write_list(file, 'Requires', self.get_requires())
        self._write_list(file, 'Provides', self.get_provides())
        self._write_list(file, 'Obsoletes', self.get_obsoletes())

    def _write_list(self, file, name, values):
        values = values or []
        for value in values:
            file.write('{}: {}\n'.format(name, value))

    # -- Metadata query methods ----------------------------------------

    def get_name(self):
        return self.name or "UNKNOWN"

    def get_version(self):
        return self.version or "0.0.0"

    def get_fullname(self):
        return "{}-{}".format(self.get_name(), self.get_version())

    def get_author(self):
        return self.author

    def get_author_email(self):
        return self.author_email

    def get_maintainer(self):
        return self.maintainer

    def get_maintainer_email(self):
        return self.maintainer_email

    def get_contact(self):
        return self.maintainer or self.author

    def get_contact_email(self):
        return self.maintainer_email or self.author_email

    def get_url(self):
        return self.url

    def get_license(self):
        return self.license

    get_licence = get_license

    def get_description(self):
        return self.description

    def get_long_description(self):
        return self.long_description

    def get_keywords(self):
        return self.keywords or []

    def set_keywords(self, value):
        self.keywords = _ensure_list(value, 'keywords')

    def get_platforms(self):
        return self.platforms

    def set_platforms(self, value):
        self.platforms = _ensure_list(value, 'platforms')

    def get_classifiers(self):
        return self.classifiers or []

    def set_classifiers(self, value):
        self.classifiers = _ensure_list(value, 'classifiers')

    def get_download_url(self):
        return self.download_url

    # PEP 314
    def get_requires(self):
        return self.requires or []

    def set_requires(self, value):
        import distutils.versionpredicate

        for v in value:
            distutils.versionpredicate.VersionPredicate(v)
        self.requires = list(value)

    def get_provides(self):
        return self.provides or []

    def set_provides(self, value):
        value = [v.strip() for v in value]
        for v in value:
            import distutils.versionpredicate

            distutils.versionpredicate.split_provision(v)
        self.provides = value

    def get_obsoletes(self):
        return self.obsoletes or []

    def set_obsoletes(self, value):
        import distutils.versionpredicate

        for v in value:
            distutils.versionpredicate.VersionPredicate(v)
        self.obsoletes = list(value)


def fix_help_options(options):
    """Convert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    """
    new_options = []
    for help_tuple in options:
        new_options.append(help_tuple[0:3])
    return new_options
PK|5ZeIEE7Lib/site-packages/setuptools/_distutils/fancy_getopt.pynuW+A"""distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
"""

import sys
import string
import re
import getopt
from distutils.errors import DistutilsGetoptError, DistutilsArgError

# Much like command_re in distutils.core, this is close to but not quite
# the same as a Python NAME -- except, in the spirit of most GNU
# utilities, we use '-' in place of '_'.  (The spirit of LISP lives on!)
# The similarities to NAME are again not a coincidence...
longopt_pat = r'[a-zA-Z](?:[a-zA-Z0-9-]*)'
longopt_re = re.compile(r'^%s$' % longopt_pat)

# For recognizing "negative alias" options, eg. "quiet=!verbose"
neg_alias_re = re.compile("^({})=!({})$".format(longopt_pat, longopt_pat))

# This is used to translate long options to legitimate Python identifiers
# (for use as attributes of some object).
longopt_xlate = str.maketrans('-', '_')


class FancyGetopt:
    """Wrapper around the standard 'getopt()' module that provides some
    handy extra functionality:
      * short and long options are tied together
      * options have help strings, and help text can be assembled
        from them
      * options set attributes of a passed-in object
      * boolean options can have "negative aliases" -- eg. if
        --quiet is the "negative alias" of --verbose, then "--quiet"
        on the command line sets 'verbose' to false
    """

    def __init__(self, option_table=None):
        # The option table is (currently) a list of tuples.  The
        # tuples may have 3 or four values:
        #   (long_option, short_option, help_string [, repeatable])
        # if an option takes an argument, its long_option should have '='
        # appended; short_option should just be a single character, no ':'
        # in any case.  If a long_option doesn't have a corresponding
        # short_option, short_option should be None.  All option tuples
        # must have long options.
        self.option_table = option_table

        # 'option_index' maps long option names to entries in the option
        # table (ie. those 3-tuples).
        self.option_index = {}
        if self.option_table:
            self._build_index()

        # 'alias' records (duh) alias options; {'foo': 'bar'} means
        # --foo is an alias for --bar
        self.alias = {}

        # 'negative_alias' keeps track of options that are the boolean
        # opposite of some other option
        self.negative_alias = {}

        # These keep track of the information in the option table.  We
        # don't actually populate these structures until we're ready to
        # parse the command-line, since the 'option_table' passed in here
        # isn't necessarily the final word.
        self.short_opts = []
        self.long_opts = []
        self.short2long = {}
        self.attr_name = {}
        self.takes_arg = {}

        # And 'option_order' is filled up in 'getopt()'; it records the
        # original order of options (and their values) on the command-line,
        # but expands short options, converts aliases, etc.
        self.option_order = []

    def _build_index(self):
        self.option_index.clear()
        for option in self.option_table:
            self.option_index[option[0]] = option

    def set_option_table(self, option_table):
        self.option_table = option_table
        self._build_index()

    def add_option(self, long_option, short_option=None, help_string=None):
        if long_option in self.option_index:
            raise DistutilsGetoptError(
                "option conflict: already an option '%s'" % long_option
            )
        else:
            option = (long_option, short_option, help_string)
            self.option_table.append(option)
            self.option_index[long_option] = option

    def has_option(self, long_option):
        """Return true if the option table for this parser has an
        option with long name 'long_option'."""
        return long_option in self.option_index

    def get_attr_name(self, long_option):
        """Translate long option name 'long_option' to the form it
        has as an attribute of some object: ie., translate hyphens
        to underscores."""
        return long_option.translate(longopt_xlate)

    def _check_alias_dict(self, aliases, what):
        assert isinstance(aliases, dict)
        for (alias, opt) in aliases.items():
            if alias not in self.option_index:
                raise DistutilsGetoptError(
                    ("invalid %s '%s': " "option '%s' not defined")
                    % (what, alias, alias)
                )
            if opt not in self.option_index:
                raise DistutilsGetoptError(
                    ("invalid %s '%s': " "aliased option '%s' not defined")
                    % (what, alias, opt)
                )

    def set_aliases(self, alias):
        """Set the aliases for this option parser."""
        self._check_alias_dict(alias, "alias")
        self.alias = alias

    def set_negative_aliases(self, negative_alias):
        """Set the negative aliases for this option parser.
        'negative_alias' should be a dictionary mapping option names to
        option names, both the key and value must already be defined
        in the option table."""
        self._check_alias_dict(negative_alias, "negative alias")
        self.negative_alias = negative_alias

    def _grok_option_table(self):  # noqa: C901
        """Populate the various data structures that keep tabs on the
        option table.  Called by 'getopt()' before it can do anything
        worthwhile.
        """
        self.long_opts = []
        self.short_opts = []
        self.short2long.clear()
        self.repeat = {}

        for option in self.option_table:
            if len(option) == 3:
                long, short, help = option
                repeat = 0
            elif len(option) == 4:
                long, short, help, repeat = option
            else:
                # the option table is part of the code, so simply
                # assert that it is correct
                raise ValueError("invalid option tuple: {!r}".format(option))

            # Type- and value-check the option names
            if not isinstance(long, str) or len(long) < 2:
                raise DistutilsGetoptError(
                    ("invalid long option '%s': " "must be a string of length >= 2")
                    % long
                )

            if not ((short is None) or (isinstance(short, str) and len(short) == 1)):
                raise DistutilsGetoptError(
                    "invalid short option '%s': "
                    "must a single character or None" % short
                )

            self.repeat[long] = repeat
            self.long_opts.append(long)

            if long[-1] == '=':  # option takes an argument?
                if short:
                    short = short + ':'
                long = long[0:-1]
                self.takes_arg[long] = 1
            else:
                # Is option is a "negative alias" for some other option (eg.
                # "quiet" == "!verbose")?
                alias_to = self.negative_alias.get(long)
                if alias_to is not None:
                    if self.takes_arg[alias_to]:
                        raise DistutilsGetoptError(
                            "invalid negative alias '%s': "
                            "aliased option '%s' takes a value" % (long, alias_to)
                        )

                    self.long_opts[-1] = long  # XXX redundant?!
                self.takes_arg[long] = 0

            # If this is an alias option, make sure its "takes arg" flag is
            # the same as the option it's aliased to.
            alias_to = self.alias.get(long)
            if alias_to is not None:
                if self.takes_arg[long] != self.takes_arg[alias_to]:
                    raise DistutilsGetoptError(
                        "invalid alias '%s': inconsistent with "
                        "aliased option '%s' (one of them takes a value, "
                        "the other doesn't" % (long, alias_to)
                    )

            # Now enforce some bondage on the long option name, so we can
            # later translate it to an attribute name on some object.  Have
            # to do this a bit late to make sure we've removed any trailing
            # '='.
            if not longopt_re.match(long):
                raise DistutilsGetoptError(
                    "invalid long option name '%s' "
                    "(must be letters, numbers, hyphens only" % long
                )

            self.attr_name[long] = self.get_attr_name(long)
            if short:
                self.short_opts.append(short)
                self.short2long[short[0]] = long

    def getopt(self, args=None, object=None):  # noqa: C901
        """Parse command-line options in args. Store as attributes on object.

        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
        'object' is None or not supplied, creates a new OptionDummy
        object, stores option values there, and returns a tuple (args,
        object).  If 'object' is supplied, it is modified in place and
        'getopt()' just returns 'args'; in both cases, the returned
        'args' is a modified copy of the passed-in 'args' list, which
        is left untouched.
        """
        if args is None:
            args = sys.argv[1:]
        if object is None:
            object = OptionDummy()
            created_object = True
        else:
            created_object = False

        self._grok_option_table()

        short_opts = ' '.join(self.short_opts)
        try:
            opts, args = getopt.getopt(args, short_opts, self.long_opts)
        except getopt.error as msg:
            raise DistutilsArgError(msg)

        for opt, val in opts:
            if len(opt) == 2 and opt[0] == '-':  # it's a short option
                opt = self.short2long[opt[1]]
            else:
                assert len(opt) > 2 and opt[:2] == '--'
                opt = opt[2:]

            alias = self.alias.get(opt)
            if alias:
                opt = alias

            if not self.takes_arg[opt]:  # boolean option?
                assert val == '', "boolean option can't have value"
                alias = self.negative_alias.get(opt)
                if alias:
                    opt = alias
                    val = 0
                else:
                    val = 1

            attr = self.attr_name[opt]
            # The only repeating option at the moment is 'verbose'.
            # It has a negative option -q quiet, which should set verbose = 0.
            if val and self.repeat.get(attr) is not None:
                val = getattr(object, attr, 0) + 1
            setattr(object, attr, val)
            self.option_order.append((opt, val))

        # for opts
        if created_object:
            return args, object
        else:
            return args

    def get_option_order(self):
        """Returns the list of (option, value) tuples processed by the
        previous run of 'getopt()'.  Raises RuntimeError if
        'getopt()' hasn't been called yet.
        """
        if self.option_order is None:
            raise RuntimeError("'getopt()' hasn't been called yet")
        else:
            return self.option_order

    def generate_help(self, header=None):  # noqa: C901
        """Generate help text (a list of strings, one per suggested line of
        output) from the option table for this FancyGetopt object.
        """
        # Blithely assume the option table is good: probably wouldn't call
        # 'generate_help()' unless you've already called 'getopt()'.

        # First pass: determine maximum length of long option names
        max_opt = 0
        for option in self.option_table:
            long = option[0]
            short = option[1]
            ell = len(long)
            if long[-1] == '=':
                ell = ell - 1
            if short is not None:
                ell = ell + 5  # " (-x)" where short == 'x'
            if ell > max_opt:
                max_opt = ell

        opt_width = max_opt + 2 + 2 + 2  # room for indent + dashes + gutter

        # Typical help block looks like this:
        #   --foo       controls foonabulation
        # Help block for longest option looks like this:
        #   --flimflam  set the flim-flam level
        # and with wrapped text:
        #   --flimflam  set the flim-flam level (must be between
        #               0 and 100, except on Tuesdays)
        # Options with short names will have the short name shown (but
        # it doesn't contribute to max_opt):
        #   --foo (-f)  controls foonabulation
        # If adding the short option would make the left column too wide,
        # we push the explanation off to the next line
        #   --flimflam (-l)
        #               set the flim-flam level
        # Important parameters:
        #   - 2 spaces before option block start lines
        #   - 2 dashes for each long option name
        #   - min. 2 spaces between option and explanation (gutter)
        #   - 5 characters (incl. space) for short option name

        # Now generate lines of help text.  (If 80 columns were good enough
        # for Jesus, then 78 columns are good enough for me!)
        line_width = 78
        text_width = line_width - opt_width
        big_indent = ' ' * opt_width
        if header:
            lines = [header]
        else:
            lines = ['Option summary:']

        for option in self.option_table:
            long, short, help = option[:3]
            text = wrap_text(help, text_width)
            if long[-1] == '=':
                long = long[0:-1]

            # Case 1: no short option at all (makes life easy)
            if short is None:
                if text:
                    lines.append("  --%-*s  %s" % (max_opt, long, text[0]))
                else:
                    lines.append("  --%-*s  " % (max_opt, long))

            # Case 2: we have a short option, so we have to include it
            # just after the long option
            else:
                opt_names = "{} (-{})".format(long, short)
                if text:
                    lines.append("  --%-*s  %s" % (max_opt, opt_names, text[0]))
                else:
                    lines.append("  --%-*s" % opt_names)

            for ell in text[1:]:
                lines.append(big_indent + ell)
        return lines

    def print_help(self, header=None, file=None):
        if file is None:
            file = sys.stdout
        for line in self.generate_help(header):
            file.write(line + "\n")


def fancy_getopt(options, negative_opt, object, args):
    parser = FancyGetopt(options)
    parser.set_negative_aliases(negative_opt)
    return parser.getopt(args, object)


WS_TRANS = {ord(_wschar): ' ' for _wschar in string.whitespace}


def wrap_text(text, width):
    """wrap_text(text : string, width : int) -> [string]

    Split 'text' into multiple lines of no more than 'width' characters
    each, and return the list of strings that results.
    """
    if text is None:
        return []
    if len(text) <= width:
        return [text]

    text = text.expandtabs()
    text = text.translate(WS_TRANS)
    chunks = re.split(r'( +|-+)', text)
    chunks = [ch for ch in chunks if ch]  # ' - ' results in empty strings
    lines = []

    while chunks:
        cur_line = []  # list of chunks (to-be-joined)
        cur_len = 0  # length of current line

        while chunks:
            ell = len(chunks[0])
            if cur_len + ell <= width:  # can squeeze (at least) this chunk in
                cur_line.append(chunks[0])
                del chunks[0]
                cur_len = cur_len + ell
            else:  # this line is full
                # drop last chunk if all space
                if cur_line and cur_line[-1][0] == ' ':
                    del cur_line[-1]
                break

        if chunks:  # any chunks left to process?
            # if the current line is still empty, then we had a single
            # chunk that's too big too fit on a line -- so we break
            # down and break it up at the line width
            if cur_len == 0:
                cur_line.append(chunks[0][0:width])
                chunks[0] = chunks[0][width:]

            # all-whitespace chunks at the end of a line can be discarded
            # (and we know from the re.split above that if a chunk has
            # *any* whitespace, it is *all* whitespace)
            if chunks[0][0] == ' ':
                del chunks[0]

        # and store this line in the list-of-all-lines -- as a single
        # string, of course!
        lines.append(''.join(cur_line))

    return lines


def translate_longopt(opt):
    """Convert a long option name to a valid Python identifier by
    changing "-" to "_".
    """
    return opt.translate(longopt_xlate)


class OptionDummy:
    """Dummy class just used as a place to hold command-line option
    values as instance attributes."""

    def __init__(self, options=[]):
        """Create a new OptionDummy instance.  The attributes listed in
        'options' will be initialized to None."""
        for opt in options:
            setattr(self, opt, None)


if __name__ == "__main__":
    text = """\
Tra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].)"""

    for w in (10, 20, 30, 40):
        print("width: %d" % w)
        print("\n".join(wrap_text(text, w)))
        print()
PK|5ZJ

0Lib/site-packages/setuptools/_distutils/spawn.pynuW+A"""distutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
"""

import sys
import os
import subprocess

from distutils.errors import DistutilsExecError
from distutils.debug import DEBUG
from distutils import log


def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None):  # noqa: C901
    """Run another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    """
    # cmd is documented as a list, but just in case some code passes a tuple
    # in, protect our %-formatting code against horrible death
    cmd = list(cmd)

    log.info(subprocess.list2cmdline(cmd))
    if dry_run:
        return

    if search_path:
        executable = find_executable(cmd[0])
        if executable is not None:
            cmd[0] = executable

    env = env if env is not None else dict(os.environ)

    if sys.platform == 'darwin':
        from distutils.util import MACOSX_VERSION_VAR, get_macosx_target_ver

        macosx_target_ver = get_macosx_target_ver()
        if macosx_target_ver:
            env[MACOSX_VERSION_VAR] = macosx_target_ver

    try:
        proc = subprocess.Popen(cmd, env=env)
        proc.wait()
        exitcode = proc.returncode
    except OSError as exc:
        if not DEBUG:
            cmd = cmd[0]
        raise DistutilsExecError(
            "command {!r} failed: {}".format(cmd, exc.args[-1])
        ) from exc

    if exitcode:
        if not DEBUG:
            cmd = cmd[0]
        raise DistutilsExecError(
            "command {!r} failed with exit code {}".format(cmd, exitcode)
        )


def find_executable(executable, path=None):
    """Tries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    """
    _, ext = os.path.splitext(executable)
    if (sys.platform == 'win32') and (ext != '.exe'):
        executable = executable + '.exe'

    if os.path.isfile(executable):
        return executable

    if path is None:
        path = os.environ.get('PATH', None)
        if path is None:
            try:
                path = os.confstr("CS_PATH")
            except (AttributeError, ValueError):
                # os.confstr() or CS_PATH is not available
                path = os.defpath
        # bpo-35755: Don't use os.defpath if the PATH environment variable is
        # set to an empty string

    # PATH='' doesn't match, whereas PATH=':' looks in the current directory
    if not path:
        return None

    paths = path.split(os.pathsep)
    for p in paths:
        f = os.path.join(p, executable)
        if os.path.isfile(f):
            # the file exists, we have a shot at spawn working
            return f
    return None
PK|5Z_H%0Lib/site-packages/setuptools/_distutils/debug.pynuW+Aimport os

# If DISTUTILS_DEBUG is anything other than the empty string, we run in
# debug mode.
DEBUG = os.environ.get('DISTUTILS_DEBUG')
PK|5Zpf==8Lib/site-packages/setuptools/_distutils/unixccompiler.pynuW+A"""distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
"""

import os
import sys
import re
import shlex
import itertools

from distutils import sysconfig
from distutils.dep_util import newer
from distutils.ccompiler import CCompiler, gen_preprocess_options, gen_lib_options
from distutils.errors import DistutilsExecError, CompileError, LibError, LinkError
from distutils import log
from ._macos_compat import compiler_fixup

# XXX Things not currently handled:
#   * optimization/debug/warning flags; we just use whatever's in Python's
#     Makefile and live with it.  Is this adequate?  If not, we might
#     have to have a bunch of subclasses GNUCCompiler, SGICCompiler,
#     SunCCompiler, and I suspect down that road lies madness.
#   * even if we don't know a warning flag from an optimization flag,
#     we need some way for outsiders to feed preprocessor/compiler/linker
#     flags in to us -- eg. a sysadmin might want to mandate certain flags
#     via a site config file, or a user might want to set something for
#     compiling this module distribution only via the setup.py command
#     line, whatever.  As long as these options come from something on the
#     current system, they can be as system-dependent as they like, and we
#     should just happily stuff them into the preprocessor/compiler/linker
#     options and carry on.


def _split_env(cmd):
    """
    For macOS, split command into 'env' portion (if any)
    and the rest of the linker command.

    >>> _split_env(['a', 'b', 'c'])
    ([], ['a', 'b', 'c'])
    >>> _split_env(['/usr/bin/env', 'A=3', 'gcc'])
    (['/usr/bin/env', 'A=3'], ['gcc'])
    """
    pivot = 0
    if os.path.basename(cmd[0]) == "env":
        pivot = 1
        while '=' in cmd[pivot]:
            pivot += 1
    return cmd[:pivot], cmd[pivot:]


def _split_aix(cmd):
    """
    AIX platforms prefix the compiler with the ld_so_aix
    script, so split that from the linker command.

    >>> _split_aix(['a', 'b', 'c'])
    ([], ['a', 'b', 'c'])
    >>> _split_aix(['/bin/foo/ld_so_aix', 'gcc'])
    (['/bin/foo/ld_so_aix'], ['gcc'])
    """
    pivot = os.path.basename(cmd[0]) == 'ld_so_aix'
    return cmd[:pivot], cmd[pivot:]


def _linker_params(linker_cmd, compiler_cmd):
    """
    The linker command usually begins with the compiler
    command (possibly multiple elements), followed by zero or more
    params for shared library building.

    If the LDSHARED env variable overrides the linker command,
    however, the commands may not match.

    Return the best guess of the linker parameters by stripping
    the linker command. If the compiler command does not
    match the linker command, assume the linker command is
    just the first element.

    >>> _linker_params('gcc foo bar'.split(), ['gcc'])
    ['foo', 'bar']
    >>> _linker_params('gcc foo bar'.split(), ['other'])
    ['foo', 'bar']
    >>> _linker_params('ccache gcc foo bar'.split(), 'ccache gcc'.split())
    ['foo', 'bar']
    >>> _linker_params(['gcc'], ['gcc'])
    []
    """
    c_len = len(compiler_cmd)
    pivot = c_len if linker_cmd[:c_len] == compiler_cmd else 1
    return linker_cmd[pivot:]


class UnixCCompiler(CCompiler):

    compiler_type = 'unix'

    # These are used by CCompiler in two places: the constructor sets
    # instance attributes 'preprocessor', 'compiler', etc. from them, and
    # 'set_executable()' allows any of these to be set.  The defaults here
    # are pretty generic; they will probably have to be set by an outsider
    # (eg. using information discovered by the sysconfig about building
    # Python extensions).
    executables = {
        'preprocessor': None,
        'compiler': ["cc"],
        'compiler_so': ["cc"],
        'compiler_cxx': ["cc"],
        'linker_so': ["cc", "-shared"],
        'linker_exe': ["cc"],
        'archiver': ["ar", "-cr"],
        'ranlib': None,
    }

    if sys.platform[:6] == "darwin":
        executables['ranlib'] = ["ranlib"]

    # Needed for the filename generation methods provided by the base
    # class, CCompiler.  NB. whoever instantiates/uses a particular
    # UnixCCompiler instance should set 'shared_lib_ext' -- we set a
    # reasonable common default here, but it's not necessarily used on all
    # Unices!

    src_extensions = [".c", ".C", ".cc", ".cxx", ".cpp", ".m"]
    obj_extension = ".o"
    static_lib_extension = ".a"
    shared_lib_extension = ".so"
    dylib_lib_extension = ".dylib"
    xcode_stub_lib_extension = ".tbd"
    static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s"
    xcode_stub_lib_format = dylib_lib_format
    if sys.platform == "cygwin":
        exe_extension = ".exe"

    def preprocess(
        self,
        source,
        output_file=None,
        macros=None,
        include_dirs=None,
        extra_preargs=None,
        extra_postargs=None,
    ):
        fixed_args = self._fix_compile_args(None, macros, include_dirs)
        ignore, macros, include_dirs = fixed_args
        pp_opts = gen_preprocess_options(macros, include_dirs)
        pp_args = self.preprocessor + pp_opts
        if output_file:
            pp_args.extend(['-o', output_file])
        if extra_preargs:
            pp_args[:0] = extra_preargs
        if extra_postargs:
            pp_args.extend(extra_postargs)
        pp_args.append(source)

        # reasons to preprocess:
        # - force is indicated
        # - output is directed to stdout
        # - source file is newer than the target
        preprocess = self.force or output_file is None or newer(source, output_file)
        if not preprocess:
            return

        if output_file:
            self.mkpath(os.path.dirname(output_file))

        try:
            self.spawn(pp_args)
        except DistutilsExecError as msg:
            raise CompileError(msg)

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs)
        try:
            self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
        except DistutilsExecError as msg:
            raise CompileError(msg)

    def create_static_lib(
        self, objects, output_libname, output_dir=None, debug=0, target_lang=None
    ):
        objects, output_dir = self._fix_object_args(objects, output_dir)

        output_filename = self.library_filename(output_libname, output_dir=output_dir)

        if self._need_link(objects, output_filename):
            self.mkpath(os.path.dirname(output_filename))
            self.spawn(self.archiver + [output_filename] + objects + self.objects)

            # Not many Unices required ranlib anymore -- SunOS 4.x is, I
            # think the only major Unix that does.  Maybe we need some
            # platform intelligence here to skip ranlib if it's not
            # needed -- or maybe Python's configure script took care of
            # it for us, hence the check for leading colon.
            if self.ranlib:
                try:
                    self.spawn(self.ranlib + [output_filename])
                except DistutilsExecError as msg:
                    raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def link(
        self,
        target_desc,
        objects,
        output_filename,
        output_dir=None,
        libraries=None,
        library_dirs=None,
        runtime_library_dirs=None,
        export_symbols=None,
        debug=0,
        extra_preargs=None,
        extra_postargs=None,
        build_temp=None,
        target_lang=None,
    ):
        objects, output_dir = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
        libraries, library_dirs, runtime_library_dirs = fixed_args

        lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
        if not isinstance(output_dir, (str, type(None))):
            raise TypeError("'output_dir' must be a string or None")
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            ld_args = objects + self.objects + lib_opts + ['-o', output_filename]
            if debug:
                ld_args[:0] = ['-g']
            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)
            self.mkpath(os.path.dirname(output_filename))
            try:
                # Select a linker based on context: linker_exe when
                # building an executable or linker_so (with shared options)
                # when building a shared library.
                building_exe = target_desc == CCompiler.EXECUTABLE
                linker = (self.linker_exe if building_exe else self.linker_so)[:]

                if target_lang == "c++" and self.compiler_cxx:
                    env, linker_ne = _split_env(linker)
                    aix, linker_na = _split_aix(linker_ne)
                    _, compiler_cxx_ne = _split_env(self.compiler_cxx)
                    _, linker_exe_ne = _split_env(self.linker_exe)

                    params = _linker_params(linker_na, linker_exe_ne)
                    linker = env + aix + compiler_cxx_ne + params

                linker = compiler_fixup(linker, ld_args)

                self.spawn(linker + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "-L" + dir

    def _is_gcc(self):
        cc_var = sysconfig.get_config_var("CC")
        compiler = os.path.basename(shlex.split(cc_var)[0])
        return "gcc" in compiler or "g++" in compiler

    def runtime_library_dir_option(self, dir):
        # XXX Hackish, at the very least.  See Python bug #445902:
        # http://sourceforge.net/tracker/index.php
        #   ?func=detail&aid=445902&group_id=5470&atid=105470
        # Linkers on different platforms need different options to
        # specify that directories need to be added to the list of
        # directories searched for dependencies when a dynamic library
        # is sought.  GCC on GNU systems (Linux, FreeBSD, ...) has to
        # be told to pass the -R option through to the linker, whereas
        # other compilers and gcc on other systems just know this.
        # Other compilers may need something slightly different.  At
        # this time, there's no way to determine this information from
        # the configuration data stored in the Python installation, so
        # we use this hack.
        if sys.platform[:6] == "darwin":
            from distutils.util import get_macosx_target_ver, split_version

            macosx_target_ver = get_macosx_target_ver()
            if macosx_target_ver and split_version(macosx_target_ver) >= [10, 5]:
                return "-Wl,-rpath," + dir
            else:  # no support for -rpath on earlier macOS versions
                return "-L" + dir
        elif sys.platform[:7] == "freebsd":
            return "-Wl,-rpath=" + dir
        elif sys.platform[:5] == "hp-ux":
            return [
                "-Wl,+s" if self._is_gcc() else "+s",
                "-L" + dir,
            ]

        # For all compilers, `-Wl` is the presumed way to
        # pass a compiler option to the linker and `-R` is
        # the way to pass an RPATH.
        if sysconfig.get_config_var("GNULD") == "yes":
            # GNU ld needs an extra option to get a RUNPATH
            # instead of just an RPATH.
            return "-Wl,--enable-new-dtags,-R" + dir
        else:
            return "-Wl,-R" + dir

    def library_option(self, lib):
        return "-l" + lib

    @staticmethod
    def _library_root(dir):
        """
        macOS users can specify an alternate SDK using'-isysroot'.
        Calculate the SDK root if it is specified.

        Note that, as of Xcode 7, Apple SDKs may contain textual stub
        libraries with .tbd extensions rather than the normal .dylib
        shared libraries installed in /.  The Apple compiler tool
        chain handles this transparently but it can cause problems
        for programs that are being built with an SDK and searching
        for specific libraries.  Callers of find_library_file need to
        keep in mind that the base filename of the returned SDK library
        file might have a different extension from that of the library
        file installed on the running system, for example:
          /Applications/Xcode.app/Contents/Developer/Platforms/
              MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
              usr/lib/libedit.tbd
        vs
          /usr/lib/libedit.dylib
        """
        cflags = sysconfig.get_config_var('CFLAGS')
        match = re.search(r'-isysroot\s*(\S+)', cflags)

        apply_root = (
            sys.platform == 'darwin'
            and match
            and (
                dir.startswith('/System/')
                or (dir.startswith('/usr/') and not dir.startswith('/usr/local/'))
            )
        )

        return os.path.join(match.group(1), dir[1:]) if apply_root else dir

    def find_library_file(self, dirs, lib, debug=0):
        r"""
        Second-guess the linker with not much hard
        data to go on: GCC seems to prefer the shared library, so
        assume that *all* Unix C compilers do,
        ignoring even GCC's "-static" option.

        >>> compiler = UnixCCompiler()
        >>> compiler._library_root = lambda dir: dir
        >>> monkeypatch = getfixture('monkeypatch')
        >>> monkeypatch.setattr(os.path, 'exists', lambda d: 'existing' in d)
        >>> dirs = ('/foo/bar/missing', '/foo/bar/existing')
        >>> compiler.find_library_file(dirs, 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.dylib'
        >>> compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.dylib'
        >>> monkeypatch.setattr(os.path, 'exists',
        ...     lambda d: 'existing' in d and '.a' in d)
        >>> compiler.find_library_file(dirs, 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.a'
        >>> compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
        '/foo/bar/existing/libabc.a'
        """
        lib_names = (
            self.library_filename(lib, lib_type=type)
            for type in 'dylib xcode_stub shared static'.split()
        )

        roots = map(self._library_root, dirs)

        searched = (
            os.path.join(root, lib_name)
            for root, lib_name in itertools.product(roots, lib_names)
        )

        found = filter(os.path.exists, searched)

        # Return None if it could not be found in any dir.
        return next(found, None)
PK|5Z1a553Lib/site-packages/setuptools/_distutils/filelist.pynuW+A"""distutils.filelist

Provides the FileList class, used for poking about the filesystem
and building lists of files.
"""

import os
import re
import fnmatch
import functools

from distutils.util import convert_path
from distutils.errors import DistutilsTemplateError, DistutilsInternalError
from distutils import log


class FileList:
    """A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.

    Instance attributes:
      dir
        directory from which files will be taken -- only used if
        'allfiles' not supplied to constructor
      files
        list of filenames currently being built/filtered/manipulated
      allfiles
        complete list of files under consideration (ie. without any
        filtering applied)
    """

    def __init__(self, warn=None, debug_print=None):
        # ignore argument to FileList, but keep them for backwards
        # compatibility
        self.allfiles = None
        self.files = []

    def set_allfiles(self, allfiles):
        self.allfiles = allfiles

    def findall(self, dir=os.curdir):
        self.allfiles = findall(dir)

    def debug_print(self, msg):
        """Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        """
        from distutils.debug import DEBUG

        if DEBUG:
            print(msg)

    # Collection methods

    def append(self, item):
        self.files.append(item)

    def extend(self, items):
        self.files.extend(items)

    def sort(self):
        # Not a strict lexical sort!
        sortable_files = sorted(map(os.path.split, self.files))
        self.files = []
        for sort_tuple in sortable_files:
            self.files.append(os.path.join(*sort_tuple))

    # Other miscellaneous utility methods

    def remove_duplicates(self):
        # Assumes list has been sorted!
        for i in range(len(self.files) - 1, 0, -1):
            if self.files[i] == self.files[i - 1]:
                del self.files[i]

    # "File template" methods

    def _parse_template_line(self, line):
        words = line.split()
        action = words[0]

        patterns = dir = dir_pattern = None

        if action in ('include', 'exclude', 'global-include', 'global-exclude'):
            if len(words) < 2:
                raise DistutilsTemplateError(
                    "'%s' expects   ..." % action
                )
            patterns = [convert_path(w) for w in words[1:]]
        elif action in ('recursive-include', 'recursive-exclude'):
            if len(words) < 3:
                raise DistutilsTemplateError(
                    "'%s' expects    ..." % action
                )
            dir = convert_path(words[1])
            patterns = [convert_path(w) for w in words[2:]]
        elif action in ('graft', 'prune'):
            if len(words) != 2:
                raise DistutilsTemplateError(
                    "'%s' expects a single " % action
                )
            dir_pattern = convert_path(words[1])
        else:
            raise DistutilsTemplateError("unknown action '%s'" % action)

        return (action, patterns, dir, dir_pattern)

    def process_template_line(self, line):  # noqa: C901
        # Parse the line: split it up, make sure the right number of words
        # is there, and return the relevant words.  'action' is always
        # defined: it's the first word of the line.  Which of the other
        # three are defined depends on the action; it'll be either
        # patterns, (dir and patterns), or (dir_pattern).
        (action, patterns, dir, dir_pattern) = self._parse_template_line(line)

        # OK, now we know that the action is valid and we have the
        # right number of words on the line for that action -- so we
        # can proceed with minimal error-checking.
        if action == 'include':
            self.debug_print("include " + ' '.join(patterns))
            for pattern in patterns:
                if not self.include_pattern(pattern, anchor=1):
                    log.warn("warning: no files found matching '%s'", pattern)

        elif action == 'exclude':
            self.debug_print("exclude " + ' '.join(patterns))
            for pattern in patterns:
                if not self.exclude_pattern(pattern, anchor=1):
                    log.warn(
                        (
                            "warning: no previously-included files "
                            "found matching '%s'"
                        ),
                        pattern,
                    )

        elif action == 'global-include':
            self.debug_print("global-include " + ' '.join(patterns))
            for pattern in patterns:
                if not self.include_pattern(pattern, anchor=0):
                    log.warn(
                        (
                            "warning: no files found matching '%s' "
                            "anywhere in distribution"
                        ),
                        pattern,
                    )

        elif action == 'global-exclude':
            self.debug_print("global-exclude " + ' '.join(patterns))
            for pattern in patterns:
                if not self.exclude_pattern(pattern, anchor=0):
                    log.warn(
                        (
                            "warning: no previously-included files matching "
                            "'%s' found anywhere in distribution"
                        ),
                        pattern,
                    )

        elif action == 'recursive-include':
            self.debug_print("recursive-include {} {}".format(dir, ' '.join(patterns)))
            for pattern in patterns:
                if not self.include_pattern(pattern, prefix=dir):
                    msg = (
                        "warning: no files found matching '%s' " "under directory '%s'"
                    )
                    log.warn(msg, pattern, dir)

        elif action == 'recursive-exclude':
            self.debug_print("recursive-exclude {} {}".format(dir, ' '.join(patterns)))
            for pattern in patterns:
                if not self.exclude_pattern(pattern, prefix=dir):
                    log.warn(
                        (
                            "warning: no previously-included files matching "
                            "'%s' found under directory '%s'"
                        ),
                        pattern,
                        dir,
                    )

        elif action == 'graft':
            self.debug_print("graft " + dir_pattern)
            if not self.include_pattern(None, prefix=dir_pattern):
                log.warn("warning: no directories found matching '%s'", dir_pattern)

        elif action == 'prune':
            self.debug_print("prune " + dir_pattern)
            if not self.exclude_pattern(None, prefix=dir_pattern):
                log.warn(
                    ("no previously-included directories found " "matching '%s'"),
                    dir_pattern,
                )
        else:
            raise DistutilsInternalError(
                "this cannot happen: invalid action '%s'" % action
            )

    # Filtering/selection methods

    def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0):
        """Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.  Patterns
        are not quite the same as implemented by the 'fnmatch' module: '*'
        and '?'  match non-special characters, where "special" is platform-
        dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found, False otherwise.
        """
        # XXX docstring lying about what the special chars are?
        files_found = False
        pattern_re = translate_pattern(pattern, anchor, prefix, is_regex)
        self.debug_print("include_pattern: applying regex r'%s'" % pattern_re.pattern)

        # delayed loading of allfiles list
        if self.allfiles is None:
            self.findall()

        for name in self.allfiles:
            if pattern_re.search(name):
                self.debug_print(" adding " + name)
                self.files.append(name)
                files_found = True
        return files_found

    def exclude_pattern(self, pattern, anchor=1, prefix=None, is_regex=0):
        """Remove strings (presumably filenames) from 'files' that match
        'pattern'.  Other parameters are the same as for
        'include_pattern()', above.
        The list 'self.files' is modified in place.
        Return True if files are found, False otherwise.
        """
        files_found = False
        pattern_re = translate_pattern(pattern, anchor, prefix, is_regex)
        self.debug_print("exclude_pattern: applying regex r'%s'" % pattern_re.pattern)
        for i in range(len(self.files) - 1, -1, -1):
            if pattern_re.search(self.files[i]):
                self.debug_print(" removing " + self.files[i])
                del self.files[i]
                files_found = True
        return files_found


# Utility functions


def _find_all_simple(path):
    """
    Find all files under 'path'
    """
    all_unique = _UniqueDirs.filter(os.walk(path, followlinks=True))
    results = (
        os.path.join(base, file) for base, dirs, files in all_unique for file in files
    )
    return filter(os.path.isfile, results)


class _UniqueDirs(set):
    """
    Exclude previously-seen dirs from walk results,
    avoiding infinite recursion.
    Ref https://bugs.python.org/issue44497.
    """

    def __call__(self, walk_item):
        """
        Given an item from an os.walk result, determine
        if the item represents a unique dir for this instance
        and if not, prevent further traversal.
        """
        base, dirs, files = walk_item
        stat = os.stat(base)
        candidate = stat.st_dev, stat.st_ino
        found = candidate in self
        if found:
            del dirs[:]
        self.add(candidate)
        return not found

    @classmethod
    def filter(cls, items):
        return filter(cls(), items)


def findall(dir=os.curdir):
    """
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    """
    files = _find_all_simple(dir)
    if dir == os.curdir:
        make_rel = functools.partial(os.path.relpath, start=dir)
        files = map(make_rel, files)
    return list(files)


def glob_to_re(pattern):
    """Translate a shell-like glob pattern to a regular expression; return
    a string containing the regex.  Differs from 'fnmatch.translate()' in
    that '*' does not match "special characters" (which are
    platform-specific).
    """
    pattern_re = fnmatch.translate(pattern)

    # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which
    # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix,
    # and by extension they shouldn't match such "special characters" under
    # any OS.  So change all non-escaped dots in the RE to match any
    # character except the special characters (currently: just os.sep).
    sep = os.sep
    if os.sep == '\\':
        # we're using a regex to manipulate a regex, so we need
        # to escape the backslash twice
        sep = r'\\\\'
    escaped = r'\1[^%s]' % sep
    pattern_re = re.sub(r'((? mtime2


# newer ()


def newer_pairwise(sources, targets):
    """Walk two filename lists in parallel, testing if each source is newer
    than its corresponding target.  Return a pair of lists (sources,
    targets) where source is newer than target, according to the semantics
    of 'newer()'.
    """
    if len(sources) != len(targets):
        raise ValueError("'sources' and 'targets' must be same length")

    # build a pair of lists (sources, targets) where  source is newer
    n_sources = []
    n_targets = []
    for i in range(len(sources)):
        if newer(sources[i], targets[i]):
            n_sources.append(sources[i])
            n_targets.append(targets[i])

    return (n_sources, n_targets)


# newer_pairwise ()


def newer_group(sources, target, missing='error'):
    """Return true if 'target' is out-of-date with respect to any file
    listed in 'sources'.  In other words, if 'target' exists and is newer
    than every file in 'sources', return false; otherwise return true.
    'missing' controls what we do when a source file is missing; the
    default ("error") is to blow up with an OSError from inside 'stat()';
    if it is "ignore", we silently drop any missing source files; if it is
    "newer", any missing source files make us assume that 'target' is
    out-of-date (this is handy in "dry-run" mode: it'll make you pretend to
    carry out commands that wouldn't work because inputs are missing, but
    that doesn't matter because you're not actually going to run the
    commands).
    """
    # If the target doesn't even exist, then it's definitely out-of-date.
    if not os.path.exists(target):
        return 1

    # Otherwise we have to find out the hard way: if *any* source file
    # is more recent than 'target', then 'target' is out-of-date and
    # we can immediately return true.  If we fall through to the end
    # of the loop, then 'target' is up-to-date and we return false.
    from stat import ST_MTIME

    target_mtime = os.stat(target)[ST_MTIME]
    for source in sources:
        if not os.path.exists(source):
            if missing == 'error':  # blow up when we stat() the file
                pass
            elif missing == 'ignore':  # missing source dropped from
                continue  # target's dependency list
            elif missing == 'newer':  # missing source means target is
                return 1  # out-of-date

        source_mtime = os.stat(source)[ST_MTIME]
        if source_mtime > target_mtime:
            return 1
    else:
        return 0


# newer_group ()
PK|5Z6{227Lib/site-packages/setuptools/_distutils/_collections.pynuW+Aimport collections
import itertools


# from jaraco.collections 3.5.1
class DictStack(list, collections.abc.Mapping):
    """
    A stack of dictionaries that behaves as a view on those dictionaries,
    giving preference to the last.

    >>> stack = DictStack([dict(a=1, c=2), dict(b=2, a=2)])
    >>> stack['a']
    2
    >>> stack['b']
    2
    >>> stack['c']
    2
    >>> len(stack)
    3
    >>> stack.push(dict(a=3))
    >>> stack['a']
    3
    >>> set(stack.keys()) == set(['a', 'b', 'c'])
    True
    >>> set(stack.items()) == set([('a', 3), ('b', 2), ('c', 2)])
    True
    >>> dict(**stack) == dict(stack) == dict(a=3, c=2, b=2)
    True
    >>> d = stack.pop()
    >>> stack['a']
    2
    >>> d = stack.pop()
    >>> stack['a']
    1
    >>> stack.get('b', None)
    >>> 'c' in stack
    True
    """

    def __iter__(self):
        dicts = list.__iter__(self)
        return iter(set(itertools.chain.from_iterable(c.keys() for c in dicts)))

    def __getitem__(self, key):
        for scope in reversed(tuple(list.__iter__(self))):
            if key in scope:
                return scope[key]
        raise KeyError(key)

    push = list.append

    def __contains__(self, other):
        return collections.abc.Mapping.__contains__(self, other)

    def __len__(self):
        return len(list(iter(self)))
PK|5Z~((4Lib/site-packages/setuptools/_distutils/extension.pynuW+A"""distutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts."""

import os
import warnings

# This class is really only used by the "build_ext" command, so it might
# make sense to put it in distutils.command.build_ext.  However, that
# module is already big enough, and I want to make this class a bit more
# complex to simplify some common cases ("foo" module in "foo.c") and do
# better error-checking ("foo.c" actually exists).
#
# Also, putting this in build_ext.py means every setup script would have to
# import that large-ish module (indirectly, through distutils.core) in
# order to do anything.


class Extension:
    """Just a collection of attributes that describes an extension
    module and everything needed to build it (hopefully in a portable
    way, but there are hooks that let you be as unportable as you need).

    Instance attributes:
      name : string
        the full name of the extension, including any packages -- ie.
        *not* a filename or pathname, but Python dotted name
      sources : [string]
        list of source filenames, relative to the distribution root
        (where the setup script lives), in Unix form (slash-separated)
        for portability.  Source files may be C, C++, SWIG (.i),
        platform-specific resource files, or whatever else is recognized
        by the "build_ext" command as source for a Python extension.
      include_dirs : [string]
        list of directories to search for C/C++ header files (in Unix
        form for portability)
      define_macros : [(name : string, value : string|None)]
        list of macros to define; each macro is defined using a 2-tuple,
        where 'value' is either the string to define it to or None to
        define it without a particular value (equivalent of "#define
        FOO" in source or -DFOO on Unix C compiler command line)
      undef_macros : [string]
        list of macros to undefine explicitly
      library_dirs : [string]
        list of directories to search for C/C++ libraries at link time
      libraries : [string]
        list of library names (not filenames or paths) to link against
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)
      extra_objects : [string]
        list of extra files to link with (eg. object files not implied
        by 'sources', static library that must be explicitly specified,
        binary resource files, etc.)
      extra_compile_args : [string]
        any extra platform- and compiler-specific information to use
        when compiling the source files in 'sources'.  For platforms and
        compilers where "command line" makes sense, this is typically a
        list of command-line arguments, but for other platforms it could
        be anything.
      extra_link_args : [string]
        any extra platform- and compiler-specific information to use
        when linking object files together to create the extension (or
        to create a new static Python interpreter).  Similar
        interpretation as for 'extra_compile_args'.
      export_symbols : [string]
        list of symbols to be exported from a shared extension.  Not
        used on all platforms, and not generally necessary for Python
        extensions, which typically export exactly one symbol: "init" +
        extension_name.
      swig_opts : [string]
        any extra options to pass to SWIG if a source file has the .i
        extension.
      depends : [string]
        list of files that the extension depends on
      language : string
        extension language (i.e. "c", "c++", "objc"). Will be detected
        from the source extensions if not provided.
      optional : boolean
        specifies that a build failure in the extension should not abort the
        build process, but simply not install the failing extension.
    """

    # When adding arguments to this constructor, be sure to update
    # setup_keywords in core.py.
    def __init__(
        self,
        name,
        sources,
        include_dirs=None,
        define_macros=None,
        undef_macros=None,
        library_dirs=None,
        libraries=None,
        runtime_library_dirs=None,
        extra_objects=None,
        extra_compile_args=None,
        extra_link_args=None,
        export_symbols=None,
        swig_opts=None,
        depends=None,
        language=None,
        optional=None,
        **kw  # To catch unknown keywords
    ):
        if not isinstance(name, str):
            raise AssertionError("'name' must be a string")
        if not (isinstance(sources, list) and all(isinstance(v, str) for v in sources)):
            raise AssertionError("'sources' must be a list of strings")

        self.name = name
        self.sources = sources
        self.include_dirs = include_dirs or []
        self.define_macros = define_macros or []
        self.undef_macros = undef_macros or []
        self.library_dirs = library_dirs or []
        self.libraries = libraries or []
        self.runtime_library_dirs = runtime_library_dirs or []
        self.extra_objects = extra_objects or []
        self.extra_compile_args = extra_compile_args or []
        self.extra_link_args = extra_link_args or []
        self.export_symbols = export_symbols or []
        self.swig_opts = swig_opts or []
        self.depends = depends or []
        self.language = language
        self.optional = optional

        # If there are unknown keyword options, warn about them
        if len(kw) > 0:
            options = [repr(option) for option in kw]
            options = ', '.join(sorted(options))
            msg = "Unknown Extension options: %s" % options
            warnings.warn(msg)

    def __repr__(self):
        return '<{}.{}({!r}) at {:#x}>'.format(
            self.__class__.__module__,
            self.__class__.__qualname__,
            self.name,
            id(self),
        )


def read_setup_file(filename):  # noqa: C901
    """Reads a Setup file and returns Extension instances."""
    from distutils.sysconfig import parse_makefile, expand_makefile_vars, _variable_rx

    from distutils.text_file import TextFile
    from distutils.util import split_quoted

    # First pass over the file to gather "VAR = VALUE" assignments.
    vars = parse_makefile(filename)

    # Second pass to gobble up the real content: lines of the form
    #    ... [ ...] [ ...] [ ...]
    file = TextFile(
        filename,
        strip_comments=1,
        skip_blanks=1,
        join_lines=1,
        lstrip_ws=1,
        rstrip_ws=1,
    )
    try:
        extensions = []

        while True:
            line = file.readline()
            if line is None:  # eof
                break
            if _variable_rx.match(line):  # VAR=VALUE, handled in first pass
                continue

            if line[0] == line[-1] == "*":
                file.warn("'%s' lines not handled yet" % line)
                continue

            line = expand_makefile_vars(line, vars)
            words = split_quoted(line)

            # NB. this parses a slightly different syntax than the old
            # makesetup script: here, there must be exactly one extension per
            # line, and it must be the first word of the line.  I have no idea
            # why the old syntax supported multiple extensions per line, as
            # they all wind up being the same.

            module = words[0]
            ext = Extension(module, [])
            append_next_word = None

            for word in words[1:]:
                if append_next_word is not None:
                    append_next_word.append(word)
                    append_next_word = None
                    continue

                suffix = os.path.splitext(word)[1]
                switch = word[0:2]
                value = word[2:]

                if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"):
                    # hmm, should we do something about C vs. C++ sources?
                    # or leave it up to the CCompiler implementation to
                    # worry about?
                    ext.sources.append(word)
                elif switch == "-I":
                    ext.include_dirs.append(value)
                elif switch == "-D":
                    equals = value.find("=")
                    if equals == -1:  # bare "-DFOO" -- no value
                        ext.define_macros.append((value, None))
                    else:  # "-DFOO=blah"
                        ext.define_macros.append((value[0:equals], value[equals + 2 :]))
                elif switch == "-U":
                    ext.undef_macros.append(value)
                elif switch == "-C":  # only here 'cause makesetup has it!
                    ext.extra_compile_args.append(word)
                elif switch == "-l":
                    ext.libraries.append(value)
                elif switch == "-L":
                    ext.library_dirs.append(value)
                elif switch == "-R":
                    ext.runtime_library_dirs.append(value)
                elif word == "-rpath":
                    append_next_word = ext.runtime_library_dirs
                elif word == "-Xlinker":
                    append_next_word = ext.extra_link_args
                elif word == "-Xcompiler":
                    append_next_word = ext.extra_compile_args
                elif switch == "-u":
                    ext.extra_link_args.append(word)
                    if not value:
                        append_next_word = ext.extra_link_args
                elif suffix in (".a", ".so", ".sl", ".o", ".dylib"):
                    # NB. a really faithful emulation of makesetup would
                    # append a .o file to extra_objects only if it
                    # had a slash in it; otherwise, it would s/.o/.c/
                    # and append it to sources.  Hmmmm.
                    ext.extra_objects.append(word)
                else:
                    file.warn("unrecognized argument '%s'" % word)

            extensions.append(ext)
    finally:
        file.close()

    return extensions
PK|5Z3\@/@/4Lib/site-packages/setuptools/_distutils/text_file.pynuW+A"""text_file

provides the TextFile class, which gives an interface to text files
that (optionally) takes care of stripping comments, ignoring blank
lines, and joining lines with backslashes."""

import sys


class TextFile:
    """Provides a file-like object that takes care of all the things you
    commonly want to do when processing a text file that has some
    line-by-line syntax: strip comments (as long as "#" is your
    comment character), skip blank lines, join adjacent lines by
    escaping the newline (ie. backslash at end of line), strip
    leading and/or trailing whitespace.  All of these are optional
    and independently controllable.

    Provides a 'warn()' method so you can generate warning messages that
    report physical line number, even if the logical line in question
    spans multiple physical lines.  Also provides 'unreadline()' for
    implementing line-at-a-time lookahead.

    Constructor is called as:

        TextFile (filename=None, file=None, **options)

    It bombs (RuntimeError) if both 'filename' and 'file' are None;
    'filename' should be a string, and 'file' a file object (or
    something that provides 'readline()' and 'close()' methods).  It is
    recommended that you supply at least 'filename', so that TextFile
    can include it in warning messages.  If 'file' is not supplied,
    TextFile creates its own using 'io.open()'.

    The options are all boolean, and affect the value returned by
    'readline()':
      strip_comments [default: true]
        strip from "#" to end-of-line, as well as any whitespace
        leading up to the "#" -- unless it is escaped by a backslash
      lstrip_ws [default: false]
        strip leading whitespace from each line before returning it
      rstrip_ws [default: true]
        strip trailing whitespace (including line terminator!) from
        each line before returning it
      skip_blanks [default: true}
        skip lines that are empty *after* stripping comments and
        whitespace.  (If both lstrip_ws and rstrip_ws are false,
        then some lines may consist of solely whitespace: these will
        *not* be skipped, even if 'skip_blanks' is true.)
      join_lines [default: false]
        if a backslash is the last non-newline character on a line
        after stripping comments and whitespace, join the following line
        to it to form one "logical line"; if N consecutive lines end
        with a backslash, then N+1 physical lines will be joined to
        form one logical line.
      collapse_join [default: false]
        strip leading whitespace from lines that are joined to their
        predecessor; only matters if (join_lines and not lstrip_ws)
      errors [default: 'strict']
        error handler used to decode the file content

    Note that since 'rstrip_ws' can strip the trailing newline, the
    semantics of 'readline()' must differ from those of the builtin file
    object's 'readline()' method!  In particular, 'readline()' returns
    None for end-of-file: an empty string might just be a blank line (or
    an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is
    not."""

    default_options = {
        'strip_comments': 1,
        'skip_blanks': 1,
        'lstrip_ws': 0,
        'rstrip_ws': 1,
        'join_lines': 0,
        'collapse_join': 0,
        'errors': 'strict',
    }

    def __init__(self, filename=None, file=None, **options):
        """Construct a new TextFile object.  At least one of 'filename'
        (a string) and 'file' (a file-like object) must be supplied.
        They keyword argument options are described above and affect
        the values returned by 'readline()'."""
        if filename is None and file is None:
            raise RuntimeError(
                "you must supply either or both of 'filename' and 'file'"
            )

        # set values for all options -- either from client option hash
        # or fallback to default_options
        for opt in self.default_options.keys():
            if opt in options:
                setattr(self, opt, options[opt])
            else:
                setattr(self, opt, self.default_options[opt])

        # sanity check client option hash
        for opt in options.keys():
            if opt not in self.default_options:
                raise KeyError("invalid TextFile option '%s'" % opt)

        if file is None:
            self.open(filename)
        else:
            self.filename = filename
            self.file = file
            self.current_line = 0  # assuming that file is at BOF!

        # 'linebuf' is a stack of lines that will be emptied before we
        # actually read from the file; it's only populated by an
        # 'unreadline()' operation
        self.linebuf = []

    def open(self, filename):
        """Open a new file named 'filename'.  This overrides both the
        'filename' and 'file' arguments to the constructor."""
        self.filename = filename
        self.file = open(self.filename, errors=self.errors)
        self.current_line = 0

    def close(self):
        """Close the current file and forget everything we know about it
        (filename, current line number)."""
        file = self.file
        self.file = None
        self.filename = None
        self.current_line = None
        file.close()

    def gen_error(self, msg, line=None):
        outmsg = []
        if line is None:
            line = self.current_line
        outmsg.append(self.filename + ", ")
        if isinstance(line, (list, tuple)):
            outmsg.append("lines %d-%d: " % tuple(line))
        else:
            outmsg.append("line %d: " % line)
        outmsg.append(str(msg))
        return "".join(outmsg)

    def error(self, msg, line=None):
        raise ValueError("error: " + self.gen_error(msg, line))

    def warn(self, msg, line=None):
        """Print (to stderr) a warning message tied to the current logical
        line in the current file.  If the current logical line in the
        file spans multiple physical lines, the warning refers to the
        whole range, eg. "lines 3-5".  If 'line' supplied, it overrides
        the current line number; it may be a list or tuple to indicate a
        range of physical lines, or an integer for a single physical
        line."""
        sys.stderr.write("warning: " + self.gen_error(msg, line) + "\n")

    def readline(self):  # noqa: C901
        """Read and return a single logical line from the current file (or
        from an internal buffer if lines have previously been "unread"
        with 'unreadline()').  If the 'join_lines' option is true, this
        may involve reading multiple physical lines concatenated into a
        single string.  Updates the current line number, so calling
        'warn()' after 'readline()' emits a warning about the physical
        line(s) just read.  Returns None on end-of-file, since the empty
        string can occur if 'rstrip_ws' is true but 'strip_blanks' is
        not."""
        # If any "unread" lines waiting in 'linebuf', return the top
        # one.  (We don't actually buffer read-ahead data -- lines only
        # get put in 'linebuf' if the client explicitly does an
        # 'unreadline()'.
        if self.linebuf:
            line = self.linebuf[-1]
            del self.linebuf[-1]
            return line

        buildup_line = ''

        while True:
            # read the line, make it None if EOF
            line = self.file.readline()
            if line == '':
                line = None

            if self.strip_comments and line:

                # Look for the first "#" in the line.  If none, never
                # mind.  If we find one and it's the first character, or
                # is not preceded by "\", then it starts a comment --
                # strip the comment, strip whitespace before it, and
                # carry on.  Otherwise, it's just an escaped "#", so
                # unescape it (and any other escaped "#"'s that might be
                # lurking in there) and otherwise leave the line alone.

                pos = line.find("#")
                if pos == -1:  # no "#" -- no comments
                    pass

                # It's definitely a comment -- either "#" is the first
                # character, or it's elsewhere and unescaped.
                elif pos == 0 or line[pos - 1] != "\\":
                    # Have to preserve the trailing newline, because it's
                    # the job of a later step (rstrip_ws) to remove it --
                    # and if rstrip_ws is false, we'd better preserve it!
                    # (NB. this means that if the final line is all comment
                    # and has no trailing newline, we will think that it's
                    # EOF; I think that's OK.)
                    eol = (line[-1] == '\n') and '\n' or ''
                    line = line[0:pos] + eol

                    # If all that's left is whitespace, then skip line
                    # *now*, before we try to join it to 'buildup_line' --
                    # that way constructs like
                    #   hello \\
                    #   # comment that should be ignored
                    #   there
                    # result in "hello there".
                    if line.strip() == "":
                        continue
                else:  # it's an escaped "#"
                    line = line.replace("\\#", "#")

            # did previous line end with a backslash? then accumulate
            if self.join_lines and buildup_line:
                # oops: end of file
                if line is None:
                    self.warn("continuation line immediately precedes " "end-of-file")
                    return buildup_line

                if self.collapse_join:
                    line = line.lstrip()
                line = buildup_line + line

                # careful: pay attention to line number when incrementing it
                if isinstance(self.current_line, list):
                    self.current_line[1] = self.current_line[1] + 1
                else:
                    self.current_line = [self.current_line, self.current_line + 1]
            # just an ordinary line, read it as usual
            else:
                if line is None:  # eof
                    return None

                # still have to be careful about incrementing the line number!
                if isinstance(self.current_line, list):
                    self.current_line = self.current_line[1] + 1
                else:
                    self.current_line = self.current_line + 1

            # strip whitespace however the client wants (leading and
            # trailing, or one or the other, or neither)
            if self.lstrip_ws and self.rstrip_ws:
                line = line.strip()
            elif self.lstrip_ws:
                line = line.lstrip()
            elif self.rstrip_ws:
                line = line.rstrip()

            # blank line (whether we rstrip'ed or not)? skip to next line
            # if appropriate
            if (line == '' or line == '\n') and self.skip_blanks:
                continue

            if self.join_lines:
                if line[-1] == '\\':
                    buildup_line = line[:-1]
                    continue

                if line[-2:] == '\\\n':
                    buildup_line = line[0:-2] + '\n'
                    continue

            # well, I guess there's some actual content there: return it
            return line

    def readlines(self):
        """Read and return the list of all logical lines remaining in the
        current file."""
        lines = []
        while True:
            line = self.readline()
            if line is None:
                return lines
            lines.append(line)

    def unreadline(self, line):
        """Push 'line' (a string) onto an internal buffer that will be
        checked by future 'readline()' calls.  Handy for implementing
        a parser with line-at-a-time lookahead."""
        self.linebuf.append(line)
PK|5ZQII4Lib/site-packages/setuptools/_distutils/sysconfig.pynuW+A"""Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        
"""

import os
import re
import sys
import sysconfig
import pathlib

from .errors import DistutilsPlatformError
from . import py39compat
from ._functools import pass_none

IS_PYPY = '__pypy__' in sys.builtin_module_names

# These are needed in a couple of spots, so just compute them once.
PREFIX = os.path.normpath(sys.prefix)
EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
BASE_PREFIX = os.path.normpath(sys.base_prefix)
BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)

# Path to the base directory of the project. On Windows the binary may
# live in project/PCbuild/win32 or project/PCbuild/amd64.
# set for cross builds
if "_PYTHON_PROJECT_BASE" in os.environ:
    project_base = os.path.abspath(os.environ["_PYTHON_PROJECT_BASE"])
else:
    if sys.executable:
        project_base = os.path.dirname(os.path.abspath(sys.executable))
    else:
        # sys.executable can be empty if argv[0] has been changed and Python is
        # unable to retrieve the real program name
        project_base = os.getcwd()


def _is_python_source_dir(d):
    """
    Return True if the target directory appears to point to an
    un-installed Python.
    """
    modules = pathlib.Path(d).joinpath('Modules')
    return any(modules.joinpath(fn).is_file() for fn in ('Setup', 'Setup.local'))


_sys_home = getattr(sys, '_home', None)


def _is_parent(dir_a, dir_b):
    """
    Return True if a is a parent of b.
    """
    return os.path.normcase(dir_a).startswith(os.path.normcase(dir_b))


if os.name == 'nt':

    @pass_none
    def _fix_pcbuild(d):
        # In a venv, sys._home will be inside BASE_PREFIX rather than PREFIX.
        prefixes = PREFIX, BASE_PREFIX
        matched = (
            prefix
            for prefix in prefixes
            if _is_parent(d, os.path.join(prefix, "PCbuild"))
        )
        return next(matched, d)

    project_base = _fix_pcbuild(project_base)
    _sys_home = _fix_pcbuild(_sys_home)


def _python_build():
    if _sys_home:
        return _is_python_source_dir(_sys_home)
    return _is_python_source_dir(project_base)


python_build = _python_build()


# Calculate the build qualifier flags if they are defined.  Adding the flags
# to the include and lib directories only makes sense for an installation, not
# an in-source build.
build_flags = ''
try:
    if not python_build:
        build_flags = sys.abiflags
except AttributeError:
    # It's not a configure-based build, so the sys module doesn't have
    # this attribute, which is fine.
    pass


def get_python_version():
    """Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    """
    return '%d.%d' % sys.version_info[:2]


def get_python_inc(plat_specific=0, prefix=None):
    """Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    """
    default_prefix = BASE_EXEC_PREFIX if plat_specific else BASE_PREFIX
    resolved_prefix = prefix if prefix is not None else default_prefix
    try:
        getter = globals()[f'_get_python_inc_{os.name}']
    except KeyError:
        raise DistutilsPlatformError(
            "I don't know where Python installs its C header files "
            "on platform '%s'" % os.name
        )
    return getter(resolved_prefix, prefix, plat_specific)


def _get_python_inc_posix(prefix, spec_prefix, plat_specific):
    if IS_PYPY and sys.version_info < (3, 8):
        return os.path.join(prefix, 'include')
    return (
        _get_python_inc_posix_python(plat_specific)
        or _get_python_inc_from_config(plat_specific, spec_prefix)
        or _get_python_inc_posix_prefix(prefix)
    )


def _get_python_inc_posix_python(plat_specific):
    """
    Assume the executable is in the build directory. The
    pyconfig.h file should be in the same directory. Since
    the build directory may not be the source directory,
    use "srcdir" from the makefile to find the "Include"
    directory.
    """
    if not python_build:
        return
    if plat_specific:
        return _sys_home or project_base
    incdir = os.path.join(get_config_var('srcdir'), 'Include')
    return os.path.normpath(incdir)


def _get_python_inc_from_config(plat_specific, spec_prefix):
    """
    If no prefix was explicitly specified, provide the include
    directory from the config vars. Useful when
    cross-compiling, since the config vars may come from
    the host
    platform Python installation, while the current Python
    executable is from the build platform installation.

    >>> monkeypatch = getfixture('monkeypatch')
    >>> gpifc = _get_python_inc_from_config
    >>> monkeypatch.setitem(gpifc.__globals__, 'get_config_var', str.lower)
    >>> gpifc(False, '/usr/bin/')
    >>> gpifc(False, '')
    >>> gpifc(False, None)
    'includepy'
    >>> gpifc(True, None)
    'confincludepy'
    """
    if spec_prefix is None:
        return get_config_var('CONF' * plat_specific + 'INCLUDEPY')


def _get_python_inc_posix_prefix(prefix):
    implementation = 'pypy' if IS_PYPY else 'python'
    python_dir = implementation + get_python_version() + build_flags
    return os.path.join(prefix, "include", python_dir)


def _get_python_inc_nt(prefix, spec_prefix, plat_specific):
    if python_build:
        # Include both the include and PC dir to ensure we can find
        # pyconfig.h
        return (
            os.path.join(prefix, "include")
            + os.path.pathsep
            + os.path.join(prefix, "PC")
        )
    return os.path.join(prefix, "include")


# allow this behavior to be monkey-patched. Ref pypa/distutils#2.
def _posix_lib(standard_lib, libpython, early_prefix, prefix):
    if standard_lib:
        return libpython
    else:
        return os.path.join(libpython, "site-packages")


def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
    """Return the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    """

    if IS_PYPY and sys.version_info < (3, 8):
        # PyPy-specific schema
        if prefix is None:
            prefix = PREFIX
        if standard_lib:
            return os.path.join(prefix, "lib-python", sys.version[0])
        return os.path.join(prefix, 'site-packages')

    early_prefix = prefix

    if prefix is None:
        if standard_lib:
            prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
        else:
            prefix = plat_specific and EXEC_PREFIX or PREFIX

    if os.name == "posix":
        if plat_specific or standard_lib:
            # Platform-specific modules (any module from a non-pure-Python
            # module distribution) or standard Python library modules.
            libdir = getattr(sys, "platlibdir", "lib")
        else:
            # Pure Python
            libdir = "lib"
        implementation = 'pypy' if IS_PYPY else 'python'
        libpython = os.path.join(prefix, libdir, implementation + get_python_version())
        return _posix_lib(standard_lib, libpython, early_prefix, prefix)
    elif os.name == "nt":
        if standard_lib:
            return os.path.join(prefix, "Lib")
        else:
            return os.path.join(prefix, "Lib", "site-packages")
    else:
        raise DistutilsPlatformError(
            "I don't know where Python installs its library "
            "on platform '%s'" % os.name
        )


def customize_compiler(compiler):  # noqa: C901
    """Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    """
    if compiler.compiler_type == "unix":
        if sys.platform == "darwin":
            # Perform first-time customization of compiler-related
            # config vars on OS X now that we know we need a compiler.
            # This is primarily to support Pythons from binary
            # installers.  The kind and paths to build tools on
            # the user system may vary significantly from the system
            # that Python itself was built on.  Also the user OS
            # version and build tools may not support the same set
            # of CPU architectures for universal builds.
            global _config_vars
            # Use get_config_var() to ensure _config_vars is initialized.
            if not get_config_var('CUSTOMIZED_OSX_COMPILER'):
                import _osx_support

                _osx_support.customize_compiler(_config_vars)
                _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'

        (
            cc,
            cxx,
            cflags,
            ccshared,
            ldshared,
            shlib_suffix,
            ar,
            ar_flags,
        ) = get_config_vars(
            'CC',
            'CXX',
            'CFLAGS',
            'CCSHARED',
            'LDSHARED',
            'SHLIB_SUFFIX',
            'AR',
            'ARFLAGS',
        )

        if 'CC' in os.environ:
            newcc = os.environ['CC']
            if 'LDSHARED' not in os.environ and ldshared.startswith(cc):
                # If CC is overridden, use that as the default
                #       command for LDSHARED as well
                ldshared = newcc + ldshared[len(cc) :]
            cc = newcc
        if 'CXX' in os.environ:
            cxx = os.environ['CXX']
        if 'LDSHARED' in os.environ:
            ldshared = os.environ['LDSHARED']
        if 'CPP' in os.environ:
            cpp = os.environ['CPP']
        else:
            cpp = cc + " -E"  # not always
        if 'LDFLAGS' in os.environ:
            ldshared = ldshared + ' ' + os.environ['LDFLAGS']
        if 'CFLAGS' in os.environ:
            cflags = cflags + ' ' + os.environ['CFLAGS']
            ldshared = ldshared + ' ' + os.environ['CFLAGS']
        if 'CPPFLAGS' in os.environ:
            cpp = cpp + ' ' + os.environ['CPPFLAGS']
            cflags = cflags + ' ' + os.environ['CPPFLAGS']
            ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
        if 'AR' in os.environ:
            ar = os.environ['AR']
        if 'ARFLAGS' in os.environ:
            archiver = ar + ' ' + os.environ['ARFLAGS']
        else:
            archiver = ar + ' ' + ar_flags

        cc_cmd = cc + ' ' + cflags
        compiler.set_executables(
            preprocessor=cpp,
            compiler=cc_cmd,
            compiler_so=cc_cmd + ' ' + ccshared,
            compiler_cxx=cxx,
            linker_so=ldshared,
            linker_exe=cc,
            archiver=archiver,
        )

        if 'RANLIB' in os.environ and compiler.executables.get('ranlib', None):
            compiler.set_executables(ranlib=os.environ['RANLIB'])

        compiler.shared_lib_extension = shlib_suffix


def get_config_h_filename():
    """Return full pathname of installed pyconfig.h file."""
    if python_build:
        if os.name == "nt":
            inc_dir = os.path.join(_sys_home or project_base, "PC")
        else:
            inc_dir = _sys_home or project_base
        return os.path.join(inc_dir, 'pyconfig.h')
    else:
        return sysconfig.get_config_h_filename()


def get_makefile_filename():
    """Return full pathname of installed Makefile from the Python build."""
    return sysconfig.get_makefile_filename()


def parse_config_h(fp, g=None):
    """Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    """
    return sysconfig.parse_config_h(fp, vars=g)


# Regexes needed for parsing Makefile (and similar syntaxes,
# like old-style Setup files).
_variable_rx = re.compile(r"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)")
_findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)")
_findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}")


def parse_makefile(fn, g=None):  # noqa: C901
    """Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    """
    from distutils.text_file import TextFile

    fp = TextFile(
        fn, strip_comments=1, skip_blanks=1, join_lines=1, errors="surrogateescape"
    )

    if g is None:
        g = {}
    done = {}
    notdone = {}

    while True:
        line = fp.readline()
        if line is None:  # eof
            break
        m = _variable_rx.match(line)
        if m:
            n, v = m.group(1, 2)
            v = v.strip()
            # `$$' is a literal `$' in make
            tmpv = v.replace('$$', '')

            if "$" in tmpv:
                notdone[n] = v
            else:
                try:
                    v = int(v)
                except ValueError:
                    # insert literal `$'
                    done[n] = v.replace('$$', '$')
                else:
                    done[n] = v

    # Variables with a 'PY_' prefix in the makefile. These need to
    # be made available without that prefix through sysconfig.
    # Special care is needed to ensure that variable expansion works, even
    # if the expansion uses the name without a prefix.
    renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS')

    # do variable interpolation here
    while notdone:
        for name in list(notdone):
            value = notdone[name]
            m = _findvar1_rx.search(value) or _findvar2_rx.search(value)
            if m:
                n = m.group(1)
                found = True
                if n in done:
                    item = str(done[n])
                elif n in notdone:
                    # get it on a subsequent round
                    found = False
                elif n in os.environ:
                    # do it like make: fall back to environment
                    item = os.environ[n]

                elif n in renamed_variables:
                    if name.startswith('PY_') and name[3:] in renamed_variables:
                        item = ""

                    elif 'PY_' + n in notdone:
                        found = False

                    else:
                        item = str(done['PY_' + n])
                else:
                    done[n] = item = ""
                if found:
                    after = value[m.end() :]
                    value = value[: m.start()] + item + after
                    if "$" in after:
                        notdone[name] = value
                    else:
                        try:
                            value = int(value)
                        except ValueError:
                            done[name] = value.strip()
                        else:
                            done[name] = value
                        del notdone[name]

                        if name.startswith('PY_') and name[3:] in renamed_variables:

                            name = name[3:]
                            if name not in done:
                                done[name] = value
            else:
                # bogus variable reference; just drop it since we can't deal
                del notdone[name]

    fp.close()

    # strip spurious spaces
    for k, v in done.items():
        if isinstance(v, str):
            done[k] = v.strip()

    # save the results in the global dictionary
    g.update(done)
    return g


def expand_makefile_vars(s, vars):
    """Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    """

    # This algorithm does multiple expansion, so if vars['foo'] contains
    # "${bar}", it will expand ${foo} to ${bar}, and then expand
    # ${bar}... and so forth.  This is fine as long as 'vars' comes from
    # 'parse_makefile()', which takes care of such expansions eagerly,
    # according to make's variable expansion semantics.

    while True:
        m = _findvar1_rx.search(s) or _findvar2_rx.search(s)
        if m:
            (beg, end) = m.span()
            s = s[0:beg] + vars.get(m.group(1)) + s[end:]
        else:
            break
    return s


_config_vars = None


def get_config_vars(*args):
    """With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    """
    global _config_vars
    if _config_vars is None:
        _config_vars = sysconfig.get_config_vars().copy()
        py39compat.add_ext_suffix(_config_vars)

    if args:
        vals = []
        for name in args:
            vals.append(_config_vars.get(name))
        return vals
    else:
        return _config_vars


def get_config_var(name):
    """Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    """
    if name == 'SO':
        import warnings

        warnings.warn('SO is deprecated, use EXT_SUFFIX', DeprecationWarning, 2)
    return get_config_vars().get(name)
PK|5Z2S,,&Lib/site-packages/setuptools/launch.pynuW+A"""
Launch the Python script on the command line after
setuptools is bootstrapped via import.
"""

# Note that setuptools gets imported implicitly by the
# invocation of this script using python -m setuptools.launch

import tokenize
import sys


def run():
    """
    Run the script in sys.argv[1] as if it had
    been invoked naturally.
    """
    __builtins__
    script_name = sys.argv[1]
    namespace = dict(
        __file__=script_name,
        __name__='__main__',
        __doc__=None,
    )
    sys.argv[:] = sys.argv[1:]

    open_ = getattr(tokenize, 'open', open)
    with open_(script_name) as fid:
        script = fid.read()
    norm_script = script.replace('\\r\\n', '\\n')
    code = compile(norm_script, script_name, 'exec')
    exec(code, namespace)


if __name__ == '__main__':
    run()
PK|5Zq		&Lib/site-packages/setuptools/errors.pynuW+A"""setuptools.errors

Provides exceptions used by setuptools modules.
"""

from distutils import errors as _distutils_errors


# Re-export errors from distutils to facilitate the migration to PEP632

ByteCompileError = _distutils_errors.DistutilsByteCompileError
CCompilerError = _distutils_errors.CCompilerError
ClassError = _distutils_errors.DistutilsClassError
CompileError = _distutils_errors.CompileError
ExecError = _distutils_errors.DistutilsExecError
FileError = _distutils_errors.DistutilsFileError
InternalError = _distutils_errors.DistutilsInternalError
LibError = _distutils_errors.LibError
LinkError = _distutils_errors.LinkError
ModuleError = _distutils_errors.DistutilsModuleError
OptionError = _distutils_errors.DistutilsOptionError
PlatformError = _distutils_errors.DistutilsPlatformError
PreprocessError = _distutils_errors.PreprocessError
SetupError = _distutils_errors.DistutilsSetupError
TemplateError = _distutils_errors.DistutilsTemplateError
UnknownFileError = _distutils_errors.UnknownFileError

# The root error class in the hierarchy
BaseError = _distutils_errors.DistutilsError


class RemovedCommandError(BaseError, RuntimeError):
    """Error used for commands that have been removed in setuptools.

    Since ``setuptools`` is built on ``distutils``, simply removing a command
    from ``setuptools`` will make the behavior fall back to ``distutils``; this
    error is raised if a command exists in ``distutils`` but has been actively
    removed in ``setuptools``.
    """


class PackageDiscoveryError(BaseError, RuntimeError):
    """Impossible to perform automatic discovery of packages and/or modules.

    The current project layout or given discovery options can lead to problems when
    scanning the project directory.

    Setuptools might also refuse to complete auto-discovery if an error prone condition
    is detected (e.g. when a project is organised as a flat-layout but contains
    multiple directories that can be taken as top-level packages inside a single
    distribution [*]_). In these situations the users are encouraged to be explicit
    about which packages to include or to make the discovery parameters more specific.

    .. [*] Since multi-package distributions are uncommon it is very likely that the
       developers did not intend for all the directories to be packaged, and are just
       leaving auxiliary code in the repository top-level, such as maintenance-related
       scripts.
    """
PK|5ZT%Lib/site-packages/setuptools/_path.pynuW+Aimport os
from typing import Union

_Path = Union[str, os.PathLike]


def ensure_directory(path):
    """Ensure that the parent directory of `path` exists"""
    dirname = os.path.dirname(path)
    os.makedirs(dirname, exist_ok=True)


def same_path(p1: _Path, p2: _Path) -> bool:
    """Differs from os.path.samefile because it does not require paths to exist.
    Purely string based (no comparison between i-nodes).
    >>> same_path("a/b", "./a/b")
    True
    >>> same_path("a/b", "a/./b")
    True
    >>> same_path("a/b", "././a/b")
    True
    >>> same_path("a/b", "./a/b/c/..")
    True
    >>> same_path("a/b", "../a/b/c")
    False
    >>> same_path("a", "a/b")
    False
    """
    return os.path.normpath(p1) == os.path.normpath(p2)
PK|5Z޷Y		$Lib/site-packages/setuptools/glob.pynuW+A"""
Filename globbing utility. Mostly a copy of `glob` from Python 3.5.

Changes include:
 * `yield from` and PEP3102 `*` removed.
 * Hidden files are not ignored.
"""

import os
import re
import fnmatch

__all__ = ["glob", "iglob", "escape"]


def glob(pathname, recursive=False):
    """Return a list of paths matching a pathname pattern.

    The pattern may contain simple shell-style wildcards a la
    fnmatch. However, unlike fnmatch, filenames starting with a
    dot are special cases that are not matched by '*' and '?'
    patterns.

    If recursive is true, the pattern '**' will match any files and
    zero or more directories and subdirectories.
    """
    return list(iglob(pathname, recursive=recursive))


def iglob(pathname, recursive=False):
    """Return an iterator which yields the paths matching a pathname pattern.

    The pattern may contain simple shell-style wildcards a la
    fnmatch. However, unlike fnmatch, filenames starting with a
    dot are special cases that are not matched by '*' and '?'
    patterns.

    If recursive is true, the pattern '**' will match any files and
    zero or more directories and subdirectories.
    """
    it = _iglob(pathname, recursive)
    if recursive and _isrecursive(pathname):
        s = next(it)  # skip empty string
        assert not s
    return it


def _iglob(pathname, recursive):
    dirname, basename = os.path.split(pathname)
    glob_in_dir = glob2 if recursive and _isrecursive(basename) else glob1

    if not has_magic(pathname):
        if basename:
            if os.path.lexists(pathname):
                yield pathname
        else:
            # Patterns ending with a slash should match only directories
            if os.path.isdir(dirname):
                yield pathname
        return

    if not dirname:
        yield from glob_in_dir(dirname, basename)
        return
    # `os.path.split()` returns the argument itself as a dirname if it is a
    # drive or UNC path.  Prevent an infinite recursion if a drive or UNC path
    # contains magic characters (i.e. r'\\?\C:').
    if dirname != pathname and has_magic(dirname):
        dirs = _iglob(dirname, recursive)
    else:
        dirs = [dirname]
    if not has_magic(basename):
        glob_in_dir = glob0
    for dirname in dirs:
        for name in glob_in_dir(dirname, basename):
            yield os.path.join(dirname, name)


# These 2 helper functions non-recursively glob inside a literal directory.
# They return a list of basenames. `glob1` accepts a pattern while `glob0`
# takes a literal basename (so it only has to check for its existence).


def glob1(dirname, pattern):
    if not dirname:
        if isinstance(pattern, bytes):
            dirname = os.curdir.encode('ASCII')
        else:
            dirname = os.curdir
    try:
        names = os.listdir(dirname)
    except OSError:
        return []
    return fnmatch.filter(names, pattern)


def glob0(dirname, basename):
    if not basename:
        # `os.path.split()` returns an empty basename for paths ending with a
        # directory separator.  'q*x/' should match only directories.
        if os.path.isdir(dirname):
            return [basename]
    else:
        if os.path.lexists(os.path.join(dirname, basename)):
            return [basename]
    return []


# This helper function recursively yields relative pathnames inside a literal
# directory.


def glob2(dirname, pattern):
    assert _isrecursive(pattern)
    yield pattern[:0]
    for x in _rlistdir(dirname):
        yield x


# Recursively yields relative pathnames inside a literal directory.
def _rlistdir(dirname):
    if not dirname:
        if isinstance(dirname, bytes):
            dirname = os.curdir.encode('ASCII')
        else:
            dirname = os.curdir
    try:
        names = os.listdir(dirname)
    except os.error:
        return
    for x in names:
        yield x
        path = os.path.join(dirname, x) if dirname else x
        for y in _rlistdir(path):
            yield os.path.join(x, y)


magic_check = re.compile('([*?[])')
magic_check_bytes = re.compile(b'([*?[])')


def has_magic(s):
    if isinstance(s, bytes):
        match = magic_check_bytes.search(s)
    else:
        match = magic_check.search(s)
    return match is not None


def _isrecursive(pattern):
    if isinstance(pattern, bytes):
        return pattern == b'**'
    else:
        return pattern == '**'


def escape(pathname):
    """Escape all special characters.
    """
    # Escaping is done by wrapping any of "*?[" between square brackets.
    # Metacharacters do not work in the drive part and shouldn't be escaped.
    drive, pathname = os.path.splitdrive(pathname)
    if isinstance(pathname, bytes):
        pathname = magic_check_bytes.sub(br'[\1]', pathname)
    else:
        pathname = magic_check.sub(r'[\1]', pathname)
    return drive + pathname
PK|5Zpm!*Lib/site-packages/setuptools/namespaces.pynuW+Aimport os
from distutils import log
import itertools


flatten = itertools.chain.from_iterable


class Installer:

    nspkg_ext = '-nspkg.pth'

    def install_namespaces(self):
        nsp = self._get_all_ns_packages()
        if not nsp:
            return
        filename, ext = os.path.splitext(self._get_target())
        filename += self.nspkg_ext
        self.outputs.append(filename)
        log.info("Installing %s", filename)
        lines = map(self._gen_nspkg_line, nsp)

        if self.dry_run:
            # always generate the lines, even in dry run
            list(lines)
            return

        with open(filename, 'wt') as f:
            f.writelines(lines)

    def uninstall_namespaces(self):
        filename, ext = os.path.splitext(self._get_target())
        filename += self.nspkg_ext
        if not os.path.exists(filename):
            return
        log.info("Removing %s", filename)
        os.remove(filename)

    def _get_target(self):
        return self.target

    _nspkg_tmpl = (
        "import sys, types, os",
        "has_mfs = sys.version_info > (3, 5)",
        "p = os.path.join(%(root)s, *%(pth)r)",
        "importlib = has_mfs and __import__('importlib.util')",
        "has_mfs and __import__('importlib.machinery')",
        (
            "m = has_mfs and "
            "sys.modules.setdefault(%(pkg)r, "
            "importlib.util.module_from_spec("
            "importlib.machinery.PathFinder.find_spec(%(pkg)r, "
            "[os.path.dirname(p)])))"
        ),
        (
            "m = m or "
            "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))"
        ),
        "mp = (m or []) and m.__dict__.setdefault('__path__',[])",
        "(p not in mp) and mp.append(p)",
    )
    "lines for the namespace installer"

    _nspkg_tmpl_multi = (
        'm and setattr(sys.modules[%(parent)r], %(child)r, m)',
    )
    "additional line(s) when a parent package is indicated"

    def _get_root(self):
        return "sys._getframe(1).f_locals['sitedir']"

    def _gen_nspkg_line(self, pkg):
        pth = tuple(pkg.split('.'))
        root = self._get_root()
        tmpl_lines = self._nspkg_tmpl
        parent, sep, child = pkg.rpartition('.')
        if parent:
            tmpl_lines += self._nspkg_tmpl_multi
        return ';'.join(tmpl_lines) % locals() + '\n'

    def _get_all_ns_packages(self):
        """Return sorted list of all package namespaces"""
        pkgs = self.distribution.namespace_packages or []
        return sorted(flatten(map(self._pkg_names, pkgs)))

    @staticmethod
    def _pkg_names(pkg):
        """
        Given a namespace package, yield the components of that
        package.

        >>> names = Installer._pkg_names('a.b.c')
        >>> set(names) == set(['a', 'a.b', 'a.b.c'])
        True
        """
        parts = pkg.split('.')
        while parts:
            yield '.'.join(parts)
            parts.pop()


class DevelopInstaller(Installer):
    def _get_root(self):
        return repr(str(self.egg_path))

    def _get_target(self):
        return self.egg_link
PK|5Zi7?Q?Q)Lib/site-packages/setuptools/discovery.pynuW+A"""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

"""

import itertools
import os
from fnmatch import fnmatchcase
from glob import glob
from pathlib import Path
from typing import (
    TYPE_CHECKING,
    Callable,
    Dict,
    Iterable,
    Iterator,
    List,
    Mapping,
    Optional,
    Tuple,
    Union
)

import _distutils_hack.override  # noqa: F401

from distutils import log
from distutils.util import convert_path

_Path = Union[str, os.PathLike]
_Filter = Callable[[str], bool]
StrIter = Iterator[str]

chain_iter = itertools.chain.from_iterable

if TYPE_CHECKING:
    from setuptools import Distribution  # noqa


def _valid_name(path: _Path) -> bool:
    # Ignore invalid names that cannot be imported directly
    return os.path.basename(path).isidentifier()


class _Finder:
    """Base class that exposes functionality for module/package finders"""

    ALWAYS_EXCLUDE: Tuple[str, ...] = ()
    DEFAULT_EXCLUDE: Tuple[str, ...] = ()

    @classmethod
    def find(
        cls,
        where: _Path = '.',
        exclude: Iterable[str] = (),
        include: Iterable[str] = ('*',)
    ) -> List[str]:
        """Return 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'.
        """

        exclude = exclude or cls.DEFAULT_EXCLUDE
        return list(
            cls._find_iter(
                convert_path(str(where)),
                cls._build_filter(*cls.ALWAYS_EXCLUDE, *exclude),
                cls._build_filter(*include),
            )
        )

    @classmethod
    def _find_iter(cls, where: _Path, exclude: _Filter, include: _Filter) -> StrIter:
        raise NotImplementedError

    @staticmethod
    def _build_filter(*patterns: str) -> _Filter:
        """
        Given a list of patterns, return a callable that will be true only if
        the input matches at least one of the patterns.
        """
        return lambda name: any(fnmatchcase(name, pat) for pat in patterns)


class PackageFinder(_Finder):
    """
    Generate a list of all Python packages found within a directory
    """

    ALWAYS_EXCLUDE = ("ez_setup", "*__pycache__")

    @classmethod
    def _find_iter(cls, where: _Path, exclude: _Filter, include: _Filter) -> StrIter:
        """
        All the packages found in 'where' that pass the 'include' filter, but
        not the 'exclude' filter.
        """
        for root, dirs, files in os.walk(str(where), followlinks=True):
            # Copy dirs to iterate over it, then empty dirs.
            all_dirs = dirs[:]
            dirs[:] = []

            for dir in all_dirs:
                full_path = os.path.join(root, dir)
                rel_path = os.path.relpath(full_path, where)
                package = rel_path.replace(os.path.sep, '.')

                # Skip directory trees that are not valid packages
                if '.' in dir or not cls._looks_like_package(full_path, package):
                    continue

                # Should this package be included?
                if include(package) and not exclude(package):
                    yield package

                # Keep searching subdirectories, as there may be more packages
                # down there, even if the parent was excluded.
                dirs.append(dir)

    @staticmethod
    def _looks_like_package(path: _Path, _package_name: str) -> bool:
        """Does a directory look like a package?"""
        return os.path.isfile(os.path.join(path, '__init__.py'))


class PEP420PackageFinder(PackageFinder):
    @staticmethod
    def _looks_like_package(_path: _Path, _package_name: str) -> bool:
        return True


class ModuleFinder(_Finder):
    """Find isolated Python modules.
    This function will **not** recurse subdirectories.
    """

    @classmethod
    def _find_iter(cls, where: _Path, exclude: _Filter, include: _Filter) -> StrIter:
        for file in glob(os.path.join(where, "*.py")):
            module, _ext = os.path.splitext(os.path.basename(file))

            if not cls._looks_like_module(module):
                continue

            if include(module) and not exclude(module):
                yield module

    _looks_like_module = staticmethod(_valid_name)


# We have to be extra careful in the case of flat layout to not include files
# and directories not meant for distribution (e.g. tool-related)


class FlatLayoutPackageFinder(PEP420PackageFinder):
    _EXCLUDE = (
        "ci",
        "bin",
        "doc",
        "docs",
        "documentation",
        "manpages",
        "news",
        "changelog",
        "test",
        "tests",
        "unit_test",
        "unit_tests",
        "example",
        "examples",
        "scripts",
        "tools",
        "util",
        "utils",
        "python",
        "build",
        "dist",
        "venv",
        "env",
        "requirements",
        # ---- Task runners / Build tools ----
        "tasks",  # invoke
        "fabfile",  # fabric
        "site_scons",  # SCons
        # ---- Other tools ----
        "benchmark",
        "benchmarks",
        "exercise",
        "exercises",
        # ---- Hidden directories/Private packages ----
        "[._]*",
    )

    DEFAULT_EXCLUDE = tuple(chain_iter((p, f"{p}.*") for p in _EXCLUDE))
    """Reserved package names"""

    @staticmethod
    def _looks_like_package(_path: _Path, package_name: str) -> bool:
        names = package_name.split('.')
        # Consider PEP 561
        root_pkg_is_valid = names[0].isidentifier() or names[0].endswith("-stubs")
        return root_pkg_is_valid and all(name.isidentifier() for name in names[1:])


class FlatLayoutModuleFinder(ModuleFinder):
    DEFAULT_EXCLUDE = (
        "setup",
        "conftest",
        "test",
        "tests",
        "example",
        "examples",
        "build",
        # ---- Task runners ----
        "toxfile",
        "noxfile",
        "pavement",
        "dodo",
        "tasks",
        "fabfile",
        # ---- Other tools ----
        "[Ss][Cc]onstruct",  # SCons
        "conanfile",  # Connan: C/C++ build tool
        "manage",  # Django
        "benchmark",
        "benchmarks",
        "exercise",
        "exercises",
        # ---- Hidden files/Private modules ----
        "[._]*",
    )
    """Reserved top-level module names"""


def _find_packages_within(root_pkg: str, pkg_dir: _Path) -> List[str]:
    nested = PEP420PackageFinder.find(pkg_dir)
    return [root_pkg] + [".".join((root_pkg, n)) for n in nested]


class ConfigDiscovery:
    """Fill-in metadata and options that can be automatically derived
    (from other metadata/options, the file system or conventions)
    """

    def __init__(self, distribution: "Distribution"):
        self.dist = distribution
        self._called = False
        self._disabled = False
        self._skip_ext_modules = False

    def _disable(self):
        """Internal API to disable automatic discovery"""
        self._disabled = True

    def _ignore_ext_modules(self):
        """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).
        """
        self._skip_ext_modules = True

    @property
    def _root_dir(self) -> _Path:
        # The best is to wait until `src_root` is set in dist, before using _root_dir.
        return self.dist.src_root or os.curdir

    @property
    def _package_dir(self) -> Dict[str, str]:
        if self.dist.package_dir is None:
            return {}
        return self.dist.package_dir

    def __call__(self, force=False, name=True, ignore_ext_modules=False):
        """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).
        """
        if force is False and (self._called or self._disabled):
            # Avoid overhead of multiple calls
            return

        self._analyse_package_layout(ignore_ext_modules)
        if name:
            self.analyse_name()  # depends on ``packages`` and ``py_modules``

        self._called = True

    def _explicitly_specified(self, ignore_ext_modules: bool) -> bool:
        """``True`` if the user has specified some form of package/module listing"""
        ignore_ext_modules = ignore_ext_modules or self._skip_ext_modules
        ext_modules = not (self.dist.ext_modules is None or ignore_ext_modules)
        return (
            self.dist.packages is not None
            or self.dist.py_modules is not None
            or ext_modules
            or hasattr(self.dist, "configuration") and self.dist.configuration
            # ^ Some projects use numpy.distutils.misc_util.Configuration
        )

    def _analyse_package_layout(self, ignore_ext_modules: bool) -> bool:
        if self._explicitly_specified(ignore_ext_modules):
            # For backward compatibility, just try to find modules/packages
            # when nothing is given
            return True

        log.debug(
            "No `packages` or `py_modules` configuration, performing "
            "automatic discovery."
        )

        return (
            self._analyse_explicit_layout()
            or self._analyse_src_layout()
            # flat-layout is the trickiest for discovery so it should be last
            or self._analyse_flat_layout()
        )

    def _analyse_explicit_layout(self) -> bool:
        """The user can explicitly give a package layout via ``package_dir``"""
        package_dir = self._package_dir.copy()  # don't modify directly
        package_dir.pop("", None)  # This falls under the "src-layout" umbrella
        root_dir = self._root_dir

        if not package_dir:
            return False

        log.debug(f"`explicit-layout` detected -- analysing {package_dir}")
        pkgs = chain_iter(
            _find_packages_within(pkg, os.path.join(root_dir, parent_dir))
            for pkg, parent_dir in package_dir.items()
        )
        self.dist.packages = list(pkgs)
        log.debug(f"discovered packages -- {self.dist.packages}")
        return True

    def _analyse_src_layout(self) -> bool:
        """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"``.
        """
        package_dir = self._package_dir
        src_dir = os.path.join(self._root_dir, package_dir.get("", "src"))
        if not os.path.isdir(src_dir):
            return False

        log.debug(f"`src-layout` detected -- analysing {src_dir}")
        package_dir.setdefault("", os.path.basename(src_dir))
        self.dist.package_dir = package_dir  # persist eventual modifications
        self.dist.packages = PEP420PackageFinder.find(src_dir)
        self.dist.py_modules = ModuleFinder.find(src_dir)
        log.debug(f"discovered packages -- {self.dist.packages}")
        log.debug(f"discovered py_modules -- {self.dist.py_modules}")
        return True

    def _analyse_flat_layout(self) -> bool:
        """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.
        """
        log.debug(f"`flat-layout` detected -- analysing {self._root_dir}")
        return self._analyse_flat_packages() or self._analyse_flat_modules()

    def _analyse_flat_packages(self) -> bool:
        self.dist.packages = FlatLayoutPackageFinder.find(self._root_dir)
        top_level = remove_nested_packages(remove_stubs(self.dist.packages))
        log.debug(f"discovered packages -- {self.dist.packages}")
        self._ensure_no_accidental_inclusion(top_level, "packages")
        return bool(top_level)

    def _analyse_flat_modules(self) -> bool:
        self.dist.py_modules = FlatLayoutModuleFinder.find(self._root_dir)
        log.debug(f"discovered py_modules -- {self.dist.py_modules}")
        self._ensure_no_accidental_inclusion(self.dist.py_modules, "modules")
        return bool(self.dist.py_modules)

    def _ensure_no_accidental_inclusion(self, detected: List[str], kind: str):
        if len(detected) > 1:
            from inspect import cleandoc

            from setuptools.errors import PackageDiscoveryError

            msg = f"""Multiple top-level {kind} discovered in a flat-layout: {detected}.

            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 {kind}
            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.
            """
            raise PackageDiscoveryError(cleandoc(msg))

    def analyse_name(self):
        """The packages/modules are the essential contribution of the author.
        Therefore the name of the distribution can be derived from them.
        """
        if self.dist.metadata.name or self.dist.name:
            # get_name() is not reliable (can return "UNKNOWN")
            return None

        log.debug("No `name` configuration, performing automatic discovery")

        name = (
            self._find_name_single_package_or_module()
            or self._find_name_from_packages()
        )
        if name:
            self.dist.metadata.name = name

    def _find_name_single_package_or_module(self) -> Optional[str]:
        """Exactly one module or package"""
        for field in ('packages', 'py_modules'):
            items = getattr(self.dist, field, None) or []
            if items and len(items) == 1:
                log.debug(f"Single module/package detected, name: {items[0]}")
                return items[0]

        return None

    def _find_name_from_packages(self) -> Optional[str]:
        """Try to find the root package that is not a PEP 420 namespace"""
        if not self.dist.packages:
            return None

        packages = remove_stubs(sorted(self.dist.packages, key=len))
        package_dir = self.dist.package_dir or {}

        parent_pkg = find_parent_package(packages, package_dir, self._root_dir)
        if parent_pkg:
            log.debug(f"Common parent package detected, name: {parent_pkg}")
            return parent_pkg

        log.warn("No parent package detected, impossible to derive `name`")
        return None


def remove_nested_packages(packages: List[str]) -> List[str]:
    """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']
    """
    pkgs = sorted(packages, key=len)
    top_level = pkgs[:]
    size = len(pkgs)
    for i, name in enumerate(reversed(pkgs)):
        if any(name.startswith(f"{other}.") for other in top_level):
            top_level.pop(size - i - 1)

    return top_level


def remove_stubs(packages: List[str]) -> List[str]:
    """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']
    """
    return [pkg for pkg in packages if not pkg.split(".")[0].endswith("-stubs")]


def find_parent_package(
    packages: List[str], package_dir: Mapping[str, str], root_dir: _Path
) -> Optional[str]:
    """Find the parent package that is not a namespace."""
    packages = sorted(packages, key=len)
    common_ancestors = []
    for i, name in enumerate(packages):
        if not all(n.startswith(f"{name}.") for n in packages[i+1:]):
            # Since packages are sorted by length, this condition is able
            # to find a list of all common ancestors.
            # When there is divergence (e.g. multiple root packages)
            # the list will be empty
            break
        common_ancestors.append(name)

    for name in common_ancestors:
        pkg_path = find_package_path(name, package_dir, root_dir)
        init = os.path.join(pkg_path, "__init__.py")
        if os.path.isfile(init):
            return name

    return None


def find_package_path(
    name: str, package_dir: Mapping[str, str], root_dir: _Path
) -> str:
    """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'
    """
    parts = name.split(".")
    for i in range(len(parts), 0, -1):
        # Look backwards, the most specific package_dir first
        partial_name = ".".join(parts[:i])
        if partial_name in package_dir:
            parent = package_dir[partial_name]
            return os.path.join(root_dir, parent, *parts[i:])

    parent = package_dir.get("") or ""
    return os.path.join(root_dir, *parent.split("/"), *parts)


def construct_package_dir(packages: List[str], package_path: _Path) -> Dict[str, str]:
    parent_pkgs = remove_nested_packages(packages)
    prefix = Path(package_path).parts
    return {pkg: "/".join([*prefix, *pkg.split(".")]) for pkg in parent_pkgs}
PK|5Zzi$Lib/site-packages/setuptools/cli.exenuW+AMZ@	!L!This program cannot be run in DOS mode.

$YSj292929:92929F29}929`9929`929`9m29`929Rich29PELQ	N%@@,(@@.text] `.rdata` "@@.data+@QD$P@uSUV+WD-jPs
33ۉD$"p~WL$<\uG <"u~Wj\V
3\F3T$CF;|Å~Wj\VV
D$_"F^][YÁA3ĉ$V$W$τtd$A@PF^$3!	Wh$ QV虫V,訊$,H@;st

t
uj$ h@RT
t2@
@@$@$ $$$(L$Q$"R0D$ D$$PV$|$uVh@S\$U$,+D$@jPWt$C;~L$ R#G;|D$$P;~L$RG;|惼$4][tED$t$PV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~~	uEEE8gfSSSSSof@8uH8t 8uVjD^VESPdJu5*A;t+Fȋ*A8\uNH;u;@234kfEjPhYYE;;0E̍H|0]~9EЃ*APuEA9u|ʋE8]t,H3ҍD0}j_;}BAEeEPEPSuujSSuu@\@űhY;u	WeYX}uS4R5@9]uju@EPu@]}uu]u֋(e^_[ËU@A3ʼnEMESVWx@}fMԋM3ۉMMjEȋM]܉]]^P2tY;ujVu*guYY;u#Edd/EPESP;tuqSSSSSbbEP蹒GGY}9]tu褒Y}ЋE;tOj_P舒|Y;u< A;uC< A;u5u6MRgEYeE}ȋ6;FU]8t(=tVYML< A4M:u܋MM+8Xt-x:u'x=u!PݑYM؍D
< AE8=t΋E+Eu}EP謑PEP6tM9u}jWeuYYM;26kfYbcMiEP+EPVt
SSSSS'a7t6PE+EPVIt
SSSSS`7 FY;uËE^09]}؋E+Q
< AQV+}}6EM7+PVѹt
SSSSSy`7kYt9u9]ug}ЍEPWV藹t
SSSSS?`h`@WVt
SSSSS`9]tuWV߷t
SSSSS_;tE;0uF< A;tPdY< A9]t	udYE܋M_^3[IËUV39uu$Ba0(aVVVVV`jXUEuu8@u\@PaY`(u"tEt``
3^]ËUSu3ۍM]lHM;u(`SSSSS`8]tE`p3qVu9^uuQjYY8]tWMapNWD7t!A:t9EuAE
9]9EuMA:u_8]tE`pE^[ËUjuu2]ËUS39]u3uMGE9Xu&uuu8]mMapaW};t9]u._SSSSS_8]tE`p%VfMGDMtC:u]XfffGMf;prf;pwfp6f;pr0f;pw*fp$UAt
fʉMfuMf	EDMtEU:u]WffEɉMf;Hrf;HwfH6f;Hr0f;Hw*fH$UAt
fʉMfMf;u!f;t	9]8]tE`p3^_[H8]tMapUjuuu#]UW}3كE8t3_4L`hz8Vjz(8NZj*DTj
,>Pbn|(8J@A@4K@X@_@@@failed to get exit code from process.
failed to create process.
 %s%sCould not exec %sCannot find Python executable %s
#!python.exe#!Cannot open %s
-script.pyCorExitProcessmscoree.dll(null)(null)EEE50P( 8PX700WP  `h````xpxxxx!A"A	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~=EncodePointerKERNEL32.DLLDecodePointerFlsFreeFlsSetValueFlsGetValueFlsAllocruntime error 
TLOSS error
SING error
DOMAIN error
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
R6033
- Attempt to use MSIL code from this assembly during native code initialization
This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain.
R6032
- not enough space for locale information
R6031
- Attempt to initialize the CRT more than once.
This indicates a bug in your application.
R6030
- CRT not initialized
R6028
- unable to initialize heap
R6027
- not enough space for lowio initialization
R6026
- not enough space for stdio initialization
R6025
- pure virtual function call
R6024
- not enough space for _onexit/atexit table
R6019
- unable to open console device
R6018
- unexpected heap error
R6017
- unexpected multithread lock error
R6016
- not enough space for thread data

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
R6009
- not enough space for environment
R6008
- not enough space for arguments
R6002
- floating point support not loaded
Microsoft Visual C++ Runtime Library

...Runtime Error!

Program: EEE00P('8PW700PP (`h`hhhxppwpp         (((((                  H          h((((                  H                                 H	

 !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~HH:mm:ssdddd, MMMM dd, yyyyMM/dd/yyPMAMDecemberNovemberOctoberSeptemberAugustJulyJuneAprilMarchFebruaryJanuaryDecNovOctSepAugJulJunMayAprMarFebJanSaturdayFridayThursdayWednesdayTuesdayMondaySundaySatFriThuWedTueMonSunGetProcessWindowStationGetUserObjectInformationAGetLastActivePopupGetActiveWindowMessageBoxAUSER32.DLLSunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecCONOUT$.com.exe.bat.cmd.\SystemRootHA@7 i@#@%@%@<5@@5@:@;@;=@=@>@?@A@9A@-G@J@kN@P@P@oR@{R@5Y@Z@Z@-[@1[@^@_@/_@)j@:l@>y@N@/@$@@T@˥@@ͦ@L@h@@T4L`hz8Vjz(8NZj*DTj
,>Pbn|(8JRGenerateConsoleCtrlEventGetExitCodeProcessnWaitForSingleObjectCreateProcessASetConsoleCtrlHandlerGetModuleFileNameAEnterCriticalSectionLeaveCriticalSectionGetModuleHandleW+Sleep"GetProcAddressExitProcesspGetCommandLineASetHandleCount>GetStdHandleGetFileType<GetStartupInfoADeleteCriticalSection7TerminateProcessGetCurrentProcessHUnhandledExceptionFilterSetUnhandledExceptionFilterIsDebuggerPresentGetLastErrorHeapFreeHeapAlloc\GetCPInfoInterlockedIncrementInterlockedDecrementSGetACPGetOEMCPIsValidCodePage>TlsGetValue<TlsAlloc?TlsSetValue=TlsFreeSetLastErrorGetCurrentThreadIdWriteFileLoadLibraryAInitializeCriticalSectionAndSpinCountKFreeEnvironmentStringsAGetEnvironmentStringsLFreeEnvironmentStringsWWideCharToMultiByteGetEnvironmentStringsWHeapCreateaVirtualFreeYQueryPerformanceCounterjGetTickCountGetCurrentProcessIdSGetSystemTimeAsFileTimeRtlUnwindHeapReAlloc^VirtualAllocGetConsoleCPGetConsoleModeBFlushFileBuffersLCMapStringAMultiByteToWideCharLCMapStringW@GetStringTypeACGetStringTypeWGetLocaleInfoASetFilePointerHeapSizeDCloseHandleWriteConsoleAGetConsoleOutputCPWriteConsoleWSetStdHandleyCreateFileASCompareStringAVCompareStringWSetEnvironmentVariableAKERNEL32.dllnReadFileSetEndOfFile&GetProcessHeapGetFileAttributesA+A+AN@D#@l@\@

		


!
5A
CPR
S
WYl
m pr	

	
)

                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ                          abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZhA`y!@~ڣ @ڣ AϢ[@~QQ^ _j21~l@CAAAAAHAh@@p@AAAhA@@	@
@@@@\@$@@@@d@D@@ @!@"@x@y@z@@@Η@Η@Η@Η@Η@Η@Η@Η@Η@Η@x
h@j@@@@@@@@x@p@h@\@P@H@<@8@4@0@,@(@$@ @@@@@@@@@@(@@@@@@@@@@@|@p@	A.DA)A)A)A)A)A)A)A)A)AHA. pPSTPDTAA;Zx0Nm:Yw/Mll@d@\@T@PK|5Z&{}

$Lib/site-packages/setuptools/dist.pynuW+A# -*- coding: utf-8 -*-
__all__ = ['Distribution']

import io
import sys
import re
import os
import warnings
import numbers
import distutils.log
import distutils.core
import distutils.cmd
import distutils.dist
import distutils.command
from distutils.util import strtobool
from distutils.debug import DEBUG
from distutils.fancy_getopt import translate_longopt
from glob import iglob
import itertools
import textwrap
from typing import List, Optional, TYPE_CHECKING
from pathlib import Path

from collections import defaultdict
from email import message_from_file

from distutils.errors import DistutilsOptionError, DistutilsSetupError
from distutils.util import rfc822_escape

from setuptools.extern import packaging
from setuptools.extern import ordered_set
from setuptools.extern.more_itertools import unique_everseen, partition

from ._importlib import metadata

from . import SetuptoolsDeprecationWarning

import setuptools
import setuptools.command
from setuptools import windows_support
from setuptools.monkey import get_unpatched
from setuptools.config import setupcfg, pyprojecttoml
from setuptools.discovery import ConfigDiscovery

import pkg_resources
from setuptools.extern.packaging import version
from . import _reqs
from . import _entry_points

if TYPE_CHECKING:
    from email.message import Message

__import__('setuptools.extern.packaging.specifiers')
__import__('setuptools.extern.packaging.version')


def _get_unpatched(cls):
    warnings.warn("Do not call this function", DistDeprecationWarning)
    return get_unpatched(cls)


def get_metadata_version(self):
    mv = getattr(self, 'metadata_version', None)
    if mv is None:
        mv = version.Version('2.1')
        self.metadata_version = mv
    return mv


def rfc822_unescape(content: str) -> str:
    """Reverse RFC-822 escaping by removing leading whitespaces from content."""
    lines = content.splitlines()
    if len(lines) == 1:
        return lines[0].lstrip()
    return '\n'.join((lines[0].lstrip(), textwrap.dedent('\n'.join(lines[1:]))))


def _read_field_from_msg(msg: "Message", field: str) -> Optional[str]:
    """Read Message header field."""
    value = msg[field]
    if value == 'UNKNOWN':
        return None
    return value


def _read_field_unescaped_from_msg(msg: "Message", field: str) -> Optional[str]:
    """Read Message header field and apply rfc822_unescape."""
    value = _read_field_from_msg(msg, field)
    if value is None:
        return value
    return rfc822_unescape(value)


def _read_list_from_msg(msg: "Message", field: str) -> Optional[List[str]]:
    """Read Message header field and return all results as list."""
    values = msg.get_all(field, None)
    if values == []:
        return None
    return values


def _read_payload_from_msg(msg: "Message") -> Optional[str]:
    value = msg.get_payload().strip()
    if value == 'UNKNOWN' or not value:
        return None
    return value


def read_pkg_file(self, file):
    """Reads the metadata values from a file object."""
    msg = message_from_file(file)

    self.metadata_version = version.Version(msg['metadata-version'])
    self.name = _read_field_from_msg(msg, 'name')
    self.version = _read_field_from_msg(msg, 'version')
    self.description = _read_field_from_msg(msg, 'summary')
    # we are filling author only.
    self.author = _read_field_from_msg(msg, 'author')
    self.maintainer = None
    self.author_email = _read_field_from_msg(msg, 'author-email')
    self.maintainer_email = None
    self.url = _read_field_from_msg(msg, 'home-page')
    self.download_url = _read_field_from_msg(msg, 'download-url')
    self.license = _read_field_unescaped_from_msg(msg, 'license')

    self.long_description = _read_field_unescaped_from_msg(msg, 'description')
    if (
        self.long_description is None and
        self.metadata_version >= version.Version('2.1')
    ):
        self.long_description = _read_payload_from_msg(msg)
    self.description = _read_field_from_msg(msg, 'summary')

    if 'keywords' in msg:
        self.keywords = _read_field_from_msg(msg, 'keywords').split(',')

    self.platforms = _read_list_from_msg(msg, 'platform')
    self.classifiers = _read_list_from_msg(msg, 'classifier')

    # PEP 314 - these fields only exist in 1.1
    if self.metadata_version == version.Version('1.1'):
        self.requires = _read_list_from_msg(msg, 'requires')
        self.provides = _read_list_from_msg(msg, 'provides')
        self.obsoletes = _read_list_from_msg(msg, 'obsoletes')
    else:
        self.requires = None
        self.provides = None
        self.obsoletes = None

    self.license_files = _read_list_from_msg(msg, 'license-file')


def single_line(val):
    """
    Quick and dirty validation for Summary pypa/setuptools#1390.
    """
    if '\n' in val:
        # TODO: Replace with `raise ValueError("newlines not allowed")`
        # after reviewing #2893.
        warnings.warn("newlines not allowed and will break in the future")
        val = val.strip().split('\n')[0]
    return val


# Based on Python 3.5 version
def write_pkg_file(self, file):  # noqa: C901  # is too complex (14)  # FIXME
    """Write the PKG-INFO format data to a file object."""
    version = self.get_metadata_version()

    def write_field(key, value):
        file.write("%s: %s\n" % (key, value))

    write_field('Metadata-Version', str(version))
    write_field('Name', self.get_name())
    write_field('Version', self.get_version())

    summary = self.get_description()
    if summary:
        write_field('Summary', single_line(summary))

    optional_fields = (
        ('Home-page', 'url'),
        ('Download-URL', 'download_url'),
        ('Author', 'author'),
        ('Author-email', 'author_email'),
        ('Maintainer', 'maintainer'),
        ('Maintainer-email', 'maintainer_email'),
    )

    for field, attr in optional_fields:
        attr_val = getattr(self, attr, None)
        if attr_val is not None:
            write_field(field, attr_val)

    license = self.get_license()
    if license:
        write_field('License', rfc822_escape(license))

    for project_url in self.project_urls.items():
        write_field('Project-URL', '%s, %s' % project_url)

    keywords = ','.join(self.get_keywords())
    if keywords:
        write_field('Keywords', keywords)

    platforms = self.get_platforms() or []
    for platform in platforms:
        write_field('Platform', platform)

    self._write_list(file, 'Classifier', self.get_classifiers())

    # PEP 314
    self._write_list(file, 'Requires', self.get_requires())
    self._write_list(file, 'Provides', self.get_provides())
    self._write_list(file, 'Obsoletes', self.get_obsoletes())

    # Setuptools specific for PEP 345
    if hasattr(self, 'python_requires'):
        write_field('Requires-Python', self.python_requires)

    # PEP 566
    if self.long_description_content_type:
        write_field('Description-Content-Type', self.long_description_content_type)
    if self.provides_extras:
        for extra in self.provides_extras:
            write_field('Provides-Extra', extra)

    self._write_list(file, 'License-File', self.license_files or [])

    long_description = self.get_long_description()
    if long_description:
        file.write("\n%s" % long_description)
        if not long_description.endswith("\n"):
            file.write("\n")


sequence = tuple, list


def check_importable(dist, attr, value):
    try:
        ep = metadata.EntryPoint(value=value, name=None, group=None)
        assert not ep.extras
    except (TypeError, ValueError, AttributeError, AssertionError) as e:
        raise DistutilsSetupError(
            "%r must be importable 'module:attrs' string (got %r)" % (attr, value)
        ) from e


def assert_string_list(dist, attr, value):
    """Verify that value is a string list"""
    try:
        # verify that value is a list or tuple to exclude unordered
        # or single-use iterables
        assert isinstance(value, (list, tuple))
        # verify that elements of value are strings
        assert ''.join(value) != value
    except (TypeError, ValueError, AttributeError, AssertionError) as e:
        raise DistutilsSetupError(
            "%r must be a list of strings (got %r)" % (attr, value)
        ) from e


def check_nsp(dist, attr, value):
    """Verify that namespace packages are valid"""
    ns_packages = value
    assert_string_list(dist, attr, ns_packages)
    for nsp in ns_packages:
        if not dist.has_contents_for(nsp):
            raise DistutilsSetupError(
                "Distribution contains no modules or packages for "
                + "namespace package %r" % nsp
            )
        parent, sep, child = nsp.rpartition('.')
        if parent and parent not in ns_packages:
            distutils.log.warn(
                "WARNING: %r is declared as a package namespace, but %r"
                " is not: please correct this in setup.py",
                nsp,
                parent,
            )
        msg = (
            "The namespace_packages parameter is deprecated, "
            "consider using implicit namespaces instead (PEP 420)."
        )
        warnings.warn(msg, SetuptoolsDeprecationWarning)


def check_extras(dist, attr, value):
    """Verify that extras_require mapping is valid"""
    try:
        list(itertools.starmap(_check_extra, value.items()))
    except (TypeError, ValueError, AttributeError) as e:
        raise DistutilsSetupError(
            "'extras_require' must be a dictionary whose values are "
            "strings or lists of strings containing valid project/version "
            "requirement specifiers."
        ) from e


def _check_extra(extra, reqs):
    name, sep, marker = extra.partition(':')
    if marker and pkg_resources.invalid_marker(marker):
        raise DistutilsSetupError("Invalid environment marker: " + marker)
    list(_reqs.parse(reqs))


def assert_bool(dist, attr, value):
    """Verify that value is True, False, 0, or 1"""
    if bool(value) != value:
        tmpl = "{attr!r} must be a boolean value (got {value!r})"
        raise DistutilsSetupError(tmpl.format(attr=attr, value=value))


def invalid_unless_false(dist, attr, value):
    if not value:
        warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
        return
    raise DistutilsSetupError(f"{attr} is invalid.")


def check_requirements(dist, attr, value):
    """Verify that install_requires is a valid requirements list"""
    try:
        list(_reqs.parse(value))
        if isinstance(value, (dict, set)):
            raise TypeError("Unordered types are not allowed")
    except (TypeError, ValueError) as error:
        tmpl = (
            "{attr!r} must be a string or list of strings "
            "containing valid project/version requirement specifiers; {error}"
        )
        raise DistutilsSetupError(tmpl.format(attr=attr, error=error)) from error


def check_specifier(dist, attr, value):
    """Verify that value is a valid version specifier"""
    try:
        packaging.specifiers.SpecifierSet(value)
    except (packaging.specifiers.InvalidSpecifier, AttributeError) as error:
        tmpl = (
            "{attr!r} must be a string " "containing valid version specifiers; {error}"
        )
        raise DistutilsSetupError(tmpl.format(attr=attr, error=error)) from error


def check_entry_points(dist, attr, value):
    """Verify that entry_points map is parseable"""
    try:
        _entry_points.load(value)
    except Exception as e:
        raise DistutilsSetupError(e) from e


def check_test_suite(dist, attr, value):
    if not isinstance(value, str):
        raise DistutilsSetupError("test_suite must be a string")


def check_package_data(dist, attr, value):
    """Verify that value is a dictionary of package names to glob lists"""
    if not isinstance(value, dict):
        raise DistutilsSetupError(
            "{!r} must be a dictionary mapping package names to lists of "
            "string wildcard patterns".format(attr)
        )
    for k, v in value.items():
        if not isinstance(k, str):
            raise DistutilsSetupError(
                "keys of {!r} dict must be strings (got {!r})".format(attr, k)
            )
        assert_string_list(dist, 'values of {!r} dict'.format(attr), v)


def check_packages(dist, attr, value):
    for pkgname in value:
        if not re.match(r'\w+(\.\w+)*', pkgname):
            distutils.log.warn(
                "WARNING: %r not a valid package name; please use only "
                ".-separated package names in setup.py",
                pkgname,
            )


_Distribution = get_unpatched(distutils.core.Distribution)


class Distribution(_Distribution):
    """Distribution with support for tests and package data

    This is an enhanced version of 'distutils.dist.Distribution' that
    effectively adds the following new optional keyword arguments to 'setup()':

     'install_requires' -- a string or sequence of strings specifying project
        versions that the distribution requires when installed, in the format
        used by 'pkg_resources.require()'.  They will be installed
        automatically when the package is installed.  If you wish to use
        packages that are not available in PyPI, or want to give your users an
        alternate download location, you can add a 'find_links' option to the
        '[easy_install]' section of your project's 'setup.cfg' file, and then
        setuptools will scan the listed web pages for links that satisfy the
        requirements.

     'extras_require' -- a dictionary mapping names of optional "extras" to the
        additional requirement(s) that using those extras incurs. For example,
        this::

            extras_require = dict(reST = ["docutils>=0.3", "reSTedit"])

        indicates that the distribution can optionally provide an extra
        capability called "reST", but it can only be used if docutils and
        reSTedit are installed.  If the user installs your package using
        EasyInstall and requests one of your extras, the corresponding
        additional requirements will be installed if needed.

     'test_suite' -- the name of a test suite to run for the 'test' command.
        If the user runs 'python setup.py test', the package will be installed,
        and the named test suite will be run.  The format is the same as
        would be used on a 'unittest.py' command line.  That is, it is the
        dotted name of an object to import and call to generate a test suite.

     'package_data' -- a dictionary mapping package names to lists of filenames
        or globs to use to find data files contained in the named packages.
        If the dictionary has filenames or globs listed under '""' (the empty
        string), those names will be searched for in every package, in addition
        to any names for the specific package.  Data files found using these
        names/globs will be installed along with the package, in the same
        location as the package.  Note that globs are allowed to reference
        the contents of non-package subdirectories, as long as you use '/' as
        a path separator.  (Globs are automatically converted to
        platform-specific paths at runtime.)

    In addition to these new keywords, this class also has several new methods
    for manipulating the distribution's contents.  For example, the 'include()'
    and 'exclude()' methods can be thought of as in-place add and subtract
    commands that add or remove packages, modules, extensions, and so on from
    the distribution.
    """

    _DISTUTILS_UNSUPPORTED_METADATA = {
        'long_description_content_type': lambda: None,
        'project_urls': dict,
        'provides_extras': ordered_set.OrderedSet,
        'license_file': lambda: None,
        'license_files': lambda: None,
    }

    _patched_dist = None

    def patch_missing_pkg_info(self, attrs):
        # Fake up a replacement for the data that would normally come from
        # PKG-INFO, but which might not yet be built if this is a fresh
        # checkout.
        #
        if not attrs or 'name' not in attrs or 'version' not in attrs:
            return
        key = pkg_resources.safe_name(str(attrs['name'])).lower()
        dist = pkg_resources.working_set.by_key.get(key)
        if dist is not None and not dist.has_metadata('PKG-INFO'):
            dist._version = pkg_resources.safe_version(str(attrs['version']))
            self._patched_dist = dist

    def __init__(self, attrs=None):
        have_package_data = hasattr(self, "package_data")
        if not have_package_data:
            self.package_data = {}
        attrs = attrs or {}
        self.dist_files = []
        # Filter-out setuptools' specific options.
        self.src_root = attrs.pop("src_root", None)
        self.patch_missing_pkg_info(attrs)
        self.dependency_links = attrs.pop('dependency_links', [])
        self.setup_requires = attrs.pop('setup_requires', [])
        for ep in metadata.entry_points(group='distutils.setup_keywords'):
            vars(self).setdefault(ep.name, None)
        _Distribution.__init__(
            self,
            {
                k: v
                for k, v in attrs.items()
                if k not in self._DISTUTILS_UNSUPPORTED_METADATA
            },
        )

        # Save the original dependencies before they are processed into the egg format
        self._orig_extras_require = {}
        self._orig_install_requires = []
        self._tmp_extras_require = defaultdict(ordered_set.OrderedSet)

        self.set_defaults = ConfigDiscovery(self)

        self._set_metadata_defaults(attrs)

        self.metadata.version = self._normalize_version(
            self._validate_version(self.metadata.version)
        )
        self._finalize_requires()

    def _validate_metadata(self):
        required = {"name"}
        provided = {
            key
            for key in vars(self.metadata)
            if getattr(self.metadata, key, None) is not None
        }
        missing = required - provided

        if missing:
            msg = f"Required package metadata is missing: {missing}"
            raise DistutilsSetupError(msg)

    def _set_metadata_defaults(self, attrs):
        """
        Fill-in missing metadata fields not supported by distutils.
        Some fields may have been set by other tools (e.g. pbr).
        Those fields (vars(self.metadata)) take precedence to
        supplied attrs.
        """
        for option, default in self._DISTUTILS_UNSUPPORTED_METADATA.items():
            vars(self.metadata).setdefault(option, attrs.get(option, default()))

    @staticmethod
    def _normalize_version(version):
        if isinstance(version, setuptools.sic) or version is None:
            return version

        normalized = str(packaging.version.Version(version))
        if version != normalized:
            tmpl = "Normalizing '{version}' to '{normalized}'"
            warnings.warn(tmpl.format(**locals()))
            return normalized
        return version

    @staticmethod
    def _validate_version(version):
        if isinstance(version, numbers.Number):
            # Some people apparently take "version number" too literally :)
            version = str(version)

        if version is not None:
            try:
                packaging.version.Version(version)
            except (packaging.version.InvalidVersion, TypeError):
                warnings.warn(
                    "The version specified (%r) is an invalid version, this "
                    "may not work as expected with newer versions of "
                    "setuptools, pip, and PyPI. Please see PEP 440 for more "
                    "details." % version
                )
                return setuptools.sic(version)
        return version

    def _finalize_requires(self):
        """
        Set `metadata.python_requires` and fix environment markers
        in `install_requires` and `extras_require`.
        """
        if getattr(self, 'python_requires', None):
            self.metadata.python_requires = self.python_requires

        if getattr(self, 'extras_require', None):
            # Save original before it is messed by _convert_extras_requirements
            self._orig_extras_require = self._orig_extras_require or self.extras_require
            for extra in self.extras_require.keys():
                # Since this gets called multiple times at points where the
                # keys have become 'converted' extras, ensure that we are only
                # truly adding extras we haven't seen before here.
                extra = extra.split(':')[0]
                if extra:
                    self.metadata.provides_extras.add(extra)

        if getattr(self, 'install_requires', None) and not self._orig_install_requires:
            # Save original before it is messed by _move_install_requirements_markers
            self._orig_install_requires = self.install_requires

        self._convert_extras_requirements()
        self._move_install_requirements_markers()

    def _convert_extras_requirements(self):
        """
        Convert requirements in `extras_require` of the form
        `"extra": ["barbazquux; {marker}"]` to
        `"extra:{marker}": ["barbazquux"]`.
        """
        spec_ext_reqs = getattr(self, 'extras_require', None) or {}
        tmp = defaultdict(ordered_set.OrderedSet)
        self._tmp_extras_require = getattr(self, '_tmp_extras_require', tmp)
        for section, v in spec_ext_reqs.items():
            # Do not strip empty sections.
            self._tmp_extras_require[section]
            for r in _reqs.parse(v):
                suffix = self._suffix_for(r)
                self._tmp_extras_require[section + suffix].append(r)

    @staticmethod
    def _suffix_for(req):
        """
        For a requirement, return the 'extras_require' suffix for
        that requirement.
        """
        return ':' + str(req.marker) if req.marker else ''

    def _move_install_requirements_markers(self):
        """
        Move requirements in `install_requires` that are using environment
        markers `extras_require`.
        """

        # divide the install_requires into two sets, simple ones still
        # handled by install_requires and more complex ones handled
        # by extras_require.

        def is_simple_req(req):
            return not req.marker

        spec_inst_reqs = getattr(self, 'install_requires', None) or ()
        inst_reqs = list(_reqs.parse(spec_inst_reqs))
        simple_reqs = filter(is_simple_req, inst_reqs)
        complex_reqs = itertools.filterfalse(is_simple_req, inst_reqs)
        self.install_requires = list(map(str, simple_reqs))

        for r in complex_reqs:
            self._tmp_extras_require[':' + str(r.marker)].append(r)
        self.extras_require = dict(
            # list(dict.fromkeys(...))  ensures a list of unique strings
            (k, list(dict.fromkeys(str(r) for r in map(self._clean_req, v))))
            for k, v in self._tmp_extras_require.items()
        )

    def _clean_req(self, req):
        """
        Given a Requirement, remove environment markers and return it.
        """
        req.marker = None
        return req

    def _finalize_license_files(self):
        """Compute names of all license files which should be included."""
        license_files: Optional[List[str]] = self.metadata.license_files
        patterns: List[str] = license_files if license_files else []

        license_file: Optional[str] = self.metadata.license_file
        if license_file and license_file not in patterns:
            patterns.append(license_file)

        if license_files is None and license_file is None:
            # Default patterns match the ones wheel uses
            # See https://wheel.readthedocs.io/en/stable/user_guide.html
            # -> 'Including license files in the generated wheel file'
            patterns = ('LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*')

        self.metadata.license_files = list(
            unique_everseen(self._expand_patterns(patterns))
        )

    @staticmethod
    def _expand_patterns(patterns):
        """
        >>> list(Distribution._expand_patterns(['LICENSE']))
        ['LICENSE']
        >>> list(Distribution._expand_patterns(['setup.cfg', 'LIC*']))
        ['setup.cfg', 'LICENSE']
        """
        return (
            path
            for pattern in patterns
            for path in sorted(iglob(pattern))
            if not path.endswith('~') and os.path.isfile(path)
        )

    # FIXME: 'Distribution._parse_config_files' is too complex (14)
    def _parse_config_files(self, filenames=None):  # noqa: C901
        """
        Adapted from distutils.dist.Distribution.parse_config_files,
        this method provides the same functionality in subtly-improved
        ways.
        """
        from configparser import ConfigParser

        # Ignore install directory options if we have a venv
        ignore_options = (
            []
            if sys.prefix == sys.base_prefix
            else [
                'install-base',
                'install-platbase',
                'install-lib',
                'install-platlib',
                'install-purelib',
                'install-headers',
                'install-scripts',
                'install-data',
                'prefix',
                'exec-prefix',
                'home',
                'user',
                'root',
            ]
        )

        ignore_options = frozenset(ignore_options)

        if filenames is None:
            filenames = self.find_config_files()

        if DEBUG:
            self.announce("Distribution.parse_config_files():")

        parser = ConfigParser()
        parser.optionxform = str
        for filename in filenames:
            with io.open(filename, encoding='utf-8') as reader:
                if DEBUG:
                    self.announce("  reading {filename}".format(**locals()))
                parser.read_file(reader)
            for section in parser.sections():
                options = parser.options(section)
                opt_dict = self.get_option_dict(section)

                for opt in options:
                    if opt == '__name__' or opt in ignore_options:
                        continue

                    val = parser.get(section, opt)
                    opt = self.warn_dash_deprecation(opt, section)
                    opt = self.make_option_lowercase(opt, section)
                    opt_dict[opt] = (filename, val)

            # Make the ConfigParser forget everything (so we retain
            # the original filenames that options come from)
            parser.__init__()

        if 'global' not in self.command_options:
            return

        # If there was a "global" section in the config file, use it
        # to set Distribution options.

        for (opt, (src, val)) in self.command_options['global'].items():
            alias = self.negative_opt.get(opt)
            if alias:
                val = not strtobool(val)
            elif opt in ('verbose', 'dry_run'):  # ugh!
                val = strtobool(val)

            try:
                setattr(self, alias or opt, val)
            except ValueError as e:
                raise DistutilsOptionError(e) from e

    def warn_dash_deprecation(self, opt, section):
        if section in (
            'options.extras_require',
            'options.data_files',
        ):
            return opt

        underscore_opt = opt.replace('-', '_')
        commands = list(itertools.chain(
            distutils.command.__all__,
            self._setuptools_commands(),
        ))
        if (
            not section.startswith('options')
            and section != 'metadata'
            and section not in commands
        ):
            return underscore_opt

        if '-' in opt:
            warnings.warn(
                "Usage of dash-separated '%s' will not be supported in future "
                "versions. Please use the underscore name '%s' instead"
                % (opt, underscore_opt)
            )
        return underscore_opt

    def _setuptools_commands(self):
        try:
            return metadata.distribution('setuptools').entry_points.names
        except metadata.PackageNotFoundError:
            # during bootstrapping, distribution doesn't exist
            return []

    def make_option_lowercase(self, opt, section):
        if section != 'metadata' or opt.islower():
            return opt

        lowercase_opt = opt.lower()
        warnings.warn(
            "Usage of uppercase key '%s' in '%s' will be deprecated in future "
            "versions. Please use lowercase '%s' instead"
            % (opt, section, lowercase_opt)
        )
        return lowercase_opt

    # FIXME: 'Distribution._set_command_options' is too complex (14)
    def _set_command_options(self, command_obj, option_dict=None):  # noqa: C901
        """
        Set the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').

        (Adopted from distutils.dist.Distribution._set_command_options)
        """
        command_name = command_obj.get_command_name()
        if option_dict is None:
            option_dict = self.get_option_dict(command_name)

        if DEBUG:
            self.announce("  setting options for '%s' command:" % command_name)
        for (option, (source, value)) in option_dict.items():
            if DEBUG:
                self.announce("    %s = %s (from %s)" % (option, value, source))
            try:
                bool_opts = [translate_longopt(o) for o in command_obj.boolean_options]
            except AttributeError:
                bool_opts = []
            try:
                neg_opt = command_obj.negative_opt
            except AttributeError:
                neg_opt = {}

            try:
                is_string = isinstance(value, str)
                if option in neg_opt and is_string:
                    setattr(command_obj, neg_opt[option], not strtobool(value))
                elif option in bool_opts and is_string:
                    setattr(command_obj, option, strtobool(value))
                elif hasattr(command_obj, option):
                    setattr(command_obj, option, value)
                else:
                    raise DistutilsOptionError(
                        "error in %s: command '%s' has no such option '%s'"
                        % (source, command_name, option)
                    )
            except ValueError as e:
                raise DistutilsOptionError(e) from e

    def _get_project_config_files(self, filenames):
        """Add default file and split between INI and TOML"""
        tomlfiles = []
        standard_project_metadata = Path(self.src_root or os.curdir, "pyproject.toml")
        if filenames is not None:
            parts = partition(lambda f: Path(f).suffix == ".toml", filenames)
            filenames = list(parts[0])  # 1st element => predicate is False
            tomlfiles = list(parts[1])  # 2nd element => predicate is True
        elif standard_project_metadata.exists():
            tomlfiles = [standard_project_metadata]
        return filenames, tomlfiles

    def parse_config_files(self, filenames=None, ignore_option_errors=False):
        """Parses configuration files from various levels
        and loads configuration.
        """
        inifiles, tomlfiles = self._get_project_config_files(filenames)

        self._parse_config_files(filenames=inifiles)

        setupcfg.parse_configuration(
            self, self.command_options, ignore_option_errors=ignore_option_errors
        )
        for filename in tomlfiles:
            pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)

        self._finalize_requires()
        self._finalize_license_files()

    def fetch_build_eggs(self, requires):
        """Resolve pre-setup requirements"""
        resolved_dists = pkg_resources.working_set.resolve(
            _reqs.parse(requires),
            installer=self.fetch_build_egg,
            replace_conflicting=True,
        )
        for dist in resolved_dists:
            pkg_resources.working_set.add(dist, replace=True)
        return resolved_dists

    def finalize_options(self):
        """
        Allow plugins to apply arbitrary operations to the
        distribution. Each hook may optionally define a 'order'
        to influence the order of execution. Smaller numbers
        go first and the default is 0.
        """
        group = 'setuptools.finalize_distribution_options'

        def by_order(hook):
            return getattr(hook, 'order', 0)

        defined = metadata.entry_points(group=group)
        filtered = itertools.filterfalse(self._removed, defined)
        loaded = map(lambda e: e.load(), filtered)
        for ep in sorted(loaded, key=by_order):
            ep(self)

    @staticmethod
    def _removed(ep):
        """
        When removing an entry point, if metadata is loaded
        from an older version of Setuptools, that removed
        entry point will attempt to be loaded and will fail.
        See #2765 for more details.
        """
        removed = {
            # removed 2021-09-05
            '2to3_doctests',
        }
        return ep.name in removed

    def _finalize_setup_keywords(self):
        for ep in metadata.entry_points(group='distutils.setup_keywords'):
            value = getattr(self, ep.name, None)
            if value is not None:
                ep.load()(self, ep.name, value)

    def get_egg_cache_dir(self):
        egg_cache_dir = os.path.join(os.curdir, '.eggs')
        if not os.path.exists(egg_cache_dir):
            os.mkdir(egg_cache_dir)
            windows_support.hide_file(egg_cache_dir)
            readme_txt_filename = os.path.join(egg_cache_dir, 'README.txt')
            with open(readme_txt_filename, 'w') as f:
                f.write(
                    'This directory contains eggs that were downloaded '
                    'by setuptools to build, test, and run plug-ins.\n\n'
                )
                f.write(
                    'This directory caches those eggs to prevent '
                    'repeated downloads.\n\n'
                )
                f.write('However, it is safe to delete this directory.\n\n')

        return egg_cache_dir

    def fetch_build_egg(self, req):
        """Fetch an egg needed for building"""
        from setuptools.installer import fetch_build_egg

        return fetch_build_egg(self, req)

    def get_command_class(self, command):
        """Pluggable version of get_command_class()"""
        if command in self.cmdclass:
            return self.cmdclass[command]

        eps = metadata.entry_points(group='distutils.commands', name=command)
        for ep in eps:
            self.cmdclass[command] = cmdclass = ep.load()
            return cmdclass
        else:
            return _Distribution.get_command_class(self, command)

    def print_commands(self):
        for ep in metadata.entry_points(group='distutils.commands'):
            if ep.name not in self.cmdclass:
                cmdclass = ep.load()
                self.cmdclass[ep.name] = cmdclass
        return _Distribution.print_commands(self)

    def get_command_list(self):
        for ep in metadata.entry_points(group='distutils.commands'):
            if ep.name not in self.cmdclass:
                cmdclass = ep.load()
                self.cmdclass[ep.name] = cmdclass
        return _Distribution.get_command_list(self)

    def include(self, **attrs):
        """Add items to distribution that are named in keyword arguments

        For example, 'dist.include(py_modules=["x"])' would add 'x' to
        the distribution's 'py_modules' attribute, if it was not already
        there.

        Currently, this method only supports inclusion for attributes that are
        lists or tuples.  If you need to add support for adding to other
        attributes in this or a subclass, you can add an '_include_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'include()'.  So, 'dist.include(foo={"bar":"baz"})'
        will try to call 'dist._include_foo({"bar":"baz"})', which can then
        handle whatever special inclusion logic is needed.
        """
        for k, v in attrs.items():
            include = getattr(self, '_include_' + k, None)
            if include:
                include(v)
            else:
                self._include_misc(k, v)

    def exclude_package(self, package):
        """Remove packages, modules, and extensions in named package"""

        pfx = package + '.'
        if self.packages:
            self.packages = [
                p for p in self.packages if p != package and not p.startswith(pfx)
            ]

        if self.py_modules:
            self.py_modules = [
                p for p in self.py_modules if p != package and not p.startswith(pfx)
            ]

        if self.ext_modules:
            self.ext_modules = [
                p
                for p in self.ext_modules
                if p.name != package and not p.name.startswith(pfx)
            ]

    def has_contents_for(self, package):
        """Return true if 'exclude_package(package)' would do something"""

        pfx = package + '.'

        for p in self.iter_distribution_names():
            if p == package or p.startswith(pfx):
                return True

    def _exclude_misc(self, name, value):
        """Handle 'exclude()' for list/tuple attrs without a special handler"""
        if not isinstance(value, sequence):
            raise DistutilsSetupError(
                "%s: setting must be a list or tuple (%r)" % (name, value)
            )
        try:
            old = getattr(self, name)
        except AttributeError as e:
            raise DistutilsSetupError("%s: No such distribution setting" % name) from e
        if old is not None and not isinstance(old, sequence):
            raise DistutilsSetupError(
                name + ": this setting cannot be changed via include/exclude"
            )
        elif old:
            setattr(self, name, [item for item in old if item not in value])

    def _include_misc(self, name, value):
        """Handle 'include()' for list/tuple attrs without a special handler"""

        if not isinstance(value, sequence):
            raise DistutilsSetupError("%s: setting must be a list (%r)" % (name, value))
        try:
            old = getattr(self, name)
        except AttributeError as e:
            raise DistutilsSetupError("%s: No such distribution setting" % name) from e
        if old is None:
            setattr(self, name, value)
        elif not isinstance(old, sequence):
            raise DistutilsSetupError(
                name + ": this setting cannot be changed via include/exclude"
            )
        else:
            new = [item for item in value if item not in old]
            setattr(self, name, old + new)

    def exclude(self, **attrs):
        """Remove items from distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from
        the distribution's 'py_modules' attribute.  Excluding packages uses
        the 'exclude_package()' method, so all of the package's contained
        packages, modules, and extensions are also excluded.

        Currently, this method only supports exclusion from attributes that are
        lists or tuples.  If you need to add support for excluding from other
        attributes in this or a subclass, you can add an '_exclude_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'exclude()'.  So, 'dist.exclude(foo={"bar":"baz"})'
        will try to call 'dist._exclude_foo({"bar":"baz"})', which can then
        handle whatever special exclusion logic is needed.
        """
        for k, v in attrs.items():
            exclude = getattr(self, '_exclude_' + k, None)
            if exclude:
                exclude(v)
            else:
                self._exclude_misc(k, v)

    def _exclude_packages(self, packages):
        if not isinstance(packages, sequence):
            raise DistutilsSetupError(
                "packages: setting must be a list or tuple (%r)" % (packages,)
            )
        list(map(self.exclude_package, packages))

    def _parse_command_opts(self, parser, args):
        # Remove --with-X/--without-X options when processing command args
        self.global_options = self.__class__.global_options
        self.negative_opt = self.__class__.negative_opt

        # First, expand any aliases
        command = args[0]
        aliases = self.get_option_dict('aliases')
        while command in aliases:
            src, alias = aliases[command]
            del aliases[command]  # ensure each alias can expand only once!
            import shlex

            args[:1] = shlex.split(alias, True)
            command = args[0]

        nargs = _Distribution._parse_command_opts(self, parser, args)

        # Handle commands that want to consume all remaining arguments
        cmd_class = self.get_command_class(command)
        if getattr(cmd_class, 'command_consumes_arguments', None):
            self.get_option_dict(command)['args'] = ("command line", nargs)
            if nargs is not None:
                return []

        return nargs

    def get_cmdline_options(self):
        """Return a '{cmd: {opt:val}}' map of all command-line options

        Option names are all long, but do not include the leading '--', and
        contain dashes rather than underscores.  If the option doesn't take
        an argument (e.g. '--quiet'), the 'val' is 'None'.

        Note that options provided by config files are intentionally excluded.
        """

        d = {}

        for cmd, opts in self.command_options.items():

            for opt, (src, val) in opts.items():

                if src != "command line":
                    continue

                opt = opt.replace('_', '-')

                if val == 0:
                    cmdobj = self.get_command_obj(cmd)
                    neg_opt = self.negative_opt.copy()
                    neg_opt.update(getattr(cmdobj, 'negative_opt', {}))
                    for neg, pos in neg_opt.items():
                        if pos == opt:
                            opt = neg
                            val = None
                            break
                    else:
                        raise AssertionError("Shouldn't be able to get here")

                elif val == 1:
                    val = None

                d.setdefault(cmd, {})[opt] = val

        return d

    def iter_distribution_names(self):
        """Yield all packages, modules, and extension names in distribution"""

        for pkg in self.packages or ():
            yield pkg

        for module in self.py_modules or ():
            yield module

        for ext in self.ext_modules or ():
            if isinstance(ext, tuple):
                name, buildinfo = ext
            else:
                name = ext.name
            if name.endswith('module'):
                name = name[:-6]
            yield name

    def handle_display_options(self, option_order):
        """If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        """
        import sys

        if self.help_commands:
            return _Distribution.handle_display_options(self, option_order)

        # Stdout may be StringIO (e.g. in tests)
        if not isinstance(sys.stdout, io.TextIOWrapper):
            return _Distribution.handle_display_options(self, option_order)

        # Don't wrap stdout if utf-8 is already the encoding. Provides
        #  workaround for #334.
        if sys.stdout.encoding.lower() in ('utf-8', 'utf8'):
            return _Distribution.handle_display_options(self, option_order)

        # Print metadata in UTF-8 no matter the platform
        encoding = sys.stdout.encoding
        errors = sys.stdout.errors
        newline = sys.platform != 'win32' and '\n' or None
        line_buffering = sys.stdout.line_buffering

        sys.stdout = io.TextIOWrapper(
            sys.stdout.detach(), 'utf-8', errors, newline, line_buffering
        )
        try:
            return _Distribution.handle_display_options(self, option_order)
        finally:
            sys.stdout = io.TextIOWrapper(
                sys.stdout.detach(), encoding, errors, newline, line_buffering
            )

    def run_command(self, command):
        self.set_defaults()
        # Postpone defaults until all explicit configuration is considered
        # (setup() args, config files, command line and plugins)

        super().run_command(command)


class DistDeprecationWarning(SetuptoolsDeprecationWarning):
    """Class for warning about deprecations in dist in
    setuptools. Not ignored by default, unlike DeprecationWarning."""
PK|5Ziy{{'Lib/site-packages/setuptools/depends.pynuW+Aimport sys
import marshal
import contextlib
import dis

from setuptools.extern.packaging import version

from ._imp import find_module, PY_COMPILED, PY_FROZEN, PY_SOURCE
from . import _imp


__all__ = [
    'Require', 'find_module', 'get_module_constant', 'extract_constant'
]


class Require:
    """A prerequisite to building or installing a distribution"""

    def __init__(
            self, name, requested_version, module, homepage='',
            attribute=None, format=None):

        if format is None and requested_version is not None:
            format = version.Version

        if format is not None:
            requested_version = format(requested_version)
            if attribute is None:
                attribute = '__version__'

        self.__dict__.update(locals())
        del self.self

    def full_name(self):
        """Return full package/distribution name, w/version"""
        if self.requested_version is not None:
            return '%s-%s' % (self.name, self.requested_version)
        return self.name

    def version_ok(self, version):
        """Is 'version' sufficiently up-to-date?"""
        return self.attribute is None or self.format is None or \
            str(version) != "unknown" and self.format(version) >= self.requested_version

    def get_version(self, paths=None, default="unknown"):
        """Get version number of installed module, 'None', or 'default'

        Search 'paths' for module.  If not found, return 'None'.  If found,
        return the extracted version attribute, or 'default' if no version
        attribute was specified, or the value cannot be determined without
        importing the module.  The version is formatted according to the
        requirement's version format (if any), unless it is 'None' or the
        supplied 'default'.
        """

        if self.attribute is None:
            try:
                f, p, i = find_module(self.module, paths)
                if f:
                    f.close()
                return default
            except ImportError:
                return None

        v = get_module_constant(self.module, self.attribute, default, paths)

        if v is not None and v is not default and self.format is not None:
            return self.format(v)

        return v

    def is_present(self, paths=None):
        """Return true if dependency is present on 'paths'"""
        return self.get_version(paths) is not None

    def is_current(self, paths=None):
        """Return true if dependency is present and up-to-date on 'paths'"""
        version = self.get_version(paths)
        if version is None:
            return False
        return self.version_ok(str(version))


def maybe_close(f):
    @contextlib.contextmanager
    def empty():
        yield
        return
    if not f:
        return empty()

    return contextlib.closing(f)


def get_module_constant(module, symbol, default=-1, paths=None):
    """Find 'module' by searching 'paths', and extract 'symbol'

    Return 'None' if 'module' does not exist on 'paths', or it does not define
    'symbol'.  If the module defines 'symbol' as a constant, return the
    constant.  Otherwise, return 'default'."""

    try:
        f, path, (suffix, mode, kind) = info = find_module(module, paths)
    except ImportError:
        # Module doesn't exist
        return None

    with maybe_close(f):
        if kind == PY_COMPILED:
            f.read(8)  # skip magic & date
            code = marshal.load(f)
        elif kind == PY_FROZEN:
            code = _imp.get_frozen_object(module, paths)
        elif kind == PY_SOURCE:
            code = compile(f.read(), path, 'exec')
        else:
            # Not something we can parse; we'll have to import it.  :(
            imported = _imp.get_module(module, paths, info)
            return getattr(imported, symbol, None)

    return extract_constant(code, symbol, default)


def extract_constant(code, symbol, default=-1):
    """Extract the constant value of 'symbol' from 'code'

    If the name 'symbol' is bound to a constant value by the Python code
    object 'code', return that value.  If 'symbol' is bound to an expression,
    return 'default'.  Otherwise, return 'None'.

    Return value is based on the first assignment to 'symbol'.  'symbol' must
    be a global, or at least a non-"fast" local in the code block.  That is,
    only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol'
    must be present in 'code.co_names'.
    """
    if symbol not in code.co_names:
        # name's not there, can't possibly be an assignment
        return None

    name_idx = list(code.co_names).index(symbol)

    STORE_NAME = 90
    STORE_GLOBAL = 97
    LOAD_CONST = 100

    const = default

    for byte_code in dis.Bytecode(code):
        op = byte_code.opcode
        arg = byte_code.arg

        if op == LOAD_CONST:
            const = code.co_consts[arg]
        elif arg == name_idx and (op == STORE_NAME or op == STORE_GLOBAL):
            return const
        else:
            const = default


def _update_globals():
    """
    Patch the globals to remove the objects not available on some platforms.

    XXX it'd be better to test assertions about bytecode instead.
    """

    if not sys.platform.startswith('java') and sys.platform != 'cli':
        return
    incompatible = 'extract_constant', 'get_module_constant'
    for name in incompatible:
        del globals()[name]
        __all__.remove(name)


_update_globals()
PK|5Z΁TT-Lib/site-packages/setuptools/package_index.pynuW+A"""PyPI and direct package downloading"""
import sys
import os
import re
import io
import shutil
import socket
import base64
import hashlib
import itertools
import warnings
import configparser
import html
import http.client
import urllib.parse
import urllib.request
import urllib.error
from functools import wraps

import setuptools
from pkg_resources import (
    CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST,
    Environment, find_distributions, safe_name, safe_version,
    to_filename, Requirement, DEVELOP_DIST, EGG_DIST, parse_version,
)
from distutils import log
from distutils.errors import DistutilsError
from fnmatch import translate
from setuptools.wheel import Wheel
from setuptools.extern.more_itertools import unique_everseen


EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$')
HREF = re.compile(r"""href\s*=\s*['"]?([^'"> ]+)""", re.I)
PYPI_MD5 = re.compile(
    r'([^<]+)\n\s+\(md5\)'
)
URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):', re.I).match
EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split()

__all__ = [
    'PackageIndex', 'distros_for_url', 'parse_bdist_wininst',
    'interpret_distro_name',
]

_SOCKET_TIMEOUT = 15

_tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}"
user_agent = _tmpl.format(
    py_major='{}.{}'.format(*sys.version_info), setuptools=setuptools)


def parse_requirement_arg(spec):
    try:
        return Requirement.parse(spec)
    except ValueError as e:
        raise DistutilsError(
            "Not a URL, existing file, or requirement spec: %r" % (spec,)
        ) from e


def parse_bdist_wininst(name):
    """Return (base,pyversion) or (None,None) for possible .exe name"""

    lower = name.lower()
    base, py_ver, plat = None, None, None

    if lower.endswith('.exe'):
        if lower.endswith('.win32.exe'):
            base = name[:-10]
            plat = 'win32'
        elif lower.startswith('.win32-py', -16):
            py_ver = name[-7:-4]
            base = name[:-16]
            plat = 'win32'
        elif lower.endswith('.win-amd64.exe'):
            base = name[:-14]
            plat = 'win-amd64'
        elif lower.startswith('.win-amd64-py', -20):
            py_ver = name[-7:-4]
            base = name[:-20]
            plat = 'win-amd64'
    return base, py_ver, plat


def egg_info_for_url(url):
    parts = urllib.parse.urlparse(url)
    scheme, server, path, parameters, query, fragment = parts
    base = urllib.parse.unquote(path.split('/')[-1])
    if server == 'sourceforge.net' and base == 'download':  # XXX Yuck
        base = urllib.parse.unquote(path.split('/')[-2])
    if '#' in base:
        base, fragment = base.split('#', 1)
    return base, fragment


def distros_for_url(url, metadata=None):
    """Yield egg or source distribution objects that might be found at a URL"""
    base, fragment = egg_info_for_url(url)
    for dist in distros_for_location(url, base, metadata):
        yield dist
    if fragment:
        match = EGG_FRAGMENT.match(fragment)
        if match:
            for dist in interpret_distro_name(
                url, match.group(1), metadata, precedence=CHECKOUT_DIST
            ):
                yield dist


def distros_for_location(location, basename, metadata=None):
    """Yield egg or source distribution objects based on basename"""
    if basename.endswith('.egg.zip'):
        basename = basename[:-4]  # strip the .zip
    if basename.endswith('.egg') and '-' in basename:
        # only one, unambiguous interpretation
        return [Distribution.from_location(location, basename, metadata)]
    if basename.endswith('.whl') and '-' in basename:
        wheel = Wheel(basename)
        if not wheel.is_compatible():
            return []
        return [Distribution(
            location=location,
            project_name=wheel.project_name,
            version=wheel.version,
            # Increase priority over eggs.
            precedence=EGG_DIST + 1,
        )]
    if basename.endswith('.exe'):
        win_base, py_ver, platform = parse_bdist_wininst(basename)
        if win_base is not None:
            return interpret_distro_name(
                location, win_base, metadata, py_ver, BINARY_DIST, platform
            )
    # Try source distro extensions (.zip, .tgz, etc.)
    #
    for ext in EXTENSIONS:
        if basename.endswith(ext):
            basename = basename[:-len(ext)]
            return interpret_distro_name(location, basename, metadata)
    return []  # no extension matched


def distros_for_filename(filename, metadata=None):
    """Yield possible egg or source distribution objects based on a filename"""
    return distros_for_location(
        normalize_path(filename), os.path.basename(filename), metadata
    )


def interpret_distro_name(
        location, basename, metadata, py_version=None, precedence=SOURCE_DIST,
        platform=None
):
    """Generate alternative interpretations of a source distro name

    Note: if `location` is a filesystem filename, you should call
    ``pkg_resources.normalize_path()`` on it before passing it to this
    routine!
    """
    # Generate alternative interpretations of a source distro name
    # Because some packages are ambiguous as to name/versions split
    # e.g. "adns-python-1.1.0", "egenix-mx-commercial", etc.
    # So, we generate each possible interpretation (e.g. "adns, python-1.1.0"
    # "adns-python, 1.1.0", and "adns-python-1.1.0, no version").  In practice,
    # the spurious interpretations should be ignored, because in the event
    # there's also an "adns" package, the spurious "python-1.1.0" version will
    # compare lower than any numeric version number, and is therefore unlikely
    # to match a request for it.  It's still a potential problem, though, and
    # in the long run PyPI and the distutils should go for "safe" names and
    # versions in distribution archive names (sdist and bdist).

    parts = basename.split('-')
    if not py_version and any(re.match(r'py\d\.\d$', p) for p in parts[2:]):
        # it is a bdist_dumb, not an sdist -- bail out
        return

    for p in range(1, len(parts) + 1):
        yield Distribution(
            location, metadata, '-'.join(parts[:p]), '-'.join(parts[p:]),
            py_version=py_version, precedence=precedence,
            platform=platform
        )


def unique_values(func):
    """
    Wrap a function returning an iterable such that the resulting iterable
    only ever yields unique items.
    """

    @wraps(func)
    def wrapper(*args, **kwargs):
        return unique_everseen(func(*args, **kwargs))

    return wrapper


REL = re.compile(r"""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I)
# this line is here to fix emacs' cruddy broken syntax highlighting


@unique_values
def find_external_links(url, page):
    """Find rel="homepage" and rel="download" links in `page`, yielding URLs"""

    for match in REL.finditer(page):
        tag, rel = match.groups()
        rels = set(map(str.strip, rel.lower().split(',')))
        if 'homepage' in rels or 'download' in rels:
            for match in HREF.finditer(tag):
                yield urllib.parse.urljoin(url, htmldecode(match.group(1)))

    for tag in ("Home Page", "Download URL"):
        pos = page.find(tag)
        if pos != -1:
            match = HREF.search(page, pos)
            if match:
                yield urllib.parse.urljoin(url, htmldecode(match.group(1)))


class ContentChecker:
    """
    A null content checker that defines the interface for checking content
    """

    def feed(self, block):
        """
        Feed a block of data to the hash.
        """
        return

    def is_valid(self):
        """
        Check the hash. Return False if validation fails.
        """
        return True

    def report(self, reporter, template):
        """
        Call reporter with information about the checker (hash name)
        substituted into the template.
        """
        return


class HashChecker(ContentChecker):
    pattern = re.compile(
        r'(?Psha1|sha224|sha384|sha256|sha512|md5)='
        r'(?P[a-f0-9]+)'
    )

    def __init__(self, hash_name, expected):
        self.hash_name = hash_name
        self.hash = hashlib.new(hash_name)
        self.expected = expected

    @classmethod
    def from_url(cls, url):
        "Construct a (possibly null) ContentChecker from a URL"
        fragment = urllib.parse.urlparse(url)[-1]
        if not fragment:
            return ContentChecker()
        match = cls.pattern.search(fragment)
        if not match:
            return ContentChecker()
        return cls(**match.groupdict())

    def feed(self, block):
        self.hash.update(block)

    def is_valid(self):
        return self.hash.hexdigest() == self.expected

    def report(self, reporter, template):
        msg = template % self.hash_name
        return reporter(msg)


class PackageIndex(Environment):
    """A distribution index that scans web pages for download URLs"""

    def __init__(
            self, index_url="https://pypi.org/simple/", hosts=('*',),
            ca_bundle=None, verify_ssl=True, *args, **kw
    ):
        super().__init__(*args, **kw)
        self.index_url = index_url + "/" [:not index_url.endswith('/')]
        self.scanned_urls = {}
        self.fetched_urls = {}
        self.package_pages = {}
        self.allows = re.compile('|'.join(map(translate, hosts))).match
        self.to_scan = []
        self.opener = urllib.request.urlopen

    def add(self, dist):
        # ignore invalid versions
        try:
            parse_version(dist.version)
        except Exception:
            return
        return super().add(dist)

    # FIXME: 'PackageIndex.process_url' is too complex (14)
    def process_url(self, url, retrieve=False):  # noqa: C901
        """Evaluate a URL as a possible download, and maybe retrieve it"""
        if url in self.scanned_urls and not retrieve:
            return
        self.scanned_urls[url] = True
        if not URL_SCHEME(url):
            self.process_filename(url)
            return
        else:
            dists = list(distros_for_url(url))
            if dists:
                if not self.url_ok(url):
                    return
                self.debug("Found link: %s", url)

        if dists or not retrieve or url in self.fetched_urls:
            list(map(self.add, dists))
            return  # don't need the actual page

        if not self.url_ok(url):
            self.fetched_urls[url] = True
            return

        self.info("Reading %s", url)
        self.fetched_urls[url] = True  # prevent multiple fetch attempts
        tmpl = "Download error on %s: %%s -- Some packages may not be found!"
        f = self.open_url(url, tmpl % url)
        if f is None:
            return
        if isinstance(f, urllib.error.HTTPError) and f.code == 401:
            self.info("Authentication error: %s" % f.msg)
        self.fetched_urls[f.url] = True
        if 'html' not in f.headers.get('content-type', '').lower():
            f.close()  # not html, we can't process it
            return

        base = f.url  # handle redirects
        page = f.read()
        if not isinstance(page, str):
            # In Python 3 and got bytes but want str.
            if isinstance(f, urllib.error.HTTPError):
                # Errors have no charset, assume latin1:
                charset = 'latin-1'
            else:
                charset = f.headers.get_param('charset') or 'latin-1'
            page = page.decode(charset, "ignore")
        f.close()
        for match in HREF.finditer(page):
            link = urllib.parse.urljoin(base, htmldecode(match.group(1)))
            self.process_url(link)
        if url.startswith(self.index_url) and getattr(f, 'code', None) != 404:
            page = self.process_index(url, page)

    def process_filename(self, fn, nested=False):
        # process filenames or directories
        if not os.path.exists(fn):
            self.warn("Not found: %s", fn)
            return

        if os.path.isdir(fn) and not nested:
            path = os.path.realpath(fn)
            for item in os.listdir(path):
                self.process_filename(os.path.join(path, item), True)

        dists = distros_for_filename(fn)
        if dists:
            self.debug("Found: %s", fn)
            list(map(self.add, dists))

    def url_ok(self, url, fatal=False):
        s = URL_SCHEME(url)
        is_file = s and s.group(1).lower() == 'file'
        if is_file or self.allows(urllib.parse.urlparse(url)[1]):
            return True
        msg = (
            "\nNote: Bypassing %s (disallowed host; see "
            "http://bit.ly/2hrImnY for details).\n")
        if fatal:
            raise DistutilsError(msg % url)
        else:
            self.warn(msg, url)

    def scan_egg_links(self, search_path):
        dirs = filter(os.path.isdir, search_path)
        egg_links = (
            (path, entry)
            for path in dirs
            for entry in os.listdir(path)
            if entry.endswith('.egg-link')
        )
        list(itertools.starmap(self.scan_egg_link, egg_links))

    def scan_egg_link(self, path, entry):
        with open(os.path.join(path, entry)) as raw_lines:
            # filter non-empty lines
            lines = list(filter(None, map(str.strip, raw_lines)))

        if len(lines) != 2:
            # format is not recognized; punt
            return

        egg_path, setup_path = lines

        for dist in find_distributions(os.path.join(path, egg_path)):
            dist.location = os.path.join(path, *lines)
            dist.precedence = SOURCE_DIST
            self.add(dist)

    def _scan(self, link):
        # Process a URL to see if it's for a package page
        NO_MATCH_SENTINEL = None, None
        if not link.startswith(self.index_url):
            return NO_MATCH_SENTINEL

        parts = list(map(
            urllib.parse.unquote, link[len(self.index_url):].split('/')
        ))
        if len(parts) != 2 or '#' in parts[1]:
            return NO_MATCH_SENTINEL

        # it's a package page, sanitize and index it
        pkg = safe_name(parts[0])
        ver = safe_version(parts[1])
        self.package_pages.setdefault(pkg.lower(), {})[link] = True
        return to_filename(pkg), to_filename(ver)

    def process_index(self, url, page):
        """Process the contents of a PyPI page"""

        # process an index page into the package-page index
        for match in HREF.finditer(page):
            try:
                self._scan(urllib.parse.urljoin(url, htmldecode(match.group(1))))
            except ValueError:
                pass

        pkg, ver = self._scan(url)  # ensure this page is in the page index
        if not pkg:
            return ""  # no sense double-scanning non-package pages

        # process individual package page
        for new_url in find_external_links(url, page):
            # Process the found URL
            base, frag = egg_info_for_url(new_url)
            if base.endswith('.py') and not frag:
                if ver:
                    new_url += '#egg=%s-%s' % (pkg, ver)
                else:
                    self.need_version_info(url)
            self.scan_url(new_url)

        return PYPI_MD5.sub(
            lambda m: '%s' % m.group(1, 3, 2), page
        )

    def need_version_info(self, url):
        self.scan_all(
            "Page at %s links to .py file(s) without version info; an index "
            "scan is required.", url
        )

    def scan_all(self, msg=None, *args):
        if self.index_url not in self.fetched_urls:
            if msg:
                self.warn(msg, *args)
            self.info(
                "Scanning index of all packages (this may take a while)"
            )
        self.scan_url(self.index_url)

    def find_packages(self, requirement):
        self.scan_url(self.index_url + requirement.unsafe_name + '/')

        if not self.package_pages.get(requirement.key):
            # Fall back to safe version of the name
            self.scan_url(self.index_url + requirement.project_name + '/')

        if not self.package_pages.get(requirement.key):
            # We couldn't find the target package, so search the index page too
            self.not_found_in_index(requirement)

        for url in list(self.package_pages.get(requirement.key, ())):
            # scan each page that might be related to the desired package
            self.scan_url(url)

    def obtain(self, requirement, installer=None):
        self.prescan()
        self.find_packages(requirement)
        for dist in self[requirement.key]:
            if dist in requirement:
                return dist
            self.debug("%s does not match %s", requirement, dist)
        return super(PackageIndex, self).obtain(requirement, installer)

    def check_hash(self, checker, filename, tfp):
        """
        checker is a ContentChecker
        """
        checker.report(
            self.debug,
            "Validating %%s checksum for %s" % filename)
        if not checker.is_valid():
            tfp.close()
            os.unlink(filename)
            raise DistutilsError(
                "%s validation failed for %s; "
                "possible download problem?"
                % (checker.hash.name, os.path.basename(filename))
            )

    def add_find_links(self, urls):
        """Add `urls` to the list that will be prescanned for searches"""
        for url in urls:
            if (
                self.to_scan is None  # if we have already "gone online"
                or not URL_SCHEME(url)  # or it's a local file/directory
                or url.startswith('file:')
                or list(distros_for_url(url))  # or a direct package link
            ):
                # then go ahead and process it now
                self.scan_url(url)
            else:
                # otherwise, defer retrieval till later
                self.to_scan.append(url)

    def prescan(self):
        """Scan urls scheduled for prescanning (e.g. --find-links)"""
        if self.to_scan:
            list(map(self.scan_url, self.to_scan))
        self.to_scan = None  # from now on, go ahead and process immediately

    def not_found_in_index(self, requirement):
        if self[requirement.key]:  # we've seen at least one distro
            meth, msg = self.info, "Couldn't retrieve index page for %r"
        else:  # no distros seen for this name, might be misspelled
            meth, msg = (
                self.warn,
                "Couldn't find index page for %r (maybe misspelled?)")
        meth(msg, requirement.unsafe_name)
        self.scan_all()

    def download(self, spec, tmpdir):
        """Locate and/or download `spec` to `tmpdir`, returning a local path

        `spec` may be a ``Requirement`` object, or a string containing a URL,
        an existing local filename, or a project/version requirement spec
        (i.e. the string form of a ``Requirement`` object).  If it is the URL
        of a .py file with an unambiguous ``#egg=name-version`` tag (i.e., one
        that escapes ``-`` as ``_`` throughout), a trivial ``setup.py`` is
        automatically created alongside the downloaded file.

        If `spec` is a ``Requirement`` object or a string containing a
        project/version requirement spec, this method returns the location of
        a matching distribution (possibly after downloading it to `tmpdir`).
        If `spec` is a locally existing file or directory name, it is simply
        returned unchanged.  If `spec` is a URL, it is downloaded to a subpath
        of `tmpdir`, and the local filename is returned.  Various errors may be
        raised if a problem occurs during downloading.
        """
        if not isinstance(spec, Requirement):
            scheme = URL_SCHEME(spec)
            if scheme:
                # It's a url, download it to tmpdir
                found = self._download_url(scheme.group(1), spec, tmpdir)
                base, fragment = egg_info_for_url(spec)
                if base.endswith('.py'):
                    found = self.gen_setup(found, fragment, tmpdir)
                return found
            elif os.path.exists(spec):
                # Existing file or directory, just return it
                return spec
            else:
                spec = parse_requirement_arg(spec)
        return getattr(self.fetch_distribution(spec, tmpdir), 'location', None)

    def fetch_distribution(  # noqa: C901  # is too complex (14)  # FIXME
            self, requirement, tmpdir, force_scan=False, source=False,
            develop_ok=False, local_index=None):
        """Obtain a distribution suitable for fulfilling `requirement`

        `requirement` must be a ``pkg_resources.Requirement`` instance.
        If necessary, or if the `force_scan` flag is set, the requirement is
        searched for in the (online) package index as well as the locally
        installed packages.  If a distribution matching `requirement` is found,
        the returned distribution's ``location`` is the value you would have
        gotten from calling the ``download()`` method with the matching
        distribution's URL or filename.  If no matching distribution is found,
        ``None`` is returned.

        If the `source` flag is set, only source distributions and source
        checkout links will be considered.  Unless the `develop_ok` flag is
        set, development and system eggs (i.e., those using the ``.egg-info``
        format) will be ignored.
        """
        # process a Requirement
        self.info("Searching for %s", requirement)
        skipped = {}
        dist = None

        def find(req, env=None):
            if env is None:
                env = self
            # Find a matching distribution; may be called more than once

            for dist in env[req.key]:

                if dist.precedence == DEVELOP_DIST and not develop_ok:
                    if dist not in skipped:
                        self.warn(
                            "Skipping development or system egg: %s", dist,
                        )
                        skipped[dist] = 1
                    continue

                test = (
                    dist in req
                    and (dist.precedence <= SOURCE_DIST or not source)
                )
                if test:
                    loc = self.download(dist.location, tmpdir)
                    dist.download_location = loc
                    if os.path.exists(dist.download_location):
                        return dist

        if force_scan:
            self.prescan()
            self.find_packages(requirement)
            dist = find(requirement)

        if not dist and local_index is not None:
            dist = find(requirement, local_index)

        if dist is None:
            if self.to_scan is not None:
                self.prescan()
            dist = find(requirement)

        if dist is None and not force_scan:
            self.find_packages(requirement)
            dist = find(requirement)

        if dist is None:
            self.warn(
                "No local packages or working download links found for %s%s",
                (source and "a source distribution of " or ""),
                requirement,
            )
        else:
            self.info("Best match: %s", dist)
            return dist.clone(location=dist.download_location)

    def fetch(self, requirement, tmpdir, force_scan=False, source=False):
        """Obtain a file suitable for fulfilling `requirement`

        DEPRECATED; use the ``fetch_distribution()`` method now instead.  For
        backward compatibility, this routine is identical but returns the
        ``location`` of the downloaded distribution instead of a distribution
        object.
        """
        dist = self.fetch_distribution(requirement, tmpdir, force_scan, source)
        if dist is not None:
            return dist.location
        return None

    def gen_setup(self, filename, fragment, tmpdir):
        match = EGG_FRAGMENT.match(fragment)
        dists = match and [
            d for d in
            interpret_distro_name(filename, match.group(1), None) if d.version
        ] or []

        if len(dists) == 1:  # unambiguous ``#egg`` fragment
            basename = os.path.basename(filename)

            # Make sure the file has been downloaded to the temp dir.
            if os.path.dirname(filename) != tmpdir:
                dst = os.path.join(tmpdir, basename)
                if not (os.path.exists(dst) and os.path.samefile(filename, dst)):
                    shutil.copy2(filename, dst)
                    filename = dst

            with open(os.path.join(tmpdir, 'setup.py'), 'w') as file:
                file.write(
                    "from setuptools import setup\n"
                    "setup(name=%r, version=%r, py_modules=[%r])\n"
                    % (
                        dists[0].project_name, dists[0].version,
                        os.path.splitext(basename)[0]
                    )
                )
            return filename

        elif match:
            raise DistutilsError(
                "Can't unambiguously interpret project/version identifier %r; "
                "any dashes in the name or version should be escaped using "
                "underscores. %r" % (fragment, dists)
            )
        else:
            raise DistutilsError(
                "Can't process plain .py files without an '#egg=name-version'"
                " suffix to enable automatic setup script generation."
            )

    dl_blocksize = 8192

    def _download_to(self, url, filename):
        self.info("Downloading %s", url)
        # Download the file
        fp = None
        try:
            checker = HashChecker.from_url(url)
            fp = self.open_url(url)
            if isinstance(fp, urllib.error.HTTPError):
                raise DistutilsError(
                    "Can't download %s: %s %s" % (url, fp.code, fp.msg)
                )
            headers = fp.info()
            blocknum = 0
            bs = self.dl_blocksize
            size = -1
            if "content-length" in headers:
                # Some servers return multiple Content-Length headers :(
                sizes = headers.get_all('Content-Length')
                size = max(map(int, sizes))
                self.reporthook(url, filename, blocknum, bs, size)
            with open(filename, 'wb') as tfp:
                while True:
                    block = fp.read(bs)
                    if block:
                        checker.feed(block)
                        tfp.write(block)
                        blocknum += 1
                        self.reporthook(url, filename, blocknum, bs, size)
                    else:
                        break
                self.check_hash(checker, filename, tfp)
            return headers
        finally:
            if fp:
                fp.close()

    def reporthook(self, url, filename, blocknum, blksize, size):
        pass  # no-op

    # FIXME:
    def open_url(self, url, warning=None):  # noqa: C901  # is too complex (12)
        if url.startswith('file:'):
            return local_open(url)
        try:
            return open_with_auth(url, self.opener)
        except (ValueError, http.client.InvalidURL) as v:
            msg = ' '.join([str(arg) for arg in v.args])
            if warning:
                self.warn(warning, msg)
            else:
                raise DistutilsError('%s %s' % (url, msg)) from v
        except urllib.error.HTTPError as v:
            return v
        except urllib.error.URLError as v:
            if warning:
                self.warn(warning, v.reason)
            else:
                raise DistutilsError("Download error for %s: %s"
                                     % (url, v.reason)) from v
        except http.client.BadStatusLine as v:
            if warning:
                self.warn(warning, v.line)
            else:
                raise DistutilsError(
                    '%s returned a bad status line. The server might be '
                    'down, %s' %
                    (url, v.line)
                ) from v
        except (http.client.HTTPException, socket.error) as v:
            if warning:
                self.warn(warning, v)
            else:
                raise DistutilsError("Download error for %s: %s"
                                     % (url, v)) from v

    def _download_url(self, scheme, url, tmpdir):
        # Determine download filename
        #
        name, fragment = egg_info_for_url(url)
        if name:
            while '..' in name:
                name = name.replace('..', '.').replace('\\', '_')
        else:
            name = "__downloaded__"  # default if URL has no path contents

        if name.endswith('.egg.zip'):
            name = name[:-4]  # strip the extra .zip before download

        filename = os.path.join(tmpdir, name)

        # Download the file
        #
        if scheme == 'svn' or scheme.startswith('svn+'):
            return self._download_svn(url, filename)
        elif scheme == 'git' or scheme.startswith('git+'):
            return self._download_git(url, filename)
        elif scheme.startswith('hg+'):
            return self._download_hg(url, filename)
        elif scheme == 'file':
            return urllib.request.url2pathname(urllib.parse.urlparse(url)[2])
        else:
            self.url_ok(url, True)  # raises error if not allowed
            return self._attempt_download(url, filename)

    def scan_url(self, url):
        self.process_url(url, True)

    def _attempt_download(self, url, filename):
        headers = self._download_to(url, filename)
        if 'html' in headers.get('content-type', '').lower():
            return self._download_html(url, headers, filename)
        else:
            return filename

    def _download_html(self, url, headers, filename):
        file = open(filename)
        for line in file:
            if line.strip():
                # Check for a subversion index page
                if re.search(r'([^- ]+ - )?Revision \d+:', line):
                    # it's a subversion index page:
                    file.close()
                    os.unlink(filename)
                    return self._download_svn(url, filename)
                break  # not an index page
        file.close()
        os.unlink(filename)
        raise DistutilsError("Unexpected HTML page found at " + url)

    def _download_svn(self, url, filename):
        warnings.warn("SVN download support is deprecated", UserWarning)
        url = url.split('#', 1)[0]  # remove any fragment for svn's sake
        creds = ''
        if url.lower().startswith('svn:') and '@' in url:
            scheme, netloc, path, p, q, f = urllib.parse.urlparse(url)
            if not netloc and path.startswith('//') and '/' in path[2:]:
                netloc, path = path[2:].split('/', 1)
                auth, host = _splituser(netloc)
                if auth:
                    if ':' in auth:
                        user, pw = auth.split(':', 1)
                        creds = " --username=%s --password=%s" % (user, pw)
                    else:
                        creds = " --username=" + auth
                    netloc = host
                    parts = scheme, netloc, url, p, q, f
                    url = urllib.parse.urlunparse(parts)
        self.info("Doing subversion checkout from %s to %s", url, filename)
        os.system("svn checkout%s -q %s %s" % (creds, url, filename))
        return filename

    @staticmethod
    def _vcs_split_rev_from_url(url, pop_prefix=False):
        scheme, netloc, path, query, frag = urllib.parse.urlsplit(url)

        scheme = scheme.split('+', 1)[-1]

        # Some fragment identification fails
        path = path.split('#', 1)[0]

        rev = None
        if '@' in path:
            path, rev = path.rsplit('@', 1)

        # Also, discard fragment
        url = urllib.parse.urlunsplit((scheme, netloc, path, query, ''))

        return url, rev

    def _download_git(self, url, filename):
        filename = filename.split('#', 1)[0]
        url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True)

        self.info("Doing git clone from %s to %s", url, filename)
        os.system("git clone --quiet %s %s" % (url, filename))

        if rev is not None:
            self.info("Checking out %s", rev)
            os.system("git -C %s checkout --quiet %s" % (
                filename,
                rev,
            ))

        return filename

    def _download_hg(self, url, filename):
        filename = filename.split('#', 1)[0]
        url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True)

        self.info("Doing hg clone from %s to %s", url, filename)
        os.system("hg clone --quiet %s %s" % (url, filename))

        if rev is not None:
            self.info("Updating to %s", rev)
            os.system("hg --cwd %s up -C -r %s -q" % (
                filename,
                rev,
            ))

        return filename

    def debug(self, msg, *args):
        log.debug(msg, *args)

    def info(self, msg, *args):
        log.info(msg, *args)

    def warn(self, msg, *args):
        log.warn(msg, *args)


# This pattern matches a character entity reference (a decimal numeric
# references, a hexadecimal numeric reference, or a named reference).
entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub


def decode_entity(match):
    what = match.group(0)
    return html.unescape(what)


def htmldecode(text):
    """
    Decode HTML entities in the given text.

    >>> htmldecode(
    ...     'https://../package_name-0.1.2.tar.gz'
    ...     '?tokena=A&tokenb=B">package_name-0.1.2.tar.gz')
    'https://../package_name-0.1.2.tar.gz?tokena=A&tokenb=B">package_name-0.1.2.tar.gz'
    """
    return entity_sub(decode_entity, text)


def socket_timeout(timeout=15):
    def _socket_timeout(func):
        def _socket_timeout(*args, **kwargs):
            old_timeout = socket.getdefaulttimeout()
            socket.setdefaulttimeout(timeout)
            try:
                return func(*args, **kwargs)
            finally:
                socket.setdefaulttimeout(old_timeout)

        return _socket_timeout

    return _socket_timeout


def _encode_auth(auth):
    """
    Encode auth from a URL suitable for an HTTP header.
    >>> str(_encode_auth('username%3Apassword'))
    'dXNlcm5hbWU6cGFzc3dvcmQ='

    Long auth strings should not cause a newline to be inserted.
    >>> long_auth = 'username:' + 'password'*10
    >>> chr(10) in str(_encode_auth(long_auth))
    False
    """
    auth_s = urllib.parse.unquote(auth)
    # convert to bytes
    auth_bytes = auth_s.encode()
    encoded_bytes = base64.b64encode(auth_bytes)
    # convert back to a string
    encoded = encoded_bytes.decode()
    # strip the trailing carriage return
    return encoded.replace('\n', '')


class Credential:
    """
    A username/password pair. Use like a namedtuple.
    """

    def __init__(self, username, password):
        self.username = username
        self.password = password

    def __iter__(self):
        yield self.username
        yield self.password

    def __str__(self):
        return '%(username)s:%(password)s' % vars(self)


class PyPIConfig(configparser.RawConfigParser):
    def __init__(self):
        """
        Load from ~/.pypirc
        """
        defaults = dict.fromkeys(['username', 'password', 'repository'], '')
        super().__init__(defaults)

        rc = os.path.join(os.path.expanduser('~'), '.pypirc')
        if os.path.exists(rc):
            self.read(rc)

    @property
    def creds_by_repository(self):
        sections_with_repositories = [
            section for section in self.sections()
            if self.get(section, 'repository').strip()
        ]

        return dict(map(self._get_repo_cred, sections_with_repositories))

    def _get_repo_cred(self, section):
        repo = self.get(section, 'repository').strip()
        return repo, Credential(
            self.get(section, 'username').strip(),
            self.get(section, 'password').strip(),
        )

    def find_credential(self, url):
        """
        If the URL indicated appears to be a repository defined in this
        config, return the credential for that repository.
        """
        for repository, cred in self.creds_by_repository.items():
            if url.startswith(repository):
                return cred


def open_with_auth(url, opener=urllib.request.urlopen):
    """Open a urllib2 request, handling HTTP authentication"""

    parsed = urllib.parse.urlparse(url)
    scheme, netloc, path, params, query, frag = parsed

    # Double scheme does not raise on macOS as revealed by a
    # failing test. We would expect "nonnumeric port". Refs #20.
    if netloc.endswith(':'):
        raise http.client.InvalidURL("nonnumeric port: ''")

    if scheme in ('http', 'https'):
        auth, address = _splituser(netloc)
    else:
        auth = None

    if not auth:
        cred = PyPIConfig().find_credential(url)
        if cred:
            auth = str(cred)
            info = cred.username, url
            log.info('Authenticating as %s for %s (from .pypirc)', *info)

    if auth:
        auth = "Basic " + _encode_auth(auth)
        parts = scheme, address, path, params, query, frag
        new_url = urllib.parse.urlunparse(parts)
        request = urllib.request.Request(new_url)
        request.add_header("Authorization", auth)
    else:
        request = urllib.request.Request(url)

    request.add_header('User-Agent', user_agent)
    fp = opener(request)

    if auth:
        # Put authentication info back into request URL if same host,
        # so that links found on the page will work
        s2, h2, path2, param2, query2, frag2 = urllib.parse.urlparse(fp.url)
        if s2 == scheme and h2 == address:
            parts = s2, netloc, path2, param2, query2, frag2
            fp.url = urllib.parse.urlunparse(parts)

    return fp


# copy of urllib.parse._splituser from Python 3.8
def _splituser(host):
    """splituser('user[:passwd]@host[:port]')
    --> 'user[:passwd]', 'host[:port]'."""
    user, delim, host = host.rpartition('@')
    return (user if delim else None), host


# adding a timeout to avoid freezing package_index
open_with_auth = socket_timeout(_SOCKET_TIMEOUT)(open_with_auth)


def fix_sf_url(url):
    return url  # backward compatibility


def local_open(url):
    """Read a local path, with special support for directories"""
    scheme, server, path, param, query, frag = urllib.parse.urlparse(url)
    filename = urllib.request.url2pathname(path)
    if os.path.isfile(filename):
        return urllib.request.urlopen(url)
    elif path.endswith('/') and os.path.isdir(filename):
        files = []
        for f in os.listdir(filename):
            filepath = os.path.join(filename, f)
            if f == 'index.html':
                with open(filepath, 'r') as fp:
                    body = fp.read()
                break
            elif os.path.isdir(filepath):
                f += '/'
            files.append('<a href="{name}">{name}</a>'.format(name=f))
        else:
            tmpl = (
                "<html><head><title>{url}"
                "{files}")
            body = tmpl.format(url=url, files='\n'.join(files))
        status, message = 200, "OK"
    else:
        status, message, body = 404, "Path not found", "Not found"

    headers = {'content-type': 'text/html'}
    body_stream = io.StringIO(body)
    return urllib.error.HTTPError(url, status, message, headers, body_stream)
PK|5Z+Jε(Lib/site-packages/setuptools/dep_util.pynuW+Afrom distutils.dep_util import newer_group


# yes, this is was almost entirely copy-pasted from
# 'newer_pairwise()', this is just another convenience
# function.
def newer_pairwise_group(sources_groups, targets):
    """Walk both arguments in parallel, testing if each source group is newer
    than its corresponding target. Returns a pair of lists (sources_groups,
    targets) where sources is newer than target, according to the semantics
    of 'newer_group()'.
    """
    if len(sources_groups) != len(targets):
        raise ValueError(
            "'sources_group' and 'targets' must be the same length")

    # build a pair of lists (sources_groups, targets) where source is newer
    n_sources = []
    n_targets = []
    for i in range(len(sources_groups)):
        if newer_group(sources_groups[i], targets[i]):
            n_sources.append(sources_groups[i])
            n_targets.append(targets[i])

    return n_sources, n_targets
PK|5Zu=)Lib/site-packages/setuptools/extension.pynuW+Aimport re
import functools
import distutils.core
import distutils.errors
import distutils.extension

from .monkey import get_unpatched


def _have_cython():
    """
    Return True if Cython can be imported.
    """
    cython_impl = 'Cython.Distutils.build_ext'
    try:
        # from (cython_impl) import build_ext
        __import__(cython_impl, fromlist=['build_ext']).build_ext
        return True
    except Exception:
        pass
    return False


# for compatibility
have_pyrex = _have_cython

_Extension = get_unpatched(distutils.core.Extension)


class Extension(_Extension):
    """
    Describes a single extension module.

    This means that all source files will be compiled into a single binary file
    ``.`` (with ```` derived from ``name`` and
    ```` defined by one of the values in
    ``importlib.machinery.EXTENSION_SUFFIXES``).

    In the case ``.pyx`` files are passed as ``sources and`` ``Cython`` is **not**
    installed in the build environment, ``setuptools`` may also try to look for the
    equivalent ``.cpp`` or ``.c`` files.

    :arg str name:
      the full name of the extension, including any packages -- ie.
      *not* a filename or pathname, but Python dotted name

    :arg list[str] sources:
      list of source filenames, relative to the distribution root
      (where the setup script lives), in Unix form (slash-separated)
      for portability.  Source files may be C, C++, SWIG (.i),
      platform-specific resource files, or whatever else is recognized
      by the "build_ext" command as source for a Python extension.

    :keyword list[str] include_dirs:
      list of directories to search for C/C++ header files (in Unix
      form for portability)

    :keyword list[tuple[str, str|None]] define_macros:
      list of macros to define; each macro is defined using a 2-tuple:
      the first item corresponding to the name of the macro and the second
      item either a string with its value or None to
      define it without a particular value (equivalent of "#define
      FOO" in source or -DFOO on Unix C compiler command line)

    :keyword list[str] undef_macros:
      list of macros to undefine explicitly

    :keyword list[str] library_dirs:
      list of directories to search for C/C++ libraries at link time

    :keyword list[str] libraries:
      list of library names (not filenames or paths) to link against

    :keyword list[str] runtime_library_dirs:
      list of directories to search for C/C++ libraries at run time
      (for shared extensions, this is when the extension is loaded).
      Setting this will cause an exception during build on Windows
      platforms.

    :keyword list[str] extra_objects:
      list of extra files to link with (eg. object files not implied
      by 'sources', static library that must be explicitly specified,
      binary resource files, etc.)

    :keyword list[str] extra_compile_args:
      any extra platform- and compiler-specific information to use
      when compiling the source files in 'sources'.  For platforms and
      compilers where "command line" makes sense, this is typically a
      list of command-line arguments, but for other platforms it could
      be anything.

    :keyword list[str] extra_link_args:
      any extra platform- and compiler-specific information to use
      when linking object files together to create the extension (or
      to create a new static Python interpreter).  Similar
      interpretation as for 'extra_compile_args'.

    :keyword list[str] export_symbols:
      list of symbols to be exported from a shared extension.  Not
      used on all platforms, and not generally necessary for Python
      extensions, which typically export exactly one symbol: "init" +
      extension_name.

    :keyword list[str] swig_opts:
      any extra options to pass to SWIG if a source file has the .i
      extension.

    :keyword list[str] depends:
      list of files that the extension depends on

    :keyword str language:
      extension language (i.e. "c", "c++", "objc"). Will be detected
      from the source extensions if not provided.

    :keyword bool optional:
      specifies that a build failure in the extension should not abort the
      build process, but simply not install the failing extension.

    :keyword bool py_limited_api:
      opt-in flag for the usage of :doc:`Python's limited API `.

    :raises setuptools.errors.PlatformError: if 'runtime_library_dirs' is
      specified on Windows. (since v63)
    """

    def __init__(self, name, sources, *args, **kw):
        # The *args is needed for compatibility as calls may use positional
        # arguments. py_limited_api may be set only via keyword.
        self.py_limited_api = kw.pop("py_limited_api", False)
        super().__init__(name, sources, *args, **kw)

    def _convert_pyx_sources_to_lang(self):
        """
        Replace sources with .pyx extensions to sources with the target
        language extension. This mechanism allows language authors to supply
        pre-converted sources but to prefer the .pyx sources.
        """
        if _have_cython():
            # the build has Cython, so allow it to compile the .pyx files
            return
        lang = self.language or ''
        target_ext = '.cpp' if lang.lower() == 'c++' else '.c'
        sub = functools.partial(re.sub, '.pyx$', target_ext)
        self.sources = list(map(sub, self.sources))


class Library(Extension):
    """Just like a regular Extension, but built as a library instead"""
PK|5Z}a*Lib/site-packages/distutils-precedence.pthnuW+Aimport os; var = 'SETUPTOOLS_USE_DISTUTILS'; enabled = os.environ.get(var, 'local') == 'local'; enabled and __import__('_distutils_hack').add_shim(); 
PK|5ZB;ѩ++FLib/site-packages/_distutils_hack/__pycache__/__init__.cpython-311.pycnuW+A

^;dddlZddlZdejvZdZdZdZdZdZGdd	Z	Gd
dZ
e
jD]Ze
e
dee
je
Zd
ZGddZdZdZdS)N__pypy__cdtjvrdStrtjdkrdSddl}|ddS)N	distutils)raDistutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.)sysmodulesis_pypyversion_infowarningswarn)rs gE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\_distutils_hack/__init__.pywarn_distutils_presentr	s^#+%%3#f,,	OOOMM	?cdtjvrdSddl}|ddtjD}|D]}tj|=dS)Nrrz"Setuptools is replacing distutils.cHg|]}|dks|d| S)rz
distutils.)
startswith).0names  r
z#clear_distutils.."s>;$//,"?"?	
r)rr	rr
)rmodsrs   rclear_distutilsrsx#+%%OOOMM6777KD
KrcNtjdd}|dkS)z?
    Allow selection of distutils by environment variable.
    SETUPTOOLS_USE_DISTUTILSlocal)osenvironget)whichs renabledr +s%
JNN5w??EGrcddl}tt5|ddddn#1swxYwY|d}d|jvsJ|jdt
jvsJdS)Nrrzdistutils.core
_distutilszsetuptools._distutils.log)	importlibrshim
import_module__file__rr	)r#cores  rensure_local_distutilsr(3s

--,,,---------------""#344D4=((($-(((&ck999999sAA
Ac^trttdSdS)z
    Ensure that the local copy of distutils is preferred over stdlib.

    See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401
    for more motivation.
    N)r rr(rrdo_overrider+Ds8yy!        !!rceZdZdZdZdS)
_TrivialRec||_dSN)	_patterns)selfpatternss  r__init__z_TrivialRe.__init__Qs
!rcDtfd|jDS)Nc3 K|]}|vV	dSr/r*)rpatstrings  r	z#_TrivialRe.match..Us';;S3&=;;;;;;r)allr0)r1r7s `rmatchz_TrivialRe.matchTs(;;;;DN;;;;;;rN)__name__
__module____qualname__r3r:r*rrr-r-Ps2"""<<<<z/DistutilsMetaFinder.find_spec..`sDrr*)rformatlocalsgetattr)r1fullnamepathtargetmethod_namemethods      r	find_speczDistutilsMetaFinder.find_specYs]H$7$7$@$@F2+2>>VXX>>{LL99vxxrc |rdSddl}ddl}ddl}	|dn#t
$rYdSwxYwGfdd|jj}|j	d|j
S)Nrzsetuptools._distutilsc eZdZfdZdZdS)?DistutilsMetaFinder.spec_for_distutils..DistutilsLoadercd_S)Nr)r;)r1specmods  r
create_modulezMDistutilsMetaFinder.spec_for_distutils..DistutilsLoader.create_moduleys*
rcdSr/r*)r1modules  rexec_modulezKDistutilsMetaFinder.spec_for_distutils..DistutilsLoader.exec_module}srN)r;r<r=rRrU)rQsrDistutilsLoaderrNxs=









rrVr)origin)
is_cpythonr#
importlib.abcimportlib.utilr%	ExceptionabcLoaderutilspec_from_loaderr&)r1r#rVrQs   @rspec_for_distutilsz&DistutilsMetaFinder.spec_for_distutilscs??	F	))*ABBCC						
FF									im2			~..**3</

	
s;
A	A	c@tjdS)zj
        Suppress supplying distutils for CPython (build and tests).
        Ref #2965 and #3007.
        zpybuilddir.txt)rrGisfiler*rrrXzDistutilsMetaFinder.is_cpythonsw~~.///rc^|rdStd|_dS)zj
        Ensure stdlib distutils when running under pip.
        See pypa/pip#8761 for rationale.
        NcdSr/r*r*rrrBz2DistutilsMetaFinder.spec_for_pip..$r)pip_imported_during_buildrr`r1s rspec_for_pipz DistutilsMetaFinder.spec_for_pips9
))++	F".,rchddl}tfd|dDS)zO
        Detect if pip is being imported in a build script. Ref #2355.
        rNc3HK|]\}}|VdSr/)frame_file_is_setup)rframelineclss   rr8z@DistutilsMetaFinder.pip_imported_during_build..sF

/:udC##E**





r)	tracebackany
walk_stack)rnros` rrfz-DistutilsMetaFinder.pip_imported_during_buildsX
	



>G>R>RSW>X>X




	
rc^|jdddS)zN
        Return True if the indicated frame suggests a setup.py file.
        r&zsetup.py)	f_globalsrendswith)rls rrkz'DistutilsMetaFinder.frame_file_is_setups*"":r22;;JGGGrc2td|_dS)zp
        Ensure stdlib distutils when running select tests under CPython.

        python/cpython#91169
        cdSr/r*r*rrrBz>DistutilsMetaFinder.spec_for_sensitive_tests..rerN)rr`rgs rspec_for_sensitive_testsz,DistutilsMetaFinder.spec_for_sensitive_testss 	".,r)r
)test.test_distutilsztest.test_peg_generatorztest.test_importlibrzr/)r;r<r=rKr`staticmethodrXrhclassmethodrfrkrxrrsensitive_testsr*rrr?r?Xs


B00\0///

[
HH\H///g%%	
	
	
	

"
OOrr?	spec_for_cNttjvptdSdSr/)DISTUTILS_FINDERr	meta_pathinsert_shimr*rradd_shimrs$
%6666rceZdZdZdZdS)r$c"tdSr/)rrgs r	__enter__zshim.__enter__




rc"tdSr/)remove_shim)r1excvaluetbs    r__exit__z
shim.__exit__rrN)r;r<r=rrr*rrr$r$s2rr$cPtjdtdS)Nr)rrinsertrr*rrrrs!M,-----rcr	tjtdS#t$rYdSwxYwr/)rrremover
ValueErrorr*rrrrsF

-.....



s$(
66)rrbuiltin_module_namesr
rrr r(r+r-r?r}rsetattrrxrrr$rrr*rrrs{



				0
0&:::"	!	!	!<<<<<<<<ddddddddN
 /DGD4'&((777...




rPK|5Z+{NNFLib/site-packages/_distutils_hack/__pycache__/override.cpython-311.pycnuW+A

^;d,@eddS)_distutils_hackN)
__import__do_overridegE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\_distutils_hack/override.pyrs(

))+++++rPK|5Z._-Lib/site-packages/_distutils_hack/__init__.pynuW+A# don't import any costly modules
import sys
import os


is_pypy = '__pypy__' in sys.builtin_module_names


def warn_distutils_present():
    if 'distutils' not in sys.modules:
        return
    if is_pypy and sys.version_info < (3, 7):
        # PyPy for 3.6 unconditionally imports distutils, so bypass the warning
        # https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250
        return
    import warnings

    warnings.warn(
        "Distutils was imported before Setuptools, but importing Setuptools "
        "also replaces the `distutils` module in `sys.modules`. This may lead "
        "to undesirable behaviors or errors. To avoid these issues, avoid "
        "using distutils directly, ensure that setuptools is installed in the "
        "traditional way (e.g. not an editable install), and/or make sure "
        "that setuptools is always imported before distutils."
    )


def clear_distutils():
    if 'distutils' not in sys.modules:
        return
    import warnings

    warnings.warn("Setuptools is replacing distutils.")
    mods = [
        name
        for name in sys.modules
        if name == "distutils" or name.startswith("distutils.")
    ]
    for name in mods:
        del sys.modules[name]


def enabled():
    """
    Allow selection of distutils by environment variable.
    """
    which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'local')
    return which == 'local'


def ensure_local_distutils():
    import importlib

    clear_distutils()

    # With the DistutilsMetaFinder in place,
    # perform an import to cause distutils to be
    # loaded from setuptools._distutils. Ref #2906.
    with shim():
        importlib.import_module('distutils')

    # check that submodules load as expected
    core = importlib.import_module('distutils.core')
    assert '_distutils' in core.__file__, core.__file__
    assert 'setuptools._distutils.log' not in sys.modules


def do_override():
    """
    Ensure that the local copy of distutils is preferred over stdlib.

    See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401
    for more motivation.
    """
    if enabled():
        warn_distutils_present()
        ensure_local_distutils()


class _TrivialRe:
    def __init__(self, *patterns):
        self._patterns = patterns

    def match(self, string):
        return all(pat in string for pat in self._patterns)


class DistutilsMetaFinder:
    def find_spec(self, fullname, path, target=None):
        # optimization: only consider top level modules and those
        # found in the CPython test suite.
        if path is not None and not fullname.startswith('test.'):
            return

        method_name = 'spec_for_{fullname}'.format(**locals())
        method = getattr(self, method_name, lambda: None)
        return method()

    def spec_for_distutils(self):
        if self.is_cpython():
            return

        import importlib
        import importlib.abc
        import importlib.util

        try:
            mod = importlib.import_module('setuptools._distutils')
        except Exception:
            # There are a couple of cases where setuptools._distutils
            # may not be present:
            # - An older Setuptools without a local distutils is
            #   taking precedence. Ref #2957.
            # - Path manipulation during sitecustomize removes
            #   setuptools from the path but only after the hook
            #   has been loaded. Ref #2980.
            # In either case, fall back to stdlib behavior.
            return

        class DistutilsLoader(importlib.abc.Loader):
            def create_module(self, spec):
                mod.__name__ = 'distutils'
                return mod

            def exec_module(self, module):
                pass

        return importlib.util.spec_from_loader(
            'distutils', DistutilsLoader(), origin=mod.__file__
        )

    @staticmethod
    def is_cpython():
        """
        Suppress supplying distutils for CPython (build and tests).
        Ref #2965 and #3007.
        """
        return os.path.isfile('pybuilddir.txt')

    def spec_for_pip(self):
        """
        Ensure stdlib distutils when running under pip.
        See pypa/pip#8761 for rationale.
        """
        if self.pip_imported_during_build():
            return
        clear_distutils()
        self.spec_for_distutils = lambda: None

    @classmethod
    def pip_imported_during_build(cls):
        """
        Detect if pip is being imported in a build script. Ref #2355.
        """
        import traceback

        return any(
            cls.frame_file_is_setup(frame) for frame, line in traceback.walk_stack(None)
        )

    @staticmethod
    def frame_file_is_setup(frame):
        """
        Return True if the indicated frame suggests a setup.py file.
        """
        # some frames may not have __file__ (#2940)
        return frame.f_globals.get('__file__', '').endswith('setup.py')

    def spec_for_sensitive_tests(self):
        """
        Ensure stdlib distutils when running select tests under CPython.

        python/cpython#91169
        """
        clear_distutils()
        self.spec_for_distutils = lambda: None

    sensitive_tests = (
        [
            'test.test_distutils',
            'test.test_peg_generator',
            'test.test_importlib',
        ]
        if sys.version_info < (3, 10)
        else [
            'test.test_distutils',
        ]
    )


for name in DistutilsMetaFinder.sensitive_tests:
    setattr(
        DistutilsMetaFinder,
        f'spec_for_{name}',
        DistutilsMetaFinder.spec_for_sensitive_tests,
    )


DISTUTILS_FINDER = DistutilsMetaFinder()


def add_shim():
    DISTUTILS_FINDER in sys.meta_path or insert_shim()


class shim:
    def __enter__(self):
        insert_shim()

    def __exit__(self, exc, value, tb):
        remove_shim()


def insert_shim():
    sys.meta_path.insert(0, DISTUTILS_FINDER)


def remove_shim():
    try:
        sys.meta_path.remove(DISTUTILS_FINDER)
    except ValueError:
        pass
PK|5Z ,,-Lib/site-packages/_distutils_hack/override.pynuW+A__import__('_distutils_hack').do_override()
PK|5Zt1?Lib/site-packages/pkg_resources/_vendor/packaging/_musllinux.pynuW+A"""PEP 656 support.

This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
"""

import contextlib
import functools
import operator
import os
import re
import struct
import subprocess
import sys
from typing import IO, Iterator, NamedTuple, Optional, Tuple


def _read_unpacked(f: IO[bytes], fmt: str) -> Tuple[int, ...]:
    return struct.unpack(fmt, f.read(struct.calcsize(fmt)))


def _parse_ld_musl_from_elf(f: IO[bytes]) -> Optional[str]:
    """Detect musl libc location by parsing the Python executable.

    Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
    ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
    """
    f.seek(0)
    try:
        ident = _read_unpacked(f, "16B")
    except struct.error:
        return None
    if ident[:4] != tuple(b"\x7fELF"):  # Invalid magic, not ELF.
        return None
    f.seek(struct.calcsize("HHI"), 1)  # Skip file type, machine, and version.

    try:
        # e_fmt: Format for program header.
        # p_fmt: Format for section header.
        # p_idx: Indexes to find p_type, p_offset, and p_filesz.
        e_fmt, p_fmt, p_idx = {
            1: ("IIIIHHH", "IIIIIIII", (0, 1, 4)),  # 32-bit.
            2: ("QQQIHHH", "IIQQQQQQ", (0, 2, 5)),  # 64-bit.
        }[ident[4]]
    except KeyError:
        return None
    else:
        p_get = operator.itemgetter(*p_idx)

    # Find the interpreter section and return its content.
    try:
        _, e_phoff, _, _, _, e_phentsize, e_phnum = _read_unpacked(f, e_fmt)
    except struct.error:
        return None
    for i in range(e_phnum + 1):
        f.seek(e_phoff + e_phentsize * i)
        try:
            p_type, p_offset, p_filesz = p_get(_read_unpacked(f, p_fmt))
        except struct.error:
            return None
        if p_type != 3:  # Not PT_INTERP.
            continue
        f.seek(p_offset)
        interpreter = os.fsdecode(f.read(p_filesz)).strip("\0")
        if "musl" not in interpreter:
            return None
        return interpreter
    return None


class _MuslVersion(NamedTuple):
    major: int
    minor: int


def _parse_musl_version(output: str) -> Optional[_MuslVersion]:
    lines = [n for n in (n.strip() for n in output.splitlines()) if n]
    if len(lines) < 2 or lines[0][:4] != "musl":
        return None
    m = re.match(r"Version (\d+)\.(\d+)", lines[1])
    if not m:
        return None
    return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2)))


@functools.lru_cache()
def _get_musl_version(executable: str) -> Optional[_MuslVersion]:
    """Detect currently-running musl runtime version.

    This is done by checking the specified executable's dynamic linking
    information, and invoking the loader to parse its output for a version
    string. If the loader is musl, the output would be something like::

        musl libc (x86_64)
        Version 1.2.2
        Dynamic Program Loader
    """
    with contextlib.ExitStack() as stack:
        try:
            f = stack.enter_context(open(executable, "rb"))
        except OSError:
            return None
        ld = _parse_ld_musl_from_elf(f)
    if not ld:
        return None
    proc = subprocess.run([ld], stderr=subprocess.PIPE, universal_newlines=True)
    return _parse_musl_version(proc.stderr)


def platform_tags(arch: str) -> Iterator[str]:
    """Generate musllinux tags compatible to the current platform.

    :param arch: Should be the part of platform tag after the ``linux_``
        prefix, e.g. ``x86_64``. The ``linux_`` prefix is assumed as a
        prerequisite for the current platform to be musllinux-compatible.

    :returns: An iterator of compatible musllinux tags.
    """
    sys_musl = _get_musl_version(sys.executable)
    if sys_musl is None:  # Python not dynamically linked against musl.
        return
    for minor in range(sys_musl.minor, -1, -1):
        yield f"musllinux_{sys_musl.major}_{minor}_{arch}"


if __name__ == "__main__":  # pragma: no cover
    import sysconfig

    plat = sysconfig.get_platform()
    assert plat.startswith("linux-"), "not linux"

    print("plat:", plat)
    print("musl:", _get_musl_version(sys.executable))
    print("tags:", end=" ")
    for t in platform_tags(re.sub(r"[.-]", "_", plat.split("-", 1)[-1])):
        print(t, end="\n      ")
PK|5Z*:c,,?Lib/site-packages/pkg_resources/_vendor/packaging/_manylinux.pynuW+Aimport collections
import functools
import os
import re
import struct
import sys
import warnings
from typing import IO, Dict, Iterator, NamedTuple, Optional, Tuple


# Python does not provide platform information at sufficient granularity to
# identify the architecture of the running executable in some cases, so we
# determine it dynamically by reading the information from the running
# process. This only applies on Linux, which uses the ELF format.
class _ELFFileHeader:
    # https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
    class _InvalidELFFileHeader(ValueError):
        """
        An invalid ELF file header was found.
        """

    ELF_MAGIC_NUMBER = 0x7F454C46
    ELFCLASS32 = 1
    ELFCLASS64 = 2
    ELFDATA2LSB = 1
    ELFDATA2MSB = 2
    EM_386 = 3
    EM_S390 = 22
    EM_ARM = 40
    EM_X86_64 = 62
    EF_ARM_ABIMASK = 0xFF000000
    EF_ARM_ABI_VER5 = 0x05000000
    EF_ARM_ABI_FLOAT_HARD = 0x00000400

    def __init__(self, file: IO[bytes]) -> None:
        def unpack(fmt: str) -> int:
            try:
                data = file.read(struct.calcsize(fmt))
                result: Tuple[int, ...] = struct.unpack(fmt, data)
            except struct.error:
                raise _ELFFileHeader._InvalidELFFileHeader()
            return result[0]

        self.e_ident_magic = unpack(">I")
        if self.e_ident_magic != self.ELF_MAGIC_NUMBER:
            raise _ELFFileHeader._InvalidELFFileHeader()
        self.e_ident_class = unpack("B")
        if self.e_ident_class not in {self.ELFCLASS32, self.ELFCLASS64}:
            raise _ELFFileHeader._InvalidELFFileHeader()
        self.e_ident_data = unpack("B")
        if self.e_ident_data not in {self.ELFDATA2LSB, self.ELFDATA2MSB}:
            raise _ELFFileHeader._InvalidELFFileHeader()
        self.e_ident_version = unpack("B")
        self.e_ident_osabi = unpack("B")
        self.e_ident_abiversion = unpack("B")
        self.e_ident_pad = file.read(7)
        format_h = "H"
        format_i = "I"
        format_q = "Q"
        format_p = format_i if self.e_ident_class == self.ELFCLASS32 else format_q
        self.e_type = unpack(format_h)
        self.e_machine = unpack(format_h)
        self.e_version = unpack(format_i)
        self.e_entry = unpack(format_p)
        self.e_phoff = unpack(format_p)
        self.e_shoff = unpack(format_p)
        self.e_flags = unpack(format_i)
        self.e_ehsize = unpack(format_h)
        self.e_phentsize = unpack(format_h)
        self.e_phnum = unpack(format_h)
        self.e_shentsize = unpack(format_h)
        self.e_shnum = unpack(format_h)
        self.e_shstrndx = unpack(format_h)


def _get_elf_header() -> Optional[_ELFFileHeader]:
    try:
        with open(sys.executable, "rb") as f:
            elf_header = _ELFFileHeader(f)
    except (OSError, TypeError, _ELFFileHeader._InvalidELFFileHeader):
        return None
    return elf_header


def _is_linux_armhf() -> bool:
    # hard-float ABI can be detected from the ELF header of the running
    # process
    # https://static.docs.arm.com/ihi0044/g/aaelf32.pdf
    elf_header = _get_elf_header()
    if elf_header is None:
        return False
    result = elf_header.e_ident_class == elf_header.ELFCLASS32
    result &= elf_header.e_ident_data == elf_header.ELFDATA2LSB
    result &= elf_header.e_machine == elf_header.EM_ARM
    result &= (
        elf_header.e_flags & elf_header.EF_ARM_ABIMASK
    ) == elf_header.EF_ARM_ABI_VER5
    result &= (
        elf_header.e_flags & elf_header.EF_ARM_ABI_FLOAT_HARD
    ) == elf_header.EF_ARM_ABI_FLOAT_HARD
    return result


def _is_linux_i686() -> bool:
    elf_header = _get_elf_header()
    if elf_header is None:
        return False
    result = elf_header.e_ident_class == elf_header.ELFCLASS32
    result &= elf_header.e_ident_data == elf_header.ELFDATA2LSB
    result &= elf_header.e_machine == elf_header.EM_386
    return result


def _have_compatible_abi(arch: str) -> bool:
    if arch == "armv7l":
        return _is_linux_armhf()
    if arch == "i686":
        return _is_linux_i686()
    return arch in {"x86_64", "aarch64", "ppc64", "ppc64le", "s390x"}


# If glibc ever changes its major version, we need to know what the last
# minor version was, so we can build the complete list of all versions.
# For now, guess what the highest minor version might be, assume it will
# be 50 for testing. Once this actually happens, update the dictionary
# with the actual value.
_LAST_GLIBC_MINOR: Dict[int, int] = collections.defaultdict(lambda: 50)


class _GLibCVersion(NamedTuple):
    major: int
    minor: int


def _glibc_version_string_confstr() -> Optional[str]:
    """
    Primary implementation of glibc_version_string using os.confstr.
    """
    # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely
    # to be broken or missing. This strategy is used in the standard library
    # platform module.
    # https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183
    try:
        # os.confstr("CS_GNU_LIBC_VERSION") returns a string like "glibc 2.17".
        version_string = os.confstr("CS_GNU_LIBC_VERSION")
        assert version_string is not None
        _, version = version_string.split()
    except (AssertionError, AttributeError, OSError, ValueError):
        # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)...
        return None
    return version


def _glibc_version_string_ctypes() -> Optional[str]:
    """
    Fallback implementation of glibc_version_string using ctypes.
    """
    try:
        import ctypes
    except ImportError:
        return None

    # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen
    # manpage says, "If filename is NULL, then the returned handle is for the
    # main program". This way we can let the linker do the work to figure out
    # which libc our process is actually using.
    #
    # We must also handle the special case where the executable is not a
    # dynamically linked executable. This can occur when using musl libc,
    # for example. In this situation, dlopen() will error, leading to an
    # OSError. Interestingly, at least in the case of musl, there is no
    # errno set on the OSError. The single string argument used to construct
    # OSError comes from libc itself and is therefore not portable to
    # hard code here. In any case, failure to call dlopen() means we
    # can proceed, so we bail on our attempt.
    try:
        process_namespace = ctypes.CDLL(None)
    except OSError:
        return None

    try:
        gnu_get_libc_version = process_namespace.gnu_get_libc_version
    except AttributeError:
        # Symbol doesn't exist -> therefore, we are not linked to
        # glibc.
        return None

    # Call gnu_get_libc_version, which returns a string like "2.5"
    gnu_get_libc_version.restype = ctypes.c_char_p
    version_str: str = gnu_get_libc_version()
    # py2 / py3 compatibility:
    if not isinstance(version_str, str):
        version_str = version_str.decode("ascii")

    return version_str


def _glibc_version_string() -> Optional[str]:
    """Returns glibc version string, or None if not using glibc."""
    return _glibc_version_string_confstr() or _glibc_version_string_ctypes()


def _parse_glibc_version(version_str: str) -> Tuple[int, int]:
    """Parse glibc version.

    We use a regexp instead of str.split because we want to discard any
    random junk that might come after the minor version -- this might happen
    in patched/forked versions of glibc (e.g. Linaro's version of glibc
    uses version strings like "2.20-2014.11"). See gh-3588.
    """
    m = re.match(r"(?P[0-9]+)\.(?P[0-9]+)", version_str)
    if not m:
        warnings.warn(
            "Expected glibc version with 2 components major.minor,"
            " got: %s" % version_str,
            RuntimeWarning,
        )
        return -1, -1
    return int(m.group("major")), int(m.group("minor"))


@functools.lru_cache()
def _get_glibc_version() -> Tuple[int, int]:
    version_str = _glibc_version_string()
    if version_str is None:
        return (-1, -1)
    return _parse_glibc_version(version_str)


# From PEP 513, PEP 600
def _is_compatible(name: str, arch: str, version: _GLibCVersion) -> bool:
    sys_glibc = _get_glibc_version()
    if sys_glibc < version:
        return False
    # Check for presence of _manylinux module.
    try:
        import _manylinux  # noqa
    except ImportError:
        return True
    if hasattr(_manylinux, "manylinux_compatible"):
        result = _manylinux.manylinux_compatible(version[0], version[1], arch)
        if result is not None:
            return bool(result)
        return True
    if version == _GLibCVersion(2, 5):
        if hasattr(_manylinux, "manylinux1_compatible"):
            return bool(_manylinux.manylinux1_compatible)
    if version == _GLibCVersion(2, 12):
        if hasattr(_manylinux, "manylinux2010_compatible"):
            return bool(_manylinux.manylinux2010_compatible)
    if version == _GLibCVersion(2, 17):
        if hasattr(_manylinux, "manylinux2014_compatible"):
            return bool(_manylinux.manylinux2014_compatible)
    return True


_LEGACY_MANYLINUX_MAP = {
    # CentOS 7 w/ glibc 2.17 (PEP 599)
    (2, 17): "manylinux2014",
    # CentOS 6 w/ glibc 2.12 (PEP 571)
    (2, 12): "manylinux2010",
    # CentOS 5 w/ glibc 2.5 (PEP 513)
    (2, 5): "manylinux1",
}


def platform_tags(linux: str, arch: str) -> Iterator[str]:
    if not _have_compatible_abi(arch):
        return
    # Oldest glibc to be supported regardless of architecture is (2, 17).
    too_old_glibc2 = _GLibCVersion(2, 16)
    if arch in {"x86_64", "i686"}:
        # On x86/i686 also oldest glibc to be supported is (2, 5).
        too_old_glibc2 = _GLibCVersion(2, 4)
    current_glibc = _GLibCVersion(*_get_glibc_version())
    glibc_max_list = [current_glibc]
    # We can assume compatibility across glibc major versions.
    # https://sourceware.org/bugzilla/show_bug.cgi?id=24636
    #
    # Build a list of maximum glibc versions so that we can
    # output the canonical list of all glibc from current_glibc
    # down to too_old_glibc2, including all intermediary versions.
    for glibc_major in range(current_glibc.major - 1, 1, -1):
        glibc_minor = _LAST_GLIBC_MINOR[glibc_major]
        glibc_max_list.append(_GLibCVersion(glibc_major, glibc_minor))
    for glibc_max in glibc_max_list:
        if glibc_max.major == too_old_glibc2.major:
            min_minor = too_old_glibc2.minor
        else:
            # For other glibc major versions oldest supported is (x, 0).
            min_minor = -1
        for glibc_minor in range(glibc_max.minor, min_minor, -1):
            glibc_version = _GLibCVersion(glibc_max.major, glibc_minor)
            tag = "manylinux_{}_{}".format(*glibc_version)
            if _is_compatible(tag, arch, glibc_version):
                yield linux.replace("linux", tag)
            # Handle the legacy manylinux1, manylinux2010, manylinux2014 tags.
            if glibc_version in _LEGACY_MANYLINUX_MAP:
                legacy_tag = _LEGACY_MANYLINUX_MAP[glibc_version]
                if _is_compatible(legacy_tag, arch, glibc_version):
                    yield linux.replace("linux", legacy_tag)
PK|5Z2I9I9<Lib/site-packages/pkg_resources/_vendor/packaging/version.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import collections
import itertools
import re
import warnings
from typing import Callable, Iterator, List, Optional, SupportsInt, Tuple, Union

from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType

__all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"]

InfiniteTypes = Union[InfinityType, NegativeInfinityType]
PrePostDevType = Union[InfiniteTypes, Tuple[str, int]]
SubLocalType = Union[InfiniteTypes, int, str]
LocalType = Union[
    NegativeInfinityType,
    Tuple[
        Union[
            SubLocalType,
            Tuple[SubLocalType, str],
            Tuple[NegativeInfinityType, SubLocalType],
        ],
        ...,
    ],
]
CmpKey = Tuple[
    int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType
]
LegacyCmpKey = Tuple[int, Tuple[str, ...]]
VersionComparisonMethod = Callable[
    [Union[CmpKey, LegacyCmpKey], Union[CmpKey, LegacyCmpKey]], bool
]

_Version = collections.namedtuple(
    "_Version", ["epoch", "release", "dev", "pre", "post", "local"]
)


def parse(version: str) -> Union["LegacyVersion", "Version"]:
    """
    Parse the given version string and return either a :class:`Version` object
    or a :class:`LegacyVersion` object depending on if the given version is
    a valid PEP 440 version or a legacy version.
    """
    try:
        return Version(version)
    except InvalidVersion:
        return LegacyVersion(version)


class InvalidVersion(ValueError):
    """
    An invalid version was found, users should refer to PEP 440.
    """


class _BaseVersion:
    _key: Union[CmpKey, LegacyCmpKey]

    def __hash__(self) -> int:
        return hash(self._key)

    # Please keep the duplicated `isinstance` check
    # in the six comparisons hereunder
    # unless you find a way to avoid adding overhead function calls.
    def __lt__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key < other._key

    def __le__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key <= other._key

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key == other._key

    def __ge__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key >= other._key

    def __gt__(self, other: "_BaseVersion") -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key > other._key

    def __ne__(self, other: object) -> bool:
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return self._key != other._key


class LegacyVersion(_BaseVersion):
    def __init__(self, version: str) -> None:
        self._version = str(version)
        self._key = _legacy_cmpkey(self._version)

        warnings.warn(
            "Creating a LegacyVersion has been deprecated and will be "
            "removed in the next major release",
            DeprecationWarning,
        )

    def __str__(self) -> str:
        return self._version

    def __repr__(self) -> str:
        return f""

    @property
    def public(self) -> str:
        return self._version

    @property
    def base_version(self) -> str:
        return self._version

    @property
    def epoch(self) -> int:
        return -1

    @property
    def release(self) -> None:
        return None

    @property
    def pre(self) -> None:
        return None

    @property
    def post(self) -> None:
        return None

    @property
    def dev(self) -> None:
        return None

    @property
    def local(self) -> None:
        return None

    @property
    def is_prerelease(self) -> bool:
        return False

    @property
    def is_postrelease(self) -> bool:
        return False

    @property
    def is_devrelease(self) -> bool:
        return False


_legacy_version_component_re = re.compile(r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE)

_legacy_version_replacement_map = {
    "pre": "c",
    "preview": "c",
    "-": "final-",
    "rc": "c",
    "dev": "@",
}


def _parse_version_parts(s: str) -> Iterator[str]:
    for part in _legacy_version_component_re.split(s):
        part = _legacy_version_replacement_map.get(part, part)

        if not part or part == ".":
            continue

        if part[:1] in "0123456789":
            # pad for numeric comparison
            yield part.zfill(8)
        else:
            yield "*" + part

    # ensure that alpha/beta/candidate are before final
    yield "*final"


def _legacy_cmpkey(version: str) -> LegacyCmpKey:

    # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch
    # greater than or equal to 0. This will effectively put the LegacyVersion,
    # which uses the defacto standard originally implemented by setuptools,
    # as before all PEP 440 versions.
    epoch = -1

    # This scheme is taken from pkg_resources.parse_version setuptools prior to
    # it's adoption of the packaging library.
    parts: List[str] = []
    for part in _parse_version_parts(version.lower()):
        if part.startswith("*"):
            # remove "-" before a prerelease tag
            if part < "*final":
                while parts and parts[-1] == "*final-":
                    parts.pop()

            # remove trailing zeros from each series of numeric parts
            while parts and parts[-1] == "00000000":
                parts.pop()

        parts.append(part)

    return epoch, tuple(parts)


# Deliberately not anchored to the start and end of the string, to make it
# easier for 3rd party code to reuse
VERSION_PATTERN = r"""
    v?
    (?:
        (?:(?P[0-9]+)!)?                           # epoch
        (?P[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P
                                          # pre-release
            [-_\.]?
            (?P(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P[0-9]+)?
        )?
        (?P                                         # post release
            (?:-(?P[0-9]+))
            |
            (?:
                [-_\.]?
                (?Ppost|rev|r)
                [-_\.]?
                (?P[0-9]+)?
            )
        )?
        (?P                                          # dev release
            [-_\.]?
            (?Pdev)
            [-_\.]?
            (?P[0-9]+)?
        )?
    )
    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
"""


class Version(_BaseVersion):

    _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)

    def __init__(self, version: str) -> None:

        # Validate the version and parse it into pieces
        match = self._regex.search(version)
        if not match:
            raise InvalidVersion(f"Invalid version: '{version}'")

        # Store the parsed out pieces of the version
        self._version = _Version(
            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
            release=tuple(int(i) for i in match.group("release").split(".")),
            pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")),
            post=_parse_letter_version(
                match.group("post_l"), match.group("post_n1") or match.group("post_n2")
            ),
            dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")),
            local=_parse_local_version(match.group("local")),
        )

        # Generate a key which will be used for sorting
        self._key = _cmpkey(
            self._version.epoch,
            self._version.release,
            self._version.pre,
            self._version.post,
            self._version.dev,
            self._version.local,
        )

    def __repr__(self) -> str:
        return f""

    def __str__(self) -> str:
        parts = []

        # Epoch
        if self.epoch != 0:
            parts.append(f"{self.epoch}!")

        # Release segment
        parts.append(".".join(str(x) for x in self.release))

        # Pre-release
        if self.pre is not None:
            parts.append("".join(str(x) for x in self.pre))

        # Post-release
        if self.post is not None:
            parts.append(f".post{self.post}")

        # Development release
        if self.dev is not None:
            parts.append(f".dev{self.dev}")

        # Local version segment
        if self.local is not None:
            parts.append(f"+{self.local}")

        return "".join(parts)

    @property
    def epoch(self) -> int:
        _epoch: int = self._version.epoch
        return _epoch

    @property
    def release(self) -> Tuple[int, ...]:
        _release: Tuple[int, ...] = self._version.release
        return _release

    @property
    def pre(self) -> Optional[Tuple[str, int]]:
        _pre: Optional[Tuple[str, int]] = self._version.pre
        return _pre

    @property
    def post(self) -> Optional[int]:
        return self._version.post[1] if self._version.post else None

    @property
    def dev(self) -> Optional[int]:
        return self._version.dev[1] if self._version.dev else None

    @property
    def local(self) -> Optional[str]:
        if self._version.local:
            return ".".join(str(x) for x in self._version.local)
        else:
            return None

    @property
    def public(self) -> str:
        return str(self).split("+", 1)[0]

    @property
    def base_version(self) -> str:
        parts = []

        # Epoch
        if self.epoch != 0:
            parts.append(f"{self.epoch}!")

        # Release segment
        parts.append(".".join(str(x) for x in self.release))

        return "".join(parts)

    @property
    def is_prerelease(self) -> bool:
        return self.dev is not None or self.pre is not None

    @property
    def is_postrelease(self) -> bool:
        return self.post is not None

    @property
    def is_devrelease(self) -> bool:
        return self.dev is not None

    @property
    def major(self) -> int:
        return self.release[0] if len(self.release) >= 1 else 0

    @property
    def minor(self) -> int:
        return self.release[1] if len(self.release) >= 2 else 0

    @property
    def micro(self) -> int:
        return self.release[2] if len(self.release) >= 3 else 0


def _parse_letter_version(
    letter: str, number: Union[str, bytes, SupportsInt]
) -> Optional[Tuple[str, int]]:

    if letter:
        # We consider there to be an implicit 0 in a pre-release if there is
        # not a numeral associated with it.
        if number is None:
            number = 0

        # We normalize any letters to their lower case form
        letter = letter.lower()

        # We consider some words to be alternate spellings of other words and
        # in those cases we want to normalize the spellings to our preferred
        # spelling.
        if letter == "alpha":
            letter = "a"
        elif letter == "beta":
            letter = "b"
        elif letter in ["c", "pre", "preview"]:
            letter = "rc"
        elif letter in ["rev", "r"]:
            letter = "post"

        return letter, int(number)
    if not letter and number:
        # We assume if we are given a number, but we are not given a letter
        # then this is using the implicit post release syntax (e.g. 1.0-1)
        letter = "post"

        return letter, int(number)

    return None


_local_version_separators = re.compile(r"[\._-]")


def _parse_local_version(local: str) -> Optional[LocalType]:
    """
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    """
    if local is not None:
        return tuple(
            part.lower() if not part.isdigit() else int(part)
            for part in _local_version_separators.split(local)
        )
    return None


def _cmpkey(
    epoch: int,
    release: Tuple[int, ...],
    pre: Optional[Tuple[str, int]],
    post: Optional[Tuple[str, int]],
    dev: Optional[Tuple[str, int]],
    local: Optional[Tuple[SubLocalType]],
) -> CmpKey:

    # When we compare a release version, we want to compare it with all of the
    # trailing zeros removed. So we'll use a reverse the list, drop all the now
    # leading zeros until we come to something non zero, then take the rest
    # re-reverse it back into the correct order and make it a tuple and use
    # that for our sorting key.
    _release = tuple(
        reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release))))
    )

    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
    # We'll do this by abusing the pre segment, but we _only_ want to do this
    # if there is not a pre or a post segment. If we have one of those then
    # the normal sorting rules will handle this case correctly.
    if pre is None and post is None and dev is not None:
        _pre: PrePostDevType = NegativeInfinity
    # Versions without a pre-release (except as noted above) should sort after
    # those with one.
    elif pre is None:
        _pre = Infinity
    else:
        _pre = pre

    # Versions without a post segment should sort before those with one.
    if post is None:
        _post: PrePostDevType = NegativeInfinity

    else:
        _post = post

    # Versions without a development segment should sort after those with one.
    if dev is None:
        _dev: PrePostDevType = Infinity

    else:
        _dev = dev

    if local is None:
        # Versions without a local segment should sort before those with one.
        _local: LocalType = NegativeInfinity
    else:
        # Versions with a local segment need that segment parsed to implement
        # the sorting rules in PEP440.
        # - Alpha numeric segments sort before numeric segments
        # - Alpha numeric segments sort lexicographically
        # - Numeric segments sort numerically
        # - Shorter versions sort before longer versions when the prefixes
        #   match exactly
        _local = tuple(
            (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
        )

    return epoch, _release, _pre, _post, _dev, _local
PK|5Z5uu?Lib/site-packages/pkg_resources/_vendor/packaging/specifiers.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import abc
import functools
import itertools
import re
import warnings
from typing import (
    Callable,
    Dict,
    Iterable,
    Iterator,
    List,
    Optional,
    Pattern,
    Set,
    Tuple,
    TypeVar,
    Union,
)

from .utils import canonicalize_version
from .version import LegacyVersion, Version, parse

ParsedVersion = Union[Version, LegacyVersion]
UnparsedVersion = Union[Version, LegacyVersion, str]
VersionTypeVar = TypeVar("VersionTypeVar", bound=UnparsedVersion)
CallableOperator = Callable[[ParsedVersion, str], bool]


class InvalidSpecifier(ValueError):
    """
    An invalid specifier was found, users should refer to PEP 440.
    """


class BaseSpecifier(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def __str__(self) -> str:
        """
        Returns the str representation of this Specifier like object. This
        should be representative of the Specifier itself.
        """

    @abc.abstractmethod
    def __hash__(self) -> int:
        """
        Returns a hash value for this Specifier like object.
        """

    @abc.abstractmethod
    def __eq__(self, other: object) -> bool:
        """
        Returns a boolean representing whether or not the two Specifier like
        objects are equal.
        """

    @abc.abstractproperty
    def prereleases(self) -> Optional[bool]:
        """
        Returns whether or not pre-releases as a whole are allowed by this
        specifier.
        """

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        """
        Sets whether or not pre-releases as a whole are allowed by this
        specifier.
        """

    @abc.abstractmethod
    def contains(self, item: str, prereleases: Optional[bool] = None) -> bool:
        """
        Determines if the given item is contained within this specifier.
        """

    @abc.abstractmethod
    def filter(
        self, iterable: Iterable[VersionTypeVar], prereleases: Optional[bool] = None
    ) -> Iterable[VersionTypeVar]:
        """
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        """


class _IndividualSpecifier(BaseSpecifier):

    _operators: Dict[str, str] = {}
    _regex: Pattern[str]

    def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
        match = self._regex.search(spec)
        if not match:
            raise InvalidSpecifier(f"Invalid specifier: '{spec}'")

        self._spec: Tuple[str, str] = (
            match.group("operator").strip(),
            match.group("version").strip(),
        )

        # Store whether or not this Specifier should accept prereleases
        self._prereleases = prereleases

    def __repr__(self) -> str:
        pre = (
            f", prereleases={self.prereleases!r}"
            if self._prereleases is not None
            else ""
        )

        return f"<{self.__class__.__name__}({str(self)!r}{pre})>"

    def __str__(self) -> str:
        return "{}{}".format(*self._spec)

    @property
    def _canonical_spec(self) -> Tuple[str, str]:
        return self._spec[0], canonicalize_version(self._spec[1])

    def __hash__(self) -> int:
        return hash(self._canonical_spec)

    def __eq__(self, other: object) -> bool:
        if isinstance(other, str):
            try:
                other = self.__class__(str(other))
            except InvalidSpecifier:
                return NotImplemented
        elif not isinstance(other, self.__class__):
            return NotImplemented

        return self._canonical_spec == other._canonical_spec

    def _get_operator(self, op: str) -> CallableOperator:
        operator_callable: CallableOperator = getattr(
            self, f"_compare_{self._operators[op]}"
        )
        return operator_callable

    def _coerce_version(self, version: UnparsedVersion) -> ParsedVersion:
        if not isinstance(version, (LegacyVersion, Version)):
            version = parse(version)
        return version

    @property
    def operator(self) -> str:
        return self._spec[0]

    @property
    def version(self) -> str:
        return self._spec[1]

    @property
    def prereleases(self) -> Optional[bool]:
        return self._prereleases

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value

    def __contains__(self, item: str) -> bool:
        return self.contains(item)

    def contains(
        self, item: UnparsedVersion, prereleases: Optional[bool] = None
    ) -> bool:

        # Determine if prereleases are to be allowed or not.
        if prereleases is None:
            prereleases = self.prereleases

        # Normalize item to a Version or LegacyVersion, this allows us to have
        # a shortcut for ``"2.0" in Specifier(">=2")
        normalized_item = self._coerce_version(item)

        # Determine if we should be supporting prereleases in this specifier
        # or not, if we do not support prereleases than we can short circuit
        # logic if this version is a prereleases.
        if normalized_item.is_prerelease and not prereleases:
            return False

        # Actually do the comparison to determine if this item is contained
        # within this Specifier or not.
        operator_callable: CallableOperator = self._get_operator(self.operator)
        return operator_callable(normalized_item, self.version)

    def filter(
        self, iterable: Iterable[VersionTypeVar], prereleases: Optional[bool] = None
    ) -> Iterable[VersionTypeVar]:

        yielded = False
        found_prereleases = []

        kw = {"prereleases": prereleases if prereleases is not None else True}

        # Attempt to iterate over all the values in the iterable and if any of
        # them match, yield them.
        for version in iterable:
            parsed_version = self._coerce_version(version)

            if self.contains(parsed_version, **kw):
                # If our version is a prerelease, and we were not set to allow
                # prereleases, then we'll store it for later in case nothing
                # else matches this specifier.
                if parsed_version.is_prerelease and not (
                    prereleases or self.prereleases
                ):
                    found_prereleases.append(version)
                # Either this is not a prerelease, or we should have been
                # accepting prereleases from the beginning.
                else:
                    yielded = True
                    yield version

        # Now that we've iterated over everything, determine if we've yielded
        # any values, and if we have not and we have any prereleases stored up
        # then we will go ahead and yield the prereleases.
        if not yielded and found_prereleases:
            for version in found_prereleases:
                yield version


class LegacySpecifier(_IndividualSpecifier):

    _regex_str = r"""
        (?P(==|!=|<=|>=|<|>))
        \s*
        (?P
            [^,;\s)]* # Since this is a "legacy" specifier, and the version
                      # string can be just about anything, we match everything
                      # except for whitespace, a semi-colon for marker support,
                      # a closing paren since versions can be enclosed in
                      # them, and a comma since it's a version separator.
        )
        """

    _regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE)

    _operators = {
        "==": "equal",
        "!=": "not_equal",
        "<=": "less_than_equal",
        ">=": "greater_than_equal",
        "<": "less_than",
        ">": "greater_than",
    }

    def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
        super().__init__(spec, prereleases)

        warnings.warn(
            "Creating a LegacyVersion has been deprecated and will be "
            "removed in the next major release",
            DeprecationWarning,
        )

    def _coerce_version(self, version: UnparsedVersion) -> LegacyVersion:
        if not isinstance(version, LegacyVersion):
            version = LegacyVersion(str(version))
        return version

    def _compare_equal(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective == self._coerce_version(spec)

    def _compare_not_equal(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective != self._coerce_version(spec)

    def _compare_less_than_equal(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective <= self._coerce_version(spec)

    def _compare_greater_than_equal(
        self, prospective: LegacyVersion, spec: str
    ) -> bool:
        return prospective >= self._coerce_version(spec)

    def _compare_less_than(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective < self._coerce_version(spec)

    def _compare_greater_than(self, prospective: LegacyVersion, spec: str) -> bool:
        return prospective > self._coerce_version(spec)


def _require_version_compare(
    fn: Callable[["Specifier", ParsedVersion, str], bool]
) -> Callable[["Specifier", ParsedVersion, str], bool]:
    @functools.wraps(fn)
    def wrapped(self: "Specifier", prospective: ParsedVersion, spec: str) -> bool:
        if not isinstance(prospective, Version):
            return False
        return fn(self, prospective, spec)

    return wrapped


class Specifier(_IndividualSpecifier):

    _regex_str = r"""
        (?P(~=|==|!=|<=|>=|<|>|===))
        (?P
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s]*    # We just match everything, except for whitespace
                          # since we are only testing for strict identity.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?

                # You cannot use a wild card and a dev or local version
                # together so group them with a | and make them optional.
                (?:
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                    |
                    \.\*  # Wild card syntax of .*
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?=": "greater_than_equal",
        "<": "less_than",
        ">": "greater_than",
        "===": "arbitrary",
    }

    @_require_version_compare
    def _compare_compatible(self, prospective: ParsedVersion, spec: str) -> bool:

        # Compatible releases have an equivalent combination of >= and ==. That
        # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to
        # implement this in terms of the other specifiers instead of
        # implementing it ourselves. The only thing we need to do is construct
        # the other specifiers.

        # We want everything but the last item in the version, but we want to
        # ignore suffix segments.
        prefix = ".".join(
            list(itertools.takewhile(_is_not_suffix, _version_split(spec)))[:-1]
        )

        # Add the prefix notation to the end of our string
        prefix += ".*"

        return self._get_operator(">=")(prospective, spec) and self._get_operator("==")(
            prospective, prefix
        )

    @_require_version_compare
    def _compare_equal(self, prospective: ParsedVersion, spec: str) -> bool:

        # We need special logic to handle prefix matching
        if spec.endswith(".*"):
            # In the case of prefix matching we want to ignore local segment.
            prospective = Version(prospective.public)
            # Split the spec out by dots, and pretend that there is an implicit
            # dot in between a release segment and a pre-release segment.
            split_spec = _version_split(spec[:-2])  # Remove the trailing .*

            # Split the prospective version out by dots, and pretend that there
            # is an implicit dot in between a release segment and a pre-release
            # segment.
            split_prospective = _version_split(str(prospective))

            # Shorten the prospective version to be the same length as the spec
            # so that we can determine if the specifier is a prefix of the
            # prospective version or not.
            shortened_prospective = split_prospective[: len(split_spec)]

            # Pad out our two sides with zeros so that they both equal the same
            # length.
            padded_spec, padded_prospective = _pad_version(
                split_spec, shortened_prospective
            )

            return padded_prospective == padded_spec
        else:
            # Convert our spec string into a Version
            spec_version = Version(spec)

            # If the specifier does not have a local segment, then we want to
            # act as if the prospective version also does not have a local
            # segment.
            if not spec_version.local:
                prospective = Version(prospective.public)

            return prospective == spec_version

    @_require_version_compare
    def _compare_not_equal(self, prospective: ParsedVersion, spec: str) -> bool:
        return not self._compare_equal(prospective, spec)

    @_require_version_compare
    def _compare_less_than_equal(self, prospective: ParsedVersion, spec: str) -> bool:

        # NB: Local version identifiers are NOT permitted in the version
        # specifier, so local version labels can be universally removed from
        # the prospective version.
        return Version(prospective.public) <= Version(spec)

    @_require_version_compare
    def _compare_greater_than_equal(
        self, prospective: ParsedVersion, spec: str
    ) -> bool:

        # NB: Local version identifiers are NOT permitted in the version
        # specifier, so local version labels can be universally removed from
        # the prospective version.
        return Version(prospective.public) >= Version(spec)

    @_require_version_compare
    def _compare_less_than(self, prospective: ParsedVersion, spec_str: str) -> bool:

        # Convert our spec to a Version instance, since we'll want to work with
        # it as a version.
        spec = Version(spec_str)

        # Check to see if the prospective version is less than the spec
        # version. If it's not we can short circuit and just return False now
        # instead of doing extra unneeded work.
        if not prospective < spec:
            return False

        # This special case is here so that, unless the specifier itself
        # includes is a pre-release version, that we do not accept pre-release
        # versions for the version mentioned in the specifier (e.g. <3.1 should
        # not match 3.1.dev0, but should match 3.0.dev0).
        if not spec.is_prerelease and prospective.is_prerelease:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # If we've gotten to here, it means that prospective version is both
        # less than the spec version *and* it's not a pre-release of the same
        # version in the spec.
        return True

    @_require_version_compare
    def _compare_greater_than(self, prospective: ParsedVersion, spec_str: str) -> bool:

        # Convert our spec to a Version instance, since we'll want to work with
        # it as a version.
        spec = Version(spec_str)

        # Check to see if the prospective version is greater than the spec
        # version. If it's not we can short circuit and just return False now
        # instead of doing extra unneeded work.
        if not prospective > spec:
            return False

        # This special case is here so that, unless the specifier itself
        # includes is a post-release version, that we do not accept
        # post-release versions for the version mentioned in the specifier
        # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0).
        if not spec.is_postrelease and prospective.is_postrelease:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # Ensure that we do not allow a local version of the version mentioned
        # in the specifier, which is technically greater than, to match.
        if prospective.local is not None:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # If we've gotten to here, it means that prospective version is both
        # greater than the spec version *and* it's not a pre-release of the
        # same version in the spec.
        return True

    def _compare_arbitrary(self, prospective: Version, spec: str) -> bool:
        return str(prospective).lower() == str(spec).lower()

    @property
    def prereleases(self) -> bool:

        # If there is an explicit prereleases set for this, then we'll just
        # blindly use that.
        if self._prereleases is not None:
            return self._prereleases

        # Look at all of our specifiers and determine if they are inclusive
        # operators, and if they are if they are including an explicit
        # prerelease.
        operator, version = self._spec
        if operator in ["==", ">=", "<=", "~=", "==="]:
            # The == specifier can include a trailing .*, if it does we
            # want to remove before parsing.
            if operator == "==" and version.endswith(".*"):
                version = version[:-2]

            # Parse the version, and if it is a pre-release than this
            # specifier allows pre-releases.
            if parse(version).is_prerelease:
                return True

        return False

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value


_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$")


def _version_split(version: str) -> List[str]:
    result: List[str] = []
    for item in version.split("."):
        match = _prefix_regex.search(item)
        if match:
            result.extend(match.groups())
        else:
            result.append(item)
    return result


def _is_not_suffix(segment: str) -> bool:
    return not any(
        segment.startswith(prefix) for prefix in ("dev", "a", "b", "rc", "post")
    )


def _pad_version(left: List[str], right: List[str]) -> Tuple[List[str], List[str]]:
    left_split, right_split = [], []

    # Get the release segment of our versions
    left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left)))
    right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right)))

    # Get the rest of our versions
    left_split.append(left[len(left_split[0]) :])
    right_split.append(right[len(right_split[0]) :])

    # Insert our padding
    left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0])))
    right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0])))

    return (list(itertools.chain(*left_split)), list(itertools.chain(*right_split)))


class SpecifierSet(BaseSpecifier):
    def __init__(
        self, specifiers: str = "", prereleases: Optional[bool] = None
    ) -> None:

        # Split on , to break each individual specifier into it's own item, and
        # strip each item to remove leading/trailing whitespace.
        split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()]

        # Parsed each individual specifier, attempting first to make it a
        # Specifier and falling back to a LegacySpecifier.
        parsed: Set[_IndividualSpecifier] = set()
        for specifier in split_specifiers:
            try:
                parsed.add(Specifier(specifier))
            except InvalidSpecifier:
                parsed.add(LegacySpecifier(specifier))

        # Turn our parsed specifiers into a frozen set and save them for later.
        self._specs = frozenset(parsed)

        # Store our prereleases value so we can use it later to determine if
        # we accept prereleases or not.
        self._prereleases = prereleases

    def __repr__(self) -> str:
        pre = (
            f", prereleases={self.prereleases!r}"
            if self._prereleases is not None
            else ""
        )

        return f""

    def __str__(self) -> str:
        return ",".join(sorted(str(s) for s in self._specs))

    def __hash__(self) -> int:
        return hash(self._specs)

    def __and__(self, other: Union["SpecifierSet", str]) -> "SpecifierSet":
        if isinstance(other, str):
            other = SpecifierSet(other)
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        specifier = SpecifierSet()
        specifier._specs = frozenset(self._specs | other._specs)

        if self._prereleases is None and other._prereleases is not None:
            specifier._prereleases = other._prereleases
        elif self._prereleases is not None and other._prereleases is None:
            specifier._prereleases = self._prereleases
        elif self._prereleases == other._prereleases:
            specifier._prereleases = self._prereleases
        else:
            raise ValueError(
                "Cannot combine SpecifierSets with True and False prerelease "
                "overrides."
            )

        return specifier

    def __eq__(self, other: object) -> bool:
        if isinstance(other, (str, _IndividualSpecifier)):
            other = SpecifierSet(str(other))
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        return self._specs == other._specs

    def __len__(self) -> int:
        return len(self._specs)

    def __iter__(self) -> Iterator[_IndividualSpecifier]:
        return iter(self._specs)

    @property
    def prereleases(self) -> Optional[bool]:

        # If we have been given an explicit prerelease modifier, then we'll
        # pass that through here.
        if self._prereleases is not None:
            return self._prereleases

        # If we don't have any specifiers, and we don't have a forced value,
        # then we'll just return None since we don't know if this should have
        # pre-releases or not.
        if not self._specs:
            return None

        # Otherwise we'll see if any of the given specifiers accept
        # prereleases, if any of them do we'll return True, otherwise False.
        return any(s.prereleases for s in self._specs)

    @prereleases.setter
    def prereleases(self, value: bool) -> None:
        self._prereleases = value

    def __contains__(self, item: UnparsedVersion) -> bool:
        return self.contains(item)

    def contains(
        self, item: UnparsedVersion, prereleases: Optional[bool] = None
    ) -> bool:

        # Ensure that our item is a Version or LegacyVersion instance.
        if not isinstance(item, (LegacyVersion, Version)):
            item = parse(item)

        # Determine if we're forcing a prerelease or not, if we're not forcing
        # one for this particular filter call, then we'll use whatever the
        # SpecifierSet thinks for whether or not we should support prereleases.
        if prereleases is None:
            prereleases = self.prereleases

        # We can determine if we're going to allow pre-releases by looking to
        # see if any of the underlying items supports them. If none of them do
        # and this item is a pre-release then we do not allow it and we can
        # short circuit that here.
        # Note: This means that 1.0.dev1 would not be contained in something
        #       like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0
        if not prereleases and item.is_prerelease:
            return False

        # We simply dispatch to the underlying specs here to make sure that the
        # given version is contained within all of them.
        # Note: This use of all() here means that an empty set of specifiers
        #       will always return True, this is an explicit design decision.
        return all(s.contains(item, prereleases=prereleases) for s in self._specs)

    def filter(
        self, iterable: Iterable[VersionTypeVar], prereleases: Optional[bool] = None
    ) -> Iterable[VersionTypeVar]:

        # Determine if we're forcing a prerelease or not, if we're not forcing
        # one for this particular filter call, then we'll use whatever the
        # SpecifierSet thinks for whether or not we should support prereleases.
        if prereleases is None:
            prereleases = self.prereleases

        # If we have any specifiers, then we want to wrap our iterable in the
        # filter method for each one, this will act as a logical AND amongst
        # each specifier.
        if self._specs:
            for spec in self._specs:
                iterable = spec.filter(iterable, prereleases=bool(prereleases))
            return iterable
        # If we do not have any specifiers, then we need to have a rough filter
        # which will filter out any pre-releases, unless there are no final
        # releases, and which will filter out LegacyVersion in general.
        else:
            filtered: List[VersionTypeVar] = []
            found_prereleases: List[VersionTypeVar] = []

            item: UnparsedVersion
            parsed_version: Union[Version, LegacyVersion]

            for item in iterable:
                # Ensure that we some kind of Version class for this item.
                if not isinstance(item, (LegacyVersion, Version)):
                    parsed_version = parse(item)
                else:
                    parsed_version = item

                # Filter out any item which is parsed as a LegacyVersion
                if isinstance(parsed_version, LegacyVersion):
                    continue

                # Store any item which is a pre-release for later unless we've
                # already found a final version or we are accepting prereleases
                if parsed_version.is_prerelease and not prereleases:
                    if not filtered:
                        found_prereleases.append(item)
                else:
                    filtered.append(item)

            # If we've found no items except for pre-releases, then we'll go
            # ahead and use the pre-releases
            if not filtered and found_prereleases and prereleases is None:
                return found_prereleases

            return filtered
PK|5Z	msS=S=9Lib/site-packages/pkg_resources/_vendor/packaging/tags.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import logging
import platform
import sys
import sysconfig
from importlib.machinery import EXTENSION_SUFFIXES
from typing import (
    Dict,
    FrozenSet,
    Iterable,
    Iterator,
    List,
    Optional,
    Sequence,
    Tuple,
    Union,
    cast,
)

from . import _manylinux, _musllinux

logger = logging.getLogger(__name__)

PythonVersion = Sequence[int]
MacVersion = Tuple[int, int]

INTERPRETER_SHORT_NAMES: Dict[str, str] = {
    "python": "py",  # Generic.
    "cpython": "cp",
    "pypy": "pp",
    "ironpython": "ip",
    "jython": "jy",
}


_32_BIT_INTERPRETER = sys.maxsize <= 2 ** 32


class Tag:
    """
    A representation of the tag triple for a wheel.

    Instances are considered immutable and thus are hashable. Equality checking
    is also supported.
    """

    __slots__ = ["_interpreter", "_abi", "_platform", "_hash"]

    def __init__(self, interpreter: str, abi: str, platform: str) -> None:
        self._interpreter = interpreter.lower()
        self._abi = abi.lower()
        self._platform = platform.lower()
        # The __hash__ of every single element in a Set[Tag] will be evaluated each time
        # that a set calls its `.disjoint()` method, which may be called hundreds of
        # times when scanning a page of links for packages with tags matching that
        # Set[Tag]. Pre-computing the value here produces significant speedups for
        # downstream consumers.
        self._hash = hash((self._interpreter, self._abi, self._platform))

    @property
    def interpreter(self) -> str:
        return self._interpreter

    @property
    def abi(self) -> str:
        return self._abi

    @property
    def platform(self) -> str:
        return self._platform

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, Tag):
            return NotImplemented

        return (
            (self._hash == other._hash)  # Short-circuit ASAP for perf reasons.
            and (self._platform == other._platform)
            and (self._abi == other._abi)
            and (self._interpreter == other._interpreter)
        )

    def __hash__(self) -> int:
        return self._hash

    def __str__(self) -> str:
        return f"{self._interpreter}-{self._abi}-{self._platform}"

    def __repr__(self) -> str:
        return f"<{self} @ {id(self)}>"


def parse_tag(tag: str) -> FrozenSet[Tag]:
    """
    Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.

    Returning a set is required due to the possibility that the tag is a
    compressed tag set.
    """
    tags = set()
    interpreters, abis, platforms = tag.split("-")
    for interpreter in interpreters.split("."):
        for abi in abis.split("."):
            for platform_ in platforms.split("."):
                tags.add(Tag(interpreter, abi, platform_))
    return frozenset(tags)


def _get_config_var(name: str, warn: bool = False) -> Union[int, str, None]:
    value = sysconfig.get_config_var(name)
    if value is None and warn:
        logger.debug(
            "Config variable '%s' is unset, Python ABI tag may be incorrect", name
        )
    return value


def _normalize_string(string: str) -> str:
    return string.replace(".", "_").replace("-", "_")


def _abi3_applies(python_version: PythonVersion) -> bool:
    """
    Determine if the Python version supports abi3.

    PEP 384 was first implemented in Python 3.2.
    """
    return len(python_version) > 1 and tuple(python_version) >= (3, 2)


def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> List[str]:
    py_version = tuple(py_version)  # To allow for version comparison.
    abis = []
    version = _version_nodot(py_version[:2])
    debug = pymalloc = ucs4 = ""
    with_debug = _get_config_var("Py_DEBUG", warn)
    has_refcount = hasattr(sys, "gettotalrefcount")
    # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled
    # extension modules is the best option.
    # https://github.com/pypa/pip/issues/3383#issuecomment-173267692
    has_ext = "_d.pyd" in EXTENSION_SUFFIXES
    if with_debug or (with_debug is None and (has_refcount or has_ext)):
        debug = "d"
    if py_version < (3, 8):
        with_pymalloc = _get_config_var("WITH_PYMALLOC", warn)
        if with_pymalloc or with_pymalloc is None:
            pymalloc = "m"
        if py_version < (3, 3):
            unicode_size = _get_config_var("Py_UNICODE_SIZE", warn)
            if unicode_size == 4 or (
                unicode_size is None and sys.maxunicode == 0x10FFFF
            ):
                ucs4 = "u"
    elif debug:
        # Debug builds can also load "normal" extension modules.
        # We can also assume no UCS-4 or pymalloc requirement.
        abis.append(f"cp{version}")
    abis.insert(
        0,
        "cp{version}{debug}{pymalloc}{ucs4}".format(
            version=version, debug=debug, pymalloc=pymalloc, ucs4=ucs4
        ),
    )
    return abis


def cpython_tags(
    python_version: Optional[PythonVersion] = None,
    abis: Optional[Iterable[str]] = None,
    platforms: Optional[Iterable[str]] = None,
    *,
    warn: bool = False,
) -> Iterator[Tag]:
    """
    Yields the tags for a CPython interpreter.

    The tags consist of:
    - cp--
    - cp-abi3-
    - cp-none-
    - cp-abi3-  # Older Python versions down to 3.2.

    If python_version only specifies a major version then user-provided ABIs and
    the 'none' ABItag will be used.

    If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
    their normal position and not at the beginning.
    """
    if not python_version:
        python_version = sys.version_info[:2]

    interpreter = f"cp{_version_nodot(python_version[:2])}"

    if abis is None:
        if len(python_version) > 1:
            abis = _cpython_abis(python_version, warn)
        else:
            abis = []
    abis = list(abis)
    # 'abi3' and 'none' are explicitly handled later.
    for explicit_abi in ("abi3", "none"):
        try:
            abis.remove(explicit_abi)
        except ValueError:
            pass

    platforms = list(platforms or platform_tags())
    for abi in abis:
        for platform_ in platforms:
            yield Tag(interpreter, abi, platform_)
    if _abi3_applies(python_version):
        yield from (Tag(interpreter, "abi3", platform_) for platform_ in platforms)
    yield from (Tag(interpreter, "none", platform_) for platform_ in platforms)

    if _abi3_applies(python_version):
        for minor_version in range(python_version[1] - 1, 1, -1):
            for platform_ in platforms:
                interpreter = "cp{version}".format(
                    version=_version_nodot((python_version[0], minor_version))
                )
                yield Tag(interpreter, "abi3", platform_)


def _generic_abi() -> Iterator[str]:
    abi = sysconfig.get_config_var("SOABI")
    if abi:
        yield _normalize_string(abi)


def generic_tags(
    interpreter: Optional[str] = None,
    abis: Optional[Iterable[str]] = None,
    platforms: Optional[Iterable[str]] = None,
    *,
    warn: bool = False,
) -> Iterator[Tag]:
    """
    Yields the tags for a generic interpreter.

    The tags consist of:
    - --

    The "none" ABI will be added if it was not explicitly provided.
    """
    if not interpreter:
        interp_name = interpreter_name()
        interp_version = interpreter_version(warn=warn)
        interpreter = "".join([interp_name, interp_version])
    if abis is None:
        abis = _generic_abi()
    platforms = list(platforms or platform_tags())
    abis = list(abis)
    if "none" not in abis:
        abis.append("none")
    for abi in abis:
        for platform_ in platforms:
            yield Tag(interpreter, abi, platform_)


def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]:
    """
    Yields Python versions in descending order.

    After the latest version, the major-only version will be yielded, and then
    all previous versions of that major version.
    """
    if len(py_version) > 1:
        yield f"py{_version_nodot(py_version[:2])}"
    yield f"py{py_version[0]}"
    if len(py_version) > 1:
        for minor in range(py_version[1] - 1, -1, -1):
            yield f"py{_version_nodot((py_version[0], minor))}"


def compatible_tags(
    python_version: Optional[PythonVersion] = None,
    interpreter: Optional[str] = None,
    platforms: Optional[Iterable[str]] = None,
) -> Iterator[Tag]:
    """
    Yields the sequence of tags that are compatible with a specific version of Python.

    The tags consist of:
    - py*-none-
    - -none-any  # ... if `interpreter` is provided.
    - py*-none-any
    """
    if not python_version:
        python_version = sys.version_info[:2]
    platforms = list(platforms or platform_tags())
    for version in _py_interpreter_range(python_version):
        for platform_ in platforms:
            yield Tag(version, "none", platform_)
    if interpreter:
        yield Tag(interpreter, "none", "any")
    for version in _py_interpreter_range(python_version):
        yield Tag(version, "none", "any")


def _mac_arch(arch: str, is_32bit: bool = _32_BIT_INTERPRETER) -> str:
    if not is_32bit:
        return arch

    if arch.startswith("ppc"):
        return "ppc"

    return "i386"


def _mac_binary_formats(version: MacVersion, cpu_arch: str) -> List[str]:
    formats = [cpu_arch]
    if cpu_arch == "x86_64":
        if version < (10, 4):
            return []
        formats.extend(["intel", "fat64", "fat32"])

    elif cpu_arch == "i386":
        if version < (10, 4):
            return []
        formats.extend(["intel", "fat32", "fat"])

    elif cpu_arch == "ppc64":
        # TODO: Need to care about 32-bit PPC for ppc64 through 10.2?
        if version > (10, 5) or version < (10, 4):
            return []
        formats.append("fat64")

    elif cpu_arch == "ppc":
        if version > (10, 6):
            return []
        formats.extend(["fat32", "fat"])

    if cpu_arch in {"arm64", "x86_64"}:
        formats.append("universal2")

    if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}:
        formats.append("universal")

    return formats


def mac_platforms(
    version: Optional[MacVersion] = None, arch: Optional[str] = None
) -> Iterator[str]:
    """
    Yields the platform tags for a macOS system.

    The `version` parameter is a two-item tuple specifying the macOS version to
    generate platform tags for. The `arch` parameter is the CPU architecture to
    generate platform tags for. Both parameters default to the appropriate value
    for the current system.
    """
    version_str, _, cpu_arch = platform.mac_ver()
    if version is None:
        version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2])))
    else:
        version = version
    if arch is None:
        arch = _mac_arch(cpu_arch)
    else:
        arch = arch

    if (10, 0) <= version and version < (11, 0):
        # Prior to Mac OS 11, each yearly release of Mac OS bumped the
        # "minor" version number.  The major version was always 10.
        for minor_version in range(version[1], -1, -1):
            compat_version = 10, minor_version
            binary_formats = _mac_binary_formats(compat_version, arch)
            for binary_format in binary_formats:
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=10, minor=minor_version, binary_format=binary_format
                )

    if version >= (11, 0):
        # Starting with Mac OS 11, each yearly release bumps the major version
        # number.   The minor versions are now the midyear updates.
        for major_version in range(version[0], 10, -1):
            compat_version = major_version, 0
            binary_formats = _mac_binary_formats(compat_version, arch)
            for binary_format in binary_formats:
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=major_version, minor=0, binary_format=binary_format
                )

    if version >= (11, 0):
        # Mac OS 11 on x86_64 is compatible with binaries from previous releases.
        # Arm64 support was introduced in 11.0, so no Arm binaries from previous
        # releases exist.
        #
        # However, the "universal2" binary format can have a
        # macOS version earlier than 11.0 when the x86_64 part of the binary supports
        # that version of macOS.
        if arch == "x86_64":
            for minor_version in range(16, 3, -1):
                compat_version = 10, minor_version
                binary_formats = _mac_binary_formats(compat_version, arch)
                for binary_format in binary_formats:
                    yield "macosx_{major}_{minor}_{binary_format}".format(
                        major=compat_version[0],
                        minor=compat_version[1],
                        binary_format=binary_format,
                    )
        else:
            for minor_version in range(16, 3, -1):
                compat_version = 10, minor_version
                binary_format = "universal2"
                yield "macosx_{major}_{minor}_{binary_format}".format(
                    major=compat_version[0],
                    minor=compat_version[1],
                    binary_format=binary_format,
                )


def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]:
    linux = _normalize_string(sysconfig.get_platform())
    if is_32bit:
        if linux == "linux_x86_64":
            linux = "linux_i686"
        elif linux == "linux_aarch64":
            linux = "linux_armv7l"
    _, arch = linux.split("_", 1)
    yield from _manylinux.platform_tags(linux, arch)
    yield from _musllinux.platform_tags(arch)
    yield linux


def _generic_platforms() -> Iterator[str]:
    yield _normalize_string(sysconfig.get_platform())


def platform_tags() -> Iterator[str]:
    """
    Provides the platform tags for this installation.
    """
    if platform.system() == "Darwin":
        return mac_platforms()
    elif platform.system() == "Linux":
        return _linux_platforms()
    else:
        return _generic_platforms()


def interpreter_name() -> str:
    """
    Returns the name of the running interpreter.
    """
    name = sys.implementation.name
    return INTERPRETER_SHORT_NAMES.get(name) or name


def interpreter_version(*, warn: bool = False) -> str:
    """
    Returns the version of the running interpreter.
    """
    version = _get_config_var("py_version_nodot", warn=warn)
    if version:
        version = str(version)
    else:
        version = _version_nodot(sys.version_info[:2])
    return version


def _version_nodot(version: PythonVersion) -> str:
    return "".join(map(str, version))


def sys_tags(*, warn: bool = False) -> Iterator[Tag]:
    """
    Returns the sequence of tag triples for the running interpreter.

    The order of the sequence corresponds to priority order for the
    interpreter, from most to least important.
    """

    interp_name = interpreter_name()
    if interp_name == "cp":
        yield from cpython_tags(warn=warn)
    else:
        yield from generic_tags()

    if interp_name == "pp":
        yield from compatible_tags(interpreter="pp3")
    else:
        yield from compatible_tags()
PK|5Z|%XbbALib/site-packages/pkg_resources/_vendor/packaging/requirements.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import re
import string
import urllib.parse
from typing import List, Optional as TOptional, Set

from pkg_resources.extern.pyparsing import (  # noqa
    Combine,
    Literal as L,
    Optional,
    ParseException,
    Regex,
    Word,
    ZeroOrMore,
    originalTextFor,
    stringEnd,
    stringStart,
)

from .markers import MARKER_EXPR, Marker
from .specifiers import LegacySpecifier, Specifier, SpecifierSet


class InvalidRequirement(ValueError):
    """
    An invalid requirement was found, users should refer to PEP 508.
    """


ALPHANUM = Word(string.ascii_letters + string.digits)

LBRACKET = L("[").suppress()
RBRACKET = L("]").suppress()
LPAREN = L("(").suppress()
RPAREN = L(")").suppress()
COMMA = L(",").suppress()
SEMICOLON = L(";").suppress()
AT = L("@").suppress()

PUNCTUATION = Word("-_.")
IDENTIFIER_END = ALPHANUM | (ZeroOrMore(PUNCTUATION) + ALPHANUM)
IDENTIFIER = Combine(ALPHANUM + ZeroOrMore(IDENTIFIER_END))

NAME = IDENTIFIER("name")
EXTRA = IDENTIFIER

URI = Regex(r"[^ ]+")("url")
URL = AT + URI

EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA)
EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras")

VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE)
VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE)

VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY
VERSION_MANY = Combine(
    VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), joinString=",", adjacent=False
)("_raw_spec")
_VERSION_SPEC = Optional((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)
_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or "")

VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier")
VERSION_SPEC.setParseAction(lambda s, l, t: t[1])

MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
MARKER_EXPR.setParseAction(
    lambda s, l, t: Marker(s[t._original_start : t._original_end])
)
MARKER_SEPARATOR = SEMICOLON
MARKER = MARKER_SEPARATOR + MARKER_EXPR

VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER)
URL_AND_MARKER = URL + Optional(MARKER)

NAMED_REQUIREMENT = NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER)

REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd
# pkg_resources.extern.pyparsing isn't thread safe during initialization, so we do it eagerly, see
# issue #104
REQUIREMENT.parseString("x[]")


class Requirement:
    """Parse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.
    """

    # TODO: Can we test whether something is contained within a requirement?
    #       If so how do we do that? Do we need to test against the _name_ of
    #       the thing as well as the version? What about the markers?
    # TODO: Can we normalize the name and extra name?

    def __init__(self, requirement_string: str) -> None:
        try:
            req = REQUIREMENT.parseString(requirement_string)
        except ParseException as e:
            raise InvalidRequirement(
                f'Parse error at "{ requirement_string[e.loc : e.loc + 8]!r}": {e.msg}'
            )

        self.name: str = req.name
        if req.url:
            parsed_url = urllib.parse.urlparse(req.url)
            if parsed_url.scheme == "file":
                if urllib.parse.urlunparse(parsed_url) != req.url:
                    raise InvalidRequirement("Invalid URL given")
            elif not (parsed_url.scheme and parsed_url.netloc) or (
                not parsed_url.scheme and not parsed_url.netloc
            ):
                raise InvalidRequirement(f"Invalid URL: {req.url}")
            self.url: TOptional[str] = req.url
        else:
            self.url = None
        self.extras: Set[str] = set(req.extras.asList() if req.extras else [])
        self.specifier: SpecifierSet = SpecifierSet(req.specifier)
        self.marker: TOptional[Marker] = req.marker if req.marker else None

    def __str__(self) -> str:
        parts: List[str] = [self.name]

        if self.extras:
            formatted_extras = ",".join(sorted(self.extras))
            parts.append(f"[{formatted_extras}]")

        if self.specifier:
            parts.append(str(self.specifier))

        if self.url:
            parts.append(f"@ {self.url}")
            if self.marker:
                parts.append(" ")

        if self.marker:
            parts.append(f"; {self.marker}")

        return "".join(parts)

    def __repr__(self) -> str:
        return f""
PK|5Z
|NNVLib/site-packages/pkg_resources/_vendor/packaging/__pycache__/__init__.cpython-311.pycnuW+A

^;d6ddlmZmZmZmZmZmZmZmZgdZ	dS))
__author__
__copyright__	__email____license____summary__	__title____uri____version__)rrr	r
rrrrN)
	__about__rrrrrrr	r
__all__wE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/packaging/__init__.pyrs~
																							rPK|5ZBZLib/site-packages/pkg_resources/_vendor/packaging/__pycache__/requirements.cpython-311.pycnuW+A

^;dbddlZddlZddlZddlmZmZmZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZddlmZmZddlmZmZmZGddeZeejejzZed	 Z!ed
 Z"ed Z#ed Z$ed
 Z%ed Z&ed Z'edZ(eee(ezzZ)e
eee)zZ*e*dZ+e*Z,eddZ-e'e-zZ.e,ee%e,zzZ/e!ee/ze"zdZ0eej1ej2ej3zZ4eej1ej2ej3zZ5e4e5zZ6e
e6ee%e6zzd
ddZ7ee#e7ze$ze7zZ8e89dee8dZ:e:9deedZej9de&Z;e;ezZe+ee0ze>e=zzZ?ee?zezZ@e@AdGddZBdS) N)ListOptionalSet)
CombineLiteralrParseExceptionRegexWord
ZeroOrMoreoriginalTextFor	stringEndstringStart)MARKER_EXPRMarker)LegacySpecifier	SpecifierSpecifierSetceZdZdZdS)InvalidRequirementzJ
    An invalid requirement was found, users should refer to PEP 508.
    N)__name__
__module____qualname____doc__{E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/packaging/requirements.pyrrsrr[](),;@z-_.namez[^ ]+urlextrasF)
joinStringadjacent	_raw_specc|jpdS)N)r*slts   rr1@s
Q[->Br	specifierc|dS)Nrrr-s   rr1r1Cs
AaDrmarkercDt||j|jS)N)r_original_start
_original_endr-s   rr1r1GsF1Q.@ABBrzx[]c:eZdZdZdeddfdZdefdZdefdZdS)RequirementzParse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.
    requirement_stringreturnNc	t|}nA#t$r4}td||j|jdzd|jd}~wwxYw|j|_|jrtj	
|j}|jdkr8tj	||jkrtdn3|jr|j
r|js|j
std|j|j|_nd|_t|jr|jng|_t#|j|_|jr|jnd|_dS)NzParse error at "z": filezInvalid URL givenz
Invalid URL: )REQUIREMENTparseStringrrlocmsgr%r&urllibparseurlparsescheme
urlunparsenetlocsetr'asListrr2r4)selfr:reqe
parsed_urls     r__init__zRequirement.__init__ds	))*<==CC			$W$6ququqy7H$IWWPQPUWW
	
	7	..sw77J F**<**:66#'AA,-@AAAB '
DJ,=
D%
D.8.?
D))B)B)BCCC'*wDHHDH #3:$MCJ$5$5$7$7$72 N N'3CM'B'B7:z)Kts
A/AAc|jg}|jr@dt|j}|d|d|jr'|t
|j|jr9|d|j|jr|d|jr|d|jd|S)Nr"rrz@  z; r,)	r%r'joinsortedappendr2strr&r4)rKpartsformatted_extrass   r__str__zRequirement.__str__}s I;;	2"xxt{(;(;<<LL0-000111>	.LLT^,,---8	"LLdh))){
"S!!!;	-LL+dk++,,,wwu~~rcd|dS)Nzr)rKs r__repr__zRequirement.__repr__s)))))r)rrrrrUrOrXrZrrrr9r9Ws|L3L4LLLL2(*#******rr9)Crestringurllib.parserCtypingrr	TOptionalrpkg_resources.extern.pyparsingrrLrr	r
rrr
rmarkersrr
specifiersrrr
ValueErrorr
ascii_lettersdigitsALPHANUMsuppressLBRACKETRBRACKETLPARENRPARENCOMMA	SEMICOLONATPUNCTUATIONIDENTIFIER_END
IDENTIFIERNAMEEXTRAURIURLEXTRAS_LISTEXTRAS
_regex_strVERBOSE
IGNORECASEVERSION_PEP440VERSION_LEGACYVERSION_ONEVERSION_MANY
_VERSION_SPECsetParseActionVERSION_SPECMARKER_SEPARATORMARKERVERSION_AND_MARKERURL_AND_MARKERNAMED_REQUIREMENTr?r@r9rrrrsj

			



3333333333)(((((((@@@@@@@@@@4$v}4551S66??1S66??	
3			
3			#
AcFFOO	QsVV__d5kkZZ44x?@
WX

> : ::
;
;
z&eeHooe3hjj///
5(XXk**
*X
5x	@	@y+RZ"--GHH12:
3MNN~-ww**U[0111cE
&</&8LHII

>>???-}--k::00111,ookkmm,,X66BB	K	'!HHV$4$44xx'''88F+++~@R/RS--	9;*;*;*;*;*;*;*;*;*;*rPK|5Z:33XLib/site-packages/pkg_resources/_vendor/packaging/__pycache__/_manylinux.cpython-311.pycnuW+A

^;d,UddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
Z
GddZdeefdZdefdZdefdZd	edefd
ZejdZe	eefed<Gd
deZdeefdZdeefdZdeefdZdede
eeffdZejde
eeffdZded	ededefdZ ddddZ!ded	ede
efdZ"dS)N)IODictIterator
NamedTupleOptionalTuplecveZdZGddeZdZdZdZdZdZ	dZ
dZdZd	Z
d
ZdZdZd
eeddfdZdS)_ELFFileHeaderceZdZdZdS)$_ELFFileHeader._InvalidELFFileHeaderz7
        An invalid ELF file header was found.
        N)__name__
__module____qualname____doc__yE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/packaging/_manylinux.py_InvalidELFFileHeaderrs				rriFLE(>l~iifilereturnNcndtdtffd}|d|_|j|jkrt|d|_|j|j|jhvrt|d|_	|j	|j
|jhvrt|d|_|d|_
|d|_d|_|j	|j
krdnd}|j	|j
krd	nd}|j	|j
krd
nd}|j|jkr|n|}|||_|||_|||_|||_|||_|||_|||_|||_|||_|||_|||_|||_|||_dS)Nfmtrc	tj|}tj||}n,#tj$rt
wxYw|dS)Nr)readstructcalcsizeunpackerrorr
r)rdataresultrs   rr#z'_ELFFileHeader.__init__..unpack$so
=yy!5!566*0-T*B*B<
=
=
=$::<<<
=!9sIBzHzQ)strint
e_ident_magicELF_MAGIC_NUMBERr
r
e_ident_class
ELFCLASS32
ELFCLASS64e_ident_dataELFDATA2LSBELFDATA2MSBe_ident_version
e_ident_osabie_ident_abiversionr e_ident_pade_type	e_machine	e_versione_entrye_phoffe_shoffe_flagse_ehsizee_phentsizee_phnume_shentsizee_shnum
e_shstrndx)selfrr#format_hformat_iformat_qformat_ps `     r__init__z_ELFFileHeader.__init__#s`								$VD\\!666 66888#VC[[dot%GGG 66888"F3KKT%5t7G$HHH 66888%vc{{#VC[["(&++99Q<<,0@@@44d,0@@@44d,0@@@44d#1T_DD88(fX&&))))vh''vh''vh''vh''x((
!6(++vh''!6(++vh'' &**r)r
rr
ValueErrorrr,r.r/r1r2EM_386EM_S390EM_ARM	EM_X86_64EF_ARM_ABIMASKEF_ARM_ABI_VER5EF_ARM_ABI_FLOAT_HARDrbytesrIrrrr
r
s

"JJKK
FG
FIN O&&+RY&+4&+&+&+&+&+&+rr
rc	ttjd5}t|}dddn#1swxYwYn##tt
tjf$rYdSwxYw|S)Nrb)opensys
executabler
OSError	TypeErrorr)f
elf_headers  r_get_elf_headerr\Ls
#.$
'
'	+1'**J	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+Y DEtts-A8A<A<AA$#A$ct}|dS|j|jk}||j|jkz}||j|jkz}||j|jz|j	kz}||j|j
z|j
kz}|SNF)r\r-r.r0r1r8rMr=rOrPrQr[r&s  r_is_linux_armhfr`Us!""Ju

%)>
>F
j%)???F
j"j&777F
Z66		#$$FZ==		)**FMrct}|dS|j|jk}||j|jkz}||j|jkz}|Sr^)r\r-r.r0r1r8rKr_s  r_is_linux_i686rbhsW ""Ju

%)>
>F
j%)???F
j"j&777FMrarchcZ|dkrtS|dkrtS|dvS)Narmv7li686>ppc64s390xx86_64aarch64ppc64le)r`rb)rcs r_have_compatible_abirlrs:x   v~~EEErcdS)N2rrrrrosBr_LAST_GLIBC_MINORc$eZdZUeed<eed<dS)
_GLibCVersionmajorminorN)r
rrr*__annotations__rrrrrrrs"JJJJJJJJrrrc	tjd}|J|\}}n$#ttt
tf$rYdSwxYw|S)zJ
    Primary implementation of glibc_version_string using os.confstr.
    CS_GNU_LIBC_VERSIONN)osconfstrsplitAssertionErrorAttributeErrorrXrJ)version_string_versions   r_glibc_version_string_confstrrsl$9::)))#))++
77NGZ@ttNs/2AAc8	ddl}n#t$rYdSwxYw	|d}n#t$rYdSwxYw	|j}n#t
$rYdSwxYw|j|_|}t|ts|
d}|S)zG
    Fallback implementation of glibc_version_string using ctypes.
    rNascii)ctypesImportErrorCDLLrXgnu_get_libc_versionr|c_char_prestype
isinstancer)decode)rprocess_namespacerversion_strs    r_glibc_version_string_ctypesrs



tt "KK--tt0Ett$*? ++--Kk3''2!((11s*
/
==A		
AAc:tp
tS)z9Returns glibc version string, or None if not using glibc.)rrrrr_glibc_version_stringrs(**L.J.L.LLrrctjd|}|stjd|ztdSt|dt|dfS)a3Parse glibc version.

    We use a regexp instead of str.split because we want to discard any
    random junk that might come after the minor version -- this might happen
    in patched/forked versions of glibc (e.g. Linaro's version of glibc
    uses version strings like "2.20-2014.11"). See gh-3588.
    z$(?P[0-9]+)\.(?P[0-9]+)z=Expected glibc version with 2 components major.minor, got: %srrsrt)rematchwarningswarnRuntimeWarningr*group)rms  r_parse_glibc_versionrs|	8+FFA

$
%	
	
	

vqwww  #aggg&6&6"7"777rcDt}|dSt|S)Nr)rr)rs r_get_glibc_versionrs&'))Kx,,,rnamerc<t}||krdS	ddl}n#t$rYdSwxYwt|dr6||d|d|}|t|SdS|t
ddkr$t|drt|jS|t
dd	kr$t|d
rt|jS|t
ddkr$t|drt|j	SdS)
NFrTmanylinux_compatiblerrmanylinux1_compatiblemanylinux2010_compatiblemanylinux2014_compatible)
r
_manylinuxrhasattrrboolrrrrr)rrcr	sys_glibcrr&s      r_is_compatiblersL"$$I7uttz12200WQZNN<<t-1%%%%:677	:
8999-2&&&&:9::	=
;<<<-2&&&&:9::	=
;<<<4s
++
manylinux2014
manylinux2010
manylinux1))rr)rr)rrlinuxc#Kt|sdStdd}|dvrtdd}tt}|g}t|jdz
ddD]2}t
|}|t||3|D]}|j|jkr|j}nd}t|j|dD]}t|j|}	dj|	}
t|
||	r|
d|
V|	tvr6t|	}t|||	r|
d|VdS)	Nr>rfrirrzmanylinux_{}_{}r)rlrrrrangersrpappendrtformatrreplace_LEGACY_MANYLINUX_MAP)rrctoo_old_glibc2
current_glibcglibc_max_listglibc_majorglibc_minor	glibc_max	min_minor
glibc_versiontag
legacy_tags            r
platform_tagsrs%%"1b))N!!!&q!,,!#5#7#78M#_N]014a<<GG'4mKEEFFFF#==	?n222&,III )R@@		=		=K))/;GGM*#*M:Cc477
2mmGS11111 5552=A
!*dMBB=--<<<<<		=
==r)#collections	functoolsrxrr!rVrtypingrrrrrrr
r\rr`rbr)rldefaultdictrpr*rurrrrrr	lru_cacherrrrrrrrs								







BBBBBBBBBBBBBBBB:+:+:+:+:+:+:+:+z.1&FsFtFFFF%GGGJ
x}&)hsm))))XMx}MMMM
8c8eCHo8888&-E#s(O----C-D8

"="=C"=HSM"="="="="="=rPK|5Z5~|YLib/site-packages/pkg_resources/_vendor/packaging/__pycache__/_structures.cpython-311.pycnuW+A

^;dbGddZeZGddZeZdS)ceZdZdefdZdefdZdedefdZ	dedefdZ
dedefdZdedefdZdedefd	Z
d
eddfdZd
S)InfinityTypereturncdS)NInfinityselfs zE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/packaging/_structures.py__repr__zInfinityType.__repr__szc:tt|SNhashreprrs r
__hash__zInfinityType.__hash__
DJJrothercdSNFrr	rs  r
__lt__zInfinityType.__lt__
urcdSrrrs  r
__le__zInfinityType.__le__rrc,t||jSr
isinstance	__class__rs  r
__eq__zInfinityType.__eq__%000rcdSNTrrs  r
__gt__zInfinityType.__gt__trcdSr#rrs  r
__ge__zInfinityType.__ge__r%rr	NegativeInfinityTypectSr)NegativeInfinityrs r
__neg__zInfinityType.__neg__srN)__name__
__module____qualname__strrintrobjectboolrrr r$r'r+rrr
rrs# #    FtFt1F1t1111FtFt f !7      rrceZdZdefdZdefdZdedefdZ	dedefdZ
dedefdZdedefdZdedefd	Z
d
edefdZdS)
r(rcdS)Nz	-Infinityrrs r
rzNegativeInfinityType.__repr__$s{rc:tt|Srrrs r
rzNegativeInfinityType.__hash__'rrrcdSr#rrs  r
rzNegativeInfinityType.__lt__*r%rcdSr#rrs  r
rzNegativeInfinityType.__le__-r%rc,t||jSrrrs  r
r zNegativeInfinityType.__eq__0r!rcdSrrrs  r
r$zNegativeInfinityType.__gt__3rrcdSrrrs  r
r'zNegativeInfinityType.__ge__6rrr	ctSr)rrs r
r+zNegativeInfinityType.__neg__9srN)r,r-r.r/rr0rr1r2rrr r$r'rr+rrr
r(r(#s# #    FtFt1F1t1111FtFtfrr(N)rrr(r*rrr
r<sy        4<>>4('))rPK|5ZeLSSRLib/site-packages/pkg_resources/_vendor/packaging/__pycache__/tags.cpython-311.pycnuW+A

^;dS=
$UddlZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZmZddlmZmZejeZe
eZeeefZdddd	d
dZeeefed<ejd
kZGddZdedeefdZ d4dede!deeedffdZ"dedefdZ#dede!fdZ$d4dede!deefdZ%			d5dddeedee	edee	ede!de
ef
d Z&de
efd!Z'			d5ddd"eedee	edee	ede!de
ef
d#Z(dede
efd$Z)			d5deed"eedee	ede
efd%Z*efd&ed'e!defd(Z+d)ed*edeefd+Z,	d6d)eed&eede
efd,Z-efd'e!de
efd-Z.de
efd.Z/de
efd/Z0defd0Z1ddde!defd1Z2d)edefd2Z3ddde!de
efd3Z4dS)7N)EXTENSION_SUFFIXES)
Dict	FrozenSetIterableIteratorListOptionalSequenceTupleUnioncast)
_manylinux
_musllinuxpycpppipjy)pythoncpythonpypy
ironpythonjythonINTERPRETER_SHORT_NAMESlceZdZdZgdZdedededdfdZedefd	Zedefd
Z	edefdZ
dedefd
Z
defdZdefdZdefdZdS)Tagz
    A representation of the tag triple for a wheel.

    Instances are considered immutable and thus are hashable. Equality checking
    is also supported.
    )_interpreter_abi	_platform_hashinterpreterabiplatformreturnNc||_||_|j|_t	|j|j|jf|_dSN)lowerrrr hashr!)selfr"r#r$s    sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/packaging/tags.py__init__zTag.__init__4sY'--//IIKK	'))4,diHII


c|jSr')rr*s r+r"zTag.interpreter?s  r-c|jSr')rr/s r+r#zTag.abiCs
yr-c|jSr')r r/s r+r$zTag.platformGs
~r-otherct|tstS|j|jko/|j|jko|j|jko|j|jkSr')
isinstancerNotImplementedr!r rr)r*r2s  r+__eq__z
Tag.__eq__Ksd%%%	"!!Z5;
&
:5?2
:ej(
:"e&88		
r-c|jSr')r!r/s r+__hash__zTag.__hash__Vs
zr-c4|jd|jd|jS)N-)rrr r/s r+__str__zTag.__str__Ys%#BBdiBB$.BBBr-c.d|dt|dS)N)idr/s r+__repr__zTag.__repr__\s!'4''BtHH''''r-)__name__
__module____qualname____doc__	__slots__strr,propertyr"r#r$objectboolr6intr8r;r@r-r+rr*sP?>>I	JC	Jc	JS	JT	J	J	J	J!S!!!X!SX#X	
F	
t	
	
	
	
#CCCCC(#((((((r-rtagr%c
Ft}|d\}}}|dD]V}|dD]>}|dD]&}|t|||'?Wt	|S)z
    Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.

    Returning a set is required due to the possibility that the tag is a
    compressed tag set.
    r:.)setsplitaddr	frozenset)rLtagsinterpretersabis	platformsr"r#	platform_s        r+	parse_tagrX`s55D$'IIcNN!L$	#))#..;;::c??	;	;C&__S11
;
;	[#y99::::
;	;T??r-Fnamewarncltj|}||rtd||S)Nz>Config variable '%s' is unset, Python ABI tag may be incorrect)	sysconfigget_config_varloggerdebug)rYrZvalues   r+_get_config_varraps=$T**E}}Ld	
	
	
Lr-stringcV|ddddS)NrN_r:)replace)rbs r+_normalize_stringrfys&>>#s##++C555r-python_versioncNt|dkot|dkS)zj
    Determine if the Python version supports abi3.

    PEP 384 was first implemented in Python 3.2.
    r))lentuple)rgs r+
_abi3_appliesrm}s)~"Fu^'<'<'FFr-
py_versionc	t|}g}t|dd}dx}x}}td|}ttd}dt
v}	|s||s|	rd}|dkrGtd|}
|
s|
d	}|d
kr*td|}|dks|tjd
krd}n|r|d||dd	|||||S)NrjPy_DEBUGgettotalrefcountz_d.pydd)ri
WITH_PYMALLOCm)ririPy_UNICODE_SIZEiurrz"cp{version}{debug}{pymalloc}{ucs4})versionr_pymallocucs4)
rl_version_nodotrahasattrsysr
maxunicodeappendinsertformat)rnrZrUrzr_r{r|
with_debughas_refcounthas_ext
with_pymallocunicode_sizes            r+
_cpython_abisrsMz""J
DZ^,,G  E Ht T22J3 233L,,Gj(l(g(F'>>
	M1H*+--
    - cp-abi3-
    - cp-none-
    - cp-abi3-  # Older Python versions down to 3.2.

    If python_version only specifies a major version then user-provided ABIs and
    the 'none' ABItag will be used.

    If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
    their normal position and not at the beginning.
    Nrjrr)abi3nonec3:K|]}td|VdS)rNr.0rWr"s  r+	zcpython_tags..s/SSICVY77SSSSSSr-c3:K|]}td|VdS)rNrrs  r+rzcpython_tags..s/OO	K33OOOOOOr-zcp{version}rrzr)
rversion_infor}rkrlistremove
ValueError
platform_tagsrrmranger)	rgrUrVrZexplicit_abir#rW
minor_versionr"s	        @r+cpython_tagsrs*,.)"1"-;~nRaR&899;;K|~"" 66DDD::D(	KK%%%%			D	Y1-//22I33"	3	3Ik3	222222	3^$$TSSSSSSSSSSSSSSOOOOYOOOOOOOOOO^$$:">!#4q#8!R@@	:	:M&
:
:	+22*N1,=}+MNN3+vy999999	
:::	:	:s0B
BBc#\Ktjd}|rt|VdSdS)NSOABI)r\r]rf)r#s r+_generic_abirsB

"7
+
+C
%$$$$$$$%%r-r"c#\K|s5t}t|}d||g}|t}t	|p
t}t	|}d|vr|d|D]}|D]}t|||VdS)z
    Yields the tags for a generic interpreter.

    The tags consist of:
    - --

    The "none" ABI will be added if it was not explicitly provided.
    rrpNr)interpreter_nameinterpreter_versionjoinrrrrr)r"rUrVrZinterp_nameinterp_versionr#rWs        r+generic_tagsrs=&((,$777gg{N;<<|~~Y1-//22I::D
TF33"	3	3Ik3	222222	333r-c#Kt|dkrdt|ddVd|dVt|dkr9t|ddz
ddD] }dt|d|fVdSdS)z
    Yields Python versions in descending order.

    After the latest version, the major-only version will be yielded, and then
    all previous versions of that major version.
    rrNrjrr)rkr}r)rnminors  r+_py_interpreter_rangers:3>*RaR.1133333
z!}


::a=1,b"55	@	@E?~z!}e&<==??????	@	@r-c#8K|stjdd}t|p
t}t	|D]}|D]}t|d|V|rt|ddVt	|D]}t|ddVdS)z
    Yields the sequence of tags that are compatible with a specific version of Python.

    The tags consist of:
    - py*-none-
    - -none-any  # ... if `interpreter` is provided.
    - py*-none-any
    Nrjrany)rrrrrr)rgr"rVrzrWs     r+compatible_tagsrs.)"1"-Y1-//22I(8822"	2	2Igvy111111	2.+vu-----(88**'65))))))**r-archis_32bitc<|s|S|drdSdS)Nppci386)
startswith)rrs  r+	_mac_archr/s-uu6r-rzcpu_archc|g}|dkr |dkrgS|gdnu|dkr |dkrgS|gdnO|dkr$|dks|dkrgS|dn%|d	kr|d
krgS|ddg|d
vr|d|dvr|d|S)Nx86_64)
rx)intelfat64fat32r)rrfatppc64)rrr)rrr>arm64r
universal2>rrrrr	universal)extendr)rzrformatss   r+_mac_binary_formatsr9s$jG8WI2223333	V		WI0001111	W		W' 1 1Iw	U		WI'(((&&&|$$$>>>{###Nr-c#Ktj\}}}|Ltdtt	t
|ddd}n|}|t|}n|}d|krS|dkrMt|dddD]5}d	|f}t||}|D]}d

d	||V6|dkrMt|dd	dD]5}	|	df}t||}|D]}d

|	d|V6|dkr|d
krUtdddD]A}d	|f}t||}|D](}d

|d|d|V)BdStdddD]0}d	|f}d}d

|d|d|V/dSdS)aD
    Yields the platform tags for a macOS system.

    The `version` parameter is a two-item tuple specifying the macOS version to
    generate platform tags for. The `arch` parameter is the CPU architecture to
    generate platform tags for. Both parameters default to the appropriate value
    for the current system.
    N
MacVersionrNrj)rr)rrrrz&macosx_{major}_{minor}_{binary_format})majorr
binary_formatrrrir)r$mac_verr
rlmaprJrPrrrr)
rzrversion_strrdrrcompat_versionbinary_formatsr
major_versions
          r+
mac_platformsrYs (/11KH|U3sK4E4Ec4J4J2A24N+O+O%P%PQQ|""'g//#71:r266		M.N0FFN!/


>EEMF

'#71:r266		M*A-N0FFN!/


>EE'q
F

'8!&r1b!1!1


!#]!2!4^T!J!J%3MBII,Q/,Q/&3J

"'r1b!1!1


!#]!2 ,
>EE(+(+"/F-&

r-c#Kttj}|r|dkrd}n|dkrd}|dd\}}t	j||Ed{Vt
j|Ed{V|VdS)Nlinux_x86_64
linux_i686
linux_aarch64linux_armv7lrdr)rfr\get_platformrPrrr)rlinuxrdrs    r+_linux_platformsrsi46677E#N"" EE
o
%
%"Ekk#q!!GAt't444444444'---------
KKKKKr-c#NKttjVdSr')rfr\rrKr-r+_generic_platformsrs)
I244
5
555555r-ctjdkrtStjdkrtSt	S)z;
    Provides the platform tags for this installation.
    DarwinLinux)r$systemrrrrKr-r+rrsLH$$			g	%	%!!!!###r-c\tjj}t|p|S)z6
    Returns the name of the running interpreter.
    )rimplementationrYrget)rYs r+rrs("D"&&t,,44r-ctd|}|rt|}n!ttjdd}|S)z9
    Returns the version of the running interpreter.
    py_version_nodotrNrj)rarFr}rr)rZrzs  r+rrsJ0t<<>!!!!!!!d"u555555555555"$$$$$$$$$$$r-)F)NNN)NN)5loggingr$rr\importlib.machineryrtypingrrrrrr	r
rrr
rprr	getLoggerrAr^rJ
PythonVersionrrrF__annotations__maxsize_32_BIT_INTERPRETERrrXrIrarfrmrrrrrrrrrrrrrrr}rrKr-r+rs




222222%$$$$$$$		8	$	$


38_
++c3hkW,3(3(3(3(3(3(3(3(l
3
9S>



 #TeCdN6K6c6c6666G-GDGGGG!!m!4!DI!!!!J/3$()-6:
6:6:6:]+6:
8C=
!6:
&6:
6:c]
6:6:6:6:r%hsm%%%%"&$()-3
333#3
8C=
!3
&3
3c]
3333<@m@
@@@@ /3!%)-**]+*#*
&*c]	****2+>C4#stCyBAEEE
j
!E08
E
c]EEEEP':

t
hsm



6HSM6666	$x}	$	$	$	$5#5555).				#				&M&c&&&&#%%%d%x}%%%%%%r-PK|5Z]XXXLib/site-packages/pkg_resources/_vendor/packaging/__pycache__/_musllinux.cpython-311.pycnuW+A

^;d
dZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZm
Z
mZde
ededeedffdZde
ede
efd	ZGd
deZdede
efd
Zejdede
efdZdedeefdZedkrddlZejZeds
Jdedeedeejeddeej dde!dddD]Z"ee"ddSdS) zPEP 656 support.

This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
N)IOIterator
NamedTupleOptionalTupleffmtreturn.cvtj||tj|SN)structunpackreadcalcsize)rr	s  yE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/packaging/_musllinux.py_read_unpackedrs*=affV_S%9%9::;;;cb|d	t|d}n#tj$rYdSwxYw|ddt	dkrdS|tjdd	dd	d
|d\}}}t
j|}n#t$rYdSwxYw	t||\}}}}}}}	n#tj$rYdSwxYwt|	dzD]}
||||
zz	|t||\}}}
n#tj$rYdSwxYw|dkrZ||tj||

d}d
|vrdS|cSdS)zDetect musl libc location by parsing the Python executable.

    Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
    ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
    r16BNsELFHHI)IIIIHHHIIIIIIII)rrr)QQQIHHHIIQQQQQQ)r)rrmusl)seekrr
errortupleroperator
itemgetterKeyErrorrangeosfsdecoderstrip)ridente_fmtp_fmtp_idxp_get_e_phoffe_phentsizee_phnumip_typep_offsetp_fileszinterpreters               r_parse_ld_musl_from_elfr:s$FF1IIIq%((<ttRaRyE*%%%%tFF6?5!!1%%%,
21

(ue#U+tt4B1e4L4L17Aq![''<tt
7Q;

	wq()))	).~a/G/G)H)H&FHhh|			444	Q;;	xk!&&"2"23399$??$$444sB(;;B((
B65B6:CC&%C&D77E
Ec$eZdZUeed<eed<dS)_MuslVersionmajorminorN)__name__
__module____qualname__int__annotations__rrr<r<Gs"JJJJJJJJrr<outputcdd|DD}t|dks|ddddkrdStjd|d}|sdSt	t|dt|d	S)
Ncg|]}||SrDrD.0ns  r
z'_parse_musl_version..MsFFF1AFQFFFrc3>K|]}|VdSr)r+rHs  r	z&_parse_musl_version..Ms*@@q@@@@@@rrrrr!zVersion (\d+)\.(\d+)r)r=r>)
splitlineslenrematchr<rBgroup)rElinesms   r_parse_musl_versionrULsFF@@F,=,=,?,?@@@FFFE
5zzA~~q"1"//t
(%(33Atc!''!**ooS__EEEEr
executablecltj5}	|t|d}n#t$rYddddSwxYwt|}dddn#1swxYwY|sdSt
j|gtjd}t|j
S)a`Detect currently-running musl runtime version.

    This is done by checking the specified executable's dynamic linking
    information, and invoking the loader to parse its output for a version
    string. If the loader is musl, the output would be something like::

        musl libc (x86_64)
        Version 1.2.2
        Dynamic Program Loader
    rbNT)stderruniversal_newlines)
contextlib	ExitStack
enter_contextopenOSErrorr:
subprocessrunPIPErUrY)rVstackrldprocs     r_get_musl_versionrfVs
			(5	##DT$:$:;;AA				((((((((	
$Q
'
'(((((((((((((((t>2$z4PPPDt{+++s1A1#:A1
AA1AA11A58A5archc#Kttj}|dSt|jddD]}d|jd|d|VdS)aTGenerate musllinux tags compatible to the current platform.

    :param arch: Should be the part of platform tag after the ``linux_``
        prefix, e.g. ``x86_64``. The ``linux_`` prefix is assumed as a
        prerequisite for the current platform to be musllinux-compatible.

    :returns: An iterator of compatible musllinux tags.
    N
musllinux_r1)rfsysrVr(r>r=)rgsys_muslr>s   r
platform_tagsrmnsr!00Hx~r2..;;:8>::E::D::::::;;r__main__zlinux-z	not linuxzplat:zmusl:ztags: )endz[.-]r1-rriz
      )#__doc__r[	functoolsr%r)rPr
r`rktypingrrrrrbytesstrrBrr:r<rU	lru_cacherfrmr?	sysconfigget_platformplat
startswithprintrVsubsplittrDrrrs								







<<<<<<<<<<<<<<FFFF,#,(<*@,,,,.
;
;

;
;
;
; z!9!##D??8$$11k111	E'4	E'$$S^44555	E's
]626'3

30B0B20FGG
H
H!!
aZ     !!rPK|5Z866SLib/site-packages/pkg_resources/_vendor/packaging/__pycache__/utils.cpython-311.pycnuW+A

^;dh	ddlZddlmZmZmZmZmZddlmZm	Z	ddl
mZmZeedee
effZedeZGdd	eZGd
deZejdZejd
ZdedefdZdeeefdefdZdedeeeeeeffdZdedeeeffdZdS)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
tE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/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..4466E&&&rversionc
t|tr#	t|}n#t$r|cYSwxYw|}g}|jdkr||jd|t
jdddd|j	D|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!z(\.0)+$.c34K|]}t|VdSNstr.0xs  r	z'canonicalize_version..<s(0P0PAQ0P0P0P0P0P0PrNc34K|]}t|VdSr*r+r-s  rr0z'canonicalize_version..@s(88SVV888888rz.postz.dev+)
isinstancer,rrepochappendrer joinreleaseprepostdevlocal)r$parsedpartss   rcanonicalize_versionr?&s
'3	W%%FF			NNN	E|q
'''(((
LL
B0P0P0P0P0P(P(PQQRRRz
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: rrDzInvalid build number: z in ''r
)endswithrcountsplitr6matchUNICODEr#r_build_tag_regexrBuildTagintgroupr
)
r@dashesr>	name_partrr$
build_partbuild_matchbuildtagss
          rparse_wheel_filenamerXQsV$$
"L(LL

	
}H
^^C
 
 F
V"IxII

	

NN3
++EaIyBH^Y
KKS"#FH#F#FGGGY''DeAhG
{{1X
&,,Z88&EEE(EEE
XK$5$5a$8$8 9 9;;L;LQ;O;OPQQU2YD'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: )rIlenr
rpartitionr#r)r@	file_stemrSsepversion_partrr$s       rparse_sdist_filenamer_us##
.I./					6	"	"
^F|^,		"




	
$-#7#7#<#< IsLJ"#Hh#H#HIIIY''Dl##G'?r)r6typingrrrrrrWr	r
r$rrrPr,rOr
ValueErrorrrcompilerrNr#r?rXr_r
rrrcs

			99999999999999        ,,,,,,,,rE#s(O+,)3//::!bj++2:l++'C'N''''(%"5(#((((V!(!(
>7Hin<=!(!(!(!(H351H+IrPK|5ZUUULib/site-packages/pkg_resources/_vendor/packaging/__pycache__/version.cpython-311.pycnuW+A

^;dI9ddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
mZmZmZgdZeeefZeee
eeffZeeeefZeee
eee
eefe
eeffdffZe
ee
edfeeeefZe
ee
edffZeeeefeeefgefZejdgdZd	ed
edfdZGd
deZ GddZ!Gdde!Z"ej#dej$Z%ddddddZ&ded
eefdZ'd	ed
efdZ(dZ)Gdde!Z*dedeee+e	fd
ee
eeffd Z,ej#d!Z-d"ed
eefd#Z.d$ed%e
edfd&ee
eefd'ee
eefd(ee
eefd"ee
ed
efd)Z/dS)*N)CallableIteratorListOptionalSupportsIntTupleUnion)InfinityInfinityTypeNegativeInfinityNegativeInfinityType)parseVersion
LegacyVersionInvalidVersionVERSION_PATTERN._Version)epochreleasedevprepostlocalversionreturn)rrc`	t|S#t$rt|cYSwxYw)z
    Parse the given version string and return either a :class:`Version` object
    or a :class:`LegacyVersion` object depending on if the given version is
    a valid PEP 440 version or a legacy version.
    )rrr)rs vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/packaging/version.pyrr*sD&w&&&W%%%%%&s--ceZdZdZdS)rzF
    An invalid version was found, users should refer to PEP 440.
    N)__name__
__module____qualname____doc__rrr6sr%rceZdZUeeefed<defdZddde	fdZ
ddde	fdZdede	fdZ
ddde	fdZddde	fd	Zdede	fd
ZdS)_BaseVersion_keyrc*t|jSN)hashr(selfs r__hash__z_BaseVersion.__hash__?sDIr%othercZt|tstS|j|jkSr*
isinstancer'NotImplementedr(r-r/s  r__lt__z_BaseVersion.__lt__E)%..	"!!y5:%%r%cZt|tstS|j|jkSr*r1r4s  r__le__z_BaseVersion.__le__K)%..	"!!yEJ&&r%cZt|tstS|j|jkSr*r1r4s  r__eq__z_BaseVersion.__eq__Qr9r%cZt|tstS|j|jkSr*r1r4s  r__ge__z_BaseVersion.__ge__Wr9r%cZt|tstS|j|jkSr*r1r4s  r__gt__z_BaseVersion.__gt__]r6r%cZt|tstS|j|jkSr*r1r4s  r__ne__z_BaseVersion.__ne__cr9r%N)r r!r"r	CmpKeyLegacyCmpKey__annotations__intr.boolr5r8objectr;r=r?rAr$r%rr'r'<s
$
%%%%#&N&t&&&&'N't'''''F't'''''N't''''&N&t&&&&'F't''''''r%r'cVeZdZdeddfdZdefdZdefdZedefdZedefdZ	ede
fd	Zedd
ZeddZ
eddZedd
ZeddZedefdZedefdZedefdZdS)rrrNct||_t|j|_t	jdtdS)NzZCreating a LegacyVersion has been deprecated and will be removed in the next major release)str_version_legacy_cmpkeyr(warningswarnDeprecationWarning)r-rs  r__init__zLegacyVersion.__init__ksFG
"4=11	

0	
	
	
	
	
r%c|jSr*rKr,s r__str__zLegacyVersion.__str__us
}r%cd|dS)Nzr$r,s r__repr__zLegacyVersion.__repr__xs+$++++r%c|jSr*rRr,s rpubliczLegacyVersion.public{
}r%c|jSr*rRr,s rbase_versionzLegacyVersion.base_versionrYr%cdS)Nr$r,s rrzLegacyVersion.epochsrr%cdSr*r$r,s rrzLegacyVersion.releasetr%cdSr*r$r,s rrzLegacyVersion.prer_r%cdSr*r$r,s rrzLegacyVersion.postr_r%cdSr*r$r,s rrzLegacyVersion.devr_r%cdSr*r$r,s rrzLegacyVersion.localr_r%cdSNFr$r,s r
is_prereleasezLegacyVersion.is_prereleaseur%cdSrer$r,s ris_postreleasezLegacyVersion.is_postreleasergr%cdSrer$r,s r
is_devreleasezLegacyVersion.is_devreleasergr%)rN)r r!r"rJrPrSrVpropertyrXr[rErrrrrrrFrfrirkr$r%rrrjs





,#,,,,XcXsXXXXXXtXXtXr%rz(\d+ | [a-z]+ | \.| -)czfinal-@)rpreview-rcrsc#Kt|D]Q}t||}|r|dkr&|dddvr|dVJd|zVRdVdS)N.r

0123456789**final)_legacy_version_component_resplit_legacy_version_replacement_mapgetzfill)rrparts  r_parse_version_partsrs,22155

.224>>	ts{{8|##**Q--*NNNNNr%cd}g}t|D]}|drf|dkr0|r.|ddkr"||r|ddk"|r.|ddkr"||r|ddk"|||t|fS)Nr]rwrxz*final-00000000)rlower
startswithpopappendtuple)rrpartsr~s    rrLrLs
EE$W]]__55??3	h b	Y 6 6IIKKK b	Y 6 6
E"I33		
E"I33	T%,,r%a
    v?
    (?:
        (?:(?P[0-9]+)!)?                           # epoch
        (?P[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P
                                          # pre-release
            [-_\.]?
            (?P(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P[0-9]+)?
        )?
        (?P                                         # post release
            (?:-(?P[0-9]+))
            |
            (?:
                [-_\.]?
                (?Ppost|rev|r)
                [-_\.]?
                (?P[0-9]+)?
            )
        )?
        (?P                                          # dev release
            [-_\.]?
            (?Pdev)
            [-_\.]?
            (?P[0-9]+)?
        )?
    )
    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
cVeZdZejdezdzejejzZde	ddfdZ
de	fdZde	fdZe
defd	Ze
deed
ffdZe
deee	effdZe
deefd
Ze
deefdZe
dee	fdZe
de	fdZe
de	fdZe
defdZe
defdZe
defdZe
defdZe
defdZe
defdZdS)rz^\s*z\s*$rrNc|j|}|std|dt|dr"t|dndt
d|ddDt|d|d	t|d
|dp|dt|d
|dt|d|_
t|j
j|j
j
|j
j|j
j|j
j|j
j|_dS)NzInvalid version: ''rrc34K|]}t|VdSr*)rE.0is  r	z#Version.__init__..s(LLQ#a&&LLLLLLr%rrtpre_lpre_npost_lpost_n1post_n2dev_ldev_nr)rrrrrr)_regexsearchrrgrouprErrz_parse_letter_version_parse_local_versionrK_cmpkeyrrrrrrr()r-rmatchs   rrPzVersion.__init__s""7++	B !@g!@!@!@AAA!/4{{7/C/CJ#ekk'**+++LL%++i*@*@*F*Fs*K*KLLLLL%ekk'&:&:EKK.-(;;c!ff;;;;;;r%c34K|]}t|VdSr*rrs  rrz"Version.__str__..1s( : :AQ : : : : : :r%z.postz.dev+)rrjoinrrrrrr-rs  rrSzVersion.__str__%s :??LLDJ)))***	SXX;;dl;;;;;<<<8LL : : : : :::;;;9 LL,,,---8LL***+++:!LL)TZ))***wwu~~r%c|jj}|Sr*)rKr)r-_epochs  rrz
Version.epochAsm)
r%.c|jj}|Sr*)rKr)r-_releases  rrzVersion.releaseFs$(M$9r%c|jj}|Sr*)rKr)r-_pres  rrzVersion.preKs*.-*;r%cB|jjr|jjdndSNr
)rKrr,s rrzVersion.postPs!(,
(:Dt}!!$$Dr%cB|jjr|jjdndSr)rKrr,s rrzVersion.devTs!'+}'8Bt} ##dBr%cp|jjr)dd|jjDSdS)Nrtc34K|]}t|VdSr*rrs  rrz Version.local..[s(@@qCFF@@@@@@r%)rKrrr,s rrz
Version.localXs:=	88@@DM,?@@@@@@4r%cTt|dddS)Nrr
r)rJrzr,s rrXzVersion.public_s!4yysA&&q))r%cg}|jdkr||jd|dd|jDd|S)Nrrrtc34K|]}t|VdSr*rrs  rrz'Version.base_version..lrr%r)rrrrrs  rr[zVersion.base_versioncsr:??LLDJ)))***	SXX;;dl;;;;;<<<wwu~~r%c&|jdup|jduSr*)rrr,s rrfzVersion.is_prereleasepsxt#;txt';;r%c|jduSr*)rr,s rrizVersion.is_postreleasetsy$$r%c|jduSr*)rr,s rrkzVersion.is_devreleasexsxt##r%cPt|jdkr
|jdndS)Nr
rlenrr,s rmajorz
Version.major|&"%dl"3"3q"8"8t|Aa?r%cPt|jdkr
|jdndS)Nr
rrr,s rminorz
Version.minorrr%cPt|jdkr
|jdndS)Nrrrr,s rmicroz
Version.microrr%) r r!r"recompilerVERBOSE
IGNORECASErrJrPrVrSrlrErrrrrrrrrXr[rFrfrirkrrrr$r%rrrs
RZ/1G;RZ"-=W
X
XF





:&#&&&&8sXsCxXXeCHo.XEhsmEEEXECXc]CCCXCx}X****X*
c


X
F
WFF
v

FF
.
.
.FF
|
#
#Fs6{{""#f#s6{{""4r%z[\._-]rcl|1tdt|DSdS)zR
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    Nc3K|];}|s|nt|V.sU

!%=DJJLLLCII





r%)r_local_version_separatorsrz)rs rrrsM


177>>




	
4r%rrrrrcPttttjdt|}||
|t
}n|t}n|}|t
}n|}|t}	n|}	|t
}
ntd|D}
|||||	|
fS)Nc|dkS)Nrr$)rs rz_cmpkey..s
AFr%c3ZK|]&}t|tr|dfnt|fV'dS)rN)r2rEr
rs  rrz_cmpkey..sP

IJz!S))DQGG0@!/D





r%)rreversedlist	itertools	dropwhiler
r)rrrrrrrr_post_dev_locals           rrrsi)*:*:HWrs*
				PPPPPPPPPPPPPPPPPPWWWWWWWWWWWW
T
T
Tl$889
}eCHo56]C,-	
,#$&45
7	

		


	
sCx...)S
S%S/)*"
6< %(<"=>D";!CCC
	&3	&5!;<	&	&	&	&Z+'+'+'+'+'+'+'+'\;;;;;L;;;| *rz*CRZPP	

##CHSM"CL:@E@E@E@E@E@lE@E@E@P!!sE;67!
eCHo!!!!H'BJy11		(;				<6<6
38_<6
%S/	"<65c?
#	<6

%S/	"<6E,'(
<6<6<6<6<6<6<6r%PK|5ZVVXLib/site-packages/pkg_resources/_vendor/packaging/__pycache__/specifiers.cpython-311.pycnuW+A

^;du	nddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZddlmZddlmZmZmZeeefZeeeefZedeZeeegefZGdd	eZGd
dejZ Gd
de Z!Gdde!Z"dedeegefdedeegeffdZ#Gdde!Z$ej%dZ&dede
efdZ'dedefdZ(de
ede
edee
ee
effdZ)Gdde Z*dS) N)CallableDictIterableIteratorListOptionalPatternSetTupleTypeVarUnion)canonicalize_version)
LegacyVersionVersionparseVersionTypeVar)boundceZdZdZdS)InvalidSpecifierzH
    An invalid specifier was found, users should refer to PEP 440.
    N)__name__
__module____qualname____doc__yE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/packaging/specifiers.pyrr!srrc	reZdZejdefdZejdefdZejde	de
fdZejde
e
fdZejde
ddfd	Zejdd
ede
e
de
fdZej	dd
eede
e
deefdZdS)
BaseSpecifierreturncdS)z
        Returns the str representation of this Specifier like object. This
        should be representative of the Specifier itself.
        Nrselfs r__str__zBaseSpecifier.__str__(rcdS)zF
        Returns a hash value for this Specifier like object.
        Nrr"s r__hash__zBaseSpecifier.__hash__/r%rothercdS)zq
        Returns a boolean representing whether or not the two Specifier like
        objects are equal.
        Nrr#r(s  r__eq__zBaseSpecifier.__eq__5r%rcdS)zg
        Returns whether or not pre-releases as a whole are allowed by this
        specifier.
        Nrr"s rprereleaseszBaseSpecifier.prereleases<r%rvalueNcdS)zd
        Sets whether or not pre-releases as a whole are allowed by this
        specifier.
        Nrr#r.s  rr-zBaseSpecifier.prereleasesCr%ritemr-cdS)zR
        Determines if the given item is contained within this specifier.
        Nrr#r1r-s   rcontainszBaseSpecifier.containsJr%riterablecdS)z
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        Nr)r#r5r-s   rfilterzBaseSpecifier.filterPr%rN)rrrabcabstractmethodstrr$intr'objectboolr+abstractpropertyrr-setterr4rrr7rrrrr's	#
	Ft	Xd^$	Sx~
	PT 0?G~	.	!rr)	metaclassceZdZUiZeeefed<eeed<ddedee	ddfdZ
defd	Zdefd
Ze
deeeffdZdefdZd
ede	fdZdedefdZdedefdZe
defdZe
defdZe
dee	fdZejde	ddfdZdede	fdZ	ddedee	de	fdZ	ddee dee	dee fdZ!dS)_IndividualSpecifier
_operators_regexNspecr-r c|j|}|std|d|d|df|_||_dS)NzInvalid specifier: ''operatorversion)rEsearchrgroupstrip_spec_prereleases)r#rGr-matchs    r__init__z_IndividualSpecifier.__init___s""4((	C"#A$#A#A#ABBB
KK
##))++KK	""((**'

(rcl|j
d|jnd}d|jjdt	||dS)N, prereleases=rF<()>)rPr-	__class__rr;r#pres  r__repr__z_IndividualSpecifier.__repr__lsT ,
2T-111	B4>*AASYYA#AAAArc dj|jS)Nz{}{})formatrOr"s rr$z_IndividualSpecifier.__str__usv}dj))rcP|jdt|jdfS)Nrr)rOrr"s r_canonical_specz$_IndividualSpecifier._canonical_specxs"z!}24:a=AAAArc*t|jSr8)hashr_r"s rr'z_IndividualSpecifier.__hash__|sD()))rr(ct|tr;	|t|}n3#t$r
tcYSwxYwt||jstS|j|jkSr8)
isinstancer;rXrNotImplementedr_r*s  rr+z_IndividualSpecifier.__eq__seS!!	"
&s5zz22#
&
&
&%%%%
&E4>22	"!!#u'<<rRr[r$propertyrr_r<r'r=r+CallableOperatorrjUnparsedVersion
ParsedVersionrmrJrKr-r@ryr4rrr7rrrrCrCZs!#JS#X###CL((S(HTN(d((((B#BBBB*****BsCxBBBXB*#****	=F	=t	=	=	=	=!!(8!!!!=
#XX!Xd^!!!X!""$""""######DH@@#@2:4.@	
@@@@0QU!! 0!?G~!	.	!!!!!!!rrCc eZdZdZejdezdzejejzZdddddd	d
Z	dd
e
deeddffd
Z
dedefdZded
e
defdZded
e
defdZded
e
defdZded
e
defdZded
e
defdZded
e
defdZxZS)LegacySpecifiera
        (?P(==|!=|<=|>=|<|>))
        \s*
        (?P
            [^,;\s)]* # Since this is a "legacy" specifier, and the version
                      # string can be just about anything, we match everything
                      # except for whitespace, a semi-colon for marker support,
                      # a closing paren since versions can be enclosed in
                      # them, and a comma since it's a version separator.
        )
        ^\s*\s*$equal	not_equalless_than_equalgreater_than_equal	less_thangreater_than)==!=<=>=rU>rFNrGr-r ct||tjdtdS)NzZCreating a LegacyVersion has been deprecated and will be removed in the next major release)superrRwarningswarnDeprecationWarning)r#rGr-rXs   rrRzLegacySpecifier.__init__sC
{+++

0	
	
	
	
	
rrKcht|tstt|}|Sr8)rcrr;rls  rrmzLegacySpecifier._coerce_versions,'=11	2#CLL11Grprospectivec4|||kSr8rmr#rrGs   r_compare_equalzLegacySpecifier._compare_equal
d2248888rc4|||kSr8rrs   r_compare_not_equalz"LegacySpecifier._compare_not_equal
rrc4|||kSr8rrs   r_compare_less_than_equalz(LegacySpecifier._compare_less_than_equalrrc4|||kSr8rrs   r_compare_greater_than_equalz+LegacySpecifier._compare_greater_than_equalsd2248888rc4|||kSr8rrs   r_compare_less_thanz"LegacySpecifier._compare_less_thanT11$7777rc4|||kSr8rrs   r_compare_greater_thanz%LegacySpecifier._compare_greater_thanrrr)rrr
_regex_strrecompileVERBOSE
IGNORECASErErDr;rr>rRrrrmrrrrrr
__classcell__)rXs@rrrs
JRZ*,w6
R]8R
S
SF"


J

S
HTN
d





=
9-9s9t99999m939499999M99QU99999(9039	
9999
8m8384888888c8d88888888rrfn	Specifierr c	vtjdddtdtdtffd}|S)Nr#rrrGr cLt|tsdS|||Sr|)rcr)r#rrGrs   rwrappedz)_require_version_compare..wrapped"s.+w//	5r$T***r)	functoolswrapsrr;r>)rrs` r_require_version_comparers[_R+k+
+S+T++++++
Nrc	eZdZdZejdezdzejejzZdddddd	d
ddZ	e
d
edede
fdZe
d
edede
fdZe
d
edede
fdZe
d
edede
fdZe
d
edede
fdZe
d
edede
fdZe
d
edede
fdZd
edede
fdZede
fdZejde
ddfdZdS)ra
        (?P(~=|==|!=|<=|>=|<|>|===))
        (?P
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s]*    # We just match everything, except for whitespace
                          # since we are only testing for strict identity.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?

                # You cannot use a wild card and a dev or local version
                # together so group them with a | and make them optional.
                (?:
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                    |
                    \.\*  # Wild card syntax of .*
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?rrrrrrrrrrr-r@rrrrr+sm[JzRZ*,w6
R]8R
S
SF"

		J
}
C
D



*%/-%/s%/t%/%/%/%/N:m:3:4::::=g=S=T====TX0""$""""""rz^([0-9]+)((?:a|b|c|rc)[0-9]+)$rKcg}|dD][}t|}|r(||F||\|S)Nr)split
_prefix_regexrLextendgroupsr)rKresultr1rQs    rrrIstF

c""  $$T**	 MM%,,..))))MM$Mrsegmentc<tfddDS)Nc3BK|]}|VdSr8)
startswith).0rrs  r	z!_is_not_suffix..UsB'-6""r)devabrcpost)any)rs`rrrTs@1PrleftrightcRgg}}|ttjd||ttjd|||t	|dd||t	|dd|ddgt
dt	|dt	|dz
z|ddgt
dt	|dt	|dz
zttj|ttj|fS)Nc*|Sr8isdigitxs rz_pad_version..^src*|Sr8rrs rrz_pad_version.._s!))++rrr0)rrrrrinsertmaxchain)rr
left_splitright_splits    rrrZsr "Jd9./D/DdKKLLMMMtI/0E0EuMMNNOOOd3z!}--//0111uSQ00223444a#QKN(;(;c*Q->P>P(P!Q!QQRRRq3%#aZ]););c+a.>Q>Q)Q"R"RRSSS*-..Y_k5R0S0STTrcleZdZ	ddedeeddfdZdefdZdefdZde	fd	Z
d
edefddfdZd
e
defdZde	fd
ZdeefdZedeefdZejdeddfdZdedefdZ	ddedeedefdZ	ddeedeedeefdZdS)SpecifierSetrFN
specifiersr-r cJd|dD}t}|D]W}	|t|&#t$r%|t|YTwxYwt
||_||_dS)Nc^g|]*}||+Sr)rNrss  r
z)SpecifierSet.__init__..ss-RRR!		RAGGIIRRRr,)	rsetaddrrr	frozenset_specsrP)r#rr-split_specifiersparsed	specifiers      rrRzSpecifierSet.__init__msSRz/?/?/D/DRRR-0EE)	7	7I
7

9Y//0000#
7
7
7

?95566666
7 ''(s"A,BBcR|j
d|jnd}dt||dS)NrTrFz.s(;;!s1vv;;;;;;r)rsortedrr"s rr$zSpecifierSet.__str__s-xx;;t{;;;;;<<.s$66Q1=666666r)rPrrr"s rr-zSpecifierSet.prereleasessH
($$
{	466$+666666rr.c||_dSr8rsr0s  rr-zSpecifierSet.prereleasesrurr1c,||Sr8rwrxs  rryzSpecifierSet.__contains__rzrctttfst|js	jrdSt
fd|jDS)NFc3FK|]}|VdS)r0Nrw)rrr1r-s  rrz(SpecifierSet.contains..s3RR1::d:<<RRRRRRr)rcrrrr-r}allrr3s ``rr4zSpecifierSet.containss{
$ 899	;;D
*K	t1	5RRRRRdkRRRRRRrr5c||j}|jr0|jD]&}||t|}'|Sg}g}|D]|}t	|t
tfst|}n|}t	|t
rF|jr|s|s|	|g|	|}|s|r||S|S)Nr0)
r-rr7r>rcrrrr}r)r#r5r-rGfilteredrr1rs        rr7zSpecifierSet.filters*K
;&	
P
P;;xT+=N=N;OOO
.0H68
!
*
*!$(@AA*%*4[[NN%)Nnm<<"/**#7)00666OOD))))
) 1
)k6I((Orrr8)rrrr;rr>rRr[r$r<r'r
r'r=r+r*rrCr-rr-r@rryr4rrr7rrrrrls0BF(((19$(	
((((05#5555=====!#!!!!U>3#67N.+F+t++++     !(#78!!!!7Xd^777X7"""$""""##T####DHSS#S2:4.S	
SSSS<QU33 03?G~3	.	!333333rr)+r9rrrrtypingrrrrrrr	r
rrr
utilsrrKrrrrr;rrr>rr&rABCMetarrCrrrrrrrrrrrrr;sQ



				('''''2222222222g},-
34)AAA]C0$67z00000ck0000fFFFFF=FFFR9898989898*989898x	+}c2D89	
{M3/56				X"X"X"X"X"$X"X"X"v
<==
CDICDUtCyUcUuT#YS	=Q7RUUUU$vvvvv=vvvvvrPK|5ZBWLib/site-packages/pkg_resources/_vendor/packaging/__pycache__/__about__.cpython-311.pycnuW+A

^;d4gdZdZdZdZdZdZdZdZdezZd	S)
)	__title____summary____uri____version__
__author__	__email____license__
__copyright__	packagingz"Core utilities for Python packagesz!https://github.com/pypa/packagingz21.3z)Donald Stufft and individual contributorszdonald@stufft.iozBSD-2-Clause or Apache-2.0z2014-2019 %sN)	__all__rrrrrrrr	xE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/packaging/__about__.pyrsI
			
	2
-
8
	*+


r
PK|5Znn@@ULib/site-packages/pkg_resources/_vendor/packaging/__pycache__/markers.cpython-311.pycnuW+A

^;d0!	UddlZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
mZmZmZmZmZmZmZmZddlmZmZgdZeeegefZGddeZGd	d
eZ GddeZ!Gd
dZ"Gdde"Z#Gdde"Z$Gdde"Z%ededzedzedzedzedzedzedzedzedzedzed zed!zed"zed#zed$zed%zed&zZ&ddddddd'Z'e&(d(ed)ed*zed+zed,zed-zed.zed/zed0zZ)e)ed1zed2zZ*e*(d3ed4ed5zZ+e+(d6ed7ed8zZ,e&e+zZ-ee-e*ze-zZ.e.(d9ed:/Z0ed;/Z1e
Z2e.ee0e2ze1zzZ3e2e3ee,e2zzzee2zezZ4dZ5	dYd@eeee
e"dAfefdBe	ed=efdCZ6dDdEej7ej8ej9ej:ej;ej<dFZ=eeefe>dG<dHedIe%dJed=efdKZ?GdLdMZ@e@ZAdNeeefdOed=efdPZBdQeedNeeefd=efdRZCdSdTd=efdUZDd=eeeffdVZEGdWdXZFdS)ZN)AnyCallableDictListOptionalTupleUnion)	ForwardGroupLiteralParseExceptionParseResultsQuotedString
ZeroOrMore	stringEndstringStart)InvalidSpecifier	Specifier)
InvalidMarkerUndefinedComparisonUndefinedEnvironmentNameMarkerdefault_environmentceZdZdZdS)rzE
    An invalid marker was found, users should refer to PEP 508.
    N__name__
__module____qualname____doc__vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/packaging/markers.pyrr$r"rceZdZdZdS)rzP
    An invalid operation was attempted on a value that doesn't support it.
    Nrr!r"r#rr*r$r"rceZdZdZdS)rz\
    A name was attempted to be used that does not exist inside of the
    environment.
    Nrr!r"r#rr0sr"rcBeZdZdeddfdZdefdZdefdZdefdZdS)NodevaluereturnNc||_dSN)r))selfr)s  r#__init__z
Node.__init__8s



r"c*t|jSr,)strr)r-s r#__str__zNode.__str__;s4:r"c(d|jjd|dS)N)	__class__rr1s r#__repr__z
Node.__repr__>s 74>*77d7777r"ctr,)NotImplementedErrorr1s r#	serializezNode.serializeAs!!r")	rrrrr.r0r2r7r:r!r"r#r(r(7scd8#8888"3""""""r"r(ceZdZdefdZdS)Variabler*c t|Sr,r0r1s r#r:zVariable.serializeF4yyr"Nrrrr0r:r!r"r#r<r<E/3r"r<ceZdZdefdZdS)Valuer*cd|dS)N"r!r1s r#r:zValue.serializeKs4{{{r"Nr@r!r"r#rCrCJs/3r"rCceZdZdefdZdS)Opr*c t|Sr,r>r1s r#r:zOp.serializePr?r"Nr@r!r"r#rGrGOrAr"rGimplementation_versionplatform_python_implementationimplementation_namepython_full_versionplatform_releaseplatform_versionplatform_machineplatform_systempython_versionsys_platformos_nameos.namesys.platformplatform.versionplatform.machineplatform.python_implementationpython_implementationextra)rTrUrVrWrXrYcjtt|d|dSNr)r<ALIASESgetslts   r#rcps$QqT1Q41H1H(I(Ir"z=====>=<=!=z~=>r4not ininc,t|dSr\)rGr_s   r#rcrcwsAaDr"'rEc,t|dSr\)rCr_s   r#rcrczsE!A$KKr"andorc,t|dSr\)tupler_s   r#rcrcs51;;r"()resultsr*cHt|trd|DS|S)Nc,g|]}t|Sr!)_coerce_parse_result).0is  r#
z(_coerce_parse_result..s!999A$Q''999r")
isinstancer)rts r#rwrws-'<((999999r"Tmarker.firstct|tttfsJt|trJt	|dkr7t|dttfrt|dSt|tr>d|D}|rd|Sdd|zdzSt|trdd|DS|S)Nrrc38K|]}t|dVdS)F)r}N)_format_markerrxms  r#	z!_format_marker..s/@@A///@@@@@@r" rrrsc6g|]}|Sr!)r:rs  r#rzz"_format_marker..s 7771777r")r{listrqr0lenrjoin)r|r}inners   r#rrsftUC011111	64  )KK1vay4-00
fQi(((&$	@@@@@	/88E??"%(3..	FE	"	"xx77777888
r"c
||vSr,r!lhsrhss  r#rcrcs
3#:r"c
||vSr,r!rs  r#rcrcs
s#~r")rjrir4rfrdrgrerh
_operatorsroprc	`	td||g}||S#t$rYnwxYwt
|}|td|d|d|d|||S)Nz
Undefined z on z and .)rrr:containsrrr^r)rrrspecopers     r#_eval_oprs"",,..#!67788}}S!!!



 *~~bllnn==D|!"Mr"M"M"M"MS"M"M"MNNN4S>>s6A

AAceZdZdS)	UndefinedN)rrrr!r"r#rrsDr"renvironmentnamec||t}t|trt	|d|S)Nz* does not exist in evaluation environment.)r^
_undefinedr{rr)rrr)s   r#_get_envrsL#.??4#D#DE%##
&AAA

	
Lr"markerscxgg}|D]}t|tttfsJt|tr*|dt||ft|tr|\}}}t|trt||j}|j}n|j}t||j}|dt||||dvsJ|dkr|gtd|DS)N)rnroroc34K|]}t|VdSr,)all)rxitems  r#rz$_evaluate_markers..s(,,Ts4yy,,,,,,r")r{rrqr0append_evaluate_markersr<rr)rany)	rrgroupsr|rrr	lhs_value	rhs_values	         r#rrs? "tF""&4"455555fd##	"2J/DDEEEE

&
&	"!LCS#x((
=$[#)<<	I		I	$[#)<<	2Jhy"i@@AAAA]****~~

b!!!,,V,,,,,,r"infozsys._version_infocd|}|j}|dkr ||dt|jzz
}|S)Nz{0.major}.{0.minor}.{0.micro}finalr)formatreleaselevelr0serial)rversionkinds   r#format_full_versionrsH-44T::GDw47S----Nr"cttjj}tjj}||t
jt
jt
jt
j	t
jt
j
t
jdt
j
ddtjdS)Nr)rKrIrSrOrMrPrNrLrJrQrR)rsysimplementationrrosplatformmachinereleasesystemrQrYrpython_version_tuple)iverrKs  r#rrss19::D,12"&7$,..$,..#?,,$,..'688*2*H*J*J((8#@#B#B2A2#FGGr"cdeZdZdeddfdZdefdZdefdZd	deeeefde	fdZ
dS)
rr|r*Nc
	tt||_dS#t$r/}td|d||j|jdzd}~wwxYw)NzInvalid marker: z, parse error at )rwMARKERparseString_markersr
rloc)r-r|es   r#r.zMarker.__init__s	01C1CF1K1KLLDMMM			1611!%!%!)+,11
	s,0
A)*A$$A)c*t|jSr,)rrr1s r#r2zMarker.__str__sdm,,,r"cd|dS)Nz	rs
				



DDDDDDDDDDDDDDDDDD





















43333333S#J$%J*z""""""""t
D
Aa())*aaa	
aa
aaa	a	ll
a	llaa
aa())* a  !!"ajj#	*"**&F=
	IIJJJAeHHqqww4 11T77*QQtWW4qqww>3G!!C&&P
!!H++%$/		11222|C  <<#4#4477888	
5AAdGG	

$
eJ*Z78866777	
3			
3		giiEE&;"6"?@@@{ZZ(<=====	{	"Y	.%d3i(?"@T#YNR$s)U49-s23 NormalizedName:
    # This is taken from PEP 503.
    value = _canonicalize_regex.sub("-", name).lower()
    return cast(NormalizedName, value)


def canonicalize_version(version: Union[Version, str]) -> str:
    """
    This is very similar to Version.__str__, but has one subtle difference
    with the way it handles the release segment.
    """
    if isinstance(version, str):
        try:
            parsed = Version(version)
        except InvalidVersion:
            # Legacy versions cannot be normalized
            return version
    else:
        parsed = version

    parts = []

    # Epoch
    if parsed.epoch != 0:
        parts.append(f"{parsed.epoch}!")

    # Release segment
    # NB: This strips trailing '.0's to normalize
    parts.append(re.sub(r"(\.0)+$", "", ".".join(str(x) for x in parsed.release)))

    # Pre-release
    if parsed.pre is not None:
        parts.append("".join(str(x) for x in parsed.pre))

    # Post-release
    if parsed.post is not None:
        parts.append(f".post{parsed.post}")

    # Development release
    if parsed.dev is not None:
        parts.append(f".dev{parsed.dev}")

    # Local version segment
    if parsed.local is not None:
        parts.append(f"+{parsed.local}")

    return "".join(parts)


def parse_wheel_filename(
    filename: str,
) -> Tuple[NormalizedName, Version, BuildTag, FrozenSet[Tag]]:
    if not filename.endswith(".whl"):
        raise InvalidWheelFilename(
            f"Invalid wheel filename (extension must be '.whl'): {filename}"
        )

    filename = filename[:-4]
    dashes = filename.count("-")
    if dashes not in (4, 5):
        raise InvalidWheelFilename(
            f"Invalid wheel filename (wrong number of parts): {filename}"
        )

    parts = filename.split("-", dashes - 2)
    name_part = parts[0]
    # See PEP 427 for the rules on escaping the project name
    if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None:
        raise InvalidWheelFilename(f"Invalid project name: {filename}")
    name = canonicalize_name(name_part)
    version = Version(parts[1])
    if dashes == 5:
        build_part = parts[2]
        build_match = _build_tag_regex.match(build_part)
        if build_match is None:
            raise InvalidWheelFilename(
                f"Invalid build number: {build_part} in '{filename}'"
            )
        build = cast(BuildTag, (int(build_match.group(1)), build_match.group(2)))
    else:
        build = ()
    tags = parse_tag(parts[-1])
    return (name, version, build, tags)


def parse_sdist_filename(filename: str) -> Tuple[NormalizedName, Version]:
    if filename.endswith(".tar.gz"):
        file_stem = filename[: -len(".tar.gz")]
    elif filename.endswith(".zip"):
        file_stem = filename[: -len(".zip")]
    else:
        raise InvalidSdistFilename(
            f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):"
            f" {filename}"
        )

    # We are requiring a PEP 440 version, which cannot contain dashes,
    # so we split on the last dash.
    name_part, sep, version_part = file_stem.rpartition("-")
    if not sep:
        raise InvalidSdistFilename(f"Invalid sdist filename: {filename}")

    name = canonicalize_name(name_part)
    version = Version(version_part)
    return (name, version)
PK|5Z=Lib/site-packages/pkg_resources/_vendor/packaging/__init__.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

from .__about__ import (
    __author__,
    __copyright__,
    __email__,
    __license__,
    __summary__,
    __title__,
    __uri__,
    __version__,
)

__all__ = [
    "__title__",
    "__summary__",
    "__uri__",
    "__version__",
    "__author__",
    "__email__",
    "__license__",
    "__copyright__",
]
PK|5Z0!0!<Lib/site-packages/pkg_resources/_vendor/packaging/markers.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

import operator
import os
import platform
import sys
from typing import Any, Callable, Dict, List, Optional, Tuple, Union

from pkg_resources.extern.pyparsing import (  # noqa: N817
    Forward,
    Group,
    Literal as L,
    ParseException,
    ParseResults,
    QuotedString,
    ZeroOrMore,
    stringEnd,
    stringStart,
)

from .specifiers import InvalidSpecifier, Specifier

__all__ = [
    "InvalidMarker",
    "UndefinedComparison",
    "UndefinedEnvironmentName",
    "Marker",
    "default_environment",
]

Operator = Callable[[str, str], bool]


class InvalidMarker(ValueError):
    """
    An invalid marker was found, users should refer to PEP 508.
    """


class UndefinedComparison(ValueError):
    """
    An invalid operation was attempted on a value that doesn't support it.
    """


class UndefinedEnvironmentName(ValueError):
    """
    A name was attempted to be used that does not exist inside of the
    environment.
    """


class Node:
    def __init__(self, value: Any) -> None:
        self.value = value

    def __str__(self) -> str:
        return str(self.value)

    def __repr__(self) -> str:
        return f"<{self.__class__.__name__}('{self}')>"

    def serialize(self) -> str:
        raise NotImplementedError


class Variable(Node):
    def serialize(self) -> str:
        return str(self)


class Value(Node):
    def serialize(self) -> str:
        return f'"{self}"'


class Op(Node):
    def serialize(self) -> str:
        return str(self)


VARIABLE = (
    L("implementation_version")
    | L("platform_python_implementation")
    | L("implementation_name")
    | L("python_full_version")
    | L("platform_release")
    | L("platform_version")
    | L("platform_machine")
    | L("platform_system")
    | L("python_version")
    | L("sys_platform")
    | L("os_name")
    | L("os.name")  # PEP-345
    | L("sys.platform")  # PEP-345
    | L("platform.version")  # PEP-345
    | L("platform.machine")  # PEP-345
    | L("platform.python_implementation")  # PEP-345
    | L("python_implementation")  # undocumented setuptools legacy
    | L("extra")  # PEP-508
)
ALIASES = {
    "os.name": "os_name",
    "sys.platform": "sys_platform",
    "platform.version": "platform_version",
    "platform.machine": "platform_machine",
    "platform.python_implementation": "platform_python_implementation",
    "python_implementation": "platform_python_implementation",
}
VARIABLE.setParseAction(lambda s, l, t: Variable(ALIASES.get(t[0], t[0])))

VERSION_CMP = (
    L("===") | L("==") | L(">=") | L("<=") | L("!=") | L("~=") | L(">") | L("<")
)

MARKER_OP = VERSION_CMP | L("not in") | L("in")
MARKER_OP.setParseAction(lambda s, l, t: Op(t[0]))

MARKER_VALUE = QuotedString("'") | QuotedString('"')
MARKER_VALUE.setParseAction(lambda s, l, t: Value(t[0]))

BOOLOP = L("and") | L("or")

MARKER_VAR = VARIABLE | MARKER_VALUE

MARKER_ITEM = Group(MARKER_VAR + MARKER_OP + MARKER_VAR)
MARKER_ITEM.setParseAction(lambda s, l, t: tuple(t[0]))

LPAREN = L("(").suppress()
RPAREN = L(")").suppress()

MARKER_EXPR = Forward()
MARKER_ATOM = MARKER_ITEM | Group(LPAREN + MARKER_EXPR + RPAREN)
MARKER_EXPR << MARKER_ATOM + ZeroOrMore(BOOLOP + MARKER_EXPR)

MARKER = stringStart + MARKER_EXPR + stringEnd


def _coerce_parse_result(results: Union[ParseResults, List[Any]]) -> List[Any]:
    if isinstance(results, ParseResults):
        return [_coerce_parse_result(i) for i in results]
    else:
        return results


def _format_marker(
    marker: Union[List[str], Tuple[Node, ...], str], first: Optional[bool] = True
) -> str:

    assert isinstance(marker, (list, tuple, str))

    # Sometimes we have a structure like [[...]] which is a single item list
    # where the single item is itself it's own list. In that case we want skip
    # the rest of this function so that we don't get extraneous () on the
    # outside.
    if (
        isinstance(marker, list)
        and len(marker) == 1
        and isinstance(marker[0], (list, tuple))
    ):
        return _format_marker(marker[0])

    if isinstance(marker, list):
        inner = (_format_marker(m, first=False) for m in marker)
        if first:
            return " ".join(inner)
        else:
            return "(" + " ".join(inner) + ")"
    elif isinstance(marker, tuple):
        return " ".join([m.serialize() for m in marker])
    else:
        return marker


_operators: Dict[str, Operator] = {
    "in": lambda lhs, rhs: lhs in rhs,
    "not in": lambda lhs, rhs: lhs not in rhs,
    "<": operator.lt,
    "<=": operator.le,
    "==": operator.eq,
    "!=": operator.ne,
    ">=": operator.ge,
    ">": operator.gt,
}


def _eval_op(lhs: str, op: Op, rhs: str) -> bool:
    try:
        spec = Specifier("".join([op.serialize(), rhs]))
    except InvalidSpecifier:
        pass
    else:
        return spec.contains(lhs)

    oper: Optional[Operator] = _operators.get(op.serialize())
    if oper is None:
        raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.")

    return oper(lhs, rhs)


class Undefined:
    pass


_undefined = Undefined()


def _get_env(environment: Dict[str, str], name: str) -> str:
    value: Union[str, Undefined] = environment.get(name, _undefined)

    if isinstance(value, Undefined):
        raise UndefinedEnvironmentName(
            f"{name!r} does not exist in evaluation environment."
        )

    return value


def _evaluate_markers(markers: List[Any], environment: Dict[str, str]) -> bool:
    groups: List[List[bool]] = [[]]

    for marker in markers:
        assert isinstance(marker, (list, tuple, str))

        if isinstance(marker, list):
            groups[-1].append(_evaluate_markers(marker, environment))
        elif isinstance(marker, tuple):
            lhs, op, rhs = marker

            if isinstance(lhs, Variable):
                lhs_value = _get_env(environment, lhs.value)
                rhs_value = rhs.value
            else:
                lhs_value = lhs.value
                rhs_value = _get_env(environment, rhs.value)

            groups[-1].append(_eval_op(lhs_value, op, rhs_value))
        else:
            assert marker in ["and", "or"]
            if marker == "or":
                groups.append([])

    return any(all(item) for item in groups)


def format_full_version(info: "sys._version_info") -> str:
    version = "{0.major}.{0.minor}.{0.micro}".format(info)
    kind = info.releaselevel
    if kind != "final":
        version += kind[0] + str(info.serial)
    return version


def default_environment() -> Dict[str, str]:
    iver = format_full_version(sys.implementation.version)
    implementation_name = sys.implementation.name
    return {
        "implementation_name": implementation_name,
        "implementation_version": iver,
        "os_name": os.name,
        "platform_machine": platform.machine(),
        "platform_release": platform.release(),
        "platform_system": platform.system(),
        "platform_version": platform.version(),
        "python_full_version": platform.python_version(),
        "platform_python_implementation": platform.python_implementation(),
        "python_version": ".".join(platform.python_version_tuple()[:2]),
        "sys_platform": sys.platform,
    }


class Marker:
    def __init__(self, marker: str) -> None:
        try:
            self._markers = _coerce_parse_result(MARKER.parseString(marker))
        except ParseException as e:
            raise InvalidMarker(
                f"Invalid marker: {marker!r}, parse error at "
                f"{marker[e.loc : e.loc + 8]!r}"
            )

    def __str__(self) -> str:
        return _format_marker(self._markers)

    def __repr__(self) -> str:
        return f""

    def evaluate(self, environment: Optional[Dict[str, str]] = None) -> bool:
        """Evaluate a marker.

        Return the boolean from evaluating the given marker against the
        environment. environment is an optional argument to override all or
        part of the determined environment.

        The environment is determined from the current Python process.
        """
        current_environment = default_environment()
        if environment is not None:
            current_environment.update(environment)

        return _evaluate_markers(self._markers, current_environment)
PK|5ZFc>Lib/site-packages/pkg_resources/_vendor/packaging/__about__.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

__all__ = [
    "__title__",
    "__summary__",
    "__uri__",
    "__version__",
    "__author__",
    "__email__",
    "__license__",
    "__copyright__",
]

__title__ = "packaging"
__summary__ = "Core utilities for Python packages"
__uri__ = "https://github.com/pypa/packaging"

__version__ = "21.3"

__author__ = "Donald Stufft and individual contributors"
__email__ = "donald@stufft.io"

__license__ = "BSD-2-Clause or Apache-2.0"
__copyright__ = "2014-2019 %s" % __author__
PK|5Z0@Lib/site-packages/pkg_resources/_vendor/packaging/_structures.pynuW+A# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.


class InfinityType:
    def __repr__(self) -> str:
        return "Infinity"

    def __hash__(self) -> int:
        return hash(repr(self))

    def __lt__(self, other: object) -> bool:
        return False

    def __le__(self, other: object) -> bool:
        return False

    def __eq__(self, other: object) -> bool:
        return isinstance(other, self.__class__)

    def __gt__(self, other: object) -> bool:
        return True

    def __ge__(self, other: object) -> bool:
        return True

    def __neg__(self: object) -> "NegativeInfinityType":
        return NegativeInfinity


Infinity = InfinityType()


class NegativeInfinityType:
    def __repr__(self) -> str:
        return "-Infinity"

    def __hash__(self) -> int:
        return hash(repr(self))

    def __lt__(self, other: object) -> bool:
        return True

    def __le__(self, other: object) -> bool:
        return True

    def __eq__(self, other: object) -> bool:
        return isinstance(other, self.__class__)

    def __gt__(self, other: object) -> bool:
        return False

    def __ge__(self, other: object) -> bool:
        return False

    def __neg__(self: object) -> InfinityType:
        return Infinity


NegativeInfinity = NegativeInfinityType()
PK|5Za}`}`2Lib/site-packages/pkg_resources/_vendor/appdirs.pynuW+A#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2005-2010 ActiveState Software Inc.
# Copyright (c) 2013 Eddy Petrișor

"""Utilities for determining application-specific dirs.

See  for details and usage.
"""
# Dev Notes:
# - MSDN on where to store app data files:
#   http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120
# - Mac OS X: http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/index.html
# - XDG spec for Un*x: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

__version_info__ = (1, 4, 3)
__version__ = '.'.join(map(str, __version_info__))


import sys
import os

PY3 = sys.version_info[0] == 3

if PY3:
    unicode = str

if sys.platform.startswith('java'):
    import platform
    os_name = platform.java_ver()[3][0]
    if os_name.startswith('Windows'): # "Windows XP", "Windows 7", etc.
        system = 'win32'
    elif os_name.startswith('Mac'): # "Mac OS X", etc.
        system = 'darwin'
    else: # "Linux", "SunOS", "FreeBSD", etc.
        # Setting this to "linux2" is not ideal, but only Windows or Mac
        # are actually checked for and the rest of the module expects
        # *sys.platform* style strings.
        system = 'linux2'
else:
    system = sys.platform



def user_data_dir(appname=None, appauthor=None, version=None, roaming=False):
    r"""Return full path to the user-specific data dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be ".".
            Only applied when appname is present.
        "roaming" (boolean, default False) can be set True to use the Windows
            roaming appdata directory. That means that for users on a Windows
            network setup for roaming profiles, this user data will be
            sync'd on login. See
            
            for a discussion of issues.

    Typical user data directories are:
        Mac OS X:               ~/Library/Application Support/
        Unix:                   ~/.local/share/    # or in $XDG_DATA_HOME, if defined
        Win XP (not roaming):   C:\Documents and Settings\\Application Data\\
        Win XP (roaming):       C:\Documents and Settings\\Local Settings\Application Data\\
        Win 7  (not roaming):   C:\Users\\AppData\Local\\
        Win 7  (roaming):       C:\Users\\AppData\Roaming\\

    For Unix, we follow the XDG spec and support $XDG_DATA_HOME.
    That means, by default "~/.local/share/".
    """
    if system == "win32":
        if appauthor is None:
            appauthor = appname
        const = roaming and "CSIDL_APPDATA" or "CSIDL_LOCAL_APPDATA"
        path = os.path.normpath(_get_win_folder(const))
        if appname:
            if appauthor is not False:
                path = os.path.join(path, appauthor, appname)
            else:
                path = os.path.join(path, appname)
    elif system == 'darwin':
        path = os.path.expanduser('~/Library/Application Support/')
        if appname:
            path = os.path.join(path, appname)
    else:
        path = os.getenv('XDG_DATA_HOME', os.path.expanduser("~/.local/share"))
        if appname:
            path = os.path.join(path, appname)
    if appname and version:
        path = os.path.join(path, version)
    return path


def site_data_dir(appname=None, appauthor=None, version=None, multipath=False):
    r"""Return full path to the user-shared data dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be ".".
            Only applied when appname is present.
        "multipath" is an optional parameter only applicable to *nix
            which indicates that the entire list of data dirs should be
            returned. By default, the first item from XDG_DATA_DIRS is
            returned, or '/usr/local/share/',
            if XDG_DATA_DIRS is not set

    Typical site data directories are:
        Mac OS X:   /Library/Application Support/
        Unix:       /usr/local/share/ or /usr/share/
        Win XP:     C:\Documents and Settings\All Users\Application Data\\
        Vista:      (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.)
        Win 7:      C:\ProgramData\\   # Hidden, but writeable on Win 7.

    For Unix, this is using the $XDG_DATA_DIRS[0] default.

    WARNING: Do not use this on Windows. See the Vista-Fail note above for why.
    """
    if system == "win32":
        if appauthor is None:
            appauthor = appname
        path = os.path.normpath(_get_win_folder("CSIDL_COMMON_APPDATA"))
        if appname:
            if appauthor is not False:
                path = os.path.join(path, appauthor, appname)
            else:
                path = os.path.join(path, appname)
    elif system == 'darwin':
        path = os.path.expanduser('/Library/Application Support')
        if appname:
            path = os.path.join(path, appname)
    else:
        # XDG default for $XDG_DATA_DIRS
        # only first, if multipath is False
        path = os.getenv('XDG_DATA_DIRS',
                         os.pathsep.join(['/usr/local/share', '/usr/share']))
        pathlist = [os.path.expanduser(x.rstrip(os.sep)) for x in path.split(os.pathsep)]
        if appname:
            if version:
                appname = os.path.join(appname, version)
            pathlist = [os.sep.join([x, appname]) for x in pathlist]

        if multipath:
            path = os.pathsep.join(pathlist)
        else:
            path = pathlist[0]
        return path

    if appname and version:
        path = os.path.join(path, version)
    return path


def user_config_dir(appname=None, appauthor=None, version=None, roaming=False):
    r"""Return full path to the user-specific config dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be ".".
            Only applied when appname is present.
        "roaming" (boolean, default False) can be set True to use the Windows
            roaming appdata directory. That means that for users on a Windows
            network setup for roaming profiles, this user data will be
            sync'd on login. See
            
            for a discussion of issues.

    Typical user config directories are:
        Mac OS X:               same as user_data_dir
        Unix:                   ~/.config/     # or in $XDG_CONFIG_HOME, if defined
        Win *:                  same as user_data_dir

    For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME.
    That means, by default "~/.config/".
    """
    if system in ["win32", "darwin"]:
        path = user_data_dir(appname, appauthor, None, roaming)
    else:
        path = os.getenv('XDG_CONFIG_HOME', os.path.expanduser("~/.config"))
        if appname:
            path = os.path.join(path, appname)
    if appname and version:
        path = os.path.join(path, version)
    return path


def site_config_dir(appname=None, appauthor=None, version=None, multipath=False):
    r"""Return full path to the user-shared data dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be ".".
            Only applied when appname is present.
        "multipath" is an optional parameter only applicable to *nix
            which indicates that the entire list of config dirs should be
            returned. By default, the first item from XDG_CONFIG_DIRS is
            returned, or '/etc/xdg/', if XDG_CONFIG_DIRS is not set

    Typical site config directories are:
        Mac OS X:   same as site_data_dir
        Unix:       /etc/xdg/ or $XDG_CONFIG_DIRS[i]/ for each value in
                    $XDG_CONFIG_DIRS
        Win *:      same as site_data_dir
        Vista:      (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.)

    For Unix, this is using the $XDG_CONFIG_DIRS[0] default, if multipath=False

    WARNING: Do not use this on Windows. See the Vista-Fail note above for why.
    """
    if system in ["win32", "darwin"]:
        path = site_data_dir(appname, appauthor)
        if appname and version:
            path = os.path.join(path, version)
    else:
        # XDG default for $XDG_CONFIG_DIRS
        # only first, if multipath is False
        path = os.getenv('XDG_CONFIG_DIRS', '/etc/xdg')
        pathlist = [os.path.expanduser(x.rstrip(os.sep)) for x in path.split(os.pathsep)]
        if appname:
            if version:
                appname = os.path.join(appname, version)
            pathlist = [os.sep.join([x, appname]) for x in pathlist]

        if multipath:
            path = os.pathsep.join(pathlist)
        else:
            path = pathlist[0]
    return path


def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True):
    r"""Return full path to the user-specific cache dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be ".".
            Only applied when appname is present.
        "opinion" (boolean) can be False to disable the appending of
            "Cache" to the base app data dir for Windows. See
            discussion below.

    Typical user cache directories are:
        Mac OS X:   ~/Library/Caches/
        Unix:       ~/.cache/ (XDG default)
        Win XP:     C:\Documents and Settings\\Local Settings\Application Data\\\Cache
        Vista:      C:\Users\\AppData\Local\\\Cache

    On Windows the only suggestion in the MSDN docs is that local settings go in
    the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming
    app data dir (the default returned by `user_data_dir` above). Apps typically
    put cache data somewhere *under* the given dir here. Some examples:
        ...\Mozilla\Firefox\Profiles\\Cache
        ...\Acme\SuperApp\Cache\1.0
    OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value.
    This can be disabled with the `opinion=False` option.
    """
    if system == "win32":
        if appauthor is None:
            appauthor = appname
        path = os.path.normpath(_get_win_folder("CSIDL_LOCAL_APPDATA"))
        if appname:
            if appauthor is not False:
                path = os.path.join(path, appauthor, appname)
            else:
                path = os.path.join(path, appname)
            if opinion:
                path = os.path.join(path, "Cache")
    elif system == 'darwin':
        path = os.path.expanduser('~/Library/Caches')
        if appname:
            path = os.path.join(path, appname)
    else:
        path = os.getenv('XDG_CACHE_HOME', os.path.expanduser('~/.cache'))
        if appname:
            path = os.path.join(path, appname)
    if appname and version:
        path = os.path.join(path, version)
    return path


def user_state_dir(appname=None, appauthor=None, version=None, roaming=False):
    r"""Return full path to the user-specific state dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be ".".
            Only applied when appname is present.
        "roaming" (boolean, default False) can be set True to use the Windows
            roaming appdata directory. That means that for users on a Windows
            network setup for roaming profiles, this user data will be
            sync'd on login. See
            
            for a discussion of issues.

    Typical user state directories are:
        Mac OS X:  same as user_data_dir
        Unix:      ~/.local/state/   # or in $XDG_STATE_HOME, if defined
        Win *:     same as user_data_dir

    For Unix, we follow this Debian proposal 
    to extend the XDG spec and support $XDG_STATE_HOME.

    That means, by default "~/.local/state/".
    """
    if system in ["win32", "darwin"]:
        path = user_data_dir(appname, appauthor, None, roaming)
    else:
        path = os.getenv('XDG_STATE_HOME', os.path.expanduser("~/.local/state"))
        if appname:
            path = os.path.join(path, appname)
    if appname and version:
        path = os.path.join(path, version)
    return path


def user_log_dir(appname=None, appauthor=None, version=None, opinion=True):
    r"""Return full path to the user-specific log dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be ".".
            Only applied when appname is present.
        "opinion" (boolean) can be False to disable the appending of
            "Logs" to the base app data dir for Windows, and "log" to the
            base cache dir for Unix. See discussion below.

    Typical user log directories are:
        Mac OS X:   ~/Library/Logs/
        Unix:       ~/.cache//log  # or under $XDG_CACHE_HOME if defined
        Win XP:     C:\Documents and Settings\\Local Settings\Application Data\\\Logs
        Vista:      C:\Users\\AppData\Local\\\Logs

    On Windows the only suggestion in the MSDN docs is that local settings
    go in the `CSIDL_LOCAL_APPDATA` directory. (Note: I'm interested in
    examples of what some windows apps use for a logs dir.)

    OPINION: This function appends "Logs" to the `CSIDL_LOCAL_APPDATA`
    value for Windows and appends "log" to the user cache dir for Unix.
    This can be disabled with the `opinion=False` option.
    """
    if system == "darwin":
        path = os.path.join(
            os.path.expanduser('~/Library/Logs'),
            appname)
    elif system == "win32":
        path = user_data_dir(appname, appauthor, version)
        version = False
        if opinion:
            path = os.path.join(path, "Logs")
    else:
        path = user_cache_dir(appname, appauthor, version)
        version = False
        if opinion:
            path = os.path.join(path, "log")
    if appname and version:
        path = os.path.join(path, version)
    return path


class AppDirs(object):
    """Convenience wrapper for getting application dirs."""
    def __init__(self, appname=None, appauthor=None, version=None,
            roaming=False, multipath=False):
        self.appname = appname
        self.appauthor = appauthor
        self.version = version
        self.roaming = roaming
        self.multipath = multipath

    @property
    def user_data_dir(self):
        return user_data_dir(self.appname, self.appauthor,
                             version=self.version, roaming=self.roaming)

    @property
    def site_data_dir(self):
        return site_data_dir(self.appname, self.appauthor,
                             version=self.version, multipath=self.multipath)

    @property
    def user_config_dir(self):
        return user_config_dir(self.appname, self.appauthor,
                               version=self.version, roaming=self.roaming)

    @property
    def site_config_dir(self):
        return site_config_dir(self.appname, self.appauthor,
                             version=self.version, multipath=self.multipath)

    @property
    def user_cache_dir(self):
        return user_cache_dir(self.appname, self.appauthor,
                              version=self.version)

    @property
    def user_state_dir(self):
        return user_state_dir(self.appname, self.appauthor,
                              version=self.version)

    @property
    def user_log_dir(self):
        return user_log_dir(self.appname, self.appauthor,
                            version=self.version)


#---- internal support stuff

def _get_win_folder_from_registry(csidl_name):
    """This is a fallback technique at best. I'm not sure if using the
    registry for this guarantees us the correct answer for all CSIDL_*
    names.
    """
    if PY3:
      import winreg as _winreg
    else:
      import _winreg

    shell_folder_name = {
        "CSIDL_APPDATA": "AppData",
        "CSIDL_COMMON_APPDATA": "Common AppData",
        "CSIDL_LOCAL_APPDATA": "Local AppData",
    }[csidl_name]

    key = _winreg.OpenKey(
        _winreg.HKEY_CURRENT_USER,
        r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
    )
    dir, type = _winreg.QueryValueEx(key, shell_folder_name)
    return dir


def _get_win_folder_with_pywin32(csidl_name):
    from win32com.shell import shellcon, shell
    dir = shell.SHGetFolderPath(0, getattr(shellcon, csidl_name), 0, 0)
    # Try to make this a unicode path because SHGetFolderPath does
    # not return unicode strings when there is unicode data in the
    # path.
    try:
        dir = unicode(dir)

        # Downgrade to short path name if have highbit chars. See
        # .
        has_high_char = False
        for c in dir:
            if ord(c) > 255:
                has_high_char = True
                break
        if has_high_char:
            try:
                import win32api
                dir = win32api.GetShortPathName(dir)
            except ImportError:
                pass
    except UnicodeError:
        pass
    return dir


def _get_win_folder_with_ctypes(csidl_name):
    import ctypes

    csidl_const = {
        "CSIDL_APPDATA": 26,
        "CSIDL_COMMON_APPDATA": 35,
        "CSIDL_LOCAL_APPDATA": 28,
    }[csidl_name]

    buf = ctypes.create_unicode_buffer(1024)
    ctypes.windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf)

    # Downgrade to short path name if have highbit chars. See
    # .
    has_high_char = False
    for c in buf:
        if ord(c) > 255:
            has_high_char = True
            break
    if has_high_char:
        buf2 = ctypes.create_unicode_buffer(1024)
        if ctypes.windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024):
            buf = buf2

    return buf.value

def _get_win_folder_with_jna(csidl_name):
    import array
    from com.sun import jna
    from com.sun.jna.platform import win32

    buf_size = win32.WinDef.MAX_PATH * 2
    buf = array.zeros('c', buf_size)
    shell = win32.Shell32.INSTANCE
    shell.SHGetFolderPath(None, getattr(win32.ShlObj, csidl_name), None, win32.ShlObj.SHGFP_TYPE_CURRENT, buf)
    dir = jna.Native.toString(buf.tostring()).rstrip("\0")

    # Downgrade to short path name if have highbit chars. See
    # .
    has_high_char = False
    for c in dir:
        if ord(c) > 255:
            has_high_char = True
            break
    if has_high_char:
        buf = array.zeros('c', buf_size)
        kernel = win32.Kernel32.INSTANCE
        if kernel.GetShortPathName(dir, buf, buf_size):
            dir = jna.Native.toString(buf.tostring()).rstrip("\0")

    return dir

if system == "win32":
    try:
        import win32com.shell
        _get_win_folder = _get_win_folder_with_pywin32
    except ImportError:
        try:
            from ctypes import windll
            _get_win_folder = _get_win_folder_with_ctypes
        except ImportError:
            try:
                import com.sun.jna
                _get_win_folder = _get_win_folder_with_jna
            except ImportError:
                _get_win_folder = _get_win_folder_from_registry


#---- self test code

if __name__ == "__main__":
    appname = "MyApp"
    appauthor = "MyCompany"

    props = ("user_data_dir",
             "user_config_dir",
             "user_cache_dir",
             "user_state_dir",
             "user_log_dir",
             "site_data_dir",
             "site_config_dir")

    print("-- app dirs %s --" % __version__)

    print("-- app dirs (with optional 'version')")
    dirs = AppDirs(appname, appauthor, version="1.0")
    for prop in props:
        print("%s: %s" % (prop, getattr(dirs, prop)))

    print("\n-- app dirs (without optional 'version')")
    dirs = AppDirs(appname, appauthor)
    for prop in props:
        print("%s: %s" % (prop, getattr(dirs, prop)))

    print("\n-- app dirs (without optional 'appauthor')")
    dirs = AppDirs(appname)
    for prop in props:
        print("%s: %s" % (prop, getattr(dirs, prop)))

    print("\n-- app dirs (with disabled 'appauthor')")
    dirs = AppDirs(appname, appauthor=False)
    for prop in props:
        print("%s: %s" % (prop, getattr(dirs, prop)))
PK|5Z[zmzm^Lib/site-packages/pkg_resources/_vendor/pyparsing/diagram/__pycache__/__init__.cpython-311.pycnuW+A

^;dt\ddlZddlZddlZddlmZmZmZmZmZmZm	Z	m
Z
ddlmZddl
mZddlZdZeeZeddefdejejfd	efgZ	ed
ZGddejZGd
dejZGddeeZdeedefdZdddefdZ				d-dejdejedede de deefdZ!ded e
ejde fd!Z"Gd"d#Z#Gd$d%Z$dejde fd&Z%d'Z&d e
ejfd(Z'e&						d.dejd)ejed*e$ded	ed+ede de dejefd,Z(dS)/N)List
NamedTupleGenericTypeVarDictCallableSetIterable)Template)StringIOaM


    {% if not head %}
        
    {% else %}
        {{ head | safe }}
    {% endif %}


{{ body | safe }}
{% for diagram in diagrams %}
    

{{ diagram.title }}

{{ diagram.text }}
{{ diagram.svg }}
{% endfor %} NamedDiagramnamediagramindexTc&eZdZdZdZfdZxZS)EachItemz Custom railroad item to compose a: - Group containing a - OneOrMore containing a - Choice of the elements in the Each with the group label indicating that all must be matched z[ALL]ctjt|dz g|R}tj|}t ||jdS)Nitem)label)railroadChoicelen OneOrMoresuper__init__ all_label)selfitems choice_itemone_or_more_item __class__s E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/pyparsing/diagram/__init__.pyrzEachItem.__init__Is^oc%jj1n=u=== #-;??? )@@@@@)__name__ __module__ __qualname____doc__rr __classcell__r$s@r%rr>sRIAAAAAAAAAr&rc(eZdZdZdeffd ZxZS) AnnotatedItemzC Simple subclass of Group that creates an annotation label rc|t||rd|n|dS)Nz[{}]rr)rrformat)r rrr$s r%rzAnnotatedItem.__init__Ts< d%*R&--*>*>*>USSSSSr&)r'r(r)r*strrr+r,s@r%r.r.OsYTcTTTTTTTTTTr&r.ceZdZdZdedefdedefdZe dedefddfd Z e d Z defd Z d S) EditablePartialz Acts like a functools.partial, but can be edited. In other words, it represents a type that hasn't yet been constructed. func.argskwargsc0||_||_||_dSNr5r6r7)r r5r6r7s r%rzEditablePartial.__init__as   r&returnEditablePartial[T]c@t|t||S)z If you call this function in the same way that you would call the constructor, it will store the arguments as you expect. For example EditablePartial.from_call(Fraction, 1, 3)() == Fraction(1, 3) r:)r4list)clsr5r6r7s r% from_callzEditablePartial.from_callfs DtDzz&IIIIr&c|jdS)Nr)r7r s r%rzEditablePartial.namens{6""r&c|j}|j}tj|j}|j|jvr|||jz }|j|i|S)z< Evaluate the partial and return the result )r6copyr7inspectgetfullargspecr5varargspop)r r6r7arg_specs r%__call__zEditablePartial.__call__rs|y~~!!##)$)44  t{ * * FJJx/00 0Dty$)&)))r&N)r'r(r)r*rrr>dictr classmethodr@propertyrrJr&r%r4r4XsXc1f-T4 JXc1f-JCWJJJ[J##X# *! * * * * * *r&r4diagramsr;c $g}|D]y}|j t}|j|j|j}|jdkr|dz }||d|dztj dd|i|S)z Given a list of NamedDiagram, produce a single HTML string that visualises those diagrams :params kwargs: kwargs to be passed in to the template Nrz (root))titletextsvgrOrN) rr writeSvgwriterrappendgetvaluetemplaterender)rOr7datariorRs r%railroad_to_htmlr]s DHH ? "  ZZ  ***  =A   Y E eR FFGGGG ? 3 3D 3F 3 33r&partialr<cPt|trz#resolve_partial..s 444q""444r&c4i|]\}}|t|SrNra)rckeyrds r% z#resolve_partial..s&FFFFC_Q''FFFr&) isinstancer4rbr6r7r>rKr!)r^s r%rbrbs'?++ &w|44 (88wyy GT " "44G4444 GT " "FFgmmooFFFFr&Felementdiagram_kwargsverticalshow_results_names show_groupscbt|pi}t||d|||t|}||vr2|js d||_||||dt |j}t|dkrmt}g} |D]M} | jdkr| j8| j|vr/| | j| | Nd | D} n d |D} t| d S) a Convert a pyparsing element tree into a list of diagrams. This is the recommended entrypoint to diagram creation if you want to access the Railroad tree before it is converted to HTML :param element: base element of the parser being diagrammed :param diagram_kwargs: kwargs to pass to the Diagram() constructor :param vertical: (optional) - int - limit at which number of alternatives should be shown vertically instead of horizontally :param show_results_names - bool to indicate whether results name annotations should be included in the diagram :param show_groups - bool to indicate whether groups should be highlighted with an unlabeled surrounding box )rlN)lookupparentrmrnrorQT)forcerz...c,g|]}t|SrNrarcr^s r%rezto_railroad..s JJJOG,,JJJr&c,g|]}t|SrNrarus r%rezto_railroad..s BBBOG,,BBBr&c|jSr9r)diags r%zto_railroad..sTZr&)rg)ConverterState_to_diagram_elementid customNamermark_for_extractionr>rOvaluesrsetaddrWsorted) rkrlrmrnrorqroot_iddiagsseen deduped_diagsdresolveds r% to_railroadrsf(>+?R @ @ @F- kkG&! &#%F7O w++GV4+HHH '')) * *E 5zzA~~uu  ( (Avv!afD&8&8   $$Q'''JJMJJJCBEBBB ( 7 7 8 8 88r& specificationexprscJ|dStt||kS)zF Returns true if we should return a vertical list of elements NF)r_visible_exprs)rrs r%_should_verticalrs* u>%(())]::r&cteZdZdZ ddejdedededede j ef d Z dd ed d dede fdZ dS) ElementStatez< State recorded for an individual pyparsing Element Nrk convertedrrnumberr parent_indexcv||_||_||_||_||_||_d|_d|_dSNF)rkrrrrrrextractcomplete)r rkrrrrrrs r%rzElementState.__init__sA18 *. *3'- ! 2>" # r&Fel_idstater{rscd|_|js/|r||_n%|jjr|jj|_nd|_|s|jr+t |jr||dSdSdS)a Called when this instance has been seen twice, and thus should eventually be extracted into a sub-diagram :param el_id: id of the element :param state: element/diagram state tracker :param name: name to use for this element's text :param force: If true, force extraction now, regardless of the state of this. Only useful for extracting the root element when we know we're finished TrQN)rrrkr~r_worth_extractingextract_into_diagram)r rrrrss r%rz ElementState.mark_for_extraction s y    (  L3   .T] .'8'F'F .  & &u - - - - - . . . .r&)NNr)r'r(r)r* pyparsing ParserElementr4intr2typingOptionalrboolrrNr&r%rrs-1$$($#$ $  $  $oc*$$$$6TY...!1.9<.LP......r&rceZdZdZddejefdZdede fdZ dede fd Z defd Z defd Z defd Zdefd ZdefdZdS)r{zR Stores some state that persists between recursions into the element tree Nrlcvi|_i|_d|_d|_|pi|_t |_dS)Nrr)_element_diagram_statesrO unnamed_indexrrlrextracted_diagram_names)r rls r%rzConverterState.__init__.s?@B$BD "# $2$8b14$$$r&rgvaluec||j|<dSr9r)r rgrs r% __setitem__zConverterState.__setitem__;s,1$S)))r&r;c|j|Sr9rr rgs r% __getitem__zConverterState.__getitem__>s+C00r&c|j|=dSr9rrs r% __delitem__zConverterState.__delitem__As  ( - - -r&c||jvSr9rrs r% __contains__zConverterState.__contains__Dsd222r&c0|xjdz c_|jS)zT Generate a number used in the name of an otherwise unnamed diagram r)rrBs r%generate_unnamedzConverterState.generate_unnamedGs! a!!r&c0|xjdz c_|jS)z; Generate a number used to index a diagram rrxrBs r%generate_indexzConverterState.generate_indexNs a zr&rc ||}|jrqttj|j}d|jjvr||jjd<n(d|jjvr||jjd|j<|jj tj kr|jjd}n|j}tt|jtjtj |fi|j |j|j|<||=dS)z Used when we encounter the same token twice in the same tree. When this happens, we replace all instances of that token with a terminal, and create a new subdiagram for the token rSrr!)rrrN)rrr4r@r NonTerminalrr7rrr5Groupr DiagramrlrrO)r rpositionretcontents r%rz#ConverterState.extract_into_diagramUs ; ? M!++H,@x}+UUC///14&v..HO222IL&w/0EF   "hn 4 4(/7GG(G.88 #- '-1-@/ 9   e KKKr&r9)r'r(r)r*rrrKrrrrrrrrrrrNr&r%r{r{)s 7 7vt'< 7 7 7 72s2<22221s1|1111.s....33333"#""""#r&r{c\|}td|DS)z Returns true if this element is worth having its own sub-diagram. Simply, if any of its children themselves have children, then its complex enough to extract c3>K|]}|VdSr9)recurse)rcchilds r% z$_worth_extracting..}s*555u}}555555r&)rany)rkchildrens r%rrws0   H 55H555 5 55r&c ddtjdtjtdt dt dt d td td td tjtffd }|S)z decorator to ensure enhancements to a diagram item (such as results name annotations) get applied on return from _to_diagram_element (we do this since there are several returns in _to_diagram_element) NrFrkrrrqrmr name_hintrnror;c  ||||||||}|r@|>|j} | r5| |jrdndz } ttj|| }|S)NrQ*r0) resultsName modalResultsr4r@rr) rkrrrqrmrrrnrorelement_results_namefns r%_innerz0_apply_diagram_item_enhancements.._innersb             #/#*#6 # $g.B(KK$%//N4H0 r&NNrNFF) rrrrr4r{rr2r)rrs` r% _apply_diagram_item_enhancementsrs"&#(!  ( 0       !    )      D Mr&cptjtjtjjffd|DS)NcPg|]"}|j |jt| |#SrN)r~rri)rcenon_diagramming_exprss r%rez"_visible_exprs..sR      !"  2ttj|j| jd}|St |tjr|sdSt+t-d|DdkrCttjd t1t+| }nt3||r(ttjg }nHttjg }n t |tjtjfre|sdSt3||r)ttjdg }nttjg }nt |tj r'|sdSttBg }nTt |tj"r$ttFd d }nt |tj$r$ttFdd }nt |tj%r$ttFdd }nt |tj&rO|r$ttFd d }nZttj&d d }n1t |tj'rHttFtQ|j)d }nt |tj*r(ttj+d }nt |tjr(ttjd }nKt |tj,r(ttj,d }n t |tj&r(ttj&d| }nt |tj-r |jsd}nt+|dkr'ttjg }nit+|dkr*| s(ttj&d | }n,ttj.|j/}|}|dSta|||||1|| <|jr"||  | ||jd}|D]}d|jvr!|jd2|dt|||||||}|3d|jvr ||jd<Xd|jvr||jd|<|dz }wd|jvr|jd|=|rbd|jvrt+|jddksd|jvr2|jd%ttj.| }| |vr d|| _3| |vrm|| j4r`|| j3rS|5| |.s+::qAFAM*::::::r&rrQ)rrepeat)r!NOT)rr LOOKAHEAD LOOKBEHINDrr0)rkrrrrrr!)rrrqrmrrnrorT)6rr~r$r'r}rrirLocatedr|exprrrr4r@rrrrOr7rrrrr2rStackSequenceOr MatchFirstrHorizontalChoiceEachrNotAnyr. FollowedBy PrecededByrTokenConvertertypelowerOptr ZeroOrMoreEmptyTerminal defaultNamerrinsertrrr)rkrrrqrmrrrnrorrrrpropagated_name looked_uprterminalirrs r%r|r|s0 OO  E  H* Hg.?.HD wKKE".    !     Qx*+&*OO&*O*L!!%-'9 +    !! F??u I  ) )%i ) H H H!++H,@y~+VVCJ fo % %"++$6?5+A+H+P,CJ '9=)): 4 s::E::::: ; ;q @ @!++"CE OO,CCh . . I!++HN"+EECC!++H,=R+HHCC GilI,@A B B- 4 He , , Q!++HOQb+IICC!++H,ER+PPCC GY^ , ,& 4''';; GY- . ."'' U'LL GY1 2 2 '' [r'RR GY1 2 2'' \PR'SS GY_ - -  O!++M"+MMCC!++HN"2+NNCC GY5 6 6'' g!7!=!=!?!?b(   GY] + +''(9'CC GY0 1 1''(:'DD GY1 2 2''(;"'EE GY_ - - '' N-A(   GY_ - - g6H  Ua''(9'DD Ua 4''Rt'LL",,X->@STT {!$$&& F5MMu ))%9KLLL A'' cj Jw  & &q$ / / /" 1#     ##%) 6""CJ&&)- 7#A&Q  " " 7#A& A CJ  3sz'':#;#;q#@#@ cj SZ%7%?''(94@@ !%u  6%=0VE]5K##E*** ?!++$6?5+A+H+P,C Jr&)NrjFFr))rrrrrrrrrr r jinja2r r\r rEjinja2_template_sourcerYr2r DiagramItemrr rrrr.r4r]rbrrKrrrrr{rrrr|rNr&r%rs                      : 8* + +z c]Y0D EFRUW  GCLLAAAAAx~AAA"TTTTTHNTTT'*'*'*'*'*gaj'*'*'*T4tL144444& 1 a    $-1$ 7979  $79OD)7979 79  79  , 79797979t ; ;' (?@ ;  ; ; ; ;;.;.;.;.;.;.;.;.|KKKKKKKK\6y6646666)))X (9#:;    ""$HH  $H OO ,H H H  H  HHH __%HHH"!HHHr&PK|5Z-2Ut\t\ELib/site-packages/pkg_resources/_vendor/pyparsing/diagram/__init__.pynuW+Aimport railroad import pyparsing import typing from typing import ( List, NamedTuple, Generic, TypeVar, Dict, Callable, Set, Iterable, ) from jinja2 import Template from io import StringIO import inspect jinja2_template_source = """\ {% if not head %} {% else %} {{ head | safe }} {% endif %} {{ body | safe }} {% for diagram in diagrams %}

{{ diagram.title }}

{{ diagram.text }}
{{ diagram.svg }}
{% endfor %} """ template = Template(jinja2_template_source) # Note: ideally this would be a dataclass, but we're supporting Python 3.5+ so we can't do this yet NamedDiagram = NamedTuple( "NamedDiagram", [("name", str), ("diagram", typing.Optional[railroad.DiagramItem]), ("index", int)], ) """ A simple structure for associating a name with a railroad diagram """ T = TypeVar("T") class EachItem(railroad.Group): """ Custom railroad item to compose a: - Group containing a - OneOrMore containing a - Choice of the elements in the Each with the group label indicating that all must be matched """ all_label = "[ALL]" def __init__(self, *items): choice_item = railroad.Choice(len(items) - 1, *items) one_or_more_item = railroad.OneOrMore(item=choice_item) super().__init__(one_or_more_item, label=self.all_label) class AnnotatedItem(railroad.Group): """ Simple subclass of Group that creates an annotation label """ def __init__(self, label: str, item): super().__init__(item=item, label="[{}]".format(label) if label else label) class EditablePartial(Generic[T]): """ Acts like a functools.partial, but can be edited. In other words, it represents a type that hasn't yet been constructed. """ # We need this here because the railroad constructors actually transform the data, so can't be called until the # entire tree is assembled def __init__(self, func: Callable[..., T], args: list, kwargs: dict): self.func = func self.args = args self.kwargs = kwargs @classmethod def from_call(cls, func: Callable[..., T], *args, **kwargs) -> "EditablePartial[T]": """ If you call this function in the same way that you would call the constructor, it will store the arguments as you expect. For example EditablePartial.from_call(Fraction, 1, 3)() == Fraction(1, 3) """ return EditablePartial(func=func, args=list(args), kwargs=kwargs) @property def name(self): return self.kwargs["name"] def __call__(self) -> T: """ Evaluate the partial and return the result """ args = self.args.copy() kwargs = self.kwargs.copy() # This is a helpful hack to allow you to specify varargs parameters (e.g. *args) as keyword args (e.g. # args=['list', 'of', 'things']) arg_spec = inspect.getfullargspec(self.func) if arg_spec.varargs in self.kwargs: args += kwargs.pop(arg_spec.varargs) return self.func(*args, **kwargs) def railroad_to_html(diagrams: List[NamedDiagram], **kwargs) -> str: """ Given a list of NamedDiagram, produce a single HTML string that visualises those diagrams :params kwargs: kwargs to be passed in to the template """ data = [] for diagram in diagrams: if diagram.diagram is None: continue io = StringIO() diagram.diagram.writeSvg(io.write) title = diagram.name if diagram.index == 0: title += " (root)" data.append({"title": title, "text": "", "svg": io.getvalue()}) return template.render(diagrams=data, **kwargs) def resolve_partial(partial: "EditablePartial[T]") -> T: """ Recursively resolves a collection of Partials into whatever type they are """ if isinstance(partial, EditablePartial): partial.args = resolve_partial(partial.args) partial.kwargs = resolve_partial(partial.kwargs) return partial() elif isinstance(partial, list): return [resolve_partial(x) for x in partial] elif isinstance(partial, dict): return {key: resolve_partial(x) for key, x in partial.items()} else: return partial def to_railroad( element: pyparsing.ParserElement, diagram_kwargs: typing.Optional[dict] = None, vertical: int = 3, show_results_names: bool = False, show_groups: bool = False, ) -> List[NamedDiagram]: """ Convert a pyparsing element tree into a list of diagrams. This is the recommended entrypoint to diagram creation if you want to access the Railroad tree before it is converted to HTML :param element: base element of the parser being diagrammed :param diagram_kwargs: kwargs to pass to the Diagram() constructor :param vertical: (optional) - int - limit at which number of alternatives should be shown vertically instead of horizontally :param show_results_names - bool to indicate whether results name annotations should be included in the diagram :param show_groups - bool to indicate whether groups should be highlighted with an unlabeled surrounding box """ # Convert the whole tree underneath the root lookup = ConverterState(diagram_kwargs=diagram_kwargs or {}) _to_diagram_element( element, lookup=lookup, parent=None, vertical=vertical, show_results_names=show_results_names, show_groups=show_groups, ) root_id = id(element) # Convert the root if it hasn't been already if root_id in lookup: if not element.customName: lookup[root_id].name = "" lookup[root_id].mark_for_extraction(root_id, lookup, force=True) # Now that we're finished, we can convert from intermediate structures into Railroad elements diags = list(lookup.diagrams.values()) if len(diags) > 1: # collapse out duplicate diags with the same name seen = set() deduped_diags = [] for d in diags: # don't extract SkipTo elements, they are uninformative as subdiagrams if d.name == "...": continue if d.name is not None and d.name not in seen: seen.add(d.name) deduped_diags.append(d) resolved = [resolve_partial(partial) for partial in deduped_diags] else: # special case - if just one diagram, always display it, even if # it has no name resolved = [resolve_partial(partial) for partial in diags] return sorted(resolved, key=lambda diag: diag.index) def _should_vertical( specification: int, exprs: Iterable[pyparsing.ParserElement] ) -> bool: """ Returns true if we should return a vertical list of elements """ if specification is None: return False else: return len(_visible_exprs(exprs)) >= specification class ElementState: """ State recorded for an individual pyparsing Element """ # Note: this should be a dataclass, but we have to support Python 3.5 def __init__( self, element: pyparsing.ParserElement, converted: EditablePartial, parent: EditablePartial, number: int, name: str = None, parent_index: typing.Optional[int] = None, ): #: The pyparsing element that this represents self.element: pyparsing.ParserElement = element #: The name of the element self.name: typing.Optional[str] = name #: The output Railroad element in an unconverted state self.converted: EditablePartial = converted #: The parent Railroad element, which we store so that we can extract this if it's duplicated self.parent: EditablePartial = parent #: The order in which we found this element, used for sorting diagrams if this is extracted into a diagram self.number: int = number #: The index of this inside its parent self.parent_index: typing.Optional[int] = parent_index #: If true, we should extract this out into a subdiagram self.extract: bool = False #: If true, all of this element's children have been filled out self.complete: bool = False def mark_for_extraction( self, el_id: int, state: "ConverterState", name: str = None, force: bool = False ): """ Called when this instance has been seen twice, and thus should eventually be extracted into a sub-diagram :param el_id: id of the element :param state: element/diagram state tracker :param name: name to use for this element's text :param force: If true, force extraction now, regardless of the state of this. Only useful for extracting the root element when we know we're finished """ self.extract = True # Set the name if not self.name: if name: # Allow forcing a custom name self.name = name elif self.element.customName: self.name = self.element.customName else: self.name = "" # Just because this is marked for extraction doesn't mean we can do it yet. We may have to wait for children # to be added # Also, if this is just a string literal etc, don't bother extracting it if force or (self.complete and _worth_extracting(self.element)): state.extract_into_diagram(el_id) class ConverterState: """ Stores some state that persists between recursions into the element tree """ def __init__(self, diagram_kwargs: typing.Optional[dict] = None): #: A dictionary mapping ParserElements to state relating to them self._element_diagram_states: Dict[int, ElementState] = {} #: A dictionary mapping ParserElement IDs to subdiagrams generated from them self.diagrams: Dict[int, EditablePartial[NamedDiagram]] = {} #: The index of the next unnamed element self.unnamed_index: int = 1 #: The index of the next element. This is used for sorting self.index: int = 0 #: Shared kwargs that are used to customize the construction of diagrams self.diagram_kwargs: dict = diagram_kwargs or {} self.extracted_diagram_names: Set[str] = set() def __setitem__(self, key: int, value: ElementState): self._element_diagram_states[key] = value def __getitem__(self, key: int) -> ElementState: return self._element_diagram_states[key] def __delitem__(self, key: int): del self._element_diagram_states[key] def __contains__(self, key: int): return key in self._element_diagram_states def generate_unnamed(self) -> int: """ Generate a number used in the name of an otherwise unnamed diagram """ self.unnamed_index += 1 return self.unnamed_index def generate_index(self) -> int: """ Generate a number used to index a diagram """ self.index += 1 return self.index def extract_into_diagram(self, el_id: int): """ Used when we encounter the same token twice in the same tree. When this happens, we replace all instances of that token with a terminal, and create a new subdiagram for the token """ position = self[el_id] # Replace the original definition of this element with a regular block if position.parent: ret = EditablePartial.from_call(railroad.NonTerminal, text=position.name) if "item" in position.parent.kwargs: position.parent.kwargs["item"] = ret elif "items" in position.parent.kwargs: position.parent.kwargs["items"][position.parent_index] = ret # If the element we're extracting is a group, skip to its content but keep the title if position.converted.func == railroad.Group: content = position.converted.kwargs["item"] else: content = position.converted self.diagrams[el_id] = EditablePartial.from_call( NamedDiagram, name=position.name, diagram=EditablePartial.from_call( railroad.Diagram, content, **self.diagram_kwargs ), index=position.number, ) del self[el_id] def _worth_extracting(element: pyparsing.ParserElement) -> bool: """ Returns true if this element is worth having its own sub-diagram. Simply, if any of its children themselves have children, then its complex enough to extract """ children = element.recurse() return any(child.recurse() for child in children) def _apply_diagram_item_enhancements(fn): """ decorator to ensure enhancements to a diagram item (such as results name annotations) get applied on return from _to_diagram_element (we do this since there are several returns in _to_diagram_element) """ def _inner( element: pyparsing.ParserElement, parent: typing.Optional[EditablePartial], lookup: ConverterState = None, vertical: int = None, index: int = 0, name_hint: str = None, show_results_names: bool = False, show_groups: bool = False, ) -> typing.Optional[EditablePartial]: ret = fn( element, parent, lookup, vertical, index, name_hint, show_results_names, show_groups, ) # apply annotation for results name, if present if show_results_names and ret is not None: element_results_name = element.resultsName if element_results_name: # add "*" to indicate if this is a "list all results" name element_results_name += "" if element.modalResults else "*" ret = EditablePartial.from_call( railroad.Group, item=ret, label=element_results_name ) return ret return _inner def _visible_exprs(exprs: Iterable[pyparsing.ParserElement]): non_diagramming_exprs = ( pyparsing.ParseElementEnhance, pyparsing.PositionToken, pyparsing.And._ErrorStop, ) return [ e for e in exprs if not (e.customName or e.resultsName or isinstance(e, non_diagramming_exprs)) ] @_apply_diagram_item_enhancements def _to_diagram_element( element: pyparsing.ParserElement, parent: typing.Optional[EditablePartial], lookup: ConverterState = None, vertical: int = None, index: int = 0, name_hint: str = None, show_results_names: bool = False, show_groups: bool = False, ) -> typing.Optional[EditablePartial]: """ Recursively converts a PyParsing Element to a railroad Element :param lookup: The shared converter state that keeps track of useful things :param index: The index of this element within the parent :param parent: The parent of this element in the output tree :param vertical: Controls at what point we make a list of elements vertical. If this is an integer (the default), it sets the threshold of the number of items before we go vertical. If True, always go vertical, if False, never do so :param name_hint: If provided, this will override the generated name :param show_results_names: bool flag indicating whether to add annotations for results names :returns: The converted version of the input element, but as a Partial that hasn't yet been constructed :param show_groups: bool flag indicating whether to show groups using bounding box """ exprs = element.recurse() name = name_hint or element.customName or element.__class__.__name__ # Python's id() is used to provide a unique identifier for elements el_id = id(element) element_results_name = element.resultsName # Here we basically bypass processing certain wrapper elements if they contribute nothing to the diagram if not element.customName: if isinstance( element, ( # pyparsing.TokenConverter, # pyparsing.Forward, pyparsing.Located, ), ): # However, if this element has a useful custom name, and its child does not, we can pass it on to the child if exprs: if not exprs[0].customName: propagated_name = name else: propagated_name = None return _to_diagram_element( element.expr, parent=parent, lookup=lookup, vertical=vertical, index=index, name_hint=propagated_name, show_results_names=show_results_names, show_groups=show_groups, ) # If the element isn't worth extracting, we always treat it as the first time we say it if _worth_extracting(element): if el_id in lookup: # If we've seen this element exactly once before, we are only just now finding out that it's a duplicate, # so we have to extract it into a new diagram. looked_up = lookup[el_id] looked_up.mark_for_extraction(el_id, lookup, name=name_hint) ret = EditablePartial.from_call(railroad.NonTerminal, text=looked_up.name) return ret elif el_id in lookup.diagrams: # If we have seen the element at least twice before, and have already extracted it into a subdiagram, we # just put in a marker element that refers to the sub-diagram ret = EditablePartial.from_call( railroad.NonTerminal, text=lookup.diagrams[el_id].kwargs["name"] ) return ret # Recursively convert child elements # Here we find the most relevant Railroad element for matching pyparsing Element # We use ``items=[]`` here to hold the place for where the child elements will go once created if isinstance(element, pyparsing.And): # detect And's created with ``expr*N`` notation - for these use a OneOrMore with a repeat # (all will have the same name, and resultsName) if not exprs: return None if len(set((e.name, e.resultsName) for e in exprs)) == 1: ret = EditablePartial.from_call( railroad.OneOrMore, item="", repeat=str(len(exprs)) ) elif _should_vertical(vertical, exprs): ret = EditablePartial.from_call(railroad.Stack, items=[]) else: ret = EditablePartial.from_call(railroad.Sequence, items=[]) elif isinstance(element, (pyparsing.Or, pyparsing.MatchFirst)): if not exprs: return None if _should_vertical(vertical, exprs): ret = EditablePartial.from_call(railroad.Choice, 0, items=[]) else: ret = EditablePartial.from_call(railroad.HorizontalChoice, items=[]) elif isinstance(element, pyparsing.Each): if not exprs: return None ret = EditablePartial.from_call(EachItem, items=[]) elif isinstance(element, pyparsing.NotAny): ret = EditablePartial.from_call(AnnotatedItem, label="NOT", item="") elif isinstance(element, pyparsing.FollowedBy): ret = EditablePartial.from_call(AnnotatedItem, label="LOOKAHEAD", item="") elif isinstance(element, pyparsing.PrecededBy): ret = EditablePartial.from_call(AnnotatedItem, label="LOOKBEHIND", item="") elif isinstance(element, pyparsing.Group): if show_groups: ret = EditablePartial.from_call(AnnotatedItem, label="", item="") else: ret = EditablePartial.from_call(railroad.Group, label="", item="") elif isinstance(element, pyparsing.TokenConverter): ret = EditablePartial.from_call( AnnotatedItem, label=type(element).__name__.lower(), item="" ) elif isinstance(element, pyparsing.Opt): ret = EditablePartial.from_call(railroad.Optional, item="") elif isinstance(element, pyparsing.OneOrMore): ret = EditablePartial.from_call(railroad.OneOrMore, item="") elif isinstance(element, pyparsing.ZeroOrMore): ret = EditablePartial.from_call(railroad.ZeroOrMore, item="") elif isinstance(element, pyparsing.Group): ret = EditablePartial.from_call( railroad.Group, item=None, label=element_results_name ) elif isinstance(element, pyparsing.Empty) and not element.customName: # Skip unnamed "Empty" elements ret = None elif len(exprs) > 1: ret = EditablePartial.from_call(railroad.Sequence, items=[]) elif len(exprs) > 0 and not element_results_name: ret = EditablePartial.from_call(railroad.Group, item="", label=name) else: terminal = EditablePartial.from_call(railroad.Terminal, element.defaultName) ret = terminal if ret is None: return # Indicate this element's position in the tree so we can extract it if necessary lookup[el_id] = ElementState( element=element, converted=ret, parent=parent, parent_index=index, number=lookup.generate_index(), ) if element.customName: lookup[el_id].mark_for_extraction(el_id, lookup, element.customName) i = 0 for expr in exprs: # Add a placeholder index in case we have to extract the child before we even add it to the parent if "items" in ret.kwargs: ret.kwargs["items"].insert(i, None) item = _to_diagram_element( expr, parent=ret, lookup=lookup, vertical=vertical, index=i, show_results_names=show_results_names, show_groups=show_groups, ) # Some elements don't need to be shown in the diagram if item is not None: if "item" in ret.kwargs: ret.kwargs["item"] = item elif "items" in ret.kwargs: # If we've already extracted the child, don't touch this index, since it's occupied by a nonterminal ret.kwargs["items"][i] = item i += 1 elif "items" in ret.kwargs: # If we're supposed to skip this element, remove it from the parent del ret.kwargs["items"][i] # If all this items children are none, skip this item if ret and ( ("items" in ret.kwargs and len(ret.kwargs["items"]) == 0) or ("item" in ret.kwargs and ret.kwargs["item"] is None) ): ret = EditablePartial.from_call(railroad.Terminal, name) # Mark this element as "complete", ie it has all of its children if el_id in lookup: lookup[el_id].complete = True if el_id in lookup and lookup[el_id].extract and lookup[el_id].complete: lookup.extract_into_diagram(el_id) if ret is not None: ret = EditablePartial.from_call( railroad.NonTerminal, text=lookup.diagrams[el_id].kwargs["name"] ) return ret PK|5Z^bb<Lib/site-packages/pkg_resources/_vendor/pyparsing/results.pynuW+A# results.py from collections.abc import MutableMapping, Mapping, MutableSequence, Iterator import pprint from weakref import ref as wkref from typing import Tuple, Any str_type: Tuple[type, ...] = (str, bytes) _generator_type = type((_ for _ in ())) class _ParseResultsWithOffset: __slots__ = ["tup"] def __init__(self, p1, p2): self.tup = (p1, p2) def __getitem__(self, i): return self.tup[i] def __getstate__(self): return self.tup def __setstate__(self, *args): self.tup = args[0] class ParseResults: """Structured parse results, to provide multiple means of access to the parsed data: - as a list (``len(results)``) - by list index (``results[0], results[1]``, etc.) - by attribute (``results.`` - see :class:`ParserElement.set_results_name`) Example:: integer = Word(nums) date_str = (integer.set_results_name("year") + '/' + integer.set_results_name("month") + '/' + integer.set_results_name("day")) # equivalent form: # date_str = (integer("year") + '/' # + integer("month") + '/' # + integer("day")) # parse_string returns a ParseResults object result = date_str.parse_string("1999/12/31") def test(s, fn=repr): print("{} -> {}".format(s, fn(eval(s)))) test("list(result)") test("result[0]") test("result['month']") test("result.day") test("'month' in result") test("'minutes' in result") test("result.dump()", str) prints:: list(result) -> ['1999', '/', '12', '/', '31'] result[0] -> '1999' result['month'] -> '12' result.day -> '31' 'month' in result -> True 'minutes' in result -> False result.dump() -> ['1999', '/', '12', '/', '31'] - day: '31' - month: '12' - year: '1999' """ _null_values: Tuple[Any, ...] = (None, [], "", ()) __slots__ = [ "_name", "_parent", "_all_names", "_modal", "_toklist", "_tokdict", "__weakref__", ] class List(list): """ Simple wrapper class to distinguish parsed list results that should be preserved as actual Python lists, instead of being converted to :class:`ParseResults`: LBRACK, RBRACK = map(pp.Suppress, "[]") element = pp.Forward() item = ppc.integer element_list = LBRACK + pp.delimited_list(element) + RBRACK # add parse actions to convert from ParseResults to actual Python collection types def as_python_list(t): return pp.ParseResults.List(t.as_list()) element_list.add_parse_action(as_python_list) element <<= item | element_list element.run_tests(''' 100 [2,3,4] [[2, 1],3,4] [(2, 1),3,4] (2,3,4) ''', post_parse=lambda s, r: (r[0], type(r[0]))) prints: 100 (100, ) [2,3,4] ([2, 3, 4], ) [[2, 1],3,4] ([[2, 1], 3, 4], ) (Used internally by :class:`Group` when `aslist=True`.) """ def __new__(cls, contained=None): if contained is None: contained = [] if not isinstance(contained, list): raise TypeError( "{} may only be constructed with a list," " not {}".format(cls.__name__, type(contained).__name__) ) return list.__new__(cls) def __new__(cls, toklist=None, name=None, **kwargs): if isinstance(toklist, ParseResults): return toklist self = object.__new__(cls) self._name = None self._parent = None self._all_names = set() if toklist is None: self._toklist = [] elif isinstance(toklist, (list, _generator_type)): self._toklist = ( [toklist[:]] if isinstance(toklist, ParseResults.List) else list(toklist) ) else: self._toklist = [toklist] self._tokdict = dict() return self # Performance tuning: we construct a *lot* of these, so keep this # constructor as small and fast as possible def __init__( self, toklist=None, name=None, asList=True, modal=True, isinstance=isinstance ): self._modal = modal if name is not None and name != "": if isinstance(name, int): name = str(name) if not modal: self._all_names = {name} self._name = name if toklist not in self._null_values: if isinstance(toklist, (str_type, type)): toklist = [toklist] if asList: if isinstance(toklist, ParseResults): self[name] = _ParseResultsWithOffset( ParseResults(toklist._toklist), 0 ) else: self[name] = _ParseResultsWithOffset( ParseResults(toklist[0]), 0 ) self[name]._name = name else: try: self[name] = toklist[0] except (KeyError, TypeError, IndexError): if toklist is not self: self[name] = toklist else: self._name = name def __getitem__(self, i): if isinstance(i, (int, slice)): return self._toklist[i] else: if i not in self._all_names: return self._tokdict[i][-1][0] else: return ParseResults([v[0] for v in self._tokdict[i]]) def __setitem__(self, k, v, isinstance=isinstance): if isinstance(v, _ParseResultsWithOffset): self._tokdict[k] = self._tokdict.get(k, list()) + [v] sub = v[0] elif isinstance(k, (int, slice)): self._toklist[k] = v sub = v else: self._tokdict[k] = self._tokdict.get(k, list()) + [ _ParseResultsWithOffset(v, 0) ] sub = v if isinstance(sub, ParseResults): sub._parent = wkref(self) def __delitem__(self, i): if isinstance(i, (int, slice)): mylen = len(self._toklist) del self._toklist[i] # convert int to slice if isinstance(i, int): if i < 0: i += mylen i = slice(i, i + 1) # get removed indices removed = list(range(*i.indices(mylen))) removed.reverse() # fixup indices in token dictionary for name, occurrences in self._tokdict.items(): for j in removed: for k, (value, position) in enumerate(occurrences): occurrences[k] = _ParseResultsWithOffset( value, position - (position > j) ) else: del self._tokdict[i] def __contains__(self, k) -> bool: return k in self._tokdict def __len__(self) -> int: return len(self._toklist) def __bool__(self) -> bool: return not not (self._toklist or self._tokdict) def __iter__(self) -> Iterator: return iter(self._toklist) def __reversed__(self) -> Iterator: return iter(self._toklist[::-1]) def keys(self): return iter(self._tokdict) def values(self): return (self[k] for k in self.keys()) def items(self): return ((k, self[k]) for k in self.keys()) def haskeys(self) -> bool: """ Since ``keys()`` returns an iterator, this method is helpful in bypassing code that looks for the existence of any defined results names.""" return bool(self._tokdict) def pop(self, *args, **kwargs): """ Removes and returns item at specified index (default= ``last``). Supports both ``list`` and ``dict`` semantics for ``pop()``. If passed no argument or an integer argument, it will use ``list`` semantics and pop tokens from the list of parsed tokens. If passed a non-integer argument (most likely a string), it will use ``dict`` semantics and pop the corresponding value from any defined results names. A second default return value argument is supported, just as in ``dict.pop()``. Example:: numlist = Word(nums)[...] print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321'] def remove_first(tokens): tokens.pop(0) numlist.add_parse_action(remove_first) print(numlist.parse_string("0 123 321")) # -> ['123', '321'] label = Word(alphas) patt = label("LABEL") + Word(nums)[1, ...] print(patt.parse_string("AAB 123 321").dump()) # Use pop() in a parse action to remove named result (note that corresponding value is not # removed from list form of results) def remove_LABEL(tokens): tokens.pop("LABEL") return tokens patt.add_parse_action(remove_LABEL) print(patt.parse_string("AAB 123 321").dump()) prints:: ['AAB', '123', '321'] - LABEL: 'AAB' ['AAB', '123', '321'] """ if not args: args = [-1] for k, v in kwargs.items(): if k == "default": args = (args[0], v) else: raise TypeError( "pop() got an unexpected keyword argument {!r}".format(k) ) if isinstance(args[0], int) or len(args) == 1 or args[0] in self: index = args[0] ret = self[index] del self[index] return ret else: defaultvalue = args[1] return defaultvalue def get(self, key, default_value=None): """ Returns named result matching the given key, or if there is no such name, then returns the given ``default_value`` or ``None`` if no ``default_value`` is specified. Similar to ``dict.get()``. Example:: integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") result = date_str.parse_string("1999/12/31") print(result.get("year")) # -> '1999' print(result.get("hour", "not specified")) # -> 'not specified' print(result.get("hour")) # -> None """ if key in self: return self[key] else: return default_value def insert(self, index, ins_string): """ Inserts new element at location index in the list of parsed tokens. Similar to ``list.insert()``. Example:: numlist = Word(nums)[...] print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321'] # use a parse action to insert the parse location in the front of the parsed results def insert_locn(locn, tokens): tokens.insert(0, locn) numlist.add_parse_action(insert_locn) print(numlist.parse_string("0 123 321")) # -> [0, '0', '123', '321'] """ self._toklist.insert(index, ins_string) # fixup indices in token dictionary for name, occurrences in self._tokdict.items(): for k, (value, position) in enumerate(occurrences): occurrences[k] = _ParseResultsWithOffset( value, position + (position > index) ) def append(self, item): """ Add single element to end of ``ParseResults`` list of elements. Example:: numlist = Word(nums)[...] print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321'] # use a parse action to compute the sum of the parsed integers, and add it to the end def append_sum(tokens): tokens.append(sum(map(int, tokens))) numlist.add_parse_action(append_sum) print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321', 444] """ self._toklist.append(item) def extend(self, itemseq): """ Add sequence of elements to end of ``ParseResults`` list of elements. Example:: patt = Word(alphas)[1, ...] # use a parse action to append the reverse of the matched strings, to make a palindrome def make_palindrome(tokens): tokens.extend(reversed([t[::-1] for t in tokens])) return ''.join(tokens) patt.add_parse_action(make_palindrome) print(patt.parse_string("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl' """ if isinstance(itemseq, ParseResults): self.__iadd__(itemseq) else: self._toklist.extend(itemseq) def clear(self): """ Clear all elements and results names. """ del self._toklist[:] self._tokdict.clear() def __getattr__(self, name): try: return self[name] except KeyError: if name.startswith("__"): raise AttributeError(name) return "" def __add__(self, other) -> "ParseResults": ret = self.copy() ret += other return ret def __iadd__(self, other) -> "ParseResults": if other._tokdict: offset = len(self._toklist) addoffset = lambda a: offset if a < 0 else a + offset otheritems = other._tokdict.items() otherdictitems = [ (k, _ParseResultsWithOffset(v[0], addoffset(v[1]))) for k, vlist in otheritems for v in vlist ] for k, v in otherdictitems: self[k] = v if isinstance(v[0], ParseResults): v[0]._parent = wkref(self) self._toklist += other._toklist self._all_names |= other._all_names return self def __radd__(self, other) -> "ParseResults": if isinstance(other, int) and other == 0: # useful for merging many ParseResults using sum() builtin return self.copy() else: # this may raise a TypeError - so be it return other + self def __repr__(self) -> str: return "{}({!r}, {})".format(type(self).__name__, self._toklist, self.as_dict()) def __str__(self) -> str: return ( "[" + ", ".join( [ str(i) if isinstance(i, ParseResults) else repr(i) for i in self._toklist ] ) + "]" ) def _asStringList(self, sep=""): out = [] for item in self._toklist: if out and sep: out.append(sep) if isinstance(item, ParseResults): out += item._asStringList() else: out.append(str(item)) return out def as_list(self) -> list: """ Returns the parse results as a nested list of matching tokens, all converted to strings. Example:: patt = Word(alphas)[1, ...] result = patt.parse_string("sldkj lsdkj sldkj") # even though the result prints in string-like form, it is actually a pyparsing ParseResults print(type(result), result) # -> ['sldkj', 'lsdkj', 'sldkj'] # Use as_list() to create an actual list result_list = result.as_list() print(type(result_list), result_list) # -> ['sldkj', 'lsdkj', 'sldkj'] """ return [ res.as_list() if isinstance(res, ParseResults) else res for res in self._toklist ] def as_dict(self) -> dict: """ Returns the named parse results as a nested dictionary. Example:: integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") result = date_str.parse_string('12/31/1999') print(type(result), repr(result)) # -> (['12', '/', '31', '/', '1999'], {'day': [('1999', 4)], 'year': [('12', 0)], 'month': [('31', 2)]}) result_dict = result.as_dict() print(type(result_dict), repr(result_dict)) # -> {'day': '1999', 'year': '12', 'month': '31'} # even though a ParseResults supports dict-like access, sometime you just need to have a dict import json print(json.dumps(result)) # -> Exception: TypeError: ... is not JSON serializable print(json.dumps(result.as_dict())) # -> {"month": "31", "day": "1999", "year": "12"} """ def to_item(obj): if isinstance(obj, ParseResults): return obj.as_dict() if obj.haskeys() else [to_item(v) for v in obj] else: return obj return dict((k, to_item(v)) for k, v in self.items()) def copy(self) -> "ParseResults": """ Returns a new copy of a :class:`ParseResults` object. """ ret = ParseResults(self._toklist) ret._tokdict = self._tokdict.copy() ret._parent = self._parent ret._all_names |= self._all_names ret._name = self._name return ret def get_name(self): r""" Returns the results name for this token expression. Useful when several different expressions might match at a particular location. Example:: integer = Word(nums) ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d") house_number_expr = Suppress('#') + Word(nums, alphanums) user_data = (Group(house_number_expr)("house_number") | Group(ssn_expr)("ssn") | Group(integer)("age")) user_info = user_data[1, ...] result = user_info.parse_string("22 111-22-3333 #221B") for item in result: print(item.get_name(), ':', item[0]) prints:: age : 22 ssn : 111-22-3333 house_number : 221B """ if self._name: return self._name elif self._parent: par = self._parent() def find_in_parent(sub): return next( ( k for k, vlist in par._tokdict.items() for v, loc in vlist if sub is v ), None, ) return find_in_parent(self) if par else None elif ( len(self) == 1 and len(self._tokdict) == 1 and next(iter(self._tokdict.values()))[0][1] in (0, -1) ): return next(iter(self._tokdict.keys())) else: return None def dump(self, indent="", full=True, include_list=True, _depth=0) -> str: """ Diagnostic method for listing out the contents of a :class:`ParseResults`. Accepts an optional ``indent`` argument so that this string can be embedded in a nested display of other data. Example:: integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") result = date_str.parse_string('1999/12/31') print(result.dump()) prints:: ['1999', '/', '12', '/', '31'] - day: '31' - month: '12' - year: '1999' """ out = [] NL = "\n" out.append(indent + str(self.as_list()) if include_list else "") if full: if self.haskeys(): items = sorted((str(k), v) for k, v in self.items()) for k, v in items: if out: out.append(NL) out.append("{}{}- {}: ".format(indent, (" " * _depth), k)) if isinstance(v, ParseResults): if v: out.append( v.dump( indent=indent, full=full, include_list=include_list, _depth=_depth + 1, ) ) else: out.append(str(v)) else: out.append(repr(v)) if any(isinstance(vv, ParseResults) for vv in self): v = self for i, vv in enumerate(v): if isinstance(vv, ParseResults): out.append( "\n{}{}[{}]:\n{}{}{}".format( indent, (" " * (_depth)), i, indent, (" " * (_depth + 1)), vv.dump( indent=indent, full=full, include_list=include_list, _depth=_depth + 1, ), ) ) else: out.append( "\n%s%s[%d]:\n%s%s%s" % ( indent, (" " * (_depth)), i, indent, (" " * (_depth + 1)), str(vv), ) ) return "".join(out) def pprint(self, *args, **kwargs): """ Pretty-printer for parsed results as a list, using the `pprint `_ module. Accepts additional positional or keyword args as defined for `pprint.pprint `_ . Example:: ident = Word(alphas, alphanums) num = Word(nums) func = Forward() term = ident | num | Group('(' + func + ')') func <<= ident + Group(Optional(delimited_list(term))) result = func.parse_string("fna a,b,(fnb c,d,200),100") result.pprint(width=40) prints:: ['fna', ['a', 'b', ['(', 'fnb', ['c', 'd', '200'], ')'], '100']] """ pprint.pprint(self.as_list(), *args, **kwargs) # add support for pickle protocol def __getstate__(self): return ( self._toklist, ( self._tokdict.copy(), self._parent is not None and self._parent() or None, self._all_names, self._name, ), ) def __setstate__(self, state): self._toklist, (self._tokdict, par, inAccumNames, self._name) = state self._all_names = set(inAccumNames) if par is not None: self._parent = wkref(par) else: self._parent = None def __getnewargs__(self): return self._toklist, self._name def __dir__(self): return dir(type(self)) + list(self.keys()) @classmethod def from_dict(cls, other, name=None) -> "ParseResults": """ Helper classmethod to construct a ``ParseResults`` from a ``dict``, preserving the name-value relations as results names. If an optional ``name`` argument is given, a nested ``ParseResults`` will be returned. """ def is_iterable(obj): try: iter(obj) except Exception: return False else: return not isinstance(obj, str_type) ret = cls([]) for k, v in other.items(): if isinstance(v, Mapping): ret += cls.from_dict(v, name=k) else: ret += cls([v], name=k, asList=is_iterable(v)) if name is not None: ret = cls([ret], name=name) return ret asList = as_list asDict = as_dict getName = get_name MutableMapping.register(ParseResults) MutableSequence.register(ParseResults) PK|5Z<ǀ>A>A9Lib/site-packages/pkg_resources/_vendor/pyparsing/core.pynuW+A# # core.py # import os import typing from typing import ( NamedTuple, Union, Callable, Any, Generator, Tuple, List, TextIO, Set, Sequence, ) from abc import ABC, abstractmethod from enum import Enum import string import copy import warnings import re import sys from collections.abc import Iterable import traceback import types from operator import itemgetter from functools import wraps from threading import RLock from pathlib import Path from .util import ( _FifoCache, _UnboundedCache, __config_flags, _collapse_string_to_ranges, _escape_regex_range_chars, _bslash, _flatten, LRUMemo as _LRUMemo, UnboundedMemo as _UnboundedMemo, ) from .exceptions import * from .actions import * from .results import ParseResults, _ParseResultsWithOffset from .unicode import pyparsing_unicode _MAX_INT = sys.maxsize str_type: Tuple[type, ...] = (str, bytes) # # Copyright (c) 2003-2022 Paul T. McGuire # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # if sys.version_info >= (3, 8): from functools import cached_property else: class cached_property: def __init__(self, func): self._func = func def __get__(self, instance, owner=None): ret = instance.__dict__[self._func.__name__] = self._func(instance) return ret class __compat__(__config_flags): """ A cross-version compatibility configuration for pyparsing features that will be released in a future version. By setting values in this configuration to True, those features can be enabled in prior versions for compatibility development and testing. - ``collect_all_And_tokens`` - flag to enable fix for Issue #63 that fixes erroneous grouping of results names when an :class:`And` expression is nested within an :class:`Or` or :class:`MatchFirst`; maintained for compatibility, but setting to ``False`` no longer restores pre-2.3.1 behavior """ _type_desc = "compatibility" collect_all_And_tokens = True _all_names = [__ for __ in locals() if not __.startswith("_")] _fixed_names = """ collect_all_And_tokens """.split() class __diag__(__config_flags): _type_desc = "diagnostic" warn_multiple_tokens_in_named_alternation = False warn_ungrouped_named_tokens_in_collection = False warn_name_set_on_empty_Forward = False warn_on_parse_using_empty_Forward = False warn_on_assignment_to_Forward = False warn_on_multiple_string_args_to_oneof = False warn_on_match_first_with_lshift_operator = False enable_debug_on_named_expressions = False _all_names = [__ for __ in locals() if not __.startswith("_")] _warning_names = [name for name in _all_names if name.startswith("warn")] _debug_names = [name for name in _all_names if name.startswith("enable_debug")] @classmethod def enable_all_warnings(cls) -> None: for name in cls._warning_names: cls.enable(name) class Diagnostics(Enum): """ Diagnostic configuration (all default to disabled) - ``warn_multiple_tokens_in_named_alternation`` - flag to enable warnings when a results name is defined on a :class:`MatchFirst` or :class:`Or` expression with one or more :class:`And` subexpressions - ``warn_ungrouped_named_tokens_in_collection`` - flag to enable warnings when a results name is defined on a containing expression with ungrouped subexpressions that also have results names - ``warn_name_set_on_empty_Forward`` - flag to enable warnings when a :class:`Forward` is defined with a results name, but has no contents defined - ``warn_on_parse_using_empty_Forward`` - flag to enable warnings when a :class:`Forward` is defined in a grammar but has never had an expression attached to it - ``warn_on_assignment_to_Forward`` - flag to enable warnings when a :class:`Forward` is defined but is overwritten by assigning using ``'='`` instead of ``'<<='`` or ``'<<'`` - ``warn_on_multiple_string_args_to_oneof`` - flag to enable warnings when :class:`one_of` is incorrectly called with multiple str arguments - ``enable_debug_on_named_expressions`` - flag to auto-enable debug on all subsequent calls to :class:`ParserElement.set_name` Diagnostics are enabled/disabled by calling :class:`enable_diag` and :class:`disable_diag`. All warnings can be enabled by calling :class:`enable_all_warnings`. """ warn_multiple_tokens_in_named_alternation = 0 warn_ungrouped_named_tokens_in_collection = 1 warn_name_set_on_empty_Forward = 2 warn_on_parse_using_empty_Forward = 3 warn_on_assignment_to_Forward = 4 warn_on_multiple_string_args_to_oneof = 5 warn_on_match_first_with_lshift_operator = 6 enable_debug_on_named_expressions = 7 def enable_diag(diag_enum: Diagnostics) -> None: """ Enable a global pyparsing diagnostic flag (see :class:`Diagnostics`). """ __diag__.enable(diag_enum.name) def disable_diag(diag_enum: Diagnostics) -> None: """ Disable a global pyparsing diagnostic flag (see :class:`Diagnostics`). """ __diag__.disable(diag_enum.name) def enable_all_warnings() -> None: """ Enable all global pyparsing diagnostic warnings (see :class:`Diagnostics`). """ __diag__.enable_all_warnings() # hide abstract class del __config_flags def _should_enable_warnings( cmd_line_warn_options: typing.Iterable[str], warn_env_var: typing.Optional[str] ) -> bool: enable = bool(warn_env_var) for warn_opt in cmd_line_warn_options: w_action, w_message, w_category, w_module, w_line = (warn_opt + "::::").split( ":" )[:5] if not w_action.lower().startswith("i") and ( not (w_message or w_category or w_module) or w_module == "pyparsing" ): enable = True elif w_action.lower().startswith("i") and w_module in ("pyparsing", ""): enable = False return enable if _should_enable_warnings( sys.warnoptions, os.environ.get("PYPARSINGENABLEALLWARNINGS") ): enable_all_warnings() # build list of single arg builtins, that can be used as parse actions _single_arg_builtins = { sum, len, sorted, reversed, list, tuple, set, any, all, min, max, } _generatorType = types.GeneratorType ParseAction = Union[ Callable[[], Any], Callable[[ParseResults], Any], Callable[[int, ParseResults], Any], Callable[[str, int, ParseResults], Any], ] ParseCondition = Union[ Callable[[], bool], Callable[[ParseResults], bool], Callable[[int, ParseResults], bool], Callable[[str, int, ParseResults], bool], ] ParseFailAction = Callable[[str, int, "ParserElement", Exception], None] DebugStartAction = Callable[[str, int, "ParserElement", bool], None] DebugSuccessAction = Callable[ [str, int, int, "ParserElement", ParseResults, bool], None ] DebugExceptionAction = Callable[[str, int, "ParserElement", Exception, bool], None] alphas = string.ascii_uppercase + string.ascii_lowercase identchars = pyparsing_unicode.Latin1.identchars identbodychars = pyparsing_unicode.Latin1.identbodychars nums = "0123456789" hexnums = nums + "ABCDEFabcdef" alphanums = alphas + nums printables = "".join([c for c in string.printable if c not in string.whitespace]) _trim_arity_call_line: traceback.StackSummary = None def _trim_arity(func, max_limit=3): """decorator to trim function calls to match the arity of the target""" global _trim_arity_call_line if func in _single_arg_builtins: return lambda s, l, t: func(t) limit = 0 found_arity = False def extract_tb(tb, limit=0): frames = traceback.extract_tb(tb, limit=limit) frame_summary = frames[-1] return [frame_summary[:2]] # synthesize what would be returned by traceback.extract_stack at the call to # user's parse action 'func', so that we don't incur call penalty at parse time # fmt: off LINE_DIFF = 7 # IF ANY CODE CHANGES, EVEN JUST COMMENTS OR BLANK LINES, BETWEEN THE NEXT LINE AND # THE CALL TO FUNC INSIDE WRAPPER, LINE_DIFF MUST BE MODIFIED!!!! _trim_arity_call_line = (_trim_arity_call_line or traceback.extract_stack(limit=2)[-1]) pa_call_line_synth = (_trim_arity_call_line[0], _trim_arity_call_line[1] + LINE_DIFF) def wrapper(*args): nonlocal found_arity, limit while 1: try: ret = func(*args[limit:]) found_arity = True return ret except TypeError as te: # re-raise TypeErrors if they did not come from our arity testing if found_arity: raise else: tb = te.__traceback__ trim_arity_type_error = ( extract_tb(tb, limit=2)[-1][:2] == pa_call_line_synth ) del tb if trim_arity_type_error: if limit < max_limit: limit += 1 continue raise # fmt: on # copy func name to wrapper for sensible debug output # (can't use functools.wraps, since that messes with function signature) func_name = getattr(func, "__name__", getattr(func, "__class__").__name__) wrapper.__name__ = func_name wrapper.__doc__ = func.__doc__ return wrapper def condition_as_parse_action( fn: ParseCondition, message: str = None, fatal: bool = False ) -> ParseAction: """ Function to convert a simple predicate function that returns ``True`` or ``False`` into a parse action. Can be used in places when a parse action is required and :class:`ParserElement.add_condition` cannot be used (such as when adding a condition to an operator level in :class:`infix_notation`). Optional keyword arguments: - ``message`` - define a custom message to be used in the raised exception - ``fatal`` - if True, will raise :class:`ParseFatalException` to stop parsing immediately; otherwise will raise :class:`ParseException` """ msg = message if message is not None else "failed user-defined condition" exc_type = ParseFatalException if fatal else ParseException fn = _trim_arity(fn) @wraps(fn) def pa(s, l, t): if not bool(fn(s, l, t)): raise exc_type(s, l, msg) return pa def _default_start_debug_action( instring: str, loc: int, expr: "ParserElement", cache_hit: bool = False ): cache_hit_str = "*" if cache_hit else "" print( ( "{}Match {} at loc {}({},{})\n {}\n {}^".format( cache_hit_str, expr, loc, lineno(loc, instring), col(loc, instring), line(loc, instring), " " * (col(loc, instring) - 1), ) ) ) def _default_success_debug_action( instring: str, startloc: int, endloc: int, expr: "ParserElement", toks: ParseResults, cache_hit: bool = False, ): cache_hit_str = "*" if cache_hit else "" print("{}Matched {} -> {}".format(cache_hit_str, expr, toks.as_list())) def _default_exception_debug_action( instring: str, loc: int, expr: "ParserElement", exc: Exception, cache_hit: bool = False, ): cache_hit_str = "*" if cache_hit else "" print( "{}Match {} failed, {} raised: {}".format( cache_hit_str, expr, type(exc).__name__, exc ) ) def null_debug_action(*args): """'Do-nothing' debug action, to suppress debugging output during parsing.""" class ParserElement(ABC): """Abstract base level parser element class.""" DEFAULT_WHITE_CHARS: str = " \n\t\r" verbose_stacktrace: bool = False _literalStringClass: typing.Optional[type] = None @staticmethod def set_default_whitespace_chars(chars: str) -> None: r""" Overrides the default whitespace chars Example:: # default whitespace chars are space, and newline Word(alphas)[1, ...].parse_string("abc def\nghi jkl") # -> ['abc', 'def', 'ghi', 'jkl'] # change to just treat newline as significant ParserElement.set_default_whitespace_chars(" \t") Word(alphas)[1, ...].parse_string("abc def\nghi jkl") # -> ['abc', 'def'] """ ParserElement.DEFAULT_WHITE_CHARS = chars # update whitespace all parse expressions defined in this module for expr in _builtin_exprs: if expr.copyDefaultWhiteChars: expr.whiteChars = set(chars) @staticmethod def inline_literals_using(cls: type) -> None: """ Set class to be used for inclusion of string literals into a parser. Example:: # default literal class used is Literal integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") date_str.parse_string("1999/12/31") # -> ['1999', '/', '12', '/', '31'] # change to Suppress ParserElement.inline_literals_using(Suppress) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") date_str.parse_string("1999/12/31") # -> ['1999', '12', '31'] """ ParserElement._literalStringClass = cls class DebugActions(NamedTuple): debug_try: typing.Optional[DebugStartAction] debug_match: typing.Optional[DebugSuccessAction] debug_fail: typing.Optional[DebugExceptionAction] def __init__(self, savelist: bool = False): self.parseAction: List[ParseAction] = list() self.failAction: typing.Optional[ParseFailAction] = None self.customName = None self._defaultName = None self.resultsName = None self.saveAsList = savelist self.skipWhitespace = True self.whiteChars = set(ParserElement.DEFAULT_WHITE_CHARS) self.copyDefaultWhiteChars = True # used when checking for left-recursion self.mayReturnEmpty = False self.keepTabs = False self.ignoreExprs: List["ParserElement"] = list() self.debug = False self.streamlined = False # optimize exception handling for subclasses that don't advance parse index self.mayIndexError = True self.errmsg = "" # mark results names as modal (report only last) or cumulative (list all) self.modalResults = True # custom debug actions self.debugActions = self.DebugActions(None, None, None) # avoid redundant calls to preParse self.callPreparse = True self.callDuringTry = False self.suppress_warnings_: List[Diagnostics] = [] def suppress_warning(self, warning_type: Diagnostics) -> "ParserElement": """ Suppress warnings emitted for a particular diagnostic on this expression. Example:: base = pp.Forward() base.suppress_warning(Diagnostics.warn_on_parse_using_empty_Forward) # statement would normally raise a warning, but is now suppressed print(base.parseString("x")) """ self.suppress_warnings_.append(warning_type) return self def copy(self) -> "ParserElement": """ Make a copy of this :class:`ParserElement`. Useful for defining different parse actions for the same parsing pattern, using copies of the original parse element. Example:: integer = Word(nums).set_parse_action(lambda toks: int(toks[0])) integerK = integer.copy().add_parse_action(lambda toks: toks[0] * 1024) + Suppress("K") integerM = integer.copy().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M") print((integerK | integerM | integer)[1, ...].parse_string("5K 100 640K 256M")) prints:: [5120, 100, 655360, 268435456] Equivalent form of ``expr.copy()`` is just ``expr()``:: integerM = integer().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M") """ cpy = copy.copy(self) cpy.parseAction = self.parseAction[:] cpy.ignoreExprs = self.ignoreExprs[:] if self.copyDefaultWhiteChars: cpy.whiteChars = set(ParserElement.DEFAULT_WHITE_CHARS) return cpy def set_results_name( self, name: str, list_all_matches: bool = False, *, listAllMatches: bool = False ) -> "ParserElement": """ Define name for referencing matching tokens as a nested attribute of the returned parse results. Normally, results names are assigned as you would assign keys in a dict: any existing value is overwritten by later values. If it is necessary to keep all values captured for a particular results name, call ``set_results_name`` with ``list_all_matches`` = True. NOTE: ``set_results_name`` returns a *copy* of the original :class:`ParserElement` object; this is so that the client can define a basic element, such as an integer, and reference it in multiple places with different names. You can also set results names using the abbreviated syntax, ``expr("name")`` in place of ``expr.set_results_name("name")`` - see :class:`__call__`. If ``list_all_matches`` is required, use ``expr("name*")``. Example:: date_str = (integer.set_results_name("year") + '/' + integer.set_results_name("month") + '/' + integer.set_results_name("day")) # equivalent form: date_str = integer("year") + '/' + integer("month") + '/' + integer("day") """ listAllMatches = listAllMatches or list_all_matches return self._setResultsName(name, listAllMatches) def _setResultsName(self, name, listAllMatches=False): if name is None: return self newself = self.copy() if name.endswith("*"): name = name[:-1] listAllMatches = True newself.resultsName = name newself.modalResults = not listAllMatches return newself def set_break(self, break_flag: bool = True) -> "ParserElement": """ Method to invoke the Python pdb debugger when this element is about to be parsed. Set ``break_flag`` to ``True`` to enable, ``False`` to disable. """ if break_flag: _parseMethod = self._parse def breaker(instring, loc, doActions=True, callPreParse=True): import pdb # this call to pdb.set_trace() is intentional, not a checkin error pdb.set_trace() return _parseMethod(instring, loc, doActions, callPreParse) breaker._originalParseMethod = _parseMethod self._parse = breaker else: if hasattr(self._parse, "_originalParseMethod"): self._parse = self._parse._originalParseMethod return self def set_parse_action(self, *fns: ParseAction, **kwargs) -> "ParserElement": """ Define one or more actions to perform when successfully matching parse element definition. Parse actions can be called to perform data conversions, do extra validation, update external data structures, or enhance or replace the parsed tokens. Each parse action ``fn`` is a callable method with 0-3 arguments, called as ``fn(s, loc, toks)`` , ``fn(loc, toks)`` , ``fn(toks)`` , or just ``fn()`` , where: - s = the original string being parsed (see note below) - loc = the location of the matching substring - toks = a list of the matched tokens, packaged as a :class:`ParseResults` object The parsed tokens are passed to the parse action as ParseResults. They can be modified in place using list-style append, extend, and pop operations to update the parsed list elements; and with dictionary-style item set and del operations to add, update, or remove any named results. If the tokens are modified in place, it is not necessary to return them with a return statement. Parse actions can also completely replace the given tokens, with another ``ParseResults`` object, or with some entirely different object (common for parse actions that perform data conversions). A convenient way to build a new parse result is to define the values using a dict, and then create the return value using :class:`ParseResults.from_dict`. If None is passed as the ``fn`` parse action, all previously added parse actions for this expression are cleared. Optional keyword arguments: - call_during_try = (default= ``False``) indicate if parse action should be run during lookaheads and alternate testing. For parse actions that have side effects, it is important to only call the parse action once it is determined that it is being called as part of a successful parse. For parse actions that perform additional validation, then call_during_try should be passed as True, so that the validation code is included in the preliminary "try" parses. Note: the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`parse_string` for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. Example:: # parse dates in the form YYYY/MM/DD # use parse action to convert toks from str to int at parse time def convert_to_int(toks): return int(toks[0]) # use a parse action to verify that the date is a valid date def is_valid_date(instring, loc, toks): from datetime import date year, month, day = toks[::2] try: date(year, month, day) except ValueError: raise ParseException(instring, loc, "invalid date given") integer = Word(nums) date_str = integer + '/' + integer + '/' + integer # add parse actions integer.set_parse_action(convert_to_int) date_str.set_parse_action(is_valid_date) # note that integer fields are now ints, not strings date_str.run_tests(''' # successful parse - note that integer fields were converted to ints 1999/12/31 # fail - invalid date 1999/13/31 ''') """ if list(fns) == [None]: self.parseAction = [] else: if not all(callable(fn) for fn in fns): raise TypeError("parse actions must be callable") self.parseAction = [_trim_arity(fn) for fn in fns] self.callDuringTry = kwargs.get( "call_during_try", kwargs.get("callDuringTry", False) ) return self def add_parse_action(self, *fns: ParseAction, **kwargs) -> "ParserElement": """ Add one or more parse actions to expression's list of parse actions. See :class:`set_parse_action`. See examples in :class:`copy`. """ self.parseAction += [_trim_arity(fn) for fn in fns] self.callDuringTry = self.callDuringTry or kwargs.get( "call_during_try", kwargs.get("callDuringTry", False) ) return self def add_condition(self, *fns: ParseCondition, **kwargs) -> "ParserElement": """Add a boolean predicate function to expression's list of parse actions. See :class:`set_parse_action` for function call signatures. Unlike ``set_parse_action``, functions passed to ``add_condition`` need to return boolean success/fail of the condition. Optional keyword arguments: - message = define a custom message to be used in the raised exception - fatal = if True, will raise ParseFatalException to stop parsing immediately; otherwise will raise ParseException - call_during_try = boolean to indicate if this method should be called during internal tryParse calls, default=False Example:: integer = Word(nums).set_parse_action(lambda toks: int(toks[0])) year_int = integer.copy() year_int.add_condition(lambda toks: toks[0] >= 2000, message="Only support years 2000 and later") date_str = year_int + '/' + integer + '/' + integer result = date_str.parse_string("1999/12/31") # -> Exception: Only support years 2000 and later (at char 0), (line:1, col:1) """ for fn in fns: self.parseAction.append( condition_as_parse_action( fn, message=kwargs.get("message"), fatal=kwargs.get("fatal", False) ) ) self.callDuringTry = self.callDuringTry or kwargs.get( "call_during_try", kwargs.get("callDuringTry", False) ) return self def set_fail_action(self, fn: ParseFailAction) -> "ParserElement": """ Define action to perform if parsing fails at this expression. Fail acton fn is a callable function that takes the arguments ``fn(s, loc, expr, err)`` where: - s = string being parsed - loc = location where expression match was attempted and failed - expr = the parse expression that failed - err = the exception thrown The function returns no value. It may throw :class:`ParseFatalException` if it is desired to stop parsing immediately.""" self.failAction = fn return self def _skipIgnorables(self, instring, loc): exprsFound = True while exprsFound: exprsFound = False for e in self.ignoreExprs: try: while 1: loc, dummy = e._parse(instring, loc) exprsFound = True except ParseException: pass return loc def preParse(self, instring, loc): if self.ignoreExprs: loc = self._skipIgnorables(instring, loc) if self.skipWhitespace: instrlen = len(instring) white_chars = self.whiteChars while loc < instrlen and instring[loc] in white_chars: loc += 1 return loc def parseImpl(self, instring, loc, doActions=True): return loc, [] def postParse(self, instring, loc, tokenlist): return tokenlist # @profile def _parseNoCache( self, instring, loc, doActions=True, callPreParse=True ) -> Tuple[int, ParseResults]: TRY, MATCH, FAIL = 0, 1, 2 debugging = self.debug # and doActions) len_instring = len(instring) if debugging or self.failAction: # print("Match {} at loc {}({}, {})".format(self, loc, lineno(loc, instring), col(loc, instring))) try: if callPreParse and self.callPreparse: pre_loc = self.preParse(instring, loc) else: pre_loc = loc tokens_start = pre_loc if self.debugActions.debug_try: self.debugActions.debug_try(instring, tokens_start, self, False) if self.mayIndexError or pre_loc >= len_instring: try: loc, tokens = self.parseImpl(instring, pre_loc, doActions) except IndexError: raise ParseException(instring, len_instring, self.errmsg, self) else: loc, tokens = self.parseImpl(instring, pre_loc, doActions) except Exception as err: # print("Exception raised:", err) if self.debugActions.debug_fail: self.debugActions.debug_fail( instring, tokens_start, self, err, False ) if self.failAction: self.failAction(instring, tokens_start, self, err) raise else: if callPreParse and self.callPreparse: pre_loc = self.preParse(instring, loc) else: pre_loc = loc tokens_start = pre_loc if self.mayIndexError or pre_loc >= len_instring: try: loc, tokens = self.parseImpl(instring, pre_loc, doActions) except IndexError: raise ParseException(instring, len_instring, self.errmsg, self) else: loc, tokens = self.parseImpl(instring, pre_loc, doActions) tokens = self.postParse(instring, loc, tokens) ret_tokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList, modal=self.modalResults ) if self.parseAction and (doActions or self.callDuringTry): if debugging: try: for fn in self.parseAction: try: tokens = fn(instring, tokens_start, ret_tokens) except IndexError as parse_action_exc: exc = ParseException("exception raised in parse action") raise exc from parse_action_exc if tokens is not None and tokens is not ret_tokens: ret_tokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList and isinstance(tokens, (ParseResults, list)), modal=self.modalResults, ) except Exception as err: # print "Exception raised in user parse action:", err if self.debugActions.debug_fail: self.debugActions.debug_fail( instring, tokens_start, self, err, False ) raise else: for fn in self.parseAction: try: tokens = fn(instring, tokens_start, ret_tokens) except IndexError as parse_action_exc: exc = ParseException("exception raised in parse action") raise exc from parse_action_exc if tokens is not None and tokens is not ret_tokens: ret_tokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList and isinstance(tokens, (ParseResults, list)), modal=self.modalResults, ) if debugging: # print("Matched", self, "->", ret_tokens.as_list()) if self.debugActions.debug_match: self.debugActions.debug_match( instring, tokens_start, loc, self, ret_tokens, False ) return loc, ret_tokens def try_parse(self, instring: str, loc: int, raise_fatal: bool = False) -> int: try: return self._parse(instring, loc, doActions=False)[0] except ParseFatalException: if raise_fatal: raise raise ParseException(instring, loc, self.errmsg, self) def can_parse_next(self, instring: str, loc: int) -> bool: try: self.try_parse(instring, loc) except (ParseException, IndexError): return False else: return True # cache for left-recursion in Forward references recursion_lock = RLock() recursion_memos: typing.Dict[ Tuple[int, "Forward", bool], Tuple[int, Union[ParseResults, Exception]] ] = {} # argument cache for optimizing repeated calls when backtracking through recursive expressions packrat_cache = ( {} ) # this is set later by enabled_packrat(); this is here so that reset_cache() doesn't fail packrat_cache_lock = RLock() packrat_cache_stats = [0, 0] # this method gets repeatedly called during backtracking with the same arguments - # we can cache these arguments and save ourselves the trouble of re-parsing the contained expression def _parseCache( self, instring, loc, doActions=True, callPreParse=True ) -> Tuple[int, ParseResults]: HIT, MISS = 0, 1 TRY, MATCH, FAIL = 0, 1, 2 lookup = (self, instring, loc, callPreParse, doActions) with ParserElement.packrat_cache_lock: cache = ParserElement.packrat_cache value = cache.get(lookup) if value is cache.not_in_cache: ParserElement.packrat_cache_stats[MISS] += 1 try: value = self._parseNoCache(instring, loc, doActions, callPreParse) except ParseBaseException as pe: # cache a copy of the exception, without the traceback cache.set(lookup, pe.__class__(*pe.args)) raise else: cache.set(lookup, (value[0], value[1].copy(), loc)) return value else: ParserElement.packrat_cache_stats[HIT] += 1 if self.debug and self.debugActions.debug_try: try: self.debugActions.debug_try(instring, loc, self, cache_hit=True) except TypeError: pass if isinstance(value, Exception): if self.debug and self.debugActions.debug_fail: try: self.debugActions.debug_fail( instring, loc, self, value, cache_hit=True ) except TypeError: pass raise value loc_, result, endloc = value[0], value[1].copy(), value[2] if self.debug and self.debugActions.debug_match: try: self.debugActions.debug_match( instring, loc_, endloc, self, result, cache_hit=True ) except TypeError: pass return loc_, result _parse = _parseNoCache @staticmethod def reset_cache() -> None: ParserElement.packrat_cache.clear() ParserElement.packrat_cache_stats[:] = [0] * len( ParserElement.packrat_cache_stats ) ParserElement.recursion_memos.clear() _packratEnabled = False _left_recursion_enabled = False @staticmethod def disable_memoization() -> None: """ Disables active Packrat or Left Recursion parsing and their memoization This method also works if neither Packrat nor Left Recursion are enabled. This makes it safe to call before activating Packrat nor Left Recursion to clear any previous settings. """ ParserElement.reset_cache() ParserElement._left_recursion_enabled = False ParserElement._packratEnabled = False ParserElement._parse = ParserElement._parseNoCache @staticmethod def enable_left_recursion( cache_size_limit: typing.Optional[int] = None, *, force=False ) -> None: """ Enables "bounded recursion" parsing, which allows for both direct and indirect left-recursion. During parsing, left-recursive :class:`Forward` elements are repeatedly matched with a fixed recursion depth that is gradually increased until finding the longest match. Example:: import pyparsing as pp pp.ParserElement.enable_left_recursion() E = pp.Forward("E") num = pp.Word(pp.nums) # match `num`, or `num '+' num`, or `num '+' num '+' num`, ... E <<= E + '+' - num | num print(E.parse_string("1+2+3")) Recursion search naturally memoizes matches of ``Forward`` elements and may thus skip reevaluation of parse actions during backtracking. This may break programs with parse actions which rely on strict ordering of side-effects. Parameters: - cache_size_limit - (default=``None``) - memoize at most this many ``Forward`` elements during matching; if ``None`` (the default), memoize all ``Forward`` elements. Bounded Recursion parsing works similar but not identical to Packrat parsing, thus the two cannot be used together. Use ``force=True`` to disable any previous, conflicting settings. """ if force: ParserElement.disable_memoization() elif ParserElement._packratEnabled: raise RuntimeError("Packrat and Bounded Recursion are not compatible") if cache_size_limit is None: ParserElement.recursion_memos = _UnboundedMemo() elif cache_size_limit > 0: ParserElement.recursion_memos = _LRUMemo(capacity=cache_size_limit) else: raise NotImplementedError("Memo size of %s" % cache_size_limit) ParserElement._left_recursion_enabled = True @staticmethod def enable_packrat(cache_size_limit: int = 128, *, force: bool = False) -> None: """ Enables "packrat" parsing, which adds memoizing to the parsing logic. Repeated parse attempts at the same string location (which happens often in many complex grammars) can immediately return a cached value, instead of re-executing parsing/validating code. Memoizing is done of both valid results and parsing exceptions. Parameters: - cache_size_limit - (default= ``128``) - if an integer value is provided will limit the size of the packrat cache; if None is passed, then the cache size will be unbounded; if 0 is passed, the cache will be effectively disabled. This speedup may break existing programs that use parse actions that have side-effects. For this reason, packrat parsing is disabled when you first import pyparsing. To activate the packrat feature, your program must call the class method :class:`ParserElement.enable_packrat`. For best results, call ``enable_packrat()`` immediately after importing pyparsing. Example:: import pyparsing pyparsing.ParserElement.enable_packrat() Packrat parsing works similar but not identical to Bounded Recursion parsing, thus the two cannot be used together. Use ``force=True`` to disable any previous, conflicting settings. """ if force: ParserElement.disable_memoization() elif ParserElement._left_recursion_enabled: raise RuntimeError("Packrat and Bounded Recursion are not compatible") if not ParserElement._packratEnabled: ParserElement._packratEnabled = True if cache_size_limit is None: ParserElement.packrat_cache = _UnboundedCache() else: ParserElement.packrat_cache = _FifoCache(cache_size_limit) ParserElement._parse = ParserElement._parseCache def parse_string( self, instring: str, parse_all: bool = False, *, parseAll: bool = False ) -> ParseResults: """ Parse a string with respect to the parser definition. This function is intended as the primary interface to the client code. :param instring: The input string to be parsed. :param parse_all: If set, the entire input string must match the grammar. :param parseAll: retained for pre-PEP8 compatibility, will be removed in a future release. :raises ParseException: Raised if ``parse_all`` is set and the input string does not match the whole grammar. :returns: the parsed data as a :class:`ParseResults` object, which may be accessed as a `list`, a `dict`, or an object with attributes if the given parser includes results names. If the input string is required to match the entire grammar, ``parse_all`` flag must be set to ``True``. This is also equivalent to ending the grammar with :class:`StringEnd`(). To report proper column numbers, ``parse_string`` operates on a copy of the input string where all tabs are converted to spaces (8 spaces per tab, as per the default in ``string.expandtabs``). If the input string contains tabs and the grammar uses parse actions that use the ``loc`` argument to index into the string being parsed, one can ensure a consistent view of the input string by doing one of the following: - calling ``parse_with_tabs`` on your grammar before calling ``parse_string`` (see :class:`parse_with_tabs`), - define your parse action using the full ``(s,loc,toks)`` signature, and reference the input string using the parse action's ``s`` argument, or - explicitly expand the tabs in your input string before calling ``parse_string``. Examples: By default, partial matches are OK. >>> res = Word('a').parse_string('aaaaabaaa') >>> print(res) ['aaaaa'] The parsing behavior varies by the inheriting class of this abstract class. Please refer to the children directly to see more examples. It raises an exception if parse_all flag is set and instring does not match the whole grammar. >>> res = Word('a').parse_string('aaaaabaaa', parse_all=True) Traceback (most recent call last): ... pyparsing.ParseException: Expected end of text, found 'b' (at char 5), (line:1, col:6) """ parseAll = parse_all or parseAll ParserElement.reset_cache() if not self.streamlined: self.streamline() for e in self.ignoreExprs: e.streamline() if not self.keepTabs: instring = instring.expandtabs() try: loc, tokens = self._parse(instring, 0) if parseAll: loc = self.preParse(instring, loc) se = Empty() + StringEnd() se._parse(instring, loc) except ParseBaseException as exc: if ParserElement.verbose_stacktrace: raise else: # catch and re-raise exception from here, clearing out pyparsing internal stack trace raise exc.with_traceback(None) else: return tokens def scan_string( self, instring: str, max_matches: int = _MAX_INT, overlap: bool = False, *, debug: bool = False, maxMatches: int = _MAX_INT, ) -> Generator[Tuple[ParseResults, int, int], None, None]: """ Scan the input string for expression matches. Each match will return the matching tokens, start location, and end location. May be called with optional ``max_matches`` argument, to clip scanning after 'n' matches are found. If ``overlap`` is specified, then overlapping matches will be reported. Note that the start and end locations are reported relative to the string being parsed. See :class:`parse_string` for more information on parsing strings with embedded tabs. Example:: source = "sldjf123lsdjjkf345sldkjf879lkjsfd987" print(source) for tokens, start, end in Word(alphas).scan_string(source): print(' '*start + '^'*(end-start)) print(' '*start + tokens[0]) prints:: sldjf123lsdjjkf345sldkjf879lkjsfd987 ^^^^^ sldjf ^^^^^^^ lsdjjkf ^^^^^^ sldkjf ^^^^^^ lkjsfd """ maxMatches = min(maxMatches, max_matches) if not self.streamlined: self.streamline() for e in self.ignoreExprs: e.streamline() if not self.keepTabs: instring = str(instring).expandtabs() instrlen = len(instring) loc = 0 preparseFn = self.preParse parseFn = self._parse ParserElement.resetCache() matches = 0 try: while loc <= instrlen and matches < maxMatches: try: preloc = preparseFn(instring, loc) nextLoc, tokens = parseFn(instring, preloc, callPreParse=False) except ParseException: loc = preloc + 1 else: if nextLoc > loc: matches += 1 if debug: print( { "tokens": tokens.asList(), "start": preloc, "end": nextLoc, } ) yield tokens, preloc, nextLoc if overlap: nextloc = preparseFn(instring, loc) if nextloc > loc: loc = nextLoc else: loc += 1 else: loc = nextLoc else: loc = preloc + 1 except ParseBaseException as exc: if ParserElement.verbose_stacktrace: raise else: # catch and re-raise exception from here, clears out pyparsing internal stack trace raise exc.with_traceback(None) def transform_string(self, instring: str, *, debug: bool = False) -> str: """ Extension to :class:`scan_string`, to modify matching text with modified tokens that may be returned from a parse action. To use ``transform_string``, define a grammar and attach a parse action to it that modifies the returned token list. Invoking ``transform_string()`` on a target string will then scan for matches, and replace the matched text patterns according to the logic in the parse action. ``transform_string()`` returns the resulting transformed string. Example:: wd = Word(alphas) wd.set_parse_action(lambda toks: toks[0].title()) print(wd.transform_string("now is the winter of our discontent made glorious summer by this sun of york.")) prints:: Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York. """ out: List[str] = [] lastE = 0 # force preservation of s, to minimize unwanted transformation of string, and to # keep string locs straight between transform_string and scan_string self.keepTabs = True try: for t, s, e in self.scan_string(instring, debug=debug): out.append(instring[lastE:s]) if t: if isinstance(t, ParseResults): out += t.as_list() elif isinstance(t, Iterable) and not isinstance(t, str_type): out.extend(t) else: out.append(t) lastE = e out.append(instring[lastE:]) out = [o for o in out if o] return "".join([str(s) for s in _flatten(out)]) except ParseBaseException as exc: if ParserElement.verbose_stacktrace: raise else: # catch and re-raise exception from here, clears out pyparsing internal stack trace raise exc.with_traceback(None) def search_string( self, instring: str, max_matches: int = _MAX_INT, *, debug: bool = False, maxMatches: int = _MAX_INT, ) -> ParseResults: """ Another extension to :class:`scan_string`, simplifying the access to the tokens found to match the given parse expression. May be called with optional ``max_matches`` argument, to clip searching after 'n' matches are found. Example:: # a capitalized word starts with an uppercase letter, followed by zero or more lowercase letters cap_word = Word(alphas.upper(), alphas.lower()) print(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity")) # the sum() builtin can be used to merge results into a single ParseResults object print(sum(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity"))) prints:: [['More'], ['Iron'], ['Lead'], ['Gold'], ['I'], ['Electricity']] ['More', 'Iron', 'Lead', 'Gold', 'I', 'Electricity'] """ maxMatches = min(maxMatches, max_matches) try: return ParseResults( [t for t, s, e in self.scan_string(instring, maxMatches, debug=debug)] ) except ParseBaseException as exc: if ParserElement.verbose_stacktrace: raise else: # catch and re-raise exception from here, clears out pyparsing internal stack trace raise exc.with_traceback(None) def split( self, instring: str, maxsplit: int = _MAX_INT, include_separators: bool = False, *, includeSeparators=False, ) -> Generator[str, None, None]: """ Generator method to split a string using the given expression as a separator. May be called with optional ``maxsplit`` argument, to limit the number of splits; and the optional ``include_separators`` argument (default= ``False``), if the separating matching text should be included in the split results. Example:: punc = one_of(list(".,;:/-!?")) print(list(punc.split("This, this?, this sentence, is badly punctuated!"))) prints:: ['This', ' this', '', ' this sentence', ' is badly punctuated', ''] """ includeSeparators = includeSeparators or include_separators last = 0 for t, s, e in self.scan_string(instring, max_matches=maxsplit): yield instring[last:s] if includeSeparators: yield t[0] last = e yield instring[last:] def __add__(self, other) -> "ParserElement": """ Implementation of ``+`` operator - returns :class:`And`. Adding strings to a :class:`ParserElement` converts them to :class:`Literal`s by default. Example:: greet = Word(alphas) + "," + Word(alphas) + "!" hello = "Hello, World!" print(hello, "->", greet.parse_string(hello)) prints:: Hello, World! -> ['Hello', ',', 'World', '!'] ``...`` may be used as a parse expression as a short form of :class:`SkipTo`. Literal('start') + ... + Literal('end') is equivalent to: Literal('start') + SkipTo('end')("_skipped*") + Literal('end') Note that the skipped text is returned with '_skipped' as a results name, and to support having multiple skips in the same parser, the value returned is a list of all skipped text. """ if other is Ellipsis: return _PendingSkip(self) if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return And([self, other]) def __radd__(self, other) -> "ParserElement": """ Implementation of ``+`` operator when left operand is not a :class:`ParserElement` """ if other is Ellipsis: return SkipTo(self)("_skipped*") + self if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return other + self def __sub__(self, other) -> "ParserElement": """ Implementation of ``-`` operator, returns :class:`And` with error stop """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return self + And._ErrorStop() + other def __rsub__(self, other) -> "ParserElement": """ Implementation of ``-`` operator when left operand is not a :class:`ParserElement` """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return other - self def __mul__(self, other) -> "ParserElement": """ Implementation of ``*`` operator, allows use of ``expr * 3`` in place of ``expr + expr + expr``. Expressions may also be multiplied by a 2-integer tuple, similar to ``{min, max}`` multipliers in regular expressions. Tuples may also include ``None`` as in: - ``expr*(n, None)`` or ``expr*(n, )`` is equivalent to ``expr*n + ZeroOrMore(expr)`` (read as "at least n instances of ``expr``") - ``expr*(None, n)`` is equivalent to ``expr*(0, n)`` (read as "0 to n instances of ``expr``") - ``expr*(None, None)`` is equivalent to ``ZeroOrMore(expr)`` - ``expr*(1, None)`` is equivalent to ``OneOrMore(expr)`` Note that ``expr*(None, n)`` does not raise an exception if more than n exprs exist in the input stream; that is, ``expr*(None, n)`` does not enforce a maximum number of expr occurrences. If this behavior is desired, then write ``expr*(None, n) + ~expr`` """ if other is Ellipsis: other = (0, None) elif isinstance(other, tuple) and other[:1] == (Ellipsis,): other = ((0,) + other[1:] + (None,))[:2] if isinstance(other, int): minElements, optElements = other, 0 elif isinstance(other, tuple): other = tuple(o if o is not Ellipsis else None for o in other) other = (other + (None, None))[:2] if other[0] is None: other = (0, other[1]) if isinstance(other[0], int) and other[1] is None: if other[0] == 0: return ZeroOrMore(self) if other[0] == 1: return OneOrMore(self) else: return self * other[0] + ZeroOrMore(self) elif isinstance(other[0], int) and isinstance(other[1], int): minElements, optElements = other optElements -= minElements else: raise TypeError( "cannot multiply ParserElement and ({}) objects".format( ",".join(type(item).__name__ for item in other) ) ) else: raise TypeError( "cannot multiply ParserElement and {} objects".format( type(other).__name__ ) ) if minElements < 0: raise ValueError("cannot multiply ParserElement by negative value") if optElements < 0: raise ValueError( "second tuple value must be greater or equal to first tuple value" ) if minElements == optElements == 0: return And([]) if optElements: def makeOptionalList(n): if n > 1: return Opt(self + makeOptionalList(n - 1)) else: return Opt(self) if minElements: if minElements == 1: ret = self + makeOptionalList(optElements) else: ret = And([self] * minElements) + makeOptionalList(optElements) else: ret = makeOptionalList(optElements) else: if minElements == 1: ret = self else: ret = And([self] * minElements) return ret def __rmul__(self, other) -> "ParserElement": return self.__mul__(other) def __or__(self, other) -> "ParserElement": """ Implementation of ``|`` operator - returns :class:`MatchFirst` """ if other is Ellipsis: return _PendingSkip(self, must_skip=True) if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return MatchFirst([self, other]) def __ror__(self, other) -> "ParserElement": """ Implementation of ``|`` operator when left operand is not a :class:`ParserElement` """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return other | self def __xor__(self, other) -> "ParserElement": """ Implementation of ``^`` operator - returns :class:`Or` """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return Or([self, other]) def __rxor__(self, other) -> "ParserElement": """ Implementation of ``^`` operator when left operand is not a :class:`ParserElement` """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return other ^ self def __and__(self, other) -> "ParserElement": """ Implementation of ``&`` operator - returns :class:`Each` """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return Each([self, other]) def __rand__(self, other) -> "ParserElement": """ Implementation of ``&`` operator when left operand is not a :class:`ParserElement` """ if isinstance(other, str_type): other = self._literalStringClass(other) if not isinstance(other, ParserElement): raise TypeError( "Cannot combine element of type {} with ParserElement".format( type(other).__name__ ) ) return other & self def __invert__(self) -> "ParserElement": """ Implementation of ``~`` operator - returns :class:`NotAny` """ return NotAny(self) # disable __iter__ to override legacy use of sequential access to __getitem__ to # iterate over a sequence __iter__ = None def __getitem__(self, key): """ use ``[]`` indexing notation as a short form for expression repetition: - ``expr[n]`` is equivalent to ``expr*n`` - ``expr[m, n]`` is equivalent to ``expr*(m, n)`` - ``expr[n, ...]`` or ``expr[n,]`` is equivalent to ``expr*n + ZeroOrMore(expr)`` (read as "at least n instances of ``expr``") - ``expr[..., n]`` is equivalent to ``expr*(0, n)`` (read as "0 to n instances of ``expr``") - ``expr[...]`` and ``expr[0, ...]`` are equivalent to ``ZeroOrMore(expr)`` - ``expr[1, ...]`` is equivalent to ``OneOrMore(expr)`` ``None`` may be used in place of ``...``. Note that ``expr[..., n]`` and ``expr[m, n]``do not raise an exception if more than ``n`` ``expr``s exist in the input stream. If this behavior is desired, then write ``expr[..., n] + ~expr``. """ # convert single arg keys to tuples try: if isinstance(key, str_type): key = (key,) iter(key) except TypeError: key = (key, key) if len(key) > 2: raise TypeError( "only 1 or 2 index arguments supported ({}{})".format( key[:5], "... [{}]".format(len(key)) if len(key) > 5 else "" ) ) # clip to 2 elements ret = self * tuple(key[:2]) return ret def __call__(self, name: str = None) -> "ParserElement": """ Shortcut for :class:`set_results_name`, with ``list_all_matches=False``. If ``name`` is given with a trailing ``'*'`` character, then ``list_all_matches`` will be passed as ``True``. If ``name` is omitted, same as calling :class:`copy`. Example:: # these are equivalent userdata = Word(alphas).set_results_name("name") + Word(nums + "-").set_results_name("socsecno") userdata = Word(alphas)("name") + Word(nums + "-")("socsecno") """ if name is not None: return self._setResultsName(name) else: return self.copy() def suppress(self) -> "ParserElement": """ Suppresses the output of this :class:`ParserElement`; useful to keep punctuation from cluttering up returned output. """ return Suppress(self) def ignore_whitespace(self, recursive: bool = True) -> "ParserElement": """ Enables the skipping of whitespace before matching the characters in the :class:`ParserElement`'s defined pattern. :param recursive: If ``True`` (the default), also enable whitespace skipping in child elements (if any) """ self.skipWhitespace = True return self def leave_whitespace(self, recursive: bool = True) -> "ParserElement": """ Disables the skipping of whitespace before matching the characters in the :class:`ParserElement`'s defined pattern. This is normally only used internally by the pyparsing module, but may be needed in some whitespace-sensitive grammars. :param recursive: If true (the default), also disable whitespace skipping in child elements (if any) """ self.skipWhitespace = False return self def set_whitespace_chars( self, chars: Union[Set[str], str], copy_defaults: bool = False ) -> "ParserElement": """ Overrides the default whitespace chars """ self.skipWhitespace = True self.whiteChars = set(chars) self.copyDefaultWhiteChars = copy_defaults return self def parse_with_tabs(self) -> "ParserElement": """ Overrides default behavior to expand ```` s to spaces before parsing the input string. Must be called before ``parse_string`` when the input grammar contains elements that match ```` characters. """ self.keepTabs = True return self def ignore(self, other: "ParserElement") -> "ParserElement": """ Define expression to be ignored (e.g., comments) while doing pattern matching; may be called repeatedly, to define multiple comment or other ignorable patterns. Example:: patt = Word(alphas)[1, ...] patt.parse_string('ablaj /* comment */ lskjd') # -> ['ablaj'] patt.ignore(c_style_comment) patt.parse_string('ablaj /* comment */ lskjd') # -> ['ablaj', 'lskjd'] """ import typing if isinstance(other, str_type): other = Suppress(other) if isinstance(other, Suppress): if other not in self.ignoreExprs: self.ignoreExprs.append(other) else: self.ignoreExprs.append(Suppress(other.copy())) return self def set_debug_actions( self, start_action: DebugStartAction, success_action: DebugSuccessAction, exception_action: DebugExceptionAction, ) -> "ParserElement": """ Customize display of debugging messages while doing pattern matching: - ``start_action`` - method to be called when an expression is about to be parsed; should have the signature ``fn(input_string: str, location: int, expression: ParserElement, cache_hit: bool)`` - ``success_action`` - method to be called when an expression has successfully parsed; should have the signature ``fn(input_string: str, start_location: int, end_location: int, expression: ParserELement, parsed_tokens: ParseResults, cache_hit: bool)`` - ``exception_action`` - method to be called when expression fails to parse; should have the signature ``fn(input_string: str, location: int, expression: ParserElement, exception: Exception, cache_hit: bool)`` """ self.debugActions = self.DebugActions( start_action or _default_start_debug_action, success_action or _default_success_debug_action, exception_action or _default_exception_debug_action, ) self.debug = True return self def set_debug(self, flag: bool = True) -> "ParserElement": """ Enable display of debugging messages while doing pattern matching. Set ``flag`` to ``True`` to enable, ``False`` to disable. Example:: wd = Word(alphas).set_name("alphaword") integer = Word(nums).set_name("numword") term = wd | integer # turn on debugging for wd wd.set_debug() term[1, ...].parse_string("abc 123 xyz 890") prints:: Match alphaword at loc 0(1,1) Matched alphaword -> ['abc'] Match alphaword at loc 3(1,4) Exception raised:Expected alphaword (at char 4), (line:1, col:5) Match alphaword at loc 7(1,8) Matched alphaword -> ['xyz'] Match alphaword at loc 11(1,12) Exception raised:Expected alphaword (at char 12), (line:1, col:13) Match alphaword at loc 15(1,16) Exception raised:Expected alphaword (at char 15), (line:1, col:16) The output shown is that produced by the default debug actions - custom debug actions can be specified using :class:`set_debug_actions`. Prior to attempting to match the ``wd`` expression, the debugging message ``"Match at loc (,)"`` is shown. Then if the parse succeeds, a ``"Matched"`` message is shown, or an ``"Exception raised"`` message is shown. Also note the use of :class:`set_name` to assign a human-readable name to the expression, which makes debugging and exception messages easier to understand - for instance, the default name created for the :class:`Word` expression without calling ``set_name`` is ``"W:(A-Za-z)"``. """ if flag: self.set_debug_actions( _default_start_debug_action, _default_success_debug_action, _default_exception_debug_action, ) else: self.debug = False return self @property def default_name(self) -> str: if self._defaultName is None: self._defaultName = self._generateDefaultName() return self._defaultName @abstractmethod def _generateDefaultName(self): """ Child classes must define this method, which defines how the ``default_name`` is set. """ def set_name(self, name: str) -> "ParserElement": """ Define name for this expression, makes debugging and exception messages clearer. Example:: Word(nums).parse_string("ABC") # -> Exception: Expected W:(0-9) (at char 0), (line:1, col:1) Word(nums).set_name("integer").parse_string("ABC") # -> Exception: Expected integer (at char 0), (line:1, col:1) """ self.customName = name self.errmsg = "Expected " + self.name if __diag__.enable_debug_on_named_expressions: self.set_debug() return self @property def name(self) -> str: # This will use a user-defined name if available, but otherwise defaults back to the auto-generated name return self.customName if self.customName is not None else self.default_name def __str__(self) -> str: return self.name def __repr__(self) -> str: return str(self) def streamline(self) -> "ParserElement": self.streamlined = True self._defaultName = None return self def recurse(self) -> Sequence["ParserElement"]: return [] def _checkRecursion(self, parseElementList): subRecCheckList = parseElementList[:] + [self] for e in self.recurse(): e._checkRecursion(subRecCheckList) def validate(self, validateTrace=None) -> None: """ Check defined expressions for valid structure, check for infinite recursive definitions. """ self._checkRecursion([]) def parse_file( self, file_or_filename: Union[str, Path, TextIO], encoding: str = "utf-8", parse_all: bool = False, *, parseAll: bool = False, ) -> ParseResults: """ Execute the parse expression on the given file or filename. If a filename is specified (instead of a file object), the entire file is opened, read, and closed before parsing. """ parseAll = parseAll or parse_all try: file_contents = file_or_filename.read() except AttributeError: with open(file_or_filename, "r", encoding=encoding) as f: file_contents = f.read() try: return self.parse_string(file_contents, parseAll) except ParseBaseException as exc: if ParserElement.verbose_stacktrace: raise else: # catch and re-raise exception from here, clears out pyparsing internal stack trace raise exc.with_traceback(None) def __eq__(self, other): if self is other: return True elif isinstance(other, str_type): return self.matches(other, parse_all=True) elif isinstance(other, ParserElement): return vars(self) == vars(other) return False def __hash__(self): return id(self) def matches( self, test_string: str, parse_all: bool = True, *, parseAll: bool = True ) -> bool: """ Method for quick testing of a parser against a test string. Good for simple inline microtests of sub expressions while building up larger parser. Parameters: - ``test_string`` - to test against this expression for a match - ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests Example:: expr = Word(nums) assert expr.matches("100") """ parseAll = parseAll and parse_all try: self.parse_string(str(test_string), parse_all=parseAll) return True except ParseBaseException: return False def run_tests( self, tests: Union[str, List[str]], parse_all: bool = True, comment: typing.Optional[Union["ParserElement", str]] = "#", full_dump: bool = True, print_results: bool = True, failure_tests: bool = False, post_parse: Callable[[str, ParseResults], str] = None, file: typing.Optional[TextIO] = None, with_line_numbers: bool = False, *, parseAll: bool = True, fullDump: bool = True, printResults: bool = True, failureTests: bool = False, postParse: Callable[[str, ParseResults], str] = None, ) -> Tuple[bool, List[Tuple[str, Union[ParseResults, Exception]]]]: """ Execute the parse expression on a series of test strings, showing each test, the parsed results or where the parse failed. Quick and easy way to run a parse expression against a list of sample strings. Parameters: - ``tests`` - a list of separate test strings, or a multiline string of test strings - ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests - ``comment`` - (default= ``'#'``) - expression for indicating embedded comments in the test string; pass None to disable comment filtering - ``full_dump`` - (default= ``True``) - dump results as list followed by results names in nested outline; if False, only dump nested list - ``print_results`` - (default= ``True``) prints test output to stdout - ``failure_tests`` - (default= ``False``) indicates if these tests are expected to fail parsing - ``post_parse`` - (default= ``None``) optional callback for successful parse results; called as `fn(test_string, parse_results)` and returns a string to be added to the test output - ``file`` - (default= ``None``) optional file-like object to which test output will be written; if None, will default to ``sys.stdout`` - ``with_line_numbers`` - default= ``False``) show test strings with line and column numbers Returns: a (success, results) tuple, where success indicates that all tests succeeded (or failed if ``failure_tests`` is True), and the results contain a list of lines of each test's output Example:: number_expr = pyparsing_common.number.copy() result = number_expr.run_tests(''' # unsigned integer 100 # negative integer -100 # float with scientific notation 6.02e23 # integer with scientific notation 1e-12 ''') print("Success" if result[0] else "Failed!") result = number_expr.run_tests(''' # stray character 100Z # missing leading digit before '.' -.100 # too many '.' 3.14.159 ''', failure_tests=True) print("Success" if result[0] else "Failed!") prints:: # unsigned integer 100 [100] # negative integer -100 [-100] # float with scientific notation 6.02e23 [6.02e+23] # integer with scientific notation 1e-12 [1e-12] Success # stray character 100Z ^ FAIL: Expected end of text (at char 3), (line:1, col:4) # missing leading digit before '.' -.100 ^ FAIL: Expected {real number with scientific notation | real number | signed integer} (at char 0), (line:1, col:1) # too many '.' 3.14.159 ^ FAIL: Expected end of text (at char 4), (line:1, col:5) Success Each test string must be on a single line. If you want to test a string that spans multiple lines, create a test like this:: expr.run_tests(r"this is a test\\n of strings that spans \\n 3 lines") (Note that this is a raw string literal, you must include the leading ``'r'``.) """ from .testing import pyparsing_test parseAll = parseAll and parse_all fullDump = fullDump and full_dump printResults = printResults and print_results failureTests = failureTests or failure_tests postParse = postParse or post_parse if isinstance(tests, str_type): line_strip = type(tests).strip tests = [line_strip(test_line) for test_line in tests.rstrip().splitlines()] if isinstance(comment, str_type): comment = Literal(comment) if file is None: file = sys.stdout print_ = file.write result: Union[ParseResults, Exception] allResults = [] comments = [] success = True NL = Literal(r"\n").add_parse_action(replace_with("\n")).ignore(quoted_string) BOM = "\ufeff" for t in tests: if comment is not None and comment.matches(t, False) or comments and not t: comments.append( pyparsing_test.with_line_numbers(t) if with_line_numbers else t ) continue if not t: continue out = [ "\n" + "\n".join(comments) if comments else "", pyparsing_test.with_line_numbers(t) if with_line_numbers else t, ] comments = [] try: # convert newline marks to actual newlines, and strip leading BOM if present t = NL.transform_string(t.lstrip(BOM)) result = self.parse_string(t, parse_all=parseAll) except ParseBaseException as pe: fatal = "(FATAL)" if isinstance(pe, ParseFatalException) else "" out.append(pe.explain()) out.append("FAIL: " + str(pe)) if ParserElement.verbose_stacktrace: out.extend(traceback.format_tb(pe.__traceback__)) success = success and failureTests result = pe except Exception as exc: out.append("FAIL-EXCEPTION: {}: {}".format(type(exc).__name__, exc)) if ParserElement.verbose_stacktrace: out.extend(traceback.format_tb(exc.__traceback__)) success = success and failureTests result = exc else: success = success and not failureTests if postParse is not None: try: pp_value = postParse(t, result) if pp_value is not None: if isinstance(pp_value, ParseResults): out.append(pp_value.dump()) else: out.append(str(pp_value)) else: out.append(result.dump()) except Exception as e: out.append(result.dump(full=fullDump)) out.append( "{} failed: {}: {}".format( postParse.__name__, type(e).__name__, e ) ) else: out.append(result.dump(full=fullDump)) out.append("") if printResults: print_("\n".join(out)) allResults.append((t, result)) return success, allResults def create_diagram( self, output_html: Union[TextIO, Path, str], vertical: int = 3, show_results_names: bool = False, show_groups: bool = False, **kwargs, ) -> None: """ Create a railroad diagram for the parser. Parameters: - output_html (str or file-like object) - output target for generated diagram HTML - vertical (int) - threshold for formatting multiple alternatives vertically instead of horizontally (default=3) - show_results_names - bool flag whether diagram should show annotations for defined results names - show_groups - bool flag whether groups should be highlighted with an unlabeled surrounding box Additional diagram-formatting keyword arguments can also be included; see railroad.Diagram class. """ try: from .diagram import to_railroad, railroad_to_html except ImportError as ie: raise Exception( "must ``pip install pyparsing[diagrams]`` to generate parser railroad diagrams" ) from ie self.streamline() railroad = to_railroad( self, vertical=vertical, show_results_names=show_results_names, show_groups=show_groups, diagram_kwargs=kwargs, ) if isinstance(output_html, (str, Path)): with open(output_html, "w", encoding="utf-8") as diag_file: diag_file.write(railroad_to_html(railroad)) else: # we were passed a file-like object, just write to it output_html.write(railroad_to_html(railroad)) setDefaultWhitespaceChars = set_default_whitespace_chars inlineLiteralsUsing = inline_literals_using setResultsName = set_results_name setBreak = set_break setParseAction = set_parse_action addParseAction = add_parse_action addCondition = add_condition setFailAction = set_fail_action tryParse = try_parse canParseNext = can_parse_next resetCache = reset_cache enableLeftRecursion = enable_left_recursion enablePackrat = enable_packrat parseString = parse_string scanString = scan_string searchString = search_string transformString = transform_string setWhitespaceChars = set_whitespace_chars parseWithTabs = parse_with_tabs setDebugActions = set_debug_actions setDebug = set_debug defaultName = default_name setName = set_name parseFile = parse_file runTests = run_tests ignoreWhitespace = ignore_whitespace leaveWhitespace = leave_whitespace class _PendingSkip(ParserElement): # internal placeholder class to hold a place were '...' is added to a parser element, # once another ParserElement is added, this placeholder will be replaced with a SkipTo def __init__(self, expr: ParserElement, must_skip: bool = False): super().__init__() self.anchor = expr self.must_skip = must_skip def _generateDefaultName(self): return str(self.anchor + Empty()).replace("Empty", "...") def __add__(self, other) -> "ParserElement": skipper = SkipTo(other).set_name("...")("_skipped*") if self.must_skip: def must_skip(t): if not t._skipped or t._skipped.as_list() == [""]: del t[0] t.pop("_skipped", None) def show_skip(t): if t._skipped.as_list()[-1:] == [""]: t.pop("_skipped") t["_skipped"] = "missing <" + repr(self.anchor) + ">" return ( self.anchor + skipper().add_parse_action(must_skip) | skipper().add_parse_action(show_skip) ) + other return self.anchor + skipper + other def __repr__(self): return self.defaultName def parseImpl(self, *args): raise Exception( "use of `...` expression without following SkipTo target expression" ) class Token(ParserElement): """Abstract :class:`ParserElement` subclass, for defining atomic matching patterns. """ def __init__(self): super().__init__(savelist=False) def _generateDefaultName(self): return type(self).__name__ class Empty(Token): """ An empty token, will always match. """ def __init__(self): super().__init__() self.mayReturnEmpty = True self.mayIndexError = False class NoMatch(Token): """ A token that will never match. """ def __init__(self): super().__init__() self.mayReturnEmpty = True self.mayIndexError = False self.errmsg = "Unmatchable token" def parseImpl(self, instring, loc, doActions=True): raise ParseException(instring, loc, self.errmsg, self) class Literal(Token): """ Token to exactly match a specified string. Example:: Literal('blah').parse_string('blah') # -> ['blah'] Literal('blah').parse_string('blahfooblah') # -> ['blah'] Literal('blah').parse_string('bla') # -> Exception: Expected "blah" For case-insensitive matching, use :class:`CaselessLiteral`. For keyword matching (force word break before and after the matched string), use :class:`Keyword` or :class:`CaselessKeyword`. """ def __init__(self, match_string: str = "", *, matchString: str = ""): super().__init__() match_string = matchString or match_string self.match = match_string self.matchLen = len(match_string) try: self.firstMatchChar = match_string[0] except IndexError: raise ValueError("null string passed to Literal; use Empty() instead") self.errmsg = "Expected " + self.name self.mayReturnEmpty = False self.mayIndexError = False # Performance tuning: modify __class__ to select # a parseImpl optimized for single-character check if self.matchLen == 1 and type(self) is Literal: self.__class__ = _SingleCharLiteral def _generateDefaultName(self): return repr(self.match) def parseImpl(self, instring, loc, doActions=True): if instring[loc] == self.firstMatchChar and instring.startswith( self.match, loc ): return loc + self.matchLen, self.match raise ParseException(instring, loc, self.errmsg, self) class _SingleCharLiteral(Literal): def parseImpl(self, instring, loc, doActions=True): if instring[loc] == self.firstMatchChar: return loc + 1, self.match raise ParseException(instring, loc, self.errmsg, self) ParserElement._literalStringClass = Literal class Keyword(Token): """ Token to exactly match a specified string as a keyword, that is, it must be immediately followed by a non-keyword character. Compare with :class:`Literal`: - ``Literal("if")`` will match the leading ``'if'`` in ``'ifAndOnlyIf'``. - ``Keyword("if")`` will not; it will only match the leading ``'if'`` in ``'if x=1'``, or ``'if(y==2)'`` Accepts two optional constructor arguments in addition to the keyword string: - ``identChars`` is a string of characters that would be valid identifier characters, defaulting to all alphanumerics + "_" and "$" - ``caseless`` allows case-insensitive matching, default is ``False``. Example:: Keyword("start").parse_string("start") # -> ['start'] Keyword("start").parse_string("starting") # -> Exception For case-insensitive matching, use :class:`CaselessKeyword`. """ DEFAULT_KEYWORD_CHARS = alphanums + "_$" def __init__( self, match_string: str = "", ident_chars: typing.Optional[str] = None, caseless: bool = False, *, matchString: str = "", identChars: typing.Optional[str] = None, ): super().__init__() identChars = identChars or ident_chars if identChars is None: identChars = Keyword.DEFAULT_KEYWORD_CHARS match_string = matchString or match_string self.match = match_string self.matchLen = len(match_string) try: self.firstMatchChar = match_string[0] except IndexError: raise ValueError("null string passed to Keyword; use Empty() instead") self.errmsg = "Expected {} {}".format(type(self).__name__, self.name) self.mayReturnEmpty = False self.mayIndexError = False self.caseless = caseless if caseless: self.caselessmatch = match_string.upper() identChars = identChars.upper() self.identChars = set(identChars) def _generateDefaultName(self): return repr(self.match) def parseImpl(self, instring, loc, doActions=True): errmsg = self.errmsg errloc = loc if self.caseless: if instring[loc : loc + self.matchLen].upper() == self.caselessmatch: if loc == 0 or instring[loc - 1].upper() not in self.identChars: if ( loc >= len(instring) - self.matchLen or instring[loc + self.matchLen].upper() not in self.identChars ): return loc + self.matchLen, self.match else: # followed by keyword char errmsg += ", was immediately followed by keyword character" errloc = loc + self.matchLen else: # preceded by keyword char errmsg += ", keyword was immediately preceded by keyword character" errloc = loc - 1 # else no match just raise plain exception else: if ( instring[loc] == self.firstMatchChar and self.matchLen == 1 or instring.startswith(self.match, loc) ): if loc == 0 or instring[loc - 1] not in self.identChars: if ( loc >= len(instring) - self.matchLen or instring[loc + self.matchLen] not in self.identChars ): return loc + self.matchLen, self.match else: # followed by keyword char errmsg += ( ", keyword was immediately followed by keyword character" ) errloc = loc + self.matchLen else: # preceded by keyword char errmsg += ", keyword was immediately preceded by keyword character" errloc = loc - 1 # else no match just raise plain exception raise ParseException(instring, errloc, errmsg, self) @staticmethod def set_default_keyword_chars(chars) -> None: """ Overrides the default characters used by :class:`Keyword` expressions. """ Keyword.DEFAULT_KEYWORD_CHARS = chars setDefaultKeywordChars = set_default_keyword_chars class CaselessLiteral(Literal): """ Token to match a specified string, ignoring case of letters. Note: the matched results will always be in the case of the given match string, NOT the case of the input text. Example:: CaselessLiteral("CMD")[1, ...].parse_string("cmd CMD Cmd10") # -> ['CMD', 'CMD', 'CMD'] (Contrast with example for :class:`CaselessKeyword`.) """ def __init__(self, match_string: str = "", *, matchString: str = ""): match_string = matchString or match_string super().__init__(match_string.upper()) # Preserve the defining literal. self.returnString = match_string self.errmsg = "Expected " + self.name def parseImpl(self, instring, loc, doActions=True): if instring[loc : loc + self.matchLen].upper() == self.match: return loc + self.matchLen, self.returnString raise ParseException(instring, loc, self.errmsg, self) class CaselessKeyword(Keyword): """ Caseless version of :class:`Keyword`. Example:: CaselessKeyword("CMD")[1, ...].parse_string("cmd CMD Cmd10") # -> ['CMD', 'CMD'] (Contrast with example for :class:`CaselessLiteral`.) """ def __init__( self, match_string: str = "", ident_chars: typing.Optional[str] = None, *, matchString: str = "", identChars: typing.Optional[str] = None, ): identChars = identChars or ident_chars match_string = matchString or match_string super().__init__(match_string, identChars, caseless=True) class CloseMatch(Token): """A variation on :class:`Literal` which matches "close" matches, that is, strings with at most 'n' mismatching characters. :class:`CloseMatch` takes parameters: - ``match_string`` - string to be matched - ``caseless`` - a boolean indicating whether to ignore casing when comparing characters - ``max_mismatches`` - (``default=1``) maximum number of mismatches allowed to count as a match The results from a successful parse will contain the matched text from the input string and the following named results: - ``mismatches`` - a list of the positions within the match_string where mismatches were found - ``original`` - the original match_string used to compare against the input string If ``mismatches`` is an empty list, then the match was an exact match. Example:: patt = CloseMatch("ATCATCGAATGGA") patt.parse_string("ATCATCGAAXGGA") # -> (['ATCATCGAAXGGA'], {'mismatches': [[9]], 'original': ['ATCATCGAATGGA']}) patt.parse_string("ATCAXCGAAXGGA") # -> Exception: Expected 'ATCATCGAATGGA' (with up to 1 mismatches) (at char 0), (line:1, col:1) # exact match patt.parse_string("ATCATCGAATGGA") # -> (['ATCATCGAATGGA'], {'mismatches': [[]], 'original': ['ATCATCGAATGGA']}) # close match allowing up to 2 mismatches patt = CloseMatch("ATCATCGAATGGA", max_mismatches=2) patt.parse_string("ATCAXCGAAXGGA") # -> (['ATCAXCGAAXGGA'], {'mismatches': [[4, 9]], 'original': ['ATCATCGAATGGA']}) """ def __init__( self, match_string: str, max_mismatches: int = None, *, maxMismatches: int = 1, caseless=False, ): maxMismatches = max_mismatches if max_mismatches is not None else maxMismatches super().__init__() self.match_string = match_string self.maxMismatches = maxMismatches self.errmsg = "Expected {!r} (with up to {} mismatches)".format( self.match_string, self.maxMismatches ) self.caseless = caseless self.mayIndexError = False self.mayReturnEmpty = False def _generateDefaultName(self): return "{}:{!r}".format(type(self).__name__, self.match_string) def parseImpl(self, instring, loc, doActions=True): start = loc instrlen = len(instring) maxloc = start + len(self.match_string) if maxloc <= instrlen: match_string = self.match_string match_stringloc = 0 mismatches = [] maxMismatches = self.maxMismatches for match_stringloc, s_m in enumerate( zip(instring[loc:maxloc], match_string) ): src, mat = s_m if self.caseless: src, mat = src.lower(), mat.lower() if src != mat: mismatches.append(match_stringloc) if len(mismatches) > maxMismatches: break else: loc = start + match_stringloc + 1 results = ParseResults([instring[start:loc]]) results["original"] = match_string results["mismatches"] = mismatches return loc, results raise ParseException(instring, loc, self.errmsg, self) class Word(Token): """Token for matching words composed of allowed character sets. Parameters: - ``init_chars`` - string of all characters that should be used to match as a word; "ABC" will match "AAA", "ABAB", "CBAC", etc.; if ``body_chars`` is also specified, then this is the string of initial characters - ``body_chars`` - string of characters that can be used for matching after a matched initial character as given in ``init_chars``; if omitted, same as the initial characters (default=``None``) - ``min`` - minimum number of characters to match (default=1) - ``max`` - maximum number of characters to match (default=0) - ``exact`` - exact number of characters to match (default=0) - ``as_keyword`` - match as a keyword (default=``False``) - ``exclude_chars`` - characters that might be found in the input ``body_chars`` string but which should not be accepted for matching ;useful to define a word of all printables except for one or two characters, for instance (default=``None``) :class:`srange` is useful for defining custom character set strings for defining :class:`Word` expressions, using range notation from regular expression character sets. A common mistake is to use :class:`Word` to match a specific literal string, as in ``Word("Address")``. Remember that :class:`Word` uses the string argument to define *sets* of matchable characters. This expression would match "Add", "AAA", "dAred", or any other word made up of the characters 'A', 'd', 'r', 'e', and 's'. To match an exact literal string, use :class:`Literal` or :class:`Keyword`. pyparsing includes helper strings for building Words: - :class:`alphas` - :class:`nums` - :class:`alphanums` - :class:`hexnums` - :class:`alphas8bit` (alphabetic characters in ASCII range 128-255 - accented, tilded, umlauted, etc.) - :class:`punc8bit` (non-alphabetic characters in ASCII range 128-255 - currency, symbols, superscripts, diacriticals, etc.) - :class:`printables` (any non-whitespace character) ``alphas``, ``nums``, and ``printables`` are also defined in several Unicode sets - see :class:`pyparsing_unicode``. Example:: # a word composed of digits integer = Word(nums) # equivalent to Word("0123456789") or Word(srange("0-9")) # a word with a leading capital, and zero or more lowercase capital_word = Word(alphas.upper(), alphas.lower()) # hostnames are alphanumeric, with leading alpha, and '-' hostname = Word(alphas, alphanums + '-') # roman numeral (not a strict parser, accepts invalid mix of characters) roman = Word("IVXLCDM") # any string of non-whitespace characters, except for ',' csv_value = Word(printables, exclude_chars=",") """ def __init__( self, init_chars: str = "", body_chars: typing.Optional[str] = None, min: int = 1, max: int = 0, exact: int = 0, as_keyword: bool = False, exclude_chars: typing.Optional[str] = None, *, initChars: typing.Optional[str] = None, bodyChars: typing.Optional[str] = None, asKeyword: bool = False, excludeChars: typing.Optional[str] = None, ): initChars = initChars or init_chars bodyChars = bodyChars or body_chars asKeyword = asKeyword or as_keyword excludeChars = excludeChars or exclude_chars super().__init__() if not initChars: raise ValueError( "invalid {}, initChars cannot be empty string".format( type(self).__name__ ) ) initChars = set(initChars) self.initChars = initChars if excludeChars: excludeChars = set(excludeChars) initChars -= excludeChars if bodyChars: bodyChars = set(bodyChars) - excludeChars self.initCharsOrig = "".join(sorted(initChars)) if bodyChars: self.bodyCharsOrig = "".join(sorted(bodyChars)) self.bodyChars = set(bodyChars) else: self.bodyCharsOrig = "".join(sorted(initChars)) self.bodyChars = set(initChars) self.maxSpecified = max > 0 if min < 1: raise ValueError( "cannot specify a minimum length < 1; use Opt(Word()) if zero-length word is permitted" ) self.minLen = min if max > 0: self.maxLen = max else: self.maxLen = _MAX_INT if exact > 0: self.maxLen = exact self.minLen = exact self.errmsg = "Expected " + self.name self.mayIndexError = False self.asKeyword = asKeyword # see if we can make a regex for this Word if " " not in self.initChars | self.bodyChars and (min == 1 and exact == 0): if self.bodyChars == self.initChars: if max == 0: repeat = "+" elif max == 1: repeat = "" else: repeat = "{{{},{}}}".format( self.minLen, "" if self.maxLen == _MAX_INT else self.maxLen ) self.reString = "[{}]{}".format( _collapse_string_to_ranges(self.initChars), repeat, ) elif len(self.initChars) == 1: if max == 0: repeat = "*" else: repeat = "{{0,{}}}".format(max - 1) self.reString = "{}[{}]{}".format( re.escape(self.initCharsOrig), _collapse_string_to_ranges(self.bodyChars), repeat, ) else: if max == 0: repeat = "*" elif max == 2: repeat = "" else: repeat = "{{0,{}}}".format(max - 1) self.reString = "[{}][{}]{}".format( _collapse_string_to_ranges(self.initChars), _collapse_string_to_ranges(self.bodyChars), repeat, ) if self.asKeyword: self.reString = r"\b" + self.reString + r"\b" try: self.re = re.compile(self.reString) except re.error: self.re = None else: self.re_match = self.re.match self.__class__ = _WordRegex def _generateDefaultName(self): def charsAsStr(s): max_repr_len = 16 s = _collapse_string_to_ranges(s, re_escape=False) if len(s) > max_repr_len: return s[: max_repr_len - 3] + "..." else: return s if self.initChars != self.bodyChars: base = "W:({}, {})".format( charsAsStr(self.initChars), charsAsStr(self.bodyChars) ) else: base = "W:({})".format(charsAsStr(self.initChars)) # add length specification if self.minLen > 1 or self.maxLen != _MAX_INT: if self.minLen == self.maxLen: if self.minLen == 1: return base[2:] else: return base + "{{{}}}".format(self.minLen) elif self.maxLen == _MAX_INT: return base + "{{{},...}}".format(self.minLen) else: return base + "{{{},{}}}".format(self.minLen, self.maxLen) return base def parseImpl(self, instring, loc, doActions=True): if instring[loc] not in self.initChars: raise ParseException(instring, loc, self.errmsg, self) start = loc loc += 1 instrlen = len(instring) bodychars = self.bodyChars maxloc = start + self.maxLen maxloc = min(maxloc, instrlen) while loc < maxloc and instring[loc] in bodychars: loc += 1 throwException = False if loc - start < self.minLen: throwException = True elif self.maxSpecified and loc < instrlen and instring[loc] in bodychars: throwException = True elif self.asKeyword: if ( start > 0 and instring[start - 1] in bodychars or loc < instrlen and instring[loc] in bodychars ): throwException = True if throwException: raise ParseException(instring, loc, self.errmsg, self) return loc, instring[start:loc] class _WordRegex(Word): def parseImpl(self, instring, loc, doActions=True): result = self.re_match(instring, loc) if not result: raise ParseException(instring, loc, self.errmsg, self) loc = result.end() return loc, result.group() class Char(_WordRegex): """A short-cut class for defining :class:`Word` ``(characters, exact=1)``, when defining a match of any single character in a string of characters. """ def __init__( self, charset: str, as_keyword: bool = False, exclude_chars: typing.Optional[str] = None, *, asKeyword: bool = False, excludeChars: typing.Optional[str] = None, ): asKeyword = asKeyword or as_keyword excludeChars = excludeChars or exclude_chars super().__init__( charset, exact=1, asKeyword=asKeyword, excludeChars=excludeChars ) self.reString = "[{}]".format(_collapse_string_to_ranges(self.initChars)) if asKeyword: self.reString = r"\b{}\b".format(self.reString) self.re = re.compile(self.reString) self.re_match = self.re.match class Regex(Token): r"""Token for matching strings that match a given regular expression. Defined with string specifying the regular expression in a form recognized by the stdlib Python `re module `_. If the given regex contains named groups (defined using ``(?P...)``), these will be preserved as named :class:`ParseResults`. If instead of the Python stdlib ``re`` module you wish to use a different RE module (such as the ``regex`` module), you can do so by building your ``Regex`` object with a compiled RE that was compiled using ``regex``. Example:: realnum = Regex(r"[+-]?\d+\.\d*") # ref: https://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression roman = Regex(r"M{0,4}(CM|CD|D?{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})") # named fields in a regex will be returned as named results date = Regex(r'(?P\d{4})-(?P\d\d?)-(?P\d\d?)') # the Regex class will accept re's compiled using the regex module import regex parser = pp.Regex(regex.compile(r'[0-9]')) """ def __init__( self, pattern: Any, flags: Union[re.RegexFlag, int] = 0, as_group_list: bool = False, as_match: bool = False, *, asGroupList: bool = False, asMatch: bool = False, ): """The parameters ``pattern`` and ``flags`` are passed to the ``re.compile()`` function as-is. See the Python `re module `_ module for an explanation of the acceptable patterns and flags. """ super().__init__() asGroupList = asGroupList or as_group_list asMatch = asMatch or as_match if isinstance(pattern, str_type): if not pattern: raise ValueError("null string passed to Regex; use Empty() instead") self._re = None self.reString = self.pattern = pattern self.flags = flags elif hasattr(pattern, "pattern") and hasattr(pattern, "match"): self._re = pattern self.pattern = self.reString = pattern.pattern self.flags = flags else: raise TypeError( "Regex may only be constructed with a string or a compiled RE object" ) self.errmsg = "Expected " + self.name self.mayIndexError = False self.asGroupList = asGroupList self.asMatch = asMatch if self.asGroupList: self.parseImpl = self.parseImplAsGroupList if self.asMatch: self.parseImpl = self.parseImplAsMatch @cached_property def re(self): if self._re: return self._re else: try: return re.compile(self.pattern, self.flags) except re.error: raise ValueError( "invalid pattern ({!r}) passed to Regex".format(self.pattern) ) @cached_property def re_match(self): return self.re.match @cached_property def mayReturnEmpty(self): return self.re_match("") is not None def _generateDefaultName(self): return "Re:({})".format(repr(self.pattern).replace("\\\\", "\\")) def parseImpl(self, instring, loc, doActions=True): result = self.re_match(instring, loc) if not result: raise ParseException(instring, loc, self.errmsg, self) loc = result.end() ret = ParseResults(result.group()) d = result.groupdict() if d: for k, v in d.items(): ret[k] = v return loc, ret def parseImplAsGroupList(self, instring, loc, doActions=True): result = self.re_match(instring, loc) if not result: raise ParseException(instring, loc, self.errmsg, self) loc = result.end() ret = result.groups() return loc, ret def parseImplAsMatch(self, instring, loc, doActions=True): result = self.re_match(instring, loc) if not result: raise ParseException(instring, loc, self.errmsg, self) loc = result.end() ret = result return loc, ret def sub(self, repl: str) -> ParserElement: r""" Return :class:`Regex` with an attached parse action to transform the parsed result as if called using `re.sub(expr, repl, string) `_. Example:: make_html = Regex(r"(\w+):(.*?):").sub(r"<\1>\2") print(make_html.transform_string("h1:main title:")) # prints "

main title

" """ if self.asGroupList: raise TypeError("cannot use sub() with Regex(asGroupList=True)") if self.asMatch and callable(repl): raise TypeError("cannot use sub() with a callable with Regex(asMatch=True)") if self.asMatch: def pa(tokens): return tokens[0].expand(repl) else: def pa(tokens): return self.re.sub(repl, tokens[0]) return self.add_parse_action(pa) class QuotedString(Token): r""" Token for matching strings that are delimited by quoting characters. Defined with the following parameters: - ``quote_char`` - string of one or more characters defining the quote delimiting string - ``esc_char`` - character to re_escape quotes, typically backslash (default= ``None``) - ``esc_quote`` - special quote sequence to re_escape an embedded quote string (such as SQL's ``""`` to re_escape an embedded ``"``) (default= ``None``) - ``multiline`` - boolean indicating whether quotes can span multiple lines (default= ``False``) - ``unquote_results`` - boolean indicating whether the matched text should be unquoted (default= ``True``) - ``end_quote_char`` - string of one or more characters defining the end of the quote delimited string (default= ``None`` => same as quote_char) - ``convert_whitespace_escapes`` - convert escaped whitespace (``'\t'``, ``'\n'``, etc.) to actual whitespace (default= ``True``) Example:: qs = QuotedString('"') print(qs.search_string('lsjdf "This is the quote" sldjf')) complex_qs = QuotedString('{{', end_quote_char='}}') print(complex_qs.search_string('lsjdf {{This is the "quote"}} sldjf')) sql_qs = QuotedString('"', esc_quote='""') print(sql_qs.search_string('lsjdf "This is the quote with ""embedded"" quotes" sldjf')) prints:: [['This is the quote']] [['This is the "quote"']] [['This is the quote with "embedded" quotes']] """ ws_map = ((r"\t", "\t"), (r"\n", "\n"), (r"\f", "\f"), (r"\r", "\r")) def __init__( self, quote_char: str = "", esc_char: typing.Optional[str] = None, esc_quote: typing.Optional[str] = None, multiline: bool = False, unquote_results: bool = True, end_quote_char: typing.Optional[str] = None, convert_whitespace_escapes: bool = True, *, quoteChar: str = "", escChar: typing.Optional[str] = None, escQuote: typing.Optional[str] = None, unquoteResults: bool = True, endQuoteChar: typing.Optional[str] = None, convertWhitespaceEscapes: bool = True, ): super().__init__() escChar = escChar or esc_char escQuote = escQuote or esc_quote unquoteResults = unquoteResults and unquote_results endQuoteChar = endQuoteChar or end_quote_char convertWhitespaceEscapes = ( convertWhitespaceEscapes and convert_whitespace_escapes ) quote_char = quoteChar or quote_char # remove white space from quote chars - wont work anyway quote_char = quote_char.strip() if not quote_char: raise ValueError("quote_char cannot be the empty string") if endQuoteChar is None: endQuoteChar = quote_char else: endQuoteChar = endQuoteChar.strip() if not endQuoteChar: raise ValueError("endQuoteChar cannot be the empty string") self.quoteChar = quote_char self.quoteCharLen = len(quote_char) self.firstQuoteChar = quote_char[0] self.endQuoteChar = endQuoteChar self.endQuoteCharLen = len(endQuoteChar) self.escChar = escChar self.escQuote = escQuote self.unquoteResults = unquoteResults self.convertWhitespaceEscapes = convertWhitespaceEscapes sep = "" inner_pattern = "" if escQuote: inner_pattern += r"{}(?:{})".format(sep, re.escape(escQuote)) sep = "|" if escChar: inner_pattern += r"{}(?:{}.)".format(sep, re.escape(escChar)) sep = "|" self.escCharReplacePattern = re.escape(self.escChar) + "(.)" if len(self.endQuoteChar) > 1: inner_pattern += ( "{}(?:".format(sep) + "|".join( "(?:{}(?!{}))".format( re.escape(self.endQuoteChar[:i]), re.escape(self.endQuoteChar[i:]), ) for i in range(len(self.endQuoteChar) - 1, 0, -1) ) + ")" ) sep = "|" if multiline: self.flags = re.MULTILINE | re.DOTALL inner_pattern += r"{}(?:[^{}{}])".format( sep, _escape_regex_range_chars(self.endQuoteChar[0]), (_escape_regex_range_chars(escChar) if escChar is not None else ""), ) else: self.flags = 0 inner_pattern += r"{}(?:[^{}\n\r{}])".format( sep, _escape_regex_range_chars(self.endQuoteChar[0]), (_escape_regex_range_chars(escChar) if escChar is not None else ""), ) self.pattern = "".join( [ re.escape(self.quoteChar), "(?:", inner_pattern, ")*", re.escape(self.endQuoteChar), ] ) try: self.re = re.compile(self.pattern, self.flags) self.reString = self.pattern self.re_match = self.re.match except re.error: raise ValueError( "invalid pattern {!r} passed to Regex".format(self.pattern) ) self.errmsg = "Expected " + self.name self.mayIndexError = False self.mayReturnEmpty = True def _generateDefaultName(self): if self.quoteChar == self.endQuoteChar and isinstance(self.quoteChar, str_type): return "string enclosed in {!r}".format(self.quoteChar) return "quoted string, starting with {} ending with {}".format( self.quoteChar, self.endQuoteChar ) def parseImpl(self, instring, loc, doActions=True): result = ( instring[loc] == self.firstQuoteChar and self.re_match(instring, loc) or None ) if not result: raise ParseException(instring, loc, self.errmsg, self) loc = result.end() ret = result.group() if self.unquoteResults: # strip off quotes ret = ret[self.quoteCharLen : -self.endQuoteCharLen] if isinstance(ret, str_type): # replace escaped whitespace if "\\" in ret and self.convertWhitespaceEscapes: for wslit, wschar in self.ws_map: ret = ret.replace(wslit, wschar) # replace escaped characters if self.escChar: ret = re.sub(self.escCharReplacePattern, r"\g<1>", ret) # replace escaped quotes if self.escQuote: ret = ret.replace(self.escQuote, self.endQuoteChar) return loc, ret class CharsNotIn(Token): """Token for matching words composed of characters *not* in a given set (will include whitespace in matched characters if not listed in the provided exclusion set - see example). Defined with string containing all disallowed characters, and an optional minimum, maximum, and/or exact length. The default value for ``min`` is 1 (a minimum value < 1 is not valid); the default values for ``max`` and ``exact`` are 0, meaning no maximum or exact length restriction. Example:: # define a comma-separated-value as anything that is not a ',' csv_value = CharsNotIn(',') print(delimited_list(csv_value).parse_string("dkls,lsdkjf,s12 34,@!#,213")) prints:: ['dkls', 'lsdkjf', 's12 34', '@!#', '213'] """ def __init__( self, not_chars: str = "", min: int = 1, max: int = 0, exact: int = 0, *, notChars: str = "", ): super().__init__() self.skipWhitespace = False self.notChars = not_chars or notChars self.notCharsSet = set(self.notChars) if min < 1: raise ValueError( "cannot specify a minimum length < 1; use " "Opt(CharsNotIn()) if zero-length char group is permitted" ) self.minLen = min if max > 0: self.maxLen = max else: self.maxLen = _MAX_INT if exact > 0: self.maxLen = exact self.minLen = exact self.errmsg = "Expected " + self.name self.mayReturnEmpty = self.minLen == 0 self.mayIndexError = False def _generateDefaultName(self): not_chars_str = _collapse_string_to_ranges(self.notChars) if len(not_chars_str) > 16: return "!W:({}...)".format(self.notChars[: 16 - 3]) else: return "!W:({})".format(self.notChars) def parseImpl(self, instring, loc, doActions=True): notchars = self.notCharsSet if instring[loc] in notchars: raise ParseException(instring, loc, self.errmsg, self) start = loc loc += 1 maxlen = min(start + self.maxLen, len(instring)) while loc < maxlen and instring[loc] not in notchars: loc += 1 if loc - start < self.minLen: raise ParseException(instring, loc, self.errmsg, self) return loc, instring[start:loc] class White(Token): """Special matching class for matching whitespace. Normally, whitespace is ignored by pyparsing grammars. This class is included when some whitespace structures are significant. Define with a string containing the whitespace characters to be matched; default is ``" \\t\\r\\n"``. Also takes optional ``min``, ``max``, and ``exact`` arguments, as defined for the :class:`Word` class. """ whiteStrs = { " ": "", "\t": "", "\n": "", "\r": "", "\f": "", "\u00A0": "", "\u1680": "", "\u180E": "", "\u2000": "", "\u2001": "", "\u2002": "", "\u2003": "", "\u2004": "", "\u2005": "", "\u2006": "", "\u2007": "", "\u2008": "", "\u2009": "", "\u200A": "", "\u200B": "", "\u202F": "", "\u205F": "", "\u3000": "", } def __init__(self, ws: str = " \t\r\n", min: int = 1, max: int = 0, exact: int = 0): super().__init__() self.matchWhite = ws self.set_whitespace_chars( "".join(c for c in self.whiteStrs if c not in self.matchWhite), copy_defaults=True, ) # self.leave_whitespace() self.mayReturnEmpty = True self.errmsg = "Expected " + self.name self.minLen = min if max > 0: self.maxLen = max else: self.maxLen = _MAX_INT if exact > 0: self.maxLen = exact self.minLen = exact def _generateDefaultName(self): return "".join(White.whiteStrs[c] for c in self.matchWhite) def parseImpl(self, instring, loc, doActions=True): if instring[loc] not in self.matchWhite: raise ParseException(instring, loc, self.errmsg, self) start = loc loc += 1 maxloc = start + self.maxLen maxloc = min(maxloc, len(instring)) while loc < maxloc and instring[loc] in self.matchWhite: loc += 1 if loc - start < self.minLen: raise ParseException(instring, loc, self.errmsg, self) return loc, instring[start:loc] class PositionToken(Token): def __init__(self): super().__init__() self.mayReturnEmpty = True self.mayIndexError = False class GoToColumn(PositionToken): """Token to advance to a specific column of input text; useful for tabular report scraping. """ def __init__(self, colno: int): super().__init__() self.col = colno def preParse(self, instring, loc): if col(loc, instring) != self.col: instrlen = len(instring) if self.ignoreExprs: loc = self._skipIgnorables(instring, loc) while ( loc < instrlen and instring[loc].isspace() and col(loc, instring) != self.col ): loc += 1 return loc def parseImpl(self, instring, loc, doActions=True): thiscol = col(loc, instring) if thiscol > self.col: raise ParseException(instring, loc, "Text not in expected column", self) newloc = loc + self.col - thiscol ret = instring[loc:newloc] return newloc, ret class LineStart(PositionToken): r"""Matches if current position is at the beginning of a line within the parse string Example:: test = '''\ AAA this line AAA and this line AAA but not this one B AAA and definitely not this one ''' for t in (LineStart() + 'AAA' + restOfLine).search_string(test): print(t) prints:: ['AAA', ' this line'] ['AAA', ' and this line'] """ def __init__(self): super().__init__() self.leave_whitespace() self.orig_whiteChars = set() | self.whiteChars self.whiteChars.discard("\n") self.skipper = Empty().set_whitespace_chars(self.whiteChars) self.errmsg = "Expected start of line" def preParse(self, instring, loc): if loc == 0: return loc else: ret = self.skipper.preParse(instring, loc) if "\n" in self.orig_whiteChars: while instring[ret : ret + 1] == "\n": ret = self.skipper.preParse(instring, ret + 1) return ret def parseImpl(self, instring, loc, doActions=True): if col(loc, instring) == 1: return loc, [] raise ParseException(instring, loc, self.errmsg, self) class LineEnd(PositionToken): """Matches if current position is at the end of a line within the parse string """ def __init__(self): super().__init__() self.whiteChars.discard("\n") self.set_whitespace_chars(self.whiteChars, copy_defaults=False) self.errmsg = "Expected end of line" def parseImpl(self, instring, loc, doActions=True): if loc < len(instring): if instring[loc] == "\n": return loc + 1, "\n" else: raise ParseException(instring, loc, self.errmsg, self) elif loc == len(instring): return loc + 1, [] else: raise ParseException(instring, loc, self.errmsg, self) class StringStart(PositionToken): """Matches if current position is at the beginning of the parse string """ def __init__(self): super().__init__() self.errmsg = "Expected start of text" def parseImpl(self, instring, loc, doActions=True): if loc != 0: # see if entire string up to here is just whitespace and ignoreables if loc != self.preParse(instring, 0): raise ParseException(instring, loc, self.errmsg, self) return loc, [] class StringEnd(PositionToken): """ Matches if current position is at the end of the parse string """ def __init__(self): super().__init__() self.errmsg = "Expected end of text" def parseImpl(self, instring, loc, doActions=True): if loc < len(instring): raise ParseException(instring, loc, self.errmsg, self) elif loc == len(instring): return loc + 1, [] elif loc > len(instring): return loc, [] else: raise ParseException(instring, loc, self.errmsg, self) class WordStart(PositionToken): """Matches if the current position is at the beginning of a :class:`Word`, and is not preceded by any character in a given set of ``word_chars`` (default= ``printables``). To emulate the ``\b`` behavior of regular expressions, use ``WordStart(alphanums)``. ``WordStart`` will also match at the beginning of the string being parsed, or at the beginning of a line. """ def __init__(self, word_chars: str = printables, *, wordChars: str = printables): wordChars = word_chars if wordChars == printables else wordChars super().__init__() self.wordChars = set(wordChars) self.errmsg = "Not at the start of a word" def parseImpl(self, instring, loc, doActions=True): if loc != 0: if ( instring[loc - 1] in self.wordChars or instring[loc] not in self.wordChars ): raise ParseException(instring, loc, self.errmsg, self) return loc, [] class WordEnd(PositionToken): """Matches if the current position is at the end of a :class:`Word`, and is not followed by any character in a given set of ``word_chars`` (default= ``printables``). To emulate the ``\b`` behavior of regular expressions, use ``WordEnd(alphanums)``. ``WordEnd`` will also match at the end of the string being parsed, or at the end of a line. """ def __init__(self, word_chars: str = printables, *, wordChars: str = printables): wordChars = word_chars if wordChars == printables else wordChars super().__init__() self.wordChars = set(wordChars) self.skipWhitespace = False self.errmsg = "Not at the end of a word" def parseImpl(self, instring, loc, doActions=True): instrlen = len(instring) if instrlen > 0 and loc < instrlen: if ( instring[loc] in self.wordChars or instring[loc - 1] not in self.wordChars ): raise ParseException(instring, loc, self.errmsg, self) return loc, [] class ParseExpression(ParserElement): """Abstract subclass of ParserElement, for combining and post-processing parsed tokens. """ def __init__(self, exprs: typing.Iterable[ParserElement], savelist: bool = False): super().__init__(savelist) self.exprs: List[ParserElement] if isinstance(exprs, _generatorType): exprs = list(exprs) if isinstance(exprs, str_type): self.exprs = [self._literalStringClass(exprs)] elif isinstance(exprs, ParserElement): self.exprs = [exprs] elif isinstance(exprs, Iterable): exprs = list(exprs) # if sequence of strings provided, wrap with Literal if any(isinstance(expr, str_type) for expr in exprs): exprs = ( self._literalStringClass(e) if isinstance(e, str_type) else e for e in exprs ) self.exprs = list(exprs) else: try: self.exprs = list(exprs) except TypeError: self.exprs = [exprs] self.callPreparse = False def recurse(self) -> Sequence[ParserElement]: return self.exprs[:] def append(self, other) -> ParserElement: self.exprs.append(other) self._defaultName = None return self def leave_whitespace(self, recursive: bool = True) -> ParserElement: """ Extends ``leave_whitespace`` defined in base class, and also invokes ``leave_whitespace`` on all contained expressions. """ super().leave_whitespace(recursive) if recursive: self.exprs = [e.copy() for e in self.exprs] for e in self.exprs: e.leave_whitespace(recursive) return self def ignore_whitespace(self, recursive: bool = True) -> ParserElement: """ Extends ``ignore_whitespace`` defined in base class, and also invokes ``leave_whitespace`` on all contained expressions. """ super().ignore_whitespace(recursive) if recursive: self.exprs = [e.copy() for e in self.exprs] for e in self.exprs: e.ignore_whitespace(recursive) return self def ignore(self, other) -> ParserElement: if isinstance(other, Suppress): if other not in self.ignoreExprs: super().ignore(other) for e in self.exprs: e.ignore(self.ignoreExprs[-1]) else: super().ignore(other) for e in self.exprs: e.ignore(self.ignoreExprs[-1]) return self def _generateDefaultName(self): return "{}:({})".format(self.__class__.__name__, str(self.exprs)) def streamline(self) -> ParserElement: if self.streamlined: return self super().streamline() for e in self.exprs: e.streamline() # collapse nested :class:`And`'s of the form ``And(And(And(a, b), c), d)`` to ``And(a, b, c, d)`` # but only if there are no parse actions or resultsNames on the nested And's # (likewise for :class:`Or`'s and :class:`MatchFirst`'s) if len(self.exprs) == 2: other = self.exprs[0] if ( isinstance(other, self.__class__) and not other.parseAction and other.resultsName is None and not other.debug ): self.exprs = other.exprs[:] + [self.exprs[1]] self._defaultName = None self.mayReturnEmpty |= other.mayReturnEmpty self.mayIndexError |= other.mayIndexError other = self.exprs[-1] if ( isinstance(other, self.__class__) and not other.parseAction and other.resultsName is None and not other.debug ): self.exprs = self.exprs[:-1] + other.exprs[:] self._defaultName = None self.mayReturnEmpty |= other.mayReturnEmpty self.mayIndexError |= other.mayIndexError self.errmsg = "Expected " + str(self) return self def validate(self, validateTrace=None) -> None: tmp = (validateTrace if validateTrace is not None else [])[:] + [self] for e in self.exprs: e.validate(tmp) self._checkRecursion([]) def copy(self) -> ParserElement: ret = super().copy() ret.exprs = [e.copy() for e in self.exprs] return ret def _setResultsName(self, name, listAllMatches=False): if ( __diag__.warn_ungrouped_named_tokens_in_collection and Diagnostics.warn_ungrouped_named_tokens_in_collection not in self.suppress_warnings_ ): for e in self.exprs: if ( isinstance(e, ParserElement) and e.resultsName and Diagnostics.warn_ungrouped_named_tokens_in_collection not in e.suppress_warnings_ ): warnings.warn( "{}: setting results name {!r} on {} expression " "collides with {!r} on contained expression".format( "warn_ungrouped_named_tokens_in_collection", name, type(self).__name__, e.resultsName, ), stacklevel=3, ) return super()._setResultsName(name, listAllMatches) ignoreWhitespace = ignore_whitespace leaveWhitespace = leave_whitespace class And(ParseExpression): """ Requires all given :class:`ParseExpression` s to be found in the given order. Expressions may be separated by whitespace. May be constructed using the ``'+'`` operator. May also be constructed using the ``'-'`` operator, which will suppress backtracking. Example:: integer = Word(nums) name_expr = Word(alphas)[1, ...] expr = And([integer("id"), name_expr("name"), integer("age")]) # more easily written as: expr = integer("id") + name_expr("name") + integer("age") """ class _ErrorStop(Empty): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.leave_whitespace() def _generateDefaultName(self): return "-" def __init__( self, exprs_arg: typing.Iterable[ParserElement], savelist: bool = True ): exprs: List[ParserElement] = list(exprs_arg) if exprs and Ellipsis in exprs: tmp = [] for i, expr in enumerate(exprs): if expr is Ellipsis: if i < len(exprs) - 1: skipto_arg: ParserElement = (Empty() + exprs[i + 1]).exprs[-1] tmp.append(SkipTo(skipto_arg)("_skipped*")) else: raise Exception( "cannot construct And with sequence ending in ..." ) else: tmp.append(expr) exprs[:] = tmp super().__init__(exprs, savelist) if self.exprs: self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs) if not isinstance(self.exprs[0], White): self.set_whitespace_chars( self.exprs[0].whiteChars, copy_defaults=self.exprs[0].copyDefaultWhiteChars, ) self.skipWhitespace = self.exprs[0].skipWhitespace else: self.skipWhitespace = False else: self.mayReturnEmpty = True self.callPreparse = True def streamline(self) -> ParserElement: # collapse any _PendingSkip's if self.exprs: if any( isinstance(e, ParseExpression) and e.exprs and isinstance(e.exprs[-1], _PendingSkip) for e in self.exprs[:-1] ): for i, e in enumerate(self.exprs[:-1]): if e is None: continue if ( isinstance(e, ParseExpression) and e.exprs and isinstance(e.exprs[-1], _PendingSkip) ): e.exprs[-1] = e.exprs[-1] + self.exprs[i + 1] self.exprs[i + 1] = None self.exprs = [e for e in self.exprs if e is not None] super().streamline() # link any IndentedBlocks to the prior expression for prev, cur in zip(self.exprs, self.exprs[1:]): # traverse cur or any first embedded expr of cur looking for an IndentedBlock # (but watch out for recursive grammar) seen = set() while cur: if id(cur) in seen: break seen.add(id(cur)) if isinstance(cur, IndentedBlock): prev.add_parse_action( lambda s, l, t, cur_=cur: setattr( cur_, "parent_anchor", col(l, s) ) ) break subs = cur.recurse() cur = next(iter(subs), None) self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs) return self def parseImpl(self, instring, loc, doActions=True): # pass False as callPreParse arg to _parse for first element, since we already # pre-parsed the string as part of our And pre-parsing loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False ) errorStop = False for e in self.exprs[1:]: # if isinstance(e, And._ErrorStop): if type(e) is And._ErrorStop: errorStop = True continue if errorStop: try: loc, exprtokens = e._parse(instring, loc, doActions) except ParseSyntaxException: raise except ParseBaseException as pe: pe.__traceback__ = None raise ParseSyntaxException._from_exception(pe) except IndexError: raise ParseSyntaxException( instring, len(instring), self.errmsg, self ) else: loc, exprtokens = e._parse(instring, loc, doActions) if exprtokens or exprtokens.haskeys(): resultlist += exprtokens return loc, resultlist def __iadd__(self, other): if isinstance(other, str_type): other = self._literalStringClass(other) return self.append(other) # And([self, other]) def _checkRecursion(self, parseElementList): subRecCheckList = parseElementList[:] + [self] for e in self.exprs: e._checkRecursion(subRecCheckList) if not e.mayReturnEmpty: break def _generateDefaultName(self): inner = " ".join(str(e) for e in self.exprs) # strip off redundant inner {}'s while len(inner) > 1 and inner[0 :: len(inner) - 1] == "{}": inner = inner[1:-1] return "{" + inner + "}" class Or(ParseExpression): """Requires that at least one :class:`ParseExpression` is found. If two expressions match, the expression that matches the longest string will be used. May be constructed using the ``'^'`` operator. Example:: # construct Or using '^' operator number = Word(nums) ^ Combine(Word(nums) + '.' + Word(nums)) print(number.search_string("123 3.1416 789")) prints:: [['123'], ['3.1416'], ['789']] """ def __init__(self, exprs: typing.Iterable[ParserElement], savelist: bool = False): super().__init__(exprs, savelist) if self.exprs: self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs) self.skipWhitespace = all(e.skipWhitespace for e in self.exprs) else: self.mayReturnEmpty = True def streamline(self) -> ParserElement: super().streamline() if self.exprs: self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs) self.saveAsList = any(e.saveAsList for e in self.exprs) self.skipWhitespace = all( e.skipWhitespace and not isinstance(e, White) for e in self.exprs ) else: self.saveAsList = False return self def parseImpl(self, instring, loc, doActions=True): maxExcLoc = -1 maxException = None matches = [] fatals = [] if all(e.callPreparse for e in self.exprs): loc = self.preParse(instring, loc) for e in self.exprs: try: loc2 = e.try_parse(instring, loc, raise_fatal=True) except ParseFatalException as pfe: pfe.__traceback__ = None pfe.parserElement = e fatals.append(pfe) maxException = None maxExcLoc = -1 except ParseException as err: if not fatals: err.__traceback__ = None if err.loc > maxExcLoc: maxException = err maxExcLoc = err.loc except IndexError: if len(instring) > maxExcLoc: maxException = ParseException( instring, len(instring), e.errmsg, self ) maxExcLoc = len(instring) else: # save match among all matches, to retry longest to shortest matches.append((loc2, e)) if matches: # re-evaluate all matches in descending order of length of match, in case attached actions # might change whether or how much they match of the input. matches.sort(key=itemgetter(0), reverse=True) if not doActions: # no further conditions or parse actions to change the selection of # alternative, so the first match will be the best match best_expr = matches[0][1] return best_expr._parse(instring, loc, doActions) longest = -1, None for loc1, expr1 in matches: if loc1 <= longest[0]: # already have a longer match than this one will deliver, we are done return longest try: loc2, toks = expr1._parse(instring, loc, doActions) except ParseException as err: err.__traceback__ = None if err.loc > maxExcLoc: maxException = err maxExcLoc = err.loc else: if loc2 >= loc1: return loc2, toks # didn't match as much as before elif loc2 > longest[0]: longest = loc2, toks if longest != (-1, None): return longest if fatals: if len(fatals) > 1: fatals.sort(key=lambda e: -e.loc) if fatals[0].loc == fatals[1].loc: fatals.sort(key=lambda e: (-e.loc, -len(str(e.parserElement)))) max_fatal = fatals[0] raise max_fatal if maxException is not None: maxException.msg = self.errmsg raise maxException else: raise ParseException( instring, loc, "no defined alternatives to match", self ) def __ixor__(self, other): if isinstance(other, str_type): other = self._literalStringClass(other) return self.append(other) # Or([self, other]) def _generateDefaultName(self): return "{" + " ^ ".join(str(e) for e in self.exprs) + "}" def _setResultsName(self, name, listAllMatches=False): if ( __diag__.warn_multiple_tokens_in_named_alternation and Diagnostics.warn_multiple_tokens_in_named_alternation not in self.suppress_warnings_ ): if any( isinstance(e, And) and Diagnostics.warn_multiple_tokens_in_named_alternation not in e.suppress_warnings_ for e in self.exprs ): warnings.warn( "{}: setting results name {!r} on {} expression " "will return a list of all parsed tokens in an And alternative, " "in prior versions only the first token was returned; enclose " "contained argument in Group".format( "warn_multiple_tokens_in_named_alternation", name, type(self).__name__, ), stacklevel=3, ) return super()._setResultsName(name, listAllMatches) class MatchFirst(ParseExpression): """Requires that at least one :class:`ParseExpression` is found. If more than one expression matches, the first one listed is the one that will match. May be constructed using the ``'|'`` operator. Example:: # construct MatchFirst using '|' operator # watch the order of expressions to match number = Word(nums) | Combine(Word(nums) + '.' + Word(nums)) print(number.search_string("123 3.1416 789")) # Fail! -> [['123'], ['3'], ['1416'], ['789']] # put more selective expression first number = Combine(Word(nums) + '.' + Word(nums)) | Word(nums) print(number.search_string("123 3.1416 789")) # Better -> [['123'], ['3.1416'], ['789']] """ def __init__(self, exprs: typing.Iterable[ParserElement], savelist: bool = False): super().__init__(exprs, savelist) if self.exprs: self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs) self.skipWhitespace = all(e.skipWhitespace for e in self.exprs) else: self.mayReturnEmpty = True def streamline(self) -> ParserElement: if self.streamlined: return self super().streamline() if self.exprs: self.saveAsList = any(e.saveAsList for e in self.exprs) self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs) self.skipWhitespace = all( e.skipWhitespace and not isinstance(e, White) for e in self.exprs ) else: self.saveAsList = False self.mayReturnEmpty = True return self def parseImpl(self, instring, loc, doActions=True): maxExcLoc = -1 maxException = None for e in self.exprs: try: return e._parse( instring, loc, doActions, ) except ParseFatalException as pfe: pfe.__traceback__ = None pfe.parserElement = e raise except ParseException as err: if err.loc > maxExcLoc: maxException = err maxExcLoc = err.loc except IndexError: if len(instring) > maxExcLoc: maxException = ParseException( instring, len(instring), e.errmsg, self ) maxExcLoc = len(instring) if maxException is not None: maxException.msg = self.errmsg raise maxException else: raise ParseException( instring, loc, "no defined alternatives to match", self ) def __ior__(self, other): if isinstance(other, str_type): other = self._literalStringClass(other) return self.append(other) # MatchFirst([self, other]) def _generateDefaultName(self): return "{" + " | ".join(str(e) for e in self.exprs) + "}" def _setResultsName(self, name, listAllMatches=False): if ( __diag__.warn_multiple_tokens_in_named_alternation and Diagnostics.warn_multiple_tokens_in_named_alternation not in self.suppress_warnings_ ): if any( isinstance(e, And) and Diagnostics.warn_multiple_tokens_in_named_alternation not in e.suppress_warnings_ for e in self.exprs ): warnings.warn( "{}: setting results name {!r} on {} expression " "will return a list of all parsed tokens in an And alternative, " "in prior versions only the first token was returned; enclose " "contained argument in Group".format( "warn_multiple_tokens_in_named_alternation", name, type(self).__name__, ), stacklevel=3, ) return super()._setResultsName(name, listAllMatches) class Each(ParseExpression): """Requires all given :class:`ParseExpression` s to be found, but in any order. Expressions may be separated by whitespace. May be constructed using the ``'&'`` operator. Example:: color = one_of("RED ORANGE YELLOW GREEN BLUE PURPLE BLACK WHITE BROWN") shape_type = one_of("SQUARE CIRCLE TRIANGLE STAR HEXAGON OCTAGON") integer = Word(nums) shape_attr = "shape:" + shape_type("shape") posn_attr = "posn:" + Group(integer("x") + ',' + integer("y"))("posn") color_attr = "color:" + color("color") size_attr = "size:" + integer("size") # use Each (using operator '&') to accept attributes in any order # (shape and posn are required, color and size are optional) shape_spec = shape_attr & posn_attr & Opt(color_attr) & Opt(size_attr) shape_spec.run_tests(''' shape: SQUARE color: BLACK posn: 100, 120 shape: CIRCLE size: 50 color: BLUE posn: 50,80 color:GREEN size:20 shape:TRIANGLE posn:20,40 ''' ) prints:: shape: SQUARE color: BLACK posn: 100, 120 ['shape:', 'SQUARE', 'color:', 'BLACK', 'posn:', ['100', ',', '120']] - color: BLACK - posn: ['100', ',', '120'] - x: 100 - y: 120 - shape: SQUARE shape: CIRCLE size: 50 color: BLUE posn: 50,80 ['shape:', 'CIRCLE', 'size:', '50', 'color:', 'BLUE', 'posn:', ['50', ',', '80']] - color: BLUE - posn: ['50', ',', '80'] - x: 50 - y: 80 - shape: CIRCLE - size: 50 color: GREEN size: 20 shape: TRIANGLE posn: 20,40 ['color:', 'GREEN', 'size:', '20', 'shape:', 'TRIANGLE', 'posn:', ['20', ',', '40']] - color: GREEN - posn: ['20', ',', '40'] - x: 20 - y: 40 - shape: TRIANGLE - size: 20 """ def __init__(self, exprs: typing.Iterable[ParserElement], savelist: bool = True): super().__init__(exprs, savelist) if self.exprs: self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs) else: self.mayReturnEmpty = True self.skipWhitespace = True self.initExprGroups = True self.saveAsList = True def streamline(self) -> ParserElement: super().streamline() if self.exprs: self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs) else: self.mayReturnEmpty = True return self def parseImpl(self, instring, loc, doActions=True): if self.initExprGroups: self.opt1map = dict( (id(e.expr), e) for e in self.exprs if isinstance(e, Opt) ) opt1 = [e.expr for e in self.exprs if isinstance(e, Opt)] opt2 = [ e for e in self.exprs if e.mayReturnEmpty and not isinstance(e, (Opt, Regex, ZeroOrMore)) ] self.optionals = opt1 + opt2 self.multioptionals = [ e.expr.set_results_name(e.resultsName, list_all_matches=True) for e in self.exprs if isinstance(e, _MultipleMatch) ] self.multirequired = [ e.expr.set_results_name(e.resultsName, list_all_matches=True) for e in self.exprs if isinstance(e, OneOrMore) ] self.required = [ e for e in self.exprs if not isinstance(e, (Opt, ZeroOrMore, OneOrMore)) ] self.required += self.multirequired self.initExprGroups = False tmpLoc = loc tmpReqd = self.required[:] tmpOpt = self.optionals[:] multis = self.multioptionals[:] matchOrder = [] keepMatching = True failed = [] fatals = [] while keepMatching: tmpExprs = tmpReqd + tmpOpt + multis failed.clear() fatals.clear() for e in tmpExprs: try: tmpLoc = e.try_parse(instring, tmpLoc, raise_fatal=True) except ParseFatalException as pfe: pfe.__traceback__ = None pfe.parserElement = e fatals.append(pfe) failed.append(e) except ParseException: failed.append(e) else: matchOrder.append(self.opt1map.get(id(e), e)) if e in tmpReqd: tmpReqd.remove(e) elif e in tmpOpt: tmpOpt.remove(e) if len(failed) == len(tmpExprs): keepMatching = False # look for any ParseFatalExceptions if fatals: if len(fatals) > 1: fatals.sort(key=lambda e: -e.loc) if fatals[0].loc == fatals[1].loc: fatals.sort(key=lambda e: (-e.loc, -len(str(e.parserElement)))) max_fatal = fatals[0] raise max_fatal if tmpReqd: missing = ", ".join([str(e) for e in tmpReqd]) raise ParseException( instring, loc, "Missing one or more required elements ({})".format(missing), ) # add any unmatched Opts, in case they have default values defined matchOrder += [e for e in self.exprs if isinstance(e, Opt) and e.expr in tmpOpt] total_results = ParseResults([]) for e in matchOrder: loc, results = e._parse(instring, loc, doActions) total_results += results return loc, total_results def _generateDefaultName(self): return "{" + " & ".join(str(e) for e in self.exprs) + "}" class ParseElementEnhance(ParserElement): """Abstract subclass of :class:`ParserElement`, for combining and post-processing parsed tokens. """ def __init__(self, expr: Union[ParserElement, str], savelist: bool = False): super().__init__(savelist) if isinstance(expr, str_type): if issubclass(self._literalStringClass, Token): expr = self._literalStringClass(expr) elif issubclass(type(self), self._literalStringClass): expr = Literal(expr) else: expr = self._literalStringClass(Literal(expr)) self.expr = expr if expr is not None: self.mayIndexError = expr.mayIndexError self.mayReturnEmpty = expr.mayReturnEmpty self.set_whitespace_chars( expr.whiteChars, copy_defaults=expr.copyDefaultWhiteChars ) self.skipWhitespace = expr.skipWhitespace self.saveAsList = expr.saveAsList self.callPreparse = expr.callPreparse self.ignoreExprs.extend(expr.ignoreExprs) def recurse(self) -> Sequence[ParserElement]: return [self.expr] if self.expr is not None else [] def parseImpl(self, instring, loc, doActions=True): if self.expr is not None: return self.expr._parse(instring, loc, doActions, callPreParse=False) else: raise ParseException(instring, loc, "No expression defined", self) def leave_whitespace(self, recursive: bool = True) -> ParserElement: super().leave_whitespace(recursive) if recursive: self.expr = self.expr.copy() if self.expr is not None: self.expr.leave_whitespace(recursive) return self def ignore_whitespace(self, recursive: bool = True) -> ParserElement: super().ignore_whitespace(recursive) if recursive: self.expr = self.expr.copy() if self.expr is not None: self.expr.ignore_whitespace(recursive) return self def ignore(self, other) -> ParserElement: if isinstance(other, Suppress): if other not in self.ignoreExprs: super().ignore(other) if self.expr is not None: self.expr.ignore(self.ignoreExprs[-1]) else: super().ignore(other) if self.expr is not None: self.expr.ignore(self.ignoreExprs[-1]) return self def streamline(self) -> ParserElement: super().streamline() if self.expr is not None: self.expr.streamline() return self def _checkRecursion(self, parseElementList): if self in parseElementList: raise RecursiveGrammarException(parseElementList + [self]) subRecCheckList = parseElementList[:] + [self] if self.expr is not None: self.expr._checkRecursion(subRecCheckList) def validate(self, validateTrace=None) -> None: if validateTrace is None: validateTrace = [] tmp = validateTrace[:] + [self] if self.expr is not None: self.expr.validate(tmp) self._checkRecursion([]) def _generateDefaultName(self): return "{}:({})".format(self.__class__.__name__, str(self.expr)) ignoreWhitespace = ignore_whitespace leaveWhitespace = leave_whitespace class IndentedBlock(ParseElementEnhance): """ Expression to match one or more expressions at a given indentation level. Useful for parsing text where structure is implied by indentation (like Python source code). """ class _Indent(Empty): def __init__(self, ref_col: int): super().__init__() self.errmsg = "expected indent at column {}".format(ref_col) self.add_condition(lambda s, l, t: col(l, s) == ref_col) class _IndentGreater(Empty): def __init__(self, ref_col: int): super().__init__() self.errmsg = "expected indent at column greater than {}".format(ref_col) self.add_condition(lambda s, l, t: col(l, s) > ref_col) def __init__( self, expr: ParserElement, *, recursive: bool = False, grouped: bool = True ): super().__init__(expr, savelist=True) # if recursive: # raise NotImplementedError("IndentedBlock with recursive is not implemented") self._recursive = recursive self._grouped = grouped self.parent_anchor = 1 def parseImpl(self, instring, loc, doActions=True): # advance parse position to non-whitespace by using an Empty() # this should be the column to be used for all subsequent indented lines anchor_loc = Empty().preParse(instring, loc) # see if self.expr matches at the current location - if not it will raise an exception # and no further work is necessary self.expr.try_parse(instring, anchor_loc, doActions) indent_col = col(anchor_loc, instring) peer_detect_expr = self._Indent(indent_col) inner_expr = Empty() + peer_detect_expr + self.expr if self._recursive: sub_indent = self._IndentGreater(indent_col) nested_block = IndentedBlock( self.expr, recursive=self._recursive, grouped=self._grouped ) nested_block.set_debug(self.debug) nested_block.parent_anchor = indent_col inner_expr += Opt(sub_indent + nested_block) inner_expr.set_name(f"inner {hex(id(inner_expr))[-4:].upper()}@{indent_col}") block = OneOrMore(inner_expr) trailing_undent = self._Indent(self.parent_anchor) | StringEnd() if self._grouped: wrapper = Group else: wrapper = lambda expr: expr return (wrapper(block) + Optional(trailing_undent)).parseImpl( instring, anchor_loc, doActions ) class AtStringStart(ParseElementEnhance): """Matches if expression matches at the beginning of the parse string:: AtStringStart(Word(nums)).parse_string("123") # prints ["123"] AtStringStart(Word(nums)).parse_string(" 123") # raises ParseException """ def __init__(self, expr: Union[ParserElement, str]): super().__init__(expr) self.callPreparse = False def parseImpl(self, instring, loc, doActions=True): if loc != 0: raise ParseException(instring, loc, "not found at string start") return super().parseImpl(instring, loc, doActions) class AtLineStart(ParseElementEnhance): r"""Matches if an expression matches at the beginning of a line within the parse string Example:: test = '''\ AAA this line AAA and this line AAA but not this one B AAA and definitely not this one ''' for t in (AtLineStart('AAA') + restOfLine).search_string(test): print(t) prints:: ['AAA', ' this line'] ['AAA', ' and this line'] """ def __init__(self, expr: Union[ParserElement, str]): super().__init__(expr) self.callPreparse = False def parseImpl(self, instring, loc, doActions=True): if col(loc, instring) != 1: raise ParseException(instring, loc, "not found at line start") return super().parseImpl(instring, loc, doActions) class FollowedBy(ParseElementEnhance): """Lookahead matching of the given parse expression. ``FollowedBy`` does *not* advance the parsing position within the input string, it only verifies that the specified parse expression matches at the current position. ``FollowedBy`` always returns a null token list. If any results names are defined in the lookahead expression, those *will* be returned for access by name. Example:: # use FollowedBy to match a label only if it is followed by a ':' data_word = Word(alphas) label = data_word + FollowedBy(':') attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) attr_expr[1, ...].parse_string("shape: SQUARE color: BLACK posn: upper left").pprint() prints:: [['shape', 'SQUARE'], ['color', 'BLACK'], ['posn', 'upper left']] """ def __init__(self, expr: Union[ParserElement, str]): super().__init__(expr) self.mayReturnEmpty = True def parseImpl(self, instring, loc, doActions=True): # by using self._expr.parse and deleting the contents of the returned ParseResults list # we keep any named results that were defined in the FollowedBy expression _, ret = self.expr._parse(instring, loc, doActions=doActions) del ret[:] return loc, ret class PrecededBy(ParseElementEnhance): """Lookbehind matching of the given parse expression. ``PrecededBy`` does not advance the parsing position within the input string, it only verifies that the specified parse expression matches prior to the current position. ``PrecededBy`` always returns a null token list, but if a results name is defined on the given expression, it is returned. Parameters: - expr - expression that must match prior to the current parse location - retreat - (default= ``None``) - (int) maximum number of characters to lookbehind prior to the current parse location If the lookbehind expression is a string, :class:`Literal`, :class:`Keyword`, or a :class:`Word` or :class:`CharsNotIn` with a specified exact or maximum length, then the retreat parameter is not required. Otherwise, retreat must be specified to give a maximum number of characters to look back from the current parse position for a lookbehind match. Example:: # VB-style variable names with type prefixes int_var = PrecededBy("#") + pyparsing_common.identifier str_var = PrecededBy("$") + pyparsing_common.identifier """ def __init__( self, expr: Union[ParserElement, str], retreat: typing.Optional[int] = None ): super().__init__(expr) self.expr = self.expr().leave_whitespace() self.mayReturnEmpty = True self.mayIndexError = False self.exact = False if isinstance(expr, str_type): retreat = len(expr) self.exact = True elif isinstance(expr, (Literal, Keyword)): retreat = expr.matchLen self.exact = True elif isinstance(expr, (Word, CharsNotIn)) and expr.maxLen != _MAX_INT: retreat = expr.maxLen self.exact = True elif isinstance(expr, PositionToken): retreat = 0 self.exact = True self.retreat = retreat self.errmsg = "not preceded by " + str(expr) self.skipWhitespace = False self.parseAction.append(lambda s, l, t: t.__delitem__(slice(None, None))) def parseImpl(self, instring, loc=0, doActions=True): if self.exact: if loc < self.retreat: raise ParseException(instring, loc, self.errmsg) start = loc - self.retreat _, ret = self.expr._parse(instring, start) else: # retreat specified a maximum lookbehind window, iterate test_expr = self.expr + StringEnd() instring_slice = instring[max(0, loc - self.retreat) : loc] last_expr = ParseException(instring, loc, self.errmsg) for offset in range(1, min(loc, self.retreat + 1) + 1): try: # print('trying', offset, instring_slice, repr(instring_slice[loc - offset:])) _, ret = test_expr._parse( instring_slice, len(instring_slice) - offset ) except ParseBaseException as pbe: last_expr = pbe else: break else: raise last_expr return loc, ret class Located(ParseElementEnhance): """ Decorates a returned token with its starting and ending locations in the input string. This helper adds the following results names: - ``locn_start`` - location where matched expression begins - ``locn_end`` - location where matched expression ends - ``value`` - the actual parsed results Be careful if the input text contains ```` characters, you may want to call :class:`ParserElement.parse_with_tabs` Example:: wd = Word(alphas) for match in Located(wd).search_string("ljsdf123lksdjjf123lkkjj1222"): print(match) prints:: [0, ['ljsdf'], 5] [8, ['lksdjjf'], 15] [18, ['lkkjj'], 23] """ def parseImpl(self, instring, loc, doActions=True): start = loc loc, tokens = self.expr._parse(instring, start, doActions, callPreParse=False) ret_tokens = ParseResults([start, tokens, loc]) ret_tokens["locn_start"] = start ret_tokens["value"] = tokens ret_tokens["locn_end"] = loc if self.resultsName: # must return as a list, so that the name will be attached to the complete group return loc, [ret_tokens] else: return loc, ret_tokens class NotAny(ParseElementEnhance): """ Lookahead to disallow matching with the given parse expression. ``NotAny`` does *not* advance the parsing position within the input string, it only verifies that the specified parse expression does *not* match at the current position. Also, ``NotAny`` does *not* skip over leading whitespace. ``NotAny`` always returns a null token list. May be constructed using the ``'~'`` operator. Example:: AND, OR, NOT = map(CaselessKeyword, "AND OR NOT".split()) # take care not to mistake keywords for identifiers ident = ~(AND | OR | NOT) + Word(alphas) boolean_term = Opt(NOT) + ident # very crude boolean expression - to support parenthesis groups and # operation hierarchy, use infix_notation boolean_expr = boolean_term + ((AND | OR) + boolean_term)[...] # integers that are followed by "." are actually floats integer = Word(nums) + ~Char(".") """ def __init__(self, expr: Union[ParserElement, str]): super().__init__(expr) # do NOT use self.leave_whitespace(), don't want to propagate to exprs # self.leave_whitespace() self.skipWhitespace = False self.mayReturnEmpty = True self.errmsg = "Found unwanted token, " + str(self.expr) def parseImpl(self, instring, loc, doActions=True): if self.expr.can_parse_next(instring, loc): raise ParseException(instring, loc, self.errmsg, self) return loc, [] def _generateDefaultName(self): return "~{" + str(self.expr) + "}" class _MultipleMatch(ParseElementEnhance): def __init__( self, expr: ParserElement, stop_on: typing.Optional[Union[ParserElement, str]] = None, *, stopOn: typing.Optional[Union[ParserElement, str]] = None, ): super().__init__(expr) stopOn = stopOn or stop_on self.saveAsList = True ender = stopOn if isinstance(ender, str_type): ender = self._literalStringClass(ender) self.stopOn(ender) def stopOn(self, ender) -> ParserElement: if isinstance(ender, str_type): ender = self._literalStringClass(ender) self.not_ender = ~ender if ender is not None else None return self def parseImpl(self, instring, loc, doActions=True): self_expr_parse = self.expr._parse self_skip_ignorables = self._skipIgnorables check_ender = self.not_ender is not None if check_ender: try_not_ender = self.not_ender.tryParse # must be at least one (but first see if we are the stopOn sentinel; # if so, fail) if check_ender: try_not_ender(instring, loc) loc, tokens = self_expr_parse(instring, loc, doActions) try: hasIgnoreExprs = not not self.ignoreExprs while 1: if check_ender: try_not_ender(instring, loc) if hasIgnoreExprs: preloc = self_skip_ignorables(instring, loc) else: preloc = loc loc, tmptokens = self_expr_parse(instring, preloc, doActions) if tmptokens or tmptokens.haskeys(): tokens += tmptokens except (ParseException, IndexError): pass return loc, tokens def _setResultsName(self, name, listAllMatches=False): if ( __diag__.warn_ungrouped_named_tokens_in_collection and Diagnostics.warn_ungrouped_named_tokens_in_collection not in self.suppress_warnings_ ): for e in [self.expr] + self.expr.recurse(): if ( isinstance(e, ParserElement) and e.resultsName and Diagnostics.warn_ungrouped_named_tokens_in_collection not in e.suppress_warnings_ ): warnings.warn( "{}: setting results name {!r} on {} expression " "collides with {!r} on contained expression".format( "warn_ungrouped_named_tokens_in_collection", name, type(self).__name__, e.resultsName, ), stacklevel=3, ) return super()._setResultsName(name, listAllMatches) class OneOrMore(_MultipleMatch): """ Repetition of one or more of the given expression. Parameters: - expr - expression that must match one or more times - stop_on - (default= ``None``) - expression for a terminating sentinel (only required if the sentinel would ordinarily match the repetition expression) Example:: data_word = Word(alphas) label = data_word + FollowedBy(':') attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).set_parse_action(' '.join)) text = "shape: SQUARE posn: upper left color: BLACK" attr_expr[1, ...].parse_string(text).pprint() # Fail! read 'color' as data instead of next label -> [['shape', 'SQUARE color']] # use stop_on attribute for OneOrMore to avoid reading label string as part of the data attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) OneOrMore(attr_expr).parse_string(text).pprint() # Better -> [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'BLACK']] # could also be written as (attr_expr * (1,)).parse_string(text).pprint() """ def _generateDefaultName(self): return "{" + str(self.expr) + "}..." class ZeroOrMore(_MultipleMatch): """ Optional repetition of zero or more of the given expression. Parameters: - ``expr`` - expression that must match zero or more times - ``stop_on`` - expression for a terminating sentinel (only required if the sentinel would ordinarily match the repetition expression) - (default= ``None``) Example: similar to :class:`OneOrMore` """ def __init__( self, expr: ParserElement, stop_on: typing.Optional[Union[ParserElement, str]] = None, *, stopOn: typing.Optional[Union[ParserElement, str]] = None, ): super().__init__(expr, stopOn=stopOn or stop_on) self.mayReturnEmpty = True def parseImpl(self, instring, loc, doActions=True): try: return super().parseImpl(instring, loc, doActions) except (ParseException, IndexError): return loc, ParseResults([], name=self.resultsName) def _generateDefaultName(self): return "[" + str(self.expr) + "]..." class _NullToken: def __bool__(self): return False def __str__(self): return "" class Opt(ParseElementEnhance): """ Optional matching of the given expression. Parameters: - ``expr`` - expression that must match zero or more times - ``default`` (optional) - value to be returned if the optional expression is not found. Example:: # US postal code can be a 5-digit zip, plus optional 4-digit qualifier zip = Combine(Word(nums, exact=5) + Opt('-' + Word(nums, exact=4))) zip.run_tests(''' # traditional ZIP code 12345 # ZIP+4 form 12101-0001 # invalid ZIP 98765- ''') prints:: # traditional ZIP code 12345 ['12345'] # ZIP+4 form 12101-0001 ['12101-0001'] # invalid ZIP 98765- ^ FAIL: Expected end of text (at char 5), (line:1, col:6) """ __optionalNotMatched = _NullToken() def __init__( self, expr: Union[ParserElement, str], default: Any = __optionalNotMatched ): super().__init__(expr, savelist=False) self.saveAsList = self.expr.saveAsList self.defaultValue = default self.mayReturnEmpty = True def parseImpl(self, instring, loc, doActions=True): self_expr = self.expr try: loc, tokens = self_expr._parse(instring, loc, doActions, callPreParse=False) except (ParseException, IndexError): default_value = self.defaultValue if default_value is not self.__optionalNotMatched: if self_expr.resultsName: tokens = ParseResults([default_value]) tokens[self_expr.resultsName] = default_value else: tokens = [default_value] else: tokens = [] return loc, tokens def _generateDefaultName(self): inner = str(self.expr) # strip off redundant inner {}'s while len(inner) > 1 and inner[0 :: len(inner) - 1] == "{}": inner = inner[1:-1] return "[" + inner + "]" Optional = Opt class SkipTo(ParseElementEnhance): """ Token for skipping over all undefined text until the matched expression is found. Parameters: - ``expr`` - target expression marking the end of the data to be skipped - ``include`` - if ``True``, the target expression is also parsed (the skipped text and target expression are returned as a 2-element list) (default= ``False``). - ``ignore`` - (default= ``None``) used to define grammars (typically quoted strings and comments) that might contain false matches to the target expression - ``fail_on`` - (default= ``None``) define expressions that are not allowed to be included in the skipped test; if found before the target expression is found, the :class:`SkipTo` is not a match Example:: report = ''' Outstanding Issues Report - 1 Jan 2000 # | Severity | Description | Days Open -----+----------+-------------------------------------------+----------- 101 | Critical | Intermittent system crash | 6 94 | Cosmetic | Spelling error on Login ('log|n') | 14 79 | Minor | System slow when running too many reports | 47 ''' integer = Word(nums) SEP = Suppress('|') # use SkipTo to simply match everything up until the next SEP # - ignore quoted strings, so that a '|' character inside a quoted string does not match # - parse action will call token.strip() for each matched token, i.e., the description body string_data = SkipTo(SEP, ignore=quoted_string) string_data.set_parse_action(token_map(str.strip)) ticket_expr = (integer("issue_num") + SEP + string_data("sev") + SEP + string_data("desc") + SEP + integer("days_open")) for tkt in ticket_expr.search_string(report): print tkt.dump() prints:: ['101', 'Critical', 'Intermittent system crash', '6'] - days_open: '6' - desc: 'Intermittent system crash' - issue_num: '101' - sev: 'Critical' ['94', 'Cosmetic', "Spelling error on Login ('log|n')", '14'] - days_open: '14' - desc: "Spelling error on Login ('log|n')" - issue_num: '94' - sev: 'Cosmetic' ['79', 'Minor', 'System slow when running too many reports', '47'] - days_open: '47' - desc: 'System slow when running too many reports' - issue_num: '79' - sev: 'Minor' """ def __init__( self, other: Union[ParserElement, str], include: bool = False, ignore: bool = None, fail_on: typing.Optional[Union[ParserElement, str]] = None, *, failOn: Union[ParserElement, str] = None, ): super().__init__(other) failOn = failOn or fail_on self.ignoreExpr = ignore self.mayReturnEmpty = True self.mayIndexError = False self.includeMatch = include self.saveAsList = False if isinstance(failOn, str_type): self.failOn = self._literalStringClass(failOn) else: self.failOn = failOn self.errmsg = "No match found for " + str(self.expr) def parseImpl(self, instring, loc, doActions=True): startloc = loc instrlen = len(instring) self_expr_parse = self.expr._parse self_failOn_canParseNext = ( self.failOn.canParseNext if self.failOn is not None else None ) self_ignoreExpr_tryParse = ( self.ignoreExpr.tryParse if self.ignoreExpr is not None else None ) tmploc = loc while tmploc <= instrlen: if self_failOn_canParseNext is not None: # break if failOn expression matches if self_failOn_canParseNext(instring, tmploc): break if self_ignoreExpr_tryParse is not None: # advance past ignore expressions while 1: try: tmploc = self_ignoreExpr_tryParse(instring, tmploc) except ParseBaseException: break try: self_expr_parse(instring, tmploc, doActions=False, callPreParse=False) except (ParseException, IndexError): # no match, advance loc in string tmploc += 1 else: # matched skipto expr, done break else: # ran off the end of the input string without matching skipto expr, fail raise ParseException(instring, loc, self.errmsg, self) # build up return values loc = tmploc skiptext = instring[startloc:loc] skipresult = ParseResults(skiptext) if self.includeMatch: loc, mat = self_expr_parse(instring, loc, doActions, callPreParse=False) skipresult += mat return loc, skipresult class Forward(ParseElementEnhance): """ Forward declaration of an expression to be defined later - used for recursive grammars, such as algebraic infix notation. When the expression is known, it is assigned to the ``Forward`` variable using the ``'<<'`` operator. Note: take care when assigning to ``Forward`` not to overlook precedence of operators. Specifically, ``'|'`` has a lower precedence than ``'<<'``, so that:: fwd_expr << a | b | c will actually be evaluated as:: (fwd_expr << a) | b | c thereby leaving b and c out as parseable alternatives. It is recommended that you explicitly group the values inserted into the ``Forward``:: fwd_expr << (a | b | c) Converting to use the ``'<<='`` operator instead will avoid this problem. See :class:`ParseResults.pprint` for an example of a recursive parser created using ``Forward``. """ def __init__(self, other: typing.Optional[Union[ParserElement, str]] = None): self.caller_frame = traceback.extract_stack(limit=2)[0] super().__init__(other, savelist=False) self.lshift_line = None def __lshift__(self, other): if hasattr(self, "caller_frame"): del self.caller_frame if isinstance(other, str_type): other = self._literalStringClass(other) self.expr = other self.mayIndexError = self.expr.mayIndexError self.mayReturnEmpty = self.expr.mayReturnEmpty self.set_whitespace_chars( self.expr.whiteChars, copy_defaults=self.expr.copyDefaultWhiteChars ) self.skipWhitespace = self.expr.skipWhitespace self.saveAsList = self.expr.saveAsList self.ignoreExprs.extend(self.expr.ignoreExprs) self.lshift_line = traceback.extract_stack(limit=2)[-2] return self def __ilshift__(self, other): return self << other def __or__(self, other): caller_line = traceback.extract_stack(limit=2)[-2] if ( __diag__.warn_on_match_first_with_lshift_operator and caller_line == self.lshift_line and Diagnostics.warn_on_match_first_with_lshift_operator not in self.suppress_warnings_ ): warnings.warn( "using '<<' operator with '|' is probably an error, use '<<='", stacklevel=2, ) ret = super().__or__(other) return ret def __del__(self): # see if we are getting dropped because of '=' reassignment of var instead of '<<=' or '<<' if ( self.expr is None and __diag__.warn_on_assignment_to_Forward and Diagnostics.warn_on_assignment_to_Forward not in self.suppress_warnings_ ): warnings.warn_explicit( "Forward defined here but no expression attached later using '<<=' or '<<'", UserWarning, filename=self.caller_frame.filename, lineno=self.caller_frame.lineno, ) def parseImpl(self, instring, loc, doActions=True): if ( self.expr is None and __diag__.warn_on_parse_using_empty_Forward and Diagnostics.warn_on_parse_using_empty_Forward not in self.suppress_warnings_ ): # walk stack until parse_string, scan_string, search_string, or transform_string is found parse_fns = [ "parse_string", "scan_string", "search_string", "transform_string", ] tb = traceback.extract_stack(limit=200) for i, frm in enumerate(reversed(tb), start=1): if frm.name in parse_fns: stacklevel = i + 1 break else: stacklevel = 2 warnings.warn( "Forward expression was never assigned a value, will not parse any input", stacklevel=stacklevel, ) if not ParserElement._left_recursion_enabled: return super().parseImpl(instring, loc, doActions) # ## Bounded Recursion algorithm ## # Recursion only needs to be processed at ``Forward`` elements, since they are # the only ones that can actually refer to themselves. The general idea is # to handle recursion stepwise: We start at no recursion, then recurse once, # recurse twice, ..., until more recursion offers no benefit (we hit the bound). # # The "trick" here is that each ``Forward`` gets evaluated in two contexts # - to *match* a specific recursion level, and # - to *search* the bounded recursion level # and the two run concurrently. The *search* must *match* each recursion level # to find the best possible match. This is handled by a memo table, which # provides the previous match to the next level match attempt. # # See also "Left Recursion in Parsing Expression Grammars", Medeiros et al. # # There is a complication since we not only *parse* but also *transform* via # actions: We do not want to run the actions too often while expanding. Thus, # we expand using `doActions=False` and only run `doActions=True` if the next # recursion level is acceptable. with ParserElement.recursion_lock: memo = ParserElement.recursion_memos try: # we are parsing at a specific recursion expansion - use it as-is prev_loc, prev_result = memo[loc, self, doActions] if isinstance(prev_result, Exception): raise prev_result return prev_loc, prev_result.copy() except KeyError: act_key = (loc, self, True) peek_key = (loc, self, False) # we are searching for the best recursion expansion - keep on improving # both `doActions` cases must be tracked separately here! prev_loc, prev_peek = memo[peek_key] = ( loc - 1, ParseException( instring, loc, "Forward recursion without base case", self ), ) if doActions: memo[act_key] = memo[peek_key] while True: try: new_loc, new_peek = super().parseImpl(instring, loc, False) except ParseException: # we failed before getting any match – do not hide the error if isinstance(prev_peek, Exception): raise new_loc, new_peek = prev_loc, prev_peek # the match did not get better: we are done if new_loc <= prev_loc: if doActions: # replace the match for doActions=False as well, # in case the action did backtrack prev_loc, prev_result = memo[peek_key] = memo[act_key] del memo[peek_key], memo[act_key] return prev_loc, prev_result.copy() del memo[peek_key] return prev_loc, prev_peek.copy() # the match did get better: see if we can improve further else: if doActions: try: memo[act_key] = super().parseImpl(instring, loc, True) except ParseException as e: memo[peek_key] = memo[act_key] = (new_loc, e) raise prev_loc, prev_peek = memo[peek_key] = new_loc, new_peek def leave_whitespace(self, recursive: bool = True) -> ParserElement: self.skipWhitespace = False return self def ignore_whitespace(self, recursive: bool = True) -> ParserElement: self.skipWhitespace = True return self def streamline(self) -> ParserElement: if not self.streamlined: self.streamlined = True if self.expr is not None: self.expr.streamline() return self def validate(self, validateTrace=None) -> None: if validateTrace is None: validateTrace = [] if self not in validateTrace: tmp = validateTrace[:] + [self] if self.expr is not None: self.expr.validate(tmp) self._checkRecursion([]) def _generateDefaultName(self): # Avoid infinite recursion by setting a temporary _defaultName self._defaultName = ": ..." # Use the string representation of main expression. retString = "..." try: if self.expr is not None: retString = str(self.expr)[:1000] else: retString = "None" finally: return self.__class__.__name__ + ": " + retString def copy(self) -> ParserElement: if self.expr is not None: return super().copy() else: ret = Forward() ret <<= self return ret def _setResultsName(self, name, list_all_matches=False): if ( __diag__.warn_name_set_on_empty_Forward and Diagnostics.warn_name_set_on_empty_Forward not in self.suppress_warnings_ ): if self.expr is None: warnings.warn( "{}: setting results name {!r} on {} expression " "that has no contained expression".format( "warn_name_set_on_empty_Forward", name, type(self).__name__ ), stacklevel=3, ) return super()._setResultsName(name, list_all_matches) ignoreWhitespace = ignore_whitespace leaveWhitespace = leave_whitespace class TokenConverter(ParseElementEnhance): """ Abstract subclass of :class:`ParseExpression`, for converting parsed results. """ def __init__(self, expr: Union[ParserElement, str], savelist=False): super().__init__(expr) # , savelist) self.saveAsList = False class Combine(TokenConverter): """Converter to concatenate all matching tokens to a single string. By default, the matching patterns must also be contiguous in the input string; this can be disabled by specifying ``'adjacent=False'`` in the constructor. Example:: real = Word(nums) + '.' + Word(nums) print(real.parse_string('3.1416')) # -> ['3', '.', '1416'] # will also erroneously match the following print(real.parse_string('3. 1416')) # -> ['3', '.', '1416'] real = Combine(Word(nums) + '.' + Word(nums)) print(real.parse_string('3.1416')) # -> ['3.1416'] # no match when there are internal spaces print(real.parse_string('3. 1416')) # -> Exception: Expected W:(0123...) """ def __init__( self, expr: ParserElement, join_string: str = "", adjacent: bool = True, *, joinString: typing.Optional[str] = None, ): super().__init__(expr) joinString = joinString if joinString is not None else join_string # suppress whitespace-stripping in contained parse expressions, but re-enable it on the Combine itself if adjacent: self.leave_whitespace() self.adjacent = adjacent self.skipWhitespace = True self.joinString = joinString self.callPreparse = True def ignore(self, other) -> ParserElement: if self.adjacent: ParserElement.ignore(self, other) else: super().ignore(other) return self def postParse(self, instring, loc, tokenlist): retToks = tokenlist.copy() del retToks[:] retToks += ParseResults( ["".join(tokenlist._asStringList(self.joinString))], modal=self.modalResults ) if self.resultsName and retToks.haskeys(): return [retToks] else: return retToks class Group(TokenConverter): """Converter to return the matched tokens as a list - useful for returning tokens of :class:`ZeroOrMore` and :class:`OneOrMore` expressions. The optional ``aslist`` argument when set to True will return the parsed tokens as a Python list instead of a pyparsing ParseResults. Example:: ident = Word(alphas) num = Word(nums) term = ident | num func = ident + Opt(delimited_list(term)) print(func.parse_string("fn a, b, 100")) # -> ['fn', 'a', 'b', '100'] func = ident + Group(Opt(delimited_list(term))) print(func.parse_string("fn a, b, 100")) # -> ['fn', ['a', 'b', '100']] """ def __init__(self, expr: ParserElement, aslist: bool = False): super().__init__(expr) self.saveAsList = True self._asPythonList = aslist def postParse(self, instring, loc, tokenlist): if self._asPythonList: return ParseResults.List( tokenlist.asList() if isinstance(tokenlist, ParseResults) else list(tokenlist) ) else: return [tokenlist] class Dict(TokenConverter): """Converter to return a repetitive expression as a list, but also as a dictionary. Each element can also be referenced using the first token in the expression as its key. Useful for tabular report scraping when the first column can be used as a item key. The optional ``asdict`` argument when set to True will return the parsed tokens as a Python dict instead of a pyparsing ParseResults. Example:: data_word = Word(alphas) label = data_word + FollowedBy(':') text = "shape: SQUARE posn: upper left color: light blue texture: burlap" attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) # print attributes as plain groups print(attr_expr[1, ...].parse_string(text).dump()) # instead of OneOrMore(expr), parse using Dict(Group(expr)[1, ...]) - Dict will auto-assign names result = Dict(Group(attr_expr)[1, ...]).parse_string(text) print(result.dump()) # access named fields as dict entries, or output as dict print(result['shape']) print(result.as_dict()) prints:: ['shape', 'SQUARE', 'posn', 'upper left', 'color', 'light blue', 'texture', 'burlap'] [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']] - color: 'light blue' - posn: 'upper left' - shape: 'SQUARE' - texture: 'burlap' SQUARE {'color': 'light blue', 'posn': 'upper left', 'texture': 'burlap', 'shape': 'SQUARE'} See more examples at :class:`ParseResults` of accessing fields by results name. """ def __init__(self, expr: ParserElement, asdict: bool = False): super().__init__(expr) self.saveAsList = True self._asPythonDict = asdict def postParse(self, instring, loc, tokenlist): for i, tok in enumerate(tokenlist): if len(tok) == 0: continue ikey = tok[0] if isinstance(ikey, int): ikey = str(ikey).strip() if len(tok) == 1: tokenlist[ikey] = _ParseResultsWithOffset("", i) elif len(tok) == 2 and not isinstance(tok[1], ParseResults): tokenlist[ikey] = _ParseResultsWithOffset(tok[1], i) else: try: dictvalue = tok.copy() # ParseResults(i) except Exception: exc = TypeError( "could not extract dict values from parsed results" " - Dict expression must contain Grouped expressions" ) raise exc from None del dictvalue[0] if len(dictvalue) != 1 or ( isinstance(dictvalue, ParseResults) and dictvalue.haskeys() ): tokenlist[ikey] = _ParseResultsWithOffset(dictvalue, i) else: tokenlist[ikey] = _ParseResultsWithOffset(dictvalue[0], i) if self._asPythonDict: return [tokenlist.as_dict()] if self.resultsName else tokenlist.as_dict() else: return [tokenlist] if self.resultsName else tokenlist class Suppress(TokenConverter): """Converter for ignoring the results of a parsed expression. Example:: source = "a, b, c,d" wd = Word(alphas) wd_list1 = wd + (',' + wd)[...] print(wd_list1.parse_string(source)) # often, delimiters that are useful during parsing are just in the # way afterward - use Suppress to keep them out of the parsed output wd_list2 = wd + (Suppress(',') + wd)[...] print(wd_list2.parse_string(source)) # Skipped text (using '...') can be suppressed as well source = "lead in START relevant text END trailing text" start_marker = Keyword("START") end_marker = Keyword("END") find_body = Suppress(...) + start_marker + ... + end_marker print(find_body.parse_string(source) prints:: ['a', ',', 'b', ',', 'c', ',', 'd'] ['a', 'b', 'c', 'd'] ['START', 'relevant text ', 'END'] (See also :class:`delimited_list`.) """ def __init__(self, expr: Union[ParserElement, str], savelist: bool = False): if expr is ...: expr = _PendingSkip(NoMatch()) super().__init__(expr) def __add__(self, other) -> "ParserElement": if isinstance(self.expr, _PendingSkip): return Suppress(SkipTo(other)) + other else: return super().__add__(other) def __sub__(self, other) -> "ParserElement": if isinstance(self.expr, _PendingSkip): return Suppress(SkipTo(other)) - other else: return super().__sub__(other) def postParse(self, instring, loc, tokenlist): return [] def suppress(self) -> ParserElement: return self def trace_parse_action(f: ParseAction) -> ParseAction: """Decorator for debugging parse actions. When the parse action is called, this decorator will print ``">> entering method-name(line:, , )"``. When the parse action completes, the decorator will print ``"<<"`` followed by the returned value, or any exception that the parse action raised. Example:: wd = Word(alphas) @trace_parse_action def remove_duplicate_chars(tokens): return ''.join(sorted(set(''.join(tokens)))) wds = wd[1, ...].set_parse_action(remove_duplicate_chars) print(wds.parse_string("slkdjs sld sldd sdlf sdljf")) prints:: >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {})) < 3: thisFunc = paArgs[0].__class__.__name__ + "." + thisFunc sys.stderr.write( ">>entering {}(line: {!r}, {}, {!r})\n".format(thisFunc, line(l, s), l, t) ) try: ret = f(*paArgs) except Exception as exc: sys.stderr.write("< str: r"""Helper to easily define string ranges for use in :class:`Word` construction. Borrows syntax from regexp ``'[]'`` string range definitions:: srange("[0-9]") -> "0123456789" srange("[a-z]") -> "abcdefghijklmnopqrstuvwxyz" srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_" The input string must be enclosed in []'s, and the returned string is the expanded character set joined into a single string. The values enclosed in the []'s may be: - a single character - an escaped character with a leading backslash (such as ``\-`` or ``\]``) - an escaped hex character with a leading ``'\x'`` (``\x21``, which is a ``'!'`` character) (``\0x##`` is also supported for backwards compatibility) - an escaped octal character with a leading ``'\0'`` (``\041``, which is a ``'!'`` character) - a range of any of the above, separated by a dash (``'a-z'``, etc.) - any combination of the above (``'aeiouy'``, ``'a-zA-Z0-9_$'``, etc.) """ _expanded = ( lambda p: p if not isinstance(p, ParseResults) else "".join(chr(c) for c in range(ord(p[0]), ord(p[1]) + 1)) ) try: return "".join(_expanded(part) for part in _reBracketExpr.parse_string(s).body) except Exception: return "" def token_map(func, *args) -> ParseAction: """Helper to define a parse action by mapping a function to all elements of a :class:`ParseResults` list. If any additional args are passed, they are forwarded to the given function as additional arguments after the token, as in ``hex_integer = Word(hexnums).set_parse_action(token_map(int, 16))``, which will convert the parsed data to an integer using base 16. Example (compare the last to example in :class:`ParserElement.transform_string`:: hex_ints = Word(hexnums)[1, ...].set_parse_action(token_map(int, 16)) hex_ints.run_tests(''' 00 11 22 aa FF 0a 0d 1a ''') upperword = Word(alphas).set_parse_action(token_map(str.upper)) upperword[1, ...].run_tests(''' my kingdom for a horse ''') wd = Word(alphas).set_parse_action(token_map(str.title)) wd[1, ...].set_parse_action(' '.join).run_tests(''' now is the winter of our discontent made glorious summer by this sun of york ''') prints:: 00 11 22 aa FF 0a 0d 1a [0, 17, 34, 170, 255, 10, 13, 26] my kingdom for a horse ['MY', 'KINGDOM', 'FOR', 'A', 'HORSE'] now is the winter of our discontent made glorious summer by this sun of york ['Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York'] """ def pa(s, l, t): return [func(tokn, *args) for tokn in t] func_name = getattr(func, "__name__", getattr(func, "__class__").__name__) pa.__name__ = func_name return pa def autoname_elements() -> None: """ Utility to simplify mass-naming of parser elements, for generating railroad diagram with named subdiagrams. """ for name, var in sys._getframe().f_back.f_locals.items(): if isinstance(var, ParserElement) and not var.customName: var.set_name(name) dbl_quoted_string = Combine( Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*') + '"' ).set_name("string enclosed in double quotes") sgl_quoted_string = Combine( Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*") + "'" ).set_name("string enclosed in single quotes") quoted_string = Combine( Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*') + '"' | Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*") + "'" ).set_name("quotedString using single or double quotes") unicode_string = Combine("u" + quoted_string.copy()).set_name("unicode string literal") alphas8bit = srange(r"[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]") punc8bit = srange(r"[\0xa1-\0xbf\0xd7\0xf7]") # build list of built-in expressions, for future reference if a global default value # gets updated _builtin_exprs: List[ParserElement] = [ v for v in vars().values() if isinstance(v, ParserElement) ] # backward compatibility names tokenMap = token_map conditionAsParseAction = condition_as_parse_action nullDebugAction = null_debug_action sglQuotedString = sgl_quoted_string dblQuotedString = dbl_quoted_string quotedString = quoted_string unicodeString = unicode_string lineStart = line_start lineEnd = line_end stringStart = string_start stringEnd = string_end traceParseAction = trace_parse_action PK|5Ze~22;Lib/site-packages/pkg_resources/_vendor/pyparsing/common.pynuW+A# common.py from .core import * from .helpers import delimited_list, any_open_tag, any_close_tag from datetime import datetime # some other useful expressions - using lower-case class name since we are really using this as a namespace class pyparsing_common: """Here are some common low-level expressions that may be useful in jump-starting parser development: - numeric forms (:class:`integers`, :class:`reals`, :class:`scientific notation`) - common :class:`programming identifiers` - network addresses (:class:`MAC`, :class:`IPv4`, :class:`IPv6`) - ISO8601 :class:`dates` and :class:`datetime` - :class:`UUID` - :class:`comma-separated list` - :class:`url` Parse actions: - :class:`convertToInteger` - :class:`convertToFloat` - :class:`convertToDate` - :class:`convertToDatetime` - :class:`stripHTMLTags` - :class:`upcaseTokens` - :class:`downcaseTokens` Example:: pyparsing_common.number.runTests(''' # any int or real number, returned as the appropriate type 100 -100 +100 3.14159 6.02e23 1e-12 ''') pyparsing_common.fnumber.runTests(''' # any int or real number, returned as float 100 -100 +100 3.14159 6.02e23 1e-12 ''') pyparsing_common.hex_integer.runTests(''' # hex numbers 100 FF ''') pyparsing_common.fraction.runTests(''' # fractions 1/2 -3/4 ''') pyparsing_common.mixed_integer.runTests(''' # mixed fractions 1 1/2 -3/4 1-3/4 ''') import uuid pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID)) pyparsing_common.uuid.runTests(''' # uuid 12345678-1234-5678-1234-567812345678 ''') prints:: # any int or real number, returned as the appropriate type 100 [100] -100 [-100] +100 [100] 3.14159 [3.14159] 6.02e23 [6.02e+23] 1e-12 [1e-12] # any int or real number, returned as float 100 [100.0] -100 [-100.0] +100 [100.0] 3.14159 [3.14159] 6.02e23 [6.02e+23] 1e-12 [1e-12] # hex numbers 100 [256] FF [255] # fractions 1/2 [0.5] -3/4 [-0.75] # mixed fractions 1 [1] 1/2 [0.5] -3/4 [-0.75] 1-3/4 [1.75] # uuid 12345678-1234-5678-1234-567812345678 [UUID('12345678-1234-5678-1234-567812345678')] """ convert_to_integer = token_map(int) """ Parse action for converting parsed integers to Python int """ convert_to_float = token_map(float) """ Parse action for converting parsed numbers to Python float """ integer = Word(nums).set_name("integer").set_parse_action(convert_to_integer) """expression that parses an unsigned integer, returns an int""" hex_integer = ( Word(hexnums).set_name("hex integer").set_parse_action(token_map(int, 16)) ) """expression that parses a hexadecimal integer, returns an int""" signed_integer = ( Regex(r"[+-]?\d+") .set_name("signed integer") .set_parse_action(convert_to_integer) ) """expression that parses an integer with optional leading sign, returns an int""" fraction = ( signed_integer().set_parse_action(convert_to_float) + "/" + signed_integer().set_parse_action(convert_to_float) ).set_name("fraction") """fractional expression of an integer divided by an integer, returns a float""" fraction.add_parse_action(lambda tt: tt[0] / tt[-1]) mixed_integer = ( fraction | signed_integer + Opt(Opt("-").suppress() + fraction) ).set_name("fraction or mixed integer-fraction") """mixed integer of the form 'integer - fraction', with optional leading integer, returns float""" mixed_integer.add_parse_action(sum) real = ( Regex(r"[+-]?(?:\d+\.\d*|\.\d+)") .set_name("real number") .set_parse_action(convert_to_float) ) """expression that parses a floating point number and returns a float""" sci_real = ( Regex(r"[+-]?(?:\d+(?:[eE][+-]?\d+)|(?:\d+\.\d*|\.\d+)(?:[eE][+-]?\d+)?)") .set_name("real number with scientific notation") .set_parse_action(convert_to_float) ) """expression that parses a floating point number with optional scientific notation and returns a float""" # streamlining this expression makes the docs nicer-looking number = (sci_real | real | signed_integer).setName("number").streamline() """any numeric expression, returns the corresponding Python type""" fnumber = ( Regex(r"[+-]?\d+\.?\d*([eE][+-]?\d+)?") .set_name("fnumber") .set_parse_action(convert_to_float) ) """any int or real number, returned as float""" identifier = Word(identchars, identbodychars).set_name("identifier") """typical code identifier (leading alpha or '_', followed by 0 or more alphas, nums, or '_')""" ipv4_address = Regex( r"(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}" ).set_name("IPv4 address") "IPv4 address (``0.0.0.0 - 255.255.255.255``)" _ipv6_part = Regex(r"[0-9a-fA-F]{1,4}").set_name("hex_integer") _full_ipv6_address = (_ipv6_part + (":" + _ipv6_part) * 7).set_name( "full IPv6 address" ) _short_ipv6_address = ( Opt(_ipv6_part + (":" + _ipv6_part) * (0, 6)) + "::" + Opt(_ipv6_part + (":" + _ipv6_part) * (0, 6)) ).set_name("short IPv6 address") _short_ipv6_address.add_condition( lambda t: sum(1 for tt in t if pyparsing_common._ipv6_part.matches(tt)) < 8 ) _mixed_ipv6_address = ("::ffff:" + ipv4_address).set_name("mixed IPv6 address") ipv6_address = Combine( (_full_ipv6_address | _mixed_ipv6_address | _short_ipv6_address).set_name( "IPv6 address" ) ).set_name("IPv6 address") "IPv6 address (long, short, or mixed form)" mac_address = Regex( r"[0-9a-fA-F]{2}([:.-])[0-9a-fA-F]{2}(?:\1[0-9a-fA-F]{2}){4}" ).set_name("MAC address") "MAC address xx:xx:xx:xx:xx (may also have '-' or '.' delimiters)" @staticmethod def convert_to_date(fmt: str = "%Y-%m-%d"): """ Helper to create a parse action for converting parsed date string to Python datetime.date Params - - fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%d"``) Example:: date_expr = pyparsing_common.iso8601_date.copy() date_expr.setParseAction(pyparsing_common.convertToDate()) print(date_expr.parseString("1999-12-31")) prints:: [datetime.date(1999, 12, 31)] """ def cvt_fn(ss, ll, tt): try: return datetime.strptime(tt[0], fmt).date() except ValueError as ve: raise ParseException(ss, ll, str(ve)) return cvt_fn @staticmethod def convert_to_datetime(fmt: str = "%Y-%m-%dT%H:%M:%S.%f"): """Helper to create a parse action for converting parsed datetime string to Python datetime.datetime Params - - fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%dT%H:%M:%S.%f"``) Example:: dt_expr = pyparsing_common.iso8601_datetime.copy() dt_expr.setParseAction(pyparsing_common.convertToDatetime()) print(dt_expr.parseString("1999-12-31T23:59:59.999")) prints:: [datetime.datetime(1999, 12, 31, 23, 59, 59, 999000)] """ def cvt_fn(s, l, t): try: return datetime.strptime(t[0], fmt) except ValueError as ve: raise ParseException(s, l, str(ve)) return cvt_fn iso8601_date = Regex( r"(?P\d{4})(?:-(?P\d\d)(?:-(?P\d\d))?)?" ).set_name("ISO8601 date") "ISO8601 date (``yyyy-mm-dd``)" iso8601_datetime = Regex( r"(?P\d{4})-(?P\d\d)-(?P\d\d)[T ](?P\d\d):(?P\d\d)(:(?P\d\d(\.\d*)?)?)?(?PZ|[+-]\d\d:?\d\d)?" ).set_name("ISO8601 datetime") "ISO8601 datetime (``yyyy-mm-ddThh:mm:ss.s(Z|+-00:00)``) - trailing seconds, milliseconds, and timezone optional; accepts separating ``'T'`` or ``' '``" uuid = Regex(r"[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}").set_name("UUID") "UUID (``xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx``)" _html_stripper = any_open_tag.suppress() | any_close_tag.suppress() @staticmethod def strip_html_tags(s: str, l: int, tokens: ParseResults): """Parse action to remove HTML tags from web page HTML source Example:: # strip HTML links from normal text text = 'More info at the pyparsing wiki page' td, td_end = makeHTMLTags("TD") table_text = td + SkipTo(td_end).setParseAction(pyparsing_common.stripHTMLTags)("body") + td_end print(table_text.parseString(text).body) Prints:: More info at the pyparsing wiki page """ return pyparsing_common._html_stripper.transform_string(tokens[0]) _commasepitem = ( Combine( OneOrMore( ~Literal(",") + ~LineEnd() + Word(printables, exclude_chars=",") + Opt(White(" \t") + ~FollowedBy(LineEnd() | ",")) ) ) .streamline() .set_name("commaItem") ) comma_separated_list = delimited_list( Opt(quoted_string.copy() | _commasepitem, default="") ).set_name("comma separated list") """Predefined expression of 1 or more printable words or quoted strings, separated by commas.""" upcase_tokens = staticmethod(token_map(lambda t: t.upper())) """Parse action to convert tokens to upper case.""" downcase_tokens = staticmethod(token_map(lambda t: t.lower())) """Parse action to convert tokens to lower case.""" # fmt: off url = Regex( # https://mathiasbynens.be/demo/url-regex # https://gist.github.com/dperini/729294 r"^" + # protocol identifier (optional) # short syntax // still required r"(?:(?:(?Phttps?|ftp):)?\/\/)" + # user:pass BasicAuth (optional) r"(?:(?P\S+(?::\S*)?)@)?" + r"(?P" + # IP address exclusion # private & local networks r"(?!(?:10|127)(?:\.\d{1,3}){3})" + r"(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})" + r"(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})" + # IP address dotted notation octets # excludes loopback network 0.0.0.0 # excludes reserved space >= 224.0.0.0 # excludes network & broadcast addresses # (first & last IP address of each class) r"(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])" + r"(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}" + r"(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))" + r"|" + # host & domain names, may end with dot # can be replaced by a shortest alternative # (?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.)+ r"(?:" + r"(?:" + r"[a-z0-9\u00a1-\uffff]" + r"[a-z0-9\u00a1-\uffff_-]{0,62}" + r")?" + r"[a-z0-9\u00a1-\uffff]\." + r")+" + # TLD identifier name, may end with dot r"(?:[a-z\u00a1-\uffff]{2,}\.?)" + r")" + # port number (optional) r"(:(?P\d{2,5}))?" + # resource path (optional) r"(?P\/[^?# ]*)?" + # query string (optional) r"(\?(?P[^#]*))?" + # fragment (optional) r"(#(?P\S*))?" + r"$" ).set_name("url") # fmt: on # pre-PEP8 compatibility names convertToInteger = convert_to_integer convertToFloat = convert_to_float convertToDate = convert_to_date convertToDatetime = convert_to_datetime stripHTMLTags = strip_html_tags upcaseTokens = upcase_tokens downcaseTokens = downcase_tokens _builtin_exprs = [ v for v in vars(pyparsing_common).values() if isinstance(v, ParserElement) ] PK|5ZO2CL VLib/site-packages/pkg_resources/_vendor/pyparsing/__pycache__/__init__.cpython-311.pycnuW+A ^;d#^dZddlmZGddeZedddddZdZejZeZd Zd d l Td d l Td d l Td d l m Z mZd d lTd d l Td d l mZd d lTd d lmZd dlmZmZmZd dlmZd dlmZmZdevreZdevreZdevreZeeezz ZgdZdS)a pyparsing module - Classes and methods to define and execute parsing grammars ============================================================================= The pyparsing module is an alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions. With pyparsing, you don't need to learn a new syntax for defining grammars or matching expressions - the parsing module provides a library of classes that you use to construct the grammar directly in Python. Here is a program to parse "Hello, World!" (or any greeting of the form ``", !"``), built up using :class:`Word`, :class:`Literal`, and :class:`And` elements (the :meth:`'+'` operators create :class:`And` expressions, and the strings are auto-converted to :class:`Literal` expressions):: from pyparsing import Word, alphas # define grammar of a greeting greet = Word(alphas) + "," + Word(alphas) + "!" hello = "Hello, World!" print(hello, "->", greet.parse_string(hello)) The program outputs the following:: Hello, World! -> ['Hello', ',', 'World', '!'] The Python representation of the grammar is quite readable, owing to the self-explanatory class names, and the use of :class:`'+'`, :class:`'|'`, :class:`'^'` and :class:`'&'` operators. The :class:`ParseResults` object returned from :class:`ParserElement.parseString` can be accessed as a nested list, a dictionary, or an object with named attributes. The pyparsing module handles some of the problems that are typically vexing when writing text parsers: - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello , World !", etc.) - quoted strings - embedded comments Getting Started - ----------------- Visit the classes :class:`ParserElement` and :class:`ParseResults` to see the base classes that most other pyparsing classes inherit from. Use the docstrings for examples of how to: - construct literal match expressions from :class:`Literal` and :class:`CaselessLiteral` classes - construct character word-group expressions using the :class:`Word` class - see how to create repetitive expressions using :class:`ZeroOrMore` and :class:`OneOrMore` classes - use :class:`'+'`, :class:`'|'`, :class:`'^'`, and :class:`'&'` operators to combine simple expressions into more complex ones - associate names with your parsed results using :class:`ParserElement.setResultsName` - access the parsed data, which is returned as a :class:`ParseResults` object - find some helpful expression short-cuts like :class:`delimitedList` and :class:`oneOf` - find more useful common expressions in the :class:`pyparsing_common` namespace class ) NamedTuplecdeZdZUeed<eed<eed<eed<eed<edZdZdZ d S) version_infomajorminormicro releaselevelserialcd|j|j|jd|jddkrdnd|jd|jdf|jdkzS)Nz{}.{}.{}z{}{}{}rcrfinal)formatrrrr r selfs wE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/pyparsing/__init__.py __version__zversion_info.__version__js   dj$*dj A A,Q/366CCB%a(K  7*, , cNdt|jtS)Nz {} {} / {})r__name__r__version_time__rs r__str__zversion_info.__str__xs""8T-=?OPPPrc dtt|jddt |j|DS)Nz {}.{}({})z, c3*K|]}dj|VdS)z{}={!r}N)r).0nvs r z(version_info.__repr__..s-NN&i&+NNNNNNr)rrtypejoinzip_fieldsrs r__repr__zversion_info.__repr__{sS!!  JJ  IINNc$,6M6MNNN N N   rN) r __module__ __qualname__int__annotations__strpropertyrrr#rrrrcs JJJ JJJ JJJ KKK    X  QQQ     rr rz05 May 2022 07:02 UTCz+Paul McGuire )*)__diag__ __compat__)_builtin_exprs) unicode_setUnicodeRangeListpyparsing_unicode)pyparsing_test)pyparsing_commonr1r4r6r5)rr __author__r0r/And AtLineStart AtStringStartCaselessKeywordCaselessLiteral CharsNotInCombineDictEachEmpty FollowedByForward GoToColumnGroup IndentedBlockKeywordLineEnd LineStartLiteralLocated PrecededBy MatchFirstNoMatchNotAny OneOrMoreOnlyOnceOpAssocOptOptionalOrParseBaseExceptionParseElementEnhanceParseExceptionParseExpressionParseFatalException ParseResultsParseSyntaxException ParserElement PositionToken QuotedStringRecursiveGrammarExceptionRegexSkipTo StringEnd StringStartSuppressTokenTokenConverterWhiteWordWordEnd WordStart ZeroOrMoreChar alphanumsalphas alphas8bit any_close_tag any_open_tagc_style_commentcolcommon_html_entity counted_arraycpp_style_commentdbl_quoted_stringdbl_slash_commentdelimited_listdict_ofemptyhexnums html_comment identcharsidentbodycharsjava_style_commentlineline_end line_startlinenomake_html_tags make_xml_tagsmatch_only_at_colmatch_previous_exprmatch_previous_literal nested_exprnull_debug_actionnumsone_of printablespunc8bitpython_style_comment quoted_string remove_quotes replace_withreplace_html_entity rest_of_linesgl_quoted_stringsrange string_end string_starttrace_parse_actionunicode_stringwith_attribute indentedBlockoriginal_text_forungroupinfix_notation locatedExpr with_class CloseMatch token_mapr6r4r2condition_as_parse_actionr5__versionTime__ anyCloseTag anyOpenTag cStyleCommentcommonHTMLEntity countedArraycppStyleCommentdblQuotedStringdblSlashComment delimitedListdictOf htmlCommentjavaStyleCommentlineEnd lineStart makeHTMLTags makeXMLTagsmatchOnlyAtColmatchPreviousExprmatchPreviousLiteral nestedExprnullDebugActiononeOfopAssocpythonStyleComment quotedString removeQuotesreplaceHTMLEntity replaceWith restOfLinesglQuotedString stringEnd stringStarttraceParseAction unicodeString withAttributeroriginalTextFor infixNotationr withClasstokenMapconditionAsParseActionautoname_elementsN)__doc__typingrr__version_info__rrrr7util exceptionsactionscorer/r0resultsr1core_builtin_exprshelpershelper_builtin_exprsunicoder2r3r4testingr5commonr6common_builtin_exprsglobals__all__r*rrrs2F N     :   @ <1a!44** " : &&&&&&&&666666;;;;;;PPPPPPPPPP...... ggii''WWYY&&7799$$N*-AAAf f f rPK|5Z#S99TLib/site-packages/pkg_resources/_vendor/pyparsing/__pycache__/common.cpython-311.pycnuW+A ^;d2ddlTddlmZmZmZddlmZGddZdeeDZ dS) )*)delimited_list any_open_tag any_close_tag)datetimec eZdZdZeeZ eeZ e e  d eZ e e d eedZ ed d eZ e edze ez dZ ed eeeed ezzz d Z eeed  d  eZ ed d eZ eezezdZ ed d eZ e ee dZ ed dZ! ed dZ"e"de"zdzz dZ#ee"de"zdzzdzee"de"zdzzz dZ$e$%dde!z d Z&e'e#e&ze$z d! d!Z( ed" d#Z) e*d?d%e+fd&Z,e*d@d%e+fd(Z-ed) d*Z. ed+ d,Z/ ed- d.Z0 e1je2jzZ3e*d/e+d0ed1e4fd2Z5e'e6e7d3e8ze e9d34zee:d5e;e8d3zzz d6Z<e=ee>?eS)Apyparsing_commona" Here are some common low-level expressions that may be useful in jump-starting parser development: - numeric forms (:class:`integers`, :class:`reals`, :class:`scientific notation`) - common :class:`programming identifiers` - network addresses (:class:`MAC`, :class:`IPv4`, :class:`IPv6`) - ISO8601 :class:`dates` and :class:`datetime` - :class:`UUID` - :class:`comma-separated list` - :class:`url` Parse actions: - :class:`convertToInteger` - :class:`convertToFloat` - :class:`convertToDate` - :class:`convertToDatetime` - :class:`stripHTMLTags` - :class:`upcaseTokens` - :class:`downcaseTokens` Example:: pyparsing_common.number.runTests(''' # any int or real number, returned as the appropriate type 100 -100 +100 3.14159 6.02e23 1e-12 ''') pyparsing_common.fnumber.runTests(''' # any int or real number, returned as float 100 -100 +100 3.14159 6.02e23 1e-12 ''') pyparsing_common.hex_integer.runTests(''' # hex numbers 100 FF ''') pyparsing_common.fraction.runTests(''' # fractions 1/2 -3/4 ''') pyparsing_common.mixed_integer.runTests(''' # mixed fractions 1 1/2 -3/4 1-3/4 ''') import uuid pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID)) pyparsing_common.uuid.runTests(''' # uuid 12345678-1234-5678-1234-567812345678 ''') prints:: # any int or real number, returned as the appropriate type 100 [100] -100 [-100] +100 [100] 3.14159 [3.14159] 6.02e23 [6.02e+23] 1e-12 [1e-12] # any int or real number, returned as float 100 [100.0] -100 [-100.0] +100 [100.0] 3.14159 [3.14159] 6.02e23 [6.02e+23] 1e-12 [1e-12] # hex numbers 100 [256] FF [255] # fractions 1/2 [0.5] -3/4 [-0.75] # mixed fractions 1 [1] 1/2 [0.5] -3/4 [-0.75] 1-3/4 [1.75] # uuid 12345678-1234-5678-1234-567812345678 [UUID('12345678-1234-5678-1234-567812345678')] integerz hex integerz[+-]?\d+zsigned integer/fractionc$|d|dz S)Nr)tts uE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/pyparsing/common.pyzpyparsing_common.sAB-z"fraction or mixed integer-fractionz[+-]?(?:\d+\.\d*|\.\d+)z real numberz@[+-]?(?:\d+(?:[eE][+-]?\d+)|(?:\d+\.\d*|\.\d+)(?:[eE][+-]?\d+)?)z$real number with scientific notationnumberz[+-]?\d+\.?\d*([eE][+-]?\d+)?fnumber identifierzK(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}z IPv4 addressz[0-9a-fA-F]{1,4} hex_integer:zfull IPv6 address)rz::zshort IPv6 addressc<td|DdkS)Nc3XK|]%}tj|!dV&dS)rN)r _ipv6_partmatches).0rs r z,pyparsing_common...s9OOB'7'B'J'J2'N'NOaOOOOOOr)sumts rrzpyparsing_common.s##OO!OOOOORSSrz::ffff:zmixed IPv6 addressz IPv6 addressz:[0-9a-fA-F]{2}([:.-])[0-9a-fA-F]{2}(?:\1[0-9a-fA-F]{2}){4}z MAC address%Y-%m-%dfmtcfd}|S)a Helper to create a parse action for converting parsed date string to Python datetime.date Params - - fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%d"``) Example:: date_expr = pyparsing_common.iso8601_date.copy() date_expr.setParseAction(pyparsing_common.convertToDate()) print(date_expr.parseString("1999-12-31")) prints:: [datetime.date(1999, 12, 31)] c tj|dS#t$r#}t ||t |d}~wwxYwNr)rstrptimedate ValueErrorParseExceptionstr)ssllrver)s rcvt_fnz0pyparsing_common.convert_to_date..cvt_fnsb 6(A4499;;; 6 6 6$RSWW555 6s,0 AAArr)r5s` rconvert_to_datez pyparsing_common.convert_to_dates#& 6 6 6 6 6  r%Y-%m-%dT%H:%M:%S.%fcfd}|S)aHelper to create a parse action for converting parsed datetime string to Python datetime.datetime Params - - fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%dT%H:%M:%S.%f"``) Example:: dt_expr = pyparsing_common.iso8601_datetime.copy() dt_expr.setParseAction(pyparsing_common.convertToDatetime()) print(dt_expr.parseString("1999-12-31T23:59:59.999")) prints:: [datetime.datetime(1999, 12, 31, 23, 59, 59, 999000)] c tj|dS#t$r#}t||t |d}~wwxYwr,)rr-r/r0r1)slr'r4r)s rr5z4pyparsing_common.convert_to_datetime..cvt_fn*sV 4(1s333 4 4 4$Q3r77333 4s A AA rr6s` rconvert_to_datetimez$pyparsing_common.convert_to_datetimes#& 4 4 4 4 4  rz7(?P\d{4})(?:-(?P\d\d)(?:-(?P\d\d))?)?z ISO8601 datez(?P\d{4})-(?P\d\d)-(?P\d\d)[T ](?P\d\d):(?P\d\d)(:(?P\d\d(\.\d*)?)?)?(?PZ|[+-]\d\d:?\d\d)?zISO8601 datetimez2[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}UUIDr;r<tokenscLtj|dS)aParse action to remove HTML tags from web page HTML source Example:: # strip HTML links from normal text text = 'More info at the pyparsing wiki page' td, td_end = makeHTMLTags("TD") table_text = td + SkipTo(td_end).setParseAction(pyparsing_common.stripHTMLTags)("body") + td_end print(table_text.parseString(text).body) Prints:: More info at the pyparsing wiki page r)r _html_strippertransform_string)r;r<r?s rstrip_html_tagsz pyparsing_common.strip_html_tagsAs  .??q JJJr,) exclude_charsz commaItem)defaultzcomma separated listc*|SN)upperr&s rrzpyparsing_common.dsQWWYYrc*|SrJ)lowerr&s rrzpyparsing_common.gsqwwyyra^(?:(?:(?Phttps?|ftp):)?\/\/)(?:(?P\S+(?::\S*)?)@)?(?P(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(:(?P\d{2,5}))?(?P\/[^?# ]*)?(\?(?P[^#]*))?(#(?P\S*))?$urlN)r()r8)K__name__ __module__ __qualname____doc__ token_mapintconvert_to_integerfloatconvert_to_floatWordnumsset_nameset_parse_actionr hexnumsrRegexsigned_integerradd_parse_actionOptsuppress mixed_integerr%realsci_realsetName streamlinerr identcharsidentbodycharsr ipv4_addressr _full_ipv6_address_short_ipv6_address add_condition_mixed_ipv6_addressCombine ipv6_address mac_address staticmethodr1r7r= iso8601_dateiso8601_datetimeuuidrrrA ParseResultsrC OneOrMoreLiteralLineEnd printablesWhite FollowedBy _commasepitemr quoted_stringcopycomma_separated_list upcase_tokensdowncase_tokensrNconvertToIntegerconvertToFloat convertToDateconvertToDatetime stripHTMLTags upcaseTokensdowncaseTokensrrrr r sOOb#3!y''d4jj!!),,==>PQQGD W }-->>yyb?Q?QRRG k " # #  , - - W ))*:;;   .   + +,< = = >hz  U 77888 >CCC(9(9(;(;h(F$G$GGGh344g""3''' ()) -  * + + M QRR 8 9 9  * + + /o. 7 7 A A L L N NFG .// )    * + + 4j.11::<HHJd5Vh~3*++44]CCJ$j(8A'==GG J# *f4 455   #jC*,66 7 7 8h#$$  %%SS%|3==>RSS7 1 14G GQQ   h~  0%Eh}GS\4\45Bh~$u Rh!""] 5F G G P PQW X XD5*\*,,/E}/E/G/GGNK3K3K KKK\K$  I 799*$z5556#eeElljjS&A&A%AABBC      +  *> M   = 0"===h%&&e L+>+>!?!?@@M7"l99-@-@#A#ABBO7 %* . . \huoo]d*%N#M+#M L$NNNrr c<g|]}t|t|Sr) isinstance ParserElement)r"vs r rs7 *Q 2N2NrN) corehelpersrrrrr varsvalues_builtin_exprsrrrrs@@@@@@@@@@[%[%[%[%[%[%[%[%| t$%%,,..rPK|5Zտ\<<RLib/site-packages/pkg_resources/_vendor/pyparsing/__pycache__/core.cpython-311.pycnuW+A ^;d>A UddlZddlZddlmZmZmZmZmZmZmZm Z m Z m Z ddl m Z mZddlmZddlZddlZddlZddlZddlZddlmZddlZddlZddlmZddlmZddlmZdd l m!Z!d d l"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z+m,Z-d d l.Td d l/Td d l0m1Z1m2Z2d dl3m4Z4ej5Z6e7e8fZ9ee:dfe;d<ej<dkrddlm=Z=n GddZ=Gdde%Z>Gdde%Z?GddeZ@de@ddfdZAde@ddfdZBddZC[%d eje7d!ejDe7deEfd"ZFeFejGejHId#r eCeJeKeLeMeNeOePeQeReSeTh ZUejVZWeegefee1gefeeXe1gefee7eXe1geffZYeegeEfee1geEfeeXe1geEfee7eXe1geEffZZee7eXd$e[gdfZ\ee7eXd$eEgdfZ]ee7eXeXd$e1eEgdfZ^ee7eXd$e[eEgdfZ_ej`ejazZbe4jcjdZde4jcjeZed%Zfefd&zZgebefzZhd'id(ejjDZkdalejme;d)<dd+Zn dd-eZd.e7d/eEdeYfd0Zo dd1e7d2eXd3d$d4eEfd5Zp dd1e7d6eXd7eXd3d$d8e1d4eEf d9Zq dd1e7d2eXd3d$d:e[d4eEf d;Zrd<ZsGd=d$e ZtGd>d?etZuGd@dAetZvGdBdCevZwGdDdEevZxGdFdGevZyGdHdIeyZzeyet_{GdJdKevZ|GdLdMeyZ}GdNdOe|Z~GdPdQevZGdRdSevZGdTdUeZGdVdWeZGdXdYevZGdZd[evZGd\d]evZGd^d_evZGd`daevZGdbdceZGdddeeZGdfdgeZGdhdieZGdjdkeZGdldmeZGdndoeZGdpdqetZGdrdseZGdtdueZGdvdweZGdxdyeZGdzd{etZGd|d}eZGd~deZGddeZGddeZGddeZGddeZGddeZGddeZGddeZGddeZGddZGddeZeZDGddeZGddeZGddeZGddeZGddeZGddeZGddeZdeYdeYfdZewdZedZedZedZedZee(dddZeddZeddZeezezedd zZeeedzezZeydeddzeeeezdzdzZde7de7fdZdeYfdZddZeeddzdZeeddzdZeeddzeddzzd¦ZedezdĦZedŦZedƦZdDŽeDZeete;d<eZeoZesZeZeZeZeZeZeZeZeZeZdS)N) NamedTupleUnionCallableAny GeneratorTupleListTextIOSetSequence)ABCabstractmethod)Enum)Iterable) itemgetter)wraps)RLock)Path) _FifoCache_UnboundedCache__config_flags_collapse_string_to_ranges_escape_regex_range_chars_bslash_flattenLRUMemo UnboundedMemo)*) ParseResults_ParseResultsWithOffset)pyparsing_unicode.str_type))cached_propertyceZdZdZddZdS)r&c||_dSN)_func)selffuncs sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/pyparsing/core.py__init__zcached_property.__init__Qs DJJJNcX||x}|j|jj<|Sr))r*__dict____name__)r+instanceownerrets r-__get__zcached_property.__get__Ts*;?::h;O;O OC(#DJ$78Jr/r))r2 __module__ __qualname__r.r6r/r-r&r&Ps7         r/r&cjeZdZdZdZdZdeDZdZ dS) __compat__aJ A cross-version compatibility configuration for pyparsing features that will be released in a future version. By setting values in this configuration to True, those features can be enabled in prior versions for compatibility development and testing. - ``collect_all_And_tokens`` - flag to enable fix for Issue #63 that fixes erroneous grouping of results names when an :class:`And` expression is nested within an :class:`Or` or :class:`MatchFirst`; maintained for compatibility, but setting to ``False`` no longer restores pre-2.3.1 behavior compatibilityTc<g|]}|d|S_ startswith.0__s r- z__compat__.j)BBBr}}S/A/AB"BBBr/z( collect_all_And_tokens N) r2r7r8__doc__ _type_desccollect_all_And_tokenslocals _all_namessplit _fixed_namesr9r/r-r;r;YsQ  !J!BBvvxxBBBJ EGGLLr/r;ceZdZdZdZdZdZdZdZdZ dZ dZ de DZ de DZde DZed dZdS) __diag__ diagnosticFc<g|]}|d|Sr>r@rBs r-rEz__diag__.|rFr/c<g|]}|d|S)warnr@rCnames r-rEz__diag__.}s)MMMtT__V5L5LMdMMMr/c<g|]}|d|S) enable_debugr@rTs r-rEz__diag__.~s)SSST4??>3R3RSDSSSr/returnNcD|jD]}||dSr))_warning_namesenable)clsrUs r-enable_all_warningsz__diag__.enable_all_warningss3&  D JJt      r/rXN)r2r7r8rH)warn_multiple_tokens_in_named_alternation)warn_ungrouped_named_tokens_in_collectionwarn_name_set_on_empty_Forward!warn_on_parse_using_empty_Forwardwarn_on_assignment_to_Forward%warn_on_multiple_string_args_to_oneof(warn_on_match_first_with_lshift_operator!enable_debug_on_named_expressionsrJrKrZ _debug_names classmethodr]r9r/r-rOrOpsJ05-05-%*"(-%$)!,1)/4,(-%BBvvxxBBBJMMzMMMNSSZSSSL[r/rOc2eZdZdZdZdZdZdZdZdZ dZ d Z d S) Diagnosticsa Diagnostic configuration (all default to disabled) - ``warn_multiple_tokens_in_named_alternation`` - flag to enable warnings when a results name is defined on a :class:`MatchFirst` or :class:`Or` expression with one or more :class:`And` subexpressions - ``warn_ungrouped_named_tokens_in_collection`` - flag to enable warnings when a results name is defined on a containing expression with ungrouped subexpressions that also have results names - ``warn_name_set_on_empty_Forward`` - flag to enable warnings when a :class:`Forward` is defined with a results name, but has no contents defined - ``warn_on_parse_using_empty_Forward`` - flag to enable warnings when a :class:`Forward` is defined in a grammar but has never had an expression attached to it - ``warn_on_assignment_to_Forward`` - flag to enable warnings when a :class:`Forward` is defined but is overwritten by assigning using ``'='`` instead of ``'<<='`` or ``'<<'`` - ``warn_on_multiple_string_args_to_oneof`` - flag to enable warnings when :class:`one_of` is incorrectly called with multiple str arguments - ``enable_debug_on_named_expressions`` - flag to auto-enable debug on all subsequent calls to :class:`ParserElement.set_name` Diagnostics are enabled/disabled by calling :class:`enable_diag` and :class:`disable_diag`. All warnings can be enabled by calling :class:`enable_all_warnings`. rrr$N) r2r7r8rGr_r`rarbrcrdrerfr9r/r-rjrjsL,12-01-%&"()%$%!,-)/0,()%%%r/rj diag_enumrXcDt|jdS)zO Enable a global pyparsing diagnostic flag (see :class:`Diagnostics`). N)rOr[rUrps r- enable_diagrss OOIN#####r/cDt|jdS)zP Disable a global pyparsing diagnostic flag (see :class:`Diagnostics`). N)rOdisablerUrrs r- disable_diagrvs  Y^$$$$$r/c8tdS)zU Enable all global pyparsing diagnostic warnings (see :class:`Diagnostics`). N)rOr]r9r/r-r]r]s   """""r/cmd_line_warn_options warn_env_varc@t|}|D]}|dzddd\}}}}}|ds|s|s|r|dkrd}^|dr|dvrd}|S) Nz:::::rmi pyparsingT)r}F)boolrLlowerrA) rxryr[warn_optw_action w_message w_categoryw_modulew_lines r-_should_enable_warningsrs,  F)  =E=NO2O2OF Mr/PYPARSINGENABLEALLWARNINGS ParserElement 0123456789 ABCDEFabcdefr~c.g|]}|tjv|Sr9)string whitespacerCcs r-rErEs%PPPAQf>O5O5Oa5O5O5Or/_trim_arity_call_liner$cBtvrfdSddd dd}tptjddatdtd |zffd }t d t d j}||_j|_|S)zAdecorator to trim function calls to match the arity of the targetc|Sr)r9)sltr,s r-z_trim_arity.. sttAwwr/rFcTtj||}|d}|ddgS)Nlimitrk) traceback extract_tb)tbrframes frame_summarys r-rz_trim_arity..extract_tbs2%b666r bqb!""r/rorkrrrc |d}d|S#t$rB}r|j}|dddd k}~|r kr dz Yd}~Yd}~wwxYw)NrTrkrr) TypeError __traceback__) argsr5tertrim_arity_type_errorr found_arityr,r max_limitpa_call_line_synths r-wrapperz_trim_arity..wrappers  dDL)"     )B" 2Q///3BQB7;MM*,% 9,,!QJE$HHHH! s A!7AAA!r2 __class__r)_single_arg_builtinsrr extract_stackgetattrr2rG) r,r LINE_DIFFr func_namerrrrs `` @@@@r- _trim_arityrs ###&&&&& EK####I3Zi6MTU6V6V6VWY6Z/24I!4Ly4XY8j'$ *D*D*MNNI GlGO Nr/Ffnmessagefatalc||nd|rtntttfd}|S)aC Function to convert a simple predicate function that returns ``True`` or ``False`` into a parse action. Can be used in places when a parse action is required and :class:`ParserElement.add_condition` cannot be used (such as when adding a condition to an operator level in :class:`infix_notation`). Optional keyword arguments: - ``message`` - define a custom message to be used in the raised exception - ``fatal`` - if True, will raise :class:`ParseFatalException` to stop parsing immediately; otherwise will raise :class:`ParseException` Nzfailed user-defined conditioncVt|||s ||dSr))r)rrrexc_typermsgs r-paz%condition_as_parse_action..paVs=BBq!QKK   &(1a%% % & &r/)ParseFatalExceptionParseExceptionrr)rrrrrrs` @@r-condition_as_parse_actionrBsk (''.MC&+?""H RB 2YY&&&&&&Y& Ir/instringlocexpr cache_hitc|rdnd}td|||t||t||t ||dt||dz zdS)Nrr~z&{}Match {} at loc {}({},{}) {} {}^ r)printformatlinenocolline)rrrr cache_hit_strs r-_default_start_debug_actionr^s%,CC"M 6 = =sH%%C""S(##s3))A-.       r/startlocendloctoksc~|rdnd}td|||dS)Nrr~z{}Matched {} -> {})rras_list)rrrrrrrs r-_default_success_debug_actionrqsA%,CC"M  % %mT4<<>> J JKKKKKr/excc |rdnd}td||t|j|dS)Nrr~z {}Match {} failed, {} raised: {})rrtyper2)rrrrrrs r-_default_exception_debug_actionr}sS%,CC"M *11 4c!3S  r/cdS)zG'Do-nothing' debug action, to suppress debugging output during parsing.Nr9)rs r-null_debug_actionrr/c'eZdZUdZdZeed<dZeed<dZ e j e ed<e ded dfd Ze d e d dfd ZGd deZddefdZded dfdZddZ ddddededed dfdZddZdded dfdZded dfdZded dfdZded dfd Zd!ed dfd"Zd#Z d$Z!dd%Z"d&Z# dd e$e%e&ffd'Z'dd(ed)e%d*ed e%fd+Z(d(ed)e%d efd,Z)e*Z+iZ,e j-e$e%d-efe$e%e.e&e/fffed.<iZ0e*Z1d/d/gZ2 dd e$e%e&ffd0Z3e'Z4e dd1Z5dZ6dZ7e dd2Z8e ddd3d4e j e%d dfd5Z9e ddd3d4e%d7ed dfd8Z: ddd9d(ed:ed;ed e&fd<Z;ee%d?ed@edAe%d e=e$e&e%e%fddff dBZ>ddCd(ed@ed efdDZ?ee%d@edAe%d e&f dEZ@eZe@Ze?ZeVZeWZe\Ze]Ze_ZebZemZesZeSZeTZdS)rz)Abstract base level parser element class.z DEFAULT_WHITE_CHARSFverbose_stacktraceN_literalStringClasscharsrXch|t_tD]}|jrt ||_dS)a Overrides the default whitespace chars Example:: # default whitespace chars are space, and newline Word(alphas)[1, ...].parse_string("abc def\nghi jkl") # -> ['abc', 'def', 'ghi', 'jkl'] # change to just treat newline as significant ParserElement.set_default_whitespace_chars(" \t") Word(alphas)[1, ...].parse_string("abc def\nghi jkl") # -> ['abc', 'def'] N)rr_builtin_exprscopyDefaultWhiteCharsset whiteChars)rrs r-set_default_whitespace_charsz*ParserElement.set_default_whitespace_charss@-2 )# - -D) -"%e** - -r/r\c|t_dS)al Set class to be used for inclusion of string literals into a parser. Example:: # default literal class used is Literal integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") date_str.parse_string("1999/12/31") # -> ['1999', '/', '12', '/', '31'] # change to Suppress ParserElement.inline_literals_using(Suppress) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") date_str.parse_string("1999/12/31") # -> ['1999', '12', '31'] N)rr)r\s r-inline_literals_usingz#ParserElement.inline_literals_usings(-0 )))r/cpeZdZUejeed<ejeed<ejeed<dS)ParserElement.DebugActions debug_try debug_match debug_failN) r2r7r8typingOptionalDebugStartAction__annotations__DebugSuccessActionDebugExceptionActionr9r/r- DebugActionsrsN?#34444_%78888O$8999999r/rsavelistct|_d|_d|_d|_d|_||_d|_ttj |_ d|_ d|_ d|_t|_d|_d|_d|_d|_d|_|ddd|_d|_d|_g|_dS)NTFr~)list parseAction failAction customName _defaultName resultsName saveAsListskipWhitespacerrrrrmayReturnEmptykeepTabs ignoreExprsdebug streamlined mayIndexErrorerrmsg modalResultsr debugActions callPreparse callDuringTrysuppress_warnings_)r+rs r-r.zParserElement.__init__s.2ff<@ ""m?@@%)"# 26&&  !   --dD$?? "57r/ warning_typec:|j||S)aY Suppress warnings emitted for a particular diagnostic on this expression. Example:: base = pp.Forward() base.suppress_warning(Diagnostics.warn_on_parse_using_empty_Forward) # statement would normally raise a warning, but is now suppressed print(base.parseString("x")) )rappend)r+rs r-suppress_warningzParserElement.suppress_warnings  &&|444 r/ctj|}|jdd|_|jdd|_|jrt t j|_|S)a7 Make a copy of this :class:`ParserElement`. Useful for defining different parse actions for the same parsing pattern, using copies of the original parse element. Example:: integer = Word(nums).set_parse_action(lambda toks: int(toks[0])) integerK = integer.copy().add_parse_action(lambda toks: toks[0] * 1024) + Suppress("K") integerM = integer.copy().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M") print((integerK | integerM | integer)[1, ...].parse_string("5K 100 640K 256M")) prints:: [5120, 100, 655360, 268435456] Equivalent form of ``expr.copy()`` is just ``expr()``:: integerM = integer().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M") N)copyrrrrrrr)r+cpys r-r zParserElement.copysZ,ioo*111-*111-  % D !BCCCN r/)listAllMatchesrUlist_all_matchesrc6|p|}|||S)a Define name for referencing matching tokens as a nested attribute of the returned parse results. Normally, results names are assigned as you would assign keys in a dict: any existing value is overwritten by later values. If it is necessary to keep all values captured for a particular results name, call ``set_results_name`` with ``list_all_matches`` = True. NOTE: ``set_results_name`` returns a *copy* of the original :class:`ParserElement` object; this is so that the client can define a basic element, such as an integer, and reference it in multiple places with different names. You can also set results names using the abbreviated syntax, ``expr("name")`` in place of ``expr.set_results_name("name")`` - see :class:`__call__`. If ``list_all_matches`` is required, use ``expr("name*")``. Example:: date_str = (integer.set_results_name("year") + '/' + integer.set_results_name("month") + '/' + integer.set_results_name("day")) # equivalent form: date_str = integer("year") + '/' + integer("month") + '/' + integer("day") )_setResultsName)r+rUrrs r-set_results_namezParserElement.set_results_names%<(;+;##D.999r/c||S|}|dr |dd}d}||_| |_|S)NrrT)r endswithrr)r+rUrnewselfs r-rzParserElement._setResultsName1sW <K))++ ==   "9D!N"#11r/T break_flagc|r|jdfd }|_||_n&t|jdr|jj|_|S)z Method to invoke the Python pdb debugger when this element is about to be parsed. Set ``break_flag`` to ``True`` to enable, ``False`` to disable. TcPddl}|||||SNr)pdb set_trace)rr doActions callPreParser _parseMethods r-breakerz(ParserElement.set_break..breakerEs1  #|Hc9lKKKr/_originalParseMethodTT)_parser hasattr)r+rrrs @r- set_breakzParserElement.set_break<sq  ?;L L L L L L L,8G (!DKKt{$:;; ?"k>  r/fnsct|dgkrg|_nhtd|Dstdd|D|_|d|dd|_|S)ao Define one or more actions to perform when successfully matching parse element definition. Parse actions can be called to perform data conversions, do extra validation, update external data structures, or enhance or replace the parsed tokens. Each parse action ``fn`` is a callable method with 0-3 arguments, called as ``fn(s, loc, toks)`` , ``fn(loc, toks)`` , ``fn(toks)`` , or just ``fn()`` , where: - s = the original string being parsed (see note below) - loc = the location of the matching substring - toks = a list of the matched tokens, packaged as a :class:`ParseResults` object The parsed tokens are passed to the parse action as ParseResults. They can be modified in place using list-style append, extend, and pop operations to update the parsed list elements; and with dictionary-style item set and del operations to add, update, or remove any named results. If the tokens are modified in place, it is not necessary to return them with a return statement. Parse actions can also completely replace the given tokens, with another ``ParseResults`` object, or with some entirely different object (common for parse actions that perform data conversions). A convenient way to build a new parse result is to define the values using a dict, and then create the return value using :class:`ParseResults.from_dict`. If None is passed as the ``fn`` parse action, all previously added parse actions for this expression are cleared. Optional keyword arguments: - call_during_try = (default= ``False``) indicate if parse action should be run during lookaheads and alternate testing. For parse actions that have side effects, it is important to only call the parse action once it is determined that it is being called as part of a successful parse. For parse actions that perform additional validation, then call_during_try should be passed as True, so that the validation code is included in the preliminary "try" parses. Note: the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`parse_string` for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. Example:: # parse dates in the form YYYY/MM/DD # use parse action to convert toks from str to int at parse time def convert_to_int(toks): return int(toks[0]) # use a parse action to verify that the date is a valid date def is_valid_date(instring, loc, toks): from datetime import date year, month, day = toks[::2] try: date(year, month, day) except ValueError: raise ParseException(instring, loc, "invalid date given") integer = Word(nums) date_str = integer + '/' + integer + '/' + integer # add parse actions integer.set_parse_action(convert_to_int) date_str.set_parse_action(is_valid_date) # note that integer fields are now ints, not strings date_str.run_tests(''' # successful parse - note that integer fields were converted to ints 1999/12/31 # fail - invalid date 1999/13/31 ''') Nc34K|]}t|VdSr))callablerCrs r- z1ParserElement.set_parse_action..s(22x||222222r/zparse actions must be callablec,g|]}t|Sr9rr)s r-rEz2ParserElement.set_parse_action..s>>>B B>>>r/call_during_tryrF)rrallrgetrr+r%kwargss r-set_parse_actionzParserElement.set_parse_actionSsV 99  !D  22c22222 B @AAA>>#>>>D !'!6::ou#E#E""D  r/c|xjd|Dz c_|jp)|d|dd|_|S)z Add one or more parse actions to expression's list of parse actions. See :class:`set_parse_action`. See examples in :class:`copy`. c,g|]}t|Sr9r,r)s r-rEz2ParserElement.add_parse_action..s;;;[__;;;r/r-rF)rrr/r0s r-add_parse_actionzParserElement.add_parse_actionsa ;;s;;;;!/ 6:: vzz/5AA4 4  r/c |D]S}|jt||d|ddT|jp)|d|dd|_|S)aAdd a boolean predicate function to expression's list of parse actions. See :class:`set_parse_action` for function call signatures. Unlike ``set_parse_action``, functions passed to ``add_condition`` need to return boolean success/fail of the condition. Optional keyword arguments: - message = define a custom message to be used in the raised exception - fatal = if True, will raise ParseFatalException to stop parsing immediately; otherwise will raise ParseException - call_during_try = boolean to indicate if this method should be called during internal tryParse calls, default=False Example:: integer = Word(nums).set_parse_action(lambda toks: int(toks[0])) year_int = integer.copy() year_int.add_condition(lambda toks: toks[0] >= 2000, message="Only support years 2000 and later") date_str = year_int + '/' + integer + '/' + integer result = date_str.parse_string("1999/12/31") # -> Exception: Only support years 2000 and later (at char 0), (line:1, col:1) rrF)rrr-r)rr rr/r)r+r%r1rs r- add_conditionzParserElement.add_conditions.  B   # #) 9 5 5VZZQV=W=W     "/ 6:: vzz/5AA4 4  r/rc||_|S)a Define action to perform if parsing fails at this expression. Fail acton fn is a callable function that takes the arguments ``fn(s, loc, expr, err)`` where: - s = string being parsed - loc = location where expression match was attempted and failed - expr = the parse expression that failed - err = the exception thrown The function returns no value. It may throw :class:`ParseFatalException` if it is desired to stop parsing immediately.)r)r+rs r-set_fail_actionzParserElement.set_fail_actions r/cd}|r;d}|jD]/} |||\}}d}#t$rY,wxYw|;|SNTF)rr"r)r+rr exprsFoundedummys r-_skipIgnorableszParserElement._skipIgnorabless  J%  *%&XXh%<%< U%) *&D  s . ;;c|jr|||}|jr;t|}|j}||kr|||vr|dz }||kr |||v|SNr)rr?rlenr)r+rrinstrlen white_charss r-preParsezParserElement.preParses   6&&x55C   8}}H/K..Xc]k%A%Aq..Xc]k%A%A r/c |gfSr)r9r+rrrs r- parseImplzParserElement.parseImpls Bwr/c|Sr)r9r+rr tokenlists r- postParsezParserElement.postParsesr/c  d\}}}|j}t|} |s|jr |r|jr|||} n|} | } |jjr|j|| |d|js| | krA ||| |\}} n?#t$rt|| |j |wxYw||| |\}} n#t$rO} |jj r|j || || d|jr||| || d} ~ wwxYw|r|jr|||} n|} | } |js| | krA ||| |\}} n?#t$rt|| |j |wxYw||| |\}} |||| } t| |j|j|j}|jrM|s|jrC|r |jD]y} ||| |} n$#t$r}td}||d}~wwxYw| B| |ur>t| |j|jot+| tt,f|j}zn#t$r0} |jj r|j || || dd} ~ wwxYw|jD]y} ||| |} n$#t$r}td}||d}~wwxYw| B| |ur>t| |j|jot+| tt,f|j}z|r+|jjr|j|| |||d||fS)NrrrkF)asListmodalz exception raised in parse action)rrBrrrErrrrH IndexErrorrr ExceptionrrLr rrrrr isinstancerr)r+rrrrTRYMATCHFAIL debugging len_instringpre_loc tokens_starttokenserr ret_tokensrparse_action_excrs r- _parseNoCachezParserElement._parseNoCaches#UDJ 8}} & K& K "D$5""mmHc::GG!G& $.U%//,eTTT%OL)@)@X&*nnXw &R&R VV%XXX,X|T[RVWWWX#'..7I"N"NKC   $/%00 ,c5?GOOHlD#FFF   1 --#66"L! KW %<%<T"&..7I"N"NKC!TTT(<dSSST#nnXw JJ V#v66! D$T_DDU     ( ( d.@( ' ".<%'R, %K%KFF)<<<"01S"T"TC"%+;;<"-& 2J2J)5 & $ 0'+(M$.v d7K$L$L&*&7 ***J!(3)44$lD#u *B8!#HlJ!G!G%888,-OPP!'778)fJ.F.F%1" ,#'?$I *6L$3G H H"&"3 &&&    , !--lCz5JsACBC"CC D7(A D22D7,F"F) J H,+J, I 6II  AJ K +K  K K++ L 5LL rr raise_fatalc |||ddS#t$r|rt|||j|wxYw)NFrr)r"rrr)r+rrr`s r- try_parsezParserElement.try_parsense C;;x;>>qA A" C C C  3 TBB B Cs  %Acd |||dS#ttf$rYdSwxYwr;)rcrrQ)r+rrs r-can_parse_nextzParserElement.can_parse_nextvsK  NN8S ) ) )4 +   55 s //Forwardrecursion_memosrc xd\}}d\}}} |||||f} tj5tj} | | } | | jurtj|xxdz cc< |||||} | | | d| d|f| cdddS#t$r)} | | | j | j d} ~ wwxYwtj|xxdz cc<|j r<|j jr0 |j |||dn#t$rYnwxYwt!| t"rF|j r=|j jr1 |j |||| dn#t$rYnwxYw| | d| d| d}}}|j r>|j jr2 |j |||||dn#t$rYnwxYw||fcdddS#1swxYwYdS)N)rrrNrrT)rrk)rpackrat_cache_lock packrat_cacher/ not_in_cachepackrat_cache_statsr_rr ParseBaseExceptionrrrrrrrSrRrr)r+rrrrHITMISSrTrUrVlookupcachevaluepeloc_resultrs r- _parseCachezParserElement._parseCaches6 T"UD#|Y?  -( $( $!/EIIf%%E***1$7771<777! ..xiVVE IIfuQxq#&FGGG ( $( $( $( $( $( $( $( $*IIflblBG&<===1#666!;666:$"3"=)33Hc4SW3XXXX$eY// z!d&7&B!! -88 (#tUd9 )!!! D!K',Qxq%(ff:$"3"?)55$dFD&D6%V|Q( $( $( $( $( $( $( $( $( $( $( $( $( $( $( $( $( $( $sAH/%C=8H/ C5 $C00C550H/&EH/ EH/E+H/>FH/ F+(H/*F++AH/. HH/ HH/HH//H36H3ctjdgttjztjdd<tjdSr)rrjclearrBrlrgr9r/r- reset_cachezParserElement.reset_caches^#))+++01sS  -6 6 0 )!!!, %++-----r/ctdt_dt_tjt_dS)a$ Disables active Packrat or Left Recursion parsing and their memoization This method also works if neither Packrat nor Left Recursion are enabled. This makes it safe to call before activating Packrat nor Left Recursion to clear any previous settings. FN)rry_left_recursion_enabled_packratEnabledr_r"r9r/r-disable_memoizationz!ParserElement.disable_memoizations7 !!###05 -(- %,: r/)forcecache_size_limitc(|rtntjrtd|t t_n3|dkrt |t_ntd|zdt_dS)a# Enables "bounded recursion" parsing, which allows for both direct and indirect left-recursion. During parsing, left-recursive :class:`Forward` elements are repeatedly matched with a fixed recursion depth that is gradually increased until finding the longest match. Example:: import pyparsing as pp pp.ParserElement.enable_left_recursion() E = pp.Forward("E") num = pp.Word(pp.nums) # match `num`, or `num '+' num`, or `num '+' num '+' num`, ... E <<= E + '+' - num | num print(E.parse_string("1+2+3")) Recursion search naturally memoizes matches of ``Forward`` elements and may thus skip reevaluation of parse actions during backtracking. This may break programs with parse actions which rely on strict ordering of side-effects. Parameters: - cache_size_limit - (default=``None``) - memoize at most this many ``Forward`` elements during matching; if ``None`` (the default), memoize all ``Forward`` elements. Bounded Recursion parsing works similar but not identical to Packrat parsing, thus the two cannot be used together. Use ``force=True`` to disable any previous, conflicting settings. 0Packrat and Bounded Recursion are not compatibleNr)capacityzMemo size of %sT) rr}r| RuntimeError_UnboundedMemorg_LRUMemoNotImplementedErrorr{rr~s r-enable_left_recursionz#ParserElement.enable_left_recursionsH  S  - - / / / /  * SQRR R  #,:,<,N,O,O,OM ) )%&7:J&JKK K04 ---r/r~c<|rtntjrtdtjsXdt_|t t_nt|t_tjt_ dSdS)af Enables "packrat" parsing, which adds memoizing to the parsing logic. Repeated parse attempts at the same string location (which happens often in many complex grammars) can immediately return a cached value, instead of re-executing parsing/validating code. Memoizing is done of both valid results and parsing exceptions. Parameters: - cache_size_limit - (default= ``128``) - if an integer value is provided will limit the size of the packrat cache; if None is passed, then the cache size will be unbounded; if 0 is passed, the cache will be effectively disabled. This speedup may break existing programs that use parse actions that have side-effects. For this reason, packrat parsing is disabled when you first import pyparsing. To activate the packrat feature, your program must call the class method :class:`ParserElement.enable_packrat`. For best results, call ``enable_packrat()`` immediately after importing pyparsing. Example:: import pyparsing pyparsing.ParserElement.enable_packrat() Packrat parsing works similar but not identical to Bounded Recursion parsing, thus the two cannot be used together. Use ``force=True`` to disable any previous, conflicting settings. rTN) rr}r{rr|rrjrrvr"rs r-enable_packratzParserElement.enable_packrats@  S  - - / / / /  2 SQRR R, =,0M )'.=.?.? ++.89I.J.J +#0#>> res = Word('a').parse_string('aaaaabaaa') >>> print(res) ['aaaaa'] The parsing behavior varies by the inheriting class of this abstract class. Please refer to the children directly to see more examples. It raises an exception if parse_all flag is set and instring does not match the whole grammar. >>> res = Word('a').parse_string('aaaaabaaa', parse_all=True) Traceback (most recent call last): ... pyparsing.ParseException: Expected end of text, found 'b' (at char 5), (line:1, col:6) rN)rryr streamlinerr expandtabsr"rEEmpty StringEndrmrwith_traceback) r+rrrr=rr[sers r- parse_stringzParserElement.parse_string4s!Z(!!###  OO   !  A LLNNNN} -**,,H ++h22KC )mmHc22WWy{{* (C(((M" / / // /((...  /s3A$C D #"DD )r maxMatches max_matchesoverlaprrc#*Kt||}|js||jD]}||js!t |}t|}d}|j} |j } t d} ||kr| |kr | ||} | || d\} }| |krS| dz } |r%t| | | d|| | fV|r| ||}||kr| }n$|dz }n| }n| dz}n#t$r| dz}YnwxYw||kr | |kdSdSdSdS#t$r'}tjr|dd}~wwxYw)at Scan the input string for expression matches. Each match will return the matching tokens, start location, and end location. May be called with optional ``max_matches`` argument, to clip scanning after 'n' matches are found. If ``overlap`` is specified, then overlapping matches will be reported. Note that the start and end locations are reported relative to the string being parsed. See :class:`parse_string` for more information on parsing strings with embedded tabs. Example:: source = "sldjf123lsdjjkf345sldkjf879lkjsfd987" print(source) for tokens, start, end in Word(alphas).scan_string(source): print(' '*start + '^'*(end-start)) print(' '*start + tokens[0]) prints:: sldjf123lsdjjkf345sldkjf879lkjsfd987 ^^^^^ sldjf ^^^^^^^ lsdjjkf ^^^^^^ sldkjf ^^^^^^ lkjsfd rFrr)r[startendN)minrrrrstrrrBrEr"r resetCacherrOrrmrr)r+rrrrrr=rCr preparseFnparseFnmatchesprelocnextLocr[nextlocrs r- scan_stringzParserElement.scan_stringys.N[11   OO   !  A LLNNNN} 28}}//11Hx==] +  """" ///g &:&:)'Z#66F&-ghU&S&S&SOGV}}1  !.4mmoo-3+2!"!"%fg5555"*&0j3&?&?G&}}&- #q")CC$qj/&%%% 1*CCC% //g &:&:&:&://&:&://8" / / // /((...  /s=/ E!<D8AE!8E E! E  E!! F+"F  Frcg}d}d|_ |||D]\}}}|||||rt|tr||z }nUt|t r+t|ts||n|||}|||dd|D}d dt|DS#t$r'}tj r|dd}~wwxYw)ab Extension to :class:`scan_string`, to modify matching text with modified tokens that may be returned from a parse action. To use ``transform_string``, define a grammar and attach a parse action to it that modifies the returned token list. Invoking ``transform_string()`` on a target string will then scan for matches, and replace the matched text patterns according to the logic in the parse action. ``transform_string()`` returns the resulting transformed string. Example:: wd = Word(alphas) wd.set_parse_action(lambda toks: toks[0].title()) print(wd.transform_string("now is the winter of our discontent made glorious summer by this sun of york.")) prints:: Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York. rTrNcg|]}||Sr9r9rCos r-rEz2ParserElement.transform_string..s'''Q'1'''r/r~c,g|]}t|Sr9r)rCrs r-rEz2ParserElement.transform_string..s:::qCFF:::r/)rrr rSr rrr#extendjoinrrmrrr) r+rroutlastErrr=rs r-transform_stringzParserElement.transform_stringso(  /++HE+BB  1a 8E!G,---&!!\22&qyy{{*#Ax00&Ax9P9P& 1  1  JJx' ( ( (''c'''C77::HSMM:::;; ;! / / // /((...  /sDD## E-"EEct||} td||||DS#t$r'}tjr|dd}~wwxYw)a Another extension to :class:`scan_string`, simplifying the access to the tokens found to match the given parse expression. May be called with optional ``max_matches`` argument, to clip searching after 'n' matches are found. Example:: # a capitalized word starts with an uppercase letter, followed by zero or more lowercase letters cap_word = Word(alphas.upper(), alphas.lower()) print(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity")) # the sum() builtin can be used to merge results into a single ParseResults object print(sum(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity"))) prints:: [['More'], ['Iron'], ['Lead'], ['Gold'], ['I'], ['Electricity']] ['More', 'Iron', 'Lead', 'Gold', 'I', 'Electricity'] cg|]\}}}| Sr9r9)rCrrr=s r-rEz/ParserElement.search_string..sVVVwq!QVVVr/rN)rr rrmrrr)r+rrrrrs r- search_stringzParserElement.search_strings8[11  /VV$"2"28Zu"2"U"UVVV " / / // /((...  /s.A A2 "A--A2)includeSeparatorsmaxsplitinclude_separatorsc#K|p|}d}|||D] \}}}|||V|r |dV|}!||dVdS)aT Generator method to split a string using the given expression as a separator. May be called with optional ``maxsplit`` argument, to limit the number of splits; and the optional ``include_separators`` argument (default= ``False``), if the separating matching text should be included in the split results. Example:: punc = one_of(list(".,;:/-!?")) print(list(punc.split("This, this?, this sentence, is badly punctuated!"))) prints:: ['This', ' this', '', ' this sentence', ' is badly punctuated', ''] r)rN)r) r+rrrrlastrrr=s r-rLzParserElement.split(s..C1C''h'GG  GAq!46" " " "  d DDtuuor/c:|turt|St|tr||}t|t s4t dt|j t||gS)ah Implementation of ``+`` operator - returns :class:`And`. Adding strings to a :class:`ParserElement` converts them to :class:`Literal`s by default. Example:: greet = Word(alphas) + "," + Word(alphas) + "!" hello = "Hello, World!" print(hello, "->", greet.parse_string(hello)) prints:: Hello, World! -> ['Hello', ',', 'World', '!'] ``...`` may be used as a parse expression as a short form of :class:`SkipTo`. Literal('start') + ... + Literal('end') is equivalent to: Literal('start') + SkipTo('end')("_skipped*") + Literal('end') Note that the skipped text is returned with '_skipped' as a results name, and to support having multiple skips in the same parser, the value returned is a list of all skipped text. 4Cannot combine element of type {} with ParserElement) Ellipsis _PendingSkiprSr#rrrrrr2Andr+others r-__add__zParserElement.__add__Hs6 H  %% % eX & & 4,,U33E%// FMMKK(  D%=!!!r/c:|turt|d|zSt|tr||}t|t s4t dt|j ||zS)zd Implementation of ``+`` operator when left operand is not a :class:`ParserElement` _skipped*r) rSkipTorSr#rrrrrr2rs r-__radd__zParserElement.__radd__ps H  6$<< ,,t3 3 eX & & 4,,U33E%// FMMKK(  t|r/c&t|tr||}t|ts4t dt |j|t z|zS)zX Implementation of ``-`` operator, returns :class:`And` with error stop r) rSr#rrrrrr2r _ErrorStoprs r-__sub__zParserElement.__sub__s eX & & 4,,U33E%// FMMKK(  cnn&&&..r/ct|tr||}t|ts4t dt |j||z S)zd Implementation of ``-`` operator when left operand is not a :class:`ParserElement` rrSr#rrrrrr2rs r-__rsub__zParserElement.__rsub__x eX & & 4,,U33E%// FMMKK(  t|r/c&|turd}nAt|tr,|ddtfkrd|ddzdzdd}t|tr|d}}nvt|tr,td|D}|d zdd}|d d|df}t|dtrY|dQ|ddkrt S|ddkrt S|dzt zSt|dtr&t|dtr |\}}||z}nst d d d |Dt d t|j |dkrtd|dkrtd||cxkrdkrnntgS|rIfd|r5|dkr|z}nHtg|z|z}n(|}n|dkr}ntg|z}|S)a Implementation of ``*`` operator, allows use of ``expr * 3`` in place of ``expr + expr + expr``. Expressions may also be multiplied by a 2-integer tuple, similar to ``{min, max}`` multipliers in regular expressions. Tuples may also include ``None`` as in: - ``expr*(n, None)`` or ``expr*(n, )`` is equivalent to ``expr*n + ZeroOrMore(expr)`` (read as "at least n instances of ``expr``") - ``expr*(None, n)`` is equivalent to ``expr*(0, n)`` (read as "0 to n instances of ``expr``") - ``expr*(None, None)`` is equivalent to ``ZeroOrMore(expr)`` - ``expr*(1, None)`` is equivalent to ``OneOrMore(expr)`` Note that ``expr*(None, n)`` does not raise an exception if more than n exprs exist in the input stream; that is, ``expr*(None, n)`` does not enforce a maximum number of expr occurrences. If this behavior is desired, then write ``expr*(None, n) + ~expr`` )rNNrrr)rkrc30K|]}|tur|ndVdSr))rrs r-r*z(ParserElement.__mul__..s0JJqq00!!dJJJJJJr/)NNz.cannot multiply ParserElement and ({}) objects,c3>K|]}t|jVdSr)rr2)rCitems r-r*z(ParserElement.__mul__..s+ G Gd!4 G G G G G Gr/z,cannot multiply ParserElement and {} objectsz/cannot multiply ParserElement by negative valuez@second tuple value must be greater or equal to first tuple valuecj|dkrt|dz zStSrA)Opt)nmakeOptionalListr+s r-rz/ParserElement.__mul__..makeOptionalLists;q55t&6&6q1u&=&==>>>t99$r/) rrStupleint ZeroOrMore OneOrMorerrrrr2 ValueErrorr)r+r minElements optElementsr5rs` @r-__mul__zParserElement.__mul__s( H  EE u % % 5%){*B*BE!""I%/!4E eS ! ! ',aKK u % % JJEJJJJJE\)2A2.EQxE!H %(C(( U1X-=8q==%d+++8q==$T??*%(?Z-=-===E!Hc** z%(C/H/H +0( [{* DKK G G G G GGG >EEKK(  ??NOO O ??R  + * * * * * * * * *r77N  0 % % % % % %  4!##!1!1+!>!>>CCtf{2336F6F{6S6SSCC&&{33a4&;.// r/c,||Sr))rrs r-__rmul__zParserElement.__rmul__s||E"""r/c>|turt|dSt|tr||}t|t s4t dt|j t||gS)zP Implementation of ``|`` operator - returns :class:`MatchFirst` T) must_skipr) rrrSr#rrrrrr2 MatchFirstrs r-__or__zParserElement.__or__s H  555 5 eX & & 4,,U33E%// FMMKK(  4-(((r/ct|tr||}t|ts4t dt |j||zS)zd Implementation of ``|`` operator when left operand is not a :class:`ParserElement` rrrs r-__ror__zParserElement.__ror__rr/c t|tr||}t|ts4t dt |jt||gS)zH Implementation of ``^`` operator - returns :class:`Or` r) rSr#rrrrrr2Orrs r-__xor__zParserElement.__xor__s eX & & 4,,U33E%// FMMKK(  4-   r/ct|tr||}t|ts4t dt |j||z S)zd Implementation of ``^`` operator when left operand is not a :class:`ParserElement` rrrs r-__rxor__zParserElement.__rxor__#rr/c t|tr||}t|ts4t dt |jt||gS)zJ Implementation of ``&`` operator - returns :class:`Each` r) rSr#rrrrrr2Eachrs r-__and__zParserElement.__and__1s eX & & 4,,U33E%// FMMKK(  T5M"""r/ct|tr||}t|ts4t dt |j||zS)zd Implementation of ``&`` operator when left operand is not a :class:`ParserElement` rrrs r-__rand__zParserElement.__rand__?rr/c t|S)zL Implementation of ``~`` operator - returns :class:`NotAny` )NotAnyr+s r- __invert__zParserElement.__invert__Msd||r/c  t|tr|f}t|n#t$r||f}YnwxYwt |dkr`td|ddt |dkr"dt |nd|t |ddz}|S)a{ use ``[]`` indexing notation as a short form for expression repetition: - ``expr[n]`` is equivalent to ``expr*n`` - ``expr[m, n]`` is equivalent to ``expr*(m, n)`` - ``expr[n, ...]`` or ``expr[n,]`` is equivalent to ``expr*n + ZeroOrMore(expr)`` (read as "at least n instances of ``expr``") - ``expr[..., n]`` is equivalent to ``expr*(0, n)`` (read as "0 to n instances of ``expr``") - ``expr[...]`` and ``expr[0, ...]`` are equivalent to ``ZeroOrMore(expr)`` - ``expr[1, ...]`` is equivalent to ``OneOrMore(expr)`` ``None`` may be used in place of ``...``. Note that ``expr[..., n]`` and ``expr[m, n]``do not raise an exception if more than ``n`` ``expr``s exist in the input stream. If this behavior is desired, then write ``expr[..., n] + ~expr``. rkz,only 1 or 2 index arguments supported ({}{})Nrmz... [{}]r~)rSr#iterrrBrr)r+keyr5s r- __getitem__zParserElement.__getitem__Ws, #x(( f IIII   *CCC  s88a<<>EEGCHHqLLZ..s3xx888b U3rr7^^# s '*;;cX|||S|S)a Shortcut for :class:`set_results_name`, with ``list_all_matches=False``. If ``name`` is given with a trailing ``'*'`` character, then ``list_all_matches`` will be passed as ``True``. If ``name` is omitted, same as calling :class:`copy`. Example:: # these are equivalent userdata = Word(alphas).set_results_name("name") + Word(nums + "-").set_results_name("socsecno") userdata = Word(alphas)("name") + Word(nums + "-")("socsecno") )rr r+rUs r-__call__zParserElement.__call__s,  ''-- -99;; r/c t|S)z Suppresses the output of this :class:`ParserElement`; useful to keep punctuation from cluttering up returned output. )Suppressrs r-suppresszParserElement.suppresss ~~r/ recursivecd|_|S)z Enables the skipping of whitespace before matching the characters in the :class:`ParserElement`'s defined pattern. :param recursive: If ``True`` (the default), also enable whitespace skipping in child elements (if any) Trr+rs r-ignore_whitespacezParserElement.ignore_whitespaces# r/cd|_|S)a| Disables the skipping of whitespace before matching the characters in the :class:`ParserElement`'s defined pattern. This is normally only used internally by the pyparsing module, but may be needed in some whitespace-sensitive grammars. :param recursive: If true (the default), also disable whitespace skipping in child elements (if any) Frrs r-leave_whitespacezParserElement.leave_whitespaces$ r/ copy_defaultscJd|_t||_||_|S)z8 Overrides the default whitespace chars T)rrrr)r+rrs r-set_whitespace_charsz"ParserElement.set_whitespace_charss& #e**%2" r/cd|_|S)z Overrides default behavior to expand ```` s to spaces before parsing the input string. Must be called before ``parse_string`` when the input grammar contains elements that match ```` characters. T)rrs r-parse_with_tabszParserElement.parse_with_tabss   r/rc:ddl}t|trt|}t|tr$||jvr|j|n9|jt||S)a Define expression to be ignored (e.g., comments) while doing pattern matching; may be called repeatedly, to define multiple comment or other ignorable patterns. Example:: patt = Word(alphas)[1, ...] patt.parse_string('ablaj /* comment */ lskjd') # -> ['ablaj'] patt.ignore(c_style_comment) patt.parse_string('ablaj /* comment */ lskjd') # -> ['ablaj', 'lskjd'] rN)rrSr#rrr r )r+rrs r-ignorezParserElement.ignores  eX & & $UOOE eX & & <D,,, ''...   # #HUZZ\\$:$: ; ; ; r/ start_actionsuccess_actionexception_actioncv||pt|pt|pt|_d|_|S)a  Customize display of debugging messages while doing pattern matching: - ``start_action`` - method to be called when an expression is about to be parsed; should have the signature ``fn(input_string: str, location: int, expression: ParserElement, cache_hit: bool)`` - ``success_action`` - method to be called when an expression has successfully parsed; should have the signature ``fn(input_string: str, start_location: int, end_location: int, expression: ParserELement, parsed_tokens: ParseResults, cache_hit: bool)`` - ``exception_action`` - method to be called when expression fails to parse; should have the signature ``fn(input_string: str, location: int, expression: ParserElement, exception: Exception, cache_hit: bool)`` T)rrrrrr)r+rrrs r-set_debug_actionszParserElement.set_debug_actionssE$!--  77  ;;  ? ?     r/flagcf|r'|tttnd|_|S)a Enable display of debugging messages while doing pattern matching. Set ``flag`` to ``True`` to enable, ``False`` to disable. Example:: wd = Word(alphas).set_name("alphaword") integer = Word(nums).set_name("numword") term = wd | integer # turn on debugging for wd wd.set_debug() term[1, ...].parse_string("abc 123 xyz 890") prints:: Match alphaword at loc 0(1,1) Matched alphaword -> ['abc'] Match alphaword at loc 3(1,4) Exception raised:Expected alphaword (at char 4), (line:1, col:5) Match alphaword at loc 7(1,8) Matched alphaword -> ['xyz'] Match alphaword at loc 11(1,12) Exception raised:Expected alphaword (at char 12), (line:1, col:13) Match alphaword at loc 15(1,16) Exception raised:Expected alphaword (at char 15), (line:1, col:16) The output shown is that produced by the default debug actions - custom debug actions can be specified using :class:`set_debug_actions`. Prior to attempting to match the ``wd`` expression, the debugging message ``"Match at loc (,)"`` is shown. Then if the parse succeeds, a ``"Matched"`` message is shown, or an ``"Exception raised"`` message is shown. Also note the use of :class:`set_name` to assign a human-readable name to the expression, which makes debugging and exception messages easier to understand - for instance, the default name created for the :class:`Word` expression without calling ``set_name`` is ``"W:(A-Za-z)"``. F)rrrrr)r+rs r- set_debugzParserElement.set_debugsAJ    " "+-/     DJ r/cP|j||_|jSr))r_generateDefaultNamers r- default_namezParserElement.default_name(s(   $ $ 9 9 ; ;D   r/cdS)zg Child classes must define this method, which defines how the ``default_name`` is set. Nr9rs r-rz"ParserElement._generateDefaultName.rr/cr||_d|jz|_tjr||S)a\ Define name for this expression, makes debugging and exception messages clearer. Example:: Word(nums).parse_string("ABC") # -> Exception: Expected W:(0-9) (at char 0), (line:1, col:1) Word(nums).set_name("integer").parse_string("ABC") # -> Exception: Expected integer (at char 0), (line:1, col:1) Expected )rrUrrOrfrrs r-set_namezParserElement.set_name4s9!DI-  5  NN    r/c,|j|jn|jSr))rrrs r-rUzParserElement.nameAs#'/"=t4CTTr/c|jSr)rUrs r-__str__zParserElement.__str__Fs yr/c t|Sr)rrs r-__repr__zParserElement.__repr__Is4yyr/c"d|_d|_|SNT)rrrs r-rzParserElement.streamlineLs  r/cgSr)r9rs r-recursezParserElement.recurseQ r/cz|dd|gz}|D]}||dSr))r&_checkRecursionr+parseElementListsubRecCheckListr=s r-r)zParserElement._checkRecursionTsO*111-6 / /A  o . . . . / /r/c0|gdS)zj Check defined expressions for valid structure, check for infinite recursive definitions. N)r))r+ validateTraces r-validatezParserElement.validateYs R     r/utf-8file_or_filenameencodingch|p|} |}nN#t$rAt|d|5}|}dddn #1swxYwYYnwxYw |||S#t$r'}t jr|dd}~wwxYw)z Execute the parse expression on the given file or filename. If a filename is specified (instead of a file object), the entire file is opened, read, and closed before parsing. rr2N)readAttributeErroropenrrmrrr)r+r1r2rr file_contentsfrs r- parse_filezParserElement.parse_file_s(y ),1133MM ) ) )&h??? )1 !  ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) /$$]H== =! / / // /((...  /sJA&A A&A A&A A&%A&*B B1 "B,,B1c||urdSt|tr||dSt|tr t |t |kSdS)NTrF)rSr#rrvarsrs r-__eq__zParserElement.__eq__{sf 5==4 x ( ( -<<<66 6 } - - -::e, ,ur/c t|Sr))idrs r-__hash__zParserElement.__hash__s $xxr/ test_stringcz|o|} |t||dS#t$rYdSwxYw)a Method for quick testing of a parser against a test string. Good for simple inline microtests of sub expressions while building up larger parser. Parameters: - ``test_string`` - to test against this expression for a match - ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests Example:: expr = Word(nums) assert expr.matches("100") r=TF)rrrm)r+rCrrs r-rzParserElement.matchess[ )     c+..(  C C C4!   55 s $, ::#)rfullDump printResults failureTestsrLtestscomment full_dump print_results failure_tests post_parsefilewith_line_numbersrFrGrHrLc  V ddlm}| o|} | o|} | o|} | p|} |p|}t|trFt |jfd|D}t|trt|}| tj }|j }g}g}d}td tdt}d}|D]}|||d s|r/|s-|| r||n|L|sO|rdd|znd | r||n|g}g} |||}||| }|o| }| |||}|`t|t.r(||nJ|t3|n'||n#t4$ru}||| |d |jt |j|Yd}~nxd}~wwxYw||| nE#t:$r}t|t<rdnd }|||dt3|zt@j!r,|"tGj$|j%|o| }|}Yd}~nd}~wt4$r}|dt |j|t@j!r,|"tGj$|j%|o| }|}Yd}~nd}~wwxYw|d | r|d||||f||fS)a Execute the parse expression on a series of test strings, showing each test, the parsed results or where the parse failed. Quick and easy way to run a parse expression against a list of sample strings. Parameters: - ``tests`` - a list of separate test strings, or a multiline string of test strings - ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests - ``comment`` - (default= ``'#'``) - expression for indicating embedded comments in the test string; pass None to disable comment filtering - ``full_dump`` - (default= ``True``) - dump results as list followed by results names in nested outline; if False, only dump nested list - ``print_results`` - (default= ``True``) prints test output to stdout - ``failure_tests`` - (default= ``False``) indicates if these tests are expected to fail parsing - ``post_parse`` - (default= ``None``) optional callback for successful parse results; called as `fn(test_string, parse_results)` and returns a string to be added to the test output - ``file`` - (default= ``None``) optional file-like object to which test output will be written; if None, will default to ``sys.stdout`` - ``with_line_numbers`` - default= ``False``) show test strings with line and column numbers Returns: a (success, results) tuple, where success indicates that all tests succeeded (or failed if ``failure_tests`` is True), and the results contain a list of lines of each test's output Example:: number_expr = pyparsing_common.number.copy() result = number_expr.run_tests(''' # unsigned integer 100 # negative integer -100 # float with scientific notation 6.02e23 # integer with scientific notation 1e-12 ''') print("Success" if result[0] else "Failed!") result = number_expr.run_tests(''' # stray character 100Z # missing leading digit before '.' -.100 # too many '.' 3.14.159 ''', failure_tests=True) print("Success" if result[0] else "Failed!") prints:: # unsigned integer 100 [100] # negative integer -100 [-100] # float with scientific notation 6.02e23 [6.02e+23] # integer with scientific notation 1e-12 [1e-12] Success # stray character 100Z ^ FAIL: Expected end of text (at char 3), (line:1, col:4) # missing leading digit before '.' -.100 ^ FAIL: Expected {real number with scientific notation | real number | signed integer} (at char 0), (line:1, col:1) # too many '.' 3.14.159 ^ FAIL: Expected end of text (at char 4), (line:1, col:5) Success Each test string must be on a single line. If you want to test a string that spans multiple lines, create a test like this:: expr.run_tests(r"this is a test\n of strings that spans \n 3 lines") (Note that this is a raw string literal, you must include the leading ``'r'``.) r)pyparsing_testc&g|] }|Sr9r9)rC test_line line_strips r-rEz+ParserElement.run_tests..s#XXXyZZ **XXXr/NT\n uFr~r=)fullz{} failed: {}: {}z(FATAL)zFAIL: zFAIL-EXCEPTION: {}: {})&testingrRrSr#rstriprstrip splitlinesLiteralsysstdoutwriter5 replace_withr  quoted_stringrr rPrrlstriprr dumprrRrr2rmrexplainrrrr format_tbr)r+rIrrJrKrLrMrNrOrPrrFrGrHrLrRprint_ allResultscommentssuccessNLBOMrrrupp_valuer=rsrrrUs @r- run_testszParserElement.run_testss` ,+++++) ) #5 #4} + eX & & Ye*JXXXXELLNNtyy****B7HO00333aCH& ;'' 66**1*AA "6,&6(#,9Q#7#7#/)(LAA: # 8==?? ; ; ; ; # 3x== 9 9 9 9JJv{{}}555$ 6;;H;#=#=>>> /66 ) 2DGG4DaJJv{{{99::::E&   %/4G%H%HP b 2::<<((( 8c"gg-... 3FJJy223CDDEEE!2l    3::499;MsSSTTT 3GJJy233DEEFFF!2l  6 JJrNNN 'tyy~~&&&   q&k * * * * ""s@?LBI'' K&1A*K!!K& QB#O QA9QQr$ output_htmlverticalshow_results_names show_groupsc  ddlm}m}n"#t$r}t d|d}~wwxYw|||||||} t |ttfrKt|dd5} | || ddddS#1swxYwYdS| || dS) a Create a railroad diagram for the parser. Parameters: - output_html (str or file-like object) - output target for generated diagram HTML - vertical (int) - threshold for formatting multiple alternatives vertically instead of horizontally (default=3) - show_results_names - bool flag whether diagram should show annotations for defined results names - show_groups - bool flag whether groups should be highlighted with an unlabeled surrounding box Additional diagram-formatting keyword arguments can also be included; see railroad.Diagram class. r) to_railroadrailroad_to_htmlzMmust ``pip install pyparsing[diagrams]`` to generate parser railroad diagramsN)rprqrrdiagram_kwargswr0r5) diagramrtru ImportErrorrRrrSrrr8r`) r+rorprqrrr1rtruierailroad diag_files r-create_diagramzParserElement.create_diagramasd.  > > > > > > > > >   _   ; 1#!     kC; / / :k3999       8&+/   4--d-o----^!c!!!X!   ^ S _    UcUUUXU# /2/// !!!!!  /  ///T6 12// /  / ////837LP+/EI 4@C"#9=(,"'A#!"8.must_skipsPz,QZ%7%7%9%9bT%A%A!EE*d+++++&B%Ar/c|jdddgkr4|ddtjzdz|d<dSdS)Nrr~rz missing <>)rrrreprr)rr+s r- show_skipz'_PendingSkip.__add__..show_skipsb:%%'',44EE*%%%$/$t{2C2C$Cc$IAjMMM54r/)rrrrr5)r+rskipperrrs` r-rz_PendingSkip.__add__s/&--((// << >  , , ,  J J J J J  ggii88CCC')),,Y778  {W$u,,r/c|jSr))rrs r-r"z_PendingSkip.__repr__s r/c td)NzBuse of `...` expression without following SkipTo target expression)rR)r+rs r-rHz_PendingSkip.parseImpls P   r/r~r) r2r7r8rrr.rrr"rH __classcell__rs@r-rrs##]#t###### BBB----*          r/rc(eZdZdZfdZdZxZS)TokenzYAbstract :class:`ParserElement` subclass, for defining atomic matching patterns. cLtddS)NFrrr.r+rs r-r.zToken.__init__s$ %(((((r/c*t|jSr)rrs r-rzToken._generateDefaultNamesDzz""r/)r2r7r8rGr.rrrs@r-rrsQ)))))#######r/rc"eZdZdZfdZxZS)rz, An empty token, will always match. cdtd|_d|_dSr;rr.rrrs r-r.zEmpty.__init__/ ""r/)r2r7r8rGr.rrs@r-rrsB#########r/rc*eZdZdZfdZddZxZS)NoMatchz( A token that will never match. crtd|_d|_d|_dS)NTFzUnmatchable token)rr.rrrrs r-r.zNoMatch.__init__s4 "") r/Tc0t|||j|r))rrrGs r-rHzNoMatch.parseImplsXsDK>>>r/rr2r7r8rGr.rHrrs@r-rrsV***** ????????r/rcBeZdZdZd dddedeffdZdZd d ZxZS) r]a Token to exactly match a specified string. Example:: Literal('blah').parse_string('blah') # -> ['blah'] Literal('blah').parse_string('blahfooblah') # -> ['blah'] Literal('blah').parse_string('bla') # -> Exception: Expected "blah" For case-insensitive matching, use :class:`CaselessLiteral`. For keyword matching (force word break before and after the matched string), use :class:`Keyword` or :class:`CaselessKeyword`. r~ matchString match_stringrczt|p|}||_t||_ |d|_n#t $rtdwxYwd|jz|_ d|_ d|_ |jdkr$t|turt|_dSdSdS)Nrz2null string passed to Literal; use Empty() insteadrFr)rr.matchrBmatchLenfirstMatchCharrQrrUrrrrr]_SingleCharLiteralrr+rrrs r-r.zLiteral.__init__ s "2l ! L))  S".q/D   S S SQRR R S!DI- #" =A  $t**"7"7/DNNN  "7"7s  AA*c*t|jSr)rrrs r-rzLiteral._generateDefaultName DJr/Tc|||jkr,||j|r||jz|jfSt |||j|r))rrArrrrrGs r-rHzLiteral.parseImpl s\ C=D/ / /H4G4G J5 5 /& 2 2XsDK>>>r/r~r) r2r7r8rGrr.rrHrrs@r-r]r]s  0R000S0s000000$   ????????r/r]ceZdZddZdS)rTcj|||jkr |dz|jfSt|||j|rA)rrrrrGs r-rHz_SingleCharLiteral.parseImpl) s; C=D/ / /7DJ& &XsDK>>>r/Nrr2r7r8rHr9r/r-rr( s(??????r/rc eZdZdZedzZ dddddedejed e d ed ejef fd Z d Z ddZ e ddZeZxZS)Keyworda Token to exactly match a specified string as a keyword, that is, it must be immediately followed by a non-keyword character. Compare with :class:`Literal`: - ``Literal("if")`` will match the leading ``'if'`` in ``'ifAndOnlyIf'``. - ``Keyword("if")`` will not; it will only match the leading ``'if'`` in ``'if x=1'``, or ``'if(y==2)'`` Accepts two optional constructor arguments in addition to the keyword string: - ``identChars`` is a string of characters that would be valid identifier characters, defaulting to all alphanumerics + "_" and "$" - ``caseless`` allows case-insensitive matching, default is ``False``. Example:: Keyword("start").parse_string("start") # -> ['start'] Keyword("start").parse_string("starting") # -> Exception For case-insensitive matching, use :class:`CaselessKeyword`. z_$r~NFr identCharsr ident_charscaselessrrct|p|}| tj}|p|}||_t ||_ |d|_n#t$rtdwxYwd t|j |j |_d|_d|_||_|r-||_|}t)||_dS)Nrz2null string passed to Keyword; use Empty() insteadzExpected {} {}F)rr.rDEFAULT_KEYWORD_CHARSrrBrrrQrrrr2rUrrrrupper caselessmatchrr)r+rrrrrrs r-r.zKeyword.__init__O s  .;   6J"2l ! L))  S".q/D   S S SQRR R S&--d4jj.A49MM #"   ,!-!3!3!5!5D #))++Jj//s  A""A<c*t|jSr)rrs r-rzKeyword._generateDefaultNamel rr/Tc,|j}|}|jr||||jz|jkr|dks$||dz |jvre|t ||jz ks)|||jz|jvr||jz|jfS|dz }||jz}n|dz }|dz }n|||jkr |jdks| |j|ru|dks||dz |jvrS|t ||jz ks|||jz|jvr||jz|jfS|dz }||jz}n |dz }|dz }t||||)Nrrz/, was immediately followed by keyword characterz7, keyword was immediately preceded by keyword characterz7, keyword was immediately followed by keyword character) rrrrrrrBrrrAr)r+rrrrerrlocs r-rHzKeyword.parseImplo s =' %cDM11288::d>PPP!88xa06688OOs8}}t}<<<#C$-$78>>@@WW"T]2DJ>>"SS!$t}!4WWF 1WF  !444MQ&&&&tz377'!88xa0GGs8}}t}<<<#C$-$78OO"T]2DJ>>U"%t}!4WWF 1WFXvvt<< ['CMD', 'CMD', 'CMD'] (Contrast with example for :class:`CaselessKeyword`.) r~rrrc|p|}t|||_d|jz|_dS)Nr)rr.r returnStringrUrrs r-r.zCaselessLiteral.__init__ sK"2l  ++--...(!DI- r/Tc||||jz|jkr||jz|jfSt |||j|r))rrrrrrrGs r-rHzCaselessLiteral.parseImpl sW C# -- . 4 4 6 6$* D D&(99 9XsDK>>>r/rr)r2r7r8rGrr.rHrrs@r-rr sz  .R...S.s......????????r/rc neZdZdZ d ddddedejededejeffd ZxZS) CaselessKeywordz Caseless version of :class:`Keyword`. Example:: CaselessKeyword("CMD")[1, ...].parse_string("cmd CMD Cmd10") # -> ['CMD', 'CMD'] (Contrast with example for :class:`CaselessLiteral`.) r~Nrrrrrc`|p|}|p|}t||ddS)NT)rr)r+rrrrrs r-r.zCaselessKeyword.__init__ s> .; "2l  zDAAAAAr/)r~N) r2r7r8rGrrrr.rrs@r-rr s  ,0 B +/ B B B B_S) B  B OC( B B B B B B B B B Br/rcJeZdZdZ d ddddededeffd Zd Zdd ZxZ S) CloseMatchaA variation on :class:`Literal` which matches "close" matches, that is, strings with at most 'n' mismatching characters. :class:`CloseMatch` takes parameters: - ``match_string`` - string to be matched - ``caseless`` - a boolean indicating whether to ignore casing when comparing characters - ``max_mismatches`` - (``default=1``) maximum number of mismatches allowed to count as a match The results from a successful parse will contain the matched text from the input string and the following named results: - ``mismatches`` - a list of the positions within the match_string where mismatches were found - ``original`` - the original match_string used to compare against the input string If ``mismatches`` is an empty list, then the match was an exact match. Example:: patt = CloseMatch("ATCATCGAATGGA") patt.parse_string("ATCATCGAAXGGA") # -> (['ATCATCGAAXGGA'], {'mismatches': [[9]], 'original': ['ATCATCGAATGGA']}) patt.parse_string("ATCAXCGAAXGGA") # -> Exception: Expected 'ATCATCGAATGGA' (with up to 1 mismatches) (at char 0), (line:1, col:1) # exact match patt.parse_string("ATCATCGAATGGA") # -> (['ATCATCGAATGGA'], {'mismatches': [[]], 'original': ['ATCATCGAATGGA']}) # close match allowing up to 2 mismatches patt = CloseMatch("ATCATCGAATGGA", max_mismatches=2) patt.parse_string("ATCAXCGAAXGGA") # -> (['ATCAXCGAAXGGA'], {'mismatches': [[4, 9]], 'original': ['ATCATCGAATGGA']}) NrF) maxMismatchesrrmax_mismatchesrc||n|}t||_||_d|j|j|_||_d|_d|_dS)Nz(Expected {!r} (with up to {} mismatches)F) rr.rrrrrrr)r+rrrrrs r-r.zCloseMatch.__init__ sz+9*D-  (*@GG  t1   ! "#r/c\dt|j|jS)Nz{}:{!r})rrr2rrs r-rzCloseMatch._generateDefaultName s$T 3T5FGGGr/Tc*|}t|}|t|jz}||kr|j}d}g} |j} tt ||||D]i\}} | \} } |jr(| | } } | | kr*| |t| | krn/j||zdz}t|||g}||d<| |d<||fSt|||j |)Nrroriginal mismatches) rBrr enumerateziprrr r rr)r+rrrrrCmaxlocrmatch_stringlocrrs_msrcmatresultss r-rHzCloseMatch.parseImpl s>x==T./// X  ,LOJ .M(1HSZ(,77)) $ $$S=8"yy{{CIIKKC#::%%o666:66o-1&s(;'<==&2 #(2 %G|#XsDK>>>r/r)r r2r7r8rGrrr.rrHrrs@r-rr s  J#$  $$$$$  $$$$$$&HHH????????r/rceZdZdZ ddddddded ejed ed ed ed edejedejedejededejeffdZ dZ ddZ xZ S)Worda8 Token for matching words composed of allowed character sets. Parameters: - ``init_chars`` - string of all characters that should be used to match as a word; "ABC" will match "AAA", "ABAB", "CBAC", etc.; if ``body_chars`` is also specified, then this is the string of initial characters - ``body_chars`` - string of characters that can be used for matching after a matched initial character as given in ``init_chars``; if omitted, same as the initial characters (default=``None``) - ``min`` - minimum number of characters to match (default=1) - ``max`` - maximum number of characters to match (default=0) - ``exact`` - exact number of characters to match (default=0) - ``as_keyword`` - match as a keyword (default=``False``) - ``exclude_chars`` - characters that might be found in the input ``body_chars`` string but which should not be accepted for matching ;useful to define a word of all printables except for one or two characters, for instance (default=``None``) :class:`srange` is useful for defining custom character set strings for defining :class:`Word` expressions, using range notation from regular expression character sets. A common mistake is to use :class:`Word` to match a specific literal string, as in ``Word("Address")``. Remember that :class:`Word` uses the string argument to define *sets* of matchable characters. This expression would match "Add", "AAA", "dAred", or any other word made up of the characters 'A', 'd', 'r', 'e', and 's'. To match an exact literal string, use :class:`Literal` or :class:`Keyword`. pyparsing includes helper strings for building Words: - :class:`alphas` - :class:`nums` - :class:`alphanums` - :class:`hexnums` - :class:`alphas8bit` (alphabetic characters in ASCII range 128-255 - accented, tilded, umlauted, etc.) - :class:`punc8bit` (non-alphabetic characters in ASCII range 128-255 - currency, symbols, superscripts, diacriticals, etc.) - :class:`printables` (any non-whitespace character) ``alphas``, ``nums``, and ``printables`` are also defined in several Unicode sets - see :class:`pyparsing_unicode``. Example:: # a word composed of digits integer = Word(nums) # equivalent to Word("0123456789") or Word(srange("0-9")) # a word with a leading capital, and zero or more lowercase capital_word = Word(alphas.upper(), alphas.lower()) # hostnames are alphanumeric, with leading alpha, and '-' hostname = Word(alphas, alphanums + '-') # roman numeral (not a strict parser, accepts invalid mix of characters) roman = Word("IVXLCDM") # any string of non-whitespace characters, except for ',' csv_value = Word(printables, exclude_chars=",") r~NrrF) initChars bodyChars asKeyword excludeChars init_chars body_charsrmaxexact as_keyword exclude_charsrrr r c~|p|}| p|} | p|} | p|} t|s4tdt |jt |}||_| r(t | } || z}| rt | | z } dt||_ | rEEJJ'   NN "  :|,,L  %I : NN\9 WWVI%6%677  ,!# ):):!;!;D  ^^DNN!# ):):!;!;D  ^^DN!G 77g  77DKK"DK 199DKDK!DI- "" dnt~5 5 53!88QR ~//!88 FFAXXFF(// 4;(+B+BRR F!).t~>>!! T^$$))!88 FF'..sQw77F * 1 1Id011.t~>>!! !88 FFAXXFF'..sQw77F , 3 3.t~>>.t~>>!! ~ > % 5 =  ,*T]33!%  !+ 8    S 6 588 sNN65N6c2d}|j|jkr3d||j||j}n#d||j}|jdks|jt kr|j|jkr2|jdkr |ddS|d|jzS|jt kr|d|jzS|d|j|jzS|S) Ncrd}t|d}t||kr|d|dz dzS|S)NF) re_escaper$r)rrB)r max_repr_lens r- charsAsStrz-Word._generateDefaultName..charsAsStr sJL*1>>>A1vv $$+T^ + +&& 4>**JJt~,F,FDD??::dn#=#=>>D ;??dkX55{dk));!##8O(//$+">">>>((l11$+>>>>k00dkJJJJ r/Tc|||jvrt|||j||}|dz }t|}|j}||jz}t ||}||kr|||vr|dz }||kr |||vd}||z |jkrd}nF|jr||kr |||vrd}n,|j r%|dkr ||dz |vs||kr |||vrd}|rt|||j|||||fS)NrFTr) rrrrBrrrrrr ) r+rrrrrC bodycharsrthrowExceptions r-rHzWord.parseImpl s[ C= . . 3 TBB B qx==N $VX&&Fllx} 99 1HCFllx} 99 ; $ $!NN   &3>>hsmy6P6P!NN ^ & UQY'944>>SMY..!%  C 3 TBB BHU3Y'''r/)r~NrrrFNr) r2r7r8rGrrrrrr.rrHrrs@r-rr5 sC>>D+/ .2o,+/*.-1o,o,o,o,OC(o, o,  o,  o,o,s+o,?3'o,?3'o,o,oc*o,o,o,o,o,o,b:((((((((r/rceZdZddZdS)rTc|||}|st|||j||}||fSr))rrrrgroup)r+rrrrus r-rHz_WordRegex.parseImpl& sTx-- C 3 TBB BjjllFLLNN""r/Nrrr9r/r-rr% s(######r/rc reZdZdZ d ddddededejeded ejef fd ZxZ S) CharzA short-cut class for defining :class:`Word` ``(characters, exact=1)``, when defining a match of any single character in a string of characters. FN)r r charsetrrr r cZ|p|}|p|}t|d||dt|j|_|rd|j|_t j|j|_|jj|_ dS)Nr)rr r z[{}]z\b{}\b) rr.rrrrrrrr)r+r1rrr r rs r-r.z Char.__init__5 s+ #4}   1      &@&P&PQQ  <%,,T];;DM*T]++  r/)FN) r2r7r8rGrrrrr.rrs@r-r0r0/ s!.2 &  -1&&&&&s+ &  &oc*&&&&&&&&&&r/r0ceZdZdZ dddddedeejefde de d e d e f fd Z e d Ze d Z e dZ dZddZddZddZdedefdZxZS)RegexaToken for matching strings that match a given regular expression. Defined with string specifying the regular expression in a form recognized by the stdlib Python `re module `_. If the given regex contains named groups (defined using ``(?P...)``), these will be preserved as named :class:`ParseResults`. If instead of the Python stdlib ``re`` module you wish to use a different RE module (such as the ``regex`` module), you can do so by building your ``Regex`` object with a compiled RE that was compiled using ``regex``. Example:: realnum = Regex(r"[+-]?\d+\.\d*") # ref: https://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression roman = Regex(r"M{0,4}(CM|CD|D?{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})") # named fields in a regex will be returned as named results date = Regex(r'(?P\d{4})-(?P\d\d?)-(?P\d\d?)') # the Regex class will accept re's compiled using the regex module import regex parser = pp.Regex(regex.compile(r'[0-9]')) rF) asGroupListasMatchpatternflags as_group_listas_matchr5r6ct|p|}|p|}t|tr.|st dd|_|x|_|_||_nQt|dr2t|dr"||_|jx|_|_||_ntdd|j z|_ d|_ ||_||_|jr |j|_|jr|j|_dSdS)aThe parameters ``pattern`` and ``flags`` are passed to the ``re.compile()`` function as-is. See the Python `re module `_ module for an explanation of the acceptable patterns and flags. z0null string passed to Regex; use Empty() insteadNr7rzCRegex may only be constructed with a string or a compiled RE objectrF)rr.rSr#r_rerr7r8r#rrUrrr5r6parseImplAsGroupListrHparseImplAsMatch)r+r7r8r9r:r5r6rs r-r.zRegex.__init__c s/ !2] %X gx ( (  U !STTTDH+2 2DMDLDJJ Wi ( ( WWg-F-F DH+2? :DL4=DJJU "DI- "&   7!6DN < 3!2DNNN 3 3r/c|jr|jS tj|j|jS#tj$r(t d|jwxYw)Nz&invalid pattern ({!r}) passed to Regex)r<rrr7r8r rrrs r-rzRegex.re sp 8 8O z$, ;;;8    <CCDLQQ s /7A&c|jjSr))rrrs r-rzRegex.re_match s w}r/c0|dduSNr~)rrs r-rzRegex.mayReturnEmpty s}}R  ,,r/cxdt|jddS)NzRe:({})z\\\)rrr7rrs r-rzRegex._generateDefaultName s0T\ 2 2 : :64 H HIIIr/Tc<|||}|st|||j||}t |}|}|r|D] \}}|||< ||fSr))rrrrr r. groupdictitems) r+rrrrur5dkvs r-rHzRegex.parseImpl sx-- C 3 TBB Bjjll6<<>>**          1ACxr/c|||}|st|||j||}|}||fSr))rrrrgroupsr+rrrrur5s r-r=zRegex.parseImplAsGroupList sWx-- C 3 TBB BjjllmmooCxr/c|||}|st|||j||}|}||fSr))rrrrrMs r-r>zRegex.parseImplAsMatch sOx-- C 3 TBB BjjllCxr/replrXcjrtdjrtrtdjrfd}nfd}|S)a Return :class:`Regex` with an attached parse action to transform the parsed result as if called using `re.sub(expr, repl, string) `_. Example:: make_html = Regex(r"(\w+):(.*?):").sub(r"<\1>\2") print(make_html.transform_string("h1:main title:")) # prints "

main title

" z-cannot use sub() with Regex(asGroupList=True)z9cannot use sub() with a callable with Regex(asMatch=True)c:|dSr)expand)r[rOs r-rzRegex.sub..pa say''---r/cFj|dSr)rsub)r[rOr+s r-rzRegex.sub..pa sw{{4333r/)r5rr6r(r5)r+rOrs`` r-rTz Regex.sub s   MKLL L < YHTNN YWXX X < 4 . . . . . .  4 4 4 4 4 4$$R(((r/)rFFr)r2r7r8rGrrr RegexFlagrrr.r&rrrrHr=r>rrrTrrs@r-r4r4J sq6+,# ,3",3,3,3,3R\3&',3 ,3  ,3,3,3,3,3,3,3,3\  _ _--_-JJJ    )) ))))))))r/r4ceZdZdZdZ ddddddddded ejed ejed ed ed ejedededejedejededejedeffdZ dZ ddZ xZ S) QuotedStringa Token for matching strings that are delimited by quoting characters. Defined with the following parameters: - ``quote_char`` - string of one or more characters defining the quote delimiting string - ``esc_char`` - character to re_escape quotes, typically backslash (default= ``None``) - ``esc_quote`` - special quote sequence to re_escape an embedded quote string (such as SQL's ``""`` to re_escape an embedded ``"``) (default= ``None``) - ``multiline`` - boolean indicating whether quotes can span multiple lines (default= ``False``) - ``unquote_results`` - boolean indicating whether the matched text should be unquoted (default= ``True``) - ``end_quote_char`` - string of one or more characters defining the end of the quote delimited string (default= ``None`` => same as quote_char) - ``convert_whitespace_escapes`` - convert escaped whitespace (``'\t'``, ``'\n'``, etc.) to actual whitespace (default= ``True``) Example:: qs = QuotedString('"') print(qs.search_string('lsjdf "This is the quote" sldjf')) complex_qs = QuotedString('{{', end_quote_char='}}') print(complex_qs.search_string('lsjdf {{This is the "quote"}} sldjf')) sql_qs = QuotedString('"', esc_quote='""') print(sql_qs.search_string('lsjdf "This is the quote with ""embedded"" quotes" sldjf')) prints:: [['This is the quote']] [['This is the "quote"']] [['This is the quote with "embedded" quotes']] ))z\t )rVrW)z\f )z\r r~NFT) quoteCharescCharescQuoteunquoteResults endQuoteCharconvertWhitespaceEscapes quote_charesc_char esc_quote multilineunquote_resultsend_quote_charconvert_whitespace_escapesr[r\r]r^r_r`c t| p|} | p|} | o|} | p|} | o|} |p|}|}|std| |} n%| } | std|_t |_|d_| _t | _ | _ | _ | _ | _ d}d}| r-|d|tj| z }d}| rN|d|tj| z }d}tjj dz_t jd krc|d |dfd t't jd z dd Dzd zz }d}|rbtjtjz_|d|t/jd| t/| ndz }nJd_|d|t/jd| t/| ndz }dtjjd|dtjjg_ tjjj_j_jj_n:#tj$r(tdjwxYwdjz_d_ d_!dS)Nz%quote_char cannot be the empty stringz'endQuoteChar cannot be the empty stringrr~z{}(?:{})|z {}(?:{}.)z(.)rz{}(?:c 3K|]X}dtjjd|tjj|dVYdS)z (?:{}(?!{}))N)rrrr_)rCr|r+s r-r*z(QuotedString.__init__..N s{  #)) $"3BQB"788 $"3ABB"788r/r)z {}(?:[^{}{}])z{}(?:[^{}\n\r{}])z(?:z)*z$invalid pattern {!r} passed to RegexrFT)"rr.rZrr[rB quoteCharLenfirstQuoteCharr_endQuoteCharLenr\r]r^r`rrrescCharReplacePatternrrange MULTILINEDOTALLr8rr7rrrrr rUrrr)r+rarbrcrdrerfrgr[r\r]r^r_r`sep inner_patternrs` r-r.zQuotedString.__init__ s" %X(y';O#5~ $ C)C !,*  %%''  FDEE E  %LL'--//L L !JKKK# OO(m("<00   ,(@%   [//RYx5H5HII IMC  I \00bi6H6HII IMC)+4<)@)@5)HD & t ! !A % % s##(( #3t'8#9#9A#=q"EE  MC   1DJ -44)$*;A*>??7>7J*7333PR MM DJ 188)$*;A*>??7>7J*7333PR M ww $.)) $+,,      jtz::DG LDM GMDMMx   6==dlKK   "DI- ""s #AL%%7Mc|j|jkr4t|jtrd|jSd|j|jS)Nzstring enclosed in {!r}z.quoted string, starting with {} ending with {})r[r_rSr#rrs r-rz!QuotedString._generateDefaultName s[ >T. . .:dnh3W3W .,33DNCC C?FF ND-   r/c.|||jkr|||pd}|st|||j||}|}|jr||j|j }t|trwd|vr*|j r#|j D]\}}| ||}|jrtj|jd|}|jr | |j|j}||fS)NrDz\g<1>)rmrrrrr.r^rlrnrSr#r`ws_maprr\rrTror]r_)r+rrrrur5wslitwschars r-rHzQuotedString.parseImpl s3 SMT0 0 - h,,    C 3 TBB Bjjllllnn   Hd'4+?*??@C#x(( H3;;4#@;)-99 v!kk%88<L&!;XsKKC=H++dmT5FGGCCxr/)r~NNFTNTr) r2r7r8rGrwrrrrr.rrHrrs@r-rWrW sn%%LJF)-*. $/3+/o#(,)-#-1)-o#o#o#o#/#&o#?3' o#  o#  o#,o#%)o#o#%o#/#&o#o#oc*o##'o#o#o#o#o#o#b   r/rWc VeZdZdZ ddddededed ed ef fd Zd ZddZxZ S) CharsNotInaToken for matching words composed of characters *not* in a given set (will include whitespace in matched characters if not listed in the provided exclusion set - see example). Defined with string containing all disallowed characters, and an optional minimum, maximum, and/or exact length. The default value for ``min`` is 1 (a minimum value < 1 is not valid); the default values for ``max`` and ``exact`` are 0, meaning no maximum or exact length restriction. Example:: # define a comma-separated-value as anything that is not a ',' csv_value = CharsNotIn(',') print(delimited_list(csv_value).parse_string("dkls,lsdkjf,s12 34,@!#,213")) prints:: ['dkls', 'lsdkjf', 's12 34', '@!#', '213'] r~rr)notChars not_charsrr rr|cztd|_|p||_t |j|_|dkrt d||_|dkr||_n t|_|dkr||_||_d|j z|_ |jdk|_ d|_ dS)NFrzacannot specify a minimum length < 1; use Opt(CharsNotIn()) if zero-length char group is permittedrr)rr.rr|r notCharsSetrrrrrUrrr)r+r}rr rr|rs r-r.zCharsNotIn.__init__ s #!-X t}-- 77K   77DKK"DK 199DKDK!DI- "kQ."r/ct|j}t|dkr"d|jddSd|jS)Nr$z !W:({}...) z!W:({}))rr|rBr)r+ not_chars_strs r-rzCharsNotIn._generateDefaultName sY24=AA }   " "&&t}XvX'>?? ?##DM22 2r/TcV|j}|||vrt|||j||}|dz }t||jzt |}||kr|||vr|dz }||kr |||v||z |jkrt|||j|||||fSrA)rrrrrrBr)r+rrrnotcharsrmaxlens r-rHzCharsNotIn.parseImpl s# C=H $ $ 3 TBB B qUT[(#h--88Fllx}H<< 1HCFllx}H<< ; $ $ 3 TBB BHU3Y'''r/)r~rrrrrrs@r-r{r{ s, !#!#!#!#!#!# !#  !#!#!#!#!#!#!#F333((((((((r/r{c eZdZdZidddddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*Zd6d.ed/ed0ed1effd2 Zd3Zd7d5Z xZ S)8WhiteaSpecial matching class for matching whitespace. Normally, whitespace is ignored by pyparsing grammars. This class is included when some whitespace structures are significant. Define with a string containing the whitespace characters to be matched; default is ``" \t\r\n"``. Also takes optional ``min``, ``max``, and ``exact`` arguments, as defined for the :class:`Word` class. rzrXzrWzrZzrYz zu zu᠎zu z u z u z u z u zu zu zu zu zz z zzzz)u u u​u u u  rrwsrr rcht|_dfdjDdd_djz_|_ |dkr|_ n t_ |dkr|_ |_ dSdS)Nr~c3.K|]}|jv |VdSr)) matchWhite)rCrr+s r-r*z!White.__init__..! s/JJ!$/1I1IA1I1I1I1IJJr/Trrr) rr.rr r whiteStrsrrUrrrr)r+rrr rrs` r-r.zWhite.__init__ s  !! GGJJJJt~JJJ J J "   #!DI-  77DKK"DK 199DKDKKK 9r/cJdd|jDS)Nr~c3:K|]}tj|VdSr))rrrs r-r*z-White._generateDefaultName..4 s)CCauq)CCCCCCr/)rrrs r-rzWhite._generateDefaultName3 s%wwCC4?CCCCCCr/Tcj|||jvrt|||j||}|dz }||jz}t |t |}||kr)|||jvr|dz }||kr|||jv||z |jkrt|||j|||||fSrA)rrrrrrBr)r+rrrrrs r-rHzWhite.parseImpl6 s C= / / 3 TBB B q$VS]]++Fllx}?? 1HCFllx}?? ; $ $ 3 TBB BHU3Y'''r/)rrrrr) r2r7r8rGrrrr.rrHrrs@r-rr s V g f f  f  (  & / + + , , ( ' & "!" '#$! &'/I4  3  s s      ,DDD ( ( ( ( ( ( ( (r/rceZdZfdZxZS) PositionTokencdtd|_d|_dSr;rrs r-r.zPositionToken.__init__G rr/)r2r7r8r.rrs@r-rrF s8#########r/rc6eZdZdZdeffd ZdZddZxZS) GoToColumnzaToken to advance to a specific column of input text; useful for tabular report scraping. colnocVt||_dSr))rr.r)r+rrs r-r.zGoToColumn.__init__R s$ r/c~t|||jkrt|}|jr|||}||krq||rWt|||jkr>|dz }||kr3||rt|||jk>|SrA)rrBrr?isspace)r+rrrCs r-rEzGoToColumn.preParseV s sH   ) )8}}H :**8S99hSM))++X&&$(22q hSM))++X&&$(22 r/Tct||}||jkrt||d|||jz|z }|||}||fS)NzText not in expected column)rr)r+rrrthiscolnewlocr5s r-rHzGoToColumn.parseImplc s[c8$$ TX   30MtTT Ttx')s6z"s{r/r) r2r7r8rGrr.rErHrrs@r-rrM sqc   r/rc0eZdZdZfdZdZddZxZS) LineStartaMatches if current position is at the beginning of a line within the parse string Example:: test = '''\ AAA this line AAA and this line AAA but not this one B AAA and definitely not this one ''' for t in (LineStart() + 'AAA' + restOfLine).search_string(test): print(t) prints:: ['AAA', ' this line'] ['AAA', ' and this line'] c>t|t|jz|_|jdt|j|_ d|_ dS)NrWzExpected start of line) rr.rrrorig_whiteCharsdiscardrr rrrs r-r.zLineStart.__init__ sz  "uut6 %%%ww33DODD . r/c|dkr|S|j||}d|jvr@|||dzdkr/|j||dz}|||dzdk/|S)NrrWr)rrEr)r+rrr5s r-rEzLineStart.preParse s !88J,''#66Ct+++sS1W}-55,//#'BBCsS1W}-55Jr/Tc`t||dkr|gfSt|||j|rA)rrrrGs r-rHzLineStart.parseImpl s6 sH   " "7NXsDK>>>r/r)r2r7r8rGr.rErHrrs@r-rrl se,/////????????r/rc*eZdZdZfdZddZxZS)LineEndzTMatches if current position is at the end of a line within the parse string ct|jd||jdd|_dS)NrWFrzExpected end of line)rr.rrr rrs r-r.zLineEnd.__init__ sU  %%% !!$/!GGG, r/Tc|t|kr*||dkr|dzdfSt|||j||t|kr|dzgfSt|||j|)NrWrrBrrrGs r-rHzLineEnd.parseImpl s{ X  }$$Qw}$$XsDKFFF CMM ! !7B;  3 TBB Br/rrrs@r-rr s^----- C C C C C C C Cr/rc*eZdZdZfdZddZxZS) StringStartzLMatches if current position is at the beginning of the parse string cVtd|_dS)NzExpected start of textrr.rrs r-r.zStringStart.__init__ s$ . r/Tcx|dkr1|||dkrt|||j||gfSr)rErrrGs r-rHzStringStart.parseImpl sC !88dmmHa0000$XsDKFFFBwr/rrrs@r-rr sV/////r/rc*eZdZdZfdZddZxZS)rzG Matches if current position is at the end of the parse string cVtd|_dS)NzExpected end of textrrs r-r.zStringEnd.__init__ s$ , r/Tc|t|krt|||j||t|kr|dzgfS|t|kr|gfSt|||j|rArrGs r-rHzStringEnd.parseImpl sx X   3 TBB B CMM ! !7B;  3x== 7N 3 TBB Br/rrrs@r-rr s^-----CCCCCCCCr/rc>eZdZdZefeddedeffdZddZxZS) WordStartaMatches if the current position is at the beginning of a :class:`Word`, and is not preceded by any character in a given set of ``word_chars`` (default= ``printables``). To emulate the ```` behavior of regular expressions, use ``WordStart(alphanums)``. ``WordStart`` will also match at the beginning of the string being parsed, or at the beginning of a line.  wordChars word_charsrc|tkr|n|}tt||_d|_dS)NzNot at the start of a word) printablesrr.rrrr+rrrs r-r.zWordStart.__init__ sD"+z"9"9JJy  Y2 r/Tc|dkr8||dz |jvs|||jvrt|||j||gfSNrr)rrrrGs r-rHzWordStart.parseImpl sQ !88q!T^33C=66$XsDKFFFBwr/r r2r7r8rGrrr.rHrrs@r-rr s*43333333333333 r/rc>eZdZdZefeddedeffdZddZxZS) WordEndaiMatches if the current position is at the end of a :class:`Word`, and is not followed by any character in a given set of ``word_chars`` (default= ``printables``). To emulate the ```` behavior of regular expressions, use ``WordEnd(alphanums)``. ``WordEnd`` will also match at the end of the string being parsed, or at the end of a line. rrrc|tkr|n|}tt||_d|_d|_dS)NFzNot at the end of a word)rrr.rrrrrs r-r.zWordEnd.__init__ sL"+z"9"9JJy  Y#0 r/Tct|}|dkr>||kr8|||jvs||dz |jvrt|||j||gfSr)rBrrr)r+rrrrCs r-rHzWordEnd.parseImplsdx== a<.s,@@$:dH--@@@@@@r/c3pK|]0}t|tr|n|V1dSr))rSr#r)rCr=r+s r-r*z+ParseExpression.__init__..sZ4>a3J3JQD,,Q///PQr/F) rr.rS_generatorTyperr#rrrranyrrr+rrrs` r-r.zParseExpression.__init__sG """ ' e^ , , KKE eX & & %22599:DJJ } - - %DJJ x ( ( %KKE@@%@@@@@ "eDJJ %!%[[  % % %#W  %!s:DD$#D$rXc |jddSr))rrs r-r&zParseExpression.recurse+sz!!!}r/cH|j|d|_|Sr))rr rrs r-r zParseExpression.append.s% %     r/Trct||r5d|jD|_|jD]}|||S)z Extends ``leave_whitespace`` defined in base class, and also invokes ``leave_whitespace`` on all contained expressions. c6g|]}|Sr9r rCr=s r-rEz4ParseExpression.leave_whitespace..; 777q!&&((777r/)rrrr+rr=rs r-rz ParseExpression.leave_whitespace3si   +++  .77DJ777DJZ . .""9---- r/ct||r5d|jD|_|jD]}|||S)z Extends ``ignore_whitespace`` defined in base class, and also invokes ``leave_whitespace`` on all contained expressions. c6g|]}|Sr9rrs r-rEz5ParseExpression.ignore_whitespace..Grr/)rrrrs r-rz!ParseExpression.ignore_whitespace@si !!),,,  /77DJ777DJZ / /##I.... r/crt|trU||jvrKt||jD]"}||jd#nKt||jD]"}||jd#|SNr)rSrrrr r)r+rr=rs r-r zParseExpression.ignoreLs eX & & /D,,,u%%%33AHHT-b12222 GGNN5 ! ! !Z / /)"-.... r/cfd|jjt|jSNz{}:({}))rrr2rrrs r-rz$ParseExpression._generateDefaultNameXs% 7TZIIIr/c$|jr|St|jD]}|t |jdkr|jd}t ||jri|jsb|j[|j sT|jdd|jdgz|_d|_ |xj |j zc_ |xj |j zc_ |jd}t ||jrj|jsc|j\|j sU|jdd|jddz|_d|_ |xj |j zc_ |xj |j zc_ dt|z|_|S)Nrkrrrr)rrrrrBrSrrrrrrrrr)r+r=rrs r-rzParseExpression.streamline[s   K   A LLNNNN tz??a  JqME5$.11 :) :%- .#[^tz!}o= $(!##u';;##""e&99""JrNE5$.11 :) :%- ."Z_u{111~= $(!##u';;##""e&99""!CII-  r/Nc||ngdd|gz}|jD]}|||gdSr))rr/r))r+r.tmpr=s r-r/zParseExpression.validates\ - 9}}r111EN  A JJsOOOO R     r/ctt}d|jD|_|S)Nc6g|]}|Sr9rrs r-rEz(ParseExpression.copy..s 222!QVVXX222r/)rr rr+r5rs r-r zParseExpression.copys0ggllnn22tz222  r/c ~tjrtj|jvr||jD]t}t |t r]|jrVtj|jvrCtj d d|t|j |jdut||SNzY{}: setting results name {!r} on {} expression collides with {!r} on contained expressionr`r$ stacklevel)rOr`rjrrrSrrwarningsrSrrr2rrr+rUrr=rs r-rzParseExpression._setResultsNames  > E*++Z  q-00 $M/00MEEKVG  JJ/M FF $%    ww&&t^<<.%%K%K1a&6%K%K%K%K%K%Kr/rrFT)rrrrBrrr rrRrr.r.rrSrr rrrr) r+rrrrr|r skipto_argrs r-r.z And.__init__s&*)__  X&&C$U++ % %48##3u::>))5:WWuQU|5K4RSU4V  #56*#5#5k#B#BCCCC'NJJt$$$$E!!!H ))) : '"%%K%K %K%K%K"K"KD djmU33 ,))JqM,"&*Q-"E*'+jm&B##&+##"&D  r/rXc|jrtd|jddDrt|jddD]w\}}|t|trZ|jrSt|jdt r3|jd|j|dzz|jd<d|j|dz<xd|jD|_t t|j|jddD]\}}t}|rt||vrn| t|t|tr| |fdn3|}tt!|d}|t#d|jD|_|S)Nc3K|]@}t|to&|jot|jdtVAdSrN)rSrrrrs r-r*z!And.streamline..sd1o..:G:qwr{L99r/rrcg|]}||Sr)r9rs r-rEz"And.streamline..sEEEAq}a}}}r/c@t|dt||S)N parent_anchor)setattrr)rrrcur_s r-rz And.streamline.. s' /3q!9933r/c3$K|] }|jV dSr)rrs r-r*z!And.streamline..s%!G!Gq!"2!G!G!G!G!G!Gr/)rrrrSrrrrrrrAadd IndentedBlockr5r&nextrr.r)r+r|r=prevcurseensubsrs r-rzAnd.streamlines  : FCRC  F &dj"o66 1 1DAqy "1o661G1'qwr{LAA1 '(gbkDJq1u4E&E ,0 1q5)EEEEE  TZABB88 - -ID#55D -c77d??C!!!c=11))-0 {{}}4::t,, -"!G!GDJ!G!G!GGG r/c6|jd|||d\}}d}|jddD]}t|tjurd} |r ||||\}}n#t $rt $r&}d|_t |d}~wt$r%t |t||j |wxYw||||\}}|s| r||z }||fS)NrFrrT) rr"rrrParseSyntaxExceptionrmr_from_exceptionrQrBrhaskeys) r+rrr resultlist errorStopr= exprtokensrss r-rHz And.parseImplsh*Q-.. c95/  Z ABB ) )AAww#.((  E &'hhxi&H&HOC+)CCC'+B$.>>rBBB!. #h--d #$((8S)"D"DZ )Z//11 )j( JsA77C !B,,2Cct|tr||}||Sr)rSr#rr rs r-__iadd__z And.__iadd__39 eX & & 4,,U33E{{5!!!r/ct|dd|gz}|jD]!}|||jsdS"dSr))rr)rr*s r-r)zAnd._checkRecursion8s]*111-6  A  o . . .#    r/c6dd|jD}t|dkr[|ddt|dz dkr<|dd}t|dkr|ddt|dz dk.@s(44AQ444444r/rr{}r{})rrrBr+inners r-rzAnd._generateDefaultName?s4444444%jj1nnq':CJJN':!;t!C!C!B$KE%jj1nnq':CJJN':!;t!C!CU{S  r/r)r2r7r8rGrrrrrrr.rrHr r)rrrs@r-rrs"UKO!!7!CG!!!!!!B+M++++++Z<""" !!!!!!!r/rcteZdZdZd dejedeffd Zdeffd Z dd Z d Z d Z d fd Z xZS)raRequires that at least one :class:`ParseExpression` is found. If two expressions match, the expression that matches the longest string will be used. May be constructed using the ``'^'`` operator. Example:: # construct Or using '^' operator number = Word(nums) ^ Combine(Word(nums) + '.' + Word(nums)) print(number.search_string("123 3.1416 789")) prints:: [['123'], ['3.1416'], ['789']] Frrct|||jrHtd|jD|_t d|jD|_dSd|_dS)Nc3$K|] }|jV dSr)rrs r-r*zOr.__init__..\rr/c3$K|] }|jV dSr)rrs r-r*zOr.__init__..]rr/Trr.rrrr.rrs r-r.z Or.__init__Y} ))) : '"%%K%K %K%K%K"K"KD "%%K%K %K%K%K"K"KD   "&D   r/rXc8t|jrjtd|jD|_td|jD|_t d|jD|_nd|_|S)Nc3$K|] }|jV dSr)rrs r-r*z Or.streamline..drr/c3$K|] }|jV dSr)rrs r-r*z Or.streamline..e$!C!C1!,!C!C!C!C!C!Cr/c3PK|]!}|jot|t V"dSr)rrSrrs r-r*z Or.streamline..fH&&BC =Au)=)=%=&&&&&&r/F)rrrrrrr.rrs r-rz Or.streamlineas  : $"%%K%K %K%K%K"K"KD !!C!C !C!C!CCCDO"%&&GKz&&&##D  $DO r/Tc0d}d}g}g}td|jDr|||}|jD]} |||d} || |f3#t $r1} d| _|| _|| d}d}Yd} ~ id} ~ wt$r'} |sd| _| j |kr | }| j }Yd} ~ d} ~ wt$rIt||kr3t|t||j |}t|}YwxYw|r| tdd|s%|dd} | |||Sd} |D]~\}}|| dkr| cS ||||\} }| |kr| |fcS| | dkr| |f} M#t$r%} d| _| j |kr | }| j }Yd} ~ wd} ~ wwxYw| dkr| S|rgt|dkrJ| d |dj |dj kr| d |d}|||j |_|t||d |) Nrc3$K|] }|jV dSr))rrs r-r*zOr.parseImpl..rs$22!q~222222r/Tr`r)rreverserrc|j Sr)rr=s r-rzOr.parseImpl.. 15&r/rcV|j tt|j fSr)rrBr parserElementr(s r-rzOr.parseImpl..$vC.(;;1A;;;;;;r/rrrrs r-rzOr._generateDefaultName/UZZ;; ;;;;;;cAAr/c <tjrntj|jvr[t d|jDr=t jdd|t|j dt ||S)Nc3fK|],}t|totj|jvV-dSr)rSrrjr_rrs r-r*z%Or._setResultsName..X1c"",I+,r/{}: setting results name {!r} on {} expression will return a list of all parsed tokens in an And alternative, in prior versions only the first token was returned; enclose contained argument in Groupr_r$r rOr_rjrrrrrSrrr2rrr+rUrrs r-rzOr._setResultsName  > E*++    239&CT +33 !    ww&&t^<< [['123'], ['3'], ['1416'], ['789']] # put more selective expression first number = Combine(Word(nums) + '.' + Word(nums)) | Word(nums) print(number.search_string("123 3.1416 789")) # Better -> [['123'], ['3.1416'], ['789']] Frrct|||jrHtd|jD|_t d|jD|_dSd|_dS)Nc3$K|] }|jV dSr)rrs r-r*z&MatchFirst.__init__..rr/c3$K|] }|jV dSr)rrs r-r*z&MatchFirst.__init__..rr/Trrs r-r.zMatchFirst.__init__rr/rXcX|jr|St|jrjt d|jD|_t d|jD|_td|jD|_nd|_d|_|S)Nc3$K|] }|jV dSr)rrs r-r*z(MatchFirst.streamline..rr/c3$K|] }|jV dSr)rrs r-r*z(MatchFirst.streamline..rr/c3PK|]!}|jot|t V"dSr)r rs r-r*z(MatchFirst.streamline..r!r/FT) rrrrrrrr.rrs r-rzMatchFirst.streamlines   K  : '!!C!C !C!C!CCCDO"%%K%K %K%K%K"K"KD "%&&GKz&&&##D  $DO"&D  r/Tcd}d}|jD]} ||||cS#t$r}d|_||_d}~wt $r}|j|kr |}|j}Yd}~[d}~wt$rIt||kr3t |t||j |}t|}YwxYw||j |_ |t ||d|)Nrr/) rr"rrr-rrrQrBrr) r+rrrr1r2r=r5r\s r-rHzMatchFirst.parseImpl s9   . .A .xx '   $(!$%!! ( ( (7Y&&#&L #I . . .x==9,,#1 #h--4$$L!$H I  .  ##{L   #A4 s'( B=A B=A''AB=<B=ct|tr||}||Sr)r rs r-__ior__zMatchFirst.__ior__.r r/cVddd|jDzdzS)Nrz | c34K|]}t|VdSr)rrs r-r*z2MatchFirst._generateDefaultName..4r?r/rr@rs r-rzMatchFirst._generateDefaultName3rAr/c <tjrntj|jvr[t d|jDr=t jdd|t|j dt ||S)Nc3fK|],}t|totj|jvV-dSr)rDrs r-r*z-MatchFirst._setResultsName..<rEr/rFr_r$rrGrHs r-rzMatchFirst._setResultsName6rIr/r~r)r2r7r8rGrrrrr.rrHrTrrrrs@r-rrs"''fom<'''''''M    D""" BBB==========r/rcbeZdZdZd dejedeffd Zdeffd Z d dZ d Z xZ S) ralRequires all given :class:`ParseExpression` s to be found, but in any order. Expressions may be separated by whitespace. May be constructed using the ``'&'`` operator. Example:: color = one_of("RED ORANGE YELLOW GREEN BLUE PURPLE BLACK WHITE BROWN") shape_type = one_of("SQUARE CIRCLE TRIANGLE STAR HEXAGON OCTAGON") integer = Word(nums) shape_attr = "shape:" + shape_type("shape") posn_attr = "posn:" + Group(integer("x") + ',' + integer("y"))("posn") color_attr = "color:" + color("color") size_attr = "size:" + integer("size") # use Each (using operator '&') to accept attributes in any order # (shape and posn are required, color and size are optional) shape_spec = shape_attr & posn_attr & Opt(color_attr) & Opt(size_attr) shape_spec.run_tests(''' shape: SQUARE color: BLACK posn: 100, 120 shape: CIRCLE size: 50 color: BLUE posn: 50,80 color:GREEN size:20 shape:TRIANGLE posn:20,40 ''' ) prints:: shape: SQUARE color: BLACK posn: 100, 120 ['shape:', 'SQUARE', 'color:', 'BLACK', 'posn:', ['100', ',', '120']] - color: BLACK - posn: ['100', ',', '120'] - x: 100 - y: 120 - shape: SQUARE shape: CIRCLE size: 50 color: BLUE posn: 50,80 ['shape:', 'CIRCLE', 'size:', '50', 'color:', 'BLUE', 'posn:', ['50', ',', '80']] - color: BLUE - posn: ['50', ',', '80'] - x: 50 - y: 80 - shape: CIRCLE - size: 50 color: GREEN size: 20 shape: TRIANGLE posn: 20,40 ['color:', 'GREEN', 'size:', '20', 'shape:', 'TRIANGLE', 'posn:', ['20', ',', '40']] - color: GREEN - posn: ['20', ',', '40'] - x: 20 - y: 40 - shape: TRIANGLE - size: 20 Trrct|||jr$td|jD|_nd|_d|_d|_d|_dS)Nc3$K|] }|jV dSr)rrs r-r*z Each.__init__..rr/T)rr.rr.rrinitExprGroupsrrs r-r.z Each.__init__sn ))) : '"%%K%K %K%K%K"K"KD  "&D ""r/rXct|jr$td|jD|_nd|_|S)Nc3$K|] }|jV dSr)rrs r-r*z"Each.streamline..rr/T)rrrr.rrs r-rzEach.streamlinesT  : '"%%K%K %K%K%K"K"KD  "&D  r/cv|jrtd|jD|_d|jD}d|jD}||z|_d|jD|_d|jD|_d|jD|_|xj|jz c_d|_|}|jdd}|jdd|jdd}g} d} g} g} | rP|z|z} | | | D]} | ||d }| |j t||||vr| |p|vr |#t$rB}d|_||_| || |Yd}~d}~wt"$r| |YwxYwt%| t%| krd} | P| rgt%| d krJ| d | d j| d jkr| d | d }||rCdd|D}t#||d|| fd|jDz } t/g}| D]!}||||\}}||z }"||fS)Nc3lK|]/}t|tt|j|fV0dSr))rSrrArrs r-r*z!Each.parseImpl..sQ  $%z!S7I7I AFQ      r/cFg|]}t|t|jSr9rSrrrs r-rEz"Each.parseImpl..s)EEEq*Q2D2DEAFEEEr/cdg|]-}|j t|tttf+|.Sr9)rrSrr4rrs r-rEz"Each.parseImpl..sL#-7q3z:R,S,Sr/czg|]8}t|t|j|jd9ST)r)rS_MultipleMatchrrrrs r-rEz"Each.parseImpl..sO###a00#'' 'MM###r/czg|]8}t|t|j|jd9Sre)rSrrrrrs r-rEz"Each.parseImpl..sO"""a++"'' 'MM"""r/cVg|]&}t|tttf$|'Sr9)rSrrrrs r-rEz"Each.parseImpl..s>ZCY;W-X-Xr/FTr$rc|j Sr)r'r(s r-rz Each.parseImpl..r)r/r*rcV|j tt|j fSr)r,r(s r-rz Each.parseImpl..r.r/z, c,g|]}t|Sr9rrs r-rEz"Each.parseImpl..s 9 9 9AQ 9 9 9r/z*Missing one or more required elements ({})cPg|]"}t|t|jv |#Sr9rb)rCr=tmpOpts r-rEz"Each.parseImpl..s5XXXQ 1c0B0BXqvQWGWGWqGWGWGWr/)r\dictropt1map optionalsmultioptionals multirequiredrequiredrxrcr r/rAremoverrr-rrBr0rrrr r")r+rrropt1opt2tmpLoctmpReqdmultis matchOrder keepMatchingfailedr3tmpExprsr=r5r:missing total_resultsrrms @r-rHzEach.parseImpls   (  )-   DLFEDJEEEDD "D[DN#####D  """""D  :DM MMT/ /MM"'D -""$QQQ'   %'&0H LLNNN LLNNN ) ))[[6t[LLF%%dl&6&6r!uua&@&@AAAG||q))))f a(((+%%%(,C%()C%MM#&&&MM!$$$$$$$$%%%%MM!$$$$$%6{{c(mm++$ + %0  6{{Q 0 0 111!9=F1IM11KK$R$RKSSSq IO  ii 9 9 9 9 9::G <CCGLL  XXXX$*XXXX $R((  % %A88Hc9==LC W $MMM!!s%F,, H68G33"HHcVddd|jDzdzS)Nrz & c34K|]}t|VdSr)rrs r-r*z,Each._generateDefaultName..r?r/rr@rs r-rzEach._generateDefaultNamerAr/r) r2r7r8rGrrrrr.rrHrrrs@r-rrQs77rfom<MU"U"U"U"nBBBBBBBr/rceZdZdZddeeefdeffd Zde efdZ dd Z dd edeffd Z dd edeffd Z deffd Zdeffd ZdZdddZdZe Ze ZxZS)ParseElementEnhancezfAbstract subclass of :class:`ParserElement`, for combining and post-processing parsed tokens. Frrct|t|trt |jt r||}nTt t||jrt|}n"|t|}||_ |~|j |_ |j |_ | |j |j|j|_|j|_|j|_|j|jdSdS)Nr)rr.rSr# issubclassrrrr]rrrr rrrrrrrr+rrrs r-r.zParseElementEnhance.__init__s+ """ dH % % ?$2E:: ?//55DJJ(@AA ?t}}// >>  !%!3D "&"5D   % %t/I &   #'"5D "oDO $ 1D    # #D$4 5 5 5 5 5  r/rXc$|j|jgngSr)rrs r-r&zParseElementEnhance.recurses"i3 {{;r/Tcp|j|j|||dSt||d|)NFrzNo expression defined)rr"rrGs r-rHzParseElementEnhance.parseImpls> 9 9##Hc95#QQ Q 30GNN Nr/rct||r?|j|_|j|j||Sr))rrrr r+rrs r-rz$ParseElementEnhance.leave_whitespacesY   +++  6 ((DIy$ **9555 r/ct||r?|j|_|j|j||Sr))rrrr rs r-rz%ParseElementEnhance.ignore_whitespace$sY !!),,,  7 ((DIy$ ++I666 r/czt|trW||jvrMt||j%|j|jdnMt||j%|j|jd|Sr)rSrrrr rr+rrs r-r zParseElementEnhance.ignore-s eX & & 7D,,,u%%%9(I$$T%5b%9::: GGNN5 ! ! !y$   !1"!5666 r/ct|j|j|Sr))rrrrs r-rzParseElementEnhance.streamline9s:  9 I " " " r/c||vrt||gz|dd|gz}|j|j|dSdSr))RecursiveGrammarExceptionrr))r+r+r,s r-r)z#ParseElementEnhance._checkRecursion?se # # #+,<v,EFF F*111-6 9 I % %o 6 6 6 6 6 ! r/Nc|g}|dd|gz}|j|j||gdSr)rr/r)r+r.rs r-r/zParseElementEnhance.validateFsZ  MAAA$' 9 I  s # # # R     r/cfd|jjt|jSr)rrr2rrrs r-rz(ParseElementEnhance._generateDefaultNameNs% 7TYHHHr/r~rr)r^)r2r7r8rGrrrrr.r r&rHrrr rr)r/rrrrrs@r-rrs66U=##566$666666*<-0<<<<OOOO $-4= }      M 777!!!!!III)&OOOOOr/rcxeZdZdZGddeZGddeZdddd ed ed effd Z dd Z xZ S)rz Expression to match one or more expressions at a given indentation level. Useful for parsing text where structure is implied by indentation (like Python source code). c$eZdZdeffd ZxZS)IndentedBlock._Indentref_colctd|_|fddS)Nzexpected indent at column {}c,t||kSr)rrrrrs r-rz0IndentedBlock._Indent.__init__.._ss1ayyG/Cr/rr.rrr7r+rrs `r-r.zIndentedBlock._Indent.__init__\sS GG     8??HHDK   CCCC D D D D Dr/r2r7r8rr.rrs@r-_Indentr[sO EC E E E E E E E E E Er/rc$eZdZdeffd ZxZS)IndentedBlock._IndentGreaterrctd|_|fddS)Nz)expected indent at column greater than {}c,t||kSr)rrs r-rz7IndentedBlock._IndentGreater.__init__..ess1ayy7/Br/rrs `r-r.z%IndentedBlock._IndentGreater.__init__bsS GG     ELLWUUDK   BBBB C C C C Cr/rrs@r-_IndentGreaterrasO DC D D D D D D D D D Dr/rFTrgroupedrrrcxt|d||_||_d|_dS)NTrr)rr. _recursive_groupedr)r+rrrrs r-r.zIndentedBlock.__init__gs@ ---$ r/crt||}|j|||t ||}||}t|z|jz}|jrl||}t|j|j|j } | |j || _ |t|| zz }|dtt!|ddd|t%|} ||j t'z} |j rt(} nd} | | t+| z|||S)Nrzinner @c|Sr)r9rs r-rz)IndentedBlock.parseImpl..s4r/)rrErrcrrrrrrrrrrrhexrArrrGrouprrH) r+rrr anchor_loc indent_colpeer_detect_expr inner_expr sub_indent nested_blockblocktrailing_undentrs r-rHzIndentedBlock.parseImplqsWW%%h44  Hj)<<<X.. << 33WW//$); ? 9,,Z88J( T_dmL  " "4: . . .)3L & #j<788 8JTSJ%8%8%=%C%C%E%ETT TTUUU*%%,,t'9::Y[[H = (GG''G/!:!::EE j)   r/r) r2r7r8rGrrrrrr.rHrrs@r-rrUs EEEEE%EEE DDDDDDDD9>t!15HL! ! ! ! ! ! ! ! r/rcDeZdZdZdeeefffd Zdfd ZxZ S) AtStringStartzMatches if expression matches at the beginning of the parse string:: AtStringStart(Word(nums)).parse_string("123") # prints ["123"] AtStringStart(Word(nums)).parse_string(" 123") # raises ParseException rcXt|d|_dSNFrr.rr+rrs r-r.zAtStringStart.__init__) !r/Tcx|dkrt||dt|||S)Nrznot found at string start)rrrHr+rrrrs r-rHzAtStringStart.parseImpls; !88 30KLL Lww  3 :::r/r r2r7r8rGrrrr.rHrrs@r-rrsv"U=##56"""""";;;;;;;;;;r/rcDeZdZdZdeeefffd Zdfd ZxZ S) AtLineStartaMatches if an expression matches at the beginning of a line within the parse string Example:: test = '''\ AAA this line AAA and this line AAA but not this one B AAA and definitely not this one ''' for t in (AtLineStart('AAA') + restOfLine).search_string(test): print(t) prints:: ['AAA', ' this line'] ['AAA', ' and this line'] rcXt|d|_dSrrrs r-r.zAtLineStart.__init__rr/Tct||dkrt||dt|||S)Nrznot found at line start)rrrrHrs r-rHzAtLineStart.parseImplsG sH   " " 30IJJ Jww  3 :::r/rrrs@r-rrsv,"U=##56"""""";;;;;;;;;;r/rc@eZdZdZdeeefffd ZddZxZ S) FollowedByacLookahead matching of the given parse expression. ``FollowedBy`` does *not* advance the parsing position within the input string, it only verifies that the specified parse expression matches at the current position. ``FollowedBy`` always returns a null token list. If any results names are defined in the lookahead expression, those *will* be returned for access by name. Example:: # use FollowedBy to match a label only if it is followed by a ':' data_word = Word(alphas) label = data_word + FollowedBy(':') attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) attr_expr[1, ...].parse_string("shape: SQUARE color: BLACK posn: upper left").pprint() prints:: [['shape', 'SQUARE'], ['color', 'BLACK'], ['posn', 'upper left']] rcXt|d|_dSr$rr.rrs r-r.zFollowedBy.__init__s) "r/TcT|j|||\}}|dd=||fS)Nrb)rr")r+rrrr?r5s r-rHzFollowedBy.parseImpls8!!(C9!EE3 FCxr/rrrs@r-rrsl,#U=##56######r/rc^eZdZdZ d deeefdeje ffd Z d dZ xZ S) PrecededByaLookbehind matching of the given parse expression. ``PrecededBy`` does not advance the parsing position within the input string, it only verifies that the specified parse expression matches prior to the current position. ``PrecededBy`` always returns a null token list, but if a results name is defined on the given expression, it is returned. Parameters: - expr - expression that must match prior to the current parse location - retreat - (default= ``None``) - (int) maximum number of characters to lookbehind prior to the current parse location If the lookbehind expression is a string, :class:`Literal`, :class:`Keyword`, or a :class:`Word` or :class:`CharsNotIn` with a specified exact or maximum length, then the retreat parameter is not required. Otherwise, retreat must be specified to give a maximum number of characters to look back from the current parse position for a lookbehind match. Example:: # VB-style variable names with type prefixes int_var = PrecededBy("#") + pyparsing_common.identifier str_var = PrecededBy("$") + pyparsing_common.identifier Nrretreatct|||_d|_d|_d|_t|trt|}d|_nt|ttfr|j }d|_nYt|ttfr|jt kr|j}d|_nt|t"r d}d|_||_dt'|z|_d|_|jddS)NTFrznot preceded by cH|tddSr)) __delitem__slicerrrs r-rz%PrecededBy.__init__..$s eD$>O>O0P0Pr/)rr.rrrrrrSr#rBr]rrrr{rrrrrrrrr )r+rrrs r-r.zPrecededBy.__init__ s/ IIKK0022 "" dH % % $iiGDJJ w0 1 1 mGDJJ tZ0 1 1 dkX6M6MkGDJJ m , , GDJ (3t994 #  P PQQQQQr/rTc(|jrJ||jkrt|||j||jz }|j||\}}n|jt z}|td||jz |}t|||j} tdt||jdzdzD]F} ||t|| z \}}n#t$r } | } Yd} ~ ?d} ~ wwxYw| ||fSr) rrrrrr"rr rprrBrm) r+rrrrr?r5 test_exprinstring_slice last_exproffsetpbes r-rHzPrecededBy.parseImpl&sA : T\!!$XsDK@@@$,&EY%%h66FAss IKK/I%c!S4<-?&@&@3&FGN&xdkBBI3sDL1,<#=#=#ABB &--&N(;(;f(DFAs E*$$$ #IIIIII$  Cxs )C55 D ?DD r))rT) r2r7r8rGrrrrrrr.rHrrs@r-rrs<PTRR-,-R8>8LRRRRRR2r/rceZdZdZddZdS)Locateda Decorates a returned token with its starting and ending locations in the input string. This helper adds the following results names: - ``locn_start`` - location where matched expression begins - ``locn_end`` - location where matched expression ends - ``value`` - the actual parsed results Be careful if the input text contains ```` characters, you may want to call :class:`ParserElement.parse_with_tabs` Example:: wd = Word(alphas) for match in Located(wd).search_string("ljsdf123lksdjjf123lkkjj1222"): print(match) prints:: [0, ['ljsdf'], 5] [8, ['lksdjjf'], 15] [18, ['lkkjj'], 23] Tc|}|j|||d\}}t|||g}||d<||d<||d<|jr||gfS||fS)NFr locn_startrrlocn_end)rr"r r)r+rrrrr[r]s r-rHzLocated.parseImpl\s~i&&x PU&VV V!5&#"677 #( < $ 7!$ :   # $ $ ? "r/Nr)r2r7r8rGrHr9r/r-rr@s26 # # # # # #r/rcFeZdZdZdeeefffd ZddZdZ xZ S)ra Lookahead to disallow matching with the given parse expression. ``NotAny`` does *not* advance the parsing position within the input string, it only verifies that the specified parse expression does *not* match at the current position. Also, ``NotAny`` does *not* skip over leading whitespace. ``NotAny`` always returns a null token list. May be constructed using the ``'~'`` operator. Example:: AND, OR, NOT = map(CaselessKeyword, "AND OR NOT".split()) # take care not to mistake keywords for identifiers ident = ~(AND | OR | NOT) + Word(alphas) boolean_term = Opt(NOT) + ident # very crude boolean expression - to support parenthesis groups and # operation hierarchy, use infix_notation boolean_expr = boolean_term + ((AND | OR) + boolean_term)[...] # integers that are followed by "." are actually floats integer = Word(nums) + ~Char(".") rct|d|_d|_dt |jz|_dS)NFTzFound unwanted token, )rr.rrrrrrs r-r.zNotAny.__init__sE $".TY? r/Tcn|j||rt|||j||gfSr))rrerrrGs r-rHzNotAny.parseImpls< 9 # #Hc 2 2 C 3 TBB BBwr/c6dt|jzdzS)Nz~{rrrrs r-rzNotAny._generateDefaultNamesc$)nn$s**r/r) r2r7r8rGrrrr.rHrrrs@r-rrjs0@U=##56@@@@@@ +++++++r/rc eZdZ d dddedejeeefdejeeefffdZdefdZ dd Z dfd Z xZ S)rfNstopOnrstop_onrct||p|}d|_|}t|tr||}||dSr$)rr.rrSr#rr)r+rrrenderrs r-r.z_MultipleMatch.__init__sp "7 eX & & 4,,U33E Er/rXcrt|tr||}||nd|_|Sr))rSr#r not_ender)r+rs r-rz_MultipleMatch.stopOns> eX & & 4,,U33E#(#4%$ r/Tct|jj}|j}|jdu}|r |jj}|r |||||||\}} |j } |r |||| r |||} n|} ||| |\}} | s| r|| z }K#ttf$rYnwxYw||fSr)) rr"r?rrrrrrQ) r+rrrself_expr_parseself_skip_ignorables check_ender try_not_enderr[hasIgnoreExprsr tmptokenss r-rHz_MultipleMatch.parseImpls-)*#3nD0  4 N3M  ) M(C ( ( (%ohY?? V %)%5!55N (1!M(C000!!11(C@@FF F!069!M!MY( 1 1 3 3(i'F ( +    D F{s ABB32B3Fc tjrtj|jvr|jg|jzD]t}t |tr]|jrVtj|jvrCtj d d|t|j |jdut||Sr)rOr`rjrrr&rSrrrrSrrr2rrrs r-rz_MultipleMatch._setResultsNames  > E*++i[49#4#4#6#66  q-00 $M/00MEEKVG  JJ/M FF $%    ww&&t^<<B    }c'9!:;  mS&8 9:      } :==========r/rfceZdZdZdZdS)rar Repetition of one or more of the given expression. Parameters: - expr - expression that must match one or more times - stop_on - (default= ``None``) - expression for a terminating sentinel (only required if the sentinel would ordinarily match the repetition expression) Example:: data_word = Word(alphas) label = data_word + FollowedBy(':') attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).set_parse_action(' '.join)) text = "shape: SQUARE posn: upper left color: BLACK" attr_expr[1, ...].parse_string(text).pprint() # Fail! read 'color' as data instead of next label -> [['shape', 'SQUARE color']] # use stop_on attribute for OneOrMore to avoid reading label string as part of the data attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) OneOrMore(attr_expr).parse_string(text).pprint() # Better -> [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'BLACK']] # could also be written as (attr_expr * (1,)).parse_string(text).pprint() c6dt|jzdzS)Nrz}...rrs r-rzOneOrMore._generateDefaultNameS^^#f,,r/N)r2r7r8rGrr9r/r-rrs-4-----r/rc eZdZdZ d dddedejeeefdejeeefffdZ d fd Z d Z xZ S) rao Optional repetition of zero or more of the given expression. Parameters: - ``expr`` - expression that must match zero or more times - ``stop_on`` - expression for a terminating sentinel (only required if the sentinel would ordinarily match the repetition expression) - (default= ``None``) Example: similar to :class:`OneOrMore` Nrrrrc`t||p|d|_dS)NrTr)r+rrrrs r-r.zZeroOrMore.__init__s5 f&7888"r/Tc t|||S#ttf$r|t g|jfcYSwxYw)Nr)rrHrrQr rrs r-rHzZeroOrMore.parseImplsj @77$$XsI>> > + @ @ @ Rd.>???? ? ? ? @s"&)AAc6dt|jzdzS)N[z]...rrs r-rzZeroOrMore._generateDefaultNamerr/r)r) r2r7r8rGrrrrrr.rHrrrs@r-rrs  ?C# >B ####}c'9!:;# mS&8 9: ######@@@@@@ -------r/rceZdZdZdZdS) _NullTokencdSrr9rs r-__bool__z_NullToken.__bool__$sur/cdSrBr9rs r-r z_NullToken.__str__'srr/N)r2r7r8rr r9r/r-rr#s2r/rcbeZdZdZeZefdeeefde ffd Z ddZ dZ xZ S) raN Optional matching of the given expression. Parameters: - ``expr`` - expression that must match zero or more times - ``default`` (optional) - value to be returned if the optional expression is not found. Example:: # US postal code can be a 5-digit zip, plus optional 4-digit qualifier zip = Combine(Word(nums, exact=5) + Opt('-' + Word(nums, exact=4))) zip.run_tests(''' # traditional ZIP code 12345 # ZIP+4 form 12101-0001 # invalid ZIP 98765- ''') prints:: # traditional ZIP code 12345 ['12345'] # ZIP+4 form 12101-0001 ['12101-0001'] # invalid ZIP 98765- ^ FAIL: Expected end of text (at char 5), (line:1, col:6) rdefaultct|d|jj|_||_d|_dS)NFrT)rr.rr defaultValuer)r+rrrs r-r.z Opt.__init__TsD ...).#"r/Tc|j} ||||d\}}nO#ttf$r;|j}||jur&|jrt|g}|||j<n|g}ng}YnwxYw||fS)NFr)rr"rrQr_Opt__optionalNotMatchedrr )r+rrr self_exprr[ default_values r-rHz Opt.parseImpl\sI  #**8S)RW*XXKC +    -MD$===(-)=/::F4AF9011+_FF F{s&A A21A2ct|j}t|dkr[|ddt|dz dkr<|dd}t|dkr|ddt|dz dkt||p|}||_d|_d|_||_d|_t|tr| ||_ n||_ dt|j z|_ dS)NTFzNo match found for )rr. ignoreExprrr includeMatchrrSr#rr rrr)r+rrr rr rs r-r.zSkipTo.__init__s "7 ""# fh ' ' !226::DKK DK+c$)nn< r/Tc|}t|}|jj}|j |jjnd}|j |jjnd}|} | |krd| ||| rnl| ||| } n#t$rYnwxYw ||| ddn9#ttf$r| dz } YnwxYw| |kdt|||j || }|||} t| } |j r||||d\}} | | z } || fS)NrF)rrr) rBrr"r rrrrmrrQrr r) r+rrrrrCrself_failOn_canParseNextself_ignoreExpr_tryParsetmplocskiptext skipresultrs r-rHzSkipTo.parseImplsx==)*(, (?DK $ $T !)-(CDO $ $ !  '3++Hf=='3!9!9(F!K!K-  &EPUVVVV  #J/   !  !  2!3 TBB BHSL)!(++   &xieTTTHC # JJs$# A00 A=<A=BB+*B+)FNNr) r2r7r8rGrrrrrrr.rHrrs@r-rrws::~>B =-1===]C'(== = }c'9!:; =mS()======,00000000r/rceZdZdZddejeeefffd Z dZ dZ fdZ dZ dfd Zdd ed efd Zdd ed efdZd efdZdddZdZd effd Zdfd ZeZeZxZS)rfaw Forward declaration of an expression to be defined later - used for recursive grammars, such as algebraic infix notation. When the expression is known, it is assigned to the ``Forward`` variable using the ``'<<'`` operator. Note: take care when assigning to ``Forward`` not to overlook precedence of operators. Specifically, ``'|'`` has a lower precedence than ``'<<'``, so that:: fwd_expr << a | b | c will actually be evaluated as:: (fwd_expr << a) | b | c thereby leaving b and c out as parseable alternatives. It is recommended that you explicitly group the values inserted into the ``Forward``:: fwd_expr << (a | b | c) Converting to use the ``'<<='`` operator instead will avoid this problem. See :class:`ParseResults.pprint` for an example of a recursive parser created using ``Forward``. Nrctjdd|_t|dd|_dS)NrkrrFr)rr caller_framerr. lshift_liners r-r.zForward.__init__sI%3!<<> >( )/ Q/ Q 0D- Q(,S$ -A(B%+k955&%%!1!1!3!33/ Q/ Q/ Q/ Q/ Q/ Q/ Q/ Q' Q' Q' Qd+u-!G" #'Ld8#)d8n 3$(NDMQ@,1GG,=,=hU,S,S))@@@%i;;"!,4i @ (**$@FJ']R1HkDN $XW #+[-=-=-?-?#???I/ Q/ Q/ Q/ Q/ Q/ Q/ Q/ QJ!N')9)9999M/ Q/ Q/ Q/ Q/ Q/ Q/ Q/ QR%&&050A0A(CQU0V0VW #1&&&BI1 MXg %&@G?PP+)d8n5Q' Q/ Q/ Q/ Q/ Q/ Q/ Q/ Q/ Q/ Q/ Qs I5:DAI2 &FI2$F.+I2-F..7I2%I53I2 I5I2&II2 I  II  I22I55I9<I9rrXcd|_|Srrrs r-rzForward.leave_whitespaces# r/cd|_|Sr$rrs r-rzForward.ignore_whitespaces" r/cb|js'd|_|j|j|Sr$)rrrrs r-rzForward.streamlines6 '#D y$ $$&&& r/c|g}||vr/|dd|gz}|j|j||gdSr)rrs r-r/zForward.validatese  M } $ $"dV+Cy$ ""3''' R     r/cd|_d} |jt|jdd}nd}|jjdz|zS#|jjdz|zccYSxYw)Nz: ...riNonez: )rrrrr2)r+ retStrings r-rzForward._generateDefaultNamesz#  >y$ NN5D51 " >*T1I= =4>*T1I= = = = = = = = =s &AAc||j tSt}||z}|Sr))rrr rfrs r-r z Forward.copys4 9 77<<>> !))C DLCJr/Fc tjrWtj|jvrD|j=t jdd|t|j dt ||S)NzO{}: setting results name {!r} on {} expression that has no contained expressionrar$r) rOrarjrrrrSrrr2rr)r+rUrrs r-rzForward._setResultsNames  3 :*++y  77=v8$T @S88 ! ww&&t-=>>>r/r)rr^r~)r2r7r8rGrrrrrr.rr!rr(rHrrrrr/rr rrrrrs@r-rfrfs8  foeM34F.GH      "        ]Q]Q]Q]Q]Q]Q~$-4=M!!!!! > > >m??????")&OOOOOr/rfc:eZdZdZddeeefffd ZxZS)TokenConverterzW Abstract subclass of :class:`ParseExpression`, for converting parsed results. FrcXt|d|_dSr)rr.rrs r-r.zTokenConverter.__init__s& r/r~) r2r7r8rGrrrr.rrs@r-rArAs]  U=##56          r/rAc leZdZdZ ddddededed ejeffd Z d effd Z d Z xZ S)CombineaConverter to concatenate all matching tokens to a single string. By default, the matching patterns must also be contiguous in the input string; this can be disabled by specifying ``'adjacent=False'`` in the constructor. Example:: real = Word(nums) + '.' + Word(nums) print(real.parse_string('3.1416')) # -> ['3', '.', '1416'] # will also erroneously match the following print(real.parse_string('3. 1416')) # -> ['3', '.', '1416'] real = Combine(Word(nums) + '.' + Word(nums)) print(real.parse_string('3.1416')) # -> ['3.1416'] # no match when there are internal spaces print(real.parse_string('3. 1416')) # -> Exception: Expected W:(0123...) r~TN) joinStringr join_stringadjacentrEct|||n|}|r|||_d|_||_d|_dSr$)rr.rrGrrEr)r+rrFrGrErs r-r.zCombine.__init__si #-#9ZZ{  $  ! ! # # #  "$ r/rXc|jrt||n!t||Sr))rGrr rrs r-r zCombine.ignore"sA = "  u - - - - GGNN5 ! ! ! r/c|}|dd=|td||jg|jz }|jr|r|gS|S)Nr~)rP)r r r _asStringListrErrr)r+rrrKretTokss r-rLzCombine.postParse)s.."" AAAJ< WWY,,T_== > > ?tGX        1 1 9 Nr/)r~T) r2r7r8rGrrrrrr.r rLrrs@r-rDrDs* ! ,0 !!!!! ! OC( !!!!!!$}       r/rDc4eZdZdZddedeffd ZdZxZS)raConverter to return the matched tokens as a list - useful for returning tokens of :class:`ZeroOrMore` and :class:`OneOrMore` expressions. The optional ``aslist`` argument when set to True will return the parsed tokens as a Python list instead of a pyparsing ParseResults. Example:: ident = Word(alphas) num = Word(nums) term = ident | num func = ident + Opt(delimited_list(term)) print(func.parse_string("fn a, b, 100")) # -> ['fn', 'a', 'b', '100'] func = ident + Group(Opt(delimited_list(term))) print(func.parse_string("fn a, b, 100")) # -> ['fn', ['a', 'b', '100']] Fraslistcft|d|_||_dSr$)rr.r _asPythonList)r+rrNrs r-r.zGroup.__init__K0 #r/c|jrJtjt|tr|nt |S|gSr))rPr r rSrOrrJs r-rLzGroup.postParsePsX   $i66%   """)__  ; r/r~ r2r7r8rGrrr.rLrrs@r-rr6si($$]$D$$$$$$ r/rc4eZdZdZddedeffd ZdZxZS)rarConverter to return a repetitive expression as a list, but also as a dictionary. Each element can also be referenced using the first token in the expression as its key. Useful for tabular report scraping when the first column can be used as a item key. The optional ``asdict`` argument when set to True will return the parsed tokens as a Python dict instead of a pyparsing ParseResults. Example:: data_word = Word(alphas) label = data_word + FollowedBy(':') text = "shape: SQUARE posn: upper left color: light blue texture: burlap" attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) # print attributes as plain groups print(attr_expr[1, ...].parse_string(text).dump()) # instead of OneOrMore(expr), parse using Dict(Group(expr)[1, ...]) - Dict will auto-assign names result = Dict(Group(attr_expr)[1, ...]).parse_string(text) print(result.dump()) # access named fields as dict entries, or output as dict print(result['shape']) print(result.as_dict()) prints:: ['shape', 'SQUARE', 'posn', 'upper left', 'color', 'light blue', 'texture', 'burlap'] [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']] - color: 'light blue' - posn: 'upper left' - shape: 'SQUARE' - texture: 'burlap' SQUARE {'color': 'light blue', 'posn': 'upper left', 'texture': 'burlap', 'shape': 'SQUARE'} See more examples at :class:`ParseResults` of accessing fields by results name. Frasdictcft|d|_||_dSr$)rr.r _asPythonDict)r+rrUrs r-r.z Dict.__init__rQr/c~t|D]j\}}t|dkr|d}t|tr!t |}t|dkrt d|||<t|dkr5t|dtst |d|||< |}n #t$rtd}|dwxYw|d=t|dks)t|tr)| rt ||||<Qt |d|||<l|j r0|j r|gn|S|j r|gn|S)Nrrr~rkzdcould not extract dict values from parsed results - Dict expression must contain Grouped expressions)rrBrSrrrZr!r r rRrrrWras_dict) r+rrrKr|tokikey dictvaluers r-rLzDict.postParses ** O OFAs3xx1}}q6D$$$ )4yy((3xx1}}"9"a"@"@ $SQz#a&,'G'G"9#a&!"D"D $( # II (((#NC4' (aLy>>Q&&y,77'i&K&KIdOO&=ilA&N&NIdOO   B,0,<UI%%''(()BSBSBUBU U"&"2AI;; As C--D r~rSrs@r-rr[sq''R$$]$D$$$$$$ %B%B%B%B%B%B%Br/rcheZdZdZd deeefdeffd Zd fd Z d fd Z d Z defd Z xZ S)raConverter for ignoring the results of a parsed expression. Example:: source = "a, b, c,d" wd = Word(alphas) wd_list1 = wd + (',' + wd)[...] print(wd_list1.parse_string(source)) # often, delimiters that are useful during parsing are just in the # way afterward - use Suppress to keep them out of the parsed output wd_list2 = wd + (Suppress(',') + wd)[...] print(wd_list2.parse_string(source)) # Skipped text (using '...') can be suppressed as well source = "lead in START relevant text END trailing text" start_marker = Keyword("START") end_marker = Keyword("END") find_body = Suppress(...) + start_marker + ... + end_marker print(find_body.parse_string(source) prints:: ['a', ',', 'b', ',', 'c', ',', 'd'] ['a', 'b', 'c', 'd'] ['START', 'relevant text ', 'END'] (See also :class:`delimited_list`.) Frrc|durtt}t|dS)N.)rrrr.rs r-r.zSuppress.__init__s; 3;; **D r/rXrct|jtrtt ||zSt |Sr))rSrrrrrrrs r-rzSuppress.__add__F di . . *F5MM**U2 277??5)) )r/ct|jtrtt ||z St |Sr))rSrrrrrrrs r-rzSuppress.__sub__r`r/cgSr)r9rJs r-rLzSuppress.postParser'r/c|Sr)r9rs r-rzSuppress.suppresss r/r~r)r2r7r8rGrrrrr.rrrLrrrs@r-rrs<U=##56$ ****** ****** -r/rr:cHtfd}j|_|S)asDecorator for debugging parse actions. When the parse action is called, this decorator will print ``">> entering method-name(line:, , )"``. When the parse action completes, the decorator will print ``"<<"`` followed by the returned value, or any exception that the parse action raised. Example:: wd = Word(alphas) @trace_parse_action def remove_duplicate_chars(tokens): return ''.join(sorted(set(''.join(tokens)))) wds = wd[1, ...].set_parse_action(remove_duplicate_chars) print(wds.parse_string("slkdjs sld sldd sdlf sdljf")) prints:: >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {})) <>entering {}(line: {!r}, {}, {!r}) z<.zs :+1a v;;??ay*3c9HDH  3 : :8T!QZZQRTU V V    !V*CC    J  =DDXsSS T T T   5< "0123456789" srange("[a-z]") -> "abcdefghijklmnopqrstuvwxyz" srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_" The input string must be enclosed in []'s, and the returned string is the expanded character set joined into a single string. The values enclosed in the []'s may be: - a single character - an escaped character with a leading backslash (such as ``\-`` or ``\]``) - an escaped hex character with a leading ``'\x'`` (``\x21``, which is a ``'!'`` character) (``\0x##`` is also supported for backwards compatibility) - an escaped octal character with a leading ``'\0'`` (``\041``, which is a ``'!'`` character) - a range of any of the above, separated by a dash (``'a-z'``, etc.) - any combination of the above (``'aeiouy'``, ``'a-zA-Z0-9_$'``, etc.) c t|ts|nUddtt |dt |ddzDS)Nr~c34K|]}t|VdSr))rtrs r-r*z+srange....Qs(EESVVEEEEEEr/rr)rSr rrpord)ps r-rzsrange..Os^!\**F!! WWEEU3qt99c!A$ii!m%D%DEEE E Er/r~c3.K|]}|VdSr)r9)rCpart _expandeds r-r*zsrange..Ts+WW4yyWWWWWWr/)r_reBracketExprrrxrR)rrs @r-sranger4ss6 F F wwWWWW>3N3Nq3Q3Q3VWWWWWW rrs=A AAclfd}tdtdj}||_|S)a^Helper to define a parse action by mapping a function to all elements of a :class:`ParseResults` list. If any additional args are passed, they are forwarded to the given function as additional arguments after the token, as in ``hex_integer = Word(hexnums).set_parse_action(token_map(int, 16))``, which will convert the parsed data to an integer using base 16. Example (compare the last to example in :class:`ParserElement.transform_string`:: hex_ints = Word(hexnums)[1, ...].set_parse_action(token_map(int, 16)) hex_ints.run_tests(''' 00 11 22 aa FF 0a 0d 1a ''') upperword = Word(alphas).set_parse_action(token_map(str.upper)) upperword[1, ...].run_tests(''' my kingdom for a horse ''') wd = Word(alphas).set_parse_action(token_map(str.title)) wd[1, ...].set_parse_action(' '.join).run_tests(''' now is the winter of our discontent made glorious summer by this sun of york ''') prints:: 00 11 22 aa FF 0a 0d 1a [0, 17, 34, 170, 255, 10, 13, 26] my kingdom for a horse ['MY', 'KINGDOM', 'FOR', 'A', 'HORSE'] now is the winter of our discontent made glorious summer by this sun of york ['Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York'] c"fd|DS)Nc"g|] }|gR Sr9r9)rCtoknrr,s r-rEz)token_map..pa..s+000dT!D!!!000r/r9)rrrrr,s r-rztoken_map..pa~s 00000a0000r/r2r)rr2)r,rrrs`` r- token_maprYsOJ111111j'$ *D*D*MNNIBK Ir/ctjjjD]6\}}t |t r|js||7dS)zy Utility to simplify mass-naming of parser elements, for generating railroad diagram with named subdiagrams. N) r^ _getframef_backf_localsrGrSrrr)rUvars r-autoname_elementsrsg ]__+4::<< c c= ) ) #.  LL   r/z4"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*"z string enclosed in double quotesz4'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*'z string enclosed in single quotesz*quotedString using single or double quotesuzunicode string literalz#[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]z[\0xa1-\0xbf\0xd7\0xf7]c<g|]}t|t|Sr9)rSr)rCrJs r-rErEs7''' *Q ">">''''r/rr^)r$rr~)osrrrrrrrr r r r abcr renumrrr rrr^collections.abcrrtypesoperatorr functoolsr threadingrpathlibrutilrrrrrrrrrrr exceptionsactionsrr r!unicoder"maxsizerrbytesr#rr version_infor&r;rOrjrsrvr]rrr warnoptionsenvironr/sumrBrr+rrrrr.rr r GeneratorTyperrrrrRrrrrascii_uppercaseascii_lowercasealphasLatin1 identcharsidentbodycharsnumshexnumsrr printablerr StackSummaryrrrrrrrrrrrr]rrrrrrrrr0r4rWr{rrrrrrrrrrrrrrrrrrrrrrrfrrrrrrfrArDrrrrlrrmrnrorprqr2 _escapedPunc_escapedHexChar_escapedOctChar _singleChar _charRangerrrrrdbl_quoted_stringsgl_quoted_stringrbunicode_string alphas8bitpunc8bitr>valuesrtokenMapconditionAsParseActionnullDebugActionsglQuotedStringdblQuotedString quotedString unicodeString lineStartlineEnd stringStart stringEndtraceParseActionr9r/r-rs                         $#######  $$$$$$                       ::::::::&&&&&& ;!5\%c )))4v))))))).~,*****$***B$;$4$$$$%K%D%%%%####!?3/?Es?S "ORZ^^$@AA     $ RW l^S ! c< # %& c3 %s *+-  RX l^T !" c< $ &' c3 %t +,. CoyA4GHS#=tCD#sO\48$> c?It Ld RS  &"8 8  % 0 ")8   TM WWPP!1PPP Q Q 04y-4449999z,?,?,?,?,? ,?,?,?^CCCCCmCCC.-"CCCCC CCC( 4m6^'^'^'^'^'m^'^'^'BW!W!W!W!W!/W!W!W!tX=X=X=X=X=X=X=X=vl=l=l=l=l=l=l=l=^dBdBdBdBdB?dBdBdBNZ'Z'Z'Z'Z'-Z'Z'Z'z= = = = = '= = = @;;;;;';;;*;;;;;%;;;B!!!!!$!!!HNNNNN$NNNb'#'#'#'#'#!'#'#'#T(+(+(+(+(+ (+(+(+VK=K=K=K=K=(K=K=K=\-------->--------BF!F!F!F!F! F!F!F!R CCCCC CCCLs's's's's'!s's's'l     (   66666n666r"""""N"""JTBTBTBTBTB>TBTBTBn44444~444n, +, +, , , , ` !! Y[[ ! !, / / 799  j ) ){}}%%n55 Y[[ ! !, / / tG.a888II %/00AA55% %%66))?"_4zz%q7Q7Q7QQ U;#.< = =  GCLL c#hh))* eIIj;. / /00AA&IIJ  "c"c""""J+k++++\G E ABBSH ( -..G E ABBSH ( -.. E ABBSH e CDDsJK ( 788 }1133344==>VWWV: ; ; 6, - -''tvv}}''']# 2###     %r/PK|5Z )!)!ULib/site-packages/pkg_resources/_vendor/pyparsing/__pycache__/actions.cpython-311.pycnuW+A ^;dddlmZddlmZGddZdZdZdZdZe e_ d d Z eZ eZ eZe ZeZd S) )ParseException)colc$eZdZdZdZdZdZdS)OnlyOncezI Wrapper for parse actions, to ensure they are only called once. c@ddlm}|||_d|_dS)Nr) _trim_arityF)corercallablecalled)self method_callrs vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/pyparsing/actions.py__init__zOnlyOnce.__init__ s0%%%%%%# K00  cr|js ||||}d|_|St||d)NTz.OnlyOnce obj called multiple times w/out reset)r r r)r sltresultss r__call__zOnlyOnce.__call__s@{ mmAq!,,GDKNQ#STTTrcd|_dS)zK Allow the associated parse action to be called once more. FN)r )r s rresetzOnlyOnce.resets  rN)__name__ __module__ __qualname____doc__rrrrrrrsN UUUrrcfd}|S)zt Helper method for defining parse actions that require matching at a specific column in the input text. cxt||kr$t||ddS)Nzmatched token not at column {})rrformat)strglocntoksns r verify_colz%match_only_at_col..verify_col's@ tT??a   t-M-T-TUV-W-WXX X rr)r$r%s` rmatch_only_at_colr&!s) YYYYY rcfdS)a Helper method for common parse actions that simply return a literal value. Especially useful when used with :class:`transform_string` (). Example:: num = Word(nums).set_parse_action(lambda toks: int(toks[0])) na = one_of("N/A NA").set_parse_action(replace_with(math.nan)) term = na | num term[1, ...].parse_string("324 234 N/A 234") # -> [324, 234, nan, 234] c gS)Nr)rrrrepl_strs rzreplace_with..<s H:rr)r)s`r replace_withr+.s & % % %%rc"|dddS)a# Helper parse action for removing quotation marks from parsed quoted strings. Example:: # by default, quotation marks are included in parsed results quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["'Now is the Winter of our Discontent'"] # use remove_quotes to strip quotation marks from parsed results quoted_string.set_parse_action(remove_quotes) quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["Now is the Winter of our Discontent"] rr)rrrs r remove_quotesr/?s Q4":rcl|r |ddn|dDfd}|S)aK Helper to create a validating parse action to be used with start tags created with :class:`make_xml_tags` or :class:`make_html_tags`. Use ``with_attribute`` to qualify a starting tag with a required attribute value, to avoid false matches on common tags such as ```` or ``
``. Call ``with_attribute`` with a series of attribute names and values. Specify the list of filter attributes names and values as: - keyword arguments, as in ``(align="right")``, or - as an explicit dict with ``**`` operator, when an attribute name is also a Python reserved word, as in ``**{"class":"Customer", "align":"right"}`` - a list of name-value tuples, as in ``(("ns1:class", "Customer"), ("ns2:align", "right"))`` For attribute names with a namespace prefix, you must use the second form. Attribute names are matched insensitive to upper/lower case. If just testing for ``class`` (with or without a namespace), use :class:`with_class`. To verify that the attribute exists, but without specifying a value, pass ``with_attribute.ANY_VALUE`` as the value. Example:: html = '''
Some text
1 4 0 1 0
1,3 2,3 1,1
this has no type
''' div,div_end = make_html_tags("div") # only match div tag having a type attribute with value "grid" div_grid = div().set_parse_action(with_attribute(type="grid")) grid_expr = div_grid + SkipTo(div | div_end)("body") for grid_header in grid_expr.search_string(html): print(grid_header.body) # construct a match with any div tag having a type attribute, regardless of the value div_any_type = div().set_parse_action(with_attribute(type=with_attribute.ANY_VALUE)) div_expr = div_any_type + SkipTo(div | div_end)("body") for div_header in div_expr.search_string(html): print(div_header.body) prints:: 1 4 0 1 0 1 4 0 1 0 1,3 2,3 1,1 Ncg|] \}}||f Srr).0kvs r z"with_attribute..s & & &1aV & & &rc D]e\}}||vrt||d|z|tjkr8|||kr,t||d||||fdS)Nzno matching attribute z+attribute {!r} has value {!r}, must be {!r})rwith_attribute ANY_VALUEr )rrtokensattrName attrValueattrss rpazwith_attribute..pas#(   Hiv%%$Q+Ch+NOOON4449IY9V9V$AHH &"2I  r)items)args attr_dictr=r<s @rr7r7Ps_r "QQQ!! & & & & &E      IrcP|rd|nd}tdi||iS)a Simplified version of :class:`with_attribute` when matching on a div class - made difficult because ``class`` is a reserved word in Python. Example:: html = '''
Some text
1 4 0 1 0
1,3 2,3 1,1
this <div> has no class
''' div,div_end = make_html_tags("div") div_grid = div().set_parse_action(with_class("grid")) grid_expr = div_grid + SkipTo(div | div_end)("body") for grid_header in grid_expr.search_string(html): print(grid_header.body) div_any_type = div().set_parse_action(with_class(withAttribute.ANY_VALUE)) div_expr = div_any_type + SkipTo(div | div_end)("body") for div_header in div_expr.search_string(html): print(div_header.body) prints:: 1 4 0 1 0 1 4 0 1 0 1,3 2,3 1,1 z{}:classclassr)r r7) classname namespace classattrs r with_classrGs;H1:F !!),,,wI  3 3Y 2 3 33rN)rA) exceptionsrutilrrr&r+r/r7objectr8rG replaceWith removeQuotes withAttribute withClassmatchOnlyAtColrrrrPs'&&&&&4   &&&""LLL^"688%4%4%4%4R    "rPK|5ZriMLMLULib/site-packages/pkg_resources/_vendor/pyparsing/__pycache__/testing.cpython-311.pycnuW+A ^;dZ4PddlmZddlZddlmZmZmZmZmZGddZ dS))contextmanagerN) ParserElementParseExceptionKeyword__diag__ __compat__ceZdZdZGddZGddZe dd ed ej e d ej e d e d edej edej edefdZ dS)pyparsing_testzB namespace class for classes useful in writing unit tests c6eZdZdZdZdZdZdZdZdZ dS) &pyparsing_test.reset_pyparsing_contexta Context manager to be used when writing unit tests that modify pyparsing config values: - packrat parsing - bounded recursion parsing - default whitespace characters. - default keyword characters - literal string auto-conversion class - __diag__ settings Example:: with reset_pyparsing_context(): # test that literals used to construct a grammar are automatically suppressed ParserElement.inlineLiteralsUsing(Suppress) term = Word(alphas) | Word(nums) group = Group('(' + term[...] + ')') # assert that the '()' characters are not included in the parsed tokens self.assertParseAndCheckList(group, "(abc 123 def)", ['abc', '123', 'def']) # after exiting context manager, literals are converted to Literal expressions again ci|_dSN) _save_contextselfs vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/pyparsing/testing.py__init__z/pyparsing_test.reset_pyparsing_context.__init__-s!#D   ctj|jd<tj|jd<tj|jd<tj|jd<tj|jd<tjrtjj |jd<n d|jd<tj |jd<tj |jd<d tj D|jd <d tji|jd <|S) Ndefault_whitespacedefault_keyword_charsliteral_string_classverbose_stacktracepackrat_enabledpackrat_cache_size packrat_parserecursion_enabledc:i|]}|tt|S)getattrr).0names r z?pyparsing_test.reset_pyparsing_context.save..Fs1...26gh--...rrcollect_all_And_tokensr )rDEFAULT_WHITE_CHARSrrDEFAULT_KEYWORD_CHARS_literalStringClassr_packratEnabled packrat_cachesize_parse_left_recursion_enabledr _all_namesr r%rs rsavez+pyparsing_test.reset_pyparsing_context.save0s7D7XD 3 4:A:WD 6 71  & 8E7WD 3 44A4QD 0 1, @"/4"(<@"#782?2FD  /5  # ..:B:M...D z * )**K0D | ,Krctj|jdkrtj|jd|jdt_|jdt _tj|jd|jdD](\}}|r tj n tj |)dt_ |jdr tj |jdn|jd t_|jd t_|jd t _|S) NrrrrrFrrrrr )rr&rset_default_whitespace_charsrrr'inlineLiteralsUsingitemsrenabledisabler)enable_packratr,r-r r%)rr#values rrestorez.pyparsing_test.reset_pyparsing_context.restorePsE1%&:;<<:&';<04/ABV/WM ,,0,>?V,WG )  -"#9:    $1*=CCEE G G e?E?x/?FFFF,1M )!"34 K,T-?@T-UVVVV'+'9/'J $484F#5M 1150B<0PJ -Krcrt|}|j|j|Sr)typerupdate)rrets rcopyz+pyparsing_test.reset_pyparsing_context.copyqs2$t**,,C   $ $T%7 8 8 8Jrc*|Sr)r/rs r __enter__z0pyparsing_test.reset_pyparsing_context.__enter__vs99;; rc.|dSr)r8)rargss r__exit__z/pyparsing_test.reset_pyparsing_context.__exit__ys LLNNNNNrN) __name__ __module__ __qualname____doc__rr/r8r=r?rBr rrreset_pyparsing_contextr sz  0 $ $ $   @   B            rrGcVeZdZdZ d dZ d dZ d dZ d dZee dfdZ dS) &pyparsing_test.TestParseResultsAssertszk A mixin class to add parse results assertion methods to normal unittest.TestCase classes. Nc|*|||||,||||dSdS)z Unit test assertion to compare a :class:`ParseResults` object with an optional ``expected_list``, and compare any defined results names with an optional ``expected_dict``. Nmsg) assertEqualas_listas_dict)rresult expected_list expected_dictrLs rassertParseResultsEqualsz?pyparsing_test.TestParseResultsAsserts.assertParseResultsEqualssh(  0@0@c JJJ(  0@0@c JJJJJ)(rTc||d}|r"t|n!t|||||dS)z Convenience wrapper assert to test a parser element and input string, and assert that the resulting ``ParseResults.asList()`` is equal to the ``expected_list``. T) parse_all)rQrLN parse_stringprintdumprNrS)rexpr test_stringrQrLverboserPs rassertParseAndCheckListz>pyparsing_test.TestParseResultsAsserts.assertParseAndCheckListsw&&{d&CCF (fkkmm$$$$fnn&&'''  ) )& SV ) W W W W Wrc||d}|r"t|n!t|||||dS)z Convenience wrapper assert to test a parser element and input string, and assert that the resulting ``ParseResults.asDict()`` is equal to the ``expected_dict``. T)parseAll)rRrLNrV)rrZr[rRrLr\rPs rassertParseAndCheckDictz>pyparsing_test.TestParseResultsAsserts.assertParseAndCheckDictsw&&{T&BBF (fkkmm$$$$fnn&&'''  ) )& SV ) W W W W Wrc|\}}|dt||D}|D]\}}} td| Dd} td| Dd} | J|| | p|5t|tr| dddn #1swxYwYtd| Dd} td| Dd} | | fdkr||| | | p| t d |||||nd dS) ah Unit test assertion to evaluate output of ``ParserElement.runTests()``. If a list of list-dict tuples is given as the ``expected_parse_results`` argument, then these are zipped with the report tuples returned by ``runTests`` and evaluated using ``assertParseResultsEquals``. Finally, asserts that the overall ``runTests()`` success value is ``True``. :param run_tests_report: tuple(bool, [tuple(str, ParseResults or Exception)]) returned from runTests :param expected_parse_results (optional): [tuple(str, list, dict, Exception)] Nc"g|] \}}g||R Sr r )r"rptexpecteds r zOpyparsing_test.TestParseResultsAsserts.assertRunTestResults..s9%X%c$8$$rc3DK|]}t|t|VdSr) isinstancestrr"exps r zNpyparsing_test.TestParseResultsAsserts.assertRunTestResults..s1IIJsC4H4HIIIIIIIrc3nK|]0}t|tt|t,|V1dSr)rgr: issubclass Exceptionris rrkzNpyparsing_test.TestParseResultsAsserts.assertRunTestResults..s[ #)#t44:DC9S9Sr)expected_exceptionrLc3DK|]}t|t|VdSr)rglistris rrkzNpyparsing_test.TestParseResultsAsserts.assertRunTestResults..1NNS 38M8MNSNNNNNNrc3DK|]}t|t|VdSr)rgdictris rrkzNpyparsing_test.TestParseResultsAsserts.assertRunTestResults..rrrNN)rQrRrLzno validation for {!r}zfailed runTestsrK) zipnext assertRaisesrgrnrSrXformat assertTrue)rrun_tests_reportexpected_parse_resultsrLrun_test_successrun_test_resultsmergedr[rPrdfail_msgrorQrRs rassertRunTestResultsz;pyparsing_test.TestParseResultsAsserts.assertRunTestResultss82B . .%1),-=?U)V)V6<%P%P1K $IIIII4  H*.'/  **&*5!../AxSV/-- *&)<<-&, ---------------- )-NNHNNNPT)) )-NNHNNNPT)) *=9\II 99 &.;.;$,O :"":"A"A+"N"NOOOO OO S_ccBS      s;B  B$ 'B$ c#rK|||5dVddddS#1swxYwYdS)NrK)rx)rexc_typerLs rassertRaisesParseExceptionzApyparsing_test.TestParseResultsAsserts.assertRaisesParseExceptions""8"55                    s ,00)NNN)NTru) rCrDrErFrSr]r`rrrrr rrTestParseResultsAssertsrI|s  GK K K K KGK X X X XGK X X X XFJ= = = = ~ 6D$       rrNT|s start_lineend_line expand_tabseol_mark mark_spaces mark_controlreturnc |r|}dkrVtdtt ddt ddDdd iz}d nEtfd t t dd dgzD}||}|U|d krO|dkr3tddd}||}n|d |}|d}|t|}t|t|}ttd||}dkr | |dz |}n*d| d|dz |D}|sd Stt|td|D} d dzz} | dkrD| d dt t| dzdDzdz} nd } | | zd dt | dz Dzdz} | d| dz zzdz} | | zd fdt||DzdzS)u  Helpful method for debugging a parser - prints a string with line and column numbers. (Line and column numbers are 1-based.) :param s: tuple(bool, str - string to be printed with line and column numbers :param start_line: int - (optional) starting line number in s to print (default=1) :param end_line: int - (optional) ending line number in s to print (default=len(s)) :param expand_tabs: bool - (optional) expand tabs to spaces, to match the pyparsing default :param eol_mark: str - (optional) string to mark the end of lines, helps visualize trailing spaces (default="|") :param mark_spaces: str - (optional) special character to display in place of spaces :param mark_control: str - (optional) convert non-printing control characters to a placeholding character; valid values: - "unicode" - replaces control chars with Unicode symbols, such as "␍" and "␊" - any single character string - replace control characters with given string - None (default) - string is displayed as-is :return: str - input string with leading line numbers and column number headers Nunicodeci|]\}}|| Sr r )r"cus rr$z4pyparsing_test.with_line_numbers..sOOOdaQOOOrr!i$i3$i!$ci|]}|Sr r )r"rrs rr$z4pyparsing_test.with_line_numbers..sIIIQ IIIr  i $i#$) rrcg|]}|dzS)␊r r"lines rrez4pyparsing_test.with_line_numbers..'sZZZte|ZZZrrc34K|]}t|VdSr)lenrs rrkz3pyparsing_test.with_line_numbers..,s(993t99999999rcc3NK|] }dd|dzdzV!dS)z{}{}zc rdNryr"is rrkz3pyparsing_test.with_line_numbers..1sLMM(QUcM::rr c3LK|]}d|dzdzV dS)z {}r Nrrs rrkz3pyparsing_test.with_line_numbers..<sL$$a!er\22rr 1234567890c3NK|]\}}d||V dS)z {:{}d}:{}{}Nr)r"rrr lineno_widths rrkz3pyparsing_test.with_line_numbers..FsOAt$$Q dHEEr)start) expandtabsrh maketransrvrangerq translatereplacerminmax splitlinessplitjoin enumerate)rrrrrrrtbls_lines max_line_lenleadheader0header1header2rs ` ` @rwith_line_numbersz pyparsing_test.with_line_numberssn8   A  #y((mmOOc%2,,ff8M8M&N&NOOOFm$mmIIIId5B<<.@.@C5.HIII C  A  "{c'9'9i''mmF$;$;<<KK$$IIc;//  J  1vvHxQ((Q ++X66 9 $ $llnnZ!^h%>?GGZZzA~PX?X0YZZZG 23x==)) 9999999 lQ&' 2  ''"3|s':A#>#>??   GG  gg,"!4566     L=B+>)?@@4G  ii( CCC     r)NNTrNN) rCrDrErFrGr staticmethodrhtypingOptionalintboolrr rrr r s0ffffffffPoooooooob,0)- ,0-1] ] ] OC(] /#&]  ]  ] _S) ] oc*]  ] ] ] \] ] ] rr ) contextlibrrcorerrrrr r r rrrs&%%%%% | | | | | | | | | | rPK|5ZޠWULib/site-packages/pkg_resources/_vendor/pyparsing/__pycache__/results.cpython-311.pycnuW+A ^;dbUddlmZmZmZmZddlZddlmZddl m Z m Z e e fZe edfed<eddDZGd d ZGd d ZejeejedS) )MutableMappingMappingMutableSequenceIteratorN)ref)TupleAny.str_typec#K|]}|VdSN).0_s vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/pyparsing/results.py rsar c,eZdZdgZdZdZdZdZdS)_ParseResultsWithOffsettupc||f|_dSr r)selfp1p2s r__init__z _ParseResultsWithOffset.__init__s8rc|j|Sr rris r __getitem__z#_ParseResultsWithOffset.__getitem__sx{rc|jSr rrs r __getstate__z$_ParseResultsWithOffset.__getstate__s xrc |d|_dSNrr)rargss r __setstate__z$_ParseResultsWithOffset.__setstate__s7rN)__name__ __module__ __qualname__ __slots__rrr"r&r rrrr sWIrrceZdZUdZdgddfZeedfed<gdZGdd e Z d3d Z ddd d e fd Z d Ze fdZdZdefdZdefdZdefdZdefdZdefdZdZdZdZdefdZdZd4dZdZdZ dZ!dZ"d Z#d5d!Z$d5d"Z%d5d#Z&de'fd$Z(de'fd%Z)d6d&Z*de fd'Z+de,fd(Z-d5d)Z.d*Z/d7de'fd,Z0d-Z1d.Z2d/Z3d0Z4d1Z5e6d4d5d2Z7e+Z8e-Z9e/Z:dS)8 ParseResultsaStructured parse results, to provide multiple means of access to the parsed data: - as a list (``len(results)``) - by list index (``results[0], results[1]``, etc.) - by attribute (``results.`` - see :class:`ParserElement.set_results_name`) Example:: integer = Word(nums) date_str = (integer.set_results_name("year") + '/' + integer.set_results_name("month") + '/' + integer.set_results_name("day")) # equivalent form: # date_str = (integer("year") + '/' # + integer("month") + '/' # + integer("day")) # parse_string returns a ParseResults object result = date_str.parse_string("1999/12/31") def test(s, fn=repr): print("{} -> {}".format(s, fn(eval(s)))) test("list(result)") test("result[0]") test("result['month']") test("result.day") test("'month' in result") test("'minutes' in result") test("result.dump()", str) prints:: list(result) -> ['1999', '/', '12', '/', '31'] result[0] -> '1999' result['month'] -> '12' result.day -> '31' 'month' in result -> True 'minutes' in result -> False result.dump() -> ['1999', '/', '12', '/', '31'] - day: '31' - month: '12' - year: '1999' Nr . _null_values)_name_parent _all_names_modal_toklist_tokdict __weakref__ceZdZdZddZdS)ParseResults.Lista Simple wrapper class to distinguish parsed list results that should be preserved as actual Python lists, instead of being converted to :class:`ParseResults`: LBRACK, RBRACK = map(pp.Suppress, "[]") element = pp.Forward() item = ppc.integer element_list = LBRACK + pp.delimited_list(element) + RBRACK # add parse actions to convert from ParseResults to actual Python collection types def as_python_list(t): return pp.ParseResults.List(t.as_list()) element_list.add_parse_action(as_python_list) element <<= item | element_list element.run_tests(''' 100 [2,3,4] [[2, 1],3,4] [(2, 1),3,4] (2,3,4) ''', post_parse=lambda s, r: (r[0], type(r[0]))) prints: 100 (100, ) [2,3,4] ([2, 3, 4], ) [[2, 1],3,4] ([[2, 1], 3, 4], ) (Used internally by :class:`Group` when `aslist=True`.) Nc|g}t|ts:td|jt |jt|S)Nz.{} may only be constructed with a list, not {}) isinstancelist TypeErrorformatr'type__new__)cls containeds rr>zParseResults.List.__new__|sd  i.. $fS\4 ??3KLL <<$$ $rr )r'r(r)__doc__r>r rrListr7Us3$ $ L % % % % % %rrBc t|tr|St|}d|_d|_t |_|g|_n^t|ttfr:t|tj r |ddgnt||_n|g|_t|_ |Sr )r9r,objectr>r/r0setr1r3r:_generator_typerBdictr4)r?toklistnamekwargsrs rr>zParseResults.__new__s g| , , N~~c""  %% ?DMM $!8 9 9 &g|'899# ']] MM %IDM  rTc4||_| |dkr||trt|}|s|h|_||_||jvr||t tfr|g}|rl||tr&tt|j d||<n&tt|dd||<|||_dS |d||<dS#tttf$r||ur|||<YdS||_YdSwxYwdSdSdS)Nr-r)r2intstrr1r/r.r r=r,rr3KeyErrorr; IndexError)rrHrIasListmodalr9s rrzParseResults.__init__sl   z$$$ !4yy )#'&DJd///:g$'788(&iG.!z'<88%<()9::A&&T &=(44a&&T (,DJ$$$.%,QZT $i<..."$..)0DJJJJ)-DJJJJ .-   0/s C## DDDct|ttfr |j|S||jvr|j|ddSt d|j|DS)Nrcg|] }|d S)rr )rvs r z,ParseResults.__getitem__..s$D$D$DaQqT$D$D$Dr)r9rLslicer3r1r4r,rs rrzParseResults.__getitem__sn a#u & & F=# #''}Q'+A..#$D$D4=3C$D$D$DEEErc||tr<|j|t|gz|j|<|d}nh||tt fr ||j|<|}nC|j|tt|dgz|j|<|}||trt||_ dSdSr$) rr4getr:rLrWr3r,wkrefr0)rkrUr9subs r __setitem__zParseResults.__setitem__s :a0 1 1 #}00DFF;;qcADM! A$CC ZC< ( (  DM! CC#}00DFF;;'1--? DM! C :c< ( ( &++CKKK & &rc t|ttfrt|j}|j|=t|tr|dkr||z }t||dz}t t ||}||j D]<\}}|D]4}t|D]"\}\}} t|| | |kz ||<#5=dS|j |=dS)Nr) r9rLrWlenr3r:rangeindicesreverser4items enumerater) rrmylenremovedrI occurrencesjr[valuepositions r __delitem__zParseResults.__delitem__s1 a#u & & ! &&E a !S!! $q55JA!QUOO5!))E"2"2344G OO   %)]%8%8%:%:  !k A09+0F0F,,E8)@!8x!|#<** A   a   rreturnc||jvSr )r4)rr[s r __contains__zParseResults.__contains__sDM!!rc*t|jSr )r`r3r!s r__len__zParseResults.__len__s4=!!!rc"|jp|j Sr )r3r4r!s r__bool__zParseResults.__bool__s 6777rc*t|jSr iterr3r!s r__iter__zParseResults.__iter__DM"""rc<t|jdddS)NrSrur!s r __reversed__zParseResults.__reversed__sDM$$B$'(((rc*t|jSr )rvr4r!s rkeyszParseResults.keysrxrcDfdDS)Nc3(K|] }|V dSr r rr[rs rrz&ParseResults.values..s'--AQ------rr|r!s`rvalueszParseResults.valuess%--------rcDfdDS)Nc3,K|]}||fVdSr r rs rrz%ParseResults.items..s+22DG 222222rrr!s`rrdzParseResults.itemss%2222diikk2222rc*t|jS)z Since ``keys()`` returns an iterator, this method is helpful in bypassing code that looks for the existence of any defined results names.)boolr4r!s rhaskeyszParseResults.haskeyssDM"""rcR|sdg}|D]7\}}|dkr |d|f}td|t|dtst |dks |d|vr|d}||}||=|S|d}|S)a Removes and returns item at specified index (default= ``last``). Supports both ``list`` and ``dict`` semantics for ``pop()``. If passed no argument or an integer argument, it will use ``list`` semantics and pop tokens from the list of parsed tokens. If passed a non-integer argument (most likely a string), it will use ``dict`` semantics and pop the corresponding value from any defined results names. A second default return value argument is supported, just as in ``dict.pop()``. Example:: numlist = Word(nums)[...] print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321'] def remove_first(tokens): tokens.pop(0) numlist.add_parse_action(remove_first) print(numlist.parse_string("0 123 321")) # -> ['123', '321'] label = Word(alphas) patt = label("LABEL") + Word(nums)[1, ...] print(patt.parse_string("AAB 123 321").dump()) # Use pop() in a parse action to remove named result (note that corresponding value is not # removed from list form of results) def remove_LABEL(tokens): tokens.pop("LABEL") return tokens patt.add_parse_action(remove_LABEL) print(patt.parse_string("AAB 123 321").dump()) prints:: ['AAB', '123', '321'] - LABEL: 'AAB' ['AAB', '123', '321'] rSdefaultrz-pop() got an unexpected keyword argument {!r}r_)rdr;r<r9rLr`)rr%rJr[rUindexret defaultvalues rpopzParseResults.pop sP 4DLLNN  DAqI~~Q|CJJ1MM d1gs # # s4yyA~~aDGEu+CU J7L rc||vr||S|S)a^ Returns named result matching the given key, or if there is no such name, then returns the given ``default_value`` or ``None`` if no ``default_value`` is specified. Similar to ``dict.get()``. Example:: integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") result = date_str.parse_string("1999/12/31") print(result.get("year")) # -> '1999' print(result.get("hour", "not specified")) # -> 'not specified' print(result.get("hour")) # -> None r )rkey default_values rrYzParseResults.getFs$ $;;9  rc|j|||jD]7\}}t |D]"\}\}}t ||||kz||<#8dS)a; Inserts new element at location index in the list of parsed tokens. Similar to ``list.insert()``. Example:: numlist = Word(nums)[...] print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321'] # use a parse action to insert the parse location in the front of the parsed results def insert_locn(locn, tokens): tokens.insert(0, locn) numlist.add_parse_action(insert_locn) print(numlist.parse_string("0 123 321")) # -> [0, '0', '123', '321'] N)r3insertr4rdrer)rr ins_stringrIrhr[rjrks rrzParseResults.insert]s" UJ///!%!4!4!6!6   D+(1+(>(>  $$E8!88x%'78"" A   rc:|j|dS)a Add single element to end of ``ParseResults`` list of elements. Example:: numlist = Word(nums)[...] print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321'] # use a parse action to compute the sum of the parsed integers, and add it to the end def append_sum(tokens): tokens.append(sum(map(int, tokens))) numlist.add_parse_action(append_sum) print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321', 444] N)r3append)ritems rrzParseResults.appendvs  T"""""rct|tr||dS|j|dS)a Add sequence of elements to end of ``ParseResults`` list of elements. Example:: patt = Word(alphas)[1, ...] # use a parse action to append the reverse of the matched strings, to make a palindrome def make_palindrome(tokens): tokens.extend(reversed([t[::-1] for t in tokens])) return ''.join(tokens) patt.add_parse_action(make_palindrome) print(patt.parse_string("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl' N)r9r,__iadd__r3extend)ritemseqs rrzParseResults.extendsJ g| , , * MM' " " " " " M  ) ) ) ) )rcL|jdd=|jdS)z7 Clear all elements and results names. N)r3r4clearr!s rrzParseResults.clears, M!!!  rc~ ||S#t$r(|drt|YdSwxYw)N__r-)rN startswithAttributeError)rrIs r __getattr__zParseResults.__getattr__sU :    t$$ +$T***22 s  .<<c8|}||z }|Sr )copy)rotherrs r__add__zParseResults.__add__siikk u  rcp|jrt|jfd|j}fd|D}|D]?\}}|||<t |dt rt ||d_@|xj|jz c_|xj|jzc_|S)Nc|dkrn|zSr$r )aoffsets rz'ParseResults.__iadd__..sAEE&&q6zrc ng|]1\}}|D])}|t|d|df*2S)rr_)r)rr[vlistrU addoffsets rrVz)ParseResults.__iadd__..sdAu+AaD))AaD//BBCrr) r4r`r3rdr9r,rZr0r1)rr otheritemsotherdictitemsr[rUrrs @@rrzParseResults.__iadd__s > /''FAAAAI--//J *N ' / /1QadL11/#(;;AaDL '  5++ rcjt|tr|dkr|S||zSr$)r9rLr)rrs r__radd__zParseResults.__radd__s6 eS ! ! eqjj99;; 4< rcdt|j|j|S)Nz {}({!r}, {}))r<r=r'r3as_dictr!s r__repr__zParseResults.__repr__s-$$T$ZZ%8$-XXXrcVddd|jDzdzS)N[z, ctg|]5}t|trt|nt|6Sr )r9r,rMrepr)rrs rrVz(ParseResults.__str__..sG)L99FCFFFtAwwr])joinr3r!s r__str__zParseResults.__str__sH ii!]   rcg}|jD]j}|r|r||t|tr||z }H|t |k|Sr )r3rr9r, _asStringListrM)rsepoutrs rrzParseResults._asStringListsM & &D s  3$ -- &t))+++ 3t99%%%% rc$d|jDS)ax Returns the parse results as a nested list of matching tokens, all converted to strings. Example:: patt = Word(alphas)[1, ...] result = patt.parse_string("sldkj lsdkj sldkj") # even though the result prints in string-like form, it is actually a pyparsing ParseResults print(type(result), result) # -> ['sldkj', 'lsdkj', 'sldkj'] # Use as_list() to create an actual list result_list = result.as_list() print(type(result_list), result_list) # -> ['sldkj', 'lsdkj', 'sldkj'] cdg|]-}t|tr|n|.Sr )r9r,as_list)rress rrVz(ParseResults.as_list..sC   (\:: CCKKMMM   r)r3r!s rrzParseResults.as_lists%  }    rchfdtfd|DS)a Returns the named parse results as a nested dictionary. Example:: integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") result = date_str.parse_string('12/31/1999') print(type(result), repr(result)) # -> (['12', '/', '31', '/', '1999'], {'day': [('1999', 4)], 'year': [('12', 0)], 'month': [('31', 2)]}) result_dict = result.as_dict() print(type(result_dict), repr(result_dict)) # -> {'day': '1999', 'year': '12', 'month': '31'} # even though a ParseResults supports dict-like access, sometime you just need to have a dict import json print(json.dumps(result)) # -> Exception: TypeError: ... is not JSON serializable print(json.dumps(result.as_dict())) # -> {"month": "31", "day": "1999", "year": "12"} ct|tr6|r|n fd|DS|S)Nc&g|] }|Sr r )rrUto_items rrVz9ParseResults.as_dict..to_item..s!;T;T;T1GGAJJ;T;T;Tr)r9r,rr)objrs rrz%ParseResults.as_dict..to_item sO#|,, (+ Ts{{}}};T;T;T;TPS;T;T;TT rc38K|]\}}||fVdSr r )rr[rUrs rrz'ParseResults.as_dict..s3==1Q O======r)rGrd)rrs @rrzParseResults.as_dictsI*      ==== ======rct|j}|j|_|j|_|xj|jzc_|j|_|S)zG Returns a new copy of a :class:`ParseResults` object. )r,r3r4rr0r1r/)rrs rrzParseResults.copysQ4=))}))++ l  $/)J  rc|jr|jS|jr(|fd}r ||ndSt|dkrt|jdkrtt t |jdddvr3t t |jSdS)a Returns the results name for this token expression. Useful when several different expressions might match at a particular location. Example:: integer = Word(nums) ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d") house_number_expr = Suppress('#') + Word(nums, alphanums) user_data = (Group(house_number_expr)("house_number") | Group(ssn_expr)("ssn") | Group(integer)("age")) user_info = user_data[1, ...] result = user_info.parse_string("22 111-22-3333 #221B") for item in result: print(item.get_name(), ':', item[0]) prints:: age : 22 ssn : 111-22-3333 house_number : 221B cltfdjDdS)Nc3:K|]\}}|D] \}}|u |VdSr r )rr[rrUlocr\s rrz@ParseResults.get_name..find_in_parent..@sS$Au&+#As!88$8888 r)nextr4rd)r\pars`rfind_in_parentz-ParseResults.get_name..find_in_parent>sO(+ (:(:(<(< rNr_r)rrS)r/r0r`r4rrvrr|)rrrs @rget_namezParseResults.get_name s2 : :  \ ,,..C     ,/8>>$'''D 8 IINNDM""a''T$-..00112215a8GCCT]//112233 34rrctg}d}||r$|t|znd|r|rt d|D}|D]\}} |r|||d|d|z|t| trU| r0|| ||||dz|t| |t| td|Dr|} t| D]\} } t| trQ|d |d|z| |d|dzz| ||||dzk|d |d|z| |d|dzzt| fzd |S) aM Diagnostic method for listing out the contents of a :class:`ParseResults`. Accepts an optional ``indent`` argument so that this string can be embedded in a nested display of other data. Example:: integer = Word(nums) date_str = integer("year") + '/' + integer("month") + '/' + integer("day") result = date_str.parse_string('1999/12/31') print(result.dump()) prints:: ['1999', '/', '12', '/', '31'] - day: '31' - month: '12' - year: '1999'  r-c3>K|]\}}t||fVdSr )rM)rr[rUs rrz$ParseResults.dump..ns0DDtq!A{DDDDDDrz {}{}- {}: z r_)indentfull include_list_depthc3@K|]}t|tVdSr )r9r,)rvvs rrz$ParseResults.dump..s,??B:b,//??????rz {}{}[{}]: {}{}{}z %s%s[%d]: %s%s%s)rrMrrsortedrdr<r9r,dumpranyrer) rrrrrrNLrdr[rUrrs rrzParseResults.dumpSs*  <G6C ////RHHH 3 ||~~ ,DDtzz||DDDDD!,,DAq' 2JJ|226D6MANNOOO!!\22 , /JJ !+1)-1=+1A: !'!"!" JJs1vv.... 477++++??$????? &q\\EAr!"l33 188 &!% ! &!%!!4 "+1)-1=+1A: !(!"!"    1 &!% ! &!%!!4 #B     wws||rcTtj|g|Ri|dS)a% Pretty-printer for parsed results as a list, using the `pprint `_ module. Accepts additional positional or keyword args as defined for `pprint.pprint `_ . Example:: ident = Word(alphas, alphanums) num = Word(nums) func = Forward() term = ident | num | Group('(' + func + ')') func <<= ident + Group(Optional(delimited_list(term))) result = func.parse_string("fna a,b,(fnb c,d,200),100") result.pprint(width=40) prints:: ['fna', ['a', 'b', ['(', 'fnb', ['c', 'd', '200'], ')'], '100']] N)pprintr)rr%rJs rrzParseResults.pprints22  dllnn6t666v66666rc|j|j|jdur|pd|j|jffSr )r3r4rr0r1r/r!s rr"zParseResults.__getstate__sM M ""$$ D(;T\\^^Ct    rc|\|_\|_}}|_t||_|t ||_dSd|_dSr )r3r4r/rEr1rZr0)rstater inAccumNamess rr&zParseResults.__setstate__sKHME E sL$*l++ ? ::DLLLDLLLrc|j|jfSr )r3r/r!s r__getnewargs__zParseResults.__getnewargs__s}dj((rc~tt|t|zSr )dirr=r:r|r!s r__dir__zParseResults.__dir__s)4::diikk!2!222rc  d}|g}|D]P\}}t|tr||||z }5|||g|||z }Q|||g|}|S)z Helper classmethod to construct a ``ParseResults`` from a ``dict``, preserving the name-value relations as results names. If an optional ``name`` argument is given, a nested ``ParseResults`` will be returned. cp t|t|t S#t$rYdSwxYw)NF)rvr9r Exception)rs r is_iterablez+ParseResults.from_dict..is_iterablesK 5S &c84444   uu s ' 55)rI)rIrP)rdr9r from_dict)r?rrIrrr[rUs rrzParseResults.from_dicts 5 5 5c"ggKKMM ? ?DAq!W%% ?s}}QQ}///ssA3Q{{1~~>>>>  #se$'''C r)NNr )rmr,)r-)r-TTr);r'r(r)rAr.rr __annotations__r*r:rBr>r9rrr]rlrrorLrqrsrrwrzr|rrdrrrYrrrrrrrrrMrrrrrGrrrrrr"r&rr classmethodrrPasDictgetNamer rrr,r,s++Z&*2r2$6L%S/666I1%1%1%1%1%t1%1%1%f0d$:....@FFF,6 & & & &!!!.""""""""""8$8888#(####)h))))###...333##### 8 8 8 t!!!!.2###"***( &    Y#YYYY                (>>>>>:    111fNNNNNN`7778       )))333[2F FGGGrr,)collections.abcrrrrrweakrefrrZtypingrr rMbytesr r=rrFrr,registerr rrrsNNNNNNNNNNNNN !5\%c )))$2''         Y Y Y Y Y Y Y Y x %%%&&&&&rPK|5Z<<ULib/site-packages/pkg_resources/_vendor/pyparsing/__pycache__/unicode.cpython-311.pycnuW+A ^;d#*ddlZddlmZddlmZmZmZGddZeeeeefeefZ GddZ Gdd e Z e j j je j jjze j jjze j _e je _e je _e je _e je _e je _e je _e j e _e j j e j _e j je j _e j je j _ e j!e _"e j#e _$e j%e _&dS) N) filterfalse)ListTupleUnionceZdZdZdZdS)_lazyclasspropertycD||_|j|_|j|_dS)N)fn__doc____name__)selfr s vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/pyparsing/unicode.py__init__z_lazyclassproperty.__init__ sz   c"t|tdr(tfdjddDri_|jj}|jvr|j|<j|S)N_internc3HK|]}jt|dguVdS)rN)rgetattr).0 superclassclss r z-_lazyclassproperty.__get__..sJ. .  K7:y"== =. . . . . . r)typehasattrany__mro__rr r )r objrattrnames ` r__get__z_lazyclassproperty.__get__s ;s))CsI&& #. . . . !k!""o. . . + +  CK7# 3; & &$(GGCLLCK !{8$$rN)r __module__ __qualname__rr rrrrs2$$$ % % % % %rrceZdZUdZgZeed<edZedZ edZ edZ edZ edZ ed Zd S) unicode_seta A set of Unicode characters, for language-specific strings for ``alphas``, ``nums``, ``alphanums``, and ``printables``. A unicode_set is defined by a list of ranges in the Unicode character set, in a class attribute ``_ranges``. Ranges can be specified using 2-tuples or a 1-tuple, such as:: _ranges = [ (0x0020, 0x007e), (0x00a0, 0x00ff), (0x0100,), ] Ranges are left- and right-inclusive. A 1-tuple of (x,) is treated as (x, x). A unicode set can also be defined using multiple inheritance of other unicode sets:: class CJK(Chinese, Japanese, Korean): pass _rangesc g}|jD]S}|turnGt|ddD]4}|t |d|ddz5Tdt t |DS)Nr&r#rrc,g|]}t|Sr#)chrrcs r z1unicode_set._chars_for_ranges..?s1111A111r)rr%rextendrangesortedset)rretccrrs r_chars_for_rangeszunicode_set._chars_for_ranges7s+ 5 5B[  b)R00 5 5 5A2 334444 511s3xx 0 01111rcfdttj|jS)z+all non-whitespace characters in this range)joinrstrisspacer5rs r printableszunicode_set.printablesAs%ww{3;0EFFGGGrcfdttj|jS)z'all alphabetic characters in this ranger7)r8filterr9isalphar5r;s ralphaszunicode_set.alphasF%wwvck3+@AABBBrcfdttj|jS)z*all numeric digit characters in this ranger7)r8r>r9isdigitr5r;s rnumszunicode_set.numsKrArc |j|jzS)z)all alphanumeric characters in this range)r@rDr;s r alphanumszunicode_set.alphanumsPszCH$$rc dttdttj|jdzdzdzS)zVall characters in this range that are valid identifier characters, plus underscore '_'r7u:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzªµºu|ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ_)r8r0r1r>r9 isidentifierr5r;s r identcharszunicode_set.identcharsUsrww GGF3#3S5JKKLLRSUU     rc dtt|jdzdd|jDzS)zu all characters in this range that are valid identifier body characters, plus the digits 0-9 r7 0123456789c@g|]}d|z|S)rH)rIr+s rr-z.unicode_set.identbodychars..os-VVVqcAg=S=S=U=UVVVVr)r8r0r1rJr5r;s ridentbodycharszunicode_set.identbodycharscsk ww N"#ggVVC$9VVV     rN)r r!r"r r&UnicodeRangeList__annotations__rr5r<r@rDrFrJrNr#rrr%r%s*!#G """222HHHCCCCCC%%%          rr%ceZdZUdZdejfgZeed<Gdde Z Gdde Z Gdd e Z Gd d e Z Gd d e ZGdde ZGdde ZGdde ZGdde ZeZGddeeeZGdde ZGdde ZGdde ZGdde Zd S)!pyparsing_unicodezF A namespace class for defining common language unicode_sets. r&c$eZdZUdZdgZeed<dS)(pyparsing_unicode.BasicMultilingualPlanez,Unicode set for the Basic Multilingual Plane)rSir&Nr r!r"r r&rOrPr#rrBasicMultilingualPlanerUs866 % !     rrWc&eZdZUdZddgZeed<dS)pyparsing_unicode.Latin1z/Unicode set for Latin-1 Unicode Character Range)rS~)r&NrVr#rrLatin1rYs;99  % !     rr]c$eZdZUdZdgZeed<dS)pyparsing_unicode.LatinAz/Unicode set for Latin-A Unicode Character Range)ir&NrVr#rrLatinAr_899 % !     rrac$eZdZUdZdgZeed<dS)pyparsing_unicode.LatinBz/Unicode set for Latin-B Unicode Character Range)iiOr&NrVr#rrLatinBrdrbrrec&eZdZUdZgdZeed<dS)pyparsing_unicode.Greekz.Unicode set for Greek Unicode Character Ranges)#)iBiE)ipiw)izi)ii)i)ii)ii)ii)i&i*)i^)i`)ifij)ii)ii)i iE)iHiM)iPiW)iY)i[)i])i_i})ii)ii)ii)ii)ii)ii)ii)i)!)i'i')ie)i@i)i)iiE)iir&NrVr#rrGreekrgs?88$% $% $% !$ $ $ $ $ rrhc&eZdZUdZgdZeed<dS)pyparsing_unicode.Cyrillicz0Unicode set for Cyrillic Unicode Character Range))ii/)ii)i+)ix)i-i-)i@ir)iti)i.i/r&NrVr#rrCyrillicrjs?:: % % % ! rrkc&eZdZUdZgdZeed<dS)pyparsing_unicode.Chinesez/Unicode set for Chinese Unicode Character Range))i.i.)i.i.)i1i1)i4iM)Ni)ii)iim)ipi)ioio)ii)ii;)i@iH)ii֦)ii4)i@i)i i)ii)iir&NrVr#rrChineserms?99% % % !     rrocveZdZUdZgZeed<GddeZGddeZ GddeZ d S) pyparsing_unicode.Japanesez`Unicode set for Japanese Unicode Character Range, combining Kanji, Hiragana, and Katakana rangesr&c&eZdZUdZddgZeed<dS) pyparsing_unicode.Japanese.Kanjiz-Unicode set for Kanji Unicode Character Range)rni)i0i?0r&NrVr#rrKanjirss; ; ;  )G%     rrtc&eZdZUdZgdZeed<dS)#pyparsing_unicode.Japanese.Hiraganaz0Unicode set for Hiragana Unicode Character Range))iA0i0)00)i0)ip)i)iPiR)ir&NrVr#rrHiraganarvs? > >)))G%     rryc&eZdZUdZgdZeed<dS)#pyparsing_unicode.Japanese.Katakanaz1Unicode set for Katakana Unicode Character Range) )rwi0)rxi0)i1i1)i2i2)iei)i)idig)ii)ir&NrVr#rrKatakanar{s? ? ? ) ) )G%     rr|N) r r!r"r r&rOrPr%rtryr|r#rrJapaneserqsjj$&!&&&     K        {        {     rr}c&eZdZUdZgdZeed<dS)pyparsing_unicode.Hangulz7Unicode set for Hangul (Korean) Unicode Character Range))ii)i.0i/0)i11i1)i2i2)i`2i{2)i~2)i`i|)ii)ii)ii)ii)ii)ii)ii)iir&NrVr#rrHangulr s?AA% % % !     rrceZdZdZdS)pyparsing_unicode.CJKzTUnicode set for combined Chinese, Japanese, and Korean (CJK) Unicode Character RangeN)r r!r"r r#rrCJKr"s^^^^rrc&eZdZUdZddgZeed<dS)pyparsing_unicode.Thaiz,Unicode set for Thai Unicode Character Range)ii:)i?i[r&NrVr#rrThair%s;66  % !     rrc&eZdZUdZgdZeed<dS)pyparsing_unicode.Arabicz.Unicode set for Arabic Unicode Character Range))ii)ii)iir&NrVr#rrArabicr,s?88% % % !     rrc&eZdZUdZgdZeed<dS)pyparsing_unicode.Hebrewz.Unicode set for Hebrew Unicode Character Range) )ii)ii)ii)ii6)i8i<)i>)i@iA)iCiD)iFiOr&NrVr#rrHebrewr4s?88 % % % ! rrc&eZdZUdZddgZeed<dS)pyparsing_unicode.Devanagariz2Unicode set for Devanagari Unicode Character Range)i i )iir&NrVr#rr DevanagarirBs;<<  % !     rrN)r r!r"r sys maxunicoder&rOrPr%rWr]rarerhrkror}rKoreanrrrrrr#rrrRrRvs  !G                                 & & & & & & & & P      ;         +   .#####;###J        (F_____gx___     {                          [     rrR)'r itertoolsrtypingrrrrintrOr%rRr}rtr&ryr|rWBMPrالعربيةro中文rkкириллицаrhΕλληνικάrעִברִית 日本語漢字 カタカナ ひらがなr 한국어r ไทยrदेवनागरीr#rrrs !!!!!!%%%%%%%%%%%%%%%%%%(eCHouSz9:;T T T T T T T T nQ Q Q Q Q Q Q Q n$, )12 )12" *@$5#; ,4'8'A$%6%<"#4#; /8$5$>$D!*;*D*M'*;*D*M'/6/4->-I***rPK|5ZVU22XLib/site-packages/pkg_resources/_vendor/pyparsing/__pycache__/exceptions.cpython-311.pycnuW+A ^;d?# pddlZddlZddlZddlmZmZmZmZddlm Z Gdde j e j e j e je jZeejZejdezdzZGd d eZGd d eZGd deZGddeZGddeZdS)N)collinelineno_collapse_string_to_ranges)pyparsing_unicodeceZdZdS)ExceptionWordUnicodeN)__name__ __module__ __qualname__yE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/pyparsing/exceptions.pyr r sDrr z([z ]{1,16})|.ceZdZdZ ddededejefdZe dd Z e d Z e d efd Ze d efd Ze d efdZe d efdZd efdZdZdddded efdZdd efdZeZdS)ParseBaseExceptionz7base exception class for all parsing runtime exceptionsrNpstrlocmsgc||_|||_d|_n||_||_|x|_|_|||f|_dS)N)rrrparser_element parserElementargs)selfrrrelems r__init__zParseBaseException.__init__sP ;DHDIIDHDI377d03$ rcddl}ddlm}|tj}g}t |t r=||j|d|j dz zdz|d t|j ||dkr| |j|}t}t!|| dD]M\}}|d} | jd d} t | |r| jjd vrHt+| |vrZ|t+| t| } |d | j| j | n| Ct| } |d | j| j n?| j} | jd vr|d | j|dz}|snOd|S)a Method to take an exception and translate the Python internal traceback into a list of the pyparsing expressions that caused the exception to be raised. Parameters: - exc - exception raised during parsing (need not be a ParseException, in support of Python exceptions that might be raised in a parse action) - depth (default=16) - number of levels back in the stack trace to list expression and function names; if None, the full stack trace names will be listed; if 0, only the failing input line, marker, and exception string will be shown Returns a multi-line string listing the ParserElements and/or function names in the exception's stack trace. rNr) ParserElement ^z{}: {})contextr) parseImpl _parseNoCachez {}.{} - {}z{}.{})wrapperzz{} )inspectcorer sysgetrecursionlimit isinstancerappendrcolumnformattyper getinnerframes __traceback__set enumeratef_localsgetf_codeco_nameidaddr join) excdepthr(r retcallersseenifffrmf_self self_typecodes rexplain_exceptionz$ParseBaseException.explain_exception)sW" '''''' =)++E c- . . 5 JJsx JJscj1n-3 4 4 4 8??499#5s;;<<< 199,,S->,NNG55D"7E677#344  2e))&$77fm44:z)1OOO &zzT)) HHRZZ((( $V IJJ$++%0)2Df ' $V IJJw~~i.BIDVWWXXXX:D|'>>> JJt{{4<88999 Eyy~~rcF||j|j|j|jS)z internal factory method to simplify creating one type of ParseException from another - avoids having __init__ signature conflicts among subclasses )rrrr)clspes r_from_exceptionz"ParseBaseException._from_exceptionks# s27BFBFB,<===rreturnc6t|j|jS)zG Return the line of text where the exception occurred. )rrrrs rrzParseBaseException.liness DHdi(((rc6t|j|jS)zV Return the 1-based line number of text where the exception occurred. )rrrrNs rrzParseBaseException.linenozs dh ***rc6t|j|jSz] Return the 1-based column on the line of text where the exception occurred. rrrrNs rrzParseBaseException.col 48TY'''rc6t|j|jSrQrRrNs rr.zParseBaseException.columnrSrc|jr|jt|jkrd}nut|j|j}||d}n|j|j|jdz}d|zdd}nd}d|j||j|j |j S) Nz, found end of textrrz , found %rz\\\rz%{}{} (at char {}), (line:{}, col:{})) rrlen_exception_word_extractormatchgroupreplacer/rrr.)rfoundstr found_matchfounds r__str__zParseBaseException.__str__s 9 x3ty>>))08==diRR *'--a00EE IdhA&=>E(5099%FFH6== Hh$+t{   rc t|SN)strrNs r__repr__zParseBaseException.__repr__s4yyrz>!<) markerString marker_stringc||n|}|j}|jdz }|r(d|d||||df}|S)z Extracts the exception line from the input string, and marks the location of the exception with a special symbol. Nrr)rr.r;strip)rrerdline_str line_columns rmark_input_linez"ParseBaseException.mark_input_linesm )6(A}}| 9kAo  ww,;,'x 7MNH~~rc.|||S)a  Method to translate the Python internal traceback into a list of the pyparsing expressions that caused the exception to be raised. Parameters: - depth (default=16) - number of levels back in the stack trace to list expression and function names; if None, the full stack trace names will be listed; if 0, only the failing input line, marker, and exception string will be shown Returns a multi-line string listing the ParserElements and/or function names in the exception's stack trace. Example:: expr = pp.Word(pp.nums) * 3 try: expr.parse_string("123 456 A789") except pp.ParseException as pe: print(pe.explain(depth=0)) prints:: 123 456 A789 ^ ParseException: Expected W:(0-9), found 'A' (at char 8), (line:1, col:9) Note: the diagnostic output will include string representations of the expressions that failed to parse. These representations will be more helpful if you use `set_name` to give identifiable names to your expressions. Otherwise they will use the default string forms, which may be cryptic to read. Note: pyparsing's default truncation of exception tracebacks may also truncate the stack of expressions that are displayed in the ``explain`` output. To get the full listing of parser expressions, you may have to set ``ParserElement.verbose_stacktrace = True`` )rG)rr=s rexplainzParseBaseException.explainsJ%%dE222r)rNN)rra)r r r __doc__rbinttypingOptionalr staticmethodrG classmethodrKpropertyrrrr.r_rcrjrl markInputlinerrrrrsAA$(  %%%%_S ! %%%%"???\?B>>[>)c)))X) ++++X+ (S(((X( ((((X(      $      S  SV     %3%33%3%3%3%3N$MMMrrceZdZdZdS)ParseExceptionaq Exception thrown when a parse expression doesn't match the input string Example:: try: Word(nums).set_name("integer").parse_string("ABC") except ParseException as pe: print(pe) print("column: {}".format(pe.column)) prints:: Expected integer (at char 0), (line:1, col:1) column: 1 Nr r r rmrrrrvrvsrrvceZdZdZdS)ParseFatalExceptionzu User-throwable exception thrown when inconsistent parse content is found; stops all parsing immediately NrwrrrryrysrryceZdZdZdS)ParseSyntaxExceptionz Just like :class:`ParseFatalException`, but thrown internally when an :class:`ErrorStop` ('-' operator) indicates that parsing is to stop immediately because an unbacktrackable syntax error has been found. Nrwrrrr{r{srr{c$eZdZdZdZdefdZdS)RecursiveGrammarExceptionz Exception thrown by :class:`ParserElement.validate` if the grammar could be left-recursive; parser may need to enable left recursion using :class:`ParserElement.enable_left_recursion` c||_dSra)parseElementTrace)rparseElementLists rrz"RecursiveGrammarException.__init__s!1rrLc6d|jS)NzRecursiveGrammarException: {})r/rrNs rr_z!RecursiveGrammarException.__str__ s.55d6LMMMrN)r r r rmrrbr_rrrr}r}sO 222NNNNNNNrr})rer*routilrrrrunicoderppuLatin1LatinALatinBGreekCyrillicr alphanums_extract_alphanumscompilerX Exceptionrrvryr{r}rrrrs ????????????------     3:sz3:sy#,   0/0D0NOO&BJt.@'@<'OPPF$F$F$F$F$F$F$F$R'(,. N N N N N N N N N NrPK|5ZK77RLib/site-packages/pkg_resources/_vendor/pyparsing/__pycache__/util.cpython-311.pycnuW+A ^;dddlZddlZddlZddlZddlmZddlmZmZm Z e dZ GddZ edd e d ed e fd Zedd e d ed e fd Zedd e d ed efdZGddZGddZGddZGddeZded efdZ ddeee efded efdZded efdZdS)N) lru_cache)ListUnionIterable\ceZdZUdZgZeeed<gZeeed<dZ e dZ e dZ e dZ dS) __config_flagsz=Internal class for defining compatibility and debugging flags _all_names _fixed_names configurationc b||jvrctjd|j||jt t||dS||j vrt|||dStd|j|)Nz'{}.{} {} is {} and cannot be overriddenzno such {} {!r}) r warningswarnformat__name__ _type_descstrgetattrupperr setattr ValueError)clsdnamevalues sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/pyparsing/util.py_setz__config_flags._sets C$ $ $ M9@@LNU++,,2244     F CN " " C & & & & &.55cneLLMM Mc.||dS)NTrrnames rz__config_flags.$s388D$+?+?rc.||dS)NFrr s rr"z__config_flags.%sCHHT5,A,ArN)r __module__ __qualname____doc__r rr__annotations__r r classmethodrenabledisablerrr r sGGJS  L$s)    JNN[N [?? @ @FkAABBGGGrr )maxsizelocstrgreturnc|}d|cxkrt|krnn||dz dkrdn||dd|z S)a Returns current column within a string, counting newlines as line separators. The first column is number 1. Note: the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`ParserElement.parseString` for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. r )lenrfind)r.r/ss rcolr7(sc AC    #a&&     QsQwZ4%7%711S1774QRTWCXCX=XXrc6|dd|dzS)aReturns current line number within a string, counting newlines as line separators. The first line is number 1. Note - the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`ParserElement.parseString` for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. r3rr2)count)r.r/s rlinenor:9s ::dAs # #a ''rc|dd|}|d|}|dkr ||dz|n ||dzdS)zh Returns the line of text containing loc within a string, counting newlines as line separators. r3rr2N)r5find)r.r/last_crnext_crs rliner?GsZ jjq#&&Giic""G*1Q,,4! g% & &D1.getW9S,// /rc||<dSrDr+)rFrGrcaches rset_z&_UnboundedCache.__init__..set_ZsE#JJJrc0dSrDclearrFrMs rrQz'_UnboundedCache.__init__..clear] KKMMMMMr)rJobjectrIsizetypes MethodTypesetrQ)selfrJrNrQrMrHrIs @@@r__init__z_UnboundedCache.__init__RsI +1883L 0 0 0 0 0 0           #C..#D$//%eT22 rNrr$r%rZr+rrrArAQs#33333rrAceZdZdZdS) _FifoCachec8tx|_tjjfd}fd}fd}|_t j|||_t j|||_t j|||_ dS)Nc|SrDr+rEs rrJz _FifoCache.__init__..getlrKrc||<tkr+dtk)dSdSNF)last)r4popitem)rFrGrrMrUs rrNz!_FifoCache.__init__..set_osPE#Je**t## 5 )))e**t######rc0dSrDrPrRs rrQz"_FifoCache.__init__..cleartrSr) rTrI collections OrderedDictrJrUrVrWrXrQ)rYrUrJrNrQrMrHrIs ` @@@rrZz_FifoCache.__init__gs+1883L'))I  0 0 0 0 0 0 * * * * * *       #C..#D$//%eT22 rNr[r+rrr]r]fs#33333rr]c0eZdZdZdZdZdZdZdZdS)LRUMemoz A memoizing mapping that retains `capacity` deleted items The memo tracks retained items by their access order; once `capacity` items are retained, the least recently used item is discarded. cR||_i|_tj|_dSrD) _capacity_activererf_memory)rYcapacitys rrZzLRUMemo.__init__s$! ".00 rc |j|S#t$r*|j||j|cYSwxYwrD)rkKeyErrorrl move_to_endrYrGs r __getitem__zLRUMemo.__getitem__sX %<$ $ % % % L $ $S ) ) )<$ $ $ $ %s 1AAcP|j|d||j|<dSrD)rlpoprkrYrGrs r __setitem__zLRUMemo.__setitem__s, d###! Src |j|}t|j|jkr8|jdt|j|jk8||j|<dS#t $rYdSwxYwra)rkrtr4rlrjrcrorus r __delitem__zLRUMemo.__delitem__s &L$$S))Edl##t~55 $$%$000dl##t~55 %DL        DD sA== B  B cj|j|jdSrD)rkrQrl)rYs rrQz LRUMemo.clears0  rN) rr$r%r&rZrrrvrxrQr+rrrhrh}si111 %%%"""&&&rrhceZdZdZdZdS) UnboundedMemoz< A memoizing mapping that retains all deleted items cdSrDr+rqs rrxzUnboundedMemo.__delitem__s rN)rr$r%r&rxr+rrr{r{s-     rr{r6cdD] }||t|z}!|dd}|dd}t|S)Nz\^-[]r3z\n z\t)replace_bslashr)r6cs r_escape_regex_range_charsrs[ && IIa1 % % $A $A q66MrT re_escapec < fd d _tj _d _d d}|s| g}dt t|}t|dkrtj | D]\}}t|x}}tj tj t|g|d }||kr| |t#|t#|d zkrdnd }|d  || |n fd |D}d|S)Nct|}|jc_}||z dkrtj_jS)Nr2)ordprevnextcounterr)rc_intris_consecutives rrz2_collapse_string_to_ranges..is_consecutivesKA$)>+>!T 4#?#?N ##rrc|dvrd|zn|S)Nz\^-][\r+rs rescape_re_range_charz8_collapse_string_to_ranges..escape_re_range_chars==taxxa/rc|SrDr+rs rno_escape_re_range_charz;_collapse_string_to_ranges..no_escape_re_range_charsr)rGr2)maxlen-z{}{}{}c&g|] }|Sr+r+).0rrs r z._collapse_string_to_ranges..s%2221##A&&222r)r itertoolsr9rrjoinsortedrXr4groupbyrredequechainiterrtappendrr) r6rrretrFcharsfirstrbseprrs @@r_collapse_string_to_rangesrs$$$$$N&_..NN000 76 C s1vvA 1vvzz!)!@@@  HAu;; &ED$dV e44Qcee }} //667777IIUa77bbS OO,,U33S:N:Nt:T:T 3222222 773<<rllcg}|D]O}t|tr#|t|:||P|SrD) isinstancelistextend_flattenr)rris rrrsY C  a    JJx{{ # # # # JJqMMMM Jr)T)rrVrer functoolsrtypingrrrchrrr intrr7r:r?rAr]rhdictr{rboolrrrr+rrrs (((((((((( #b''CCCCCCCC8 3 YS Y Y Y Y Y Y  3 ( (3 (3 ( ( ( ( 3PcPPPPPP33333333*33333333.$$$$$$$$N     D   59++ S(3-  +-1+++++\$rPK|5ZULib/site-packages/pkg_resources/_vendor/pyparsing/__pycache__/helpers.cpython-311.pycnuW+A ^;d٘UddlZddlZddlZddlmZddlTddlmZm Z m Z  dXddd e e e fd e e e fd ed ejed ejedede fdZ dYddd e deje deje de fdZd e de fdZd e de fdZ dZdddde eje e fdededededede fdZd e d!e de fd"Z d[dd#d e d$ed%ede fd&Zd e de fd'Zd e de fd(Zd)d*defed+d,e e e fd-e e e fd.eje d/e d0e de f d1Zed2ed3fd4Zd5e e e fdee e ffd6Z d5e e e fdee e ffd7Z!e e"d8<e e"d9<e e#e$e%d:z&d;\Z'Z(d<ej)j*+DZ,e-d=d>.e,zd?z&d@Z/dAZ0GdBdCe1Z2e e e ee e e fe e e fffZ3e ee3ee2eje4fee3ee2ffZ5ed)ed*fdDe dEe6e5dFe e e fdGe e e fde f dHZ7dgfdIZ8e9e-dJdKz&dLZ: e-dM&dNZ; e-dO<&dPZ=e-dQ&dRZ> e9e-dJdKze>z&dSZ? e?Z@ e-dT&dUZA dVeBCDZDe6e e"dW<eZEeZFeZGeZHeZIeZJeZKeZLe ZMe!ZNe'e(cZOZPe/ZQe0ZRe2ZSe7ZTe:ZUe;ZVe=ZWe>ZXe?ZYe@ZZeAZ[dS)\N)__diag__)*)_bslash_flatten_escape_regex_range_chars,F)allow_trailing_delimexprdelimcombineminmaxr returnc t|trt|}dt |t ||r"dt |nd}|st|}||dkrtd|dz}||||krtd|dz}|||z||fz}|r|t|z }|r"t| |S| |S) a/Helper to define a delimited list of expressions - the delimiter defaults to ','. By default, the list elements and delimiters can have intervening whitespace, and comments, but this can be overridden by passing ``combine=True`` in the constructor. If ``combine`` is set to ``True``, the matching tokens are returned as a single token string, with the delimiters included; otherwise, the matching tokens are returned as a list of tokens, with the delimiters suppressed. If ``allow_trailing_delim`` is set to True, then the list may end with a delimiter. Example:: delimited_list(Word(alphas)).parse_string("aa,bb,cc") # -> ['aa', 'bb', 'cc'] delimited_list(Word(hexnums), delim=':', combine=True).parse_string("AA:BB:CC:DD:EE") # -> ['AA:BB:CC:DD:EE'] z{expr} [{delim} {expr}]...{end}z [{}])r r endNrzmin must be greater than 0z)max must be greater than, or equal to min) isinstancestr_type ParserElement_literalStringClassformatstrcopy streamlineSuppress ValueErrorOptCombineset_name)r r r rrr dlNamedelimited_list_exprs vE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/pyparsing/helpers.pydelimited_listr$sY4$!!70066 . 5 5 '')) * *%jj*> FGNN3u:: & & &B6F    779:: : q  ?sczzHII I q%$,S!99*s5zz)4*++44V<<<"++F333)intExprint_exprr&cb|p|}tfd}|)ttd}n|}|d||d|zdtzdzS) a~Helper to define a counted list of expressions. This helper defines a pattern of the form:: integer expr expr expr... where the leading integer tells how many expr expressions follow. The matched tokens returns the array of expr tokens as a list - the leading count token is suppressed. If ``int_expr`` is specified, it should be a pyparsing expression that produces an integer value. Example:: counted_array(Word(alphas)).parse_string('2 ab cd ef') # -> ['ab', 'cd'] # in this parser, the leading integer value is given in binary, # '10' indicating that 2 values are in the array binary_constant = Word('01').set_parse_action(lambda t: int(t[0], 2)) counted_array(Word(alphas), int_expr=binary_constant).parse_string('10 ab cd ef') # -> ['ab', 'cd'] # if other fields must be parsed after the count but before the # list items, give the fields results names and they will # be preserved in the returned ParseResults: count_with_metadata = integer + Word(alphas)("type") typed_array = counted_array(Word(alphanums), int_expr=count_with_metadata)("items") result = typed_array.parse_string("3 bool True True False") print(result.dump()) # prints # ['True', 'True', 'False'] # - items: ['True', 'True', 'False'] # - type: 'bool' cR|d}|r|zn tz|dd=dSNr)Empty)sltn array_exprr s r#count_field_parse_actionz/counted_array..count_field_parse_actionss6 aDQ3qEGG3 aaaDDDr%Nc,t|dSr*)intr.s r#zcounted_array..{sAaD r%arrayLenT)call_during_tryz(len) z...)ForwardWordnumsset_parse_actionrr add_parse_actionr)r r'r&r1r0s` @r# counted_arrayr=GsR!GJt**--.A.ABB,,.. Z    5tLLL j * *8c$ii+?%+G H HHr%ctfd}||ddt|zS)a9Helper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example:: first = Word(nums) second = match_previous_literal(first) match_expr = first + ":" + second will match ``"1:1"``, but not ``"1:2"``. Because this matches a previous literal, will also match the leading ``"1:1"`` in ``"1:10"``. If this is not desired, use :class:`match_previous_expr`. Do *not* use with packrat parsing enabled. c|r_t|dkr |dzdSt|}td|DzdSt zdS)Nrrc34K|]}t|VdSN)Literal).0tts r# zImatch_previous_literal..copy_token_to_repeater..s(77272;;777777r%)lenras_listAndr+)r,r-r.tflatreps r#copy_token_to_repeaterz6match_previous_literal..copy_token_to_repeaters{  1vv{{qt !--s77777777777 577NNNNr%T callDuringTry(prev) )r8r<r r)r rKrJs @r#match_previous_literalrOse ))C      0EEELLSYY&''' Jr%ct|}|zfd}||ddt |zS)aWHelper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example:: first = Word(nums) second = match_previous_expr(first) match_expr = first + ":" + second will match ``"1:1"``, but not ``"1:2"``. Because this matches by expressions, will *not* match the leading ``"1:1"`` in ``"1:10"``; the expressions are evaluated first, and then compared, so ``"1"`` is compared with ``"10"``. Do *not* use with packrat parsing enabled. ct|fd}|ddS)Nct|}|kr%t||d|dS)NzExpected {}, found{})rrGParseExceptionr)r,r-r. theseTokens matchTokenss r#must_match_these_tokenszTmatch_previous_expr..copy_token_to_repeater..must_match_these_tokenssU"199;;//Kk))$q077 [QQ*)r%TrL)rrGr;)r,r-r.rVrUrJs @r#rKz3match_previous_expr..copy_token_to_repeatersTqyy{{++       4DIIIIIr%TrLrN)r8rr<r r)r e2rKrJs @r#match_previous_exprrXs ))C BBJC J J J J J 0EEELLSYY&''' Jr%T)useRegex asKeywordstrscaseless use_regex as_keywordrYrZc |p|}|o|}t|tr(tjrtdd|rd}d}|rt ntnd}d}|rtntg}t|tr| }n4t|trt|}ntd|stStd |Drd } | t!|d z kr|| } t#|| d zd D]I\} } || | r || | zd z=n3|| | r!|| | zd z=|| | nJ| d z } | t!|d z k|r#|r t&jnd } t+d |Dr3ddd|D}ndd|D}|rd|}t1|| d|}|r$d|D|fd|S#t&j$rtddYnwxYwt9fd|Dd|S)a Helper to quickly define a set of alternative :class:`Literal` s, and makes sure to do longest-first testing when there is a conflict, regardless of the input order, but returns a :class:`MatchFirst` for best performance. Parameters: - ``strs`` - a string of space-delimited literals, or a collection of string literals - ``caseless`` - treat all literals as caseless - (default= ``False``) - ``use_regex`` - as an optimization, will generate a :class:`Regex` object; otherwise, will generate a :class:`MatchFirst` object (if ``caseless=True`` or ``asKeyword=True``, or if creating a :class:`Regex` raises an exception) - (default= ``True``) - ``as_keyword`` - enforce :class:`Keyword`-style matching on the generated expressions - (default= ``False``) - ``asKeyword`` and ``useRegex`` are retained for pre-PEP8 compatibility, but will be removed in a future release Example:: comp_oper = one_of("< = > <= >= !=") var = Word(alphas) number = Word(nums) term = var | number comparison_expr = term + comp_oper + term print(comparison_expr.search_string("B = 12 AA=23 B<=AA AA>12")) prints:: [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']] z`More than one string argument passed to one_of, pass choices as a list or space-delimited string) stacklevelcV||kSrA)upperabs r#r5zone_of..sqwwyyAGGII5r%ct||SrA)rc startswithrds r#r5zone_of..s$QWWYY11!''))<<r%c||kSrArds r#r5zone_of..s qAvr%c,||SrA)rhrds r#r5zone_of..sQ\\!__r%z7Invalid argument to one_of, expected string or iterablec3<K|]}t|dkVdSrNrFrCsyms r#rEzone_of..s, + +C3s88a< + + + + + +r%rrNc3<K|]}t|dkVdSrmrnros r#rEzone_of..&s,44S3s88q=444444r%z[{}]rc34K|]}t|VdSrA)rros r#rEzone_of..)s+NNs5c::NNNNNNr%|c3>K|]}tj|VdSrA)reescaperos r#rEzone_of..,s*BB3 #BBBBBBr%z \b(?:{})\b)flagsz | c8i|]}||Srjlowerros r# zone_of..7s"BBB3ciikk3BBBr%cD|dSr*ry)r,r-r. symbol_maps r#r5zone_of..8sZ! 5Mr%z8Exception creating Regex for one_of, building MatchFirstc3.K|]}|VdSrArj)rCrpparseElementClasss r#rEzone_of..Bs/@@'',,@@@@@@r%)rrr%warn_on_multiple_string_args_to_oneofwarningswarnCaselessKeywordCaselessLiteralKeywordrBsplitIterablelist TypeErrorNoMatchanyrF enumerateinsertru IGNORECASEallrjoinRegexr r<error MatchFirst)r[r\r]r^rYrZisequalmaskssymbolsicurjotherre_flagspattretrr}s @@r#one_ofrsR'ZI%IH 8X&&  :    ;    >55<</8MOOo%%,,'0=GGgG$!!S**,, D( # #St**QRRR yy + +7 + + +++  #g,,"""!*C%ga!egg&677  575#&&A *EU3&&A *NN1e,,,E Q#g,,""")18 q 44G44444 C}}GGNNgNNNNNxxBB'BBBBB 2$++D11H---66uzz'7J7JKKC OCB'BBB $$%M%M%M%MNNNJx    MMJWX        @@@@@@@ @ @ I I 7  s3C J+KKkeyvaluecZttt||zS)aHelper to easily and clearly define a dictionary by specifying the respective patterns for the key and value. Takes care of defining the :class:`Dict`, :class:`ZeroOrMore`, and :class:`Group` tokens in the proper order. The key pattern can include delimiting markers or punctuation, as long as they are suppressed, thereby leaving the significant key text. The value pattern can include named results, so that the :class:`Dict` results can include named token fields. Example:: text = "shape: SQUARE posn: upper left color: light blue texture: burlap" attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) print(attr_expr[1, ...].parse_string(text).dump()) attr_label = label attr_value = Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join) # similar to Dict, but simpler call format result = dict_of(attr_label, attr_value).parse_string(text) print(result.dump()) print(result['shape']) print(result.shape) # object attribute access works too print(result.as_dict()) prints:: [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']] - color: 'light blue' - posn: 'upper left' - shape: 'SQUARE' - texture: 'burlap' SQUARE SQUARE {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'} )Dict OneOrMoreGroup)rrs r#dict_ofrGs'J  %e ,,-- . ..r%)asString as_stringrcN|o|}td}|}d|_|d|z|dz}|rd}nd}|||j|_|t j|S)aHelper to return the original, untokenized text for a given expression. Useful to restore the parsed fields of an HTML start tag into the raw tag text itself, or to revert separate tokens with intervening whitespace back to the original matching input text. By default, returns astring containing the original parsed text. If the optional ``as_string`` argument is passed as ``False``, then the return value is a :class:`ParseResults` containing any results names that were originally matched, and a single token containing the original matched text from the input string. So if the expression passed to :class:`original_text_for` contains expressions with defined results names, you must set ``as_string`` to ``False`` if you want to preserve those results name values. The ``asString`` pre-PEP8 argument is retained for compatibility, but will be removed in a future release. Example:: src = "this is test bold text normal text " for tag in ("b", "i"): opener, closer = make_html_tags(tag) patt = original_text_for(opener + SkipTo(closer) + closer) print(patt.search_string(src)[0]) prints:: [' bold text '] ['text'] c|SrArj)r,locr.s r#r5z#original_text_for..s3r%F_original_start _original_endc*||j|jSrA)rrr,r-r.s r#r5z#original_text_for..sa(9AO(K&Lr%cr||d|dg|dd<dS)Nrrpoprs r# extractTextz&original_text_for..extractTexts9aee-..1G1GGHIAaaaDDDr%)r+r;r callPreparse ignoreExprssuppress_warning Diagnostics)warn_ungrouped_named_tokens_in_collection)r rr locMarker endlocMarker matchExprrs r#original_text_forrosD%IH(()>)>??I>>##L %L +,,t3ll?6S6SSIJLL  J J J{+++ ,I {TUUU r%cHt|dS)zkHelper to undo pyparsing's default grouping of And expressions, even if all but one are non-empty. c|dSr*rjr4s r#r5zungroup..s 1Q4r%)TokenConverterr<)r s r#ungrouprs" $   0 0 @ @@r%ctd}t|d|dz|dzS)a (DEPRECATED - future code should use the Located class) Helper to decorate a returned token with its starting and ending locations in the input string. This helper adds the following results names: - ``locn_start`` - location where matched expression begins - ``locn_end`` - location where matched expression ends - ``value`` - the actual parsed results Be careful if the input text contains ```` characters, you may want to call :class:`ParserElement.parseWithTabs` Example:: wd = Word(alphas) for match in locatedExpr(wd).searchString("ljsdf123lksdjjf123lkkjj1222"): print(match) prints:: [[0, 'ljsdf', 5]] [[8, 'lksdjjf', 15]] [[18, 'lkkjj', 23]] c|SrArj)ssllrDs r#r5zlocatedExpr..s"r% locn_startrlocn_end)r+r;rrleaveWhitespace)r locators r# locatedExprrst6gg&&'<'<==G   $w--  *',,.. ( ( * *: 6 6 7  r%()) ignoreExpropenerclosercontent ignore_exprrc ||kr|tkr|n|}||krtd|t|trt|trt |dkrt |dkr|Ut t |t||ztj zdz d}n;t t||ztj z dz}n|pt t |t|zt|zttj dz d}n{t t t|t|zttj dz d}ntd t}|F|tt!|t#||z|zzt!|zz}nB|tt!|t#||zzt!|zz}|d ||d |S) a& Helper method for defining nested lists enclosed in opening and closing delimiters (``"("`` and ``")"`` are the default). Parameters: - ``opener`` - opening character for a nested list (default= ``"("``); can also be a pyparsing expression - ``closer`` - closing character for a nested list (default= ``")"``); can also be a pyparsing expression - ``content`` - expression for items within the nested lists (default= ``None``) - ``ignore_expr`` - expression for ignoring opening and closing delimiters (default= :class:`quoted_string`) - ``ignoreExpr`` - this pre-PEP8 argument is retained for compatibility but will be removed in a future release If an expression is not provided for the content argument, the nested expression will capture all whitespace-delimited content between delimiters as a list of separate values. Use the ``ignore_expr`` argument to define expressions that may contain opening or closing characters that should not be treated as opening or closing characters for nesting, such as quoted_string or a comment expression. Specify multiple expressions using an :class:`Or` or :class:`MatchFirst`. The default is :class:`quoted_string`, but if no expressions are to be ignored, then pass ``None`` for this argument. Example:: data_type = one_of("void int short long char float double") decl_data_type = Combine(data_type + Opt(Word('*'))) ident = Word(alphas+'_', alphanums+'_') number = pyparsing_common.number arg = Group(decl_data_type + ident) LPAR, RPAR = map(Suppress, "()") code_body = nested_expr('{', '}', ignore_expr=(quoted_string | c_style_comment)) c_function = (decl_data_type("type") + ident("name") + LPAR + Opt(delimited_list(arg), [])("args") + RPAR + code_body("body")) c_function.ignore(c_style_comment) source_code = ''' int is_odd(int x) { return (x%2); } int dec_to_hex(char hchar) { if (hchar >= '0' && hchar <= '9') { return (ord(hchar)-ord('0')); } else { return (10+ord(hchar)-ord('A')); } } ''' for func in c_function.search_string(source_code): print("%(name)s (%(type)s) args: %(args)s" % func) prints:: is_odd (int) args: [['int', 'x']] dec_to_hex (int) args: [['char', 'hchar']] z.opening and closing strings cannot be the sameNr)exactc6|dSr*stripr4s r#r5znested_expr..(1r%c6|dSr*rr4s r#r5znested_expr..,rr%c6|dSr*rr4s r#r5znested_expr..6rr%c6|dSr*rr4s r#r5znested_expr..>rr%zOopening and closing arguments must be strings if no content expression is givenznested z expression) quoted_stringrrrrFrr CharsNotInrDEFAULT_WHITE_CHARSr;emptyrrBr8rr ZeroOrMorer )rrrrrrs r# nested_exprrsT[  $.-//$A$A[[z  IJJJ fh ' '% Jvx,H,H% 6{{aCKK1$4$4)%!'K( &-2S S&''&'='=>>G$jjllZ-*KK..&&'='=>>?GG)%!'K&v./&v./))JRSTTTU'&'='=>>G&!$V__,&v./()JRSTTTU '&'='=>> Ga  ))C  V  z*s*:W*DEE EQWHXHX X    hv&&C'M)B)BBXfEUEUUVVVLLLVVVVV<=== Jr%<>c t|tr|t|| }n|jt t t dz}|rt t}||dzttt|tdz|zztddgd d z|z}nt  tt t"d z}||dzttt| d ttd|zzztddgd d z|z}t%t'd|zd zd}|dz|fd|ddddzdz}|_|_t7||_||fS)zRInternal helper to construct opening and closing tag expressions, given a tag name)r\z_-:tag=/F)defaultrc|ddkSNrrrjrs r#r5z_makeTags..^! r%r) exclude_charsc6|dSr*ryr4s r#r5z_makeTags..lsqtzz||r%c|ddkSrrjrs r#r5z_makeTags..rrr%zc |ddddz|S)Nstartr: ) __setitem__rreplacetitlerr)r.resnames r#r5z_makeTags..{sY!-- bgggooc377==??EEGGHH H!&&((  r%rrrrz)rrrnamer9alphas alphanumsdbl_quoted_stringrr; remove_quotesrrrrrr printablesrrBr r<rrrrrSkipTotag_body) tagStrxml suppress_LT suppress_GT tagAttrName tagAttrValueopenTagcloseTagrs @r# _makeTagsrNs&(##c'222+vy5011K  (--//@@OO fUmm :eK(3--$?,$NOOPPQQ R(c#w'''00AA++     %))++<<]KKd cO O O   fUmm #445K5KLLhsmml:;;< (c#w'''00AA++    wt}}v-3eDDDH Vg%&&&      x S117799??AABBBhw !! GKHLhhjj))G H r%tag_strc"t|dS)aPHelper to construct opening and closing tag expressions for HTML, given a tag name. Matches tags in either upper or lower case, attributes with namespaces and with quoted or unquoted values. Example:: text = 'More info at the pyparsing wiki page' # make_html_tags returns pyparsing expressions for the opening and # closing tags as a 2-tuple a, a_end = make_html_tags("A") link_expr = a + SkipTo(a_end)("link_text") + a_end for link in link_expr.search_string(text): # attributes in the tag (like "href" shown here) are # also accessible as named results print(link.link_text, '->', link.href) prints:: pyparsing -> https://github.com/pyparsing/pyparsing/wiki Frrs r#make_html_tagsr s0 We $ $$r%c"t|dS)zHelper to construct opening and closing tag expressions for XML, given a tag name. Matches tags only in the given upper/lower case. Example: similar to :class:`make_html_tags` Trr s r# make_xml_tagsr s Wd # ##r% any_open_tag any_close_tagz_:zany tagc@i|]\}}|d|S);)rstrip)rCkvs r#r{r{s(KKKtq!!((3--KKKr%z &(?Prsz);zcommon HTML entityc@t|jS)zRHelper parser action to replace common HTML entities with their special characters)_htmlEntityMapgetentityr4s r#replace_html_entityrs   ah ' ''r%ceZdZdZdZdS)OpAssocrr`N)__name__ __module__ __qualname__LEFTRIGHTrjr%r#rrs D EEEr%r base_exprop_listlparrparc ZGddt}d|_t}t|trt |}t|trt |}t|t rt|t s|t ||z|zz}n |||z|zz}t|D]V\}}|dzdd\} } } } t| trt | } | dkrZt| ttfrt| dkrtd | \} }d | |}nd | }d | cxkrdksntd | t jt jfvrtdt|}| t jur| d kr)||| zt || dzz}n| dkrW| /||| z|zt || |zdzz}nc|||zt |dz}n=| dkr@||| z|z|z|zt |t)| |z|z|zzz}n| t jur| d krKt| t*st+| } || j|zt | |zz}n| dkrX| .||| z|zt || |zdzz}na|||zt ||dzz}n9| dkr3||| z|z|z|zt || z|z|z|zz}| r._FBTc@|j|||gfSrA)r try_parse)selfinstringr doActionss r# parseImplz%infix_notation.._FB.parseImpl(s# I  # . . .7Nr%NT)rrrr,rjr%r#_FBr&'s(      r%r.z FollowedBy>rANr`z@if numterms=3, opExpr must be a tuple or list of two expressionsz {}{} termz{} termrz6operator must be unary (1), binary (2), or ternary (3)z2operator must indicate right or left associativity)r.)r`.) FollowedByrr8rrrrrrrrtuplerrFrrrrrr rrr r;setName)r r!r"r#r.rlastExprroperDefopExprarityrightLeftAssocpaopExpr1opExpr2 term_namethisExprrs r#infix_notationr>sbj !CL ))C$~~$~~ tX & &3:dH+E+E3uTCZ$%6777s T 12((<< 7-4w->,C)~r fh ' ' ?"66v>>F A::fudm44 F q8H8H V & GW#**7G< > >QRR R#II..y99 W\ ) )zzC6 122U8fVn;T5U5UU !% #Hv$5$@ A AE FX$5v#>>EE!II!$Hx$7 8 85&AQ;R;R RII!Cw&1G;hF(Yw/AG/Kh/V%W%WWXXY w} , ,zz!&#..) [[FC h 677%@Q:R:RR !% #Hv$5$@ A AE FX$5v#>>EE!II!$Hx$7 8 85 8F#33<<!II!Cw&1G;hF(W,x7'AHLMMN   /"udm,, /* *B///**2...i(*33I>>>HC Jr%c  ddfd fd}fd}fd}ttd}t t |zd}t |d} t |d } |rStt||zt| t|zt|zz| z} n\tt|t| t|zt|zzt| z} | fd | fd | ttz| d S) a (DEPRECATED - use IndentedBlock class instead) Helper method for defining space-delimited indentation blocks, such as those used to define block statements in Python source code. Parameters: - ``blockStatementExpr`` - expression defining syntax of statement that is repeated within the indented block - ``indentStack`` - list created by caller to manage indentation stack (multiple ``statementWithIndentedBlock`` expressions within a single grammar should share a common ``indentStack``) - ``indent`` - boolean indicating whether block must be indented beyond the current level; set to ``False`` for block of left-most statements (default= ``True``) A valid block must contain at least one ``blockStatement``. (Note that indentedBlock uses internal parse actions which make it incompatible with packrat parsing.) Example:: data = ''' def A(z): A1 B = 100 G = A2 A2 A3 B def BB(a,b,c): BB1 def BBA(): bba1 bba2 bba3 C D def spam(x,y): def eggs(z): pass ''' indentStack = [1] stmt = Forward() identifier = Word(alphas, alphanums) funcDecl = ("def" + identifier + Group("(" + Opt(delimitedList(identifier)) + ")") + ":") func_body = indentedBlock(stmt, indentStack) funcDef = Group(funcDecl + func_body) rvalue = Forward() funcCall = Group(identifier + "(" + Opt(delimitedList(rvalue)) + ")") rvalue << (funcCall | identifier | Word(nums)) assignment = Group(identifier + "=" + rvalue) stmt << (funcDef | assignment | identifier) module_body = stmt[1, ...] parseTree = module_body.parseString(data) parseTree.pprint() prints:: [['def', 'A', ['(', 'z', ')'], ':', [['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]], 'B', ['def', 'BB', ['(', 'a', 'b', 'c', ')'], ':', [['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]], 'C', 'D', ['def', 'spam', ['(', 'x', 'y', ')'], ':', [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]] Nc"ddd<dSNrj) backup_stacks indentStacksr# reset_stackz"indentedBlock..reset_stacks&r* AAAr%c|t|krdSt||}|dkr.|dkrt||dt||ddS)NrBzillegal nestingznot a peer entry)rFcolrSr,r-r.curColrDs r#checkPeerIndentz&indentedBlock..checkPeerIndentsp A;; FQ [_ $ $ B''$Q+<=== A'9:: : % $r%ct||}|dkr|dSt||d)NrBznot a subentry)rGappendrSrHs r#checkSubIndentz%indentedBlock..checkSubIndentsLQ KO # #   v & & & & & A'788 8r%c|t|krdSt||}r|vst||d|dkrdSdS)Nznot an unindentrB)rFrGrSrrHs r# checkUnindentz$indentedBlock..checkUnindentsv A;; FQ :+ 5 5 A'899 9 KO # # OO      $ #r%z INDENTrUNINDENTc:rdodndSrAr)rCsr#r5zindentedBlock..s"-I !!"%%.$Tr%cSrArj)rerfcdrEs r#r5zindentedBlock..s kkmmr%zindented block)rLrLineEndset_whitespace_charssuppressr+r;r rrr<set_fail_actionignorer) blockStatementExprrDindentrCrJrMrONLrPPEERUNDENTsmExprrEs ` ` @r# indentedBlockra{sXlQQQ(((++++++;;;;;99999 79911%88AACC D DBgg00@@@ J J8 T TF 77 # #O 4 4 = =b A AD WW % %m 4 4 = =j I IF   GG u%78883r77BCC D    GGu%78883r77BCC D&kk    IIII ;;;;<<<g 1222 ??+ , ,,r%z/\*(?:[^*]|\*(?!/))*z*/zC style commentzz HTML commentz.*z rest of linez//(?:\\\n|[^\n])*z // commentzC++ style commentz#.*zPython style commentc<g|]}t|t|Srj)rr)rCrs r# rc%s7''' *Q ">">''''r%_builtin_exprs)r FNNrA)FTFr-)\ html.entitieshtmlrutypingrrcoreutilrrrUnionrrboolOptionalr3r$r=rOrXrrrrrrrrrrTupler r __annotations__r9rrr r rentitieshtml5itemsrrrcommon_html_entityrEnumrInfixNotationOperatorArgType ParseActionInfixNotationOperatorSpecListr>rarc_style_comment html_commentleave_whitespace rest_of_linedbl_slash_commentcpp_style_commentjava_style_commentpython_style_commentvarsvaluesrd delimitedList countedArraymatchPreviousLiteralmatchPreviousExproneOfdictOforiginalTextFor nestedExpr makeHTMLTags makeXMLTags anyOpenTag anyCloseTagcommonHTMLEntityreplaceHTMLEntityopAssoc infixNotation cStyleComment htmlComment restOfLinedblSlashCommentcppStyleCommentjavaStyleCommentpythonStyleCommentrjr%r#rs& >>>>>>>>>>(+ $ $ 64"'646464 ]" #64 m# $6464   64   646464646464v049I/3 9I9I9I 9Iom,9I_] + 9I  9I9I9I9Ix=B!m! !!!!L | ||| $c) *||| |  ||||||~%/%/}%/%/%/%/%/R,02EI222 2$(2>B22222jA-AMAAAA m     H),(+.2!. } !.  }}} #}$ %} #}$ %}_] +} }  }}}}}@(0x}}((3--7777t% 3 % &% =- '(%%%%6$ 3 % &$ =- '($$$$,nDT!""++I66 mLKt}/B/H/H/J/JKKKU>CHH^,D,DDtKLLUU ((( d %3eM3$67}c?Q9RRSS " $  $ &  $    $'/hsmm&.hsmm bbb + ,b ]" #b ]" # b  bbbbJ;?bL-L-L-L-`'%% 7884?@@II$u'((11.AA &uU||,,..77GG E.//88FF1G E !""T),== ( P&$uV}}--.DEE0 ''tvv}}''']#   -' #    &  K%'     ##%)r%PK|5Z6 t?#?#?Lib/site-packages/pkg_resources/_vendor/pyparsing/exceptions.pynuW+A# exceptions.py import re import sys import typing from .util import col, line, lineno, _collapse_string_to_ranges from .unicode import pyparsing_unicode as ppu class ExceptionWordUnicode(ppu.Latin1, ppu.LatinA, ppu.LatinB, ppu.Greek, ppu.Cyrillic): pass _extract_alphanums = _collapse_string_to_ranges(ExceptionWordUnicode.alphanums) _exception_word_extractor = re.compile("([" + _extract_alphanums + "]{1,16})|.") class ParseBaseException(Exception): """base exception class for all parsing runtime exceptions""" # Performance tuning: we construct a *lot* of these, so keep this # constructor as small and fast as possible def __init__( self, pstr: str, loc: int = 0, msg: typing.Optional[str] = None, elem=None, ): self.loc = loc if msg is None: self.msg = pstr self.pstr = "" else: self.msg = msg self.pstr = pstr self.parser_element = self.parserElement = elem self.args = (pstr, loc, msg) @staticmethod def explain_exception(exc, depth=16): """ Method to take an exception and translate the Python internal traceback into a list of the pyparsing expressions that caused the exception to be raised. Parameters: - exc - exception raised during parsing (need not be a ParseException, in support of Python exceptions that might be raised in a parse action) - depth (default=16) - number of levels back in the stack trace to list expression and function names; if None, the full stack trace names will be listed; if 0, only the failing input line, marker, and exception string will be shown Returns a multi-line string listing the ParserElements and/or function names in the exception's stack trace. """ import inspect from .core import ParserElement if depth is None: depth = sys.getrecursionlimit() ret = [] if isinstance(exc, ParseBaseException): ret.append(exc.line) ret.append(" " * (exc.column - 1) + "^") ret.append("{}: {}".format(type(exc).__name__, exc)) if depth > 0: callers = inspect.getinnerframes(exc.__traceback__, context=depth) seen = set() for i, ff in enumerate(callers[-depth:]): frm = ff[0] f_self = frm.f_locals.get("self", None) if isinstance(f_self, ParserElement): if frm.f_code.co_name not in ("parseImpl", "_parseNoCache"): continue if id(f_self) in seen: continue seen.add(id(f_self)) self_type = type(f_self) ret.append( "{}.{} - {}".format( self_type.__module__, self_type.__name__, f_self ) ) elif f_self is not None: self_type = type(f_self) ret.append("{}.{}".format(self_type.__module__, self_type.__name__)) else: code = frm.f_code if code.co_name in ("wrapper", ""): continue ret.append("{}".format(code.co_name)) depth -= 1 if not depth: break return "\n".join(ret) @classmethod def _from_exception(cls, pe): """ internal factory method to simplify creating one type of ParseException from another - avoids having __init__ signature conflicts among subclasses """ return cls(pe.pstr, pe.loc, pe.msg, pe.parserElement) @property def line(self) -> str: """ Return the line of text where the exception occurred. """ return line(self.loc, self.pstr) @property def lineno(self) -> int: """ Return the 1-based line number of text where the exception occurred. """ return lineno(self.loc, self.pstr) @property def col(self) -> int: """ Return the 1-based column on the line of text where the exception occurred. """ return col(self.loc, self.pstr) @property def column(self) -> int: """ Return the 1-based column on the line of text where the exception occurred. """ return col(self.loc, self.pstr) def __str__(self) -> str: if self.pstr: if self.loc >= len(self.pstr): foundstr = ", found end of text" else: # pull out next word at error location found_match = _exception_word_extractor.match(self.pstr, self.loc) if found_match is not None: found = found_match.group(0) else: found = self.pstr[self.loc : self.loc + 1] foundstr = (", found %r" % found).replace(r"\\", "\\") else: foundstr = "" return "{}{} (at char {}), (line:{}, col:{})".format( self.msg, foundstr, self.loc, self.lineno, self.column ) def __repr__(self): return str(self) def mark_input_line(self, marker_string: str = None, *, markerString=">!<") -> str: """ Extracts the exception line from the input string, and marks the location of the exception with a special symbol. """ markerString = marker_string if marker_string is not None else markerString line_str = self.line line_column = self.column - 1 if markerString: line_str = "".join( (line_str[:line_column], markerString, line_str[line_column:]) ) return line_str.strip() def explain(self, depth=16) -> str: """ Method to translate the Python internal traceback into a list of the pyparsing expressions that caused the exception to be raised. Parameters: - depth (default=16) - number of levels back in the stack trace to list expression and function names; if None, the full stack trace names will be listed; if 0, only the failing input line, marker, and exception string will be shown Returns a multi-line string listing the ParserElements and/or function names in the exception's stack trace. Example:: expr = pp.Word(pp.nums) * 3 try: expr.parse_string("123 456 A789") except pp.ParseException as pe: print(pe.explain(depth=0)) prints:: 123 456 A789 ^ ParseException: Expected W:(0-9), found 'A' (at char 8), (line:1, col:9) Note: the diagnostic output will include string representations of the expressions that failed to parse. These representations will be more helpful if you use `set_name` to give identifiable names to your expressions. Otherwise they will use the default string forms, which may be cryptic to read. Note: pyparsing's default truncation of exception tracebacks may also truncate the stack of expressions that are displayed in the ``explain`` output. To get the full listing of parser expressions, you may have to set ``ParserElement.verbose_stacktrace = True`` """ return self.explain_exception(self, depth) markInputline = mark_input_line class ParseException(ParseBaseException): """ Exception thrown when a parse expression doesn't match the input string Example:: try: Word(nums).set_name("integer").parse_string("ABC") except ParseException as pe: print(pe) print("column: {}".format(pe.column)) prints:: Expected integer (at char 0), (line:1, col:1) column: 1 """ class ParseFatalException(ParseBaseException): """ User-throwable exception thrown when inconsistent parse content is found; stops all parsing immediately """ class ParseSyntaxException(ParseFatalException): """ Just like :class:`ParseFatalException`, but thrown internally when an :class:`ErrorStop` ('-' operator) indicates that parsing is to stop immediately because an unbacktrackable syntax error has been found. """ class RecursiveGrammarException(Exception): """ Exception thrown by :class:`ParserElement.validate` if the grammar could be left-recursive; parser may need to enable left recursion using :class:`ParserElement.enable_left_recursion` """ def __init__(self, parseElementList): self.parseElementTrace = parseElementList def __str__(self) -> str: return "RecursiveGrammarException: {}".format(self.parseElementTrace) PK|5ZJ##=Lib/site-packages/pkg_resources/_vendor/pyparsing/__init__.pynuW+A# module pyparsing.py # # Copyright (c) 2003-2022 Paul T. McGuire # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # __doc__ = """ pyparsing module - Classes and methods to define and execute parsing grammars ============================================================================= The pyparsing module is an alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions. With pyparsing, you don't need to learn a new syntax for defining grammars or matching expressions - the parsing module provides a library of classes that you use to construct the grammar directly in Python. Here is a program to parse "Hello, World!" (or any greeting of the form ``", !"``), built up using :class:`Word`, :class:`Literal`, and :class:`And` elements (the :meth:`'+'` operators create :class:`And` expressions, and the strings are auto-converted to :class:`Literal` expressions):: from pyparsing import Word, alphas # define grammar of a greeting greet = Word(alphas) + "," + Word(alphas) + "!" hello = "Hello, World!" print(hello, "->", greet.parse_string(hello)) The program outputs the following:: Hello, World! -> ['Hello', ',', 'World', '!'] The Python representation of the grammar is quite readable, owing to the self-explanatory class names, and the use of :class:`'+'`, :class:`'|'`, :class:`'^'` and :class:`'&'` operators. The :class:`ParseResults` object returned from :class:`ParserElement.parseString` can be accessed as a nested list, a dictionary, or an object with named attributes. The pyparsing module handles some of the problems that are typically vexing when writing text parsers: - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello , World !", etc.) - quoted strings - embedded comments Getting Started - ----------------- Visit the classes :class:`ParserElement` and :class:`ParseResults` to see the base classes that most other pyparsing classes inherit from. Use the docstrings for examples of how to: - construct literal match expressions from :class:`Literal` and :class:`CaselessLiteral` classes - construct character word-group expressions using the :class:`Word` class - see how to create repetitive expressions using :class:`ZeroOrMore` and :class:`OneOrMore` classes - use :class:`'+'`, :class:`'|'`, :class:`'^'`, and :class:`'&'` operators to combine simple expressions into more complex ones - associate names with your parsed results using :class:`ParserElement.setResultsName` - access the parsed data, which is returned as a :class:`ParseResults` object - find some helpful expression short-cuts like :class:`delimitedList` and :class:`oneOf` - find more useful common expressions in the :class:`pyparsing_common` namespace class """ from typing import NamedTuple class version_info(NamedTuple): major: int minor: int micro: int releaselevel: str serial: int @property def __version__(self): return ( "{}.{}.{}".format(self.major, self.minor, self.micro) + ( "{}{}{}".format( "r" if self.releaselevel[0] == "c" else "", self.releaselevel[0], self.serial, ), "", )[self.releaselevel == "final"] ) def __str__(self): return "{} {} / {}".format(__name__, self.__version__, __version_time__) def __repr__(self): return "{}.{}({})".format( __name__, type(self).__name__, ", ".join("{}={!r}".format(*nv) for nv in zip(self._fields, self)), ) __version_info__ = version_info(3, 0, 9, "final", 0) __version_time__ = "05 May 2022 07:02 UTC" __version__ = __version_info__.__version__ __versionTime__ = __version_time__ __author__ = "Paul McGuire " from .util import * from .exceptions import * from .actions import * from .core import __diag__, __compat__ from .results import * from .core import * from .core import _builtin_exprs as core_builtin_exprs from .helpers import * from .helpers import _builtin_exprs as helper_builtin_exprs from .unicode import unicode_set, UnicodeRangeList, pyparsing_unicode as unicode from .testing import pyparsing_test as testing from .common import ( pyparsing_common as common, _builtin_exprs as common_builtin_exprs, ) # define backward compat synonyms if "pyparsing_unicode" not in globals(): pyparsing_unicode = unicode if "pyparsing_common" not in globals(): pyparsing_common = common if "pyparsing_test" not in globals(): pyparsing_test = testing core_builtin_exprs += common_builtin_exprs + helper_builtin_exprs __all__ = [ "__version__", "__version_time__", "__author__", "__compat__", "__diag__", "And", "AtLineStart", "AtStringStart", "CaselessKeyword", "CaselessLiteral", "CharsNotIn", "Combine", "Dict", "Each", "Empty", "FollowedBy", "Forward", "GoToColumn", "Group", "IndentedBlock", "Keyword", "LineEnd", "LineStart", "Literal", "Located", "PrecededBy", "MatchFirst", "NoMatch", "NotAny", "OneOrMore", "OnlyOnce", "OpAssoc", "Opt", "Optional", "Or", "ParseBaseException", "ParseElementEnhance", "ParseException", "ParseExpression", "ParseFatalException", "ParseResults", "ParseSyntaxException", "ParserElement", "PositionToken", "QuotedString", "RecursiveGrammarException", "Regex", "SkipTo", "StringEnd", "StringStart", "Suppress", "Token", "TokenConverter", "White", "Word", "WordEnd", "WordStart", "ZeroOrMore", "Char", "alphanums", "alphas", "alphas8bit", "any_close_tag", "any_open_tag", "c_style_comment", "col", "common_html_entity", "counted_array", "cpp_style_comment", "dbl_quoted_string", "dbl_slash_comment", "delimited_list", "dict_of", "empty", "hexnums", "html_comment", "identchars", "identbodychars", "java_style_comment", "line", "line_end", "line_start", "lineno", "make_html_tags", "make_xml_tags", "match_only_at_col", "match_previous_expr", "match_previous_literal", "nested_expr", "null_debug_action", "nums", "one_of", "printables", "punc8bit", "python_style_comment", "quoted_string", "remove_quotes", "replace_with", "replace_html_entity", "rest_of_line", "sgl_quoted_string", "srange", "string_end", "string_start", "trace_parse_action", "unicode_string", "with_attribute", "indentedBlock", "original_text_for", "ungroup", "infix_notation", "locatedExpr", "with_class", "CloseMatch", "token_map", "pyparsing_common", "pyparsing_unicode", "unicode_set", "condition_as_parse_action", "pyparsing_test", # pre-PEP8 compatibility names "__versionTime__", "anyCloseTag", "anyOpenTag", "cStyleComment", "commonHTMLEntity", "countedArray", "cppStyleComment", "dblQuotedString", "dblSlashComment", "delimitedList", "dictOf", "htmlComment", "javaStyleComment", "lineEnd", "lineStart", "makeHTMLTags", "makeXMLTags", "matchOnlyAtCol", "matchPreviousExpr", "matchPreviousLiteral", "nestedExpr", "nullDebugAction", "oneOf", "opAssoc", "pythonStyleComment", "quotedString", "removeQuotes", "replaceHTMLEntity", "replaceWith", "restOfLine", "sglQuotedString", "stringEnd", "stringStart", "traceParseAction", "unicodeString", "withAttribute", "indentedBlock", "originalTextFor", "infixNotation", "locatedExpr", "withClass", "tokenMap", "conditionAsParseAction", "autoname_elements", ] PK|5Zzx#*#*<Lib/site-packages/pkg_resources/_vendor/pyparsing/unicode.pynuW+A# unicode.py import sys from itertools import filterfalse from typing import List, Tuple, Union class _lazyclassproperty: def __init__(self, fn): self.fn = fn self.__doc__ = fn.__doc__ self.__name__ = fn.__name__ def __get__(self, obj, cls): if cls is None: cls = type(obj) if not hasattr(cls, "_intern") or any( cls._intern is getattr(superclass, "_intern", []) for superclass in cls.__mro__[1:] ): cls._intern = {} attrname = self.fn.__name__ if attrname not in cls._intern: cls._intern[attrname] = self.fn(cls) return cls._intern[attrname] UnicodeRangeList = List[Union[Tuple[int, int], Tuple[int]]] class unicode_set: """ A set of Unicode characters, for language-specific strings for ``alphas``, ``nums``, ``alphanums``, and ``printables``. A unicode_set is defined by a list of ranges in the Unicode character set, in a class attribute ``_ranges``. Ranges can be specified using 2-tuples or a 1-tuple, such as:: _ranges = [ (0x0020, 0x007e), (0x00a0, 0x00ff), (0x0100,), ] Ranges are left- and right-inclusive. A 1-tuple of (x,) is treated as (x, x). A unicode set can also be defined using multiple inheritance of other unicode sets:: class CJK(Chinese, Japanese, Korean): pass """ _ranges: UnicodeRangeList = [] @_lazyclassproperty def _chars_for_ranges(cls): ret = [] for cc in cls.__mro__: if cc is unicode_set: break for rr in getattr(cc, "_ranges", ()): ret.extend(range(rr[0], rr[-1] + 1)) return [chr(c) for c in sorted(set(ret))] @_lazyclassproperty def printables(cls): "all non-whitespace characters in this range" return "".join(filterfalse(str.isspace, cls._chars_for_ranges)) @_lazyclassproperty def alphas(cls): "all alphabetic characters in this range" return "".join(filter(str.isalpha, cls._chars_for_ranges)) @_lazyclassproperty def nums(cls): "all numeric digit characters in this range" return "".join(filter(str.isdigit, cls._chars_for_ranges)) @_lazyclassproperty def alphanums(cls): "all alphanumeric characters in this range" return cls.alphas + cls.nums @_lazyclassproperty def identchars(cls): "all characters in this range that are valid identifier characters, plus underscore '_'" return "".join( sorted( set( "".join(filter(str.isidentifier, cls._chars_for_ranges)) + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzªµº" + "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ" + "_" ) ) ) @_lazyclassproperty def identbodychars(cls): """ all characters in this range that are valid identifier body characters, plus the digits 0-9 """ return "".join( sorted( set( cls.identchars + "0123456789" + "".join( [c for c in cls._chars_for_ranges if ("_" + c).isidentifier()] ) ) ) ) class pyparsing_unicode(unicode_set): """ A namespace class for defining common language unicode_sets. """ # fmt: off # define ranges in language character sets _ranges: UnicodeRangeList = [ (0x0020, sys.maxunicode), ] class BasicMultilingualPlane(unicode_set): "Unicode set for the Basic Multilingual Plane" _ranges: UnicodeRangeList = [ (0x0020, 0xFFFF), ] class Latin1(unicode_set): "Unicode set for Latin-1 Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0020, 0x007E), (0x00A0, 0x00FF), ] class LatinA(unicode_set): "Unicode set for Latin-A Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0100, 0x017F), ] class LatinB(unicode_set): "Unicode set for Latin-B Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0180, 0x024F), ] class Greek(unicode_set): "Unicode set for Greek Unicode Character Ranges" _ranges: UnicodeRangeList = [ (0x0342, 0x0345), (0x0370, 0x0377), (0x037A, 0x037F), (0x0384, 0x038A), (0x038C,), (0x038E, 0x03A1), (0x03A3, 0x03E1), (0x03F0, 0x03FF), (0x1D26, 0x1D2A), (0x1D5E,), (0x1D60,), (0x1D66, 0x1D6A), (0x1F00, 0x1F15), (0x1F18, 0x1F1D), (0x1F20, 0x1F45), (0x1F48, 0x1F4D), (0x1F50, 0x1F57), (0x1F59,), (0x1F5B,), (0x1F5D,), (0x1F5F, 0x1F7D), (0x1F80, 0x1FB4), (0x1FB6, 0x1FC4), (0x1FC6, 0x1FD3), (0x1FD6, 0x1FDB), (0x1FDD, 0x1FEF), (0x1FF2, 0x1FF4), (0x1FF6, 0x1FFE), (0x2129,), (0x2719, 0x271A), (0xAB65,), (0x10140, 0x1018D), (0x101A0,), (0x1D200, 0x1D245), (0x1F7A1, 0x1F7A7), ] class Cyrillic(unicode_set): "Unicode set for Cyrillic Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0400, 0x052F), (0x1C80, 0x1C88), (0x1D2B,), (0x1D78,), (0x2DE0, 0x2DFF), (0xA640, 0xA672), (0xA674, 0xA69F), (0xFE2E, 0xFE2F), ] class Chinese(unicode_set): "Unicode set for Chinese Unicode Character Range" _ranges: UnicodeRangeList = [ (0x2E80, 0x2E99), (0x2E9B, 0x2EF3), (0x31C0, 0x31E3), (0x3400, 0x4DB5), (0x4E00, 0x9FEF), (0xA700, 0xA707), (0xF900, 0xFA6D), (0xFA70, 0xFAD9), (0x16FE2, 0x16FE3), (0x1F210, 0x1F212), (0x1F214, 0x1F23B), (0x1F240, 0x1F248), (0x20000, 0x2A6D6), (0x2A700, 0x2B734), (0x2B740, 0x2B81D), (0x2B820, 0x2CEA1), (0x2CEB0, 0x2EBE0), (0x2F800, 0x2FA1D), ] class Japanese(unicode_set): "Unicode set for Japanese Unicode Character Range, combining Kanji, Hiragana, and Katakana ranges" _ranges: UnicodeRangeList = [] class Kanji(unicode_set): "Unicode set for Kanji Unicode Character Range" _ranges: UnicodeRangeList = [ (0x4E00, 0x9FBF), (0x3000, 0x303F), ] class Hiragana(unicode_set): "Unicode set for Hiragana Unicode Character Range" _ranges: UnicodeRangeList = [ (0x3041, 0x3096), (0x3099, 0x30A0), (0x30FC,), (0xFF70,), (0x1B001,), (0x1B150, 0x1B152), (0x1F200,), ] class Katakana(unicode_set): "Unicode set for Katakana Unicode Character Range" _ranges: UnicodeRangeList = [ (0x3099, 0x309C), (0x30A0, 0x30FF), (0x31F0, 0x31FF), (0x32D0, 0x32FE), (0xFF65, 0xFF9F), (0x1B000,), (0x1B164, 0x1B167), (0x1F201, 0x1F202), (0x1F213,), ] class Hangul(unicode_set): "Unicode set for Hangul (Korean) Unicode Character Range" _ranges: UnicodeRangeList = [ (0x1100, 0x11FF), (0x302E, 0x302F), (0x3131, 0x318E), (0x3200, 0x321C), (0x3260, 0x327B), (0x327E,), (0xA960, 0xA97C), (0xAC00, 0xD7A3), (0xD7B0, 0xD7C6), (0xD7CB, 0xD7FB), (0xFFA0, 0xFFBE), (0xFFC2, 0xFFC7), (0xFFCA, 0xFFCF), (0xFFD2, 0xFFD7), (0xFFDA, 0xFFDC), ] Korean = Hangul class CJK(Chinese, Japanese, Hangul): "Unicode set for combined Chinese, Japanese, and Korean (CJK) Unicode Character Range" class Thai(unicode_set): "Unicode set for Thai Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0E01, 0x0E3A), (0x0E3F, 0x0E5B) ] class Arabic(unicode_set): "Unicode set for Arabic Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0600, 0x061B), (0x061E, 0x06FF), (0x0700, 0x077F), ] class Hebrew(unicode_set): "Unicode set for Hebrew Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0591, 0x05C7), (0x05D0, 0x05EA), (0x05EF, 0x05F4), (0xFB1D, 0xFB36), (0xFB38, 0xFB3C), (0xFB3E,), (0xFB40, 0xFB41), (0xFB43, 0xFB44), (0xFB46, 0xFB4F), ] class Devanagari(unicode_set): "Unicode set for Devanagari Unicode Character Range" _ranges: UnicodeRangeList = [ (0x0900, 0x097F), (0xA8E0, 0xA8FF) ] # fmt: on pyparsing_unicode.Japanese._ranges = ( pyparsing_unicode.Japanese.Kanji._ranges + pyparsing_unicode.Japanese.Hiragana._ranges + pyparsing_unicode.Japanese.Katakana._ranges ) pyparsing_unicode.BMP = pyparsing_unicode.BasicMultilingualPlane # add language identifiers using language Unicode pyparsing_unicode.العربية = pyparsing_unicode.Arabic pyparsing_unicode.中文 = pyparsing_unicode.Chinese pyparsing_unicode.кириллица = pyparsing_unicode.Cyrillic pyparsing_unicode.Ελληνικά = pyparsing_unicode.Greek pyparsing_unicode.עִברִית = pyparsing_unicode.Hebrew pyparsing_unicode.日本語 = pyparsing_unicode.Japanese pyparsing_unicode.Japanese.漢字 = pyparsing_unicode.Japanese.Kanji pyparsing_unicode.Japanese.カタカナ = pyparsing_unicode.Japanese.Katakana pyparsing_unicode.Japanese.ひらがな = pyparsing_unicode.Japanese.Hiragana pyparsing_unicode.한국어 = pyparsing_unicode.Korean pyparsing_unicode.ไทย = pyparsing_unicode.Thai pyparsing_unicode.देवनागरी = pyparsing_unicode.Devanagari PK|5Z-Gl9Lib/site-packages/pkg_resources/_vendor/pyparsing/util.pynuW+A# util.py import warnings import types import collections import itertools from functools import lru_cache from typing import List, Union, Iterable _bslash = chr(92) class __config_flags: """Internal class for defining compatibility and debugging flags""" _all_names: List[str] = [] _fixed_names: List[str] = [] _type_desc = "configuration" @classmethod def _set(cls, dname, value): if dname in cls._fixed_names: warnings.warn( "{}.{} {} is {} and cannot be overridden".format( cls.__name__, dname, cls._type_desc, str(getattr(cls, dname)).upper(), ) ) return if dname in cls._all_names: setattr(cls, dname, value) else: raise ValueError("no such {} {!r}".format(cls._type_desc, dname)) enable = classmethod(lambda cls, name: cls._set(name, True)) disable = classmethod(lambda cls, name: cls._set(name, False)) @lru_cache(maxsize=128) def col(loc: int, strg: str) -> int: """ Returns current column within a string, counting newlines as line separators. The first column is number 1. Note: the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`ParserElement.parseString` for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. """ s = strg return 1 if 0 < loc < len(s) and s[loc - 1] == "\n" else loc - s.rfind("\n", 0, loc) @lru_cache(maxsize=128) def lineno(loc: int, strg: str) -> int: """Returns current line number within a string, counting newlines as line separators. The first line is number 1. Note - the default parsing behavior is to expand tabs in the input string before starting the parsing process. See :class:`ParserElement.parseString` for more information on parsing strings containing ```` s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. """ return strg.count("\n", 0, loc) + 1 @lru_cache(maxsize=128) def line(loc: int, strg: str) -> str: """ Returns the line of text containing loc within a string, counting newlines as line separators. """ last_cr = strg.rfind("\n", 0, loc) next_cr = strg.find("\n", loc) return strg[last_cr + 1 : next_cr] if next_cr >= 0 else strg[last_cr + 1 :] class _UnboundedCache: def __init__(self): cache = {} cache_get = cache.get self.not_in_cache = not_in_cache = object() def get(_, key): return cache_get(key, not_in_cache) def set_(_, key, value): cache[key] = value def clear(_): cache.clear() self.size = None self.get = types.MethodType(get, self) self.set = types.MethodType(set_, self) self.clear = types.MethodType(clear, self) class _FifoCache: def __init__(self, size): self.not_in_cache = not_in_cache = object() cache = collections.OrderedDict() cache_get = cache.get def get(_, key): return cache_get(key, not_in_cache) def set_(_, key, value): cache[key] = value while len(cache) > size: cache.popitem(last=False) def clear(_): cache.clear() self.size = size self.get = types.MethodType(get, self) self.set = types.MethodType(set_, self) self.clear = types.MethodType(clear, self) class LRUMemo: """ A memoizing mapping that retains `capacity` deleted items The memo tracks retained items by their access order; once `capacity` items are retained, the least recently used item is discarded. """ def __init__(self, capacity): self._capacity = capacity self._active = {} self._memory = collections.OrderedDict() def __getitem__(self, key): try: return self._active[key] except KeyError: self._memory.move_to_end(key) return self._memory[key] def __setitem__(self, key, value): self._memory.pop(key, None) self._active[key] = value def __delitem__(self, key): try: value = self._active.pop(key) except KeyError: pass else: while len(self._memory) >= self._capacity: self._memory.popitem(last=False) self._memory[key] = value def clear(self): self._active.clear() self._memory.clear() class UnboundedMemo(dict): """ A memoizing mapping that retains all deleted items """ def __delitem__(self, key): pass def _escape_regex_range_chars(s: str) -> str: # escape these chars: ^-[] for c in r"\^-[]": s = s.replace(c, _bslash + c) s = s.replace("\n", r"\n") s = s.replace("\t", r"\t") return str(s) def _collapse_string_to_ranges( s: Union[str, Iterable[str]], re_escape: bool = True ) -> str: def is_consecutive(c): c_int = ord(c) is_consecutive.prev, prev = c_int, is_consecutive.prev if c_int - prev > 1: is_consecutive.value = next(is_consecutive.counter) return is_consecutive.value is_consecutive.prev = 0 is_consecutive.counter = itertools.count() is_consecutive.value = -1 def escape_re_range_char(c): return "\\" + c if c in r"\^-][" else c def no_escape_re_range_char(c): return c if not re_escape: escape_re_range_char = no_escape_re_range_char ret = [] s = "".join(sorted(set(s))) if len(s) > 3: for _, chars in itertools.groupby(s, key=is_consecutive): first = last = next(chars) last = collections.deque( itertools.chain(iter([last]), chars), maxlen=1 ).pop() if first == last: ret.append(escape_re_range_char(first)) else: sep = "" if ord(last) == ord(first) + 1 else "-" ret.append( "{}{}{}".format( escape_re_range_char(first), sep, escape_re_range_char(last) ) ) else: ret = [escape_re_range_char(c) for c in s] return "".join(ret) def _flatten(ll: list) -> list: ret = [] for i in ll: if isinstance(i, list): ret.extend(_flatten(i)) else: ret.append(i) return ret PK|5Z/H<Lib/site-packages/pkg_resources/_vendor/pyparsing/actions.pynuW+A# actions.py from .exceptions import ParseException from .util import col class OnlyOnce: """ Wrapper for parse actions, to ensure they are only called once. """ def __init__(self, method_call): from .core import _trim_arity self.callable = _trim_arity(method_call) self.called = False def __call__(self, s, l, t): if not self.called: results = self.callable(s, l, t) self.called = True return results raise ParseException(s, l, "OnlyOnce obj called multiple times w/out reset") def reset(self): """ Allow the associated parse action to be called once more. """ self.called = False def match_only_at_col(n): """ Helper method for defining parse actions that require matching at a specific column in the input text. """ def verify_col(strg, locn, toks): if col(locn, strg) != n: raise ParseException(strg, locn, "matched token not at column {}".format(n)) return verify_col def replace_with(repl_str): """ Helper method for common parse actions that simply return a literal value. Especially useful when used with :class:`transform_string` (). Example:: num = Word(nums).set_parse_action(lambda toks: int(toks[0])) na = one_of("N/A NA").set_parse_action(replace_with(math.nan)) term = na | num term[1, ...].parse_string("324 234 N/A 234") # -> [324, 234, nan, 234] """ return lambda s, l, t: [repl_str] def remove_quotes(s, l, t): """ Helper parse action for removing quotation marks from parsed quoted strings. Example:: # by default, quotation marks are included in parsed results quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["'Now is the Winter of our Discontent'"] # use remove_quotes to strip quotation marks from parsed results quoted_string.set_parse_action(remove_quotes) quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["Now is the Winter of our Discontent"] """ return t[0][1:-1] def with_attribute(*args, **attr_dict): """ Helper to create a validating parse action to be used with start tags created with :class:`make_xml_tags` or :class:`make_html_tags`. Use ``with_attribute`` to qualify a starting tag with a required attribute value, to avoid false matches on common tags such as ```` or ``
``. Call ``with_attribute`` with a series of attribute names and values. Specify the list of filter attributes names and values as: - keyword arguments, as in ``(align="right")``, or - as an explicit dict with ``**`` operator, when an attribute name is also a Python reserved word, as in ``**{"class":"Customer", "align":"right"}`` - a list of name-value tuples, as in ``(("ns1:class", "Customer"), ("ns2:align", "right"))`` For attribute names with a namespace prefix, you must use the second form. Attribute names are matched insensitive to upper/lower case. If just testing for ``class`` (with or without a namespace), use :class:`with_class`. To verify that the attribute exists, but without specifying a value, pass ``with_attribute.ANY_VALUE`` as the value. Example:: html = '''
Some text
1 4 0 1 0
1,3 2,3 1,1
this has no type
''' div,div_end = make_html_tags("div") # only match div tag having a type attribute with value "grid" div_grid = div().set_parse_action(with_attribute(type="grid")) grid_expr = div_grid + SkipTo(div | div_end)("body") for grid_header in grid_expr.search_string(html): print(grid_header.body) # construct a match with any div tag having a type attribute, regardless of the value div_any_type = div().set_parse_action(with_attribute(type=with_attribute.ANY_VALUE)) div_expr = div_any_type + SkipTo(div | div_end)("body") for div_header in div_expr.search_string(html): print(div_header.body) prints:: 1 4 0 1 0 1 4 0 1 0 1,3 2,3 1,1 """ if args: attrs = args[:] else: attrs = attr_dict.items() attrs = [(k, v) for k, v in attrs] def pa(s, l, tokens): for attrName, attrValue in attrs: if attrName not in tokens: raise ParseException(s, l, "no matching attribute " + attrName) if attrValue != with_attribute.ANY_VALUE and tokens[attrName] != attrValue: raise ParseException( s, l, "attribute {!r} has value {!r}, must be {!r}".format( attrName, tokens[attrName], attrValue ), ) return pa with_attribute.ANY_VALUE = object() def with_class(classname, namespace=""): """ Simplified version of :class:`with_attribute` when matching on a div class - made difficult because ``class`` is a reserved word in Python. Example:: html = '''
Some text
1 4 0 1 0
1,3 2,3 1,1
this <div> has no class
''' div,div_end = make_html_tags("div") div_grid = div().set_parse_action(with_class("grid")) grid_expr = div_grid + SkipTo(div | div_end)("body") for grid_header in grid_expr.search_string(html): print(grid_header.body) div_any_type = div().set_parse_action(with_class(withAttribute.ANY_VALUE)) div_expr = div_any_type + SkipTo(div | div_end)("body") for div_header in div_expr.search_string(html): print(div_header.body) prints:: 1 4 0 1 0 1 4 0 1 0 1,3 2,3 1,1 """ classattr = "{}:class".format(namespace) if namespace else "class" return with_attribute(**{classattr: classname}) # pre-PEP8 compatibility symbols replaceWith = replace_with removeQuotes = remove_quotes withAttribute = with_attribute withClass = with_class matchOnlyAtCol = match_only_at_col PK|5Z5Z4Z4<Lib/site-packages/pkg_resources/_vendor/pyparsing/testing.pynuW+A# testing.py from contextlib import contextmanager import typing from .core import ( ParserElement, ParseException, Keyword, __diag__, __compat__, ) class pyparsing_test: """ namespace class for classes useful in writing unit tests """ class reset_pyparsing_context: """ Context manager to be used when writing unit tests that modify pyparsing config values: - packrat parsing - bounded recursion parsing - default whitespace characters. - default keyword characters - literal string auto-conversion class - __diag__ settings Example:: with reset_pyparsing_context(): # test that literals used to construct a grammar are automatically suppressed ParserElement.inlineLiteralsUsing(Suppress) term = Word(alphas) | Word(nums) group = Group('(' + term[...] + ')') # assert that the '()' characters are not included in the parsed tokens self.assertParseAndCheckList(group, "(abc 123 def)", ['abc', '123', 'def']) # after exiting context manager, literals are converted to Literal expressions again """ def __init__(self): self._save_context = {} def save(self): self._save_context["default_whitespace"] = ParserElement.DEFAULT_WHITE_CHARS self._save_context["default_keyword_chars"] = Keyword.DEFAULT_KEYWORD_CHARS self._save_context[ "literal_string_class" ] = ParserElement._literalStringClass self._save_context["verbose_stacktrace"] = ParserElement.verbose_stacktrace self._save_context["packrat_enabled"] = ParserElement._packratEnabled if ParserElement._packratEnabled: self._save_context[ "packrat_cache_size" ] = ParserElement.packrat_cache.size else: self._save_context["packrat_cache_size"] = None self._save_context["packrat_parse"] = ParserElement._parse self._save_context[ "recursion_enabled" ] = ParserElement._left_recursion_enabled self._save_context["__diag__"] = { name: getattr(__diag__, name) for name in __diag__._all_names } self._save_context["__compat__"] = { "collect_all_And_tokens": __compat__.collect_all_And_tokens } return self def restore(self): # reset pyparsing global state if ( ParserElement.DEFAULT_WHITE_CHARS != self._save_context["default_whitespace"] ): ParserElement.set_default_whitespace_chars( self._save_context["default_whitespace"] ) ParserElement.verbose_stacktrace = self._save_context["verbose_stacktrace"] Keyword.DEFAULT_KEYWORD_CHARS = self._save_context["default_keyword_chars"] ParserElement.inlineLiteralsUsing( self._save_context["literal_string_class"] ) for name, value in self._save_context["__diag__"].items(): (__diag__.enable if value else __diag__.disable)(name) ParserElement._packratEnabled = False if self._save_context["packrat_enabled"]: ParserElement.enable_packrat(self._save_context["packrat_cache_size"]) else: ParserElement._parse = self._save_context["packrat_parse"] ParserElement._left_recursion_enabled = self._save_context[ "recursion_enabled" ] __compat__.collect_all_And_tokens = self._save_context["__compat__"] return self def copy(self): ret = type(self)() ret._save_context.update(self._save_context) return ret def __enter__(self): return self.save() def __exit__(self, *args): self.restore() class TestParseResultsAsserts: """ A mixin class to add parse results assertion methods to normal unittest.TestCase classes. """ def assertParseResultsEquals( self, result, expected_list=None, expected_dict=None, msg=None ): """ Unit test assertion to compare a :class:`ParseResults` object with an optional ``expected_list``, and compare any defined results names with an optional ``expected_dict``. """ if expected_list is not None: self.assertEqual(expected_list, result.as_list(), msg=msg) if expected_dict is not None: self.assertEqual(expected_dict, result.as_dict(), msg=msg) def assertParseAndCheckList( self, expr, test_string, expected_list, msg=None, verbose=True ): """ Convenience wrapper assert to test a parser element and input string, and assert that the resulting ``ParseResults.asList()`` is equal to the ``expected_list``. """ result = expr.parse_string(test_string, parse_all=True) if verbose: print(result.dump()) else: print(result.as_list()) self.assertParseResultsEquals(result, expected_list=expected_list, msg=msg) def assertParseAndCheckDict( self, expr, test_string, expected_dict, msg=None, verbose=True ): """ Convenience wrapper assert to test a parser element and input string, and assert that the resulting ``ParseResults.asDict()`` is equal to the ``expected_dict``. """ result = expr.parse_string(test_string, parseAll=True) if verbose: print(result.dump()) else: print(result.as_list()) self.assertParseResultsEquals(result, expected_dict=expected_dict, msg=msg) def assertRunTestResults( self, run_tests_report, expected_parse_results=None, msg=None ): """ Unit test assertion to evaluate output of ``ParserElement.runTests()``. If a list of list-dict tuples is given as the ``expected_parse_results`` argument, then these are zipped with the report tuples returned by ``runTests`` and evaluated using ``assertParseResultsEquals``. Finally, asserts that the overall ``runTests()`` success value is ``True``. :param run_tests_report: tuple(bool, [tuple(str, ParseResults or Exception)]) returned from runTests :param expected_parse_results (optional): [tuple(str, list, dict, Exception)] """ run_test_success, run_test_results = run_tests_report if expected_parse_results is not None: merged = [ (*rpt, expected) for rpt, expected in zip(run_test_results, expected_parse_results) ] for test_string, result, expected in merged: # expected should be a tuple containing a list and/or a dict or an exception, # and optional failure message string # an empty tuple will skip any result validation fail_msg = next( (exp for exp in expected if isinstance(exp, str)), None ) expected_exception = next( ( exp for exp in expected if isinstance(exp, type) and issubclass(exp, Exception) ), None, ) if expected_exception is not None: with self.assertRaises( expected_exception=expected_exception, msg=fail_msg or msg ): if isinstance(result, Exception): raise result else: expected_list = next( (exp for exp in expected if isinstance(exp, list)), None ) expected_dict = next( (exp for exp in expected if isinstance(exp, dict)), None ) if (expected_list, expected_dict) != (None, None): self.assertParseResultsEquals( result, expected_list=expected_list, expected_dict=expected_dict, msg=fail_msg or msg, ) else: # warning here maybe? print("no validation for {!r}".format(test_string)) # do this last, in case some specific test results can be reported instead self.assertTrue( run_test_success, msg=msg if msg is not None else "failed runTests" ) @contextmanager def assertRaisesParseException(self, exc_type=ParseException, msg=None): with self.assertRaises(exc_type, msg=msg): yield @staticmethod def with_line_numbers( s: str, start_line: typing.Optional[int] = None, end_line: typing.Optional[int] = None, expand_tabs: bool = True, eol_mark: str = "|", mark_spaces: typing.Optional[str] = None, mark_control: typing.Optional[str] = None, ) -> str: """ Helpful method for debugging a parser - prints a string with line and column numbers. (Line and column numbers are 1-based.) :param s: tuple(bool, str - string to be printed with line and column numbers :param start_line: int - (optional) starting line number in s to print (default=1) :param end_line: int - (optional) ending line number in s to print (default=len(s)) :param expand_tabs: bool - (optional) expand tabs to spaces, to match the pyparsing default :param eol_mark: str - (optional) string to mark the end of lines, helps visualize trailing spaces (default="|") :param mark_spaces: str - (optional) special character to display in place of spaces :param mark_control: str - (optional) convert non-printing control characters to a placeholding character; valid values: - "unicode" - replaces control chars with Unicode symbols, such as "␍" and "␊" - any single character string - replace control characters with given string - None (default) - string is displayed as-is :return: str - input string with leading line numbers and column number headers """ if expand_tabs: s = s.expandtabs() if mark_control is not None: if mark_control == "unicode": tbl = str.maketrans( {c: u for c, u in zip(range(0, 33), range(0x2400, 0x2433))} | {127: 0x2421} ) eol_mark = "" else: tbl = str.maketrans( {c: mark_control for c in list(range(0, 32)) + [127]} ) s = s.translate(tbl) if mark_spaces is not None and mark_spaces != " ": if mark_spaces == "unicode": tbl = str.maketrans({9: 0x2409, 32: 0x2423}) s = s.translate(tbl) else: s = s.replace(" ", mark_spaces) if start_line is None: start_line = 1 if end_line is None: end_line = len(s) end_line = min(end_line, len(s)) start_line = min(max(1, start_line), end_line) if mark_control != "unicode": s_lines = s.splitlines()[start_line - 1 : end_line] else: s_lines = [line + "␊" for line in s.split("␊")[start_line - 1 : end_line]] if not s_lines: return "" lineno_width = len(str(end_line)) max_line_len = max(len(line) for line in s_lines) lead = " " * (lineno_width + 1) if max_line_len >= 99: header0 = ( lead + "".join( "{}{}".format(" " * 99, (i + 1) % 100) for i in range(max(max_line_len // 100, 1)) ) + "\n" ) else: header0 = "" header1 = ( header0 + lead + "".join( " {}".format((i + 1) % 10) for i in range(-(-max_line_len // 10)) ) + "\n" ) header2 = lead + "1234567890" * (-(-max_line_len // 10)) + "\n" return ( header1 + header2 + "\n".join( "{:{}d}:{}{}".format(i, lineno_width, line, eol_mark) for i, line in enumerate(s_lines, start=start_line) ) + "\n" ) PK|5Z*٘٘<Lib/site-packages/pkg_resources/_vendor/pyparsing/helpers.pynuW+A# helpers.py import html.entities import re import typing from . import __diag__ from .core import * from .util import _bslash, _flatten, _escape_regex_range_chars # # global helpers # def delimited_list( expr: Union[str, ParserElement], delim: Union[str, ParserElement] = ",", combine: bool = False, min: typing.Optional[int] = None, max: typing.Optional[int] = None, *, allow_trailing_delim: bool = False, ) -> ParserElement: """Helper to define a delimited list of expressions - the delimiter defaults to ','. By default, the list elements and delimiters can have intervening whitespace, and comments, but this can be overridden by passing ``combine=True`` in the constructor. If ``combine`` is set to ``True``, the matching tokens are returned as a single token string, with the delimiters included; otherwise, the matching tokens are returned as a list of tokens, with the delimiters suppressed. If ``allow_trailing_delim`` is set to True, then the list may end with a delimiter. Example:: delimited_list(Word(alphas)).parse_string("aa,bb,cc") # -> ['aa', 'bb', 'cc'] delimited_list(Word(hexnums), delim=':', combine=True).parse_string("AA:BB:CC:DD:EE") # -> ['AA:BB:CC:DD:EE'] """ if isinstance(expr, str_type): expr = ParserElement._literalStringClass(expr) dlName = "{expr} [{delim} {expr}]...{end}".format( expr=str(expr.copy().streamline()), delim=str(delim), end=" [{}]".format(str(delim)) if allow_trailing_delim else "", ) if not combine: delim = Suppress(delim) if min is not None: if min < 1: raise ValueError("min must be greater than 0") min -= 1 if max is not None: if min is not None and max <= min: raise ValueError("max must be greater than, or equal to min") max -= 1 delimited_list_expr = expr + (delim + expr)[min, max] if allow_trailing_delim: delimited_list_expr += Opt(delim) if combine: return Combine(delimited_list_expr).set_name(dlName) else: return delimited_list_expr.set_name(dlName) def counted_array( expr: ParserElement, int_expr: typing.Optional[ParserElement] = None, *, intExpr: typing.Optional[ParserElement] = None, ) -> ParserElement: """Helper to define a counted list of expressions. This helper defines a pattern of the form:: integer expr expr expr... where the leading integer tells how many expr expressions follow. The matched tokens returns the array of expr tokens as a list - the leading count token is suppressed. If ``int_expr`` is specified, it should be a pyparsing expression that produces an integer value. Example:: counted_array(Word(alphas)).parse_string('2 ab cd ef') # -> ['ab', 'cd'] # in this parser, the leading integer value is given in binary, # '10' indicating that 2 values are in the array binary_constant = Word('01').set_parse_action(lambda t: int(t[0], 2)) counted_array(Word(alphas), int_expr=binary_constant).parse_string('10 ab cd ef') # -> ['ab', 'cd'] # if other fields must be parsed after the count but before the # list items, give the fields results names and they will # be preserved in the returned ParseResults: count_with_metadata = integer + Word(alphas)("type") typed_array = counted_array(Word(alphanums), int_expr=count_with_metadata)("items") result = typed_array.parse_string("3 bool True True False") print(result.dump()) # prints # ['True', 'True', 'False'] # - items: ['True', 'True', 'False'] # - type: 'bool' """ intExpr = intExpr or int_expr array_expr = Forward() def count_field_parse_action(s, l, t): nonlocal array_expr n = t[0] array_expr <<= (expr * n) if n else Empty() # clear list contents, but keep any named results del t[:] if intExpr is None: intExpr = Word(nums).set_parse_action(lambda t: int(t[0])) else: intExpr = intExpr.copy() intExpr.set_name("arrayLen") intExpr.add_parse_action(count_field_parse_action, call_during_try=True) return (intExpr + array_expr).set_name("(len) " + str(expr) + "...") def match_previous_literal(expr: ParserElement) -> ParserElement: """Helper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example:: first = Word(nums) second = match_previous_literal(first) match_expr = first + ":" + second will match ``"1:1"``, but not ``"1:2"``. Because this matches a previous literal, will also match the leading ``"1:1"`` in ``"1:10"``. If this is not desired, use :class:`match_previous_expr`. Do *not* use with packrat parsing enabled. """ rep = Forward() def copy_token_to_repeater(s, l, t): if t: if len(t) == 1: rep << t[0] else: # flatten t tokens tflat = _flatten(t.as_list()) rep << And(Literal(tt) for tt in tflat) else: rep << Empty() expr.add_parse_action(copy_token_to_repeater, callDuringTry=True) rep.set_name("(prev) " + str(expr)) return rep def match_previous_expr(expr: ParserElement) -> ParserElement: """Helper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example:: first = Word(nums) second = match_previous_expr(first) match_expr = first + ":" + second will match ``"1:1"``, but not ``"1:2"``. Because this matches by expressions, will *not* match the leading ``"1:1"`` in ``"1:10"``; the expressions are evaluated first, and then compared, so ``"1"`` is compared with ``"10"``. Do *not* use with packrat parsing enabled. """ rep = Forward() e2 = expr.copy() rep <<= e2 def copy_token_to_repeater(s, l, t): matchTokens = _flatten(t.as_list()) def must_match_these_tokens(s, l, t): theseTokens = _flatten(t.as_list()) if theseTokens != matchTokens: raise ParseException( s, l, "Expected {}, found{}".format(matchTokens, theseTokens) ) rep.set_parse_action(must_match_these_tokens, callDuringTry=True) expr.add_parse_action(copy_token_to_repeater, callDuringTry=True) rep.set_name("(prev) " + str(expr)) return rep def one_of( strs: Union[typing.Iterable[str], str], caseless: bool = False, use_regex: bool = True, as_keyword: bool = False, *, useRegex: bool = True, asKeyword: bool = False, ) -> ParserElement: """Helper to quickly define a set of alternative :class:`Literal` s, and makes sure to do longest-first testing when there is a conflict, regardless of the input order, but returns a :class:`MatchFirst` for best performance. Parameters: - ``strs`` - a string of space-delimited literals, or a collection of string literals - ``caseless`` - treat all literals as caseless - (default= ``False``) - ``use_regex`` - as an optimization, will generate a :class:`Regex` object; otherwise, will generate a :class:`MatchFirst` object (if ``caseless=True`` or ``asKeyword=True``, or if creating a :class:`Regex` raises an exception) - (default= ``True``) - ``as_keyword`` - enforce :class:`Keyword`-style matching on the generated expressions - (default= ``False``) - ``asKeyword`` and ``useRegex`` are retained for pre-PEP8 compatibility, but will be removed in a future release Example:: comp_oper = one_of("< = > <= >= !=") var = Word(alphas) number = Word(nums) term = var | number comparison_expr = term + comp_oper + term print(comparison_expr.search_string("B = 12 AA=23 B<=AA AA>12")) prints:: [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']] """ asKeyword = asKeyword or as_keyword useRegex = useRegex and use_regex if ( isinstance(caseless, str_type) and __diag__.warn_on_multiple_string_args_to_oneof ): warnings.warn( "More than one string argument passed to one_of, pass" " choices as a list or space-delimited string", stacklevel=2, ) if caseless: isequal = lambda a, b: a.upper() == b.upper() masks = lambda a, b: b.upper().startswith(a.upper()) parseElementClass = CaselessKeyword if asKeyword else CaselessLiteral else: isequal = lambda a, b: a == b masks = lambda a, b: b.startswith(a) parseElementClass = Keyword if asKeyword else Literal symbols: List[str] = [] if isinstance(strs, str_type): symbols = strs.split() elif isinstance(strs, Iterable): symbols = list(strs) else: raise TypeError("Invalid argument to one_of, expected string or iterable") if not symbols: return NoMatch() # reorder given symbols to take care to avoid masking longer choices with shorter ones # (but only if the given symbols are not just single characters) if any(len(sym) > 1 for sym in symbols): i = 0 while i < len(symbols) - 1: cur = symbols[i] for j, other in enumerate(symbols[i + 1 :]): if isequal(other, cur): del symbols[i + j + 1] break elif masks(cur, other): del symbols[i + j + 1] symbols.insert(i, other) break else: i += 1 if useRegex: re_flags: int = re.IGNORECASE if caseless else 0 try: if all(len(sym) == 1 for sym in symbols): # symbols are just single characters, create range regex pattern patt = "[{}]".format( "".join(_escape_regex_range_chars(sym) for sym in symbols) ) else: patt = "|".join(re.escape(sym) for sym in symbols) # wrap with \b word break markers if defining as keywords if asKeyword: patt = r"\b(?:{})\b".format(patt) ret = Regex(patt, flags=re_flags).set_name(" | ".join(symbols)) if caseless: # add parse action to return symbols as specified, not in random # casing as found in input string symbol_map = {sym.lower(): sym for sym in symbols} ret.add_parse_action(lambda s, l, t: symbol_map[t[0].lower()]) return ret except re.error: warnings.warn( "Exception creating Regex for one_of, building MatchFirst", stacklevel=2 ) # last resort, just use MatchFirst return MatchFirst(parseElementClass(sym) for sym in symbols).set_name( " | ".join(symbols) ) def dict_of(key: ParserElement, value: ParserElement) -> ParserElement: """Helper to easily and clearly define a dictionary by specifying the respective patterns for the key and value. Takes care of defining the :class:`Dict`, :class:`ZeroOrMore`, and :class:`Group` tokens in the proper order. The key pattern can include delimiting markers or punctuation, as long as they are suppressed, thereby leaving the significant key text. The value pattern can include named results, so that the :class:`Dict` results can include named token fields. Example:: text = "shape: SQUARE posn: upper left color: light blue texture: burlap" attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) print(attr_expr[1, ...].parse_string(text).dump()) attr_label = label attr_value = Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join) # similar to Dict, but simpler call format result = dict_of(attr_label, attr_value).parse_string(text) print(result.dump()) print(result['shape']) print(result.shape) # object attribute access works too print(result.as_dict()) prints:: [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']] - color: 'light blue' - posn: 'upper left' - shape: 'SQUARE' - texture: 'burlap' SQUARE SQUARE {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'} """ return Dict(OneOrMore(Group(key + value))) def original_text_for( expr: ParserElement, as_string: bool = True, *, asString: bool = True ) -> ParserElement: """Helper to return the original, untokenized text for a given expression. Useful to restore the parsed fields of an HTML start tag into the raw tag text itself, or to revert separate tokens with intervening whitespace back to the original matching input text. By default, returns astring containing the original parsed text. If the optional ``as_string`` argument is passed as ``False``, then the return value is a :class:`ParseResults` containing any results names that were originally matched, and a single token containing the original matched text from the input string. So if the expression passed to :class:`original_text_for` contains expressions with defined results names, you must set ``as_string`` to ``False`` if you want to preserve those results name values. The ``asString`` pre-PEP8 argument is retained for compatibility, but will be removed in a future release. Example:: src = "this is test bold text normal text " for tag in ("b", "i"): opener, closer = make_html_tags(tag) patt = original_text_for(opener + SkipTo(closer) + closer) print(patt.search_string(src)[0]) prints:: [' bold text '] ['text'] """ asString = asString and as_string locMarker = Empty().set_parse_action(lambda s, loc, t: loc) endlocMarker = locMarker.copy() endlocMarker.callPreparse = False matchExpr = locMarker("_original_start") + expr + endlocMarker("_original_end") if asString: extractText = lambda s, l, t: s[t._original_start : t._original_end] else: def extractText(s, l, t): t[:] = [s[t.pop("_original_start") : t.pop("_original_end")]] matchExpr.set_parse_action(extractText) matchExpr.ignoreExprs = expr.ignoreExprs matchExpr.suppress_warning(Diagnostics.warn_ungrouped_named_tokens_in_collection) return matchExpr def ungroup(expr: ParserElement) -> ParserElement: """Helper to undo pyparsing's default grouping of And expressions, even if all but one are non-empty. """ return TokenConverter(expr).add_parse_action(lambda t: t[0]) def locatedExpr(expr: ParserElement) -> ParserElement: """ (DEPRECATED - future code should use the Located class) Helper to decorate a returned token with its starting and ending locations in the input string. This helper adds the following results names: - ``locn_start`` - location where matched expression begins - ``locn_end`` - location where matched expression ends - ``value`` - the actual parsed results Be careful if the input text contains ```` characters, you may want to call :class:`ParserElement.parseWithTabs` Example:: wd = Word(alphas) for match in locatedExpr(wd).searchString("ljsdf123lksdjjf123lkkjj1222"): print(match) prints:: [[0, 'ljsdf', 5]] [[8, 'lksdjjf', 15]] [[18, 'lkkjj', 23]] """ locator = Empty().set_parse_action(lambda ss, ll, tt: ll) return Group( locator("locn_start") + expr("value") + locator.copy().leaveWhitespace()("locn_end") ) def nested_expr( opener: Union[str, ParserElement] = "(", closer: Union[str, ParserElement] = ")", content: typing.Optional[ParserElement] = None, ignore_expr: ParserElement = quoted_string(), *, ignoreExpr: ParserElement = quoted_string(), ) -> ParserElement: """Helper method for defining nested lists enclosed in opening and closing delimiters (``"("`` and ``")"`` are the default). Parameters: - ``opener`` - opening character for a nested list (default= ``"("``); can also be a pyparsing expression - ``closer`` - closing character for a nested list (default= ``")"``); can also be a pyparsing expression - ``content`` - expression for items within the nested lists (default= ``None``) - ``ignore_expr`` - expression for ignoring opening and closing delimiters (default= :class:`quoted_string`) - ``ignoreExpr`` - this pre-PEP8 argument is retained for compatibility but will be removed in a future release If an expression is not provided for the content argument, the nested expression will capture all whitespace-delimited content between delimiters as a list of separate values. Use the ``ignore_expr`` argument to define expressions that may contain opening or closing characters that should not be treated as opening or closing characters for nesting, such as quoted_string or a comment expression. Specify multiple expressions using an :class:`Or` or :class:`MatchFirst`. The default is :class:`quoted_string`, but if no expressions are to be ignored, then pass ``None`` for this argument. Example:: data_type = one_of("void int short long char float double") decl_data_type = Combine(data_type + Opt(Word('*'))) ident = Word(alphas+'_', alphanums+'_') number = pyparsing_common.number arg = Group(decl_data_type + ident) LPAR, RPAR = map(Suppress, "()") code_body = nested_expr('{', '}', ignore_expr=(quoted_string | c_style_comment)) c_function = (decl_data_type("type") + ident("name") + LPAR + Opt(delimited_list(arg), [])("args") + RPAR + code_body("body")) c_function.ignore(c_style_comment) source_code = ''' int is_odd(int x) { return (x%2); } int dec_to_hex(char hchar) { if (hchar >= '0' && hchar <= '9') { return (ord(hchar)-ord('0')); } else { return (10+ord(hchar)-ord('A')); } } ''' for func in c_function.search_string(source_code): print("%(name)s (%(type)s) args: %(args)s" % func) prints:: is_odd (int) args: [['int', 'x']] dec_to_hex (int) args: [['char', 'hchar']] """ if ignoreExpr != ignore_expr: ignoreExpr = ignore_expr if ignoreExpr == quoted_string() else ignoreExpr if opener == closer: raise ValueError("opening and closing strings cannot be the same") if content is None: if isinstance(opener, str_type) and isinstance(closer, str_type): if len(opener) == 1 and len(closer) == 1: if ignoreExpr is not None: content = Combine( OneOrMore( ~ignoreExpr + CharsNotIn( opener + closer + ParserElement.DEFAULT_WHITE_CHARS, exact=1, ) ) ).set_parse_action(lambda t: t[0].strip()) else: content = empty.copy() + CharsNotIn( opener + closer + ParserElement.DEFAULT_WHITE_CHARS ).set_parse_action(lambda t: t[0].strip()) else: if ignoreExpr is not None: content = Combine( OneOrMore( ~ignoreExpr + ~Literal(opener) + ~Literal(closer) + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS, exact=1) ) ).set_parse_action(lambda t: t[0].strip()) else: content = Combine( OneOrMore( ~Literal(opener) + ~Literal(closer) + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS, exact=1) ) ).set_parse_action(lambda t: t[0].strip()) else: raise ValueError( "opening and closing arguments must be strings if no content expression is given" ) ret = Forward() if ignoreExpr is not None: ret <<= Group( Suppress(opener) + ZeroOrMore(ignoreExpr | ret | content) + Suppress(closer) ) else: ret <<= Group(Suppress(opener) + ZeroOrMore(ret | content) + Suppress(closer)) ret.set_name("nested %s%s expression" % (opener, closer)) return ret def _makeTags(tagStr, xml, suppress_LT=Suppress("<"), suppress_GT=Suppress(">")): """Internal helper to construct opening and closing tag expressions, given a tag name""" if isinstance(tagStr, str_type): resname = tagStr tagStr = Keyword(tagStr, caseless=not xml) else: resname = tagStr.name tagAttrName = Word(alphas, alphanums + "_-:") if xml: tagAttrValue = dbl_quoted_string.copy().set_parse_action(remove_quotes) openTag = ( suppress_LT + tagStr("tag") + Dict(ZeroOrMore(Group(tagAttrName + Suppress("=") + tagAttrValue))) + Opt("/", default=[False])("empty").set_parse_action( lambda s, l, t: t[0] == "/" ) + suppress_GT ) else: tagAttrValue = quoted_string.copy().set_parse_action(remove_quotes) | Word( printables, exclude_chars=">" ) openTag = ( suppress_LT + tagStr("tag") + Dict( ZeroOrMore( Group( tagAttrName.set_parse_action(lambda t: t[0].lower()) + Opt(Suppress("=") + tagAttrValue) ) ) ) + Opt("/", default=[False])("empty").set_parse_action( lambda s, l, t: t[0] == "/" ) + suppress_GT ) closeTag = Combine(Literal("", adjacent=False) openTag.set_name("<%s>" % resname) # add start results name in parse action now that ungrouped names are not reported at two levels openTag.add_parse_action( lambda t: t.__setitem__( "start" + "".join(resname.replace(":", " ").title().split()), t.copy() ) ) closeTag = closeTag( "end" + "".join(resname.replace(":", " ").title().split()) ).set_name("" % resname) openTag.tag = resname closeTag.tag = resname openTag.tag_body = SkipTo(closeTag()) return openTag, closeTag def make_html_tags( tag_str: Union[str, ParserElement] ) -> Tuple[ParserElement, ParserElement]: """Helper to construct opening and closing tag expressions for HTML, given a tag name. Matches tags in either upper or lower case, attributes with namespaces and with quoted or unquoted values. Example:: text = 'More info at the
pyparsing wiki page' # make_html_tags returns pyparsing expressions for the opening and # closing tags as a 2-tuple a, a_end = make_html_tags("A") link_expr = a + SkipTo(a_end)("link_text") + a_end for link in link_expr.search_string(text): # attributes in the tag (like "href" shown here) are # also accessible as named results print(link.link_text, '->', link.href) prints:: pyparsing -> https://github.com/pyparsing/pyparsing/wiki """ return _makeTags(tag_str, False) def make_xml_tags( tag_str: Union[str, ParserElement] ) -> Tuple[ParserElement, ParserElement]: """Helper to construct opening and closing tag expressions for XML, given a tag name. Matches tags only in the given upper/lower case. Example: similar to :class:`make_html_tags` """ return _makeTags(tag_str, True) any_open_tag: ParserElement any_close_tag: ParserElement any_open_tag, any_close_tag = make_html_tags( Word(alphas, alphanums + "_:").set_name("any tag") ) _htmlEntityMap = {k.rstrip(";"): v for k, v in html.entities.html5.items()} common_html_entity = Regex("&(?P" + "|".join(_htmlEntityMap) + ");").set_name( "common HTML entity" ) def replace_html_entity(t): """Helper parser action to replace common HTML entities with their special characters""" return _htmlEntityMap.get(t.entity) class OpAssoc(Enum): LEFT = 1 RIGHT = 2 InfixNotationOperatorArgType = Union[ ParserElement, str, Tuple[Union[ParserElement, str], Union[ParserElement, str]] ] InfixNotationOperatorSpec = Union[ Tuple[ InfixNotationOperatorArgType, int, OpAssoc, typing.Optional[ParseAction], ], Tuple[ InfixNotationOperatorArgType, int, OpAssoc, ], ] def infix_notation( base_expr: ParserElement, op_list: List[InfixNotationOperatorSpec], lpar: Union[str, ParserElement] = Suppress("("), rpar: Union[str, ParserElement] = Suppress(")"), ) -> ParserElement: """Helper method for constructing grammars of expressions made up of operators working in a precedence hierarchy. Operators may be unary or binary, left- or right-associative. Parse actions can also be attached to operator expressions. The generated parser will also recognize the use of parentheses to override operator precedences (see example below). Note: if you define a deep operator list, you may see performance issues when using infix_notation. See :class:`ParserElement.enable_packrat` for a mechanism to potentially improve your parser performance. Parameters: - ``base_expr`` - expression representing the most basic operand to be used in the expression - ``op_list`` - list of tuples, one for each operator precedence level in the expression grammar; each tuple is of the form ``(op_expr, num_operands, right_left_assoc, (optional)parse_action)``, where: - ``op_expr`` is the pyparsing expression for the operator; may also be a string, which will be converted to a Literal; if ``num_operands`` is 3, ``op_expr`` is a tuple of two expressions, for the two operators separating the 3 terms - ``num_operands`` is the number of terms for this operator (must be 1, 2, or 3) - ``right_left_assoc`` is the indicator whether the operator is right or left associative, using the pyparsing-defined constants ``OpAssoc.RIGHT`` and ``OpAssoc.LEFT``. - ``parse_action`` is the parse action to be associated with expressions matching this operator expression (the parse action tuple member may be omitted); if the parse action is passed a tuple or list of functions, this is equivalent to calling ``set_parse_action(*fn)`` (:class:`ParserElement.set_parse_action`) - ``lpar`` - expression for matching left-parentheses; if passed as a str, then will be parsed as Suppress(lpar). If lpar is passed as an expression (such as ``Literal('(')``), then it will be kept in the parsed results, and grouped with them. (default= ``Suppress('(')``) - ``rpar`` - expression for matching right-parentheses; if passed as a str, then will be parsed as Suppress(rpar). If rpar is passed as an expression (such as ``Literal(')')``), then it will be kept in the parsed results, and grouped with them. (default= ``Suppress(')')``) Example:: # simple example of four-function arithmetic with ints and # variable names integer = pyparsing_common.signed_integer varname = pyparsing_common.identifier arith_expr = infix_notation(integer | varname, [ ('-', 1, OpAssoc.RIGHT), (one_of('* /'), 2, OpAssoc.LEFT), (one_of('+ -'), 2, OpAssoc.LEFT), ]) arith_expr.run_tests(''' 5+3*6 (5+3)*6 -2--11 ''', full_dump=False) prints:: 5+3*6 [[5, '+', [3, '*', 6]]] (5+3)*6 [[[5, '+', 3], '*', 6]] -2--11 [[['-', 2], '-', ['-', 11]]] """ # captive version of FollowedBy that does not do parse actions or capture results names class _FB(FollowedBy): def parseImpl(self, instring, loc, doActions=True): self.expr.try_parse(instring, loc) return loc, [] _FB.__name__ = "FollowedBy>" ret = Forward() if isinstance(lpar, str): lpar = Suppress(lpar) if isinstance(rpar, str): rpar = Suppress(rpar) # if lpar and rpar are not suppressed, wrap in group if not (isinstance(rpar, Suppress) and isinstance(rpar, Suppress)): lastExpr = base_expr | Group(lpar + ret + rpar) else: lastExpr = base_expr | (lpar + ret + rpar) for i, operDef in enumerate(op_list): opExpr, arity, rightLeftAssoc, pa = (operDef + (None,))[:4] if isinstance(opExpr, str_type): opExpr = ParserElement._literalStringClass(opExpr) if arity == 3: if not isinstance(opExpr, (tuple, list)) or len(opExpr) != 2: raise ValueError( "if numterms=3, opExpr must be a tuple or list of two expressions" ) opExpr1, opExpr2 = opExpr term_name = "{}{} term".format(opExpr1, opExpr2) else: term_name = "{} term".format(opExpr) if not 1 <= arity <= 3: raise ValueError("operator must be unary (1), binary (2), or ternary (3)") if rightLeftAssoc not in (OpAssoc.LEFT, OpAssoc.RIGHT): raise ValueError("operator must indicate right or left associativity") thisExpr: Forward = Forward().set_name(term_name) if rightLeftAssoc is OpAssoc.LEFT: if arity == 1: matchExpr = _FB(lastExpr + opExpr) + Group(lastExpr + opExpr[1, ...]) elif arity == 2: if opExpr is not None: matchExpr = _FB(lastExpr + opExpr + lastExpr) + Group( lastExpr + (opExpr + lastExpr)[1, ...] ) else: matchExpr = _FB(lastExpr + lastExpr) + Group(lastExpr[2, ...]) elif arity == 3: matchExpr = _FB( lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr ) + Group(lastExpr + OneOrMore(opExpr1 + lastExpr + opExpr2 + lastExpr)) elif rightLeftAssoc is OpAssoc.RIGHT: if arity == 1: # try to avoid LR with this extra test if not isinstance(opExpr, Opt): opExpr = Opt(opExpr) matchExpr = _FB(opExpr.expr + thisExpr) + Group(opExpr + thisExpr) elif arity == 2: if opExpr is not None: matchExpr = _FB(lastExpr + opExpr + thisExpr) + Group( lastExpr + (opExpr + thisExpr)[1, ...] ) else: matchExpr = _FB(lastExpr + thisExpr) + Group( lastExpr + thisExpr[1, ...] ) elif arity == 3: matchExpr = _FB( lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr ) + Group(lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr) if pa: if isinstance(pa, (tuple, list)): matchExpr.set_parse_action(*pa) else: matchExpr.set_parse_action(pa) thisExpr <<= (matchExpr | lastExpr).setName(term_name) lastExpr = thisExpr ret <<= lastExpr return ret def indentedBlock(blockStatementExpr, indentStack, indent=True, backup_stacks=[]): """ (DEPRECATED - use IndentedBlock class instead) Helper method for defining space-delimited indentation blocks, such as those used to define block statements in Python source code. Parameters: - ``blockStatementExpr`` - expression defining syntax of statement that is repeated within the indented block - ``indentStack`` - list created by caller to manage indentation stack (multiple ``statementWithIndentedBlock`` expressions within a single grammar should share a common ``indentStack``) - ``indent`` - boolean indicating whether block must be indented beyond the current level; set to ``False`` for block of left-most statements (default= ``True``) A valid block must contain at least one ``blockStatement``. (Note that indentedBlock uses internal parse actions which make it incompatible with packrat parsing.) Example:: data = ''' def A(z): A1 B = 100 G = A2 A2 A3 B def BB(a,b,c): BB1 def BBA(): bba1 bba2 bba3 C D def spam(x,y): def eggs(z): pass ''' indentStack = [1] stmt = Forward() identifier = Word(alphas, alphanums) funcDecl = ("def" + identifier + Group("(" + Opt(delimitedList(identifier)) + ")") + ":") func_body = indentedBlock(stmt, indentStack) funcDef = Group(funcDecl + func_body) rvalue = Forward() funcCall = Group(identifier + "(" + Opt(delimitedList(rvalue)) + ")") rvalue << (funcCall | identifier | Word(nums)) assignment = Group(identifier + "=" + rvalue) stmt << (funcDef | assignment | identifier) module_body = stmt[1, ...] parseTree = module_body.parseString(data) parseTree.pprint() prints:: [['def', 'A', ['(', 'z', ')'], ':', [['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]], 'B', ['def', 'BB', ['(', 'a', 'b', 'c', ')'], ':', [['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]], 'C', 'D', ['def', 'spam', ['(', 'x', 'y', ')'], ':', [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]] """ backup_stacks.append(indentStack[:]) def reset_stack(): indentStack[:] = backup_stacks[-1] def checkPeerIndent(s, l, t): if l >= len(s): return curCol = col(l, s) if curCol != indentStack[-1]: if curCol > indentStack[-1]: raise ParseException(s, l, "illegal nesting") raise ParseException(s, l, "not a peer entry") def checkSubIndent(s, l, t): curCol = col(l, s) if curCol > indentStack[-1]: indentStack.append(curCol) else: raise ParseException(s, l, "not a subentry") def checkUnindent(s, l, t): if l >= len(s): return curCol = col(l, s) if not (indentStack and curCol in indentStack): raise ParseException(s, l, "not an unindent") if curCol < indentStack[-1]: indentStack.pop() NL = OneOrMore(LineEnd().set_whitespace_chars("\t ").suppress()) INDENT = (Empty() + Empty().set_parse_action(checkSubIndent)).set_name("INDENT") PEER = Empty().set_parse_action(checkPeerIndent).set_name("") UNDENT = Empty().set_parse_action(checkUnindent).set_name("UNINDENT") if indent: smExpr = Group( Opt(NL) + INDENT + OneOrMore(PEER + Group(blockStatementExpr) + Opt(NL)) + UNDENT ) else: smExpr = Group( Opt(NL) + OneOrMore(PEER + Group(blockStatementExpr) + Opt(NL)) + Opt(UNDENT) ) # add a parse action to remove backup_stack from list of backups smExpr.add_parse_action( lambda: backup_stacks.pop(-1) and None if backup_stacks else None ) smExpr.set_fail_action(lambda a, b, c, d: reset_stack()) blockStatementExpr.ignore(_bslash + LineEnd()) return smExpr.set_name("indented block") # it's easy to get these comment structures wrong - they're very common, so may as well make them available c_style_comment = Combine(Regex(r"/\*(?:[^*]|\*(?!/))*") + "*/").set_name( "C style comment" ) "Comment of the form ``/* ... */``" html_comment = Regex(r"").set_name("HTML comment") "Comment of the form ````" rest_of_line = Regex(r".*").leave_whitespace().set_name("rest of line") dbl_slash_comment = Regex(r"//(?:\\\n|[^\n])*").set_name("// comment") "Comment of the form ``// ... (to end of line)``" cpp_style_comment = Combine( Regex(r"/\*(?:[^*]|\*(?!/))*") + "*/" | dbl_slash_comment ).set_name("C++ style comment") "Comment of either form :class:`c_style_comment` or :class:`dbl_slash_comment`" java_style_comment = cpp_style_comment "Same as :class:`cpp_style_comment`" python_style_comment = Regex(r"#.*").set_name("Python style comment") "Comment of the form ``# ... (to end of line)``" # build list of built-in expressions, for future reference if a global default value # gets updated _builtin_exprs: List[ParserElement] = [ v for v in vars().values() if isinstance(v, ParserElement) ] # pre-PEP8 compatible names delimitedList = delimited_list countedArray = counted_array matchPreviousLiteral = match_previous_literal matchPreviousExpr = match_previous_expr oneOf = one_of dictOf = dict_of originalTextFor = original_text_for nestedExpr = nested_expr makeHTMLTags = make_html_tags makeXMLTags = make_xml_tags anyOpenTag, anyCloseTag = any_open_tag, any_close_tag commonHTMLEntity = common_html_entity replaceHTMLEntity = replace_html_entity opAssoc = OpAssoc infixNotation = infix_notation cStyleComment = c_style_comment htmlComment = html_comment restOfLine = rest_of_line dblSlashComment = dbl_slash_comment cppStyleComment = cpp_style_comment javaStyleComment = java_style_comment pythonStyleComment = python_style_comment PK|5ZAV{??[Lib/site-packages/pkg_resources/_vendor/more_itertools/__pycache__/__init__.cpython-311.pycnuW+A ^;dSddlTddlTdZdS))*z8.12.0N)morerecipes __version__|E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/more_itertools/__init__.pyr s& rPK|5Z(B[i[iZLib/site-packages/pkg_resources/_vendor/more_itertools/__pycache__/recipes.cpython-311.pycnuW+A ^;dGdZddlZddlmZddlmZmZmZmZm Z m Z m Z m Z m Z mZddlZddlmZmZmZgdZdZd*dZd Zd+d Zd+d Zd Zefd ZdZeZdZdZ dZ!d+dZ"dZ# ddlm$Z%dZ$e#je$_n #e&$re#Z$YnwxYwd+dZ'dZ(dZ)dZ*d+dZ+d+dZ,d+dZ-d,dZ.ddd Z/d+d!Z0d"Z1d#Z2d$Z3d%Z4d&Z5d'Z6d(Z7d)Z8dS)-aImported from the recipes section of the itertools documentation. All functions taken from the recipes section of the itertools library docs [1]_. Some backward-compatible usability improvements have been made. .. [1] http://docs.python.org/library/itertools.html#recipes N)deque) chain combinationscountcyclegroupbyislicerepeatstarmaptee zip_longest) randrangesamplechoice) all_equalbefore_and_afterconsumeconvolve dotproduct first_trueflattengrouper iter_exceptncyclesnthnth_combinationpadnonepad_nonepairwise partitionpowersetprependquantify#random_combination_with_replacementrandom_combinationrandom_permutationrandom_product repeatfunc roundrobinsliding_windowtabulatetailtake triplewiseunique_everseenunique_justseenc<tt||S)zReturn first *n* items of the iterable as a list. >>> take(3, range(10)) [0, 1, 2] If there are fewer than *n* items in the iterable, all of them are returned. >>> take(10, range(3)) [0, 1, 2] )listr niterables {E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/more_itertools/recipes.pyr-r-?s x## $ $$c<t|t|S)aReturn an iterator over the results of ``func(start)``, ``func(start + 1)``, ``func(start + 2)``... *func* should be a function that accepts one integer argument. If *start* is not specified it defaults to 0. It will be incremented each time the iterator is advanced. >>> square = lambda x: x ** 2 >>> iterator = tabulate(square, -3) >>> take(4, iterator) [9, 4, 1, 0] )mapr)functionstarts r6r+r+Os xu & &&r7c>tt||S)zReturn an iterator over the last *n* items of *iterable*. >>> t = tail(3, 'ABCDEFG') >>> list(t) ['E', 'F', 'G'] maxlen)iterrr3s r6r,r,as hq))) * **r7cn|t|ddStt|||ddS)aXAdvance *iterable* by *n* steps. If *n* is ``None``, consume it entirely. Efficiently exhausts an iterator without returning values. Defaults to consuming the whole iterator, but an optional second argument may be provided to limit consumption. >>> i = (x for x in range(10)) >>> next(i) 0 >>> consume(i, 3) >>> next(i) 4 >>> consume(i) >>> next(i) Traceback (most recent call last): File "", line 1, in StopIteration If the iterator has fewer items remaining than the provided limit, the whole iterator will be consumed. >>> i = (x for x in range(3)) >>> consume(i, 5) >>> next(i) Traceback (most recent call last): File "", line 1, in StopIteration Nrr=)rnextr )iteratorr4s r6rrlsG@ y hq!!!!!! VHa # #T*****r7c@tt||d|S)zReturns the nth item or a default value. >>> l = range(10) >>> nth(l, 3) 3 >>> nth(l, 20, "zebra") 'zebra' N)rAr )r5r4defaults r6rrs  xD))7 3 33r7cbt|}t|dot|d S)z Returns ``True`` if all the elements are equal to each other. >>> all_equal('aaaa') True >>> all_equal('aaab') False TF)rrA)r5gs r6rrs/ A 4== /a//r7c<tt||S)zcReturn the how many times the predicate is true. >>> quantify([True, False, True]) 2 )sumr9)r5preds r6r#r#s s4"" # ##r7c<t|tdS)aReturns the sequence of elements and then returns ``None`` indefinitely. >>> take(5, pad_none(range(3))) [0, 1, 2, None, None] Useful for emulating the behavior of the built-in :func:`map` function. See also :func:`padded`. N)rr r5s r6rrs 6$<< ( ((r7c`tjtt||S)zvReturns the sequence elements *n* times >>> list(ncycles(["a", "b"], 3)) ['a', 'b', 'a', 'b', 'a', 'b'] )r from_iterabler tuple)r5r4s r6rrs%  veHooq99 : ::r7cRtttj||S)zcReturns the dot product of the two iterables. >>> dotproduct([10, 10], [20, 20]) 400 )rHr9operatormul)vec1vec2s r6rrs  s8<t,, - --r7c*tj|S)zReturn an iterator flattening one level of nesting in a list of lists. >>> list(flatten([[0, 1], [2, 3]])) [0, 1, 2, 3] See also :func:`collapse`, which can flatten multiple levels of nesting. )rrM) listOfListss r6rrs  { + ++r7c||t|t|St|t||S)aGCall *func* with *args* repeatedly, returning an iterable over the results. If *times* is specified, the iterable will terminate after that many repetitions: >>> from operator import add >>> times = 4 >>> args = 3, 5 >>> list(repeatfunc(add, times, *args)) [8, 8, 8, 8] If *times* is ``None`` the iterable will not terminate: >>> from random import randrange >>> times = None >>> args = 1, 11 >>> take(6, repeatfunc(randrange, times, *args)) # doctest:+SKIP [2, 4, 8, 1, 8, 4] )r r )functimesargss r6r(r(s9, }tVD\\*** 4e,, - --r7c#zKt|\}}t|dt||Ed{VdS)zReturns an iterator of paired items, overlapping, from the original >>> take(4, pairwise(count())) [(0, 1), (1, 2), (2, 3), (3, 4)] On Python 3.10 and above, this is an alias for :func:`itertools.pairwise`. N)r rAzip)r5abs r6 _pairwiser^sJ x==DAqDMMM1ayyr7rc#4Kt|Ed{VdSN)itertools_pairwiserKs r6rrs,%h///////////r7ct|trtjdt||}}t |g|z}t |d|iS)zCollect data into fixed-length chunks or blocks. >>> list(grouper('ABCDEFG', 3, 'x')) [('A', 'B', 'C'), ('D', 'E', 'F'), ('G', 'x', 'x')] z+grouper expects iterable as first parameter fillvalue) isinstanceintwarningswarnDeprecationWarningr?r )r5r4rdrYs r6rrsa(C  " 9;M   8 NN a D T 2 2 22r7c'Kt|}td|D}|rI |D]}|Vn2#t$r%|dz}tt||}YnwxYw|GdSdS)aJYields an item from each iterable, alternating between them. >>> list(roundrobin('ABC', 'D', 'EF')) ['A', 'D', 'E', 'B', 'F', 'C'] This function produces the same output as :func:`interleave_longest`, but may perform better for some inputs (in particular when the number of iterables is small). c3>K|]}t|jVdSra)r?__next__).0its r6 zroundrobin..<s+88$r((#888888r7N)lenr StopIterationr ) iterablespendingnextsrAs r6r)r)/s)nnG 88i888 8 8E 2 2  dff   2 2 2 qLG&0011EEE 2 22222sA,A/.A/ctfd|D}t|\}}d|Dd|DfS)a Returns a 2-tuple of iterables derived from the input iterable. The first yields the items that have ``pred(item) == False``. The second yields the items that have ``pred(item) == True``. >>> is_odd = lambda x: x % 2 != 0 >>> iterable = range(10) >>> even_items, odd_items = partition(is_odd, iterable) >>> list(even_items), list(odd_items) ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9]) If *pred* is None, :func:`bool` is used. >>> iterable = [0, 1, False, True, '', ' '] >>> false_items, true_items = partition(None, iterable) >>> list(false_items), list(true_items) ([0, False, ''], [1, True, ' ']) Nc32K|]}||fVdSra)rmxrIs r6rozpartition..]s/22ADDGGQ<222222r7c3$K|] \}}||V dSrarxrmcondrys r6rozpartition..`s+++yad+++++++r7c3$K|] \}}||V dSrarxr{s r6rozpartition..as+''ya$'''''''r7)boolr )rIr5 evaluationst1t2s` r6r r Fse( |2222222K   FB++B+++''B''' r7ct|tjfdtt dzDS)aYields all possible subsets of the iterable. >>> list(powerset([1, 2, 3])) [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)] :func:`powerset` will operate on iterables that aren't :class:`set` instances, so repeated elements in the input will produce repeated elements in the output. Use :func:`unique_everseen` on the input to avoid generating duplicates: >>> seq = [1, 1, 0] >>> list(powerset(seq)) [(), (1,), (1,), (0,), (1, 1), (1, 0), (1, 0), (1, 1, 0)] >>> from more_itertools import unique_everseen >>> list(powerset(unique_everseen(seq))) [(), (1,), (0,), (1, 0)] c38K|]}t|VdSra)r)rmrss r6rozpowerset..ys-MMa|Aq11MMMMMMr7rp)r2rrMrangerq)r5rs @r6r!r!esH& XA  MMMM5Q!;L;LMMM M MMr7c#Kt}|j}g}|j}|du}|D]H}|r ||n|} ||vr|||V&#t$r||vr|||VYEwxYwdS)a Yield unique elements, preserving order. >>> list(unique_everseen('AAAABBBCCDAABBB')) ['A', 'B', 'C', 'D'] >>> list(unique_everseen('ABBCcAD', str.lower)) ['A', 'B', 'C', 'D'] Sequences with a mix of hashable and unhashable items can be used. The function will be slower (i.e., `O(n^2)`) for unhashable items. Remember that ``list`` objects are unhashable - you can use the *key* parameter to transform the list to a tuple (which is hashable) to avoid a slowdown. >>> iterable = ([1, 2], [2, 3], [1, 2]) >>> list(unique_everseen(iterable)) # Slow [[1, 2], [2, 3]] >>> list(unique_everseen(iterable, key=tuple)) # Faster [[1, 2], [2, 3]] Similary, you may want to convert unhashable ``set`` objects with ``key=frozenset``. For ``dict`` objects, ``key=lambda x: frozenset(x.items())`` can be used. N)setaddappend TypeError) r5keyseenset seenset_addseenlist seenlist_adduse_keyelementks r6r/r/|s6eeG+KH?LoG  # 0CCLLL  A       Q    sA  A-,A-c ttttjdt ||S)zYields elements in order, ignoring serial duplicates >>> list(unique_justseen('AAAABBBCCDAABBB')) ['A', 'B', 'C', 'D', 'A', 'B'] >>> list(unique_justseen('ABBCcAD', str.lower)) ['A', 'B', 'C', 'A', 'D'] rp)r9rArP itemgetterr)r5rs r6r0r0s3 tS,Q//31G1GHH I IIr7c#XK | |V |V #|$rYdSwxYw)aYields results from a function repeatedly until an exception is raised. Converts a call-until-exception interface to an iterator interface. Like ``iter(func, sentinel)``, but uses an exception instead of a sentinel to end the loop. >>> l = [0, 1, 2] >>> list(iter_except(l.pop, IndexError)) [2, 1, 0] Multiple exceptions can be specified as a stopping condition: >>> l = [1, 2, 3, '...', 4, 5, 6] >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError))) [7, 6, 5] >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError))) [4, 3, 2] >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError))) [] Nrx)rW exceptionfirsts r6rrs[,  %''MMM $&&LLL       s  ))c>tt|||S)a Returns the first true value in the iterable. If no true value is found, returns *default* If *pred* is not None, returns the first item for which ``pred(item) == True`` . >>> first_true(range(10)) 1 >>> first_true(range(10), pred=lambda x: x > 5) 6 >>> first_true(range(10), default='missing', pred=lambda x: x > 9) 'missing' )rAfilter)r5rDrIs r6rrs" tX&& 0 00r7rp)r cRd|D|z}td|DS)aDraw an item at random from each of the input iterables. >>> random_product('abc', range(4), 'XYZ') # doctest:+SKIP ('c', 3, 'Z') If *repeat* is provided as a keyword argument, that many items will be drawn from each iterable. >>> random_product('abcd', range(4), repeat=2) # doctest:+SKIP ('a', 2, 'd', 3) This equivalent to taking a random selection from ``itertools.product(*args, **kwarg)``. c,g|]}t|SrxrNrmpools r6 z"random_product..s * * *TU4[[ * * *r7c34K|]}t|VdSra)rrs r6roz!random_product..s(00$000000r7r)r rYpoolss r6r'r's9 + *T * * *V 3E 00%000 0 00r7ct|}|t|n|}tt||S)abReturn a random *r* length permutation of the elements in *iterable*. If *r* is not specified or is ``None``, then *r* defaults to the length of *iterable*. >>> random_permutation(range(5)) # doctest:+SKIP (3, 4, 0, 1, 2) This equivalent to taking a random selection from ``itertools.permutations(iterable, r)``. )rNrqr)r5rrs r6r&r&s8 ??DYD AA a ! !!r7ct|t}ttt ||}tfd|DS)zReturn a random *r* length subsequence of the elements in *iterable*. >>> random_combination(range(5), 3) # doctest:+SKIP (2, 3, 4) This equivalent to taking a random selection from ``itertools.combinations(iterable, r)``. c3(K|] }|V dSrarxrmirs r6roz%random_combination..'**Qa******r7)rNrqsortedrr)r5rr4indicesrs @r6r%r%s[ ??D D AVE!HHa(())G ****'*** * **r7ct|ttfdt|D}tfd|DS)aSReturn a random *r* length subsequence of elements in *iterable*, allowing individual elements to be repeated. >>> random_combination_with_replacement(range(3), 5) # doctest:+SKIP (0, 0, 1, 2, 2) This equivalent to taking a random selection from ``itertools.combinations_with_replacement(iterable, r)``. c36K|]}tVdSra)r)rmrr4s r6roz6random_combination_with_replacement..+s)44aYq\\444444r7c3(K|] }|V dSrarxrs r6roz6random_combination_with_replacement..,rr7)rNrqrr)r5rrr4rs @@r6r$r$sg ??D D A444458844444G ****'*** * **r7ct|}t|}|dks||krtd}t|||z }t d|dzD]}|||z |zz|z}|dkr||z }|dks||krt g}|rS||z|z|dz |dz }}}||kr||z}|||z z|z|dz }}||k||d|z |St|S)aEquivalent to ``list(combinations(iterable, r))[index]``. The subsequences of *iterable* that are of length *r* can be ordered lexicographically. :func:`nth_combination` computes the subsequence at sort position *index* directly, without computing the previous subsequences. >>> nth_combination(range(5), 3, 5) (0, 3, 4) ``ValueError`` will be raised If *r* is negative or greater than the length of *iterable*. ``IndexError`` will be raised if the given *index* is invalid. rrp)rNrq ValueErrorminr IndexErrorr) r5rindexrr4crrresults r6rr/s8 ??D D A A1q55 A Aq1u A 1a!e__!! QOq  qyy    uzz F $a%1*a!eQUa1qjj QJEA;!#QUqAqjj  d26l### $ ==r7c$t|g|S)aYield *value*, followed by the elements in *iterator*. >>> value = '0' >>> iterator = ['1', '2', '3'] >>> list(prepend(value, iterator)) ['0', '1', '2', '3'] To prepend multiple values, see :func:`itertools.chain` or :func:`value_chain`. )r)valuerBs r6r"r"Ys %( # ##r7c#HKt|ddd}t|}tdg||z}t|t d|dz D]A}||t ttj ||VBdS)aBConvolve the iterable *signal* with the iterable *kernel*. >>> signal = (1, 2, 3, 4, 5) >>> kernel = [3, 2, 1] >>> list(convolve(signal, kernel)) [3, 8, 14, 20, 26, 14, 5] Note: the input arguments are not interchangeable, as the *kernel* is immediately consumed and stored. Nrrr=rp) rNrqrrr rrHr9rPrQ)signalkernelr4windowrys r6rrhs6]]44R4 F F A A3q ! ! !A %F 66!QU++ , ,55 a#hlFF3344444455r7cltgfd}fd}||fS)aA variant of :func:`takewhile` that allows complete access to the remainder of the iterator. >>> it = iter('ABCdEfGhI') >>> all_upper, remainder = before_and_after(str.isupper, it) >>> ''.join(all_upper) 'ABC' >>> ''.join(remainder) # takewhile() would lose the 'd' 'dEfGhI' Note that the first iterator must be fully consumed before the second iterator can generate valid results. c3dKD])}|r|V|dSdSra)r)elemrn predicate transitions r6 true_iteratorz'before_and_after..true_iteratorsV  Dy  !!$'''   r7c3,KEd{VEd{VdSrarx)rnrsr6remainder_iteratorz,before_and_after..remainder_iterators4 r7)r?)rrnrrrs`` @r6rr|su bBJ =??..00 00r7c#hKtt|D]\\}}\}}|||fVdS)zReturn overlapping triplets from *iterable*. >>> list(triplewise('ABCDE')) [('A', 'B', 'C'), ('B', 'C', 'D'), ('C', 'D', 'E')] Nr_)r5r\_r]rs r6r.r.sN#8H#5#566AAAg r7c#Kt|}tt|||}t||krt |V|D](}||t |V)dS)aYReturn a sliding window of width *n* over *iterable*. >>> list(sliding_window(range(6), 4)) [(0, 1, 2, 3), (1, 2, 3, 4), (2, 3, 4, 5)] If *iterable* has fewer than *n* items, then nothing is yielded: >>> list(sliding_window(range(3), 4)) [] For a variant with more features, see :func:`windowed`. r=N)r?rr rqrNr)r5r4rnrrys r6r*r*s hB 6"a== + + +F 6{{aFmm  aFmmr7)rra)NN)9__doc__rg collectionsr itertoolsrrrrrr r r r r rPrandomrrr__all__r-r+r,rrrr~r#rrrrrr(r^rrb ImportErrorrr)r r!r/r0rrr'r&r%r$rr"rrr.r*rxr7r6rss                        ,,,,,,,,,,! ! ! H % % % ''''$+++%+%+%+%+P 4 4 4 4 0 0 0!$$$$ ) ) ) ;;;... , , ,....6    )888888 000!(HHHH 3 3 3 3 222.>NNN.****Z J J J J    >1111("#11111(""""$ + + + +++"'''T $ $ $555(111@s'A==BBPK|5Z6u ,,WLib/site-packages/pkg_resources/_vendor/more_itertools/__pycache__/more.cpython-311.pycnuW+A ^;dVddlZddlmZmZmZmZddlmZddlm Z m Z m Z ddl m Z mZmZmZddlmZmZmZmZmZmZmZmZmZmZmZmZddlmZm Z m!Z!m"Z"ddl#m$Z$m%Z%dd l&m&Z&m'Z'm(Z(dd l)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0dd l1m2Z2m3Z3dd l4m5Z5d dl6m7Z7m8Z8m9Z9m:Z:m;Z;mZ?ddZ@e?fdZAe?fdZBe?fdZCGddZDdZEdZFdZGdZHdZIddZJdZKddZLddZMdd ZNd!ZOdd"ZPd#ZQdd$ZRGd%d&ZSdd'ZTd(ZUd)ZVdd*ZWdd+ZXdd,ZYdd-ZZdd/Z[dd0Z\dd1Z]dd2Z^d3Z_dd4Z`dd6Zadd7Zbd8Zcdd:ZdGd;dZhd?Ziddd@dAZjddCZkdDZldEZmeneoffdFZpddGZqddHZrGdIdJejejsZtddKZudLZvewdfdMZxdNZydOZzdPZ{GdQdRZ|dSZ}dTZ~dUfdVZe,fddWdXZGdYdZeZGd[d\ZGd]d^Zewfd_Zd`ZdBdaZddbZewdfdcZdddZdeZddfZGdgdhZddiZdjZdkZdlZdmZdnfdoZdpZdqZddrZddsZGdtdueZGdvdwZdxZddyZdzZd{Zd|Zd}Zd~ZdZGddZdZdZdZeneofdddZddZddZddZde?ddZdS)N)Counter defaultdictdequeabc)Sequence)partialreducewraps)mergeheapify heapreplaceheappop) chaincompresscountcycle dropwhilegroupbyislicerepeatstarmap takewhiletee zip_longest)exp factorialfloorlog)EmptyQueue)random randrangeuniform) itemgettermulsubgtltgele) hexversionmaxsize) monotonic)consumeflattenpairwisepowersettakeunique_everseen)^ AbortThread SequenceViewUnequalIterablesErroradjacent all_uniquealways_iterablealways_reversiblebucket callback_iterchunked chunked_evencircular_shiftscollapsecollatecombination_indexconsecutive_groupsconsumer count_cycle countable differencedistinct_combinationsdistinct_permutations distributedivideduplicates_everseenduplicates_justseen exactly_n filter_exceptfirstgroupby_transformichunkedilen interleaveinterleave_evenlyinterleave_longest intersperse is_sortedislice_extendediteratelastlocatelstripmake_decorator map_exceptmap_if map_reduce mark_endsminmax nth_or_lastnth_permutation nth_product numeric_rangeoneonlypadded partitionspeekablepermutation_index product_indexraise_ repeat_each repeat_lastreplacerlocaterstrip run_lengthsampleseekableset_partitions side_effectsliced sort_together split_aftersplit_at split_before split_into split_whenspystaggerstrip strictly_n substringssubstrings_indexes time_limitedunique_in_windowunique_to_eachunzip value_chainwindowedwindowed_complete with_iter zip_broadcast zip_equal zip_offsetFc tttt|g|r.tdfd}t|SS)aJBreak *iterable* into lists of length *n*: >>> list(chunked([1, 2, 3, 4, 5, 6], 3)) [[1, 2, 3], [4, 5, 6]] By the default, the last yielded list will have fewer than *n* elements if the length of *iterable* is not divisible by *n*: >>> list(chunked([1, 2, 3, 4, 5, 6, 7, 8], 3)) [[1, 2, 3], [4, 5, 6], [7, 8]] To use a fill-in value instead, see the :func:`grouper` recipe. If the length of *iterable* is not divisible by *n* and *strict* is ``True``, then ``ValueError`` will be raised before the last list is yielded. Nz*n must not be None when using strict mode.c3bKD](}t|krtd|V)dS)Nziterable is not divisible by n.len ValueError)chunkiteratorns xE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/more_itertools/more.pyretzchunked..retsI!  u::??$%FGGG   )iterrr3r)iterablerstrictrrs ` @rr>r>sz&GD!T(^^44b99H  9IJJ J       CCEE{{rc tt|S#t$r%}|turt d||cYd}~Sd}~wwxYw)aReturn the first item of *iterable*, or *default* if *iterable* is empty. >>> first([0, 1, 2, 3]) 0 >>> first([], 'some default') 'some default' If *default* is not provided and there are no items in the iterable, raise ``ValueError``. :func:`first` is useful when you have a generator of expensive-to-retrieve values and want any arbitrary one. It is marginally shorter than ``next(iter(iterable), default)``. zKfirst() was called on an empty iterable, and no default value was provided.N)nextr StopIteration_markerr)rdefaultes rrQrQsr"DNN###  g  .  s A AA A cH t|tr|dSt|dr'tdkrt t |St |ddS#tttf$r|turtd|cYSwxYw)aReturn the last item of *iterable*, or *default* if *iterable* is empty. >>> last([0, 1, 2, 3]) 3 >>> last([], 'some default') 'some default' If *default* is not provided and there are no items in the iterable, raise ``ValueError``. __reversed__ir.maxlenzDlast() was called on an empty iterable, and no default was provided.) isinstancerhasattrr+rreversedr IndexError TypeErrorrrr)rrs rr\r\s h ) ) 1B<  X~ . . 1J*4L4L**++ +!,,,R0 0  = 1 g    sA-6A-A--1B! B!cFtt||dz|S)agReturn the nth or the last item of *iterable*, or *default* if *iterable* is empty. >>> nth_or_last([0, 1, 2, 3], 2) 2 >>> nth_or_last([0, 1], 2) 1 >>> nth_or_last([], 0, 'some default') 'some default' If *default* is not provided and there are no items in the iterable, raise ``ValueError``. r.r)r\r)rrrs rreres% xQ'' 9 9 99rcFeZdZdZdZdZdZefdZdZ dZ dZ d Z d S) rmaWrap an iterator to allow lookahead and prepending elements. Call :meth:`peek` on the result to get the value that will be returned by :func:`next`. This won't advance the iterator: >>> p = peekable(['a', 'b']) >>> p.peek() 'a' >>> next(p) 'a' Pass :meth:`peek` a default value to return that instead of raising ``StopIteration`` when the iterator is exhausted. >>> p = peekable([]) >>> p.peek('hi') 'hi' peekables also offer a :meth:`prepend` method, which "inserts" items at the head of the iterable: >>> p = peekable([1, 2, 3]) >>> p.prepend(10, 11, 12) >>> next(p) 10 >>> p.peek() 11 >>> list(p) [11, 12, 1, 2, 3] peekables can be indexed. Index 0 is the item that will be returned by :func:`next`, index 1 is the item after that, and so on: The values up to the given index will be cached. >>> p = peekable(['a', 'b', 'c', 'd']) >>> p[0] 'a' >>> p[1] 'b' >>> next(p) 'a' Negative indexes are supported, but be aware that they will cache the remaining items in the source iterator, which may require significant storage. To check whether a peekable is exhausted, check its truth value: >>> p = peekable(['a', 'b']) >>> if p: # peekable has items ... list(p) ['a', 'b'] >>> if not p: # peekable is exhausted ... list(p) [] cTt||_t|_dSN)r_itr_cacheselfrs r__init__zpeekable.__init__2s>>gg rc|Srrs r__iter__zpeekable.__iter__6 rcT |n#t$rYdSwxYwdSNFTpeekrrs r__bool__zpeekable.__bool__9=  IIKKKK   55 t  %%c|jsJ |jt|jn#t$r|t ur|cYSwxYw|jdS)zReturn the item that will be next returned from ``next()``. Return ``default`` if there are no items left. If ``default`` is not provided, raise ``StopIteration``. r)rappendrrrr)rrs rrz peekable.peek@st{   ""4>>2222    g%% {1~s,6AAcT|jt|dS)aStack up items to be the next ones returned from ``next()`` or ``self.peek()``. The items will be returned in first in, first out order:: >>> p = peekable([1, 2, 3]) >>> p.prepend(10, 11, 12) >>> next(p) 10 >>> list(p) [11, 12, 1, 2, 3] It is possible, by prepending items, to "resurrect" a peekable that previously raised ``StopIteration``. >>> p = peekable([]) >>> next(p) Traceback (most recent call last): ... StopIteration >>> p.prepend(1) >>> next(p) 1 >>> next(p) Traceback (most recent call last): ... StopIteration N)r extendleftr)ritemss rprependzpeekable.prependPs&: x/////rcj|jr|jSt|jSr)rpopleftrrrs r__next__zpeekable.__next__os. ; );&&(( (DH~~rcd|jdn|j}|dkr&|jdn|j}|jtn|j}n?|dkr*|jdn|j}|j t dz n|j}nt d|dks|dkr |j|jnptt||dzt}t|j}||kr0|jt|j||z t|j|S)Nr.rrzslice step cannot be zero) stepstartstopr,rrextendrminmaxrrlist)rindexrrrr cache_lens r _get_slicezpeekable._get_sliceus(Z'qqej !88+-AAEKE$z177 DD AXX ;.BBU[E&+j&8WHqLLuzDD899 9 AII4!88 K  tx ( ( ( (Ct$$q('22ADK((II~~ ""6$(A M#B#BCCCDK  ''rcVt|tr||St|j}|dkr |j|jn9||kr3|jt|j|dz|z |j|SNrr.)rslicerrrrrr)rrrs r __getitem__zpeekable.__getitem__s eU # # *??5)) ) $$ 199 K  tx ( ( ( ( i   K  vdh I0EFF G G G{5!!rN) __name__ __module__ __qualname____doc__rrrrrrrrrrrrrmrms88t# 000> (((4 " " " " "rrmcNtjdtt|i|S)aReturn a sorted merge of the items from each of several already-sorted *iterables*. >>> list(collate('ACDZ', 'AZ', 'JKL')) ['A', 'A', 'C', 'D', 'J', 'K', 'L', 'Z', 'Z'] Works lazily, keeping only the next value from each iterable in memory. Use :func:`collate` to, for example, perform a n-way mergesort of items that don't fit in memory. If a *key* function is specified, the iterables will be sorted according to its result: >>> key = lambda s: int(s) # Sort by numeric value, not by string >>> list(collate(['1', '10'], ['2', '11'], key=key)) ['1', '2', '10', '11'] If the *iterables* are sorted in descending order, set *reverse* to ``True``: >>> list(collate([5, 3, 1], [4, 2, 0], reverse=True)) [5, 4, 3, 2, 1, 0] If the elements of the passed-in iterables are out of order, you might get unexpected results. On Python 3.5+, this function is an alias for :func:`heapq.merge`. z MF ) &v & &&rc<tfd}|S)abDecorator that automatically advances a PEP-342-style "reverse iterator" to its first yield point so you don't have to call ``next()`` on it manually. >>> @consumer ... def tally(): ... i = 0 ... while True: ... print('Thing number %s is %s.' % (i, (yield))) ... i += 1 ... >>> t = tally() >>> t.send('red') Thing number 0 is red. >>> t.send('fish') Thing number 1 is fish. Without the decorator, you would have to call ``next(t)`` before ``t.send()`` could be used. c6|i|}t||Sr)r)argsrgenfuncs rwrapperzconsumer..wrappers'dD#F## S  r)r )rrs` rrErEs5. 4[[[ Nrczt}tt||dt|S)zReturn the number of items in *iterable*. >>> ilen(x for x in range(1000000) if x % 3 == 0) 333334 This consumes the iterable, so handle with care. rr)rrzipr)rcounters rrTrTs6ggG #h ++++ ==rc#(K |V||})zReturn ``start``, ``func(start)``, ``func(func(start))``, ... >>> from itertools import islice >>> list(islice(iterate(lambda x: 2*x, 1), 10)) [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] r)rrs rr[r[s& U rc#PK|5}|Ed{VddddS#1swxYwYdS)a:Wrap an iterable in a ``with`` statement, so it closes once exhausted. For example, this will close the file when the iterator is exhausted:: upper_lines = (line.upper() for line in with_iter(open('foo'))) Any context manager which returns an iterable is a candidate for ``with_iter``. Nr)context_managerrs rrrs Hs ct|} t|}n$#t$r}|ptd|d}~wwxYw t|}d||}|pt|#t$rYnwxYw|S)aReturn the first item from *iterable*, which is expected to contain only that item. Raise an exception if *iterable* is empty or has more than one item. :func:`one` is useful for ensuring that an iterable contains only one item. For example, it can be used to retrieve the result of a database query that is expected to return a single row. If *iterable* is empty, ``ValueError`` will be raised. You may specify a different exception with the *too_short* keyword: >>> it = [] >>> one(it) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: too many items in iterable (expected 1)' >>> too_short = IndexError('too few items') >>> one(it, too_short=too_short) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... IndexError: too few items Similarly, if *iterable* contains more than one item, ``ValueError`` will be raised. You may specify a different exception with the *too_long* keyword: >>> it = ['too', 'many'] >>> one(it) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: Expected exactly one item in iterable, but got 'too', 'many', and perhaps more. >>> too_long = RuntimeError >>> one(it, too_long=too_long) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... RuntimeError Note that :func:`one` attempts to advance *iterable* twice to ensure there is only one item. See :func:`spy` or :func:`peekable` to check iterable contents less destructively. z&too few items in iterable (expected 1)NLExpected exactly one item in iterable, but got {!r}, {!r}, and perhaps more.)rrrrformat)r too_shorttoo_longit first_valuer second_valuemsgs rririsX hB2hh   M$LMM  *Bxx  &{L A A )*S//)       s$! A=AA<< B B c ||rr) exceptionrs rrprpRs )T rc# K|d}|d}t|}t|D]3} t|}|V#t$r||YdSwxYw t|||dzdS#t$rYdSwxYw)aValidate that *iterable* has exactly *n* items and return them if it does. If it has fewer than *n* items, call function *too_short* with those items. If it has more than *n* items, call function *too_long* with the first ``n + 1`` items. >>> iterable = ['a', 'b', 'c', 'd'] >>> n = 4 >>> list(strictly_n(iterable, n)) ['a', 'b', 'c', 'd'] By default, *too_short* and *too_long* are functions that raise ``ValueError``. >>> list(strictly_n('ab', 3)) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: too few items in iterable (got 2) >>> list(strictly_n('abc', 2)) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: too many items in iterable (got at least 3) You can instead supply functions that do something else. *too_short* will be called with the number of items in *iterable*. *too_long* will be called with `n + 1`. >>> def too_short(item_count): ... raise RuntimeError >>> it = strictly_n('abcd', 6, too_short=too_short) >>> list(it) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... RuntimeError >>> def too_long(item_count): ... print('The boss is going to hear about this') >>> it = strictly_n('abcdef', 4, too_long=too_long) >>> list(it) The boss is going to hear about this ['a', 'b', 'c', 'd'] NcRttd|S)Nz"Too few items in iterable (got {})rprr item_counts rzstrictly_n..s$v  0 7 7 C C( ( rcRttd|S)Nz,Too many items in iterable (got at least {})rrs rrzstrictly_n..s$f  : A A* M M' ' rr.)rrangerr)rrrrriitems rrrVsX     hB 1XX 88D JJJJ     IaLLL FFF   R Q      s#AAA A?? B  B cfd}d}t|}t||}d|cxkrkr nn|kr ||n |||St|rdndS)aYield successive distinct permutations of the elements in *iterable*. >>> sorted(distinct_permutations([1, 0, 1])) [(0, 1, 1), (1, 0, 1), (1, 1, 0)] Equivalent to ``set(permutations(iterable))``, except duplicates are not generated and thrown away. For larger input sequences this is much more efficient. Duplicate permutations arise when there are duplicated elements in the input iterable. The number of items returned is `n! / (x_1! * x_2! * ... * x_n!)`, where `n` is the total number of items input, and each `x_i` is the count of a distinct item in the input sequence. If *r* is given, only the *r*-length permutations are yielded. >>> sorted(distinct_permutations([1, 0, 1], r=2)) [(0, 1), (1, 0), (1, 1)] >>> sorted(distinct_permutations(range(3), r=2)) [(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)] c3>K t|Vtdz ddD]}||||dzkrndStdz |dD]}||||krn||||c||<||<|d|z d||dzd<)NTrr.)tupler)Arjsizes r_fullz$distinct_permutations.._fulls ,((NNN4!8R,,  Q4!AE(??E#4!8Q++  Q4!A$;;E 1qtJAaD!A$?QX?+Aa!eggJ) ,rc34K|d|||d}}t|dz dd}tt|} t|V|d}|D]}|||krn ||}dS|D]-}||||kr||||c||<||<n1.|D]-}||||kr||||c||<||<n.||d||z dz }|dz }|d||z |||z dc||d<|dd<)Nr.r)rrr ) rrheadtailright_head_indexesleft_tail_indexespivotrrs r_partialz'distinct_permutations.._partialsrrUAabbEd"1q5"b11!#d)),, =++   HE'  7U??EQ'  7T!W$$'+AwQ$DGT!WE% ,AAwa((+/7DG(Qa) D1q52& &D FA $Wq1uW tAEGG} DHd111g? =rNrr)r)sortedrr)rrrrrrs @rrJrJs2,,,,,0%=%=%=N 8  E u::Dy 1}}}}}}}}} !T uuU|||0B0BB a"U # ##rc(|dkrtd|dkr,ttt||ddSt|g}t ||}t tt||ddS)a6Intersperse filler element *e* among the items in *iterable*, leaving *n* items between each filler element. >>> list(intersperse('!', [1, 2, 3, 4, 5])) [1, '!', 2, '!', 3, '!', 4, '!', 5] >>> list(intersperse(None, [1, 2, 3, 4, 5], n=2)) [1, 2, None, 3, 4, None, 5] rz n must be > 0r.N)rrrUrr>r0)rrrfillerchunkss rrXrXs Avv))) ajH55q$??? 1%%vj88!TBBCCCrcd|D}ttjtt|fdDfd|DS)aReturn the elements from each of the input iterables that aren't in the other input iterables. For example, suppose you have a set of packages, each with a set of dependencies:: {'pkg_1': {'A', 'B'}, 'pkg_2': {'B', 'C'}, 'pkg_3': {'B', 'D'}} If you remove one package, which dependencies can also be removed? If ``pkg_1`` is removed, then ``A`` is no longer necessary - it is not associated with ``pkg_2`` or ``pkg_3``. Similarly, ``C`` is only needed for ``pkg_2``, and ``D`` is only needed for ``pkg_3``:: >>> unique_to_each({'A', 'B'}, {'B', 'C'}, {'B', 'D'}) [['A'], ['C'], ['D']] If there are duplicates in one input iterable that aren't in the others they will be duplicated in the output. Input order is preserved:: >>> unique_to_each("mississippi", "missouri") [['p', 'p'], ['o', 'u', 'r']] It is assumed that the elements of each iterable are hashable. c,g|]}t|Sr)r.0rs r z"unique_to_each..9s ) ) )DHH ) ) )rc,h|]}|dk|Sr.r)r!elementcountss r z!unique_to_each..;s'EEE7w10D0Dw0D0D0DrcTg|]$}ttj|%Sr)rfilter __contains__)r!runiquess rr"z"unique_to_each..<s. B B BrD,b11 2 2 B B Br)rr from_iterablemapset)rpoolr&r+s @@rrrsl6 * )y ) ) )D U(S$88 9 9FEEEEfEEEG B B B BT B B BBrc #K|dkrtd|dkrtVdS|dkrtdt|}|}t|j|D]}|dz}|s|}t|Vt |}||kr2tt |t|||z VdSd|cxkrt||kr ndS||f|zz }t|VdSdS)aMReturn a sliding window of width *n* over the given iterable. >>> all_windows = windowed([1, 2, 3, 4, 5], 3) >>> list(all_windows) [(1, 2, 3), (2, 3, 4), (3, 4, 5)] When the window is larger than the iterable, *fillvalue* is used in place of missing values: >>> list(windowed([1, 2, 3], 4)) [(1, 2, 3, None)] Each window will advance in increments of *step*: >>> list(windowed([1, 2, 3, 4, 5, 6], 3, fillvalue='!', step=2)) [(1, 2, 3), (3, 4, 5), (5, 6, '!')] To slide into the iterable's items, use :func:`chain` to add filler items to the left: >>> iterable = [1, 2, 3, 4] >>> n = 3 >>> padding = [None] * (n - 1) >>> list(windowed(chain(padding, iterable), 3)) [(None, None, 1), (None, 1, 2), (1, 2, 3), (2, 3, 4)] rn must be >= 0Nr.zstep must be >= 1r) rr rr-rrrrr)seqr fillvaluerwindowr_rs rrr?sM6 1uu)***Avvgg  axx,--- !___F A  $ $   Q A--    v;;D axxE&&AH"="=>>??????? Q    T1      9,""Fmm  rc#Kg}t|D]}|||fVt|}t|}t d|dzD])}t ||z dzD]}||||zV*dS)aFYield all of the substrings of *iterable*. >>> [''.join(s) for s in substrings('more')] ['m', 'o', 'r', 'e', 'mo', 'or', 're', 'mor', 'ore', 'more'] Note that non-string iterables can also be subdivided. >>> list(substrings([0, 1, 2])) [(0,), (1,), (2,), (0, 1), (1, 2), (0, 1, 2)] r r.N)rrr rr)rr2r rrrs rrrrs CX 4g **CSJ1j1n % %!!zA~)** ! !Aa!a%i.  !!!rctdtdz}|rt|}fd|DS)a@Yield all substrings and their positions in *seq* The items yielded will be a tuple of the form ``(substr, i, j)``, where ``substr == seq[i:j]``. This function only works for iterables that support slicing, such as ``str`` objects. >>> for item in substrings_indexes('more'): ... print(item) ('m', 0, 1) ('o', 1, 2) ('r', 2, 3) ('e', 3, 4) ('mo', 0, 2) ('or', 1, 3) ('re', 2, 4) ('mor', 0, 3) ('ore', 1, 4) ('more', 0, 4) Set *reverse* to ``True`` to yield the same items in the opposite order. r.c3K|]<}tt|z dzD]}|||z|||zfV=dSr.N)rr)r!Lrr2s r z%substrings_indexes..sv  '(uSXX\A=M7N7N  23QQYAE"       r)rrr)r2reversers` rrrs\4 aSAA QKK    ,-   rc2eZdZdZddZdZdZdZdZdS) r<aWrap *iterable* and return an object that buckets it iterable into child iterables based on a *key* function. >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character >>> sorted(list(s)) # Get the keys ['a', 'b', 'c'] >>> a_iterable = s['a'] >>> next(a_iterable) 'a1' >>> next(a_iterable) 'a2' >>> list(s['b']) ['b1', 'b2', 'b3'] The original iterable will be advanced and its items will be cached until they are used by the child iterables. This may require significant storage. By default, attempting to select a bucket to which no items belong will exhaust the iterable and cache all values. If you specify a *validator* function, selected buckets will instead be checked against it. >>> from itertools import count >>> it = count(1, 2) # Infinite sequence of odd numbers >>> key = lambda x: x % 10 # Bucket by last digit >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only >>> s = bucket(it, key=key, validator=validator) >>> 2 in s False >>> list(s[2]) [] Nct||_||_tt|_|pd|_dS)NcdSNTrxs rrz!bucket.__init__..s$r)rr_keyrrr _validator)rrkey validators rrzbucket.__init__s7>> !%(( #7rc||sdS t||}|j||n#t$rYdSwxYwdSr)rDrr appendleftr)rvaluer s rr*zbucket.__contains__s|u%% 5 0U $$D K  ) )$ / / / /   55  tsA AAc#dK |j|r"|j|Vn~ t|j}n#t$rYdSwxYw||}||kr|Vn6||r |j||})z Helper to yield items from the parent iterator that match *value*. Items that don't match are stored in the local cache as they are encountered. TN)rrrrrrCrDr)rrIr  item_values r _get_valueszbucket._get_valuess  ={5! =k%(00222222 =#DH~~(!%4J!U**" 44= J/66t<<< = =sA AAc#K|jD]L}||}||r |j||M|jEd{VdSr)rrCrDrrkeys)rr rKs rrzbucket.__iter__sH 5 5D4Jz** 5 J'..t444;##%%%%%%%%%%%rct||stdS||S)Nr)rDrrLrrIs rrzbucket.__getitem__s5u%% 88O&&&rr) rrrrrr*rLrrrrrr<r<so!!F8888   ===4&&&'''''rr<ct|}t||}|t||fS)aReturn a 2-tuple with a list containing the first *n* elements of *iterable*, and an iterator with the same items as *iterable*. This allows you to "look ahead" at the items in the iterable without advancing it. There is one item in the list by default: >>> iterable = 'abcdefg' >>> head, iterable = spy(iterable) >>> head ['a'] >>> list(iterable) ['a', 'b', 'c', 'd', 'e', 'f', 'g'] You may use unpacking to retrieve items instead of lists: >>> (head,), iterable = spy('abcdefg') >>> head 'a' >>> (first, second), iterable = spy('abcdefg', 2) >>> first 'a' >>> second 'b' The number of items requested can be larger than the number of items in the iterable: >>> iterable = [1, 2, 3, 4, 5] >>> head, iterable = spy(iterable, 10) >>> head [1, 2, 3, 4, 5] >>> list(iterable) [1, 2, 3, 4, 5] )rr3copyr)rrrrs rrrs8J hB 2;;D 99;;dB ''rc8tjt|S)a4Return a new iterable yielding from each iterable in turn, until the shortest is exhausted. >>> list(interleave([1, 2, 3], [4, 5], [6, 7, 8])) [1, 4, 6, 2, 5, 7] For a version that doesn't terminate after the shortest iterable is exhausted, see :func:`interleave_longest`. )rr,rrs rrUrU9s  sI / //rc`tjt|dti}d|DS)asReturn a new iterable yielding from each iterable in turn, skipping any that are exhausted. >>> list(interleave_longest([1, 2, 3], [4, 5], [6, 7, 8])) [1, 4, 6, 2, 5, 7, 3, 8] This function produces the same output as :func:`roundrobin`, but may perform better for some inputs (in particular when the number of iterables is large). r3c3,K|]}|tu |VdSr)r)r!rBs rr;z%interleave_longest..Ts, - -!AW,,A,,,, - -r)rr,rr)rrs rrWrWGs5 KFgFFGGA - -q - - --rc#K+ dDnL#t$rtdwxYwttkrtdt}tt |fdd}fd|D}fd |D}|d |d d}}|d |d d} }||zgt|z} t } | r{t |V| d z} d t| |D} t| D]7\} } | d kr,t | | V| d z} | | xx|z cc<8| ydSdS) aG Interleave multiple iterables so that their elements are evenly distributed throughout the output sequence. >>> iterables = [1, 2, 3, 4, 5], ['a', 'b'] >>> list(interleave_evenly(iterables)) [1, 2, 'a', 3, 4, 'b', 5] >>> iterables = [[1, 2, 3], [4, 5], [6, 7, 8]] >>> list(interleave_evenly(iterables)) [1, 6, 4, 2, 7, 3, 8, 5] This function requires iterables of known length. Iterables without ``__len__()`` can be used by manually specifying lengths with *lengths*: >>> from itertools import combinations, repeat >>> iterables = [combinations(range(4), 2), ['a', 'b', 'c']] >>> lengths = [4 * (4 - 1) // 2, 3] >>> list(interleave_evenly(iterables, lengths=lengths)) [(0, 1), (0, 2), 'a', (0, 3), (1, 2), 'b', (1, 3), (2, 3), 'c'] Based on Bresenham's algorithm. Nc,g|]}t|Sr)rr s rr"z%interleave_evenly..qs3332s2ww333rz^Iterable lengths could not be determined automatically. Specify them with the lengths keyword.z,Mismatching number of iterables and lengths.c|Srr)rlengthss rrz#interleave_evenly..~s 71:rTrEr<c g|] }| Srr)r!rrZs rr"z%interleave_evenly..s8881GAJ888rc:g|]}t|Sr)r)r!rrs rr"z%interleave_evenly..s%>>>$y|$$>>>rrr.cg|] \}}||z  Srr)r!rdeltas rr"z%interleave_evenly..s JJJ5!e)JJJr) rrrrrsumrr enumerate)rrZdimslengths_permute lengths_desc iters_desc delta_primarydeltas_secondary iter_primaryiters_secondaryerrorsto_yieldrrs`` rrVrVWs0 33333GG   9   Y3w<< ' 'GHHH w<>>>o>>>J'31o|ABB7G#M$.qM:abb>/Lt# $s+;'<'< Flatten an iterable with multiple levels of nesting (e.g., a list of lists of tuples) into non-iterable types. >>> iterable = [(1, 2), ([3, 4], [[5], [6]])] >>> list(collapse(iterable)) [1, 2, 3, 4, 5, 6] Binary and text strings are not considered iterable and will not be collapsed. To avoid collapsing other types, specify *base_type*: >>> iterable = ['ab', ('cd', 'ef'), ['gh', 'ij']] >>> list(collapse(iterable, base_type=tuple)) ['ab', ('cd', 'ef'), 'gh', 'ij'] Specify *levels* to stop flattening after a certain level: >>> iterable = [('a', ['b']), ('c', ['d'])] >>> list(collapse(iterable)) # Fully flattened ['a', 'b', 'c', 'd'] >>> list(collapse(iterable, levels=1)) # Only one level flattened ['a', ['b'], 'c', ['d']] c3K|ks.t|ttfst|r|VdS t|}|D]}||dzEd{VdS#t$r|VYdSwxYwNr.)rstrbytesrr)nodeleveltreechild base_typelevelswalks rrwzcollapse..walks uv~~$e --(6&JtY,G,G&JJJ F 2::D  2 24uqy1111111111 2 2    JJJ FF sA,,A>=A>rNr)rrurvrws ``@rrArAsX62222222$tHa           rc#K | |||D]}|||Vn&t||D]}|||Ed{V| |dSdS#| |wwxYw)auInvoke *func* on each item in *iterable* (or on each *chunk_size* group of items) before yielding the item. `func` must be a function that takes a single argument. Its return value will be discarded. *before* and *after* are optional functions that take no arguments. They will be executed before iteration starts and after it ends, respectively. `side_effect` can be used for logging, updating progress bars, or anything that is not functionally "pure." Emitting a status message: >>> from more_itertools import consume >>> func = lambda item: print('Received {}'.format(item)) >>> consume(side_effect(func, range(2))) Received 0 Received 1 Operating on chunks of items: >>> pair_sums = [] >>> func = lambda chunk: pair_sums.append(sum(chunk)) >>> list(side_effect(func, [0, 1, 2, 3, 4, 5], 2)) [0, 1, 2, 3, 4, 5] >>> list(pair_sums) [1, 5, 9] Writing to a file-like object: >>> from io import StringIO >>> from more_itertools import consume >>> f = StringIO() >>> func = lambda x: print(x, file=f) >>> before = lambda: print(u'HEADER', file=f) >>> after = f.close >>> it = [u'a', u'b', u'c'] >>> consume(side_effect(func, it, before=before, after=after)) >>> f.closed True N)r>)rr chunk_sizebeforeafterr rs rrzrzsX   FHHH     T   !:66 ! !U            EGGGGG  5  EGGGG s A AA,cttfdtdD|rfd}t|SS)apYield slices of length *n* from the sequence *seq*. >>> list(sliced((1, 2, 3, 4, 5, 6), 3)) [(1, 2, 3), (4, 5, 6)] By the default, the last yielded slice will have fewer than *n* elements if the length of *seq* is not divisible by *n*: >>> list(sliced((1, 2, 3, 4, 5, 6, 7, 8), 3)) [(1, 2, 3), (4, 5, 6), (7, 8)] If the length of *seq* is not divisible by *n* and *strict* is ``True``, then ``ValueError`` will be raised before the last slice is yielded. This function will only work for iterables that support slicing. For non-sliceable iterables, see :func:`chunked`. c32K|]}||zVdSrr)r!rrr2s rr;zsliced..s/CC!s1q1u9~CCCCCCrrc3bKD](}t|krtd|V)dS)Nzseq is not divisible by n.r)_slicerrs rrzsliced..retsK"  v;;!##$%ABBB   r)rrrr)r2rrrrs`` @rr{r{su(CCCCCuQ{{CCCDDH        CCEE{{rrc# K|dkrt|VdSg}t|}|D]O}||r-|V|r|gV|dkrt|VdSg}|dz}:||P|VdS)a<Yield lists of items from *iterable*, where each list is delimited by an item where callable *pred* returns ``True``. >>> list(split_at('abcdcba', lambda x: x == 'b')) [['a'], ['c', 'd', 'c'], ['a']] >>> list(split_at(range(10), lambda n: n % 2 == 1)) [[0], [2], [4], [6], [8], []] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_at(range(10), lambda n: n % 2 == 1, maxsplit=2)) [[0], [2], [4, 5, 6, 7, 8, 9]] By default, the delimiting items are not included in the output. The include them, set *keep_separator* to ``True``. >>> list(split_at('abcdcba', lambda x: x == 'b', keep_separator=True)) [['a'], ['b'], ['c', 'd', 'c'], ['b'], ['a']] rNr.rrr)rpredmaxsplitkeep_separatorbufrr s rr~r~(s.1}}8nn C hB   4:: III f 1}}2hhC MHH JJt     IIIIIrc#K|dkrt|VdSg}t|}|D]M}||r+|r)|V|dkr|gt|zVdSg}|dz}||N|r|VdSdS)a\Yield lists of items from *iterable*, where each list ends just before an item for which callable *pred* returns ``True``: >>> list(split_before('OneTwo', lambda s: s.isupper())) [['O', 'n', 'e'], ['T', 'w', 'o']] >>> list(split_before(range(10), lambda n: n % 3 == 0)) [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_before(range(10), lambda n: n % 3 == 0, maxsplit=2)) [[0, 1, 2], [3, 4, 5], [6, 7, 8, 9]] rNr.rrrrrrr s rrrTs 1}}8nn C hB 4:: # III1}}ftBxx''''C MH 4  rc#K|dkrt|VdSg}t|}|D]I}||||r'|r%|V|dkrt|VdSg}|dz}J|r|VdSdS)a[Yield lists of items from *iterable*, where each list ends with an item where callable *pred* returns ``True``: >>> list(split_after('one1two2', lambda s: s.isdigit())) [['o', 'n', 'e', '1'], ['t', 'w', 'o', '2']] >>> list(split_after(range(10), lambda n: n % 3 == 0)) [[0], [1, 2, 3], [4, 5, 6], [7, 8, 9]] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_after(range(10), lambda n: n % 3 == 0, maxsplit=2)) [[0], [1, 2, 3], [4, 5, 6, 7, 8, 9]] rNr.rrs rr}r}ws"1}}8nn C hB 4 4:: # III1}}2hhC MH  rc#NK|dkrt|VdSt|} t|}n#t$rYdSwxYw|g}|D]N}|||r)|V|dkr|gt|zVdSg}|dz}|||}O|VdS)aSplit *iterable* into pieces based on the output of *pred*. *pred* should be a function that takes successive pairs of items and returns ``True`` if the iterable should be split in between them. For example, to find runs of increasing numbers, split the iterable when element ``i`` is larger than element ``i + 1``: >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], lambda x, y: x > y)) [[1, 2, 3, 3], [2, 5], [2, 4], [2]] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], ... lambda x, y: x > y, maxsplit=2)) [[1, 2, 3, 3], [2, 5], [2, 4, 2]] rNr.)rrrrr)rrrrcur_itemr next_items rrrs&1}}8nn hB88  *C   4) $ $ III1}} kDHH,,,,C MH 9 IIIIIs< A  A c#Kt|}|D]7}|t|VdStt||V8dS)aYield a list of sequential items from *iterable* of length 'n' for each integer 'n' in *sizes*. >>> list(split_into([1,2,3,4,5,6], [1,2,3])) [[1], [2, 3], [4, 5, 6]] If the sum of *sizes* is smaller than the length of *iterable*, then the remaining items of *iterable* will not be returned. >>> list(split_into([1,2,3,4,5,6], [2,3])) [[1, 2], [3, 4, 5]] If the sum of *sizes* is larger than the length of *iterable*, fewer items will be returned in the iteration that overruns *iterable* and further lists will be empty: >>> list(split_into([1,2,3,4], [1,2,3,4])) [[1], [2, 3], [4], []] When a ``None`` object is encountered in *sizes*, the returned list will contain items up to the end of *iterable* the same way that itertools.slice does: >>> list(split_into([1,2,3,4,5,6,7,8,9,0], [2,3,None])) [[1, 2], [3, 4, 5], [6, 7, 8, 9, 0]] :func:`split_into` can be useful for grouping a series of items where the sizes of the groups are not uniform. An example would be where in a row from a table, multiple columns represent elements of the same feature (e.g. a point represented by x,y,z) but, the format is not the same for all columns. N)rrr)rsizesrrs rrrsiF hB)) <r((NNN FFvb$''(( ( ( ( ( ))rc# Kt|}|%t|t|Ed{VdS|dkrtdd}|D] }|V|dz } |r||z |zn||z }t |D]}|VdS)aYield the elements from *iterable*, followed by *fillvalue*, such that at least *n* items are emitted. >>> list(padded([1, 2, 3], '?', 5)) [1, 2, 3, '?', '?'] If *next_multiple* is ``True``, *fillvalue* will be emitted until the number of items emitted is a multiple of *n*:: >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True)) [1, 2, 3, 4, None, None] If *n* is ``None``, *fillvalue* will be emitted indefinitely. Nr.n must be at least 1r)rrrrr) rr3r next_multiplerrr  remainingr5s rrkrks hByVI../////////// Q/000   DJJJ !OJJ,9MQ^q((q:~ y!!  AOOOO  rr c ltjtt|t|S)zRepeat each element in *iterable* *n* times. >>> list(repeat_each('ABC', 3)) ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C'] )rr,r-r)rrs rrqrqs'  s68VAYY?? @ @@rc#nKt}|D]}|V|tur|n|}t|Ed{VdS)a"After the *iterable* is exhausted, keep yielding its last element. >>> list(islice(repeat_last(range(3)), 5)) [0, 1, 2, 2, 2] If the iterable is empty, yield *default* forever:: >>> list(islice(repeat_last(range(0), 42), 5)) [42, 42, 42, 42, 42] N)rr)rrr finals rrrrrs\ D wGGDEe}}rcdkrtdt|}fdt|DS)aDistribute the items from *iterable* among *n* smaller iterables. >>> group_1, group_2 = distribute(2, [1, 2, 3, 4, 5, 6]) >>> list(group_1) [1, 3, 5] >>> list(group_2) [2, 4, 6] If the length of *iterable* is not evenly divisible by *n*, then the length of the returned iterables will not be identical: >>> children = distribute(3, [1, 2, 3, 4, 5, 6, 7]) >>> [list(c) for c in children] [[1, 4, 7], [2, 5], [3, 6]] If the length of *iterable* is smaller than *n*, then the last returned iterables will be empty: >>> children = distribute(5, [1, 2, 3]) >>> [list(c) for c in children] [[1], [2], [3], [], []] This function uses :func:`itertools.tee` and may require significant storage. If you need the order items in the smaller iterables to match the original iterable, see :func:`divide`. r.rc:g|]\}}t||dSr)r)r!rrrs rr"zdistribute..Qs+ L L L95"F2udA & & L L Lr)rrra)rrchildrens` rrKrK1sN8 1uu/0008QH L L L L (8K8K L L LLrrrr.cXt|t|}t||||dS)a[Yield tuples whose elements are offset from *iterable*. The amount by which the `i`-th item in each tuple is offset is given by the `i`-th item in *offsets*. >>> list(stagger([0, 1, 2, 3])) [(None, 0, 1), (0, 1, 2), (1, 2, 3)] >>> list(stagger(range(8), offsets=(0, 2, 4))) [(0, 2, 4), (1, 3, 5), (2, 4, 6), (3, 5, 7)] By default, the sequence will end when the final element of a tuple is the last item in the iterable. To continue until the first element of a tuple is the last item in the iterable, set *longest* to ``True``:: >>> list(stagger([0, 1, 2, 3], longest=True)) [(None, 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, None), (3, None, None)] By default, ``None`` will be used to replace offsets beyond the end of the sequence. Specify *fillvalue* to use some other value. )offsetslongestr3)rrr)rrrr3rs rrrTs9*8S\\**H  7Gy   rc eZdZdfd ZxZS)r7Ncld}| |dj|z }t|dS)Nz Iterables have different lengthsz/: index 0 has length {}; index {} has length {})rsuperr)rdetailsr __class__s rrzUnequalIterablesError.__init__qsI0   MEM C rr)rrrr __classcell__)rs@rr7r7ps=rr7c#rKt|dtiD]"}|D]}|turt|V#dS)Nr3)rrr7)rcombovals r_zip_equal_generatorr{s`i;7;; . .Cg~~+--- rc t|d}t|dddD]\}}t|}||krn t|St|||f#t$rt |cYSwxYw)Nrr.)r)rrarr7rr)r first_sizerrrs r _zip_equalrs/1&& y}a00 # #EArr77Dz!!" ? "$ZD,ABBBB ///#I...../sAA(A((BBc^tdkrtjdtt |S)a ``zip`` the input *iterables* together, but raise ``UnequalIterablesError`` if they aren't all the same length. >>> it_1 = range(3) >>> it_2 = iter('abc') >>> list(zip_equal(it_1, it_2)) [(0, 'a'), (1, 'b'), (2, 'c')] >>> it_1 = range(3) >>> it_2 = iter('abcd') >>> list(zip_equal(it_1, it_2)) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... more_itertools.more.UnequalIterablesError: Iterables have different lengths i zwzip_equal will be removed in a future version of more-itertools. Use the builtin zip function with strict=True instead.)r+rrrrrTs rrrs:$Y '      y !!r)rr3c t|t|krtdg}t||D]~\}}|dkr3|t t || |>|dkr%|t ||di|||r t|d|iSt|S)aF``zip`` the input *iterables* together, but offset the `i`-th iterable by the `i`-th item in *offsets*. >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1))) [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e')] This can be used as a lightweight alternative to SciPy or pandas to analyze data sets in which some series have a lead or lag relationship. By default, the sequence will end when the shortest iterable is exhausted. To continue until the longest iterable is exhausted, set *longest* to ``True``. >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1), longest=True)) [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e'), (None, 'f')] By default, ``None`` will be used to replace offsets beyond the end of the sequence. Specify *fillvalue* to use some other value. z,Number of iterables and offsets didn't matchrNr3)rrrrrrrr)rrr3r staggeredrrs rrrs* 9~~W%%GHHHIY((!!A q55   U6)aR#8#8"== > > > > UU   VB400 1 1 1 1   R <I;;;;  ?rrc  t|}n@t|}t|dkr|dfd}nt|fd}ttt t|||S)aReturn the input iterables sorted together, with *key_list* as the priority for sorting. All iterables are trimmed to the length of the shortest one. This can be used like the sorting function in a spreadsheet. If each iterable represents a column of data, the key list determines which columns are used for sorting. By default, all iterables are sorted using the ``0``-th iterable:: >>> iterables = [(4, 3, 2, 1), ('a', 'b', 'c', 'd')] >>> sort_together(iterables) [(1, 2, 3, 4), ('d', 'c', 'b', 'a')] Set a different key list to sort according to another iterable. Specifying multiple keys dictates how ties are broken:: >>> iterables = [(3, 1, 2), (0, 1, 0), ('c', 'b', 'a')] >>> sort_together(iterables, key_list=(1, 2)) [(2, 3, 1), (0, 0, 1), ('a', 'c', 'b')] To sort by a function of the elements of the iterable, pass a *key* function. Its arguments are the elements of the iterables corresponding to the key list:: >>> names = ('a', 'b', 'c') >>> lengths = (1, 2, 3) >>> widths = (5, 2, 1) >>> def area(length, width): ... return length * width >>> sort_together([names, lengths, widths], key_list=(1, 2), key=area) [('c', 'b', 'a'), (3, 2, 1), (1, 2, 5)] Set *reverse* to ``True`` to sort in descending order. >>> sort_together([(1, 2, 3), ('c', 'b', 'a')], reverse=True) [(3, 2, 1), ('a', 'b', 'c')] Nr.rc&|Srr) zipped_itemsrE key_offsets rrzsort_together..sL4L0M0Mrc |Srr)r get_key_itemsrEs rrzsort_together..s|,,1rr[)r$rrrr)rkey_listrEr< key_argumentrrs ` @@rr|r|sP {"8, >> x==A  "!JMMMMMLL'1ML  VCOw G G GH  rctt|\}}|sdS|d}t|t|}dt fdt |DS)aThe inverse of :func:`zip`, this function disaggregates the elements of the zipped *iterable*. The ``i``-th iterable contains the ``i``-th element from each element of the zipped iterable. The first element is used to to determine the length of the remaining elements. >>> iterable = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] >>> letters, numbers = unzip(iterable) >>> list(letters) ['a', 'b', 'c', 'd'] >>> list(numbers) [1, 2, 3, 4] This is similar to using ``zip(*iterable)``, but it avoids reading *iterable* into memory. Note, however, that this function uses :func:`itertools.tee` and thus may require significant storage. rrcfd}|S)Nc@ |S#t$rtwxYwr)rr)objrs rgetterz)unzip..itemgetter..getter<s4 $1v  $ $ $$# $s r)rrs` rr$zunzip..itemgetter;s# $ $ $ $ $ rc3PK|] \}}t||V!dSrr-)r!rrr$s rr;zunzip..Ms9JJEArZZ]]B''JJJJJJr)rrrrr ra)rrrr$s @rrrs(h((ND( r 7DHc$ii((I$ JJJJYy5I5IJJJ J JJrcv|dkrtd |dd|}n#t$rt|}YnwxYwtt ||\}}g}d}t d|dzD]>}|}|||kr|dzn|z }|t|||?|S)aDivide the elements from *iterable* into *n* parts, maintaining order. >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6]) >>> list(group_1) [1, 2, 3] >>> list(group_2) [4, 5, 6] If the length of *iterable* is not evenly divisible by *n*, then the length of the returned iterables will not be identical: >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7]) >>> [list(c) for c in children] [[1, 2, 3], [4, 5], [6, 7]] If the length of the iterable is smaller than n, then the last returned iterables will be empty: >>> children = divide(5, [1, 2, 3]) >>> [list(c) for c in children] [[1], [2], [3], [], []] This function will exhaust the iterable before returning and may require significant storage. If order is not important, see :func:`distribute`, which does not first pull the iterable into memory. r.rNr)rrr divmodrrrr) rrr2qrrrrrs rrLrLPs: 1uu/000!  Hoo #c((A  DAq C D 1a!e__** aAQ& 4E$J(()))) Js $AAc|tdS| t||rt|fS t|S#t$rt|fcYSwxYw)axIf *obj* is iterable, return an iterator over its items:: >>> obj = (1, 2, 3) >>> list(always_iterable(obj)) [1, 2, 3] If *obj* is not iterable, return a one-item iterable containing *obj*:: >>> obj = 1 >>> list(always_iterable(obj)) [1] If *obj* is ``None``, return an empty iterable: >>> obj = None >>> list(always_iterable(None)) [] By default, binary and text strings are not considered iterable:: >>> obj = 'foo' >>> list(always_iterable(obj)) ['foo'] If *base_type* is set, objects for which ``isinstance(obj, base_type)`` returns ``True`` won't be considered iterable. >>> obj = {'a': 1} >>> list(always_iterable(obj)) # Iterate over the dict's keys ['a'] >>> list(always_iterable(obj, base_type=dict)) # Treat dicts as a unit [{'a': 1}] Set *base_type* to ``None`` to avoid any special handling and treat objects Python considers iterable as iterable: >>> obj = 'foo' >>> list(always_iterable(obj, base_type=None)) ['f', 'o', 'o'] Nr)rrr)rrus rr:r:sxR {Bxx:c9#=#=SF||Cyy SF||sAA! A!c |dkrtdt|\}}dg|z}t|t|||}ttt |d|zdz}t ||S)asReturn an iterable over `(bool, item)` tuples where the `item` is drawn from *iterable* and the `bool` indicates whether that item satisfies the *predicate* or is adjacent to an item that does. For example, to find whether items are adjacent to a ``3``:: >>> list(adjacent(lambda x: x == 3, range(6))) [(False, 0), (False, 1), (True, 2), (True, 3), (True, 4), (False, 5)] Set *distance* to change what counts as adjacent. For example, to find whether items are two places away from a ``3``: >>> list(adjacent(lambda x: x == 3, range(6), distance=2)) [(False, 0), (True, 1), (True, 2), (True, 3), (True, 4), (True, 5)] This is useful for contextualizing the results of a search function. For example, a code comparison tool might want to identify lines that have changed, but also surrounding lines to give the viewer of the diff context. The predicate function will only be called once for each item in the iterable. See also :func:`groupby_transform`, which can be used with this function to group ranges of items with the same `bool` value. rzdistance must be at least 0Fr r.)rrrr-anyrr) predicaterdistancei1i2paddingselectedadjacent_to_selecteds rr8r8s:!||6777 ]]FBg GWc)R00'::HsHXq8|a7G$H$HII #R ( ((rcjt||}rfd|D}rfd|D}|S)aAn extension of :func:`itertools.groupby` that can apply transformations to the grouped data. * *keyfunc* is a function computing a key value for each item in *iterable* * *valuefunc* is a function that transforms the individual items from *iterable* after grouping * *reducefunc* is a function that transforms each group of items >>> iterable = 'aAAbBBcCC' >>> keyfunc = lambda k: k.upper() >>> valuefunc = lambda v: v.lower() >>> reducefunc = lambda g: ''.join(g) >>> list(groupby_transform(iterable, keyfunc, valuefunc, reducefunc)) [('A', 'aaa'), ('B', 'bbb'), ('C', 'ccc')] Each optional argument defaults to an identity function if not specified. :func:`groupby_transform` is useful when grouping elements of an iterable using a separate iterable as the key. To do this, :func:`zip` the iterables and pass a *keyfunc* that extracts the first element and a *valuefunc* that extracts the second element:: >>> from operator import itemgetter >>> keys = [0, 0, 1, 1, 1, 2, 2, 2, 3] >>> values = 'abcdefghi' >>> iterable = zip(keys, values) >>> grouper = groupby_transform(iterable, itemgetter(0), itemgetter(1)) >>> [(k, ''.join(g)) for k, g in grouper] [(0, 'ab'), (1, 'cde'), (2, 'fgh'), (3, 'i')] Note that the order of items in the iterable is significant. Only adjacent items are grouped together, so if you don't want any duplicate groups, you should sort the iterable by the key function. c3BK|]\}}|t|fVdSrr)r!kg valuefuncs rr;z$groupby_transform..s666$!Q3y!$$%666666rc38K|]\}}||fVdSrr)r!rr reducefuncs rr;z$groupby_transform..s422da::a==!222222rr)rkeyfuncrrrs `` rrRrRs]H (G $ $C76666#66632222c222 JrceZdZdZeeddZdZdZdZ dZ dZ dZ d Z d Zd Zd Zd ZdZdZdZdZdS)rha<An extension of the built-in ``range()`` function whose arguments can be any orderable numeric type. With only *stop* specified, *start* defaults to ``0`` and *step* defaults to ``1``. The output items will match the type of *stop*: >>> list(numeric_range(3.5)) [0.0, 1.0, 2.0, 3.0] With only *start* and *stop* specified, *step* defaults to ``1``. The output items will match the type of *start*: >>> from decimal import Decimal >>> start = Decimal('2.1') >>> stop = Decimal('5.1') >>> list(numeric_range(start, stop)) [Decimal('2.1'), Decimal('3.1'), Decimal('4.1')] With *start*, *stop*, and *step* specified the output items will match the type of ``start + step``: >>> from fractions import Fraction >>> start = Fraction(1, 2) # Start at 1/2 >>> stop = Fraction(5, 2) # End at 5/2 >>> step = Fraction(1, 2) # Count by 1/2 >>> list(numeric_range(start, stop, step)) [Fraction(1, 2), Fraction(1, 1), Fraction(3, 2), Fraction(2, 1)] If *step* is zero, ``ValueError`` is raised. Negative steps are supported: >>> list(numeric_range(3, -1, -1.0)) [3.0, 2.0, 1.0, 0.0] Be aware of the limitations of floating point numbers; the representation of the yielded numbers may be surprising. ``datetime.datetime`` objects can be used for *start* and *stop*, if *step* is a ``datetime.timedelta`` object: >>> import datetime >>> start = datetime.datetime(2019, 1, 1) >>> stop = datetime.datetime(2019, 1, 3) >>> step = datetime.timedelta(days=1) >>> items = iter(numeric_range(start, stop, step)) >>> next(items) datetime.datetime(2019, 1, 1, 0, 0) >>> next(items) datetime.datetime(2019, 1, 2, 0, 0) rct|}|dkrV|\|_t|jd|_t|j|jz d|_n|dkr:|\|_|_t|j|jz d|_nf|dkr|\|_|_|_nJ|dkr"t d|t d|t|jd|_|j|jkrtd|j|jk|_ | dS)Nr.rr z2numeric_range expected at least 1 argument, got {}z2numeric_range expected at most 3 arguments, got {}z&numeric_range() arg 3 must not be zero) r_stoptype_start_steprr_zeror_growing _init_len)rrargcs rrznumeric_range.__init__Bsf4yy 199 MTZ*$tz**1--DK7dj4;677::DJJ QYY&* #DK7dj4;677::DJJ QYY26 /DKTZZ QYY%%+VD\\  &&,fTll  &T$*%%a(( : # #EFF F TZ/  rcP|jr|j|jkS|j|jkSr)rrrrs rrznumeric_range.__bool__^s* = ,;+ +;+ +rc|jr6|j|cxkr |jkrnnR||jz |jz|jkSn6|j|cxkr |jkrnn|j|z |j z|jkSdSNF)rrrrr)relems rr*znumeric_range.__contains__ds = J{d////TZ/////t{*dj8DJFF0{d////TZ///// d* {;tzIIurct|trtt| }t| }|s|r|o|S|j|jko;|j|jko+|d|dkSdS)NrF)rrhboolrr _get_by_index)rother empty_self empty_others r__eq__znumeric_range.__eq__ns e] + + !$ZZJ"5kk/K [ !1k1K5</J ek1J**2..%2E2Eb2I2II 5rct|tr||St|tr|j|jn|j|jz}|j|j|j kr|j}n2|j|jkr|j }n||j}|j |j |jkr|j }n3|j |j kr|j}n||j }t|||Std t|j)Nz8numeric range indices must be integers or slices, not {})rintrrrrr_lenrrrrhrrrr)rrErrrs rrznumeric_range.__getitem__}s0 c3   %%c** * U # # !$!14::sx$*7LDy CI$)$;$; di'' **3955x38ty#8#8zdiZ''{))#(33 d33 3--3VDII4F-G-G rcr|r/t|j|d|jfS|jSNr)hashrrr _EMPTY_HASHrs r__hash__znumeric_range.__hash__s:  $d&8&8&<&.s0BBQ$+TZ0BBBBBBr)rrrrr'rr()rvaluess` rrznumeric_range.__iter__sbBBBB%''BBB = >WR44f== =WR44f== =rc|jSr)rrs r__len__znumeric_range.__len__s yrc|jr|j}|j}|j}n|j}|j}|j }||z }||jkr d|_dSt ||\}}t|t||jkz|_dSNr)rrrrrrrr)rrrrrrrs rrznumeric_range._init_lens = KE:D:DDJE;DJ;D%< tz ! !DIII(D))DAqAQ$*_!5!55DIIIrc8t|j|j|jffSr)rhrrrrs r __reduce__znumeric_range.__reduce__st{DJ CCCrc&|jdkr:dt|jt|jSdt|jt|jt|jS)Nr.znumeric_range({}, {})znumeric_range({}, {}, {}))rrreprrrrs r__repr__znumeric_range.__repr__s} :??*11T[!!4 #3#3 /55T[!!4 #3#3T$*5E5E rctt|d|j|jz |j Sr)rrhrrrrs rrznumeric_range.__reversed__sC ""2&& dj(@4:+     rc$t||vSr)rrPs rrznumeric_range.counts5D=!!!rc|jrU|j|cxkr |jkr=nnt||jz |j\}}||jkrt |SnU|j|cxkr |jkr>nn;t|j|z |j \}}||jkrt |Std|)Nz{} is not in numeric range) rrrrrrrrr)rrIrrs rrznumeric_range.indexs = "{e0000dj00000edk14:>>1 ??q66M{e0000dj00000dkE1DJ;??1 ??q66M5<>>666 DDD   """ E E E,,,,,rrhctstdS|tnt|}fd|DS)aCycle through the items from *iterable* up to *n* times, yielding the number of completed cycles along with each item. If *n* is omitted the process repeats indefinitely. >>> list(count_cycle('AB', 3)) [(0, 'A'), (0, 'B'), (1, 'A'), (1, 'B'), (2, 'A'), (2, 'B')] rNc3*K|] }D]}||fV dSrr)r!rr rs rr;zcount_cycle..s4 < >> list(mark_ends('ABC')) [(True, False, 'A'), (False, False, 'B'), (False, True, 'C')] Use this when looping over an iterable to take special action on its first and/or last items: >>> iterable = ['Header', 100, 200, 'Footer'] >>> total = 0 >>> for is_first, is_last, item in mark_ends(iterable): ... if is_first: ... continue # Skip the header ... if is_last: ... continue # Skip the footer ... total += item >>> print(total) 300 NrFT)rrrr)rrbras rrcrcs( hB HH  # #AARAq&%" " " " " # # 1fdAos# 11-A$$A=<A=c|*ttt||S|dkrtdt ||t }ttt ||S)aYield the index of each item in *iterable* for which *pred* returns ``True``. *pred* defaults to :func:`bool`, which will select truthy items: >>> list(locate([0, 1, 1, 0, 1, 0, 0])) [1, 2, 4] Set *pred* to a custom function to, e.g., find the indexes for a particular item. >>> list(locate(['a', 'b', 'c', 'b'], lambda x: x == 'b')) [1, 3] If *window_size* is given, then the *pred* function will be called with that many items. This enables searching for sub-sequences: >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3] >>> pred = lambda *args: args == (1, 2, 3) >>> list(locate(iterable, pred=pred, window_size=3)) [1, 5, 9] Use with :func:`seekable` to find indexes and then retrieve the associated items: >>> from itertools import count >>> from more_itertools import seekable >>> source = (3 * n + 1 if (n % 2) else n // 2 for n in count()) >>> it = seekable(source) >>> pred = lambda x: x > 100 >>> indexes = locate(it, pred=pred) >>> i = next(indexes) >>> it.seek(i) >>> next(it) 106 Nr.zwindow size must be at least 1r3)rrr-rrrr)rr window_sizers rr]r] ssLT8!4!4555Q9::: (K7 ; ; ;B EGGWT2.. / //rc"t||S)aYield the items from *iterable*, but strip any from the beginning for which *pred* returns ``True``. For example, to remove a set of items from the start of an iterable: >>> iterable = (None, False, None, 1, 2, None, 3, False, None) >>> pred = lambda x: x in {None, False, ''} >>> list(lstrip(iterable, pred)) [1, 2, None, 3, False, None] This function is analogous to to :func:`str.lstrip`, and is essentially an wrapper for :func:`itertools.dropwhile`. )rrrs rr^r^J s T8 $ $$rc#Kg}|j}|j}|D]/}||r |||Ed{V||V0dS)aYield the items from *iterable*, but strip any from the end for which *pred* returns ``True``. For example, to remove a set of items from the end of an iterable: >>> iterable = (None, False, None, 1, 2, None, 3, False, None) >>> pred = lambda x: x in {None, False, ''} >>> list(rstrip(iterable, pred)) [None, False, None, 1, 2, None, 3] This function is analogous to :func:`str.rstrip`. N)rclear)rrcache cache_append cache_clearrBs rruru\ s Ett|||S)aYield the items from *iterable*, but strip any from the beginning and end for which *pred* returns ``True``. For example, to remove a set of items from both ends of an iterable: >>> iterable = (None, False, None, 1, 2, None, 3, False, None) >>> pred = lambda x: x in {None, False, ''} >>> list(strip(iterable, pred)) [1, 2, None, 3] This function is analogous to :func:`str.strip`. )rur^r s rrrv s &4(($ / //rc*eZdZdZdZdZdZdZdS)rZaAn extension of :func:`itertools.islice` that supports negative values for *stop*, *start*, and *step*. >>> iterable = iter('abcdefgh') >>> list(islice_extended(iterable, -4, -1)) ['e', 'f', 'g'] Slices with negative values require some caching of *iterable*, but this function takes care to minimize the amount of memory required. For example, you can use a negative step with an infinite iterator: >>> from itertools import count >>> list(islice_extended(count(), 110, 99, -2)) [110, 108, 106, 104, 102, 100] You can also use slice notation directly: >>> iterable = map(str, count()) >>> it = islice_extended(iterable)[10:20:2] >>> list(it) ['10', '12', '14', '16', '18'] crt|}|rt|t||_dS||_dSr)r_islice_helperr _iterable)rrrrs rrzislice_extended.__init__ s9 (^^  +Bt ==DNNNDNNNrc|Srrrs rrzislice_extended.__iter__ rrc*t|jSr)rrrs rrzislice_extended.__next__ DN###rct|tr"tt|j|St d)Nz4islice_extended.__getitem__ argument must be a slice)rrrZrrr)rrEs rrzislice_extended.__getitem__ s> c5 ! ! H">$.##F#FGG GNOOOrN)rrrrrrrrrrrrZrZ s_2   $$$PPPPPrrZc#0K|j}|j}|jdkrtd|jpd}|dkrZ|dn|}|dkrt t |d| }|r|ddnd}t ||zd}||}n*|dkrt||}nt ||zd}||z } | dkrdSt|d| |D] \} } | V dS||dkrtt|||dt t|| | }t |D];\} } | } | |zdkr| V| | >> print(*always_reversible(x for x in range(3))) 2 1 0 If the iterable is already reversible, this function returns the result of :func:`reversed()`. If the iterable is not reversible, this function will cache the remaining items in the iterable and yield them in reverse order, which may require significant storage. )rrrrs rr;r; sJ(!!! (((X'''''(s &::c|SrrrAs rrr' sArc#Ktt|fdD]$\}}ttd|V%dS)aYield groups of consecutive items using :func:`itertools.groupby`. The *ordering* function determines whether two items are adjacent by returning their position. By default, the ordering function is the identity function. This is suitable for finding runs of numbers: >>> iterable = [1, 10, 11, 12, 20, 30, 31, 32, 33, 40] >>> for group in consecutive_groups(iterable): ... print(list(group)) [1] [10, 11, 12] [20] [30, 31, 32, 33] [40] For finding runs of adjacent letters, try using the :meth:`index` method of a string of letters: >>> from string import ascii_lowercase >>> iterable = 'abcdfgilmnop' >>> ordering = ascii_lowercase.index >>> for group in consecutive_groups(iterable, ordering): ... print(list(group)) ['a', 'b', 'c', 'd'] ['f', 'g'] ['i'] ['l', 'm', 'n', 'o', 'p'] Each group of consecutive items is an iterator that shares it source with *iterable*. When an an output group is advanced, the previous group is no longer available unless its elements are copied (e.g., into a ``list``). >>> iterable = [1, 2, 11, 12, 21, 22] >>> saved_groups = [] >>> for group in consecutive_groups(iterable): ... saved_groups.append(list(group)) # Copy group elements >>> saved_groups [[1, 2], [11, 12], [21, 22]] c8|d|dz Srr)rBorderings rrz$consecutive_groups..R s1Q4((1Q4..+@rrEr.N)rrar-r$)rr"rrs ` rrDrD' snT(!@!@!@!@$$1*Q--######$$r)initialc t|\}} t|g}n#t$rtgcYSwxYw|g}t |t |t ||S)aThis function is the inverse of :func:`itertools.accumulate`. By default it will compute the first difference of *iterable* using :func:`operator.sub`: >>> from itertools import accumulate >>> iterable = accumulate([0, 1, 2, 3, 4]) # produces 0, 1, 3, 6, 10 >>> list(difference(iterable)) [0, 1, 2, 3, 4] *func* defaults to :func:`operator.sub`, but other functions can be specified. They will be applied as follows:: A, B, C, D, ... --> A, func(B, A), func(C, B), func(D, C), ... For example, to do progressive division: >>> iterable = [1, 2, 6, 24, 120] >>> func = lambda x, y: x // y >>> list(difference(iterable, func)) [1, 2, 3, 4, 5] If the *initial* keyword is set, the first element will be skipped when computing successive differences. >>> it = [10, 11, 13, 16] # from accumulate([1, 2, 3], initial=10) >>> list(difference(it, initial=10)) [1, 2, 3] )rrrrrrr)rrr$rrrQs rrHrHW s< x==DAqa  Bxx c!Qii00 1 11s%AAc*eZdZdZdZdZdZdZdS)r6aSReturn a read-only view of the sequence object *target*. :class:`SequenceView` objects are analogous to Python's built-in "dictionary view" types. They provide a dynamic view of a sequence's items, meaning that when the sequence updates, so does the view. >>> seq = ['0', '1', '2'] >>> view = SequenceView(seq) >>> view SequenceView(['0', '1', '2']) >>> seq.append('3') >>> view SequenceView(['0', '1', '2', '3']) Sequence views support indexing, slicing, and length queries. They act like the underlying sequence, except they don't allow assignment: >>> view[1] '1' >>> view[1:-1] ['1', '2'] >>> len(view) 4 Sequence views are useful as an alternative to copying, as they don't require (much) extra storage. cLt|tst||_dSr)rrr_target)rtargets rrzSequenceView.__init__ s$&(++ O rc|j|Sr)r()rrs rrzSequenceView.__getitem__ s|E""rc*t|jSr)rr(rs rrzSequenceView.__len__ s4<   rcfd|jjt|jS)Nz{}({}))rrrrr(rs rrzSequenceView.__repr__ s%t~6T\8J8JKKKrN)rrrrrrrrrrrr6r6 s_: ###!!!LLLLLrr6cBeZdZdZd dZdZdZdZefdZ dZ d Z dS) rxa Wrap an iterator to allow for seeking backward and forward. This progressively caches the items in the source iterable so they can be re-visited. Call :meth:`seek` with an index to seek to that position in the source iterable. To "reset" an iterator, seek to ``0``: >>> from itertools import count >>> it = seekable((str(n) for n in count())) >>> next(it), next(it), next(it) ('0', '1', '2') >>> it.seek(0) >>> next(it), next(it), next(it) ('0', '1', '2') >>> next(it) '3' You can also seek forward: >>> it = seekable((str(n) for n in range(20))) >>> it.seek(10) >>> next(it) '10' >>> it.seek(20) # Seeking past the end of the source isn't a problem >>> list(it) [] >>> it.seek(0) # Resetting works even after hitting the end >>> next(it), next(it), next(it) ('0', '1', '2') Call :meth:`peek` to look ahead one item without advancing the iterator: >>> it = seekable('1234') >>> it.peek() '1' >>> list(it) ['1', '2', '3', '4'] >>> it.peek(default='empty') 'empty' Before the iterator is at its end, calling :func:`bool` on it will return ``True``. After it will return ``False``: >>> it = seekable('5678') >>> bool(it) True >>> list(it) ['5', '6', '7', '8'] >>> bool(it) False You may view the contents of the cache with the :meth:`elements` method. That returns a :class:`SequenceView`, a view that updates automatically: >>> it = seekable((str(n) for n in range(10))) >>> next(it), next(it), next(it) ('0', '1', '2') >>> elements = it.elements() >>> elements SequenceView(['0', '1', '2']) >>> next(it) '3' >>> elements SequenceView(['0', '1', '2', '3']) By default, the cache grows as the source iterable progresses, so beware of wrapping very large or infinite iterables. Supply *maxlen* to limit the size of the cache (this of course limits how far back you can seek). >>> from itertools import count >>> it = seekable((str(n) for n in count()), maxlen=2) >>> next(it), next(it), next(it), next(it) ('0', '1', '2', '3') >>> list(it.elements()) ['2', '3'] >>> it.seek(0) >>> next(it), next(it), next(it), next(it) ('2', '3', '4', '5') >>> next(it) '6' Nczt||_|g|_ntg||_d|_dSr)r_sourcerr_index)rrrs rrzseekable.__init__ s9H~~ >DKKF++DK rc|Srrrs rrzseekable.__iter__ rrc|j< |j|j}|xjdz c_|S#t$r d|_YnwxYwt|j}|j||Srn)r0rrrr/rrr s rrzseekable.__next__ s ; " {4;/ q   # # #"  # DL!! 4    s-AAcT |n#t$rYdSwxYwdSrrrs rrzseekable.__bool__ rrc t|}n#t$r|tur|cYSwxYw|jt |j|_|xjdzc_|Srn)rrrr0rr)rrpeekeds rrz seekable.peek$ sv $ZZFF   '!!NNN  ; dk**DK q  s ++c*t|jSr)r6rrs relementszseekable.elements0 sDK(((rcr||_|t|jz }|dkrt||dSdSr)r0rrr/)rr remainders rseekz seekable.seek3 sC C ,,, q== D) $ $ $ $ $ =rr) rrrrrrrrrrr8r;rrrrxrx sSSj   #    )))%%%%%rrxc>eZdZdZedZedZdS)rva :func:`run_length.encode` compresses an iterable with run-length encoding. It yields groups of repeated items with the count of how many times they were repeated: >>> uncompressed = 'abbcccdddd' >>> list(run_length.encode(uncompressed)) [('a', 1), ('b', 2), ('c', 3), ('d', 4)] :func:`run_length.decode` decompresses an iterable that was previously compressed with run-length encoding. It yields the items of the decompressed iterable: >>> compressed = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] >>> list(run_length.decode(compressed)) ['a', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd'] c4dt|DS)Nc3>K|]\}}|t|fVdSr)rT)r!rrs rr;z$run_length.encode..P s0;;ADGG ;;;;;;rrrs rencodezrun_length.encodeN s;;):):;;;;rc>tjd|DS)Nc3<K|]\}}t||VdSr)r)r!rrs rr;z$run_length.decode..T s."E"EDAq6!Q<<"E"E"E"E"E"Er)rr,rs rdecodezrun_length.decodeR s"""E"EH"E"E"EEEErN)rrrr staticmethodr?rBrrrrvrv: sY&<<\<FF\FFFrrvc ftt|dzt|||kS)aReturn ``True`` if exactly ``n`` items in the iterable are ``True`` according to the *predicate* function. >>> exactly_n([True, True, False], 2) True >>> exactly_n([True, True, False], 1) False >>> exactly_n([0, 1, 2, 3, 4, 5], 3, lambda x: x < 3) True The iterable will be advanced until ``n + 1`` truthy items are encountered, so avoid calling it on infinite iterables. r.)rr3r))rrrs rrOrOW s/ tAE6)X6677 8 8A ==rc t|}tt|tt |t|S)zReturn a list of circular shifts of *iterable*. >>> circular_shifts(range(4)) [(0, 1, 2, 3), (1, 2, 3, 0), (2, 3, 0, 1), (3, 0, 1, 2)] )rr3rrr)rlsts rr@r@i s; x..C C(5::s3xx88 9 99rcfd}|S)aReturn a decorator version of *wrapping_func*, which is a function that modifies an iterable. *result_index* is the position in that function's signature where the iterable goes. This lets you use itertools on the "production end," i.e. at function definition. This can augment what the function returns without changing the function's code. For example, to produce a decorator version of :func:`chunked`: >>> from more_itertools import chunked >>> chunker = make_decorator(chunked, result_index=0) >>> @chunker(3) ... def iter_range(n): ... return iter(range(n)) ... >>> list(iter_range(9)) [[0, 1, 2], [3, 4, 5], [6, 7, 8]] To only allow truthy items to be returned: >>> truth_serum = make_decorator(filter, result_index=1) >>> @truth_serum(bool) ... def boolean_test(): ... return [0, 1, '', ' ', False, True] ... >>> list(boolean_test()) [1, ' ', True] The :func:`peekable` and :func:`seekable` wrappers make for practical decorators: >>> from more_itertools import peekable >>> peekable_function = make_decorator(peekable) >>> @peekable_function() ... def str_range(*args): ... return (str(x) for x in range(*args)) ... >>> it = str_range(1, 20, 2) >>> next(it), next(it), next(it) ('1', '3', '5') >>> it.peek() '7' >>> next(it) '7' cfd}|S)Ncfd}|S)Ncn|i|}t}|||iSr)rinsert) rrresultwrapping_args_f result_index wrapping_args wrapping_funcwrapping_kwargss r inner_wrapperzOmake_decorator..decorator..outer_wrapper..inner_wrapper sOD+F++!%m!4!4%%lF;;;$}nHHHHrr)rNrSrOrPrQrRs` r outer_wrapperz8make_decorator..decorator..outer_wrapper sB I I I I I I I I I ! rr)rPrRrTrOrQs`` r decoratorz!make_decorator..decorator s5 ! ! ! ! ! ! ! !rr)rQrOrUs`` rr_r_s s+d       rc |dn|}tt}|D]3}||}||}|||4|(|D]\}}||||<d|_|S)aReturn a dictionary that maps the items in *iterable* to categories defined by *keyfunc*, transforms them with *valuefunc*, and then summarizes them by category with *reducefunc*. *valuefunc* defaults to the identity function if it is unspecified. If *reducefunc* is unspecified, no summarization takes place: >>> keyfunc = lambda x: x.upper() >>> result = map_reduce('abbccc', keyfunc) >>> sorted(result.items()) [('A', ['a']), ('B', ['b', 'b']), ('C', ['c', 'c', 'c'])] Specifying *valuefunc* transforms the categorized items: >>> keyfunc = lambda x: x.upper() >>> valuefunc = lambda x: 1 >>> result = map_reduce('abbccc', keyfunc, valuefunc) >>> sorted(result.items()) [('A', [1]), ('B', [1, 1]), ('C', [1, 1, 1])] Specifying *reducefunc* summarizes the categorized items: >>> keyfunc = lambda x: x.upper() >>> valuefunc = lambda x: 1 >>> reducefunc = sum >>> result = map_reduce('abbccc', keyfunc, valuefunc, reducefunc) >>> sorted(result.items()) [('A', 1), ('B', 2), ('C', 3)] You may want to filter the input iterable before applying the map/reduce procedure: >>> all_items = range(30) >>> items = [x for x in all_items if 10 <= x <= 20] # Filter >>> keyfunc = lambda x: x % 2 # Evens map to 0; odds to 1 >>> categories = map_reduce(items, keyfunc=keyfunc) >>> sorted(categories.items()) [(0, [10, 12, 14, 16, 18, 20]), (1, [11, 13, 15, 17, 19])] >>> summaries = map_reduce(items, keyfunc=keyfunc, reducefunc=sum) >>> sorted(summaries.items()) [(0, 90), (1, 75)] Note that all items in the iterable are gathered into a list before the summarization step, which may require significant storage. The returned object is a :obj:`collections.defaultdict` with the ``default_factory`` set to ``None``, such that it behaves like a normal dictionary. Nc|SrrrAs rrzmap_reduce.. s1r)rrrrdefault_factory) rrrrrr rErI value_lists rrbrb sf#,"3)I d  Cgdmm $ C"yy{{ . .OC!z*--CHHC Jrc |I t|fdtt||DS#t$rYnwxYwtt t|||S)aYield the index of each item in *iterable* for which *pred* returns ``True``, starting from the right and moving left. *pred* defaults to :func:`bool`, which will select truthy items: >>> list(rlocate([0, 1, 1, 0, 1, 0, 0])) # Truthy at 1, 2, and 4 [4, 2, 1] Set *pred* to a custom function to, e.g., find the indexes for a particular item: >>> iterable = iter('abcb') >>> pred = lambda x: x == 'b' >>> list(rlocate(iterable, pred)) [3, 1] If *window_size* is given, then the *pred* function will be called with that many items. This enables searching for sub-sequences: >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3] >>> pred = lambda *args: args == (1, 2, 3) >>> list(rlocate(iterable, pred=pred, window_size=3)) [9, 5, 1] Beware, this function won't return anything for infinite iterables. If *iterable* is reversible, ``rlocate`` will reverse it and search from the right. Otherwise, it will search from the left and return the results in reverse order. See :func:`locate` to for other example applications. Nc3(K|] }|z dz V dSr9r)r!rrs rr;zrlocate.. s,OOHqL1$OOOOOOr)rr]rrr)rrrrs @rrtrt sB 8}}HOOOOfXh5G5G.N.NOOO O    D  D$ <<== > >>s7= A  A c#JK|dkrtdt|}t|tg|dz z}t ||}d}|D]K}||r)|||kr!|dz }|Ed{Vt ||dz 0|r|dtur |dVLdS)aYYield the items from *iterable*, replacing the items for which *pred* returns ``True`` with the items from the iterable *substitutes*. >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1] >>> pred = lambda x: x == 0 >>> substitutes = (2, 3) >>> list(replace(iterable, pred, substitutes)) [1, 1, 2, 3, 1, 1, 2, 3, 1, 1] If *count* is given, the number of replacements will be limited: >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1, 0] >>> pred = lambda x: x == 0 >>> substitutes = [None] >>> list(replace(iterable, pred, substitutes, count=2)) [1, 1, None, 1, 1, None, 1, 1, 0] Use *window_size* to control the number of items passed as arguments to *pred*. This allows for locating and replacing subsequences. >>> iterable = [0, 1, 2, 5, 0, 1, 2, 5] >>> window_size = 3 >>> pred = lambda *args: args == (0, 1, 2) # 3 items passed to pred >>> substitutes = [3, 4] # Splice in these items >>> list(replace(iterable, pred, substitutes, window_size=window_size)) [3, 4, 5, 3, 4, 5] r.zwindow_size must be at least 1rN)rr rrrr/) rr substitutesrrrwindowsrws rrsrs" s:Q9::: $$K x'kAo6 7 7Br;''G A  48  1u99Q&&&&&&&&q111  !A$g%%A$JJJ#rc#Kt|t}ttd|D]'}fdt d|z||fzDV(dS)a"Yield all possible order-preserving partitions of *iterable*. >>> iterable = 'abc' >>> for part in partitions(iterable): ... print([''.join(p) for p in part]) ['abc'] ['a', 'bc'] ['ab', 'c'] ['a', 'b', 'c'] This is unrelated to :func:`partition`. r.c*g|]\}}||Srr)r!rrsequences rr"zpartitions..p s%AAAAx!}AAArrN)rrr2rr)rrrrbs @rrlrl_ sH~~H H A eAqkk " "BBAAAATAXqA4x)@)@AAAAAAABBrc# Kt|}t|}||dkrtd||krdSfd|*td|dzD]}||Ed{VdS||Ed{VdS)a Yield the set partitions of *iterable* into *k* parts. Set partitions are not order-preserving. >>> iterable = 'abc' >>> for part in set_partitions(iterable, 2): ... print([''.join(p) for p in part]) ['a', 'bc'] ['ab', 'c'] ['b', 'ac'] If *k* is not given, every set partition is generated. >>> iterable = 'abc' >>> for part in set_partitions(iterable): ... print([''.join(p) for p in part]) ['abc'] ['a', 'bc'] ['ab', 'c'] ['b', 'ac'] ['a', 'b', 'c'] Nr.z6Can't partition in a negative or zero number of groupsc3XKt|}|dkr|gVdS||krd|DVdS|^}}||dz D] }|gg|V ||D]I}tt|D]*}|d||g||zgz||dzdzV+JdS)Nr.cg|]}|gSrr)r!rs rr"zAset_partitions..set_partitions_helper.. s"""1A3"""r)rr)r:rrrMprset_partitions_helpers rrhz-set_partitions..set_partitions_helper s FF 66#IIIII !VV""""" " " " " "EA**1a!e44  siQi**1a00 < <s1vv<>> from time import sleep >>> def generator(): ... yield 1 ... yield 2 ... sleep(0.2) ... yield 3 >>> iterable = time_limited(0.1, generator()) >>> list(iterable) [1, 2] >>> iterable.timed_out True Note that the time is checked before each item is yielded, and iteration stops if the time elapsed is greater than *limit_seconds*. If your time limit is 1 second, but it takes 2 seconds to generate the first item from the iterable, the function will run for 2 seconds and not yield anything. c|dkrtd||_t||_t |_d|_dS)Nrzlimit_seconds must be positiveF)r limit_secondsrrr- _start_time timed_out)rrkrs rrztime_limited.__init__ sH 1  =>> >*h$;;rc|Srrrs rrztime_limited.__iter__ rrct|j}t|jz |jkrd|_t |Sr@)rrr-rlrkrmrr3s rrztime_limited.__next__ s=DN## ;;) )D,> > >!DN  rNrrrrrrrrrrrr sK0rrct|}t||} t|}d||}|pt|#t$rYnwxYw|S)a*If *iterable* has only one item, return it. If it has zero items, return *default*. If it has more than one item, raise the exception given by *too_long*, which is ``ValueError`` by default. >>> only([], default='missing') 'missing' >>> only([1]) 1 >>> only([1, 2]) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: Expected exactly one item in iterable, but got 1, 2, and perhaps more.' >>> only([1, 2], too_long=TypeError) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... TypeError Note that :func:`only` attempts to advance *iterable* twice to ensure there is only one item. See :func:`spy` or :func:`peekable` to check iterable contents less destructively. r)rrrrr)rrrrrrrs rrjrj s0 hBr7##K *Bxx  &{L A A )*S//)       sA A$#A$c#Kt|} t|t}|turdStt |g|\}}t ||Vt ||d)aBreak *iterable* into sub-iterables with *n* elements each. :func:`ichunked` is like :func:`chunked`, but it yields iterables instead of lists. If the sub-iterables are read in order, the elements of *iterable* won't be stored in memory. If they are read out of order, :func:`itertools.tee` is used to cache elements as necessary. >>> from itertools import count >>> all_chunks = ichunked(count(), 4) >>> c_1, c_2, c_3 = next(all_chunks), next(all_chunks), next(all_chunks) >>> list(c_2) # c_1's elements have been cached; c_3's haven't been [4, 5, 6, 7] >>> list(c_1) [0, 1, 2, 3] >>> list(c_3) [8, 9, 10, 11] TN)rrrrrrr/)rrsourcer rs rrSrS s*(^^F FG$$ 7?? Fvv..// Rmm  rc #HK|dkrtd|dkrdVdSt|}tt|t dg}dg|z}d}|r t |d\}}n)#t $r||dz}YAwxYw|||<|dz|krt|VnR|tt||dzd|dzt d|dz }|dSdS)aBYield the distinct combinations of *r* items taken from *iterable*. >>> list(distinct_combinations([0, 0, 1], 2)) [(0, 0), (0, 1)] Equivalent to ``set(combinations(iterable))``, except duplicates are not generated and thrown away. For larger input sequences this is much more efficient. rzr must be non-negativerNr.r#r) rr r4rar$rrpopr)rrr/ generators current_comborrcur_idxrgs rrIrI& sz 1uu1222 a ??D!)D//z!}}EEEFJFQJM E  jn--JGQQ    NN    QJE H  ! e 19>> && & & & &   d7Q;==17Q;??"1     QJE# s*B#B)(B)c'JK|D]} |||V#|$rYwxYwdS)aYield the items from *iterable* for which the *validator* function does not raise one of the specified *exceptions*. *validator* is called for each item in *iterable*. It should be a function that accepts one argument and raises an exception if that item is not valid. >>> iterable = ['1', '2', 'three', '4', None] >>> list(filter_except(int, iterable, ValueError, TypeError)) ['1', '2', '4'] If an exception other than one given by *exceptions* is raised by *validator*, it is raised like normal. Nr)rFr exceptionsr s rrPrPN sb  IdOOOJJJJ    D s   c'FK|D]} ||V#|$rYwxYwdS)aTransform each item from *iterable* with *function* and yield the result, unless *function* raises one of the specified *exceptions*. *function* is called to transform each item in *iterable*. It should accept one argument. >>> iterable = ['1', '2', 'three', '4', None] >>> list(map_except(int, iterable, ValueError, TypeError)) [1, 2, 4] If an exception other than one given by *exceptions* is raised by *function*, it is raised like normal. Nr)functionrrzr s rr`r`f s] (4..     D s c|SrrrAs rrr{ sQrc#ZK|D]%}||r ||n ||V&dS)aEvaluate each item from *iterable* using *pred*. If the result is equivalent to ``True``, transform the item with *func* and yield it. Otherwise, transform the item with *func_else* and yield it. *pred*, *func*, and *func_else* should each be functions that accept one argument. By default, *func_else* is the identity function. >>> from math import sqrt >>> iterable = list(range(-5, 5)) >>> iterable [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4] >>> list(map_if(iterable, lambda x: x > 3, lambda x: 'toobig')) [-5, -4, -3, -2, -1, 0, 1, 2, 3, 'toobig'] >>> list(map_if(iterable, lambda x: x >= 0, ... lambda x: f'{sqrt(x):.2f}', lambda x: None)) [None, None, None, None, None, '0.00', '1.00', '1.41', '1.73', '2.00'] Nr)rrr func_elser s rrara{ sQ$<< DJJ;dd4jjjIIdOO;;;;<. s1@@f3vxx==6)@@@@@@rrr.c:g|]}tdSr$)r)r!r5rs rr"z$_sample_weighted.. s& 4 4 4aGI  q ! 4 4 4r) r3rr rr!rr#r r) rrweights weight_keyssmallest_weight_keyr5weights_to_skiprr%t_wr_2 weight_keyrs @r_sample_weightedr s: A@@@@KQK2233I I'q\&((mm&99Ow11 & & _ $ $&/q\ " f2233C#q//CSF*J  J#8 9 9 9%.q\ " !&((mm.AAOO v %OO 5 4 4 4588 4 4 44rc|dkrgSt|}|t||St|}t|||S)afReturn a *k*-length list of elements chosen (without replacement) from the *iterable*. Like :func:`random.sample`, but works on iterables of unknown length. >>> iterable = range(100) >>> sample(iterable, 5) # doctest: +SKIP [81, 60, 96, 16, 4] An iterable with *weights* may also be given: >>> iterable = range(100) >>> weights = (i * i + 1 for i in range(100)) >>> sampled = sample(iterable, 5, weights=weights) # doctest: +SKIP [79, 67, 74, 66, 78] The algorithm can also be used to generate weighted random permutations. The relative weight of each item determines the probability that it appears late in the permutation. >>> data = "abcdefgh" >>> weights = range(1, len(data) + 1) >>> sample(data, k=len(data), weights=weights) # doctest: +SKIP ['c', 'a', 'b', 'e', 'g', 'd', 'h', 'f'] r)rrr)rrrs rrwrw sO2 Avv H~~H!(A...w--!W555rc|r|rtntn|rtnt}||nt ||}t t |t| S)aReturns ``True`` if the items of iterable are in sorted order, and ``False`` otherwise. *key* and *reverse* have the same meaning that they do in the built-in :func:`sorted` function. >>> is_sorted(['1', '2', '3', '4', '5'], key=int) True >>> is_sorted([5, 4, 3, 1, 2], reverse=True) False If *strict*, tests for strict sorting, that is, returns ``False`` if equal elements are found: >>> is_sorted([1, 2, 2]) True >>> is_sorted([1, 2, 2], strict=True) False The function returns ``False`` after encountering the first out-of-order item. If there are no out-of-order items, the iterable is exhausted. )r*r)r(r'r-rrr1)rrEr<rcomparers rrYrY s\,*0LW$rr""G6KbbG[c#x&8&8B77HRLL1122 22rceZdZdS)r5N)rrrrrrr5r5 sDrr5cdeZdZdZd dZdZdZdZdZe d Z e d Z d Z d S)r=aConvert a function that uses callbacks to an iterator. Let *func* be a function that takes a `callback` keyword argument. For example: >>> def func(callback=None): ... for i, c in [(1, 'a'), (2, 'b'), (3, 'c')]: ... if callback: ... callback(i, c) ... return 4 Use ``with callback_iter(func)`` to get an iterator over the parameters that are delivered to the callback. >>> with callback_iter(func) as it: ... for args, kwargs in it: ... print(args) (1, 'a') (2, 'b') (3, 'c') The function will be called in a background thread. The ``done`` property indicates whether it has completed execution. >>> it.done True If it completes successfully, its return value will be available in the ``result`` property. >>> it.result 4 Notes: * If the function uses some keyword argument besides ``callback``, supply *callback_kwd*. * If it finished executing, but raised an exception, accessing the ``result`` property will raise the same exception. * If it hasn't finished executing, accessing the ``result`` property from within the ``with`` block will raise ``RuntimeError``. * If it hasn't finished executing, accessing the ``result`` property from outside the ``with`` block will raise a ``more_itertools.AbortThread`` exception. * Provide *wait_seconds* to adjust how frequently the it is polled for output. callback皙?c||_||_d|_d|_||_t djd|_| |_ dS)NFzconcurrent.futuresr.) max_workers) _func _callback_kwd_aborted_future _wait_seconds __import__futuresThreadPoolExecutor _executor_reader _iterator)rr callback_kwd wait_secondss rrzcallback_iter.__init__Ds_ )  )#$899ATTabTccrc|Srrrs r __enter__zcallback_iter.__enter__MrrcFd|_|jdSr@)rrshutdown)rexc_type exc_value tracebacks r__exit__zcallback_iter.__exit__Ps#  !!!!!rc|Srrrs rrzcallback_iter.__iter__Trrc*t|jSr)rrrs rrzcallback_iter.__next__WrrcF|jdS|jSr)rdoners rrzcallback_iter.doneZs# < 5|  """rc`|jstd|jS)NzFunction has not yet completed)r RuntimeErrorrrLrs rrLzcallback_iter.result`s0y A?@@ @|""$$$rc#Ktfd}jjjfij|i_ j}|Vn#t$rYnwxYwj rn`g}  }| |n#t$rYnwxYwP |Ed{VdS)Ncbjrtd||fdS)Nzcanceled by user)rr5put)rrrrs rrz'callback_iter._reader..callbackjs8} 6!"4555 EE4. ! ! ! ! !rT)timeout)r rsubmitrrrgetr task_donerr get_nowaitrjoin)rrr rrs` @rrzcallback_iter._readergsw GG " " " " " " -t~, J  -x8     uuT%7u88       |  ""    ' '||~~   &&&&      ' s#A33 B?B"C C-,C-N)rr) rrrrrrrrrpropertyrrLrrrrr=r=s00d(((("""$$$##X# %%X% #####rr=c# K|dkrtdt|}t|}||krtdt||z dzD]-}|d|}||||z}|||zd}|||fV.dS)a Yield ``(beginning, middle, end)`` tuples, where: * Each ``middle`` has *n* items from *iterable* * Each ``beginning`` has the items before the ones in ``middle`` * Each ``end`` has the items after the ones in ``middle`` >>> iterable = range(7) >>> n = 3 >>> for beginning, middle, end in windowed_complete(iterable, n): ... print(beginning, middle, end) () (0, 1, 2) (3, 4, 5, 6) (0,) (1, 2, 3) (4, 5, 6) (0, 1) (2, 3, 4) (5, 6) (0, 1, 2) (3, 4, 5) (6,) (0, 1, 2, 3) (4, 5, 6) () Note that *n* must be at least 0 and most equal to the length of *iterable*. This function will exhaust the iterable and may require significant storage. rr1zn must be <= len(seq)r.N)rr rr)rrr2rr beginningmiddleends rrrs0 1uu)*** //C s88D4xx0111 4!8a< %%G QQY!a%''l$$$$$ %%rct}|j}g}|j}|rt||n|D]8} ||vrdS||#t$r||vrYdS||Y5wxYwdS)a Returns ``True`` if all the elements of *iterable* are unique (no two elements are equal). >>> all_unique('ABCB') False If a *key* function is specified, it will be used to make comparisons. >>> all_unique('ABCb') True >>> all_unique('ABCb', str.lower) False The function returns as soon as the first non-unique element is encountered. Iterables with a mix of hashable and unhashable items can be used, but the function will be slower for unhashable items. FT)r.addrr-r)rrEseenset seenset_addseenlist seenlist_addr%s rr9r9s&eeG+KH?L),:3sH%%%("" "'!!uu K  " " "(""uuu L ! ! ! ! ! " 4sA  A  A) A)(A)ctttt|}ttt|}t t |}|dkr||z }d|cxkr|ks ntg}t||D](\}}| |||z||z})tt|S)aEquivalent to ``list(product(*args))[index]``. The products of *args* can be ordered lexicographically. :func:`nth_product` computes the product at sort position *index* without computing the previous products. >>> nth_product(8, range(2), range(2), range(2), range(2)) (1, 0, 0, 0) ``IndexError`` will be raised if the given *index* is invalid. r) rr-r rrr r%rrr)rrpoolsnscrLr/rs rrgrgs UHTNN++ , ,E c#uoo  BsBA qyy   >>>>>>>> Fub>>a d519o&&& !  &!! " ""rcnt|}t|}|||kr|t|}}n8d|cxkr|ks ntt|t||z z}|dkr||z }d|cxkr|ks nt|dkrt Sdg|z}||kr|t|z|zn|}t d|dzD]8}t||\}} d||z cxkr|kr nn| |||z <|dkrn9t t|j |S)a'Equivalent to ``list(permutations(iterable, r))[index]``` The subsequences of *iterable* that are of length *r* where order is important can be ordered lexicographically. :func:`nth_permutation` computes the subsequence at sort position *index* directly, without computing the previous subsequences. >>> nth_permutation('ghijk', 2, 5) ('h', 'i') ``ValueError`` will be raised If *r* is negative or greater than the length of *iterable*. ``IndexError`` will be raised if the given *index* is invalid. Nrr.) rrrrrr rrr-ru) rrrr/rrrLrdrs rrfrfsd >>D D AyAFF)A,,1 !ZZZZaZZZZ aLLIa!e,, , qyy   >>>>>>>>AvvwwS1WF%&UU ! !!A 1a!e__a||1 A>>>>>>>>>F1q5M 66 E  TXv&& ' ''rc'K|D]@}t|ttfr|V# |Ed{V-#t$r|VY=wxYwdS)aYield all arguments passed to the function in the same order in which they were passed. If an argument itself is iterable then iterate over its values. >>> list(value_chain(1, 2, 3, [4, 5, 6])) [1, 2, 3, 4, 5, 6] Binary and text strings are not considered iterable and are emitted as-is: >>> list(value_chain('12', '34', ['56', '78'])) ['12', '34', '56', '78'] Multiple levels of nesting are not flattened. N)rrorpr)rrIs rrr%s$ ec5\ * * KKK             KKKKK  s2AAcd}t||tD]]\}}|tus |turtdt|}|t |z||z}^|S)aEquivalent to ``list(product(*args)).index(element)`` The products of *args* can be ordered lexicographically. :func:`product_index` computes the first index of *element* without computing the previous products. >>> product_index([8, 2], range(10), range(5)) 42 ``ValueError`` will be raised if the given *element* isn't in the product of *args*. rrz element is not a product of args)rrrr rr)r%rrrBr/s rroroAs| Ew@@@224 <<47???@@ @T{{D !DJJqMM1 Lrctt|}t|d\}}|dSg}t|}|D]9\}}||kr.||t|d\}}|n|}:tdt ||df\}} d} tt |dD]E\} } || z } | | kr5| t | t | t | | z zzz } Ft |dzt |dzt ||z zz| z S)aEquivalent to ``list(combinations(iterable, r)).index(element)`` The subsequences of *iterable* that are of length *r* can be ordered lexicographically. :func:`combination_index` computes the index of the first *element*, without computing the previous combinations. >>> combination_index('adf', 'abcdefg') 10 ``ValueError`` will be raised if the given *element* isn't one of the combinations of *iterable*. NNNrz(element is not a combination of iterablerr.)r)rarrrr\rr) r%rryindexesr/rrBtmpr5rrrs rrCrCZse  G  & &DAqyqG X  D E E1 66 NN1   '<00FC{CDDD q$i ( ( (DAq E(7++1555GG1 E 66 Yq\\illYq1u5E5E&EF FE QU   !a% 0 09QU3C3C C Du LLrcd}t|}ttt|dd|D]%\}}||}||z|z}||=&|S)aEquivalent to ``list(permutations(iterable, r)).index(element)``` The subsequences of *iterable* that are of length *r* where order is important can be ordered lexicographically. :func:`permutation_index` computes the index of the first *element* directly, without computing the previous permutations. >>> permutation_index([1, 3, 2], range(5)) 19 ``ValueError`` will be raised if the given *element* isn't one of the permutations of *iterable*. rr)rrrrr)r%rrr/rrBrs rrnrnsm E >>DE#d))R,,g661 JJqMM A  GG Lrc$eZdZdZdZdZdZdS)rGaWrap *iterable* and keep a count of how many items have been consumed. The ``items_seen`` attribute starts at ``0`` and increments as the iterable is consumed: >>> iterable = map(str, range(10)) >>> it = countable(iterable) >>> it.items_seen 0 >>> next(it), next(it) ('0', '1') >>> list(it) ['2', '3', '4', '5', '6', '7', '8', '9'] >>> it.items_seen 10 c<t||_d|_dSr)rr items_seenrs rrzcountable.__init__s>>rc|Srrrs rrzcountable.__iter__rrcNt|j}|xjdz c_|Srn)rrrr3s rrzcountable.__next__s$DH~~ 1 rNrprrrrGrGsK"rrGczt|dd}|t||St|||S)aBreak *iterable* into lists of approximately length *n*. Items are distributed such the lengths of the lists differ by at most 1 item. >>> iterable = [1, 2, 3, 4, 5, 6, 7] >>> n = 3 >>> list(chunked_even(iterable, n)) # List lengths: 3, 2, 2 [[1, 2, 3], [4, 5], [6, 7]] >>> list(chunked(iterable, n)) # List lengths: 3, 3, 1 [[1, 2, 3], [4, 5, 6], [7]] rN)getattr_chunked_even_online_chunked_even_finite)rr len_methods rr?r?sC9d33J#Ha000#HjjllA>>>rc#Kg}||dz |dz zz}|D]@}||t||kr|d|V||d}At|t||Ed{VdS)Nr r.)rrr)rrbuffermaxbufrBs rrrs F !a%AE" "F    a v;;& !*   ABBZF#FCKK;;;;;;;;;;;rc#K|dkrdSt||\}}||dkrdndz}t||\}}||dkrdndz}|dz }|||zz }||z } g} t|} | D]=} | | t| |kr| Vg} |dz}|dkrn>| D]5} | | t| |kr | Vg} | dz} 6dS)Nr.r)rrrr) rNrrr num_lists full_size partial_sizenum_full num_partialrrrBs rrrsI1uu !Q<>> iterable_1 = [1, 2, 3] >>> iterable_2 = ['a', 'b', 'c'] >>> scalar = '_' >>> list(zip_broadcast(iterable_1, iterable_2, scalar)) [(1, 'a', '_'), (2, 'b', '_'), (3, 'c', '_')] The *scalar_types* keyword argument determines what types are considered scalar. It is set to ``(str, bytes)`` by default. Set it to ``None`` to treat strings and byte strings as iterable: >>> list(zip_broadcast('abc', 0, 'xyz', scalar_types=None)) [('a', 0, 'x'), ('b', 0, 'y'), ('c', 0, 'z')] If the *strict* keyword argument is ``True``, then ``UnequalIterablesError`` will be raised if any of the iterables have different lengthss. crrt|rdS t|dS#t$rYdSwxYw)NTF)rrr)rrs r is_scalarz zip_broadcast..is_scalars\  JsL99 4  III5   44 s ( 66N)rrarrr rr)rrobjectsrrriterable_positionsscalarsscalar_positionsrrzipperr new_itemrs` rrrs, w<> ) NN3     # #A & & & &   T#YY ' ' '  % %a ( ( ( ( 7||tGnn! *ZZsF "  6D=-t44  GAtHQKK+W55  GAtHQKKHoo  rc#bK|dkrtdt|}t}|du}|D]r}|r ||n|}||vrt||kr||d|||||VsdS)aYield the items from *iterable* that haven't been seen recently. *n* is the size of the lookback window. >>> iterable = [0, 1, 0, 2, 3, 0] >>> n = 3 >>> list(unique_in_window(iterable, n)) [0, 1, 2, 3, 0] The *key* function, if provided, will be used to determine uniqueness: >>> list(unique_in_window('abAcda', 3, key=lambda x: x.lower())) ['a', 'b', 'c', 'd', 'a'] The items in *iterable* must be hashable. rzn must be greater than 0rN)rrr.rdiscardrr)rrrEr4r+use_keyr rs rrr@s" Avv3444 !___FeeGoG   *CCIIId <<  w<<1   OOF1I & & & A a   rc#Kt}g}|du}|D]^}|r ||n|} ||vr||n|V1#t$r!||vr||n|VY[wxYwdS)a{Yield duplicate elements after their first appearance. >>> list(duplicates_everseen('mississippi')) ['s', 'i', 's', 's', 'i', 'p', 'i'] >>> list(duplicates_everseen('AaaBbbCccAaa', str.lower)) ['a', 'a', 'b', 'b', 'c', 'c', 'A', 'a', 'a'] This function is analagous to :func:`unique_everseen` and is subject to the same performance considerations. N)r.rrr)rrEseen_set seen_listrr%rs rrMrMfsuuHIoG  # 0CCLLL    Q     !!  ####    sA  (A54A5c Zttdt||S)a2Yields serially-duplicate elements after their first appearance. >>> list(duplicates_justseen('mississippi')) ['s', 's', 'p'] >>> list(duplicates_justseen('AaaBbbCccAaa', str.lower)) ['a', 'a', 'b', 'b', 'c', 'c', 'a', 'a'] This function is analagous to :func:`unique_justseen`. c<t|dddSrn)rZ) group_tuples rrz%duplicates_justseen..s A ? ? Cr)r0r-r)rrEs rrNrNs6  C C Hc " "    r)rErc|r|g|Rn|}t|} t|x}}n2#t$r%}|turt d||cYd}~Sd}~wwxYw|3t |||D]\} } | | kr| | } } | |kr| }|| kr| } n`||x} } t |||D]@\} } || || }} || kr | | || f\} } } }| | kr| | } }| |kr| |} }A||fS)aReturns both the smallest and largest items in an iterable or the largest of two or more arguments. >>> minmax([3, 1, 5]) (1, 5) >>> minmax(4, 2, 6) (2, 6) If a *key* function is provided, it will be used to transform the input items for comparison. >>> minmax([5, 30], key=str) # '30' sorts before '5' (30, 5) If a *default* value is provided, it will be returned if there are no input items. >>> minmax([], default=(0, 0)) (0, 0) Otherwise ``ValueError`` is raised. This function is based on the `recipe `__ by Raymond Hettinger and takes care to minimize the number of comparisons performed. z[`minmax()` argument is an empty iterable. Provide a `default` value to suppress this error.Nr)rrrrrr)iterable_or_valuerErothersrrlohirrBrlo_keyhi_keyx_keyy_keys rrdrds:06L!+F+++;LH hBr((RR  g  D   {B"555  DAq1uu!12vvAvv  #b''!B"555 & &DAq3q6633q665Eu}}%&5%%7"1eUv~~F~~F r6Ms- AAAA)Frrr$rn)NNN)rF)r)NNF)r )rFN)rNF)NFF)r collectionsrrrrcollections.abcr functoolsrr r heapqr r r r itertoolsrrrrrrrrrrrrmathrrrrqueuerr r!r"r#operatorr$r%r&r'r(r)r*sysr+r,timer-recipesr/r0r1r2r3r4__all__objectrr>rQr\rermrBrErTr[rrirprrJrXrrrrr<rrUrWrVrArzr{r~rr}rrrkrqrrrKrrr7rrrrr|rrLrorpr:r8rRHashablerhrFrcrr]r^rurrZrr;rDrHr6rxrvrOr@r_rbrtrsrlryrrjrSrIrPr`rarrrwrY BaseExceptionr5r=rr9rgrfrrorCrnrGr?rrrrrMrNrdrrrrs} 888888888888$$$$$$,,,,,,,,,,666666666666                            ,+++++++++++----------999999999999999999########_ _ _ D &((    F$8#:&-::::"b"b"b"b"b"b"b"b"J#'#'#'L@"      @@@@FGGGGTa$a$a$a$HDDDD4CCCB0000f!!!4D]']']']']']']']'@((((((((V 0 0 0 . . . ?+?+?+?+D-!-!-!-!`::::zD))))X    F!!!!H****Z*)*)*)Z@AAAA& M M MF8J///(""">-2T$$$$$N????D.K.K.Kb000f%(<2222j$)$)$)$)N****ZV,V,V,V,V,CL#,V,V,V,r = = = = """JD-0-0-0-0`%%%$4000"+P+P+P+P+P+P+P+P\]&]&]&@((($+6+-$-$-$-$`"'2d'2'2'2'2'2T*L*L*L*L*L8*L*L*LZI%I%I%I%I%I%I%I%XFFFFFFFF:&*>>>>$:::>>>>B@@@@F T(?(?(?(?V::::zBBB(5/5/5/5/p********Z&&&&R"""J%%%P0*,7;<<<<,4 5 5 5F!6!6!6!6H33336     -   yyyyyyyyx%%%%%%P    F###>+(+(+(\82(M(M(MV0@???,<<<   F+.ue<<<<<~####L<&,0EEEEEEErPK|5ZaʥuSSBLib/site-packages/pkg_resources/_vendor/more_itertools/__init__.pynuW+Afrom .more import * # noqa from .recipes import * # noqa __version__ = '8.12.0' PK|5Z:$ν>Lib/site-packages/pkg_resources/_vendor/more_itertools/more.pynuW+Aimport warnings from collections import Counter, defaultdict, deque, abc from collections.abc import Sequence from functools import partial, reduce, wraps from heapq import merge, heapify, heapreplace, heappop from itertools import ( chain, compress, count, cycle, dropwhile, groupby, islice, repeat, starmap, takewhile, tee, zip_longest, ) from math import exp, factorial, floor, log from queue import Empty, Queue from random import random, randrange, uniform from operator import itemgetter, mul, sub, gt, lt, ge, le from sys import hexversion, maxsize from time import monotonic from .recipes import ( consume, flatten, pairwise, powerset, take, unique_everseen, ) __all__ = [ 'AbortThread', 'SequenceView', 'UnequalIterablesError', 'adjacent', 'all_unique', 'always_iterable', 'always_reversible', 'bucket', 'callback_iter', 'chunked', 'chunked_even', 'circular_shifts', 'collapse', 'collate', 'combination_index', 'consecutive_groups', 'consumer', 'count_cycle', 'countable', 'difference', 'distinct_combinations', 'distinct_permutations', 'distribute', 'divide', 'duplicates_everseen', 'duplicates_justseen', 'exactly_n', 'filter_except', 'first', 'groupby_transform', 'ichunked', 'ilen', 'interleave', 'interleave_evenly', 'interleave_longest', 'intersperse', 'is_sorted', 'islice_extended', 'iterate', 'last', 'locate', 'lstrip', 'make_decorator', 'map_except', 'map_if', 'map_reduce', 'mark_ends', 'minmax', 'nth_or_last', 'nth_permutation', 'nth_product', 'numeric_range', 'one', 'only', 'padded', 'partitions', 'peekable', 'permutation_index', 'product_index', 'raise_', 'repeat_each', 'repeat_last', 'replace', 'rlocate', 'rstrip', 'run_length', 'sample', 'seekable', 'set_partitions', 'side_effect', 'sliced', 'sort_together', 'split_after', 'split_at', 'split_before', 'split_into', 'split_when', 'spy', 'stagger', 'strip', 'strictly_n', 'substrings', 'substrings_indexes', 'time_limited', 'unique_in_window', 'unique_to_each', 'unzip', 'value_chain', 'windowed', 'windowed_complete', 'with_iter', 'zip_broadcast', 'zip_equal', 'zip_offset', ] _marker = object() def chunked(iterable, n, strict=False): """Break *iterable* into lists of length *n*: >>> list(chunked([1, 2, 3, 4, 5, 6], 3)) [[1, 2, 3], [4, 5, 6]] By the default, the last yielded list will have fewer than *n* elements if the length of *iterable* is not divisible by *n*: >>> list(chunked([1, 2, 3, 4, 5, 6, 7, 8], 3)) [[1, 2, 3], [4, 5, 6], [7, 8]] To use a fill-in value instead, see the :func:`grouper` recipe. If the length of *iterable* is not divisible by *n* and *strict* is ``True``, then ``ValueError`` will be raised before the last list is yielded. """ iterator = iter(partial(take, n, iter(iterable)), []) if strict: if n is None: raise ValueError('n must not be None when using strict mode.') def ret(): for chunk in iterator: if len(chunk) != n: raise ValueError('iterable is not divisible by n.') yield chunk return iter(ret()) else: return iterator def first(iterable, default=_marker): """Return the first item of *iterable*, or *default* if *iterable* is empty. >>> first([0, 1, 2, 3]) 0 >>> first([], 'some default') 'some default' If *default* is not provided and there are no items in the iterable, raise ``ValueError``. :func:`first` is useful when you have a generator of expensive-to-retrieve values and want any arbitrary one. It is marginally shorter than ``next(iter(iterable), default)``. """ try: return next(iter(iterable)) except StopIteration as e: if default is _marker: raise ValueError( 'first() was called on an empty iterable, and no ' 'default value was provided.' ) from e return default def last(iterable, default=_marker): """Return the last item of *iterable*, or *default* if *iterable* is empty. >>> last([0, 1, 2, 3]) 3 >>> last([], 'some default') 'some default' If *default* is not provided and there are no items in the iterable, raise ``ValueError``. """ try: if isinstance(iterable, Sequence): return iterable[-1] # Work around https://bugs.python.org/issue38525 elif hasattr(iterable, '__reversed__') and (hexversion != 0x030800F0): return next(reversed(iterable)) else: return deque(iterable, maxlen=1)[-1] except (IndexError, TypeError, StopIteration): if default is _marker: raise ValueError( 'last() was called on an empty iterable, and no default was ' 'provided.' ) return default def nth_or_last(iterable, n, default=_marker): """Return the nth or the last item of *iterable*, or *default* if *iterable* is empty. >>> nth_or_last([0, 1, 2, 3], 2) 2 >>> nth_or_last([0, 1], 2) 1 >>> nth_or_last([], 0, 'some default') 'some default' If *default* is not provided and there are no items in the iterable, raise ``ValueError``. """ return last(islice(iterable, n + 1), default=default) class peekable: """Wrap an iterator to allow lookahead and prepending elements. Call :meth:`peek` on the result to get the value that will be returned by :func:`next`. This won't advance the iterator: >>> p = peekable(['a', 'b']) >>> p.peek() 'a' >>> next(p) 'a' Pass :meth:`peek` a default value to return that instead of raising ``StopIteration`` when the iterator is exhausted. >>> p = peekable([]) >>> p.peek('hi') 'hi' peekables also offer a :meth:`prepend` method, which "inserts" items at the head of the iterable: >>> p = peekable([1, 2, 3]) >>> p.prepend(10, 11, 12) >>> next(p) 10 >>> p.peek() 11 >>> list(p) [11, 12, 1, 2, 3] peekables can be indexed. Index 0 is the item that will be returned by :func:`next`, index 1 is the item after that, and so on: The values up to the given index will be cached. >>> p = peekable(['a', 'b', 'c', 'd']) >>> p[0] 'a' >>> p[1] 'b' >>> next(p) 'a' Negative indexes are supported, but be aware that they will cache the remaining items in the source iterator, which may require significant storage. To check whether a peekable is exhausted, check its truth value: >>> p = peekable(['a', 'b']) >>> if p: # peekable has items ... list(p) ['a', 'b'] >>> if not p: # peekable is exhausted ... list(p) [] """ def __init__(self, iterable): self._it = iter(iterable) self._cache = deque() def __iter__(self): return self def __bool__(self): try: self.peek() except StopIteration: return False return True def peek(self, default=_marker): """Return the item that will be next returned from ``next()``. Return ``default`` if there are no items left. If ``default`` is not provided, raise ``StopIteration``. """ if not self._cache: try: self._cache.append(next(self._it)) except StopIteration: if default is _marker: raise return default return self._cache[0] def prepend(self, *items): """Stack up items to be the next ones returned from ``next()`` or ``self.peek()``. The items will be returned in first in, first out order:: >>> p = peekable([1, 2, 3]) >>> p.prepend(10, 11, 12) >>> next(p) 10 >>> list(p) [11, 12, 1, 2, 3] It is possible, by prepending items, to "resurrect" a peekable that previously raised ``StopIteration``. >>> p = peekable([]) >>> next(p) Traceback (most recent call last): ... StopIteration >>> p.prepend(1) >>> next(p) 1 >>> next(p) Traceback (most recent call last): ... StopIteration """ self._cache.extendleft(reversed(items)) def __next__(self): if self._cache: return self._cache.popleft() return next(self._it) def _get_slice(self, index): # Normalize the slice's arguments step = 1 if (index.step is None) else index.step if step > 0: start = 0 if (index.start is None) else index.start stop = maxsize if (index.stop is None) else index.stop elif step < 0: start = -1 if (index.start is None) else index.start stop = (-maxsize - 1) if (index.stop is None) else index.stop else: raise ValueError('slice step cannot be zero') # If either the start or stop index is negative, we'll need to cache # the rest of the iterable in order to slice from the right side. if (start < 0) or (stop < 0): self._cache.extend(self._it) # Otherwise we'll need to find the rightmost index and cache to that # point. else: n = min(max(start, stop) + 1, maxsize) cache_len = len(self._cache) if n >= cache_len: self._cache.extend(islice(self._it, n - cache_len)) return list(self._cache)[index] def __getitem__(self, index): if isinstance(index, slice): return self._get_slice(index) cache_len = len(self._cache) if index < 0: self._cache.extend(self._it) elif index >= cache_len: self._cache.extend(islice(self._it, index + 1 - cache_len)) return self._cache[index] def collate(*iterables, **kwargs): """Return a sorted merge of the items from each of several already-sorted *iterables*. >>> list(collate('ACDZ', 'AZ', 'JKL')) ['A', 'A', 'C', 'D', 'J', 'K', 'L', 'Z', 'Z'] Works lazily, keeping only the next value from each iterable in memory. Use :func:`collate` to, for example, perform a n-way mergesort of items that don't fit in memory. If a *key* function is specified, the iterables will be sorted according to its result: >>> key = lambda s: int(s) # Sort by numeric value, not by string >>> list(collate(['1', '10'], ['2', '11'], key=key)) ['1', '2', '10', '11'] If the *iterables* are sorted in descending order, set *reverse* to ``True``: >>> list(collate([5, 3, 1], [4, 2, 0], reverse=True)) [5, 4, 3, 2, 1, 0] If the elements of the passed-in iterables are out of order, you might get unexpected results. On Python 3.5+, this function is an alias for :func:`heapq.merge`. """ warnings.warn( "collate is no longer part of more_itertools, use heapq.merge", DeprecationWarning, ) return merge(*iterables, **kwargs) def consumer(func): """Decorator that automatically advances a PEP-342-style "reverse iterator" to its first yield point so you don't have to call ``next()`` on it manually. >>> @consumer ... def tally(): ... i = 0 ... while True: ... print('Thing number %s is %s.' % (i, (yield))) ... i += 1 ... >>> t = tally() >>> t.send('red') Thing number 0 is red. >>> t.send('fish') Thing number 1 is fish. Without the decorator, you would have to call ``next(t)`` before ``t.send()`` could be used. """ @wraps(func) def wrapper(*args, **kwargs): gen = func(*args, **kwargs) next(gen) return gen return wrapper def ilen(iterable): """Return the number of items in *iterable*. >>> ilen(x for x in range(1000000) if x % 3 == 0) 333334 This consumes the iterable, so handle with care. """ # This approach was selected because benchmarks showed it's likely the # fastest of the known implementations at the time of writing. # See GitHub tracker: #236, #230. counter = count() deque(zip(iterable, counter), maxlen=0) return next(counter) def iterate(func, start): """Return ``start``, ``func(start)``, ``func(func(start))``, ... >>> from itertools import islice >>> list(islice(iterate(lambda x: 2*x, 1), 10)) [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] """ while True: yield start start = func(start) def with_iter(context_manager): """Wrap an iterable in a ``with`` statement, so it closes once exhausted. For example, this will close the file when the iterator is exhausted:: upper_lines = (line.upper() for line in with_iter(open('foo'))) Any context manager which returns an iterable is a candidate for ``with_iter``. """ with context_manager as iterable: yield from iterable def one(iterable, too_short=None, too_long=None): """Return the first item from *iterable*, which is expected to contain only that item. Raise an exception if *iterable* is empty or has more than one item. :func:`one` is useful for ensuring that an iterable contains only one item. For example, it can be used to retrieve the result of a database query that is expected to return a single row. If *iterable* is empty, ``ValueError`` will be raised. You may specify a different exception with the *too_short* keyword: >>> it = [] >>> one(it) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: too many items in iterable (expected 1)' >>> too_short = IndexError('too few items') >>> one(it, too_short=too_short) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... IndexError: too few items Similarly, if *iterable* contains more than one item, ``ValueError`` will be raised. You may specify a different exception with the *too_long* keyword: >>> it = ['too', 'many'] >>> one(it) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: Expected exactly one item in iterable, but got 'too', 'many', and perhaps more. >>> too_long = RuntimeError >>> one(it, too_long=too_long) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... RuntimeError Note that :func:`one` attempts to advance *iterable* twice to ensure there is only one item. See :func:`spy` or :func:`peekable` to check iterable contents less destructively. """ it = iter(iterable) try: first_value = next(it) except StopIteration as e: raise ( too_short or ValueError('too few items in iterable (expected 1)') ) from e try: second_value = next(it) except StopIteration: pass else: msg = ( 'Expected exactly one item in iterable, but got {!r}, {!r}, ' 'and perhaps more.'.format(first_value, second_value) ) raise too_long or ValueError(msg) return first_value def raise_(exception, *args): raise exception(*args) def strictly_n(iterable, n, too_short=None, too_long=None): """Validate that *iterable* has exactly *n* items and return them if it does. If it has fewer than *n* items, call function *too_short* with those items. If it has more than *n* items, call function *too_long* with the first ``n + 1`` items. >>> iterable = ['a', 'b', 'c', 'd'] >>> n = 4 >>> list(strictly_n(iterable, n)) ['a', 'b', 'c', 'd'] By default, *too_short* and *too_long* are functions that raise ``ValueError``. >>> list(strictly_n('ab', 3)) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: too few items in iterable (got 2) >>> list(strictly_n('abc', 2)) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: too many items in iterable (got at least 3) You can instead supply functions that do something else. *too_short* will be called with the number of items in *iterable*. *too_long* will be called with `n + 1`. >>> def too_short(item_count): ... raise RuntimeError >>> it = strictly_n('abcd', 6, too_short=too_short) >>> list(it) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... RuntimeError >>> def too_long(item_count): ... print('The boss is going to hear about this') >>> it = strictly_n('abcdef', 4, too_long=too_long) >>> list(it) The boss is going to hear about this ['a', 'b', 'c', 'd'] """ if too_short is None: too_short = lambda item_count: raise_( ValueError, 'Too few items in iterable (got {})'.format(item_count), ) if too_long is None: too_long = lambda item_count: raise_( ValueError, 'Too many items in iterable (got at least {})'.format(item_count), ) it = iter(iterable) for i in range(n): try: item = next(it) except StopIteration: too_short(i) return else: yield item try: next(it) except StopIteration: pass else: too_long(n + 1) def distinct_permutations(iterable, r=None): """Yield successive distinct permutations of the elements in *iterable*. >>> sorted(distinct_permutations([1, 0, 1])) [(0, 1, 1), (1, 0, 1), (1, 1, 0)] Equivalent to ``set(permutations(iterable))``, except duplicates are not generated and thrown away. For larger input sequences this is much more efficient. Duplicate permutations arise when there are duplicated elements in the input iterable. The number of items returned is `n! / (x_1! * x_2! * ... * x_n!)`, where `n` is the total number of items input, and each `x_i` is the count of a distinct item in the input sequence. If *r* is given, only the *r*-length permutations are yielded. >>> sorted(distinct_permutations([1, 0, 1], r=2)) [(0, 1), (1, 0), (1, 1)] >>> sorted(distinct_permutations(range(3), r=2)) [(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)] """ # Algorithm: https://w.wiki/Qai def _full(A): while True: # Yield the permutation we have yield tuple(A) # Find the largest index i such that A[i] < A[i + 1] for i in range(size - 2, -1, -1): if A[i] < A[i + 1]: break # If no such index exists, this permutation is the last one else: return # Find the largest index j greater than j such that A[i] < A[j] for j in range(size - 1, i, -1): if A[i] < A[j]: break # Swap the value of A[i] with that of A[j], then reverse the # sequence from A[i + 1] to form the new permutation A[i], A[j] = A[j], A[i] A[i + 1 :] = A[: i - size : -1] # A[i + 1:][::-1] # Algorithm: modified from the above def _partial(A, r): # Split A into the first r items and the last r items head, tail = A[:r], A[r:] right_head_indexes = range(r - 1, -1, -1) left_tail_indexes = range(len(tail)) while True: # Yield the permutation we have yield tuple(head) # Starting from the right, find the first index of the head with # value smaller than the maximum value of the tail - call it i. pivot = tail[-1] for i in right_head_indexes: if head[i] < pivot: break pivot = head[i] else: return # Starting from the left, find the first value of the tail # with a value greater than head[i] and swap. for j in left_tail_indexes: if tail[j] > head[i]: head[i], tail[j] = tail[j], head[i] break # If we didn't find one, start from the right and find the first # index of the head with a value greater than head[i] and swap. else: for j in right_head_indexes: if head[j] > head[i]: head[i], head[j] = head[j], head[i] break # Reverse head[i + 1:] and swap it with tail[:r - (i + 1)] tail += head[: i - r : -1] # head[i + 1:][::-1] i += 1 head[i:], tail[:] = tail[: r - i], tail[r - i :] items = sorted(iterable) size = len(items) if r is None: r = size if 0 < r <= size: return _full(items) if (r == size) else _partial(items, r) return iter(() if r else ((),)) def intersperse(e, iterable, n=1): """Intersperse filler element *e* among the items in *iterable*, leaving *n* items between each filler element. >>> list(intersperse('!', [1, 2, 3, 4, 5])) [1, '!', 2, '!', 3, '!', 4, '!', 5] >>> list(intersperse(None, [1, 2, 3, 4, 5], n=2)) [1, 2, None, 3, 4, None, 5] """ if n == 0: raise ValueError('n must be > 0') elif n == 1: # interleave(repeat(e), iterable) -> e, x_0, e, x_1, e, x_2... # islice(..., 1, None) -> x_0, e, x_1, e, x_2... return islice(interleave(repeat(e), iterable), 1, None) else: # interleave(filler, chunks) -> [e], [x_0, x_1], [e], [x_2, x_3]... # islice(..., 1, None) -> [x_0, x_1], [e], [x_2, x_3]... # flatten(...) -> x_0, x_1, e, x_2, x_3... filler = repeat([e]) chunks = chunked(iterable, n) return flatten(islice(interleave(filler, chunks), 1, None)) def unique_to_each(*iterables): """Return the elements from each of the input iterables that aren't in the other input iterables. For example, suppose you have a set of packages, each with a set of dependencies:: {'pkg_1': {'A', 'B'}, 'pkg_2': {'B', 'C'}, 'pkg_3': {'B', 'D'}} If you remove one package, which dependencies can also be removed? If ``pkg_1`` is removed, then ``A`` is no longer necessary - it is not associated with ``pkg_2`` or ``pkg_3``. Similarly, ``C`` is only needed for ``pkg_2``, and ``D`` is only needed for ``pkg_3``:: >>> unique_to_each({'A', 'B'}, {'B', 'C'}, {'B', 'D'}) [['A'], ['C'], ['D']] If there are duplicates in one input iterable that aren't in the others they will be duplicated in the output. Input order is preserved:: >>> unique_to_each("mississippi", "missouri") [['p', 'p'], ['o', 'u', 'r']] It is assumed that the elements of each iterable are hashable. """ pool = [list(it) for it in iterables] counts = Counter(chain.from_iterable(map(set, pool))) uniques = {element for element in counts if counts[element] == 1} return [list(filter(uniques.__contains__, it)) for it in pool] def windowed(seq, n, fillvalue=None, step=1): """Return a sliding window of width *n* over the given iterable. >>> all_windows = windowed([1, 2, 3, 4, 5], 3) >>> list(all_windows) [(1, 2, 3), (2, 3, 4), (3, 4, 5)] When the window is larger than the iterable, *fillvalue* is used in place of missing values: >>> list(windowed([1, 2, 3], 4)) [(1, 2, 3, None)] Each window will advance in increments of *step*: >>> list(windowed([1, 2, 3, 4, 5, 6], 3, fillvalue='!', step=2)) [(1, 2, 3), (3, 4, 5), (5, 6, '!')] To slide into the iterable's items, use :func:`chain` to add filler items to the left: >>> iterable = [1, 2, 3, 4] >>> n = 3 >>> padding = [None] * (n - 1) >>> list(windowed(chain(padding, iterable), 3)) [(None, None, 1), (None, 1, 2), (1, 2, 3), (2, 3, 4)] """ if n < 0: raise ValueError('n must be >= 0') if n == 0: yield tuple() return if step < 1: raise ValueError('step must be >= 1') window = deque(maxlen=n) i = n for _ in map(window.append, seq): i -= 1 if not i: i = step yield tuple(window) size = len(window) if size < n: yield tuple(chain(window, repeat(fillvalue, n - size))) elif 0 < i < min(step, n): window += (fillvalue,) * i yield tuple(window) def substrings(iterable): """Yield all of the substrings of *iterable*. >>> [''.join(s) for s in substrings('more')] ['m', 'o', 'r', 'e', 'mo', 'or', 're', 'mor', 'ore', 'more'] Note that non-string iterables can also be subdivided. >>> list(substrings([0, 1, 2])) [(0,), (1,), (2,), (0, 1), (1, 2), (0, 1, 2)] """ # The length-1 substrings seq = [] for item in iter(iterable): seq.append(item) yield (item,) seq = tuple(seq) item_count = len(seq) # And the rest for n in range(2, item_count + 1): for i in range(item_count - n + 1): yield seq[i : i + n] def substrings_indexes(seq, reverse=False): """Yield all substrings and their positions in *seq* The items yielded will be a tuple of the form ``(substr, i, j)``, where ``substr == seq[i:j]``. This function only works for iterables that support slicing, such as ``str`` objects. >>> for item in substrings_indexes('more'): ... print(item) ('m', 0, 1) ('o', 1, 2) ('r', 2, 3) ('e', 3, 4) ('mo', 0, 2) ('or', 1, 3) ('re', 2, 4) ('mor', 0, 3) ('ore', 1, 4) ('more', 0, 4) Set *reverse* to ``True`` to yield the same items in the opposite order. """ r = range(1, len(seq) + 1) if reverse: r = reversed(r) return ( (seq[i : i + L], i, i + L) for L in r for i in range(len(seq) - L + 1) ) class bucket: """Wrap *iterable* and return an object that buckets it iterable into child iterables based on a *key* function. >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character >>> sorted(list(s)) # Get the keys ['a', 'b', 'c'] >>> a_iterable = s['a'] >>> next(a_iterable) 'a1' >>> next(a_iterable) 'a2' >>> list(s['b']) ['b1', 'b2', 'b3'] The original iterable will be advanced and its items will be cached until they are used by the child iterables. This may require significant storage. By default, attempting to select a bucket to which no items belong will exhaust the iterable and cache all values. If you specify a *validator* function, selected buckets will instead be checked against it. >>> from itertools import count >>> it = count(1, 2) # Infinite sequence of odd numbers >>> key = lambda x: x % 10 # Bucket by last digit >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only >>> s = bucket(it, key=key, validator=validator) >>> 2 in s False >>> list(s[2]) [] """ def __init__(self, iterable, key, validator=None): self._it = iter(iterable) self._key = key self._cache = defaultdict(deque) self._validator = validator or (lambda x: True) def __contains__(self, value): if not self._validator(value): return False try: item = next(self[value]) except StopIteration: return False else: self._cache[value].appendleft(item) return True def _get_values(self, value): """ Helper to yield items from the parent iterator that match *value*. Items that don't match are stored in the local cache as they are encountered. """ while True: # If we've cached some items that match the target value, emit # the first one and evict it from the cache. if self._cache[value]: yield self._cache[value].popleft() # Otherwise we need to advance the parent iterator to search for # a matching item, caching the rest. else: while True: try: item = next(self._it) except StopIteration: return item_value = self._key(item) if item_value == value: yield item break elif self._validator(item_value): self._cache[item_value].append(item) def __iter__(self): for item in self._it: item_value = self._key(item) if self._validator(item_value): self._cache[item_value].append(item) yield from self._cache.keys() def __getitem__(self, value): if not self._validator(value): return iter(()) return self._get_values(value) def spy(iterable, n=1): """Return a 2-tuple with a list containing the first *n* elements of *iterable*, and an iterator with the same items as *iterable*. This allows you to "look ahead" at the items in the iterable without advancing it. There is one item in the list by default: >>> iterable = 'abcdefg' >>> head, iterable = spy(iterable) >>> head ['a'] >>> list(iterable) ['a', 'b', 'c', 'd', 'e', 'f', 'g'] You may use unpacking to retrieve items instead of lists: >>> (head,), iterable = spy('abcdefg') >>> head 'a' >>> (first, second), iterable = spy('abcdefg', 2) >>> first 'a' >>> second 'b' The number of items requested can be larger than the number of items in the iterable: >>> iterable = [1, 2, 3, 4, 5] >>> head, iterable = spy(iterable, 10) >>> head [1, 2, 3, 4, 5] >>> list(iterable) [1, 2, 3, 4, 5] """ it = iter(iterable) head = take(n, it) return head.copy(), chain(head, it) def interleave(*iterables): """Return a new iterable yielding from each iterable in turn, until the shortest is exhausted. >>> list(interleave([1, 2, 3], [4, 5], [6, 7, 8])) [1, 4, 6, 2, 5, 7] For a version that doesn't terminate after the shortest iterable is exhausted, see :func:`interleave_longest`. """ return chain.from_iterable(zip(*iterables)) def interleave_longest(*iterables): """Return a new iterable yielding from each iterable in turn, skipping any that are exhausted. >>> list(interleave_longest([1, 2, 3], [4, 5], [6, 7, 8])) [1, 4, 6, 2, 5, 7, 3, 8] This function produces the same output as :func:`roundrobin`, but may perform better for some inputs (in particular when the number of iterables is large). """ i = chain.from_iterable(zip_longest(*iterables, fillvalue=_marker)) return (x for x in i if x is not _marker) def interleave_evenly(iterables, lengths=None): """ Interleave multiple iterables so that their elements are evenly distributed throughout the output sequence. >>> iterables = [1, 2, 3, 4, 5], ['a', 'b'] >>> list(interleave_evenly(iterables)) [1, 2, 'a', 3, 4, 'b', 5] >>> iterables = [[1, 2, 3], [4, 5], [6, 7, 8]] >>> list(interleave_evenly(iterables)) [1, 6, 4, 2, 7, 3, 8, 5] This function requires iterables of known length. Iterables without ``__len__()`` can be used by manually specifying lengths with *lengths*: >>> from itertools import combinations, repeat >>> iterables = [combinations(range(4), 2), ['a', 'b', 'c']] >>> lengths = [4 * (4 - 1) // 2, 3] >>> list(interleave_evenly(iterables, lengths=lengths)) [(0, 1), (0, 2), 'a', (0, 3), (1, 2), 'b', (1, 3), (2, 3), 'c'] Based on Bresenham's algorithm. """ if lengths is None: try: lengths = [len(it) for it in iterables] except TypeError: raise ValueError( 'Iterable lengths could not be determined automatically. ' 'Specify them with the lengths keyword.' ) elif len(iterables) != len(lengths): raise ValueError('Mismatching number of iterables and lengths.') dims = len(lengths) # sort iterables by length, descending lengths_permute = sorted( range(dims), key=lambda i: lengths[i], reverse=True ) lengths_desc = [lengths[i] for i in lengths_permute] iters_desc = [iter(iterables[i]) for i in lengths_permute] # the longest iterable is the primary one (Bresenham: the longest # distance along an axis) delta_primary, deltas_secondary = lengths_desc[0], lengths_desc[1:] iter_primary, iters_secondary = iters_desc[0], iters_desc[1:] errors = [delta_primary // dims] * len(deltas_secondary) to_yield = sum(lengths) while to_yield: yield next(iter_primary) to_yield -= 1 # update errors for each secondary iterable errors = [e - delta for e, delta in zip(errors, deltas_secondary)] # those iterables for which the error is negative are yielded # ("diagonal step" in Bresenham) for i, e in enumerate(errors): if e < 0: yield next(iters_secondary[i]) to_yield -= 1 errors[i] += delta_primary def collapse(iterable, base_type=None, levels=None): """Flatten an iterable with multiple levels of nesting (e.g., a list of lists of tuples) into non-iterable types. >>> iterable = [(1, 2), ([3, 4], [[5], [6]])] >>> list(collapse(iterable)) [1, 2, 3, 4, 5, 6] Binary and text strings are not considered iterable and will not be collapsed. To avoid collapsing other types, specify *base_type*: >>> iterable = ['ab', ('cd', 'ef'), ['gh', 'ij']] >>> list(collapse(iterable, base_type=tuple)) ['ab', ('cd', 'ef'), 'gh', 'ij'] Specify *levels* to stop flattening after a certain level: >>> iterable = [('a', ['b']), ('c', ['d'])] >>> list(collapse(iterable)) # Fully flattened ['a', 'b', 'c', 'd'] >>> list(collapse(iterable, levels=1)) # Only one level flattened ['a', ['b'], 'c', ['d']] """ def walk(node, level): if ( ((levels is not None) and (level > levels)) or isinstance(node, (str, bytes)) or ((base_type is not None) and isinstance(node, base_type)) ): yield node return try: tree = iter(node) except TypeError: yield node return else: for child in tree: yield from walk(child, level + 1) yield from walk(iterable, 0) def side_effect(func, iterable, chunk_size=None, before=None, after=None): """Invoke *func* on each item in *iterable* (or on each *chunk_size* group of items) before yielding the item. `func` must be a function that takes a single argument. Its return value will be discarded. *before* and *after* are optional functions that take no arguments. They will be executed before iteration starts and after it ends, respectively. `side_effect` can be used for logging, updating progress bars, or anything that is not functionally "pure." Emitting a status message: >>> from more_itertools import consume >>> func = lambda item: print('Received {}'.format(item)) >>> consume(side_effect(func, range(2))) Received 0 Received 1 Operating on chunks of items: >>> pair_sums = [] >>> func = lambda chunk: pair_sums.append(sum(chunk)) >>> list(side_effect(func, [0, 1, 2, 3, 4, 5], 2)) [0, 1, 2, 3, 4, 5] >>> list(pair_sums) [1, 5, 9] Writing to a file-like object: >>> from io import StringIO >>> from more_itertools import consume >>> f = StringIO() >>> func = lambda x: print(x, file=f) >>> before = lambda: print(u'HEADER', file=f) >>> after = f.close >>> it = [u'a', u'b', u'c'] >>> consume(side_effect(func, it, before=before, after=after)) >>> f.closed True """ try: if before is not None: before() if chunk_size is None: for item in iterable: func(item) yield item else: for chunk in chunked(iterable, chunk_size): func(chunk) yield from chunk finally: if after is not None: after() def sliced(seq, n, strict=False): """Yield slices of length *n* from the sequence *seq*. >>> list(sliced((1, 2, 3, 4, 5, 6), 3)) [(1, 2, 3), (4, 5, 6)] By the default, the last yielded slice will have fewer than *n* elements if the length of *seq* is not divisible by *n*: >>> list(sliced((1, 2, 3, 4, 5, 6, 7, 8), 3)) [(1, 2, 3), (4, 5, 6), (7, 8)] If the length of *seq* is not divisible by *n* and *strict* is ``True``, then ``ValueError`` will be raised before the last slice is yielded. This function will only work for iterables that support slicing. For non-sliceable iterables, see :func:`chunked`. """ iterator = takewhile(len, (seq[i : i + n] for i in count(0, n))) if strict: def ret(): for _slice in iterator: if len(_slice) != n: raise ValueError("seq is not divisible by n.") yield _slice return iter(ret()) else: return iterator def split_at(iterable, pred, maxsplit=-1, keep_separator=False): """Yield lists of items from *iterable*, where each list is delimited by an item where callable *pred* returns ``True``. >>> list(split_at('abcdcba', lambda x: x == 'b')) [['a'], ['c', 'd', 'c'], ['a']] >>> list(split_at(range(10), lambda n: n % 2 == 1)) [[0], [2], [4], [6], [8], []] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_at(range(10), lambda n: n % 2 == 1, maxsplit=2)) [[0], [2], [4, 5, 6, 7, 8, 9]] By default, the delimiting items are not included in the output. The include them, set *keep_separator* to ``True``. >>> list(split_at('abcdcba', lambda x: x == 'b', keep_separator=True)) [['a'], ['b'], ['c', 'd', 'c'], ['b'], ['a']] """ if maxsplit == 0: yield list(iterable) return buf = [] it = iter(iterable) for item in it: if pred(item): yield buf if keep_separator: yield [item] if maxsplit == 1: yield list(it) return buf = [] maxsplit -= 1 else: buf.append(item) yield buf def split_before(iterable, pred, maxsplit=-1): """Yield lists of items from *iterable*, where each list ends just before an item for which callable *pred* returns ``True``: >>> list(split_before('OneTwo', lambda s: s.isupper())) [['O', 'n', 'e'], ['T', 'w', 'o']] >>> list(split_before(range(10), lambda n: n % 3 == 0)) [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_before(range(10), lambda n: n % 3 == 0, maxsplit=2)) [[0, 1, 2], [3, 4, 5], [6, 7, 8, 9]] """ if maxsplit == 0: yield list(iterable) return buf = [] it = iter(iterable) for item in it: if pred(item) and buf: yield buf if maxsplit == 1: yield [item] + list(it) return buf = [] maxsplit -= 1 buf.append(item) if buf: yield buf def split_after(iterable, pred, maxsplit=-1): """Yield lists of items from *iterable*, where each list ends with an item where callable *pred* returns ``True``: >>> list(split_after('one1two2', lambda s: s.isdigit())) [['o', 'n', 'e', '1'], ['t', 'w', 'o', '2']] >>> list(split_after(range(10), lambda n: n % 3 == 0)) [[0], [1, 2, 3], [4, 5, 6], [7, 8, 9]] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_after(range(10), lambda n: n % 3 == 0, maxsplit=2)) [[0], [1, 2, 3], [4, 5, 6, 7, 8, 9]] """ if maxsplit == 0: yield list(iterable) return buf = [] it = iter(iterable) for item in it: buf.append(item) if pred(item) and buf: yield buf if maxsplit == 1: yield list(it) return buf = [] maxsplit -= 1 if buf: yield buf def split_when(iterable, pred, maxsplit=-1): """Split *iterable* into pieces based on the output of *pred*. *pred* should be a function that takes successive pairs of items and returns ``True`` if the iterable should be split in between them. For example, to find runs of increasing numbers, split the iterable when element ``i`` is larger than element ``i + 1``: >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], lambda x, y: x > y)) [[1, 2, 3, 3], [2, 5], [2, 4], [2]] At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, then there is no limit on the number of splits: >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], ... lambda x, y: x > y, maxsplit=2)) [[1, 2, 3, 3], [2, 5], [2, 4, 2]] """ if maxsplit == 0: yield list(iterable) return it = iter(iterable) try: cur_item = next(it) except StopIteration: return buf = [cur_item] for next_item in it: if pred(cur_item, next_item): yield buf if maxsplit == 1: yield [next_item] + list(it) return buf = [] maxsplit -= 1 buf.append(next_item) cur_item = next_item yield buf def split_into(iterable, sizes): """Yield a list of sequential items from *iterable* of length 'n' for each integer 'n' in *sizes*. >>> list(split_into([1,2,3,4,5,6], [1,2,3])) [[1], [2, 3], [4, 5, 6]] If the sum of *sizes* is smaller than the length of *iterable*, then the remaining items of *iterable* will not be returned. >>> list(split_into([1,2,3,4,5,6], [2,3])) [[1, 2], [3, 4, 5]] If the sum of *sizes* is larger than the length of *iterable*, fewer items will be returned in the iteration that overruns *iterable* and further lists will be empty: >>> list(split_into([1,2,3,4], [1,2,3,4])) [[1], [2, 3], [4], []] When a ``None`` object is encountered in *sizes*, the returned list will contain items up to the end of *iterable* the same way that itertools.slice does: >>> list(split_into([1,2,3,4,5,6,7,8,9,0], [2,3,None])) [[1, 2], [3, 4, 5], [6, 7, 8, 9, 0]] :func:`split_into` can be useful for grouping a series of items where the sizes of the groups are not uniform. An example would be where in a row from a table, multiple columns represent elements of the same feature (e.g. a point represented by x,y,z) but, the format is not the same for all columns. """ # convert the iterable argument into an iterator so its contents can # be consumed by islice in case it is a generator it = iter(iterable) for size in sizes: if size is None: yield list(it) return else: yield list(islice(it, size)) def padded(iterable, fillvalue=None, n=None, next_multiple=False): """Yield the elements from *iterable*, followed by *fillvalue*, such that at least *n* items are emitted. >>> list(padded([1, 2, 3], '?', 5)) [1, 2, 3, '?', '?'] If *next_multiple* is ``True``, *fillvalue* will be emitted until the number of items emitted is a multiple of *n*:: >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True)) [1, 2, 3, 4, None, None] If *n* is ``None``, *fillvalue* will be emitted indefinitely. """ it = iter(iterable) if n is None: yield from chain(it, repeat(fillvalue)) elif n < 1: raise ValueError('n must be at least 1') else: item_count = 0 for item in it: yield item item_count += 1 remaining = (n - item_count) % n if next_multiple else n - item_count for _ in range(remaining): yield fillvalue def repeat_each(iterable, n=2): """Repeat each element in *iterable* *n* times. >>> list(repeat_each('ABC', 3)) ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C'] """ return chain.from_iterable(map(repeat, iterable, repeat(n))) def repeat_last(iterable, default=None): """After the *iterable* is exhausted, keep yielding its last element. >>> list(islice(repeat_last(range(3)), 5)) [0, 1, 2, 2, 2] If the iterable is empty, yield *default* forever:: >>> list(islice(repeat_last(range(0), 42), 5)) [42, 42, 42, 42, 42] """ item = _marker for item in iterable: yield item final = default if item is _marker else item yield from repeat(final) def distribute(n, iterable): """Distribute the items from *iterable* among *n* smaller iterables. >>> group_1, group_2 = distribute(2, [1, 2, 3, 4, 5, 6]) >>> list(group_1) [1, 3, 5] >>> list(group_2) [2, 4, 6] If the length of *iterable* is not evenly divisible by *n*, then the length of the returned iterables will not be identical: >>> children = distribute(3, [1, 2, 3, 4, 5, 6, 7]) >>> [list(c) for c in children] [[1, 4, 7], [2, 5], [3, 6]] If the length of *iterable* is smaller than *n*, then the last returned iterables will be empty: >>> children = distribute(5, [1, 2, 3]) >>> [list(c) for c in children] [[1], [2], [3], [], []] This function uses :func:`itertools.tee` and may require significant storage. If you need the order items in the smaller iterables to match the original iterable, see :func:`divide`. """ if n < 1: raise ValueError('n must be at least 1') children = tee(iterable, n) return [islice(it, index, None, n) for index, it in enumerate(children)] def stagger(iterable, offsets=(-1, 0, 1), longest=False, fillvalue=None): """Yield tuples whose elements are offset from *iterable*. The amount by which the `i`-th item in each tuple is offset is given by the `i`-th item in *offsets*. >>> list(stagger([0, 1, 2, 3])) [(None, 0, 1), (0, 1, 2), (1, 2, 3)] >>> list(stagger(range(8), offsets=(0, 2, 4))) [(0, 2, 4), (1, 3, 5), (2, 4, 6), (3, 5, 7)] By default, the sequence will end when the final element of a tuple is the last item in the iterable. To continue until the first element of a tuple is the last item in the iterable, set *longest* to ``True``:: >>> list(stagger([0, 1, 2, 3], longest=True)) [(None, 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, None), (3, None, None)] By default, ``None`` will be used to replace offsets beyond the end of the sequence. Specify *fillvalue* to use some other value. """ children = tee(iterable, len(offsets)) return zip_offset( *children, offsets=offsets, longest=longest, fillvalue=fillvalue ) class UnequalIterablesError(ValueError): def __init__(self, details=None): msg = 'Iterables have different lengths' if details is not None: msg += (': index 0 has length {}; index {} has length {}').format( *details ) super().__init__(msg) def _zip_equal_generator(iterables): for combo in zip_longest(*iterables, fillvalue=_marker): for val in combo: if val is _marker: raise UnequalIterablesError() yield combo def _zip_equal(*iterables): # Check whether the iterables are all the same size. try: first_size = len(iterables[0]) for i, it in enumerate(iterables[1:], 1): size = len(it) if size != first_size: break else: # If we didn't break out, we can use the built-in zip. return zip(*iterables) # If we did break out, there was a mismatch. raise UnequalIterablesError(details=(first_size, i, size)) # If any one of the iterables didn't have a length, start reading # them until one runs out. except TypeError: return _zip_equal_generator(iterables) def zip_equal(*iterables): """``zip`` the input *iterables* together, but raise ``UnequalIterablesError`` if they aren't all the same length. >>> it_1 = range(3) >>> it_2 = iter('abc') >>> list(zip_equal(it_1, it_2)) [(0, 'a'), (1, 'b'), (2, 'c')] >>> it_1 = range(3) >>> it_2 = iter('abcd') >>> list(zip_equal(it_1, it_2)) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... more_itertools.more.UnequalIterablesError: Iterables have different lengths """ if hexversion >= 0x30A00A6: warnings.warn( ( 'zip_equal will be removed in a future version of ' 'more-itertools. Use the builtin zip function with ' 'strict=True instead.' ), DeprecationWarning, ) return _zip_equal(*iterables) def zip_offset(*iterables, offsets, longest=False, fillvalue=None): """``zip`` the input *iterables* together, but offset the `i`-th iterable by the `i`-th item in *offsets*. >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1))) [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e')] This can be used as a lightweight alternative to SciPy or pandas to analyze data sets in which some series have a lead or lag relationship. By default, the sequence will end when the shortest iterable is exhausted. To continue until the longest iterable is exhausted, set *longest* to ``True``. >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1), longest=True)) [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e'), (None, 'f')] By default, ``None`` will be used to replace offsets beyond the end of the sequence. Specify *fillvalue* to use some other value. """ if len(iterables) != len(offsets): raise ValueError("Number of iterables and offsets didn't match") staggered = [] for it, n in zip(iterables, offsets): if n < 0: staggered.append(chain(repeat(fillvalue, -n), it)) elif n > 0: staggered.append(islice(it, n, None)) else: staggered.append(it) if longest: return zip_longest(*staggered, fillvalue=fillvalue) return zip(*staggered) def sort_together(iterables, key_list=(0,), key=None, reverse=False): """Return the input iterables sorted together, with *key_list* as the priority for sorting. All iterables are trimmed to the length of the shortest one. This can be used like the sorting function in a spreadsheet. If each iterable represents a column of data, the key list determines which columns are used for sorting. By default, all iterables are sorted using the ``0``-th iterable:: >>> iterables = [(4, 3, 2, 1), ('a', 'b', 'c', 'd')] >>> sort_together(iterables) [(1, 2, 3, 4), ('d', 'c', 'b', 'a')] Set a different key list to sort according to another iterable. Specifying multiple keys dictates how ties are broken:: >>> iterables = [(3, 1, 2), (0, 1, 0), ('c', 'b', 'a')] >>> sort_together(iterables, key_list=(1, 2)) [(2, 3, 1), (0, 0, 1), ('a', 'c', 'b')] To sort by a function of the elements of the iterable, pass a *key* function. Its arguments are the elements of the iterables corresponding to the key list:: >>> names = ('a', 'b', 'c') >>> lengths = (1, 2, 3) >>> widths = (5, 2, 1) >>> def area(length, width): ... return length * width >>> sort_together([names, lengths, widths], key_list=(1, 2), key=area) [('c', 'b', 'a'), (3, 2, 1), (1, 2, 5)] Set *reverse* to ``True`` to sort in descending order. >>> sort_together([(1, 2, 3), ('c', 'b', 'a')], reverse=True) [(3, 2, 1), ('a', 'b', 'c')] """ if key is None: # if there is no key function, the key argument to sorted is an # itemgetter key_argument = itemgetter(*key_list) else: # if there is a key function, call it with the items at the offsets # specified by the key function as arguments key_list = list(key_list) if len(key_list) == 1: # if key_list contains a single item, pass the item at that offset # as the only argument to the key function key_offset = key_list[0] key_argument = lambda zipped_items: key(zipped_items[key_offset]) else: # if key_list contains multiple items, use itemgetter to return a # tuple of items, which we pass as *args to the key function get_key_items = itemgetter(*key_list) key_argument = lambda zipped_items: key( *get_key_items(zipped_items) ) return list( zip(*sorted(zip(*iterables), key=key_argument, reverse=reverse)) ) def unzip(iterable): """The inverse of :func:`zip`, this function disaggregates the elements of the zipped *iterable*. The ``i``-th iterable contains the ``i``-th element from each element of the zipped iterable. The first element is used to to determine the length of the remaining elements. >>> iterable = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] >>> letters, numbers = unzip(iterable) >>> list(letters) ['a', 'b', 'c', 'd'] >>> list(numbers) [1, 2, 3, 4] This is similar to using ``zip(*iterable)``, but it avoids reading *iterable* into memory. Note, however, that this function uses :func:`itertools.tee` and thus may require significant storage. """ head, iterable = spy(iter(iterable)) if not head: # empty iterable, e.g. zip([], [], []) return () # spy returns a one-length iterable as head head = head[0] iterables = tee(iterable, len(head)) def itemgetter(i): def getter(obj): try: return obj[i] except IndexError: # basically if we have an iterable like # iter([(1, 2, 3), (4, 5), (6,)]) # the second unzipped iterable would fail at the third tuple # since it would try to access tup[1] # same with the third unzipped iterable and the second tuple # to support these "improperly zipped" iterables, # we create a custom itemgetter # which just stops the unzipped iterables # at first length mismatch raise StopIteration return getter return tuple(map(itemgetter(i), it) for i, it in enumerate(iterables)) def divide(n, iterable): """Divide the elements from *iterable* into *n* parts, maintaining order. >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6]) >>> list(group_1) [1, 2, 3] >>> list(group_2) [4, 5, 6] If the length of *iterable* is not evenly divisible by *n*, then the length of the returned iterables will not be identical: >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7]) >>> [list(c) for c in children] [[1, 2, 3], [4, 5], [6, 7]] If the length of the iterable is smaller than n, then the last returned iterables will be empty: >>> children = divide(5, [1, 2, 3]) >>> [list(c) for c in children] [[1], [2], [3], [], []] This function will exhaust the iterable before returning and may require significant storage. If order is not important, see :func:`distribute`, which does not first pull the iterable into memory. """ if n < 1: raise ValueError('n must be at least 1') try: iterable[:0] except TypeError: seq = tuple(iterable) else: seq = iterable q, r = divmod(len(seq), n) ret = [] stop = 0 for i in range(1, n + 1): start = stop stop += q + 1 if i <= r else q ret.append(iter(seq[start:stop])) return ret def always_iterable(obj, base_type=(str, bytes)): """If *obj* is iterable, return an iterator over its items:: >>> obj = (1, 2, 3) >>> list(always_iterable(obj)) [1, 2, 3] If *obj* is not iterable, return a one-item iterable containing *obj*:: >>> obj = 1 >>> list(always_iterable(obj)) [1] If *obj* is ``None``, return an empty iterable: >>> obj = None >>> list(always_iterable(None)) [] By default, binary and text strings are not considered iterable:: >>> obj = 'foo' >>> list(always_iterable(obj)) ['foo'] If *base_type* is set, objects for which ``isinstance(obj, base_type)`` returns ``True`` won't be considered iterable. >>> obj = {'a': 1} >>> list(always_iterable(obj)) # Iterate over the dict's keys ['a'] >>> list(always_iterable(obj, base_type=dict)) # Treat dicts as a unit [{'a': 1}] Set *base_type* to ``None`` to avoid any special handling and treat objects Python considers iterable as iterable: >>> obj = 'foo' >>> list(always_iterable(obj, base_type=None)) ['f', 'o', 'o'] """ if obj is None: return iter(()) if (base_type is not None) and isinstance(obj, base_type): return iter((obj,)) try: return iter(obj) except TypeError: return iter((obj,)) def adjacent(predicate, iterable, distance=1): """Return an iterable over `(bool, item)` tuples where the `item` is drawn from *iterable* and the `bool` indicates whether that item satisfies the *predicate* or is adjacent to an item that does. For example, to find whether items are adjacent to a ``3``:: >>> list(adjacent(lambda x: x == 3, range(6))) [(False, 0), (False, 1), (True, 2), (True, 3), (True, 4), (False, 5)] Set *distance* to change what counts as adjacent. For example, to find whether items are two places away from a ``3``: >>> list(adjacent(lambda x: x == 3, range(6), distance=2)) [(False, 0), (True, 1), (True, 2), (True, 3), (True, 4), (True, 5)] This is useful for contextualizing the results of a search function. For example, a code comparison tool might want to identify lines that have changed, but also surrounding lines to give the viewer of the diff context. The predicate function will only be called once for each item in the iterable. See also :func:`groupby_transform`, which can be used with this function to group ranges of items with the same `bool` value. """ # Allow distance=0 mainly for testing that it reproduces results with map() if distance < 0: raise ValueError('distance must be at least 0') i1, i2 = tee(iterable) padding = [False] * distance selected = chain(padding, map(predicate, i1), padding) adjacent_to_selected = map(any, windowed(selected, 2 * distance + 1)) return zip(adjacent_to_selected, i2) def groupby_transform(iterable, keyfunc=None, valuefunc=None, reducefunc=None): """An extension of :func:`itertools.groupby` that can apply transformations to the grouped data. * *keyfunc* is a function computing a key value for each item in *iterable* * *valuefunc* is a function that transforms the individual items from *iterable* after grouping * *reducefunc* is a function that transforms each group of items >>> iterable = 'aAAbBBcCC' >>> keyfunc = lambda k: k.upper() >>> valuefunc = lambda v: v.lower() >>> reducefunc = lambda g: ''.join(g) >>> list(groupby_transform(iterable, keyfunc, valuefunc, reducefunc)) [('A', 'aaa'), ('B', 'bbb'), ('C', 'ccc')] Each optional argument defaults to an identity function if not specified. :func:`groupby_transform` is useful when grouping elements of an iterable using a separate iterable as the key. To do this, :func:`zip` the iterables and pass a *keyfunc* that extracts the first element and a *valuefunc* that extracts the second element:: >>> from operator import itemgetter >>> keys = [0, 0, 1, 1, 1, 2, 2, 2, 3] >>> values = 'abcdefghi' >>> iterable = zip(keys, values) >>> grouper = groupby_transform(iterable, itemgetter(0), itemgetter(1)) >>> [(k, ''.join(g)) for k, g in grouper] [(0, 'ab'), (1, 'cde'), (2, 'fgh'), (3, 'i')] Note that the order of items in the iterable is significant. Only adjacent items are grouped together, so if you don't want any duplicate groups, you should sort the iterable by the key function. """ ret = groupby(iterable, keyfunc) if valuefunc: ret = ((k, map(valuefunc, g)) for k, g in ret) if reducefunc: ret = ((k, reducefunc(g)) for k, g in ret) return ret class numeric_range(abc.Sequence, abc.Hashable): """An extension of the built-in ``range()`` function whose arguments can be any orderable numeric type. With only *stop* specified, *start* defaults to ``0`` and *step* defaults to ``1``. The output items will match the type of *stop*: >>> list(numeric_range(3.5)) [0.0, 1.0, 2.0, 3.0] With only *start* and *stop* specified, *step* defaults to ``1``. The output items will match the type of *start*: >>> from decimal import Decimal >>> start = Decimal('2.1') >>> stop = Decimal('5.1') >>> list(numeric_range(start, stop)) [Decimal('2.1'), Decimal('3.1'), Decimal('4.1')] With *start*, *stop*, and *step* specified the output items will match the type of ``start + step``: >>> from fractions import Fraction >>> start = Fraction(1, 2) # Start at 1/2 >>> stop = Fraction(5, 2) # End at 5/2 >>> step = Fraction(1, 2) # Count by 1/2 >>> list(numeric_range(start, stop, step)) [Fraction(1, 2), Fraction(1, 1), Fraction(3, 2), Fraction(2, 1)] If *step* is zero, ``ValueError`` is raised. Negative steps are supported: >>> list(numeric_range(3, -1, -1.0)) [3.0, 2.0, 1.0, 0.0] Be aware of the limitations of floating point numbers; the representation of the yielded numbers may be surprising. ``datetime.datetime`` objects can be used for *start* and *stop*, if *step* is a ``datetime.timedelta`` object: >>> import datetime >>> start = datetime.datetime(2019, 1, 1) >>> stop = datetime.datetime(2019, 1, 3) >>> step = datetime.timedelta(days=1) >>> items = iter(numeric_range(start, stop, step)) >>> next(items) datetime.datetime(2019, 1, 1, 0, 0) >>> next(items) datetime.datetime(2019, 1, 2, 0, 0) """ _EMPTY_HASH = hash(range(0, 0)) def __init__(self, *args): argc = len(args) if argc == 1: (self._stop,) = args self._start = type(self._stop)(0) self._step = type(self._stop - self._start)(1) elif argc == 2: self._start, self._stop = args self._step = type(self._stop - self._start)(1) elif argc == 3: self._start, self._stop, self._step = args elif argc == 0: raise TypeError( 'numeric_range expected at least ' '1 argument, got {}'.format(argc) ) else: raise TypeError( 'numeric_range expected at most ' '3 arguments, got {}'.format(argc) ) self._zero = type(self._step)(0) if self._step == self._zero: raise ValueError('numeric_range() arg 3 must not be zero') self._growing = self._step > self._zero self._init_len() def __bool__(self): if self._growing: return self._start < self._stop else: return self._start > self._stop def __contains__(self, elem): if self._growing: if self._start <= elem < self._stop: return (elem - self._start) % self._step == self._zero else: if self._start >= elem > self._stop: return (self._start - elem) % (-self._step) == self._zero return False def __eq__(self, other): if isinstance(other, numeric_range): empty_self = not bool(self) empty_other = not bool(other) if empty_self or empty_other: return empty_self and empty_other # True if both empty else: return ( self._start == other._start and self._step == other._step and self._get_by_index(-1) == other._get_by_index(-1) ) else: return False def __getitem__(self, key): if isinstance(key, int): return self._get_by_index(key) elif isinstance(key, slice): step = self._step if key.step is None else key.step * self._step if key.start is None or key.start <= -self._len: start = self._start elif key.start >= self._len: start = self._stop else: # -self._len < key.start < self._len start = self._get_by_index(key.start) if key.stop is None or key.stop >= self._len: stop = self._stop elif key.stop <= -self._len: stop = self._start else: # -self._len < key.stop < self._len stop = self._get_by_index(key.stop) return numeric_range(start, stop, step) else: raise TypeError( 'numeric range indices must be ' 'integers or slices, not {}'.format(type(key).__name__) ) def __hash__(self): if self: return hash((self._start, self._get_by_index(-1), self._step)) else: return self._EMPTY_HASH def __iter__(self): values = (self._start + (n * self._step) for n in count()) if self._growing: return takewhile(partial(gt, self._stop), values) else: return takewhile(partial(lt, self._stop), values) def __len__(self): return self._len def _init_len(self): if self._growing: start = self._start stop = self._stop step = self._step else: start = self._stop stop = self._start step = -self._step distance = stop - start if distance <= self._zero: self._len = 0 else: # distance > 0 and step > 0: regular euclidean division q, r = divmod(distance, step) self._len = int(q) + int(r != self._zero) def __reduce__(self): return numeric_range, (self._start, self._stop, self._step) def __repr__(self): if self._step == 1: return "numeric_range({}, {})".format( repr(self._start), repr(self._stop) ) else: return "numeric_range({}, {}, {})".format( repr(self._start), repr(self._stop), repr(self._step) ) def __reversed__(self): return iter( numeric_range( self._get_by_index(-1), self._start - self._step, -self._step ) ) def count(self, value): return int(value in self) def index(self, value): if self._growing: if self._start <= value < self._stop: q, r = divmod(value - self._start, self._step) if r == self._zero: return int(q) else: if self._start >= value > self._stop: q, r = divmod(self._start - value, -self._step) if r == self._zero: return int(q) raise ValueError("{} is not in numeric range".format(value)) def _get_by_index(self, i): if i < 0: i += self._len if i < 0 or i >= self._len: raise IndexError("numeric range object index out of range") return self._start + i * self._step def count_cycle(iterable, n=None): """Cycle through the items from *iterable* up to *n* times, yielding the number of completed cycles along with each item. If *n* is omitted the process repeats indefinitely. >>> list(count_cycle('AB', 3)) [(0, 'A'), (0, 'B'), (1, 'A'), (1, 'B'), (2, 'A'), (2, 'B')] """ iterable = tuple(iterable) if not iterable: return iter(()) counter = count() if n is None else range(n) return ((i, item) for i in counter for item in iterable) def mark_ends(iterable): """Yield 3-tuples of the form ``(is_first, is_last, item)``. >>> list(mark_ends('ABC')) [(True, False, 'A'), (False, False, 'B'), (False, True, 'C')] Use this when looping over an iterable to take special action on its first and/or last items: >>> iterable = ['Header', 100, 200, 'Footer'] >>> total = 0 >>> for is_first, is_last, item in mark_ends(iterable): ... if is_first: ... continue # Skip the header ... if is_last: ... continue # Skip the footer ... total += item >>> print(total) 300 """ it = iter(iterable) try: b = next(it) except StopIteration: return try: for i in count(): a = b b = next(it) yield i == 0, False, a except StopIteration: yield i == 0, True, a def locate(iterable, pred=bool, window_size=None): """Yield the index of each item in *iterable* for which *pred* returns ``True``. *pred* defaults to :func:`bool`, which will select truthy items: >>> list(locate([0, 1, 1, 0, 1, 0, 0])) [1, 2, 4] Set *pred* to a custom function to, e.g., find the indexes for a particular item. >>> list(locate(['a', 'b', 'c', 'b'], lambda x: x == 'b')) [1, 3] If *window_size* is given, then the *pred* function will be called with that many items. This enables searching for sub-sequences: >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3] >>> pred = lambda *args: args == (1, 2, 3) >>> list(locate(iterable, pred=pred, window_size=3)) [1, 5, 9] Use with :func:`seekable` to find indexes and then retrieve the associated items: >>> from itertools import count >>> from more_itertools import seekable >>> source = (3 * n + 1 if (n % 2) else n // 2 for n in count()) >>> it = seekable(source) >>> pred = lambda x: x > 100 >>> indexes = locate(it, pred=pred) >>> i = next(indexes) >>> it.seek(i) >>> next(it) 106 """ if window_size is None: return compress(count(), map(pred, iterable)) if window_size < 1: raise ValueError('window size must be at least 1') it = windowed(iterable, window_size, fillvalue=_marker) return compress(count(), starmap(pred, it)) def lstrip(iterable, pred): """Yield the items from *iterable*, but strip any from the beginning for which *pred* returns ``True``. For example, to remove a set of items from the start of an iterable: >>> iterable = (None, False, None, 1, 2, None, 3, False, None) >>> pred = lambda x: x in {None, False, ''} >>> list(lstrip(iterable, pred)) [1, 2, None, 3, False, None] This function is analogous to to :func:`str.lstrip`, and is essentially an wrapper for :func:`itertools.dropwhile`. """ return dropwhile(pred, iterable) def rstrip(iterable, pred): """Yield the items from *iterable*, but strip any from the end for which *pred* returns ``True``. For example, to remove a set of items from the end of an iterable: >>> iterable = (None, False, None, 1, 2, None, 3, False, None) >>> pred = lambda x: x in {None, False, ''} >>> list(rstrip(iterable, pred)) [None, False, None, 1, 2, None, 3] This function is analogous to :func:`str.rstrip`. """ cache = [] cache_append = cache.append cache_clear = cache.clear for x in iterable: if pred(x): cache_append(x) else: yield from cache cache_clear() yield x def strip(iterable, pred): """Yield the items from *iterable*, but strip any from the beginning and end for which *pred* returns ``True``. For example, to remove a set of items from both ends of an iterable: >>> iterable = (None, False, None, 1, 2, None, 3, False, None) >>> pred = lambda x: x in {None, False, ''} >>> list(strip(iterable, pred)) [1, 2, None, 3] This function is analogous to :func:`str.strip`. """ return rstrip(lstrip(iterable, pred), pred) class islice_extended: """An extension of :func:`itertools.islice` that supports negative values for *stop*, *start*, and *step*. >>> iterable = iter('abcdefgh') >>> list(islice_extended(iterable, -4, -1)) ['e', 'f', 'g'] Slices with negative values require some caching of *iterable*, but this function takes care to minimize the amount of memory required. For example, you can use a negative step with an infinite iterator: >>> from itertools import count >>> list(islice_extended(count(), 110, 99, -2)) [110, 108, 106, 104, 102, 100] You can also use slice notation directly: >>> iterable = map(str, count()) >>> it = islice_extended(iterable)[10:20:2] >>> list(it) ['10', '12', '14', '16', '18'] """ def __init__(self, iterable, *args): it = iter(iterable) if args: self._iterable = _islice_helper(it, slice(*args)) else: self._iterable = it def __iter__(self): return self def __next__(self): return next(self._iterable) def __getitem__(self, key): if isinstance(key, slice): return islice_extended(_islice_helper(self._iterable, key)) raise TypeError('islice_extended.__getitem__ argument must be a slice') def _islice_helper(it, s): start = s.start stop = s.stop if s.step == 0: raise ValueError('step argument must be a non-zero integer or None.') step = s.step or 1 if step > 0: start = 0 if (start is None) else start if start < 0: # Consume all but the last -start items cache = deque(enumerate(it, 1), maxlen=-start) len_iter = cache[-1][0] if cache else 0 # Adjust start to be positive i = max(len_iter + start, 0) # Adjust stop to be positive if stop is None: j = len_iter elif stop >= 0: j = min(stop, len_iter) else: j = max(len_iter + stop, 0) # Slice the cache n = j - i if n <= 0: return for index, item in islice(cache, 0, n, step): yield item elif (stop is not None) and (stop < 0): # Advance to the start position next(islice(it, start, start), None) # When stop is negative, we have to carry -stop items while # iterating cache = deque(islice(it, -stop), maxlen=-stop) for index, item in enumerate(it): cached_item = cache.popleft() if index % step == 0: yield cached_item cache.append(item) else: # When both start and stop are positive we have the normal case yield from islice(it, start, stop, step) else: start = -1 if (start is None) else start if (stop is not None) and (stop < 0): # Consume all but the last items n = -stop - 1 cache = deque(enumerate(it, 1), maxlen=n) len_iter = cache[-1][0] if cache else 0 # If start and stop are both negative they are comparable and # we can just slice. Otherwise we can adjust start to be negative # and then slice. if start < 0: i, j = start, stop else: i, j = min(start - len_iter, -1), None for index, item in list(cache)[i:j:step]: yield item else: # Advance to the stop position if stop is not None: m = stop + 1 next(islice(it, m, m), None) # stop is positive, so if start is negative they are not comparable # and we need the rest of the items. if start < 0: i = start n = None # stop is None and start is positive, so we just need items up to # the start index. elif stop is None: i = None n = start + 1 # Both stop and start are positive, so they are comparable. else: i = None n = start - stop if n <= 0: return cache = list(islice(it, n)) yield from cache[i::step] def always_reversible(iterable): """An extension of :func:`reversed` that supports all iterables, not just those which implement the ``Reversible`` or ``Sequence`` protocols. >>> print(*always_reversible(x for x in range(3))) 2 1 0 If the iterable is already reversible, this function returns the result of :func:`reversed()`. If the iterable is not reversible, this function will cache the remaining items in the iterable and yield them in reverse order, which may require significant storage. """ try: return reversed(iterable) except TypeError: return reversed(list(iterable)) def consecutive_groups(iterable, ordering=lambda x: x): """Yield groups of consecutive items using :func:`itertools.groupby`. The *ordering* function determines whether two items are adjacent by returning their position. By default, the ordering function is the identity function. This is suitable for finding runs of numbers: >>> iterable = [1, 10, 11, 12, 20, 30, 31, 32, 33, 40] >>> for group in consecutive_groups(iterable): ... print(list(group)) [1] [10, 11, 12] [20] [30, 31, 32, 33] [40] For finding runs of adjacent letters, try using the :meth:`index` method of a string of letters: >>> from string import ascii_lowercase >>> iterable = 'abcdfgilmnop' >>> ordering = ascii_lowercase.index >>> for group in consecutive_groups(iterable, ordering): ... print(list(group)) ['a', 'b', 'c', 'd'] ['f', 'g'] ['i'] ['l', 'm', 'n', 'o', 'p'] Each group of consecutive items is an iterator that shares it source with *iterable*. When an an output group is advanced, the previous group is no longer available unless its elements are copied (e.g., into a ``list``). >>> iterable = [1, 2, 11, 12, 21, 22] >>> saved_groups = [] >>> for group in consecutive_groups(iterable): ... saved_groups.append(list(group)) # Copy group elements >>> saved_groups [[1, 2], [11, 12], [21, 22]] """ for k, g in groupby( enumerate(iterable), key=lambda x: x[0] - ordering(x[1]) ): yield map(itemgetter(1), g) def difference(iterable, func=sub, *, initial=None): """This function is the inverse of :func:`itertools.accumulate`. By default it will compute the first difference of *iterable* using :func:`operator.sub`: >>> from itertools import accumulate >>> iterable = accumulate([0, 1, 2, 3, 4]) # produces 0, 1, 3, 6, 10 >>> list(difference(iterable)) [0, 1, 2, 3, 4] *func* defaults to :func:`operator.sub`, but other functions can be specified. They will be applied as follows:: A, B, C, D, ... --> A, func(B, A), func(C, B), func(D, C), ... For example, to do progressive division: >>> iterable = [1, 2, 6, 24, 120] >>> func = lambda x, y: x // y >>> list(difference(iterable, func)) [1, 2, 3, 4, 5] If the *initial* keyword is set, the first element will be skipped when computing successive differences. >>> it = [10, 11, 13, 16] # from accumulate([1, 2, 3], initial=10) >>> list(difference(it, initial=10)) [1, 2, 3] """ a, b = tee(iterable) try: first = [next(b)] except StopIteration: return iter([]) if initial is not None: first = [] return chain(first, starmap(func, zip(b, a))) class SequenceView(Sequence): """Return a read-only view of the sequence object *target*. :class:`SequenceView` objects are analogous to Python's built-in "dictionary view" types. They provide a dynamic view of a sequence's items, meaning that when the sequence updates, so does the view. >>> seq = ['0', '1', '2'] >>> view = SequenceView(seq) >>> view SequenceView(['0', '1', '2']) >>> seq.append('3') >>> view SequenceView(['0', '1', '2', '3']) Sequence views support indexing, slicing, and length queries. They act like the underlying sequence, except they don't allow assignment: >>> view[1] '1' >>> view[1:-1] ['1', '2'] >>> len(view) 4 Sequence views are useful as an alternative to copying, as they don't require (much) extra storage. """ def __init__(self, target): if not isinstance(target, Sequence): raise TypeError self._target = target def __getitem__(self, index): return self._target[index] def __len__(self): return len(self._target) def __repr__(self): return '{}({})'.format(self.__class__.__name__, repr(self._target)) class seekable: """Wrap an iterator to allow for seeking backward and forward. This progressively caches the items in the source iterable so they can be re-visited. Call :meth:`seek` with an index to seek to that position in the source iterable. To "reset" an iterator, seek to ``0``: >>> from itertools import count >>> it = seekable((str(n) for n in count())) >>> next(it), next(it), next(it) ('0', '1', '2') >>> it.seek(0) >>> next(it), next(it), next(it) ('0', '1', '2') >>> next(it) '3' You can also seek forward: >>> it = seekable((str(n) for n in range(20))) >>> it.seek(10) >>> next(it) '10' >>> it.seek(20) # Seeking past the end of the source isn't a problem >>> list(it) [] >>> it.seek(0) # Resetting works even after hitting the end >>> next(it), next(it), next(it) ('0', '1', '2') Call :meth:`peek` to look ahead one item without advancing the iterator: >>> it = seekable('1234') >>> it.peek() '1' >>> list(it) ['1', '2', '3', '4'] >>> it.peek(default='empty') 'empty' Before the iterator is at its end, calling :func:`bool` on it will return ``True``. After it will return ``False``: >>> it = seekable('5678') >>> bool(it) True >>> list(it) ['5', '6', '7', '8'] >>> bool(it) False You may view the contents of the cache with the :meth:`elements` method. That returns a :class:`SequenceView`, a view that updates automatically: >>> it = seekable((str(n) for n in range(10))) >>> next(it), next(it), next(it) ('0', '1', '2') >>> elements = it.elements() >>> elements SequenceView(['0', '1', '2']) >>> next(it) '3' >>> elements SequenceView(['0', '1', '2', '3']) By default, the cache grows as the source iterable progresses, so beware of wrapping very large or infinite iterables. Supply *maxlen* to limit the size of the cache (this of course limits how far back you can seek). >>> from itertools import count >>> it = seekable((str(n) for n in count()), maxlen=2) >>> next(it), next(it), next(it), next(it) ('0', '1', '2', '3') >>> list(it.elements()) ['2', '3'] >>> it.seek(0) >>> next(it), next(it), next(it), next(it) ('2', '3', '4', '5') >>> next(it) '6' """ def __init__(self, iterable, maxlen=None): self._source = iter(iterable) if maxlen is None: self._cache = [] else: self._cache = deque([], maxlen) self._index = None def __iter__(self): return self def __next__(self): if self._index is not None: try: item = self._cache[self._index] except IndexError: self._index = None else: self._index += 1 return item item = next(self._source) self._cache.append(item) return item def __bool__(self): try: self.peek() except StopIteration: return False return True def peek(self, default=_marker): try: peeked = next(self) except StopIteration: if default is _marker: raise return default if self._index is None: self._index = len(self._cache) self._index -= 1 return peeked def elements(self): return SequenceView(self._cache) def seek(self, index): self._index = index remainder = index - len(self._cache) if remainder > 0: consume(self, remainder) class run_length: """ :func:`run_length.encode` compresses an iterable with run-length encoding. It yields groups of repeated items with the count of how many times they were repeated: >>> uncompressed = 'abbcccdddd' >>> list(run_length.encode(uncompressed)) [('a', 1), ('b', 2), ('c', 3), ('d', 4)] :func:`run_length.decode` decompresses an iterable that was previously compressed with run-length encoding. It yields the items of the decompressed iterable: >>> compressed = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] >>> list(run_length.decode(compressed)) ['a', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd'] """ @staticmethod def encode(iterable): return ((k, ilen(g)) for k, g in groupby(iterable)) @staticmethod def decode(iterable): return chain.from_iterable(repeat(k, n) for k, n in iterable) def exactly_n(iterable, n, predicate=bool): """Return ``True`` if exactly ``n`` items in the iterable are ``True`` according to the *predicate* function. >>> exactly_n([True, True, False], 2) True >>> exactly_n([True, True, False], 1) False >>> exactly_n([0, 1, 2, 3, 4, 5], 3, lambda x: x < 3) True The iterable will be advanced until ``n + 1`` truthy items are encountered, so avoid calling it on infinite iterables. """ return len(take(n + 1, filter(predicate, iterable))) == n def circular_shifts(iterable): """Return a list of circular shifts of *iterable*. >>> circular_shifts(range(4)) [(0, 1, 2, 3), (1, 2, 3, 0), (2, 3, 0, 1), (3, 0, 1, 2)] """ lst = list(iterable) return take(len(lst), windowed(cycle(lst), len(lst))) def make_decorator(wrapping_func, result_index=0): """Return a decorator version of *wrapping_func*, which is a function that modifies an iterable. *result_index* is the position in that function's signature where the iterable goes. This lets you use itertools on the "production end," i.e. at function definition. This can augment what the function returns without changing the function's code. For example, to produce a decorator version of :func:`chunked`: >>> from more_itertools import chunked >>> chunker = make_decorator(chunked, result_index=0) >>> @chunker(3) ... def iter_range(n): ... return iter(range(n)) ... >>> list(iter_range(9)) [[0, 1, 2], [3, 4, 5], [6, 7, 8]] To only allow truthy items to be returned: >>> truth_serum = make_decorator(filter, result_index=1) >>> @truth_serum(bool) ... def boolean_test(): ... return [0, 1, '', ' ', False, True] ... >>> list(boolean_test()) [1, ' ', True] The :func:`peekable` and :func:`seekable` wrappers make for practical decorators: >>> from more_itertools import peekable >>> peekable_function = make_decorator(peekable) >>> @peekable_function() ... def str_range(*args): ... return (str(x) for x in range(*args)) ... >>> it = str_range(1, 20, 2) >>> next(it), next(it), next(it) ('1', '3', '5') >>> it.peek() '7' >>> next(it) '7' """ # See https://sites.google.com/site/bbayles/index/decorator_factory for # notes on how this works. def decorator(*wrapping_args, **wrapping_kwargs): def outer_wrapper(f): def inner_wrapper(*args, **kwargs): result = f(*args, **kwargs) wrapping_args_ = list(wrapping_args) wrapping_args_.insert(result_index, result) return wrapping_func(*wrapping_args_, **wrapping_kwargs) return inner_wrapper return outer_wrapper return decorator def map_reduce(iterable, keyfunc, valuefunc=None, reducefunc=None): """Return a dictionary that maps the items in *iterable* to categories defined by *keyfunc*, transforms them with *valuefunc*, and then summarizes them by category with *reducefunc*. *valuefunc* defaults to the identity function if it is unspecified. If *reducefunc* is unspecified, no summarization takes place: >>> keyfunc = lambda x: x.upper() >>> result = map_reduce('abbccc', keyfunc) >>> sorted(result.items()) [('A', ['a']), ('B', ['b', 'b']), ('C', ['c', 'c', 'c'])] Specifying *valuefunc* transforms the categorized items: >>> keyfunc = lambda x: x.upper() >>> valuefunc = lambda x: 1 >>> result = map_reduce('abbccc', keyfunc, valuefunc) >>> sorted(result.items()) [('A', [1]), ('B', [1, 1]), ('C', [1, 1, 1])] Specifying *reducefunc* summarizes the categorized items: >>> keyfunc = lambda x: x.upper() >>> valuefunc = lambda x: 1 >>> reducefunc = sum >>> result = map_reduce('abbccc', keyfunc, valuefunc, reducefunc) >>> sorted(result.items()) [('A', 1), ('B', 2), ('C', 3)] You may want to filter the input iterable before applying the map/reduce procedure: >>> all_items = range(30) >>> items = [x for x in all_items if 10 <= x <= 20] # Filter >>> keyfunc = lambda x: x % 2 # Evens map to 0; odds to 1 >>> categories = map_reduce(items, keyfunc=keyfunc) >>> sorted(categories.items()) [(0, [10, 12, 14, 16, 18, 20]), (1, [11, 13, 15, 17, 19])] >>> summaries = map_reduce(items, keyfunc=keyfunc, reducefunc=sum) >>> sorted(summaries.items()) [(0, 90), (1, 75)] Note that all items in the iterable are gathered into a list before the summarization step, which may require significant storage. The returned object is a :obj:`collections.defaultdict` with the ``default_factory`` set to ``None``, such that it behaves like a normal dictionary. """ valuefunc = (lambda x: x) if (valuefunc is None) else valuefunc ret = defaultdict(list) for item in iterable: key = keyfunc(item) value = valuefunc(item) ret[key].append(value) if reducefunc is not None: for key, value_list in ret.items(): ret[key] = reducefunc(value_list) ret.default_factory = None return ret def rlocate(iterable, pred=bool, window_size=None): """Yield the index of each item in *iterable* for which *pred* returns ``True``, starting from the right and moving left. *pred* defaults to :func:`bool`, which will select truthy items: >>> list(rlocate([0, 1, 1, 0, 1, 0, 0])) # Truthy at 1, 2, and 4 [4, 2, 1] Set *pred* to a custom function to, e.g., find the indexes for a particular item: >>> iterable = iter('abcb') >>> pred = lambda x: x == 'b' >>> list(rlocate(iterable, pred)) [3, 1] If *window_size* is given, then the *pred* function will be called with that many items. This enables searching for sub-sequences: >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3] >>> pred = lambda *args: args == (1, 2, 3) >>> list(rlocate(iterable, pred=pred, window_size=3)) [9, 5, 1] Beware, this function won't return anything for infinite iterables. If *iterable* is reversible, ``rlocate`` will reverse it and search from the right. Otherwise, it will search from the left and return the results in reverse order. See :func:`locate` to for other example applications. """ if window_size is None: try: len_iter = len(iterable) return (len_iter - i - 1 for i in locate(reversed(iterable), pred)) except TypeError: pass return reversed(list(locate(iterable, pred, window_size))) def replace(iterable, pred, substitutes, count=None, window_size=1): """Yield the items from *iterable*, replacing the items for which *pred* returns ``True`` with the items from the iterable *substitutes*. >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1] >>> pred = lambda x: x == 0 >>> substitutes = (2, 3) >>> list(replace(iterable, pred, substitutes)) [1, 1, 2, 3, 1, 1, 2, 3, 1, 1] If *count* is given, the number of replacements will be limited: >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1, 0] >>> pred = lambda x: x == 0 >>> substitutes = [None] >>> list(replace(iterable, pred, substitutes, count=2)) [1, 1, None, 1, 1, None, 1, 1, 0] Use *window_size* to control the number of items passed as arguments to *pred*. This allows for locating and replacing subsequences. >>> iterable = [0, 1, 2, 5, 0, 1, 2, 5] >>> window_size = 3 >>> pred = lambda *args: args == (0, 1, 2) # 3 items passed to pred >>> substitutes = [3, 4] # Splice in these items >>> list(replace(iterable, pred, substitutes, window_size=window_size)) [3, 4, 5, 3, 4, 5] """ if window_size < 1: raise ValueError('window_size must be at least 1') # Save the substitutes iterable, since it's used more than once substitutes = tuple(substitutes) # Add padding such that the number of windows matches the length of the # iterable it = chain(iterable, [_marker] * (window_size - 1)) windows = windowed(it, window_size) n = 0 for w in windows: # If the current window matches our predicate (and we haven't hit # our maximum number of replacements), splice in the substitutes # and then consume the following windows that overlap with this one. # For example, if the iterable is (0, 1, 2, 3, 4...) # and the window size is 2, we have (0, 1), (1, 2), (2, 3)... # If the predicate matches on (0, 1), we need to zap (0, 1) and (1, 2) if pred(*w): if (count is None) or (n < count): n += 1 yield from substitutes consume(windows, window_size - 1) continue # If there was no match (or we've reached the replacement limit), # yield the first item from the window. if w and (w[0] is not _marker): yield w[0] def partitions(iterable): """Yield all possible order-preserving partitions of *iterable*. >>> iterable = 'abc' >>> for part in partitions(iterable): ... print([''.join(p) for p in part]) ['abc'] ['a', 'bc'] ['ab', 'c'] ['a', 'b', 'c'] This is unrelated to :func:`partition`. """ sequence = list(iterable) n = len(sequence) for i in powerset(range(1, n)): yield [sequence[i:j] for i, j in zip((0,) + i, i + (n,))] def set_partitions(iterable, k=None): """ Yield the set partitions of *iterable* into *k* parts. Set partitions are not order-preserving. >>> iterable = 'abc' >>> for part in set_partitions(iterable, 2): ... print([''.join(p) for p in part]) ['a', 'bc'] ['ab', 'c'] ['b', 'ac'] If *k* is not given, every set partition is generated. >>> iterable = 'abc' >>> for part in set_partitions(iterable): ... print([''.join(p) for p in part]) ['abc'] ['a', 'bc'] ['ab', 'c'] ['b', 'ac'] ['a', 'b', 'c'] """ L = list(iterable) n = len(L) if k is not None: if k < 1: raise ValueError( "Can't partition in a negative or zero number of groups" ) elif k > n: return def set_partitions_helper(L, k): n = len(L) if k == 1: yield [L] elif n == k: yield [[s] for s in L] else: e, *M = L for p in set_partitions_helper(M, k - 1): yield [[e], *p] for p in set_partitions_helper(M, k): for i in range(len(p)): yield p[:i] + [[e] + p[i]] + p[i + 1 :] if k is None: for k in range(1, n + 1): yield from set_partitions_helper(L, k) else: yield from set_partitions_helper(L, k) class time_limited: """ Yield items from *iterable* until *limit_seconds* have passed. If the time limit expires before all items have been yielded, the ``timed_out`` parameter will be set to ``True``. >>> from time import sleep >>> def generator(): ... yield 1 ... yield 2 ... sleep(0.2) ... yield 3 >>> iterable = time_limited(0.1, generator()) >>> list(iterable) [1, 2] >>> iterable.timed_out True Note that the time is checked before each item is yielded, and iteration stops if the time elapsed is greater than *limit_seconds*. If your time limit is 1 second, but it takes 2 seconds to generate the first item from the iterable, the function will run for 2 seconds and not yield anything. """ def __init__(self, limit_seconds, iterable): if limit_seconds < 0: raise ValueError('limit_seconds must be positive') self.limit_seconds = limit_seconds self._iterable = iter(iterable) self._start_time = monotonic() self.timed_out = False def __iter__(self): return self def __next__(self): item = next(self._iterable) if monotonic() - self._start_time > self.limit_seconds: self.timed_out = True raise StopIteration return item def only(iterable, default=None, too_long=None): """If *iterable* has only one item, return it. If it has zero items, return *default*. If it has more than one item, raise the exception given by *too_long*, which is ``ValueError`` by default. >>> only([], default='missing') 'missing' >>> only([1]) 1 >>> only([1, 2]) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: Expected exactly one item in iterable, but got 1, 2, and perhaps more.' >>> only([1, 2], too_long=TypeError) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... TypeError Note that :func:`only` attempts to advance *iterable* twice to ensure there is only one item. See :func:`spy` or :func:`peekable` to check iterable contents less destructively. """ it = iter(iterable) first_value = next(it, default) try: second_value = next(it) except StopIteration: pass else: msg = ( 'Expected exactly one item in iterable, but got {!r}, {!r}, ' 'and perhaps more.'.format(first_value, second_value) ) raise too_long or ValueError(msg) return first_value def ichunked(iterable, n): """Break *iterable* into sub-iterables with *n* elements each. :func:`ichunked` is like :func:`chunked`, but it yields iterables instead of lists. If the sub-iterables are read in order, the elements of *iterable* won't be stored in memory. If they are read out of order, :func:`itertools.tee` is used to cache elements as necessary. >>> from itertools import count >>> all_chunks = ichunked(count(), 4) >>> c_1, c_2, c_3 = next(all_chunks), next(all_chunks), next(all_chunks) >>> list(c_2) # c_1's elements have been cached; c_3's haven't been [4, 5, 6, 7] >>> list(c_1) [0, 1, 2, 3] >>> list(c_3) [8, 9, 10, 11] """ source = iter(iterable) while True: # Check to see whether we're at the end of the source iterable item = next(source, _marker) if item is _marker: return # Clone the source and yield an n-length slice source, it = tee(chain([item], source)) yield islice(it, n) # Advance the source iterable consume(source, n) def distinct_combinations(iterable, r): """Yield the distinct combinations of *r* items taken from *iterable*. >>> list(distinct_combinations([0, 0, 1], 2)) [(0, 0), (0, 1)] Equivalent to ``set(combinations(iterable))``, except duplicates are not generated and thrown away. For larger input sequences this is much more efficient. """ if r < 0: raise ValueError('r must be non-negative') elif r == 0: yield () return pool = tuple(iterable) generators = [unique_everseen(enumerate(pool), key=itemgetter(1))] current_combo = [None] * r level = 0 while generators: try: cur_idx, p = next(generators[-1]) except StopIteration: generators.pop() level -= 1 continue current_combo[level] = p if level + 1 == r: yield tuple(current_combo) else: generators.append( unique_everseen( enumerate(pool[cur_idx + 1 :], cur_idx + 1), key=itemgetter(1), ) ) level += 1 def filter_except(validator, iterable, *exceptions): """Yield the items from *iterable* for which the *validator* function does not raise one of the specified *exceptions*. *validator* is called for each item in *iterable*. It should be a function that accepts one argument and raises an exception if that item is not valid. >>> iterable = ['1', '2', 'three', '4', None] >>> list(filter_except(int, iterable, ValueError, TypeError)) ['1', '2', '4'] If an exception other than one given by *exceptions* is raised by *validator*, it is raised like normal. """ for item in iterable: try: validator(item) except exceptions: pass else: yield item def map_except(function, iterable, *exceptions): """Transform each item from *iterable* with *function* and yield the result, unless *function* raises one of the specified *exceptions*. *function* is called to transform each item in *iterable*. It should accept one argument. >>> iterable = ['1', '2', 'three', '4', None] >>> list(map_except(int, iterable, ValueError, TypeError)) [1, 2, 4] If an exception other than one given by *exceptions* is raised by *function*, it is raised like normal. """ for item in iterable: try: yield function(item) except exceptions: pass def map_if(iterable, pred, func, func_else=lambda x: x): """Evaluate each item from *iterable* using *pred*. If the result is equivalent to ``True``, transform the item with *func* and yield it. Otherwise, transform the item with *func_else* and yield it. *pred*, *func*, and *func_else* should each be functions that accept one argument. By default, *func_else* is the identity function. >>> from math import sqrt >>> iterable = list(range(-5, 5)) >>> iterable [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4] >>> list(map_if(iterable, lambda x: x > 3, lambda x: 'toobig')) [-5, -4, -3, -2, -1, 0, 1, 2, 3, 'toobig'] >>> list(map_if(iterable, lambda x: x >= 0, ... lambda x: f'{sqrt(x):.2f}', lambda x: None)) [None, None, None, None, None, '0.00', '1.00', '1.41', '1.73', '2.00'] """ for item in iterable: yield func(item) if pred(item) else func_else(item) def _sample_unweighted(iterable, k): # Implementation of "Algorithm L" from the 1994 paper by Kim-Hung Li: # "Reservoir-Sampling Algorithms of Time Complexity O(n(1+log(N/n)))". # Fill up the reservoir (collection of samples) with the first `k` samples reservoir = take(k, iterable) # Generate random number that's the largest in a sample of k U(0,1) numbers # Largest order statistic: https://en.wikipedia.org/wiki/Order_statistic W = exp(log(random()) / k) # The number of elements to skip before changing the reservoir is a random # number with a geometric distribution. Sample it using random() and logs. next_index = k + floor(log(random()) / log(1 - W)) for index, element in enumerate(iterable, k): if index == next_index: reservoir[randrange(k)] = element # The new W is the largest in a sample of k U(0, `old_W`) numbers W *= exp(log(random()) / k) next_index += floor(log(random()) / log(1 - W)) + 1 return reservoir def _sample_weighted(iterable, k, weights): # Implementation of "A-ExpJ" from the 2006 paper by Efraimidis et al. : # "Weighted random sampling with a reservoir". # Log-transform for numerical stability for weights that are small/large weight_keys = (log(random()) / weight for weight in weights) # Fill up the reservoir (collection of samples) with the first `k` # weight-keys and elements, then heapify the list. reservoir = take(k, zip(weight_keys, iterable)) heapify(reservoir) # The number of jumps before changing the reservoir is a random variable # with an exponential distribution. Sample it using random() and logs. smallest_weight_key, _ = reservoir[0] weights_to_skip = log(random()) / smallest_weight_key for weight, element in zip(weights, iterable): if weight >= weights_to_skip: # The notation here is consistent with the paper, but we store # the weight-keys in log-space for better numerical stability. smallest_weight_key, _ = reservoir[0] t_w = exp(weight * smallest_weight_key) r_2 = uniform(t_w, 1) # generate U(t_w, 1) weight_key = log(r_2) / weight heapreplace(reservoir, (weight_key, element)) smallest_weight_key, _ = reservoir[0] weights_to_skip = log(random()) / smallest_weight_key else: weights_to_skip -= weight # Equivalent to [element for weight_key, element in sorted(reservoir)] return [heappop(reservoir)[1] for _ in range(k)] def sample(iterable, k, weights=None): """Return a *k*-length list of elements chosen (without replacement) from the *iterable*. Like :func:`random.sample`, but works on iterables of unknown length. >>> iterable = range(100) >>> sample(iterable, 5) # doctest: +SKIP [81, 60, 96, 16, 4] An iterable with *weights* may also be given: >>> iterable = range(100) >>> weights = (i * i + 1 for i in range(100)) >>> sampled = sample(iterable, 5, weights=weights) # doctest: +SKIP [79, 67, 74, 66, 78] The algorithm can also be used to generate weighted random permutations. The relative weight of each item determines the probability that it appears late in the permutation. >>> data = "abcdefgh" >>> weights = range(1, len(data) + 1) >>> sample(data, k=len(data), weights=weights) # doctest: +SKIP ['c', 'a', 'b', 'e', 'g', 'd', 'h', 'f'] """ if k == 0: return [] iterable = iter(iterable) if weights is None: return _sample_unweighted(iterable, k) else: weights = iter(weights) return _sample_weighted(iterable, k, weights) def is_sorted(iterable, key=None, reverse=False, strict=False): """Returns ``True`` if the items of iterable are in sorted order, and ``False`` otherwise. *key* and *reverse* have the same meaning that they do in the built-in :func:`sorted` function. >>> is_sorted(['1', '2', '3', '4', '5'], key=int) True >>> is_sorted([5, 4, 3, 1, 2], reverse=True) False If *strict*, tests for strict sorting, that is, returns ``False`` if equal elements are found: >>> is_sorted([1, 2, 2]) True >>> is_sorted([1, 2, 2], strict=True) False The function returns ``False`` after encountering the first out-of-order item. If there are no out-of-order items, the iterable is exhausted. """ compare = (le if reverse else ge) if strict else (lt if reverse else gt) it = iterable if key is None else map(key, iterable) return not any(starmap(compare, pairwise(it))) class AbortThread(BaseException): pass class callback_iter: """Convert a function that uses callbacks to an iterator. Let *func* be a function that takes a `callback` keyword argument. For example: >>> def func(callback=None): ... for i, c in [(1, 'a'), (2, 'b'), (3, 'c')]: ... if callback: ... callback(i, c) ... return 4 Use ``with callback_iter(func)`` to get an iterator over the parameters that are delivered to the callback. >>> with callback_iter(func) as it: ... for args, kwargs in it: ... print(args) (1, 'a') (2, 'b') (3, 'c') The function will be called in a background thread. The ``done`` property indicates whether it has completed execution. >>> it.done True If it completes successfully, its return value will be available in the ``result`` property. >>> it.result 4 Notes: * If the function uses some keyword argument besides ``callback``, supply *callback_kwd*. * If it finished executing, but raised an exception, accessing the ``result`` property will raise the same exception. * If it hasn't finished executing, accessing the ``result`` property from within the ``with`` block will raise ``RuntimeError``. * If it hasn't finished executing, accessing the ``result`` property from outside the ``with`` block will raise a ``more_itertools.AbortThread`` exception. * Provide *wait_seconds* to adjust how frequently the it is polled for output. """ def __init__(self, func, callback_kwd='callback', wait_seconds=0.1): self._func = func self._callback_kwd = callback_kwd self._aborted = False self._future = None self._wait_seconds = wait_seconds self._executor = __import__("concurrent.futures").futures.ThreadPoolExecutor(max_workers=1) self._iterator = self._reader() def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): self._aborted = True self._executor.shutdown() def __iter__(self): return self def __next__(self): return next(self._iterator) @property def done(self): if self._future is None: return False return self._future.done() @property def result(self): if not self.done: raise RuntimeError('Function has not yet completed') return self._future.result() def _reader(self): q = Queue() def callback(*args, **kwargs): if self._aborted: raise AbortThread('canceled by user') q.put((args, kwargs)) self._future = self._executor.submit( self._func, **{self._callback_kwd: callback} ) while True: try: item = q.get(timeout=self._wait_seconds) except Empty: pass else: q.task_done() yield item if self._future.done(): break remaining = [] while True: try: item = q.get_nowait() except Empty: break else: q.task_done() remaining.append(item) q.join() yield from remaining def windowed_complete(iterable, n): """ Yield ``(beginning, middle, end)`` tuples, where: * Each ``middle`` has *n* items from *iterable* * Each ``beginning`` has the items before the ones in ``middle`` * Each ``end`` has the items after the ones in ``middle`` >>> iterable = range(7) >>> n = 3 >>> for beginning, middle, end in windowed_complete(iterable, n): ... print(beginning, middle, end) () (0, 1, 2) (3, 4, 5, 6) (0,) (1, 2, 3) (4, 5, 6) (0, 1) (2, 3, 4) (5, 6) (0, 1, 2) (3, 4, 5) (6,) (0, 1, 2, 3) (4, 5, 6) () Note that *n* must be at least 0 and most equal to the length of *iterable*. This function will exhaust the iterable and may require significant storage. """ if n < 0: raise ValueError('n must be >= 0') seq = tuple(iterable) size = len(seq) if n > size: raise ValueError('n must be <= len(seq)') for i in range(size - n + 1): beginning = seq[:i] middle = seq[i : i + n] end = seq[i + n :] yield beginning, middle, end def all_unique(iterable, key=None): """ Returns ``True`` if all the elements of *iterable* are unique (no two elements are equal). >>> all_unique('ABCB') False If a *key* function is specified, it will be used to make comparisons. >>> all_unique('ABCb') True >>> all_unique('ABCb', str.lower) False The function returns as soon as the first non-unique element is encountered. Iterables with a mix of hashable and unhashable items can be used, but the function will be slower for unhashable items. """ seenset = set() seenset_add = seenset.add seenlist = [] seenlist_add = seenlist.append for element in map(key, iterable) if key else iterable: try: if element in seenset: return False seenset_add(element) except TypeError: if element in seenlist: return False seenlist_add(element) return True def nth_product(index, *args): """Equivalent to ``list(product(*args))[index]``. The products of *args* can be ordered lexicographically. :func:`nth_product` computes the product at sort position *index* without computing the previous products. >>> nth_product(8, range(2), range(2), range(2), range(2)) (1, 0, 0, 0) ``IndexError`` will be raised if the given *index* is invalid. """ pools = list(map(tuple, reversed(args))) ns = list(map(len, pools)) c = reduce(mul, ns) if index < 0: index += c if not 0 <= index < c: raise IndexError result = [] for pool, n in zip(pools, ns): result.append(pool[index % n]) index //= n return tuple(reversed(result)) def nth_permutation(iterable, r, index): """Equivalent to ``list(permutations(iterable, r))[index]``` The subsequences of *iterable* that are of length *r* where order is important can be ordered lexicographically. :func:`nth_permutation` computes the subsequence at sort position *index* directly, without computing the previous subsequences. >>> nth_permutation('ghijk', 2, 5) ('h', 'i') ``ValueError`` will be raised If *r* is negative or greater than the length of *iterable*. ``IndexError`` will be raised if the given *index* is invalid. """ pool = list(iterable) n = len(pool) if r is None or r == n: r, c = n, factorial(n) elif not 0 <= r < n: raise ValueError else: c = factorial(n) // factorial(n - r) if index < 0: index += c if not 0 <= index < c: raise IndexError if c == 0: return tuple() result = [0] * r q = index * factorial(n) // c if r < n else index for d in range(1, n + 1): q, i = divmod(q, d) if 0 <= n - d < r: result[n - d] = i if q == 0: break return tuple(map(pool.pop, result)) def value_chain(*args): """Yield all arguments passed to the function in the same order in which they were passed. If an argument itself is iterable then iterate over its values. >>> list(value_chain(1, 2, 3, [4, 5, 6])) [1, 2, 3, 4, 5, 6] Binary and text strings are not considered iterable and are emitted as-is: >>> list(value_chain('12', '34', ['56', '78'])) ['12', '34', '56', '78'] Multiple levels of nesting are not flattened. """ for value in args: if isinstance(value, (str, bytes)): yield value continue try: yield from value except TypeError: yield value def product_index(element, *args): """Equivalent to ``list(product(*args)).index(element)`` The products of *args* can be ordered lexicographically. :func:`product_index` computes the first index of *element* without computing the previous products. >>> product_index([8, 2], range(10), range(5)) 42 ``ValueError`` will be raised if the given *element* isn't in the product of *args*. """ index = 0 for x, pool in zip_longest(element, args, fillvalue=_marker): if x is _marker or pool is _marker: raise ValueError('element is not a product of args') pool = tuple(pool) index = index * len(pool) + pool.index(x) return index def combination_index(element, iterable): """Equivalent to ``list(combinations(iterable, r)).index(element)`` The subsequences of *iterable* that are of length *r* can be ordered lexicographically. :func:`combination_index` computes the index of the first *element*, without computing the previous combinations. >>> combination_index('adf', 'abcdefg') 10 ``ValueError`` will be raised if the given *element* isn't one of the combinations of *iterable*. """ element = enumerate(element) k, y = next(element, (None, None)) if k is None: return 0 indexes = [] pool = enumerate(iterable) for n, x in pool: if x == y: indexes.append(n) tmp, y = next(element, (None, None)) if tmp is None: break else: k = tmp else: raise ValueError('element is not a combination of iterable') n, _ = last(pool, default=(n, None)) # Python versiosn below 3.8 don't have math.comb index = 1 for i, j in enumerate(reversed(indexes), start=1): j = n - j if i <= j: index += factorial(j) // (factorial(i) * factorial(j - i)) return factorial(n + 1) // (factorial(k + 1) * factorial(n - k)) - index def permutation_index(element, iterable): """Equivalent to ``list(permutations(iterable, r)).index(element)``` The subsequences of *iterable* that are of length *r* where order is important can be ordered lexicographically. :func:`permutation_index` computes the index of the first *element* directly, without computing the previous permutations. >>> permutation_index([1, 3, 2], range(5)) 19 ``ValueError`` will be raised if the given *element* isn't one of the permutations of *iterable*. """ index = 0 pool = list(iterable) for i, x in zip(range(len(pool), -1, -1), element): r = pool.index(x) index = index * i + r del pool[r] return index class countable: """Wrap *iterable* and keep a count of how many items have been consumed. The ``items_seen`` attribute starts at ``0`` and increments as the iterable is consumed: >>> iterable = map(str, range(10)) >>> it = countable(iterable) >>> it.items_seen 0 >>> next(it), next(it) ('0', '1') >>> list(it) ['2', '3', '4', '5', '6', '7', '8', '9'] >>> it.items_seen 10 """ def __init__(self, iterable): self._it = iter(iterable) self.items_seen = 0 def __iter__(self): return self def __next__(self): item = next(self._it) self.items_seen += 1 return item def chunked_even(iterable, n): """Break *iterable* into lists of approximately length *n*. Items are distributed such the lengths of the lists differ by at most 1 item. >>> iterable = [1, 2, 3, 4, 5, 6, 7] >>> n = 3 >>> list(chunked_even(iterable, n)) # List lengths: 3, 2, 2 [[1, 2, 3], [4, 5], [6, 7]] >>> list(chunked(iterable, n)) # List lengths: 3, 3, 1 [[1, 2, 3], [4, 5, 6], [7]] """ len_method = getattr(iterable, '__len__', None) if len_method is None: return _chunked_even_online(iterable, n) else: return _chunked_even_finite(iterable, len_method(), n) def _chunked_even_online(iterable, n): buffer = [] maxbuf = n + (n - 2) * (n - 1) for x in iterable: buffer.append(x) if len(buffer) == maxbuf: yield buffer[:n] buffer = buffer[n:] yield from _chunked_even_finite(buffer, len(buffer), n) def _chunked_even_finite(iterable, N, n): if N < 1: return # Lists are either size `full_size <= n` or `partial_size = full_size - 1` q, r = divmod(N, n) num_lists = q + (1 if r > 0 else 0) q, r = divmod(N, num_lists) full_size = q + (1 if r > 0 else 0) partial_size = full_size - 1 num_full = N - partial_size * num_lists num_partial = num_lists - num_full buffer = [] iterator = iter(iterable) # Yield num_full lists of full_size for x in iterator: buffer.append(x) if len(buffer) == full_size: yield buffer buffer = [] num_full -= 1 if num_full <= 0: break # Yield num_partial lists of partial_size for x in iterator: buffer.append(x) if len(buffer) == partial_size: yield buffer buffer = [] num_partial -= 1 def zip_broadcast(*objects, scalar_types=(str, bytes), strict=False): """A version of :func:`zip` that "broadcasts" any scalar (i.e., non-iterable) items into output tuples. >>> iterable_1 = [1, 2, 3] >>> iterable_2 = ['a', 'b', 'c'] >>> scalar = '_' >>> list(zip_broadcast(iterable_1, iterable_2, scalar)) [(1, 'a', '_'), (2, 'b', '_'), (3, 'c', '_')] The *scalar_types* keyword argument determines what types are considered scalar. It is set to ``(str, bytes)`` by default. Set it to ``None`` to treat strings and byte strings as iterable: >>> list(zip_broadcast('abc', 0, 'xyz', scalar_types=None)) [('a', 0, 'x'), ('b', 0, 'y'), ('c', 0, 'z')] If the *strict* keyword argument is ``True``, then ``UnequalIterablesError`` will be raised if any of the iterables have different lengthss. """ def is_scalar(obj): if scalar_types and isinstance(obj, scalar_types): return True try: iter(obj) except TypeError: return True else: return False size = len(objects) if not size: return iterables, iterable_positions = [], [] scalars, scalar_positions = [], [] for i, obj in enumerate(objects): if is_scalar(obj): scalars.append(obj) scalar_positions.append(i) else: iterables.append(iter(obj)) iterable_positions.append(i) if len(scalars) == size: yield tuple(objects) return zipper = _zip_equal if strict else zip for item in zipper(*iterables): new_item = [None] * size for i, elem in zip(iterable_positions, item): new_item[i] = elem for i, elem in zip(scalar_positions, scalars): new_item[i] = elem yield tuple(new_item) def unique_in_window(iterable, n, key=None): """Yield the items from *iterable* that haven't been seen recently. *n* is the size of the lookback window. >>> iterable = [0, 1, 0, 2, 3, 0] >>> n = 3 >>> list(unique_in_window(iterable, n)) [0, 1, 2, 3, 0] The *key* function, if provided, will be used to determine uniqueness: >>> list(unique_in_window('abAcda', 3, key=lambda x: x.lower())) ['a', 'b', 'c', 'd', 'a'] The items in *iterable* must be hashable. """ if n <= 0: raise ValueError('n must be greater than 0') window = deque(maxlen=n) uniques = set() use_key = key is not None for item in iterable: k = key(item) if use_key else item if k in uniques: continue if len(uniques) == n: uniques.discard(window[0]) uniques.add(k) window.append(k) yield item def duplicates_everseen(iterable, key=None): """Yield duplicate elements after their first appearance. >>> list(duplicates_everseen('mississippi')) ['s', 'i', 's', 's', 'i', 'p', 'i'] >>> list(duplicates_everseen('AaaBbbCccAaa', str.lower)) ['a', 'a', 'b', 'b', 'c', 'c', 'A', 'a', 'a'] This function is analagous to :func:`unique_everseen` and is subject to the same performance considerations. """ seen_set = set() seen_list = [] use_key = key is not None for element in iterable: k = key(element) if use_key else element try: if k not in seen_set: seen_set.add(k) else: yield element except TypeError: if k not in seen_list: seen_list.append(k) else: yield element def duplicates_justseen(iterable, key=None): """Yields serially-duplicate elements after their first appearance. >>> list(duplicates_justseen('mississippi')) ['s', 's', 'p'] >>> list(duplicates_justseen('AaaBbbCccAaa', str.lower)) ['a', 'a', 'b', 'b', 'c', 'c', 'a', 'a'] This function is analagous to :func:`unique_justseen`. """ return flatten( map( lambda group_tuple: islice_extended(group_tuple[1])[1:], groupby(iterable, key), ) ) def minmax(iterable_or_value, *others, key=None, default=_marker): """Returns both the smallest and largest items in an iterable or the largest of two or more arguments. >>> minmax([3, 1, 5]) (1, 5) >>> minmax(4, 2, 6) (2, 6) If a *key* function is provided, it will be used to transform the input items for comparison. >>> minmax([5, 30], key=str) # '30' sorts before '5' (30, 5) If a *default* value is provided, it will be returned if there are no input items. >>> minmax([], default=(0, 0)) (0, 0) Otherwise ``ValueError`` is raised. This function is based on the `recipe `__ by Raymond Hettinger and takes care to minimize the number of comparisons performed. """ iterable = (iterable_or_value, *others) if others else iterable_or_value it = iter(iterable) try: lo = hi = next(it) except StopIteration as e: if default is _marker: raise ValueError( '`minmax()` argument is an empty iterable. ' 'Provide a `default` value to suppress this error.' ) from e return default # Different branches depending on the presence of key. This saves a lot # of unimportant copies which would slow the "key=None" branch # significantly down. if key is None: for x, y in zip_longest(it, it, fillvalue=lo): if y < x: x, y = y, x if x < lo: lo = x if hi < y: hi = y else: lo_key = hi_key = key(lo) for x, y in zip_longest(it, it, fillvalue=lo): x_key, y_key = key(x), key(y) if y_key < x_key: x, y, x_key, y_key = y, x, y_key, x_key if x_key < lo_key: lo, lo_key = x, x_key if hi_key < y_key: hi, hi_key = y, y_key return lo, hi PK|5ZBGGALib/site-packages/pkg_resources/_vendor/more_itertools/recipes.pynuW+A"""Imported from the recipes section of the itertools documentation. All functions taken from the recipes section of the itertools library docs [1]_. Some backward-compatible usability improvements have been made. .. [1] http://docs.python.org/library/itertools.html#recipes """ import warnings from collections import deque from itertools import ( chain, combinations, count, cycle, groupby, islice, repeat, starmap, tee, zip_longest, ) import operator from random import randrange, sample, choice __all__ = [ 'all_equal', 'before_and_after', 'consume', 'convolve', 'dotproduct', 'first_true', 'flatten', 'grouper', 'iter_except', 'ncycles', 'nth', 'nth_combination', 'padnone', 'pad_none', 'pairwise', 'partition', 'powerset', 'prepend', 'quantify', 'random_combination_with_replacement', 'random_combination', 'random_permutation', 'random_product', 'repeatfunc', 'roundrobin', 'sliding_window', 'tabulate', 'tail', 'take', 'triplewise', 'unique_everseen', 'unique_justseen', ] def take(n, iterable): """Return first *n* items of the iterable as a list. >>> take(3, range(10)) [0, 1, 2] If there are fewer than *n* items in the iterable, all of them are returned. >>> take(10, range(3)) [0, 1, 2] """ return list(islice(iterable, n)) def tabulate(function, start=0): """Return an iterator over the results of ``func(start)``, ``func(start + 1)``, ``func(start + 2)``... *func* should be a function that accepts one integer argument. If *start* is not specified it defaults to 0. It will be incremented each time the iterator is advanced. >>> square = lambda x: x ** 2 >>> iterator = tabulate(square, -3) >>> take(4, iterator) [9, 4, 1, 0] """ return map(function, count(start)) def tail(n, iterable): """Return an iterator over the last *n* items of *iterable*. >>> t = tail(3, 'ABCDEFG') >>> list(t) ['E', 'F', 'G'] """ return iter(deque(iterable, maxlen=n)) def consume(iterator, n=None): """Advance *iterable* by *n* steps. If *n* is ``None``, consume it entirely. Efficiently exhausts an iterator without returning values. Defaults to consuming the whole iterator, but an optional second argument may be provided to limit consumption. >>> i = (x for x in range(10)) >>> next(i) 0 >>> consume(i, 3) >>> next(i) 4 >>> consume(i) >>> next(i) Traceback (most recent call last): File "", line 1, in StopIteration If the iterator has fewer items remaining than the provided limit, the whole iterator will be consumed. >>> i = (x for x in range(3)) >>> consume(i, 5) >>> next(i) Traceback (most recent call last): File "", line 1, in StopIteration """ # Use functions that consume iterators at C speed. if n is None: # feed the entire iterator into a zero-length deque deque(iterator, maxlen=0) else: # advance to the empty slice starting at position n next(islice(iterator, n, n), None) def nth(iterable, n, default=None): """Returns the nth item or a default value. >>> l = range(10) >>> nth(l, 3) 3 >>> nth(l, 20, "zebra") 'zebra' """ return next(islice(iterable, n, None), default) def all_equal(iterable): """ Returns ``True`` if all the elements are equal to each other. >>> all_equal('aaaa') True >>> all_equal('aaab') False """ g = groupby(iterable) return next(g, True) and not next(g, False) def quantify(iterable, pred=bool): """Return the how many times the predicate is true. >>> quantify([True, False, True]) 2 """ return sum(map(pred, iterable)) def pad_none(iterable): """Returns the sequence of elements and then returns ``None`` indefinitely. >>> take(5, pad_none(range(3))) [0, 1, 2, None, None] Useful for emulating the behavior of the built-in :func:`map` function. See also :func:`padded`. """ return chain(iterable, repeat(None)) padnone = pad_none def ncycles(iterable, n): """Returns the sequence elements *n* times >>> list(ncycles(["a", "b"], 3)) ['a', 'b', 'a', 'b', 'a', 'b'] """ return chain.from_iterable(repeat(tuple(iterable), n)) def dotproduct(vec1, vec2): """Returns the dot product of the two iterables. >>> dotproduct([10, 10], [20, 20]) 400 """ return sum(map(operator.mul, vec1, vec2)) def flatten(listOfLists): """Return an iterator flattening one level of nesting in a list of lists. >>> list(flatten([[0, 1], [2, 3]])) [0, 1, 2, 3] See also :func:`collapse`, which can flatten multiple levels of nesting. """ return chain.from_iterable(listOfLists) def repeatfunc(func, times=None, *args): """Call *func* with *args* repeatedly, returning an iterable over the results. If *times* is specified, the iterable will terminate after that many repetitions: >>> from operator import add >>> times = 4 >>> args = 3, 5 >>> list(repeatfunc(add, times, *args)) [8, 8, 8, 8] If *times* is ``None`` the iterable will not terminate: >>> from random import randrange >>> times = None >>> args = 1, 11 >>> take(6, repeatfunc(randrange, times, *args)) # doctest:+SKIP [2, 4, 8, 1, 8, 4] """ if times is None: return starmap(func, repeat(args)) return starmap(func, repeat(args, times)) def _pairwise(iterable): """Returns an iterator of paired items, overlapping, from the original >>> take(4, pairwise(count())) [(0, 1), (1, 2), (2, 3), (3, 4)] On Python 3.10 and above, this is an alias for :func:`itertools.pairwise`. """ a, b = tee(iterable) next(b, None) yield from zip(a, b) try: from itertools import pairwise as itertools_pairwise except ImportError: pairwise = _pairwise else: def pairwise(iterable): yield from itertools_pairwise(iterable) pairwise.__doc__ = _pairwise.__doc__ def grouper(iterable, n, fillvalue=None): """Collect data into fixed-length chunks or blocks. >>> list(grouper('ABCDEFG', 3, 'x')) [('A', 'B', 'C'), ('D', 'E', 'F'), ('G', 'x', 'x')] """ if isinstance(iterable, int): warnings.warn( "grouper expects iterable as first parameter", DeprecationWarning ) n, iterable = iterable, n args = [iter(iterable)] * n return zip_longest(fillvalue=fillvalue, *args) def roundrobin(*iterables): """Yields an item from each iterable, alternating between them. >>> list(roundrobin('ABC', 'D', 'EF')) ['A', 'D', 'E', 'B', 'F', 'C'] This function produces the same output as :func:`interleave_longest`, but may perform better for some inputs (in particular when the number of iterables is small). """ # Recipe credited to George Sakkis pending = len(iterables) nexts = cycle(iter(it).__next__ for it in iterables) while pending: try: for next in nexts: yield next() except StopIteration: pending -= 1 nexts = cycle(islice(nexts, pending)) def partition(pred, iterable): """ Returns a 2-tuple of iterables derived from the input iterable. The first yields the items that have ``pred(item) == False``. The second yields the items that have ``pred(item) == True``. >>> is_odd = lambda x: x % 2 != 0 >>> iterable = range(10) >>> even_items, odd_items = partition(is_odd, iterable) >>> list(even_items), list(odd_items) ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9]) If *pred* is None, :func:`bool` is used. >>> iterable = [0, 1, False, True, '', ' '] >>> false_items, true_items = partition(None, iterable) >>> list(false_items), list(true_items) ([0, False, ''], [1, True, ' ']) """ if pred is None: pred = bool evaluations = ((pred(x), x) for x in iterable) t1, t2 = tee(evaluations) return ( (x for (cond, x) in t1 if not cond), (x for (cond, x) in t2 if cond), ) def powerset(iterable): """Yields all possible subsets of the iterable. >>> list(powerset([1, 2, 3])) [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)] :func:`powerset` will operate on iterables that aren't :class:`set` instances, so repeated elements in the input will produce repeated elements in the output. Use :func:`unique_everseen` on the input to avoid generating duplicates: >>> seq = [1, 1, 0] >>> list(powerset(seq)) [(), (1,), (1,), (0,), (1, 1), (1, 0), (1, 0), (1, 1, 0)] >>> from more_itertools import unique_everseen >>> list(powerset(unique_everseen(seq))) [(), (1,), (0,), (1, 0)] """ s = list(iterable) return chain.from_iterable(combinations(s, r) for r in range(len(s) + 1)) def unique_everseen(iterable, key=None): """ Yield unique elements, preserving order. >>> list(unique_everseen('AAAABBBCCDAABBB')) ['A', 'B', 'C', 'D'] >>> list(unique_everseen('ABBCcAD', str.lower)) ['A', 'B', 'C', 'D'] Sequences with a mix of hashable and unhashable items can be used. The function will be slower (i.e., `O(n^2)`) for unhashable items. Remember that ``list`` objects are unhashable - you can use the *key* parameter to transform the list to a tuple (which is hashable) to avoid a slowdown. >>> iterable = ([1, 2], [2, 3], [1, 2]) >>> list(unique_everseen(iterable)) # Slow [[1, 2], [2, 3]] >>> list(unique_everseen(iterable, key=tuple)) # Faster [[1, 2], [2, 3]] Similary, you may want to convert unhashable ``set`` objects with ``key=frozenset``. For ``dict`` objects, ``key=lambda x: frozenset(x.items())`` can be used. """ seenset = set() seenset_add = seenset.add seenlist = [] seenlist_add = seenlist.append use_key = key is not None for element in iterable: k = key(element) if use_key else element try: if k not in seenset: seenset_add(k) yield element except TypeError: if k not in seenlist: seenlist_add(k) yield element def unique_justseen(iterable, key=None): """Yields elements in order, ignoring serial duplicates >>> list(unique_justseen('AAAABBBCCDAABBB')) ['A', 'B', 'C', 'D', 'A', 'B'] >>> list(unique_justseen('ABBCcAD', str.lower)) ['A', 'B', 'C', 'A', 'D'] """ return map(next, map(operator.itemgetter(1), groupby(iterable, key))) def iter_except(func, exception, first=None): """Yields results from a function repeatedly until an exception is raised. Converts a call-until-exception interface to an iterator interface. Like ``iter(func, sentinel)``, but uses an exception instead of a sentinel to end the loop. >>> l = [0, 1, 2] >>> list(iter_except(l.pop, IndexError)) [2, 1, 0] Multiple exceptions can be specified as a stopping condition: >>> l = [1, 2, 3, '...', 4, 5, 6] >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError))) [7, 6, 5] >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError))) [4, 3, 2] >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError))) [] """ try: if first is not None: yield first() while 1: yield func() except exception: pass def first_true(iterable, default=None, pred=None): """ Returns the first true value in the iterable. If no true value is found, returns *default* If *pred* is not None, returns the first item for which ``pred(item) == True`` . >>> first_true(range(10)) 1 >>> first_true(range(10), pred=lambda x: x > 5) 6 >>> first_true(range(10), default='missing', pred=lambda x: x > 9) 'missing' """ return next(filter(pred, iterable), default) def random_product(*args, repeat=1): """Draw an item at random from each of the input iterables. >>> random_product('abc', range(4), 'XYZ') # doctest:+SKIP ('c', 3, 'Z') If *repeat* is provided as a keyword argument, that many items will be drawn from each iterable. >>> random_product('abcd', range(4), repeat=2) # doctest:+SKIP ('a', 2, 'd', 3) This equivalent to taking a random selection from ``itertools.product(*args, **kwarg)``. """ pools = [tuple(pool) for pool in args] * repeat return tuple(choice(pool) for pool in pools) def random_permutation(iterable, r=None): """Return a random *r* length permutation of the elements in *iterable*. If *r* is not specified or is ``None``, then *r* defaults to the length of *iterable*. >>> random_permutation(range(5)) # doctest:+SKIP (3, 4, 0, 1, 2) This equivalent to taking a random selection from ``itertools.permutations(iterable, r)``. """ pool = tuple(iterable) r = len(pool) if r is None else r return tuple(sample(pool, r)) def random_combination(iterable, r): """Return a random *r* length subsequence of the elements in *iterable*. >>> random_combination(range(5), 3) # doctest:+SKIP (2, 3, 4) This equivalent to taking a random selection from ``itertools.combinations(iterable, r)``. """ pool = tuple(iterable) n = len(pool) indices = sorted(sample(range(n), r)) return tuple(pool[i] for i in indices) def random_combination_with_replacement(iterable, r): """Return a random *r* length subsequence of elements in *iterable*, allowing individual elements to be repeated. >>> random_combination_with_replacement(range(3), 5) # doctest:+SKIP (0, 0, 1, 2, 2) This equivalent to taking a random selection from ``itertools.combinations_with_replacement(iterable, r)``. """ pool = tuple(iterable) n = len(pool) indices = sorted(randrange(n) for i in range(r)) return tuple(pool[i] for i in indices) def nth_combination(iterable, r, index): """Equivalent to ``list(combinations(iterable, r))[index]``. The subsequences of *iterable* that are of length *r* can be ordered lexicographically. :func:`nth_combination` computes the subsequence at sort position *index* directly, without computing the previous subsequences. >>> nth_combination(range(5), 3, 5) (0, 3, 4) ``ValueError`` will be raised If *r* is negative or greater than the length of *iterable*. ``IndexError`` will be raised if the given *index* is invalid. """ pool = tuple(iterable) n = len(pool) if (r < 0) or (r > n): raise ValueError c = 1 k = min(r, n - r) for i in range(1, k + 1): c = c * (n - k + i) // i if index < 0: index += c if (index < 0) or (index >= c): raise IndexError result = [] while r: c, n, r = c * r // n, n - 1, r - 1 while index >= c: index -= c c, n = c * (n - r) // n, n - 1 result.append(pool[-1 - n]) return tuple(result) def prepend(value, iterator): """Yield *value*, followed by the elements in *iterator*. >>> value = '0' >>> iterator = ['1', '2', '3'] >>> list(prepend(value, iterator)) ['0', '1', '2', '3'] To prepend multiple values, see :func:`itertools.chain` or :func:`value_chain`. """ return chain([value], iterator) def convolve(signal, kernel): """Convolve the iterable *signal* with the iterable *kernel*. >>> signal = (1, 2, 3, 4, 5) >>> kernel = [3, 2, 1] >>> list(convolve(signal, kernel)) [3, 8, 14, 20, 26, 14, 5] Note: the input arguments are not interchangeable, as the *kernel* is immediately consumed and stored. """ kernel = tuple(kernel)[::-1] n = len(kernel) window = deque([0], maxlen=n) * n for x in chain(signal, repeat(0, n - 1)): window.append(x) yield sum(map(operator.mul, kernel, window)) def before_and_after(predicate, it): """A variant of :func:`takewhile` that allows complete access to the remainder of the iterator. >>> it = iter('ABCdEfGhI') >>> all_upper, remainder = before_and_after(str.isupper, it) >>> ''.join(all_upper) 'ABC' >>> ''.join(remainder) # takewhile() would lose the 'd' 'dEfGhI' Note that the first iterator must be fully consumed before the second iterator can generate valid results. """ it = iter(it) transition = [] def true_iterator(): for elem in it: if predicate(elem): yield elem else: transition.append(elem) return def remainder_iterator(): yield from transition yield from it return true_iterator(), remainder_iterator() def triplewise(iterable): """Return overlapping triplets from *iterable*. >>> list(triplewise('ABCDE')) [('A', 'B', 'C'), ('B', 'C', 'D'), ('C', 'D', 'E')] """ for (a, _), (b, c) in pairwise(pairwise(iterable)): yield a, b, c def sliding_window(iterable, n): """Return a sliding window of width *n* over *iterable*. >>> list(sliding_window(range(6), 4)) [(0, 1, 2, 3), (1, 2, 3, 4), (2, 3, 4, 5)] If *iterable* has fewer than *n* items, then nothing is yielded: >>> list(sliding_window(range(3), 4)) [] For a variant with more features, see :func:`windowed`. """ it = iter(iterable) window = deque(islice(it, n), maxlen=n) if len(window) == n: yield tuple(window) for x in it: window.append(x) yield tuple(window) PK|5Z2& ,,9Lib/site-packages/pkg_resources/_vendor/jaraco/context.pynuW+Aimport os import subprocess import contextlib import functools import tempfile import shutil import operator @contextlib.contextmanager def pushd(dir): orig = os.getcwd() os.chdir(dir) try: yield dir finally: os.chdir(orig) @contextlib.contextmanager def tarball_context(url, target_dir=None, runner=None, pushd=pushd): """ Get a tarball, extract it, change to that directory, yield, then clean up. `runner` is the function to invoke commands. `pushd` is a context manager for changing the directory. """ if target_dir is None: target_dir = os.path.basename(url).replace('.tar.gz', '').replace('.tgz', '') if runner is None: runner = functools.partial(subprocess.check_call, shell=True) # In the tar command, use --strip-components=1 to strip the first path and # then # use -C to cause the files to be extracted to {target_dir}. This ensures # that we always know where the files were extracted. runner('mkdir {target_dir}'.format(**vars())) try: getter = 'wget {url} -O -' extract = 'tar x{compression} --strip-components=1 -C {target_dir}' cmd = ' | '.join((getter, extract)) runner(cmd.format(compression=infer_compression(url), **vars())) with pushd(target_dir): yield target_dir finally: runner('rm -Rf {target_dir}'.format(**vars())) def infer_compression(url): """ Given a URL or filename, infer the compression code for tar. """ # cheat and just assume it's the last two characters compression_indicator = url[-2:] mapping = dict(gz='z', bz='j', xz='J') # Assume 'z' (gzip) if no match return mapping.get(compression_indicator, 'z') @contextlib.contextmanager def temp_dir(remover=shutil.rmtree): """ Create a temporary directory context. Pass a custom remover to override the removal behavior. """ temp_dir = tempfile.mkdtemp() try: yield temp_dir finally: remover(temp_dir) @contextlib.contextmanager def repo_context(url, branch=None, quiet=True, dest_ctx=temp_dir): """ Check out the repo indicated by url. If dest_ctx is supplied, it should be a context manager to yield the target directory for the check out. """ exe = 'git' if 'git' in url else 'hg' with dest_ctx() as repo_dir: cmd = [exe, 'clone', url, repo_dir] if branch: cmd.extend(['--branch', branch]) devnull = open(os.path.devnull, 'w') stdout = devnull if quiet else None subprocess.check_call(cmd, stdout=stdout) yield repo_dir @contextlib.contextmanager def null(): yield class ExceptionTrap: """ A context manager that will catch certain exceptions and provide an indication they occurred. >>> with ExceptionTrap() as trap: ... raise Exception() >>> bool(trap) True >>> with ExceptionTrap() as trap: ... pass >>> bool(trap) False >>> with ExceptionTrap(ValueError) as trap: ... raise ValueError("1 + 1 is not 3") >>> bool(trap) True >>> with ExceptionTrap(ValueError) as trap: ... raise Exception() Traceback (most recent call last): ... Exception >>> bool(trap) False """ exc_info = None, None, None def __init__(self, exceptions=(Exception,)): self.exceptions = exceptions def __enter__(self): return self @property def type(self): return self.exc_info[0] @property def value(self): return self.exc_info[1] @property def tb(self): return self.exc_info[2] def __exit__(self, *exc_info): type = exc_info[0] matches = type and issubclass(type, self.exceptions) if matches: self.exc_info = exc_info return matches def __bool__(self): return bool(self.type) def raises(self, func, *, _test=bool): """ Wrap func and replace the result with the truth value of the trap (True if an exception occurred). First, give the decorator an alias to support Python 3.8 Syntax. >>> raises = ExceptionTrap(ValueError).raises Now decorate a function that always fails. >>> @raises ... def fail(): ... raise ValueError('failed') >>> fail() True """ @functools.wraps(func) def wrapper(*args, **kwargs): with ExceptionTrap(self.exceptions) as trap: func(*args, **kwargs) return _test(trap) return wrapper def passes(self, func): """ Wrap func and replace the result with the truth value of the trap (True if no exception). First, give the decorator an alias to support Python 3.8 Syntax. >>> passes = ExceptionTrap(ValueError).passes Now decorate a function that always fails. >>> @passes ... def fail(): ... raise ValueError('failed') >>> fail() False """ return self.raises(func, _test=operator.not_) class suppress(contextlib.suppress, contextlib.ContextDecorator): """ A version of contextlib.suppress with decorator support. >>> @suppress(KeyError) ... def key_error(): ... {}[''] >>> key_error() """ PK|5ZwzSLib/site-packages/pkg_resources/_vendor/jaraco/__pycache__/__init__.cpython-311.pycnuW+A ^;ddS)NrtE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/jaraco/__init__.pyrsrPK|5ZvWOWOTLib/site-packages/pkg_resources/_vendor/jaraco/__pycache__/functools.cpython-311.pycnuW+A ^;d4BddlZddlZddlZddlZddlZddlZddlZddlm Z m Z e de de fZ dZ dZdZejfd e d e e ge fd e fd Zd ZdZdZdZGddZdZdddfdZdZdZdZdZdZddddZdS)N)CallableTypeVar CallableT.)boundc2d}tj||S)a; Compose any number of unary functions into a single unary function. >>> import textwrap >>> expected = str.strip(textwrap.dedent(compose.__doc__)) >>> strip_and_dedent = compose(str.strip, textwrap.dedent) >>> strip_and_dedent(compose.__doc__) == expected True Compose also allows the innermost function to take arbitrary arguments. >>> round_three = lambda x: round(x, ndigits=3) >>> f = compose(round_three, int.__truediv__) >>> [f(3*x, x+1) for x in range(1,10)] [1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7] cfdS)Nc&|i|SN)argskwargsf1f2s uE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/jaraco/functools.pyz.compose..compose_two..#s rr""d*=f*=*='>'>r )rrs``r compose_twozcompose..compose_two"s>>>>>>r) functoolsreduce)funcsrs rcomposers&$???  K / //rcfd}|S)z Return a function that will call a named method on the target object with optional positional and keyword arguments. >>> lower = method_caller('lower') >>> lower('MyString') 'mystring' c4t|}|iSr )getattr)targetfuncr r method_names r call_methodz"method_caller..call_method3s'v{++tT$V$$$rr )rr r rs``` r method_callerr(s0%%%%%%% rc^tjfdfd_S)ad Decorate func so it's only ever called the first time. This decorator can ensure that an expensive or non-idempotent function will not be expensive on subsequent calls and is idempotent. >>> add_three = once(lambda a: a+3) >>> add_three(3) 6 >>> add_three(9) 6 >>> add_three('12') 6 To reset the stored value, simply clear the property ``saved_result``. >>> del add_three.saved_result >>> add_three(9) 12 >>> add_three(8) 12 Or invoke 'reset()' on it. >>> add_three.reset() >>> add_three(-3) 0 >>> add_three(0) 0 cLtds |i|_jSN saved_result)hasattrr#)r r rwrappers rr%zonce..wrapperZs5w// 9#'4#8#8#8G ##rcHtdSr")vars __delitem__)r%srrzonce..`sDMM55nEEr)rwrapsresetrr%s`@roncer,:sR@_T$$$$$$ FEEEGM Nrmethod cache_wrapperreturncdtdtdtdtffd }d|_tp|S)aV Wrap lru_cache to support storing the cache data in the object instances. Abstracts the common paradigm where the method explicitly saves an underscore-prefixed protected property on first call and returns that subsequently. >>> class MyClass: ... calls = 0 ... ... @method_cache ... def method(self, value): ... self.calls += 1 ... return value >>> a = MyClass() >>> a.method(3) 3 >>> for x in range(75): ... res = a.method(x) >>> a.calls 75 Note that the apparent behavior will be exactly like that of lru_cache except that the cache is stored on each instance, so values in one instance will not flush values from another, and when an instance is deleted, so are the cached values for that instance. >>> b = MyClass() >>> for x in range(35): ... res = b.method(x) >>> b.calls 35 >>> a.method(0) 0 >>> a.calls 75 Note that if method had been decorated with ``functools.lru_cache()``, a.calls would have been 76 (due to the cached value of 0 having been flushed by the 'b' instance). Clear the cache with ``.cache_clear()`` >>> a.method.cache_clear() Same for a method that hasn't yet been called. >>> c = MyClass() >>> c.method.cache_clear() Another cache wrapper may be supplied: >>> cache = functools.lru_cache(maxsize=2) >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache) >>> a = MyClass() >>> a.method2() 3 Caution - do not subsequently wrap the method with another decorator, such as ``@property``, which changes the semantics of the function. See also http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/ for another implementation and additional justification. selfr r r/ctj|}|}t|j|||i|Sr )types MethodTypesetattr__name__)r1r r bound_method cached_methodr.r-s rr%zmethod_cache..wrappersT"'"2 D# # & l33 fo}555}d-f---rcdSr r r rrrzmethod_cache..s$r)object cache_clear_special_method_cache)r-r.r%s`` r method_cacher=dsiR.f.V.v.&.......',G fm44?rcBj}d}||vrdSd|zfd}|S)a: Because Python treats special methods differently, it's not possible to use instance attributes to implement the cached methods. Instead, install the wrapper method under a different name and return a simple proxy to that wrapper. https://github.com/jaraco/jaraco.functools/issues/5 ) __getattr__ __getitem__N__cachedct|vr2tj|}|}t||nt |}||i|Sr )r'r3r4r5r)r1r r rcacher.r- wrapper_names rproxyz$_special_method_cache..proxysn tDzz ) )$VT22E!M%((E D, . . . .D,//Eud%f%%%r)r6)r-r.name special_namesrErDs`` @rr<r<sW ?D0M =  $L&&&&&&& Lrcfd}|S)ab Decorate a function with a transform function that is invoked on results returned from the decorated function. >>> @apply(reversed) ... def get_numbers(start): ... "doc for get_numbers" ... return range(start, start+3) >>> list(get_numbers(4)) [6, 5, 4] >>> get_numbers.__doc__ 'doc for get_numbers' cZtj|t|Sr )rr)r)r transforms rwrapzapply..wraps'$yt$$WY%=%=>>>rr )rJrKs` rapplyrLs#????? Krcfd}|S)a@ Decorate a function with an action function that is invoked on the results returned from the decorated function (for its side-effect), then return the original result. >>> @result_invoke(print) ... def add_two(a, b): ... return a + b >>> x = add_two(2, 3) 5 >>> x 5 cJtjfd}|S)Nc.|i|}||Sr r )r r resultactionrs rr%z,result_invoke..wrap..wrappers)T4*6**F F6NNNMrrr))rr%rQs` rrKzresult_invoke..wraps>            rr )rQrKs` r result_invokerSs#  Krc||i||S)ab Call a function for its side effect after initialization. >>> @call_aside ... def func(): print("called") called >>> func() called Use functools.partial to pass parameters to the initial call >>> @functools.partial(call_aside, name='bingo') ... def func(name): print("called with", name) called with bingo r )fr r s r call_asiderV s Atv HrcHeZdZdZedfdZdZdZdZd dZ dS) Throttlerz3 Rate-limit a function (or other callable) Infct|tr|j}||_||_|dSr ) isinstancerXrmax_rater*)r1rr\s r__init__zThrottler.__init__&s: dI & & 9D    rcd|_dS)Nr) last_called)r1s rr*zThrottler.reset-srcD||j|i|Sr )_waitr)r1r r s r__call__zThrottler.__call__0s& ty$)&)))rctj|jz }d|jz |z }tjt d|tj|_dS)z1ensure at least 1/max_rate seconds from last callrN)timer_r\sleepmax)r1elapsed must_waits rrazThrottler._wait4sT)++ 00 %/  3q)$$%%%9;;rNc\t|jtj|j|Sr ) first_invokerarpartialr)r1objtypes r__get__zThrottler.__get__;s#DJ (9$)S(I(IJJJrr ) r6 __module__ __qualname____doc__floatr]r*rbraror rrrXrX!s',eEll***'''KKKKKKrrXcfd}|S)z Return a function that when invoked will invoke func1 without any parameters (for its side-effect) and then invoke func2 with whatever parameters were passed, returning its result. c(|i|Sr r )r r func1func2s rr%zfirst_invoke..wrapperFs# ud%f%%%rr )rvrwr%s`` rrkrk?s)&&&&&& NrcdSr r r rrrrMsTrr c|tdkrtjnt|}|D]#} |cS#|$r |Y wxYw|S)z Given a callable func, trap the indicated exceptions for up to 'retries' times, invoking cleanup on the exception. On the final attempt, allow any exceptions to propagate. inf)rs itertoolscountrange)rcleanupretriestrapattemptsattempts r retry_callrMs%,uU||$;$;y   wH 466MMM    GIIIII  466Ms AAAcfd}|S)a7 Decorator wrapper for retry_call. Accepts arguments to retry_call except func and then returns a decorator for the decorated function. Ex: >>> @retry(retries=3) ... def my_func(a, b): ... "this is my funk" ... print(a, b) >>> my_func.__doc__ 'this is my funk' cLtjfd}|S)NcNtjg|Ri|}t|gRiSr )rrlr)f_argsf_kwargsrrr_argsr_kwargss rr%z(retry..decorate..wrappernsA%d@V@@@x@@Ee9f99999 9rrR)rr%rrs` rdecoratezretry..decoratemsC    : : : : : :   :rr )rrrs`` rretryr^s) Orctjtt}t t j||}tj||S)z Convert a generator into a function that prints all yielded elements >>> @print_yielded ... def x(): ... yield 3; yield None >>> x() 3 None )rrlmapprintrmore_itertoolsconsumer))r print_all print_resultss r print_yieldedrxsD!#u--IN2ItDDM 9?4  / //rcFtjfd}|S)z Wrap func so it's not called if its first param is None >>> print_text = pass_none(print) >>> print_text('text') text >>> print_text(None) c$| |g|Ri|SdSr r )paramr r rs rr%zpass_none..wrappers1  4////// /  rrRr+s` r pass_noners:_T00000 Nrctj|}|j}fd|D}t j|fi|S)a Assign parameters from namespace where func solicits. >>> def func(x, y=3): ... print(x, y) >>> assigned = assign_params(func, dict(x=2, z=4)) >>> assigned() 2 3 The usual errors are raised if a function doesn't receive its required parameters: >>> assigned = assign_params(func, dict(y=3, z=4)) >>> assigned() Traceback (most recent call last): TypeError: func() ...argument... It even works on methods: >>> class Handler: ... def meth(self, arg): ... print(arg) >>> assign_params(Handler().meth, dict(arg='crystal', foo='clear'))() crystal c*i|]}|v||Sr r ).0k namespaces r z!assign_params..s$AAA1!y..q)A,...r)inspect signature parameterskeysrrl)rrsigparamscall_nss ` r assign_paramsrsZ4  D ! !C ^ " "FAAAAAAAG  T - -W - --rcttjddtjfd}|S)a& Wrap a method such that when it is called, the args and kwargs are saved on the method. >>> class MyClass: ... @save_method_args ... def method(self, a, b): ... print(a, b) >>> my_ob = MyClass() >>> my_ob.method(1, 2) 1 2 >>> my_ob._saved_method.args (1, 2) >>> my_ob._saved_method.kwargs {} >>> my_ob.method(a=3, b='foo') 3 foo >>> my_ob._saved_method.args () >>> my_ob._saved_method.kwargs == dict(a=3, b='foo') True The arguments are stored on the instance, allowing for different instance to save different args. >>> your_ob = MyClass() >>> your_ob.method({str('x'): 3}, b=[4]) {'x': 3} [4] >>> your_ob._saved_method.args ({'x': 3},) >>> my_ob._saved_method.args () args_and_kwargsz args kwargscjdjz}||}t||||g|Ri|S)N_saved_)r6r5)r1r r attr_nameattrrr-s rr%z!save_method_args..wrappersR/ tV,,i&&&vd,T,,,V,,,r) collections namedtuplerr))r-r%rs` @rsave_method_argsrsTD",-> NNO_V------ Nr)replaceusecfd}|S)a- Replace the indicated exceptions, if raised, with the indicated literal replacement or evaluated expression (if present). >>> safe_int = except_(ValueError)(int) >>> safe_int('five') >>> safe_int('5') 5 Specify a literal replacement with ``replace``. >>> safe_int_r = except_(ValueError, replace=0)(int) >>> safe_int_r('five') 0 Provide an expression to ``use`` to pass through particular parameters. >>> safe_int_pt = except_(ValueError, use='args[0]')(int) >>> safe_int_pt('five') 'five' cNtjfd}|S)Nct |i|S#$r' tcYS#t$rcYcYSwxYwwxYwr )eval TypeError)r r exceptionsrrrs rr%z*except_..decorate..wrappersw #tT,V,,, # # ##99$$$ ###"NNNNN# #s  7"7 3737rR)rr%rrrs` rrzexcept_..decoratesH    # # # # # # #   #rr )rrrrs``` rexcept_rs/0        Or)rrerrr3r{#pkg_resources.extern.more_itertools pkg_resourcestypingrrr:rrrr, lru_cacher=r<rLrSrVrXrkrrrrrrrr rrrs!  ****$$$$$$$$ GKxV '< = = = 0000$'''\   WW W  YW  WWWWt<*8   (KKKKKKKK<   *\12"4 0 0 0 $...@+++\"&4%%%%%%%rPK|5ZSl$$RLib/site-packages/pkg_resources/_vendor/jaraco/__pycache__/context.cpython-311.pycnuW+A ^;d,NddlZddlZddlZddlZddlZddlZddlZejdZejddefdZ dZ ejej fdZ ejdde fdZ ejdZGd d ZGd d ejejZdS) Nc#Ktj}tj| |Vtj|dS#tj|wxYwN)osgetcwdchdir)dirorigs sE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/jaraco/context.pypushdr sO 9;;DHSMMM  s AAc #K|Gtj|dddd}| t jt jd}|djd it d}d }d ||f}||jd d t|it||5|Vdddn #1swxYwY|d jd itdS#|d jd itwxYw)z Get a tarball, extract it, change to that directory, yield, then clean up. `runner` is the function to invoke commands. `pushd` is a context manager for changing the directory. Nz.tar.gzz.tgzT)shellzmkdir {target_dir}zwget {url} -O -z7tar x{compression} --strip-components=1 -C {target_dir}z | compressionzrm -Rf {target_dir}) rpathbasenamereplace functoolspartial subprocess check_callformatvarsjoininfer_compression)url target_dirrunnerr getterextractcmds r tarball_contextr"sW%%c**229bAAII&RTUU  ~":#8EEE  F &  & 0 0 0 01117"Kjj&'*++zszGG&7&<&<GGGHHH U:                       +$+55dff5566666+$+55dff556666s1AD((C9- D(9C==D(C=D(($E cf|dd}tddd}||dS)zF Given a URL or filename, infer the compression code for tar. NzjJ)gzbzxz)dictget)rcompression_indicatormappings r rr0s;  Hccc***G ;;,c 2 22c#pKtj} |V||dS#||wxYw)zk Create a temporary directory context. Pass a custom remover to override the removal behavior. N)tempfilemkdtemp)removertemp_dirs r r4r4;sP !!Hs( 5Tc#Kd|vrdnd}|5}|d||g}|r|d|gttjjd}|r|nd}t j|||VddddS#1swxYwYdS)z Check out the repo indicated by url. If dest_ctx is supplied, it should be a context manager to yield the target directory for the check out. githgclonez--branchwN)stdout)extendopenrrdevnullrr) rbranchquietdest_ctxexerepo_dirr!r=r:s r repo_contextrCHsC<<%%TC xGS(+  - JJ F+ , , ,rw,,!+tc&1111sABBBc#KdVdSrrrr/r nullrE[s EEEEEr/ceZdZdZdZeffdZdZedZ edZ edZ dZ d Z ed d Zd Zd S) ExceptionTrapaG A context manager that will catch certain exceptions and provide an indication they occurred. >>> with ExceptionTrap() as trap: ... raise Exception() >>> bool(trap) True >>> with ExceptionTrap() as trap: ... pass >>> bool(trap) False >>> with ExceptionTrap(ValueError) as trap: ... raise ValueError("1 + 1 is not 3") >>> bool(trap) True >>> with ExceptionTrap(ValueError) as trap: ... raise Exception() Traceback (most recent call last): ... Exception >>> bool(trap) False )NNNc||_dSr) exceptions)selfrIs r __init__zExceptionTrap.__init__s $r/c|SrrrJs r __enter__zExceptionTrap.__enter__s r/c|jdSNrexc_inforMs r typezExceptionTrap.type}Qr/c|jdS)NrQrMs r valuezExceptionTrap.valuerTr/c|jdS)NrQrMs r tbzExceptionTrap.tbrTr/cV|d}|ot||j}|r||_|SrP) issubclassrIrR)rJrRrSmatchess r __exit__zExceptionTrap.__exit__s5{<:dDO<<  %$DMr/c*t|jSr)boolrSrMs r __bool__zExceptionTrap.__bool__sDIr/_testcNtjfd}|S)a Wrap func and replace the result with the truth value of the trap (True if an exception occurred). First, give the decorator an alias to support Python 3.8 Syntax. >>> raises = ExceptionTrap(ValueError).raises Now decorate a function that always fails. >>> @raises ... def fail(): ... raise ValueError('failed') >>> fail() True ctj5}|i|dddn #1swxYwY|Sr)rGrI)argskwargstraprcfuncrJs r wrapperz%ExceptionTrap.raises..wrapperst// &4d%f%%% & & & & & & & & & & & & & & &5;; s +//)rwraps)rJrircrjs``` r raiseszExceptionTrap.raisessF&             r/cD||tjS)a Wrap func and replace the result with the truth value of the trap (True if no exception). First, give the decorator an alias to support Python 3.8 Syntax. >>> passes = ExceptionTrap(ValueError).passes Now decorate a function that always fails. >>> @passes ... def fail(): ... raise ValueError('failed') >>> fail() False rb)rloperatornot_)rJris r passeszExceptionTrap.passess&{{4x}{555r/N)__name__ __module__ __qualname____doc__rR ExceptionrKrNpropertyrSrWrZr^rar`rlrprr/r rGrG`s: H#,,%%%%  X   X   X %)666666r/rGceZdZdZdS)suppressz A version of contextlib.suppress with decorator support. >>> @suppress(KeyError) ... def key_error(): ... {}[''] >>> key_error() N)rqrrrsrtrr/r rxrxsr/rx)rr contextlibrr1shutilrncontextmanagerr r"rrmtreer4rCrErGrxContextDecoratorrr/r r~s    $(U77776333 ]     !$    j6j6j6j6j6j6j6j6Zz"J$?r/PK|5ZHhhXLib/site-packages/pkg_resources/_vendor/jaraco/text/__pycache__/__init__.cpython-311.pycnuW+A ^;d<ddlZddlZddlZddlZ ddlmZn#e$r ddlmZYnwxYwddlm Z m Z ddl m Z dZ dZGddeZe eZejd Zd Zd Zd Zd ZGddeZd!dZGddeZejZdZ GddeZ!GddZ"dZ#dZ$dZ%dZ&ej'dZ(e()edZ*dZ+d Z,dS)"N)files)compose method_cache) ExceptionTrapcfdS)zH Return a function that will perform a substitution on a string c0|SNreplace)snewolds yE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/jaraco/text/__init__.pyzsubstitution..sQYYsC(()rr s``r substitutionrs ) ( ( ( ((rctjt|}tt |}t |S)z Take a sequence of pairs specifying substitutions, and create a function that performs those substitutions. >>> multi_substitution(('foo', 'bar'), ('bar', 'baz'))('foo') 'baz' ) itertoolsstarmaprreversedtupler) substitutionss rmulti_substitutionrs8%lMBBMU=1122M M ""rcneZdZdZdZdZdZdZdZfdZ dZ e fd Z d Z dd ZxZS) FoldedCasea A case insensitive string class; behaves just like str except compares equal when the only variation is case. >>> s = FoldedCase('hello world') >>> s == 'Hello World' True >>> 'Hello World' == s True >>> s != 'Hello World' False >>> s.index('O') 4 >>> s.split('O') ['hell', ' w', 'rld'] >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta'])) ['alpha', 'Beta', 'GAMMA'] Sequence membership is straightforward. >>> "Hello World" in [s] True >>> s in ["Hello World"] True You may test for set inclusion, but candidate and elements must both be folded. >>> FoldedCase("Hello World") in {s} True >>> s in {FoldedCase("Hello World")} True String inclusion works as long as the FoldedCase object is on the right. >>> "hello" in FoldedCase("Hello World") True But not if the FoldedCase object is on the left: >>> FoldedCase('hello') in 'Hello World' False In that case, use ``in_``: >>> FoldedCase('hello').in_('Hello World') True >>> FoldedCase('hello') > FoldedCase('Hello') False cV||kSr lowerselfothers r__lt__zFoldedCase.__lt__azz||ekkmm++rcV||kSr rr s r__gt__zFoldedCase.__gt__dr$rcV||kSr rr s r__eq__zFoldedCase.__eq__gzz||u{{}},,rcV||kSr rr s r__ne__zFoldedCase.__ne__jr)rcDt|Sr )hashrr!s r__hash__zFoldedCase.__hash__msDJJLL!!!rct|Sr )superr __contains__)r!r" __class__s rr2zFoldedCase.__contains__ps+ww}}++EKKMM:::rc$|t|vS)zDoes self appear in other?)rr s rin_zFoldedCase.in_ssz%((((rcDtSr )r1r)r!r3s rrzFoldedCase.lowerxsww}}rct||Sr )rindex)r!subs rr8zFoldedCase.index|s&zz||!!#))++...r rctjtj|tj}|||Sr )recompileescapeIsplit)r!splittermaxsplitpatterns rr@zFoldedCase.splits3*RYx00"$77}}T8,,,r)r:r)__name__ __module__ __qualname____doc__r#r&r(r+r/r2r5rrr8r@ __classcell__r3s@rrr%s99v,,,,,,------""";;;;;))) \///--------rrc.|dS)z Return True if the supplied value is decodable (using the default encoding). >>> is_decodable(b'\xff') False >>> is_decodable(b'\x32') True N)decodevalues r is_decodablerNs LLNNNNNrcLt|tot| S)z Return True if the value appears to be binary (that is, it's a byte string and isn't decodable). >>> is_binary(b'\xff') True >>> is_binary('\xff') False ) isinstancebytesrNrLs r is_binaryrRs$ eU # # ?L,?,?(??rcNtj|S)z Trim something like a docstring to remove the whitespace that is common due to indentation and formatting. >>> trim("\n\tfoo = bar\n\t\tbar = baz\n") 'foo = bar\n\tbar = baz' )textwrapdedentstrip)r s rtrimrWs  ?1   # # % %%rcl|}d|D}d|S)a  Wrap lines of text, retaining existing newlines as paragraph markers. >>> print(wrap(lorem_ipsum)) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst. c3dK|]+}dtj|V,dS) N)joinrTwrap.0paras r zwrap..s8EE$tyyt,,--EEEEEErz ) splitlinesr[)r paragraphswrappeds rr\r\s68JEE*EEEG ;;w  rcntjd|}d|D}d|S)ad Given a multi-line string, return an unwrapped version. >>> wrapped = wrap(lorem_ipsum) >>> wrapped.count('\n') 20 >>> unwrapped = unwrap(wrapped) >>> unwrapped.count('\n') 1 >>> print(unwrapped) Lorem ipsum dolor sit amet, consectetur adipiscing ... Curabitur pretium tincidunt lacus. Nulla gravida orci ... z\n\n+c3BK|]}|ddVdS)rZr:Nr r]s rr`zunwrap..s0>>4t||D#&&>>>>>>rrZ)r<r@r[)r rbcleaneds runwraprgs:(A&&J>>:>>>G 99W  rceZdZdZdZdZdS)Splitterzobject that will split a string with the given arguments for each call >>> s = Splitter(',') >>> s('hello, world, this is your, master calling') ['hello', ' world', ' this is your', ' master calling'] c||_dSr )args)r!rks r__init__zSplitter.__init__s  rc |j|jSr )r@rk)r!r s r__call__zSplitter.__call__sqw ""rN)rDrErFrGrlrnrrrriris<#####rri c ||zS)z) >>> indent('foo') ' foo' r)stringprefixs rindentrss F?rceZdZdZejdZdZdZdZ dZ dZ dZ d Z d Zd Zd Zfd ZedZedZxZS)WordSeta Given an identifier, return the words that identifier represents, whether in camel case, underscore-separated, etc. >>> WordSet.parse("camelCase") ('camel', 'Case') >>> WordSet.parse("under_sep") ('under', 'sep') Acronyms should be retained >>> WordSet.parse("firstSNL") ('first', 'SNL') >>> WordSet.parse("you_and_I") ('you', 'and', 'I') >>> WordSet.parse("A simple test") ('A', 'simple', 'test') Multiple caps should not interfere with the first cap of another word. >>> WordSet.parse("myABCClass") ('my', 'ABC', 'Class') The result is a WordSet, so you can get the form you need. >>> WordSet.parse("myABCClass").underscore_separated() 'my_ABC_Class' >>> WordSet.parse('a-command').camel_case() 'ACommand' >>> WordSet.parse('someIdentifier').lowered().space_separated() 'some identifier' Slices of the result should return another WordSet. >>> WordSet.parse('taken-out-of-context')[1:].underscore_separated() 'out_of_context' >>> WordSet.from_class_name(WordSet()).lowered().space_separated() 'word set' >>> example = WordSet.parse('figured it out') >>> example.headless_camel_case() 'figuredItOut' >>> example.dash_separated() 'figured-it-out' z ([A-Z]?[a-z]+)|([A-Z]+(?![a-z]))c4td|DS)Nc3>K|]}|VdSr ) capitalizer^words rr`z&WordSet.capitalized..5s,::Tt((::::::rrur.s r capitalizedzWordSet.capitalized4s::T::::::rc4td|DS)Nc3>K|]}|VdSr rrys rr`z"WordSet.lowered..8s*55tzz||555555rr{r.s rloweredzWordSet.lowered7s55555555rcPd|SN)r[r|r.s r camel_casezWordSet.camel_case:s wwt''))***rct|}t|}tj|ft |}d|Sr)iternextrrchainrurr[)r!wordsfirst new_wordss rheadless_camel_casezWordSet.headless_camel_case=s[T U !!##OUHgenn.G.G.I.IJJ wwy!!!rc,d|S)N_r[r.s runderscore_separatedzWordSet.underscore_separatedCxx~~rc,d|S)N-rr.s rdash_separatedzWordSet.dash_separatedFrrc,d|S)Nr:rr.s rspace_separatedzWordSet.space_separatedIrrc6|r|d|kr |ddn|S)a  Remove the item from the end of the set. >>> WordSet.parse('foo bar').trim_right('foo') ('foo', 'bar') >>> WordSet.parse('foo bar').trim_right('bar') ('foo',) >>> WordSet.parse('').trim_right('bar') () Nrr!items r trim_rightzWordSet.trim_rightLs)!?T"X%5%5tCRCyy4?rc6|r|d|kr |ddn|S)a Remove the item from the beginning of the set. >>> WordSet.parse('foo bar').trim_left('foo') ('bar',) >>> WordSet.parse('foo bar').trim_left('bar') ('foo', 'bar') >>> WordSet.parse('').trim_left('bar') () rNrrs r trim_leftzWordSet.trim_leftYs' =DGtOOtABBxx=rcR|||S)zK >>> WordSet.parse('foo bar').trim('foo') ('bar',) )rrrs rrWz WordSet.trimfs$ ~~d##..t444rctt||}t|trt|}|Sr )r1ru __getitem__rPslice)r!rresultr3s rrzWordSet.__getitem__msBw%%11$77 dE " " %V__F rch|j|}td|DS)Nc3@K|]}|dVdS)rNgroupr^matchs rr`z WordSet.parse..vs,;;%u{{1~~;;;;;;r)_patternfinditerru)cls identifiermatchess rparsez WordSet.parsess4,'' 33;;7;;;;;;rc@||jjSr )rr3rD)rsubjects rfrom_class_namezWordSet.from_class_namexsyy*3444r)rDrErFrGr<r=rr|rrrrrrrrrWr classmethodrrrHrIs@rrurus&33jrz<==H;;;666+++"""  @ @ @ > > >555 <<[<55[55555rructjdtj}d||D}d|S)a Remove HTML from the string `s`. >>> str(simple_html_strip('')) '' >>> print(simple_html_strip('A stormy day in paradise')) A stormy day in paradise >>> print(simple_html_strip('Somebody tell the truth.')) Somebody tell the truth. >>> print(simple_html_strip('What about
\nmultiple lines?')) What about multiple lines? z()|(<[^>]*>)|([^<]+)c3DK|]}|dpdVdS)rNrrs rr`z$simple_html_strip..s1 I IeU[[^^ !r I I I I I Irr)r<r=DOTALLrr[)r html_strippertextss rsimple_html_striprsI"J?KKM I I}/E/Ea/H/H I I IE 775>>rceZdZdZdZdZdS)SeparatedValuesa A string separated by a separator. Overrides __iter__ for getting the values. >>> list(SeparatedValues('a,b,c')) ['a', 'b', 'c'] Whitespace is stripped and empty values are discarded. >>> list(SeparatedValues(' a, b , c, ')) ['a', 'b', 'c'] ,cj||j}tdd|DS)Nc3>K|]}|VdSr )rV)r^parts rr`z+SeparatedValues.__iter__..s*<**d<>>>>rrcJeZdZdZdZedZdZedZ dS)Strippera& Given a series of lines, find the common prefix and strip it from them. >>> lines = [ ... 'abcdefg\n', ... 'abc\n', ... 'abcde\n', ... ] >>> res = Stripper.strip_prefix(lines) >>> res.prefix 'abc' >>> list(res.lines) ['defg\n', '\n', 'de\n'] If no prefix is common, nothing should be stripped. >>> lines = [ ... 'abcd\n', ... '1234\n', ... ] >>> res = Stripper.strip_prefix(lines) >>> res.prefix = '' >>> list(res.lines) ['abcd\n', '1234\n'] c>||_t|||_dSr )rrmaplines)r!rrrs rrlzStripper.__init__s u%% rc|tj|\}}tj|j|}|||Sr )rtee functoolsreduce common_prefix)rr prefix_linesrrs r strip_prefixzStripper.strip_prefixs='mE22 e!#"3\BBs65!!!rcT|js|S||j\}}}|Sr )rr partition)r!linenullrrrests rrnzStripper.__call__s0{ K!^^DK88fd rctt|t|}|d||d|kr|dz}|d||d|k|d|S)z8 Return the common prefix of two lines. Nr)minlen)s1s2r8s rrzStripper.common_prefixsn CGGSWW%%%jBvvJ&& QJE%jBvvJ&&&5&zrN) rDrErFrGrlrrrn staticmethodrrrrrrsr4&&&""["  \rrc8||\}}}|S)z Remove the prefix from the text if it exists. >>> remove_prefix('underwhelming performance', 'underwhelming ') 'performance' >>> remove_prefix('something special', 'sample') 'something special' ) rpartition)textrrrrs r remove_prefixrs!00D&$ Krc8||\}}}|S)z Remove the suffix from the text if it exists. >>> remove_suffix('name.git', '.git') 'name' >>> remove_suffix('something special', 'sample') 'something special' r)rsuffixrrs r remove_suffixrs!//D&$ Krc`gd}d|}tj|d|S)a  Replace alternate newlines with the canonical newline. >>> normalize_newlines('Lorem Ipsum\u2029') 'Lorem Ipsum\n' >>> normalize_newlines('Lorem Ipsum\r\n') 'Lorem Ipsum\n' >>> normalize_newlines('Lorem Ipsum\x85') 'Lorem Ipsum\n' )z  rZ…u
u
|rZ)r[r<r9)rnewlinesrCs rnormalize_newlinesrs5BAAHhhx  G 6'4 & &&rc2|o|d S)N#) startswith)strs r _nonblankrs  *s~~c****rcftjtt|S)a Yield valid lines of a string or iterable. >>> list(yield_lines('')) [] >>> list(yield_lines(['foo', 'bar'])) ['foo', 'bar'] >>> list(yield_lines('foo\nbar')) ['foo', 'bar'] >>> list(yield_lines('\nfoo\n#bar\nbaz #comment')) ['foo', 'baz #comment'] >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n'])) ['foo', 'bar', 'baz', 'bing'] )rr from_iterabler yield_lines)iterables rrrs$ ? ( ([()C)C D DDrcttttj|Sr )rrrrrVra)rs rrr%s( )SDOO,=,=>> ? ??rc8|ddS)z Drop comments. >>> drop_comment('foo # bar') 'foo' A hash without a space may be in a URL. >>> drop_comment('http://example.com/foo#bar') 'http://example.com/foo#bar' z #rr)rs r drop_commentr*s >>$   ""rc#Kt|}|D]p}|drU |ddt|z}n#t$rYdSwxYw|dU|VqdS)a_ Join lines continued by a trailing backslash. >>> list(join_continuation(['foo \\', 'bar', 'baz'])) ['foobar', 'baz'] >>> list(join_continuation(['foo \\', 'bar', 'baz'])) ['foobar', 'baz'] >>> list(join_continuation(['foo \\', 'bar \\', 'baz'])) ['foobarbaz'] Not sure why, but... The character preceeding the backslash is also elided. >>> list(join_continuation(['goo\\', 'dly'])) ['godly'] A terrible idea, but... If no line is available to continue, suppress the lines. >>> list(join_continuation(['foo', 'bar\\', 'baz\\'])) ['foo'] \N)rendswithrVr StopIteration)rrs rjoin_continuationr9s. KKEmmD!!  CRCy((4;;6     mmD!!   s,A A('A()ro)-r<rrTrimportlib.resourcesr ImportError(pkg_resources.extern.importlib_resources%pkg_resources.extern.jaraco.functoolsrr#pkg_resources.extern.jaraco.contextrrrrrUnicodeDecodeError _unicode_trappassesrNrRrWr\rgobjectrirsrrurrrrrrrrrsingledispatchrregisterrrrrrrrs ?)))))))???>>>>>>>>?HGGGGGGG======))) # # #\-\-\-\-\-\-\-\-@ 011     @ @ @&&&   B, # # # # #v # # #~5~5~5~5~5e~5~5~5D  ,>>>>>c>>>*33333333l       ' ' ' +++ EEE$ c@@@ # # #s  ''PK|5Z.ɦ<<?Lib/site-packages/pkg_resources/_vendor/jaraco/text/__init__.pynuW+Aimport re import itertools import textwrap import functools try: from importlib.resources import files # type: ignore except ImportError: # pragma: nocover from pkg_resources.extern.importlib_resources import files # type: ignore from pkg_resources.extern.jaraco.functools import compose, method_cache from pkg_resources.extern.jaraco.context import ExceptionTrap def substitution(old, new): """ Return a function that will perform a substitution on a string """ return lambda s: s.replace(old, new) def multi_substitution(*substitutions): """ Take a sequence of pairs specifying substitutions, and create a function that performs those substitutions. >>> multi_substitution(('foo', 'bar'), ('bar', 'baz'))('foo') 'baz' """ substitutions = itertools.starmap(substitution, substitutions) # compose function applies last function first, so reverse the # substitutions to get the expected order. substitutions = reversed(tuple(substitutions)) return compose(*substitutions) class FoldedCase(str): """ A case insensitive string class; behaves just like str except compares equal when the only variation is case. >>> s = FoldedCase('hello world') >>> s == 'Hello World' True >>> 'Hello World' == s True >>> s != 'Hello World' False >>> s.index('O') 4 >>> s.split('O') ['hell', ' w', 'rld'] >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta'])) ['alpha', 'Beta', 'GAMMA'] Sequence membership is straightforward. >>> "Hello World" in [s] True >>> s in ["Hello World"] True You may test for set inclusion, but candidate and elements must both be folded. >>> FoldedCase("Hello World") in {s} True >>> s in {FoldedCase("Hello World")} True String inclusion works as long as the FoldedCase object is on the right. >>> "hello" in FoldedCase("Hello World") True But not if the FoldedCase object is on the left: >>> FoldedCase('hello') in 'Hello World' False In that case, use ``in_``: >>> FoldedCase('hello').in_('Hello World') True >>> FoldedCase('hello') > FoldedCase('Hello') False """ def __lt__(self, other): return self.lower() < other.lower() def __gt__(self, other): return self.lower() > other.lower() def __eq__(self, other): return self.lower() == other.lower() def __ne__(self, other): return self.lower() != other.lower() def __hash__(self): return hash(self.lower()) def __contains__(self, other): return super().lower().__contains__(other.lower()) def in_(self, other): "Does self appear in other?" return self in FoldedCase(other) # cache lower since it's likely to be called frequently. @method_cache def lower(self): return super().lower() def index(self, sub): return self.lower().index(sub.lower()) def split(self, splitter=' ', maxsplit=0): pattern = re.compile(re.escape(splitter), re.I) return pattern.split(self, maxsplit) # Python 3.8 compatibility _unicode_trap = ExceptionTrap(UnicodeDecodeError) @_unicode_trap.passes def is_decodable(value): r""" Return True if the supplied value is decodable (using the default encoding). >>> is_decodable(b'\xff') False >>> is_decodable(b'\x32') True """ value.decode() def is_binary(value): r""" Return True if the value appears to be binary (that is, it's a byte string and isn't decodable). >>> is_binary(b'\xff') True >>> is_binary('\xff') False """ return isinstance(value, bytes) and not is_decodable(value) def trim(s): r""" Trim something like a docstring to remove the whitespace that is common due to indentation and formatting. >>> trim("\n\tfoo = bar\n\t\tbar = baz\n") 'foo = bar\n\tbar = baz' """ return textwrap.dedent(s).strip() def wrap(s): """ Wrap lines of text, retaining existing newlines as paragraph markers. >>> print(wrap(lorem_ipsum)) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst. """ paragraphs = s.splitlines() wrapped = ('\n'.join(textwrap.wrap(para)) for para in paragraphs) return '\n\n'.join(wrapped) def unwrap(s): r""" Given a multi-line string, return an unwrapped version. >>> wrapped = wrap(lorem_ipsum) >>> wrapped.count('\n') 20 >>> unwrapped = unwrap(wrapped) >>> unwrapped.count('\n') 1 >>> print(unwrapped) Lorem ipsum dolor sit amet, consectetur adipiscing ... Curabitur pretium tincidunt lacus. Nulla gravida orci ... """ paragraphs = re.split(r'\n\n+', s) cleaned = (para.replace('\n', ' ') for para in paragraphs) return '\n'.join(cleaned) class Splitter(object): """object that will split a string with the given arguments for each call >>> s = Splitter(',') >>> s('hello, world, this is your, master calling') ['hello', ' world', ' this is your', ' master calling'] """ def __init__(self, *args): self.args = args def __call__(self, s): return s.split(*self.args) def indent(string, prefix=' ' * 4): """ >>> indent('foo') ' foo' """ return prefix + string class WordSet(tuple): """ Given an identifier, return the words that identifier represents, whether in camel case, underscore-separated, etc. >>> WordSet.parse("camelCase") ('camel', 'Case') >>> WordSet.parse("under_sep") ('under', 'sep') Acronyms should be retained >>> WordSet.parse("firstSNL") ('first', 'SNL') >>> WordSet.parse("you_and_I") ('you', 'and', 'I') >>> WordSet.parse("A simple test") ('A', 'simple', 'test') Multiple caps should not interfere with the first cap of another word. >>> WordSet.parse("myABCClass") ('my', 'ABC', 'Class') The result is a WordSet, so you can get the form you need. >>> WordSet.parse("myABCClass").underscore_separated() 'my_ABC_Class' >>> WordSet.parse('a-command').camel_case() 'ACommand' >>> WordSet.parse('someIdentifier').lowered().space_separated() 'some identifier' Slices of the result should return another WordSet. >>> WordSet.parse('taken-out-of-context')[1:].underscore_separated() 'out_of_context' >>> WordSet.from_class_name(WordSet()).lowered().space_separated() 'word set' >>> example = WordSet.parse('figured it out') >>> example.headless_camel_case() 'figuredItOut' >>> example.dash_separated() 'figured-it-out' """ _pattern = re.compile('([A-Z]?[a-z]+)|([A-Z]+(?![a-z]))') def capitalized(self): return WordSet(word.capitalize() for word in self) def lowered(self): return WordSet(word.lower() for word in self) def camel_case(self): return ''.join(self.capitalized()) def headless_camel_case(self): words = iter(self) first = next(words).lower() new_words = itertools.chain((first,), WordSet(words).camel_case()) return ''.join(new_words) def underscore_separated(self): return '_'.join(self) def dash_separated(self): return '-'.join(self) def space_separated(self): return ' '.join(self) def trim_right(self, item): """ Remove the item from the end of the set. >>> WordSet.parse('foo bar').trim_right('foo') ('foo', 'bar') >>> WordSet.parse('foo bar').trim_right('bar') ('foo',) >>> WordSet.parse('').trim_right('bar') () """ return self[:-1] if self and self[-1] == item else self def trim_left(self, item): """ Remove the item from the beginning of the set. >>> WordSet.parse('foo bar').trim_left('foo') ('bar',) >>> WordSet.parse('foo bar').trim_left('bar') ('foo', 'bar') >>> WordSet.parse('').trim_left('bar') () """ return self[1:] if self and self[0] == item else self def trim(self, item): """ >>> WordSet.parse('foo bar').trim('foo') ('bar',) """ return self.trim_left(item).trim_right(item) def __getitem__(self, item): result = super(WordSet, self).__getitem__(item) if isinstance(item, slice): result = WordSet(result) return result @classmethod def parse(cls, identifier): matches = cls._pattern.finditer(identifier) return WordSet(match.group(0) for match in matches) @classmethod def from_class_name(cls, subject): return cls.parse(subject.__class__.__name__) # for backward compatibility words = WordSet.parse def simple_html_strip(s): r""" Remove HTML from the string `s`. >>> str(simple_html_strip('')) '' >>> print(simple_html_strip('A stormy day in paradise')) A stormy day in paradise >>> print(simple_html_strip('Somebody tell the truth.')) Somebody tell the truth. >>> print(simple_html_strip('What about
\nmultiple lines?')) What about multiple lines? """ html_stripper = re.compile('()|(<[^>]*>)|([^<]+)', re.DOTALL) texts = (match.group(3) or '' for match in html_stripper.finditer(s)) return ''.join(texts) class SeparatedValues(str): """ A string separated by a separator. Overrides __iter__ for getting the values. >>> list(SeparatedValues('a,b,c')) ['a', 'b', 'c'] Whitespace is stripped and empty values are discarded. >>> list(SeparatedValues(' a, b , c, ')) ['a', 'b', 'c'] """ separator = ',' def __iter__(self): parts = self.split(self.separator) return filter(None, (part.strip() for part in parts)) class Stripper: r""" Given a series of lines, find the common prefix and strip it from them. >>> lines = [ ... 'abcdefg\n', ... 'abc\n', ... 'abcde\n', ... ] >>> res = Stripper.strip_prefix(lines) >>> res.prefix 'abc' >>> list(res.lines) ['defg\n', '\n', 'de\n'] If no prefix is common, nothing should be stripped. >>> lines = [ ... 'abcd\n', ... '1234\n', ... ] >>> res = Stripper.strip_prefix(lines) >>> res.prefix = '' >>> list(res.lines) ['abcd\n', '1234\n'] """ def __init__(self, prefix, lines): self.prefix = prefix self.lines = map(self, lines) @classmethod def strip_prefix(cls, lines): prefix_lines, lines = itertools.tee(lines) prefix = functools.reduce(cls.common_prefix, prefix_lines) return cls(prefix, lines) def __call__(self, line): if not self.prefix: return line null, prefix, rest = line.partition(self.prefix) return rest @staticmethod def common_prefix(s1, s2): """ Return the common prefix of two lines. """ index = min(len(s1), len(s2)) while s1[:index] != s2[:index]: index -= 1 return s1[:index] def remove_prefix(text, prefix): """ Remove the prefix from the text if it exists. >>> remove_prefix('underwhelming performance', 'underwhelming ') 'performance' >>> remove_prefix('something special', 'sample') 'something special' """ null, prefix, rest = text.rpartition(prefix) return rest def remove_suffix(text, suffix): """ Remove the suffix from the text if it exists. >>> remove_suffix('name.git', '.git') 'name' >>> remove_suffix('something special', 'sample') 'something special' """ rest, suffix, null = text.partition(suffix) return rest def normalize_newlines(text): r""" Replace alternate newlines with the canonical newline. >>> normalize_newlines('Lorem Ipsum\u2029') 'Lorem Ipsum\n' >>> normalize_newlines('Lorem Ipsum\r\n') 'Lorem Ipsum\n' >>> normalize_newlines('Lorem Ipsum\x85') 'Lorem Ipsum\n' """ newlines = ['\r\n', '\r', '\n', '\u0085', '\u2028', '\u2029'] pattern = '|'.join(newlines) return re.sub(pattern, '\n', text) def _nonblank(str): return str and not str.startswith('#') @functools.singledispatch def yield_lines(iterable): r""" Yield valid lines of a string or iterable. >>> list(yield_lines('')) [] >>> list(yield_lines(['foo', 'bar'])) ['foo', 'bar'] >>> list(yield_lines('foo\nbar')) ['foo', 'bar'] >>> list(yield_lines('\nfoo\n#bar\nbaz #comment')) ['foo', 'baz #comment'] >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n'])) ['foo', 'bar', 'baz', 'bing'] """ return itertools.chain.from_iterable(map(yield_lines, iterable)) @yield_lines.register(str) def _(text): return filter(_nonblank, map(str.strip, text.splitlines())) def drop_comment(line): """ Drop comments. >>> drop_comment('foo # bar') 'foo' A hash without a space may be in a URL. >>> drop_comment('http://example.com/foo#bar') 'http://example.com/foo#bar' """ return line.partition(' #')[0] def join_continuation(lines): r""" Join lines continued by a trailing backslash. >>> list(join_continuation(['foo \\', 'bar', 'baz'])) ['foobar', 'baz'] >>> list(join_continuation(['foo \\', 'bar', 'baz'])) ['foobar', 'baz'] >>> list(join_continuation(['foo \\', 'bar \\', 'baz'])) ['foobarbaz'] Not sure why, but... The character preceeding the backslash is also elided. >>> list(join_continuation(['goo\\', 'dly'])) ['godly'] A terrible idea, but... If no line is available to continue, suppress the lines. >>> list(join_continuation(['foo', 'bar\\', 'baz\\'])) ['foo'] """ lines = iter(lines) for item in lines: while item.endswith('\\'): try: item = item[:-2].strip() + next(lines) except StopIteration: return yield item PK|5Z:Lib/site-packages/pkg_resources/_vendor/jaraco/__init__.pynuW+APK|5Zܱw44;Lib/site-packages/pkg_resources/_vendor/jaraco/functools.pynuW+Aimport functools import time import inspect import collections import types import itertools import pkg_resources.extern.more_itertools from typing import Callable, TypeVar CallableT = TypeVar("CallableT", bound=Callable[..., object]) def compose(*funcs): """ Compose any number of unary functions into a single unary function. >>> import textwrap >>> expected = str.strip(textwrap.dedent(compose.__doc__)) >>> strip_and_dedent = compose(str.strip, textwrap.dedent) >>> strip_and_dedent(compose.__doc__) == expected True Compose also allows the innermost function to take arbitrary arguments. >>> round_three = lambda x: round(x, ndigits=3) >>> f = compose(round_three, int.__truediv__) >>> [f(3*x, x+1) for x in range(1,10)] [1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7] """ def compose_two(f1, f2): return lambda *args, **kwargs: f1(f2(*args, **kwargs)) return functools.reduce(compose_two, funcs) def method_caller(method_name, *args, **kwargs): """ Return a function that will call a named method on the target object with optional positional and keyword arguments. >>> lower = method_caller('lower') >>> lower('MyString') 'mystring' """ def call_method(target): func = getattr(target, method_name) return func(*args, **kwargs) return call_method def once(func): """ Decorate func so it's only ever called the first time. This decorator can ensure that an expensive or non-idempotent function will not be expensive on subsequent calls and is idempotent. >>> add_three = once(lambda a: a+3) >>> add_three(3) 6 >>> add_three(9) 6 >>> add_three('12') 6 To reset the stored value, simply clear the property ``saved_result``. >>> del add_three.saved_result >>> add_three(9) 12 >>> add_three(8) 12 Or invoke 'reset()' on it. >>> add_three.reset() >>> add_three(-3) 0 >>> add_three(0) 0 """ @functools.wraps(func) def wrapper(*args, **kwargs): if not hasattr(wrapper, 'saved_result'): wrapper.saved_result = func(*args, **kwargs) return wrapper.saved_result wrapper.reset = lambda: vars(wrapper).__delitem__('saved_result') return wrapper def method_cache( method: CallableT, cache_wrapper: Callable[ [CallableT], CallableT ] = functools.lru_cache(), # type: ignore[assignment] ) -> CallableT: """ Wrap lru_cache to support storing the cache data in the object instances. Abstracts the common paradigm where the method explicitly saves an underscore-prefixed protected property on first call and returns that subsequently. >>> class MyClass: ... calls = 0 ... ... @method_cache ... def method(self, value): ... self.calls += 1 ... return value >>> a = MyClass() >>> a.method(3) 3 >>> for x in range(75): ... res = a.method(x) >>> a.calls 75 Note that the apparent behavior will be exactly like that of lru_cache except that the cache is stored on each instance, so values in one instance will not flush values from another, and when an instance is deleted, so are the cached values for that instance. >>> b = MyClass() >>> for x in range(35): ... res = b.method(x) >>> b.calls 35 >>> a.method(0) 0 >>> a.calls 75 Note that if method had been decorated with ``functools.lru_cache()``, a.calls would have been 76 (due to the cached value of 0 having been flushed by the 'b' instance). Clear the cache with ``.cache_clear()`` >>> a.method.cache_clear() Same for a method that hasn't yet been called. >>> c = MyClass() >>> c.method.cache_clear() Another cache wrapper may be supplied: >>> cache = functools.lru_cache(maxsize=2) >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache) >>> a = MyClass() >>> a.method2() 3 Caution - do not subsequently wrap the method with another decorator, such as ``@property``, which changes the semantics of the function. See also http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/ for another implementation and additional justification. """ def wrapper(self: object, *args: object, **kwargs: object) -> object: # it's the first call, replace the method with a cached, bound method bound_method: CallableT = types.MethodType( # type: ignore[assignment] method, self ) cached_method = cache_wrapper(bound_method) setattr(self, method.__name__, cached_method) return cached_method(*args, **kwargs) # Support cache clear even before cache has been created. wrapper.cache_clear = lambda: None # type: ignore[attr-defined] return ( # type: ignore[return-value] _special_method_cache(method, cache_wrapper) or wrapper ) def _special_method_cache(method, cache_wrapper): """ Because Python treats special methods differently, it's not possible to use instance attributes to implement the cached methods. Instead, install the wrapper method under a different name and return a simple proxy to that wrapper. https://github.com/jaraco/jaraco.functools/issues/5 """ name = method.__name__ special_names = '__getattr__', '__getitem__' if name not in special_names: return wrapper_name = '__cached' + name def proxy(self, *args, **kwargs): if wrapper_name not in vars(self): bound = types.MethodType(method, self) cache = cache_wrapper(bound) setattr(self, wrapper_name, cache) else: cache = getattr(self, wrapper_name) return cache(*args, **kwargs) return proxy def apply(transform): """ Decorate a function with a transform function that is invoked on results returned from the decorated function. >>> @apply(reversed) ... def get_numbers(start): ... "doc for get_numbers" ... return range(start, start+3) >>> list(get_numbers(4)) [6, 5, 4] >>> get_numbers.__doc__ 'doc for get_numbers' """ def wrap(func): return functools.wraps(func)(compose(transform, func)) return wrap def result_invoke(action): r""" Decorate a function with an action function that is invoked on the results returned from the decorated function (for its side-effect), then return the original result. >>> @result_invoke(print) ... def add_two(a, b): ... return a + b >>> x = add_two(2, 3) 5 >>> x 5 """ def wrap(func): @functools.wraps(func) def wrapper(*args, **kwargs): result = func(*args, **kwargs) action(result) return result return wrapper return wrap def call_aside(f, *args, **kwargs): """ Call a function for its side effect after initialization. >>> @call_aside ... def func(): print("called") called >>> func() called Use functools.partial to pass parameters to the initial call >>> @functools.partial(call_aside, name='bingo') ... def func(name): print("called with", name) called with bingo """ f(*args, **kwargs) return f class Throttler: """ Rate-limit a function (or other callable) """ def __init__(self, func, max_rate=float('Inf')): if isinstance(func, Throttler): func = func.func self.func = func self.max_rate = max_rate self.reset() def reset(self): self.last_called = 0 def __call__(self, *args, **kwargs): self._wait() return self.func(*args, **kwargs) def _wait(self): "ensure at least 1/max_rate seconds from last call" elapsed = time.time() - self.last_called must_wait = 1 / self.max_rate - elapsed time.sleep(max(0, must_wait)) self.last_called = time.time() def __get__(self, obj, type=None): return first_invoke(self._wait, functools.partial(self.func, obj)) def first_invoke(func1, func2): """ Return a function that when invoked will invoke func1 without any parameters (for its side-effect) and then invoke func2 with whatever parameters were passed, returning its result. """ def wrapper(*args, **kwargs): func1() return func2(*args, **kwargs) return wrapper def retry_call(func, cleanup=lambda: None, retries=0, trap=()): """ Given a callable func, trap the indicated exceptions for up to 'retries' times, invoking cleanup on the exception. On the final attempt, allow any exceptions to propagate. """ attempts = itertools.count() if retries == float('inf') else range(retries) for attempt in attempts: try: return func() except trap: cleanup() return func() def retry(*r_args, **r_kwargs): """ Decorator wrapper for retry_call. Accepts arguments to retry_call except func and then returns a decorator for the decorated function. Ex: >>> @retry(retries=3) ... def my_func(a, b): ... "this is my funk" ... print(a, b) >>> my_func.__doc__ 'this is my funk' """ def decorate(func): @functools.wraps(func) def wrapper(*f_args, **f_kwargs): bound = functools.partial(func, *f_args, **f_kwargs) return retry_call(bound, *r_args, **r_kwargs) return wrapper return decorate def print_yielded(func): """ Convert a generator into a function that prints all yielded elements >>> @print_yielded ... def x(): ... yield 3; yield None >>> x() 3 None """ print_all = functools.partial(map, print) print_results = compose(more_itertools.consume, print_all, func) return functools.wraps(func)(print_results) def pass_none(func): """ Wrap func so it's not called if its first param is None >>> print_text = pass_none(print) >>> print_text('text') text >>> print_text(None) """ @functools.wraps(func) def wrapper(param, *args, **kwargs): if param is not None: return func(param, *args, **kwargs) return wrapper def assign_params(func, namespace): """ Assign parameters from namespace where func solicits. >>> def func(x, y=3): ... print(x, y) >>> assigned = assign_params(func, dict(x=2, z=4)) >>> assigned() 2 3 The usual errors are raised if a function doesn't receive its required parameters: >>> assigned = assign_params(func, dict(y=3, z=4)) >>> assigned() Traceback (most recent call last): TypeError: func() ...argument... It even works on methods: >>> class Handler: ... def meth(self, arg): ... print(arg) >>> assign_params(Handler().meth, dict(arg='crystal', foo='clear'))() crystal """ sig = inspect.signature(func) params = sig.parameters.keys() call_ns = {k: namespace[k] for k in params if k in namespace} return functools.partial(func, **call_ns) def save_method_args(method): """ Wrap a method such that when it is called, the args and kwargs are saved on the method. >>> class MyClass: ... @save_method_args ... def method(self, a, b): ... print(a, b) >>> my_ob = MyClass() >>> my_ob.method(1, 2) 1 2 >>> my_ob._saved_method.args (1, 2) >>> my_ob._saved_method.kwargs {} >>> my_ob.method(a=3, b='foo') 3 foo >>> my_ob._saved_method.args () >>> my_ob._saved_method.kwargs == dict(a=3, b='foo') True The arguments are stored on the instance, allowing for different instance to save different args. >>> your_ob = MyClass() >>> your_ob.method({str('x'): 3}, b=[4]) {'x': 3} [4] >>> your_ob._saved_method.args ({'x': 3},) >>> my_ob._saved_method.args () """ args_and_kwargs = collections.namedtuple('args_and_kwargs', 'args kwargs') @functools.wraps(method) def wrapper(self, *args, **kwargs): attr_name = '_saved_' + method.__name__ attr = args_and_kwargs(args, kwargs) setattr(self, attr_name, attr) return method(self, *args, **kwargs) return wrapper def except_(*exceptions, replace=None, use=None): """ Replace the indicated exceptions, if raised, with the indicated literal replacement or evaluated expression (if present). >>> safe_int = except_(ValueError)(int) >>> safe_int('five') >>> safe_int('5') 5 Specify a literal replacement with ``replace``. >>> safe_int_r = except_(ValueError, replace=0)(int) >>> safe_int_r('five') 0 Provide an expression to ``use`` to pass through particular parameters. >>> safe_int_pt = except_(ValueError, use='args[0]')(int) >>> safe_int_pt('five') 'five' """ def decorate(func): @functools.wraps(func) def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except exceptions: try: return eval(use) except TypeError: return replace return wrapper return decorate PK|5ZcLLib/site-packages/pkg_resources/_vendor/__pycache__/__init__.cpython-311.pycnuW+A ^;ddS)NrmE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/__init__.pyrsrPK|5ZzssKLib/site-packages/pkg_resources/_vendor/__pycache__/appdirs.cpython-311.pycnuW+A ^;d}` JdZdZdeeeZddlZddlZejddkZ e reZ ej drRddl Z e j ddZe drdZn"e d rd Zn d Znej Zd)d Zd)dZd)dZd)dZd*dZd)dZd*dZGddeZdZdZdZdZedkr= ddlZeZn5#e $r- ddl!m"Z"eZn #e $r ddl#Z$eZn #e $reZYnwxYwYnwxYwYnwxYwe%dkrdZ&dZ'dZ(e)d eze)d!ee&e'd"#Z*e(D]Z+e)e+d$e,e*e+e)d%ee&e'Z*e(D]Z+e)e+d$e,e*e+e)d&ee&Z*e(D]Z+e)e+d$e,e*e+e)d'ee&d (Z*e(D]Z+e)e+d$e,e*e+dSdS)+zyUtilities for determining application-specific dirs. See for details and usage. ).NrjavaWindowswin32Macdarwinlinux2Fctdkr||}|rdpd}tjt |}|rF|dur"tj|||}ntj||}ntdkrBtjd}|r tj||}nTtjdtjd }|r tj||}|r"|r tj||}|S) aJReturn full path to the user-specific data dir for this application. "appname" is the name of application. If None, just the system directory is returned. "appauthor" (only used on Windows) is the name of the appauthor or distributing body for this application. Typically it is the owning company name. This falls back to appname. You may pass False to disable it. "version" is an optional version path element to append to the path. You might want to use this if you want multiple versions of your app to be able to run independently. If used, this would typically be ".". Only applied when appname is present. "roaming" (boolean, default False) can be set True to use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See for a discussion of issues. Typical user data directories are: Mac OS X: ~/Library/Application Support/ Unix: ~/.local/share/ # or in $XDG_DATA_HOME, if defined Win XP (not roaming): C:\Documents and Settings\\Application Data\\ Win XP (roaming): C:\Documents and Settings\\Local Settings\Application Data\\ Win 7 (not roaming): C:\Users\\AppData\Local\\ Win 7 (roaming): C:\Users\\AppData\Roaming\\ For Unix, we follow the XDG spec and support $XDG_DATA_HOME. That means, by default "~/.local/share/". r N CSIDL_APPDATACSIDL_LOCAL_APPDATAFr z~/Library/Application Support/ XDG_DATA_HOMEz~/.local/sharesystemospathnormpath_get_win_folderjoin expandusergetenv)appname appauthorversionroamingconstrs lE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/appdirs.py user_data_dirr -s1@  I+OD/Dw 6 677  3%%w||D)W==w||D'22 8  w!!"BCC  /7<<g..Dy"'*<*<=M*N*NOO  /7<<g..D+7+w||D'** Kcltdkr{|}tjt d}rG|dur#tj||}n*tj|}ntdkrBtjd}r tj|}ntjdtjdd g}d | tjD}r0|r tj|fd |D}|r tj|}n|d }|Sr"|r tj||}|S) aiReturn full path to the user-shared data dir for this application. "appname" is the name of application. If None, just the system directory is returned. "appauthor" (only used on Windows) is the name of the appauthor or distributing body for this application. Typically it is the owning company name. This falls back to appname. You may pass False to disable it. "version" is an optional version path element to append to the path. You might want to use this if you want multiple versions of your app to be able to run independently. If used, this would typically be ".". Only applied when appname is present. "multipath" is an optional parameter only applicable to *nix which indicates that the entire list of data dirs should be returned. By default, the first item from XDG_DATA_DIRS is returned, or '/usr/local/share/', if XDG_DATA_DIRS is not set Typical site data directories are: Mac OS X: /Library/Application Support/ Unix: /usr/local/share/ or /usr/share/ Win XP: C:\Documents and Settings\All Users\Application Data\\ Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) Win 7: C:\ProgramData\\ # Hidden, but writeable on Win 7. For Unix, this is using the $XDG_DATA_DIRS[0] default. WARNING: Do not use this on Windows. See the Vista-Fail note above for why. r NCSIDL_COMMON_APPDATAFr z/Library/Application Support XDG_DATA_DIRSz/usr/local/sharez /usr/sharecg|]>}tj|tj?Srrrrstripsep.0xs r z!site_data_dir..6YYYQBG&&qxx'7'788YYYr!cRg|]#}tj|g$Sr&rr)rr+r,rs rr-z!site_data_dir..+DDDa QL11DDDr!r) rrrrrrrrpathsepsplitrrr multipathrpathlists` r site_data_dirr8ds>  Iw0F G GHH  3%%w||D)W==w||D'22 8  w!!"@AA  /7<<g..Dy*.". Only applied when appname is present. "roaming" (boolean, default False) can be set True to use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See for a discussion of issues. Typical user config directories are: Mac OS X: same as user_data_dir Unix: ~/.config/ # or in $XDG_CONFIG_HOME, if defined Win *: same as user_data_dir For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME. That means, by default "~/.config/". r r NXDG_CONFIG_HOMEz ~/.configrr rrrrrrrrrrs ruser_config_dirr>s:$$$Wiw??y*BG,>,>{,K,KLL  /7<<g..D+7+w||D'** Kr!ctdvr5t|}r"|r tj||}ntjdd}d|tjD}r0|r tj|fd|D}|r tj|}n|d}|S)aReturn full path to the user-shared data dir for this application. "appname" is the name of application. If None, just the system directory is returned. "appauthor" (only used on Windows) is the name of the appauthor or distributing body for this application. Typically it is the owning company name. This falls back to appname. You may pass False to disable it. "version" is an optional version path element to append to the path. You might want to use this if you want multiple versions of your app to be able to run independently. If used, this would typically be ".". Only applied when appname is present. "multipath" is an optional parameter only applicable to *nix which indicates that the entire list of config dirs should be returned. By default, the first item from XDG_CONFIG_DIRS is returned, or '/etc/xdg/', if XDG_CONFIG_DIRS is not set Typical site config directories are: Mac OS X: same as site_data_dir Unix: /etc/xdg/ or $XDG_CONFIG_DIRS[i]/ for each value in $XDG_CONFIG_DIRS Win *: same as site_data_dir Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) For Unix, this is using the $XDG_CONFIG_DIRS[0] default, if multipath=False WARNING: Do not use this on Windows. See the Vista-Fail note above for why. r:XDG_CONFIG_DIRSz/etc/xdgcg|]>}tj|tj?Sr&r'r*s rr-z#site_config_dir..r.r!cRg|]#}tj|g$Sr&r0r1s rr-z#site_config_dir..r2r!r)rr8rrrrr4r3r5s` rsite_config_dirrCs<$$$Wi00  /w /7<<g..Dy*J77YY$**RZBXBXYYY  E 9',,w88DDDD8DDDH  :??8,,DDA;D Kr!Tctdkr||}tjt d}|rh|dur"tj|||}n tj||}|r tj|d}ntdkrBtjd}|r tj||}nTtjdtjd }|r tj||}|r"|r tj||}|S) aReturn full path to the user-specific cache dir for this application. "appname" is the name of application. If None, just the system directory is returned. "appauthor" (only used on Windows) is the name of the appauthor or distributing body for this application. Typically it is the owning company name. This falls back to appname. You may pass False to disable it. "version" is an optional version path element to append to the path. You might want to use this if you want multiple versions of your app to be able to run independently. If used, this would typically be ".". Only applied when appname is present. "opinion" (boolean) can be False to disable the appending of "Cache" to the base app data dir for Windows. See discussion below. Typical user cache directories are: Mac OS X: ~/Library/Caches/ Unix: ~/.cache/ (XDG default) Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Cache Vista: C:\Users\\AppData\Local\\\Cache On Windows the only suggestion in the MSDN docs is that local settings go in the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming app data dir (the default returned by `user_data_dir` above). Apps typically put cache data somewhere *under* the given dir here. Some examples: ...\Mozilla\Firefox\Profiles\\Cache ...\Acme\SuperApp\Cache\1.0 OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value. This can be disabled with the `opinion=False` option. r NrFCacher z~/Library/CachesXDG_CACHE_HOMEz~/.cacherrrropinionrs ruser_cache_dirrIs?B  Iw0E F FGG  3%%w||D)W==w||D'22 3w||D'22 8  w!!"455  /7<<g..Dy)27+=+=j+I+IJJ  /7<<g..D+7+w||D'** Kr!c.tdvrt||d|}nTtjdtjd}|r tj||}|r"|r tj||}|S)aReturn full path to the user-specific state dir for this application. "appname" is the name of application. If None, just the system directory is returned. "appauthor" (only used on Windows) is the name of the appauthor or distributing body for this application. Typically it is the owning company name. This falls back to appname. You may pass False to disable it. "version" is an optional version path element to append to the path. You might want to use this if you want multiple versions of your app to be able to run independently. If used, this would typically be ".". Only applied when appname is present. "roaming" (boolean, default False) can be set True to use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See for a discussion of issues. Typical user state directories are: Mac OS X: same as user_data_dir Unix: ~/.local/state/ # or in $XDG_STATE_HOME, if defined Win *: same as user_data_dir For Unix, we follow this Debian proposal to extend the XDG spec and support $XDG_STATE_HOME. That means, by default "~/.local/state/". r:NXDG_STATE_HOMEz~/.local/stater<r=s ruser_state_dirrL:s>$$$Wiw??y)27+=+=>N+O+OPP  /7<<g..D+7+w||D'** Kr!ctdkr>tjtjd|}nvtdkr6t |||}d}|r tj|d}n5t |||}d}|r tj|d}|r"|r tj||}|S)aReturn full path to the user-specific log dir for this application. "appname" is the name of application. If None, just the system directory is returned. "appauthor" (only used on Windows) is the name of the appauthor or distributing body for this application. Typically it is the owning company name. This falls back to appname. You may pass False to disable it. "version" is an optional version path element to append to the path. You might want to use this if you want multiple versions of your app to be able to run independently. If used, this would typically be ".". Only applied when appname is present. "opinion" (boolean) can be False to disable the appending of "Logs" to the base app data dir for Windows, and "log" to the base cache dir for Unix. See discussion below. Typical user log directories are: Mac OS X: ~/Library/Logs/ Unix: ~/.cache//log # or under $XDG_CACHE_HOME if defined Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Logs Vista: C:\Users\\AppData\Local\\\Logs On Windows the only suggestion in the MSDN docs is that local settings go in the `CSIDL_LOCAL_APPDATA` directory. (Note: I'm interested in examples of what some windows apps use for a logs dir.) OPINION: This function appends "Logs" to the `CSIDL_LOCAL_APPDATA` value for Windows and appends "log" to the user cache dir for Unix. This can be disabled with the `opinion=False` option. r z~/Library/Logsr FLogslog)rrrrrr rIrGs r user_log_dirrPds@w|| G  / 0 0  7  Wi99  .7<<f--Dgy'::  -7<<e,,D+7+w||D'** Kr!ceZdZdZ d dZedZedZedZedZ ed Z ed Z ed Z dS) AppDirsz1Convenience wrapper for getting application dirs.NFcL||_||_||_||_||_dS)N)rrrrr6)selfrrrrr6s r__init__zAppDirs.__init__s) "  "r!cPt|j|j|j|jSN)rr)r rrrrrTs rr zAppDirs.user_data_dirs.T\4>%)\4<III Ir!cPt|j|j|j|jSN)rr6)r8rrrr6rXs rr8zAppDirs.site_data_dirs.T\4>%)\T^MMM Mr!cPt|j|j|j|jSrW)r>rrrrrXs rr>zAppDirs.user_config_dirs.t|T^'+|T\KKK Kr!cPt|j|j|j|jSrZ)rCrrrr6rXs rrCzAppDirs.site_config_dirs.t|T^%)\T^MMM Mr!cDt|j|j|jSNr)rIrrrrXs rrIzAppDirs.user_cache_dir&dlDN&*l444 4r!cDt|j|j|jSr^)rLrrrrXs rrLzAppDirs.user_state_dirr`r!cDt|j|j|jSr^)rPrrrrXs rrPzAppDirs.user_log_dirs&DL$.$(L222 2r!)NNNFF) __name__ __module__ __qualname____doc__rUpropertyr r8r>rCrIrLrPr&r!rrRrRs;;=A%*####IIXIMMXMKKXKMMXM44X444X422X222r!rRctrddl}nddl}dddd|}||jd}|||\}}|S)zThis is a fallback technique at best. I'm not sure if using the registry for this guarantees us the correct answer for all CSIDL_* names. rNAppDatazCommon AppDataz Local AppDatarr#rz@Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders)PY3winreg_winregOpenKeyHKEY_CURRENT_USER QueryValueEx) csidl_namermshell_folder_namekeydirtypes r_get_win_folder_from_registryrvs  nnn# 0.  //!K  C$$S*;<rIrLrPr8rCz-- app dirs %s --z%-- app dirs (with optional 'version')z1.0r_z: z) -- app dirs (without optional 'version')z+ -- app dirs (without optional 'appauthor')z( -- app dirs (with disabled 'appauthor'))r)NNNF)NNNT)-rf__version_info__rmapstr __version__sysr version_inforkr~platform startswithjava_veros_namerr r8r>rCrIrLrPobjectrRrvrrrr{win32comrrrr com.sun.jnacomrcrrpropsprintdirspropr}r&r!rrsn hhss3 01122   qQG<6"" OOOh!!!$Q'G)$$   E " "  \F4444n????D%%%%P0000f6666r''''T0000f+2+2+2+2+2f+2+2+2`0644 W @6  @ @ @ @ % % % % % %9OO @ @ @ @""""": @ @ @"? @  @ @ zGI E E  +,,, E 1222 77Iu 5 5 5D66 $$$d 3 3 345555 E 6777 77I & &D66 $$$d 3 3 345555 E 8999 77  D66 $$$d 3 3 345555 E 5666 77e , , ,D66 $$$d 3 3 345555A>66sZ1C88D*>DD*D$ DD$DD$DD$!D*#D$$D*)D*PK|5ZOE>>HLib/site-packages/pkg_resources/_vendor/__pycache__/zipp.cpython-311.pycnuW+A ^;d ddlZddlZddlZddlZddlZddlZddlZejdkrddlm Z ne Z dgZ dZ dZ e jZ dZGdd ejZGd d eZd ZGd dZdS)N)) OrderedDictPathcHtjt|ddS)a2 Given a path with elements separated by posixpath.sep, generate all parents of that path. >>> list(_parents('b/d')) ['b'] >>> list(_parents('/b/d/')) ['/b'] >>> list(_parents('b/d/f/')) ['b/d', 'b'] >>> list(_parents('b')) [] >>> list(_parents('')) [] N) itertoolsislice _ancestrypaths iE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/zipp.py_parentsrs  IdOOQ 5 55c#K|tj}|r?|tjkr3|Vtj|\}}|r|tjk-dSdSdSdS)aR Given a path with elements separated by posixpath.sep, generate all elements of that path >>> list(_ancestry('b/d')) ['b/d', 'b'] >>> list(_ancestry('/b/d/')) ['/b/d', '/b'] >>> list(_ancestry('b/d/f/')) ['b/d/f', 'b/d', 'b'] >>> list(_ancestry('b')) ['b'] >>> list(_ancestry('')) [] N)rstrip posixpathsepsplit)r tails rr r %s ;;y} % %D +49=(( _T** d +49=((((++++((rcPtjt|j|S)zZ Return items in minuend not in subtrahend, retaining order with O(1) lookup. )r filterfalseset __contains__)minuend subtrahends r _differencer?s  Z!=w G GGrcZeZdZdZedZfdZdZdZe dZ xZ S) CompleteDirszk A ZipFile subclass that ensures that implied directories are always included in the namelist. ctjtt|}d|D}t t ||S)Nc34K|]}|tjzVdSN)rr).0ps r z-CompleteDirs._implied_dirs..Ps)661y}$666666r)r chain from_iterablemapr_deduper)namesparentsas_dirss r _implied_dirszCompleteDirs._implied_dirsMsL///He0D0DEE66g666{7E22333rctt|}|t||zSr")superrnamelistlistr-)selfr* __class__s rr0zCompleteDirs.namelistSs?lD))2244tD..u556666rcDt|Sr")rr0r2s r _name_setzCompleteDirs._name_setWs4==??###rcP|}|dz}||vo||v}|r|n|S)zx If the name represents a directory, return that name as a directory (with the trailing slash). /)r6)r2namer*dirname dir_matchs r resolve_dirzCompleteDirs.resolve_dirZs?   *%:'U*: #-ww-rct|tr|St|tjs|t |Sd|jvrt}||_|S)zl Given a source (filename or zipfile), return an appropriate CompleteDirs subclass. r) isinstancerzipfileZipFile_pathlib_compatmoder3)clssources rmakezCompleteDirs.makedsh fl + + M&'/22 03v..// / fk ! !C r) __name__ __module__ __qualname____doc__ staticmethodr-r0r6r< classmethodrF __classcell__r3s@rrrGs 44\4 77777$$$...[rrc,eZdZdZfdZfdZxZS) FastLookupzV ZipFile subclass to ensure implicit dirs exist and are resolved rapidly. ctjt5|jcdddS#1swxYwYt t ||_|jSr") contextlibsuppressAttributeError_FastLookup__namesr/rPr0r2r3s rr0zFastLookup.namelist~s   0 0  <                Z..7799 | /33ctjt5|jcdddS#1swxYwYt t ||_|jSr")rRrSrT_FastLookup__lookupr/rPr6rVs rr6zFastLookup._name_sets   0 0 ! != ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !j$//99;; }rW)rGrHrIrJr0r6rMrNs@rrPrPxs[  rrPcj |S#t$rt|cYSwxYw)zi For path-like objects, convert to a filename for compatibility on Python 3.6.1 and earlier. ) __fspath__rTstrr s rrBrBsD    4yys 22ceZdZdZdZddZddddZed Zed Z ed Z ed Z ed Z dZ dZdZdZdZdZdZdZdZdZdZeZedZdS)ru4 A pathlib-compatible interface for zip files. Consider a zip file with this structure:: . ├── a.txt └── b ├── c.txt └── d └── e.txt >>> data = io.BytesIO() >>> zf = zipfile.ZipFile(data, 'w') >>> zf.writestr('a.txt', 'content of a') >>> zf.writestr('b/c.txt', 'content of c') >>> zf.writestr('b/d/e.txt', 'content of e') >>> zf.filename = 'mem/abcde.zip' Path accepts the zipfile object itself or a filename >>> root = Path(zf) From there, several path operations are available. Directory iteration (including the zip file itself): >>> a, b = root.iterdir() >>> a Path('mem/abcde.zip', 'a.txt') >>> b Path('mem/abcde.zip', 'b/') name property: >>> b.name 'b' join with divide operator: >>> c = b / 'c.txt' >>> c Path('mem/abcde.zip', 'b/c.txt') >>> c.name 'c.txt' Read text: >>> c.read_text() 'content of c' existence: >>> c.exists() True >>> (b / 'missing.txt').exists() False Coercion to string: >>> import os >>> str(c).replace(os.sep, posixpath.sep) 'mem/abcde.zip/b/c.txt' At the root, ``name``, ``filename``, and ``parent`` resolve to the zipfile. Note these attributes are not valid and will raise a ``ValueError`` if the zipfile has no filename. >>> root.name 'abcde.zip' >>> str(root.filename).replace(os.sep, posixpath.sep) 'mem/abcde.zip' >>> str(root.parent) 'mem' z>{self.__class__.__name__}({self.root.filename!r}, {self.at!r})cRt||_||_dS)aX Construct a Path from a ZipFile or filename. Note: When the source is an existing ZipFile object, its type (__class__) will be mutated to a specialized type. If the caller wishes to retain the original type, the caller should either create a separate ZipFile object or pass a filename. N)rPrFrootat)r2r`ras r__init__z Path.__init__s"OOD)) rr>NpwdcJ|rt||d}|s|dkrt||j|j||}d|vr|s|rtd|Stj |g|Ri|S)z Open this entry as text or binary following the semantics of ``pathlib.Path.open()`` by passing arguments through to io.TextIOWrapper(). rr>rcbz*encoding args invalid for binary operation) is_dirIsADirectoryErrorexistsFileNotFoundErrorr`openra ValueErrorio TextIOWrapper)r2rCrdargskwargszip_modestreams rrkz Path.opens ;;== *#D)) )7{{}} *S#D)) )s;; $;; Ov O !MNNNM8888888rcVtj|jjp |jjSr")pathlibrrar9filenamer5s rr9z Path.name!|DG$$)?T]-??rcVtj|jjp |jjSr")rtrrasuffixrur5s rrxz Path.suffix s!|DG$$+Ct}/CCrcVtj|jjp |jjSr")rtrrasuffixesrur5s rrzz Path.suffixes s!|DG$$-G1GGrcVtj|jjp |jjSr")rtrrastemrur5s rr|z Path.stemrvrcntj|jj|jSr")rtrr`rujoinpathrar5s rruz Path.filenames'|DI.//88AAArc|jdg|Ri|5}|cdddS#1swxYwYdS)Nr>rkread)r2rorpstrms r read_textzPath.read_texts TYs ,T , , ,V , , 99;;                  s 377c|d5}|cdddS#1swxYwYdS)Nrbr)r2rs r read_byteszPath.read_bytess~ YYt__ 99;;                  s 7;;ctj|jd|jdkSNr8)rr:rar)r2r s r _is_childzPath._is_child!s4 !4!4559L9LLLrc8||j|Sr")r3r`)r2ras r_nextz Path._next$s~~di,,,rcF|j p|jdSr)raendswithr5s rrgz Path.is_dir's!7{3dg..s333rcT|o| Sr")rirgr5s ris_filez Path.is_file*s {{}}2T[[]]!22rcB|j|jvSr")rar`r6r5s rriz Path.exists-sw$)--////rc|stdt|j|j}t |j|S)NzCan't listdir a file)rgrlr(rr`r0filterr)r2subss riterdirz Path.iterdir0sR{{}} 5344 44:ty113344dnd+++rcJtj|jj|jSr")rjoinr`rurar5s r__str__z Path.__str__6s~di0$':::rc8|j|S)Nr5) _Path__reprformatr5s r__repr__z Path.__repr__9s{!!t!,,,rctj|jgtt|R}||j|Sr")rrrar(rBrr`r<)r2othernexts rr~z Path.joinpath<sG~dgDOU(C(CDDDzz$)//55666rc|js |jjStj|jd}|r|dz }||Sr)raruparentrr:rr)r2 parent_ats rrz Path.parentBsYw (=' '%dgnnS&9&9::    Izz)$$$r)r^)r>)rGrHrIrJrrbrkpropertyr9rxrzr|rurrrrrgrrirrrr~ __truediv__rrrrrsKKZNF    999999$@@X@DDXDHHXH@@X@BBXBMMM---444333000,,, ;;;---777K %%X%%%r)rmrr@r rRsysrt version_info collectionsrdict__all__rr fromkeysr)rrArrPrBrrrrrs]  f'''''''K (666&+++,  /HHH.....7?...b&s%s%s%s%s%s%s%s%s%s%rPK|5Z3Lib/site-packages/pkg_resources/_vendor/__init__.pynuW+APK|5ZBq8 /Lib/site-packages/pkg_resources/_vendor/zipp.pynuW+Aimport io import posixpath import zipfile import itertools import contextlib import sys import pathlib if sys.version_info < (3, 7): from collections import OrderedDict else: OrderedDict = dict __all__ = ['Path'] def _parents(path): """ Given a path with elements separated by posixpath.sep, generate all parents of that path. >>> list(_parents('b/d')) ['b'] >>> list(_parents('/b/d/')) ['/b'] >>> list(_parents('b/d/f/')) ['b/d', 'b'] >>> list(_parents('b')) [] >>> list(_parents('')) [] """ return itertools.islice(_ancestry(path), 1, None) def _ancestry(path): """ Given a path with elements separated by posixpath.sep, generate all elements of that path >>> list(_ancestry('b/d')) ['b/d', 'b'] >>> list(_ancestry('/b/d/')) ['/b/d', '/b'] >>> list(_ancestry('b/d/f/')) ['b/d/f', 'b/d', 'b'] >>> list(_ancestry('b')) ['b'] >>> list(_ancestry('')) [] """ path = path.rstrip(posixpath.sep) while path and path != posixpath.sep: yield path path, tail = posixpath.split(path) _dedupe = OrderedDict.fromkeys """Deduplicate an iterable in original order""" def _difference(minuend, subtrahend): """ Return items in minuend not in subtrahend, retaining order with O(1) lookup. """ return itertools.filterfalse(set(subtrahend).__contains__, minuend) class CompleteDirs(zipfile.ZipFile): """ A ZipFile subclass that ensures that implied directories are always included in the namelist. """ @staticmethod def _implied_dirs(names): parents = itertools.chain.from_iterable(map(_parents, names)) as_dirs = (p + posixpath.sep for p in parents) return _dedupe(_difference(as_dirs, names)) def namelist(self): names = super(CompleteDirs, self).namelist() return names + list(self._implied_dirs(names)) def _name_set(self): return set(self.namelist()) def resolve_dir(self, name): """ If the name represents a directory, return that name as a directory (with the trailing slash). """ names = self._name_set() dirname = name + '/' dir_match = name not in names and dirname in names return dirname if dir_match else name @classmethod def make(cls, source): """ Given a source (filename or zipfile), return an appropriate CompleteDirs subclass. """ if isinstance(source, CompleteDirs): return source if not isinstance(source, zipfile.ZipFile): return cls(_pathlib_compat(source)) # Only allow for FastLookup when supplied zipfile is read-only if 'r' not in source.mode: cls = CompleteDirs source.__class__ = cls return source class FastLookup(CompleteDirs): """ ZipFile subclass to ensure implicit dirs exist and are resolved rapidly. """ def namelist(self): with contextlib.suppress(AttributeError): return self.__names self.__names = super(FastLookup, self).namelist() return self.__names def _name_set(self): with contextlib.suppress(AttributeError): return self.__lookup self.__lookup = super(FastLookup, self)._name_set() return self.__lookup def _pathlib_compat(path): """ For path-like objects, convert to a filename for compatibility on Python 3.6.1 and earlier. """ try: return path.__fspath__() except AttributeError: return str(path) class Path: """ A pathlib-compatible interface for zip files. Consider a zip file with this structure:: . ├── a.txt └── b ├── c.txt └── d └── e.txt >>> data = io.BytesIO() >>> zf = zipfile.ZipFile(data, 'w') >>> zf.writestr('a.txt', 'content of a') >>> zf.writestr('b/c.txt', 'content of c') >>> zf.writestr('b/d/e.txt', 'content of e') >>> zf.filename = 'mem/abcde.zip' Path accepts the zipfile object itself or a filename >>> root = Path(zf) From there, several path operations are available. Directory iteration (including the zip file itself): >>> a, b = root.iterdir() >>> a Path('mem/abcde.zip', 'a.txt') >>> b Path('mem/abcde.zip', 'b/') name property: >>> b.name 'b' join with divide operator: >>> c = b / 'c.txt' >>> c Path('mem/abcde.zip', 'b/c.txt') >>> c.name 'c.txt' Read text: >>> c.read_text() 'content of c' existence: >>> c.exists() True >>> (b / 'missing.txt').exists() False Coercion to string: >>> import os >>> str(c).replace(os.sep, posixpath.sep) 'mem/abcde.zip/b/c.txt' At the root, ``name``, ``filename``, and ``parent`` resolve to the zipfile. Note these attributes are not valid and will raise a ``ValueError`` if the zipfile has no filename. >>> root.name 'abcde.zip' >>> str(root.filename).replace(os.sep, posixpath.sep) 'mem/abcde.zip' >>> str(root.parent) 'mem' """ __repr = "{self.__class__.__name__}({self.root.filename!r}, {self.at!r})" def __init__(self, root, at=""): """ Construct a Path from a ZipFile or filename. Note: When the source is an existing ZipFile object, its type (__class__) will be mutated to a specialized type. If the caller wishes to retain the original type, the caller should either create a separate ZipFile object or pass a filename. """ self.root = FastLookup.make(root) self.at = at def open(self, mode='r', *args, pwd=None, **kwargs): """ Open this entry as text or binary following the semantics of ``pathlib.Path.open()`` by passing arguments through to io.TextIOWrapper(). """ if self.is_dir(): raise IsADirectoryError(self) zip_mode = mode[0] if not self.exists() and zip_mode == 'r': raise FileNotFoundError(self) stream = self.root.open(self.at, zip_mode, pwd=pwd) if 'b' in mode: if args or kwargs: raise ValueError("encoding args invalid for binary operation") return stream return io.TextIOWrapper(stream, *args, **kwargs) @property def name(self): return pathlib.Path(self.at).name or self.filename.name @property def suffix(self): return pathlib.Path(self.at).suffix or self.filename.suffix @property def suffixes(self): return pathlib.Path(self.at).suffixes or self.filename.suffixes @property def stem(self): return pathlib.Path(self.at).stem or self.filename.stem @property def filename(self): return pathlib.Path(self.root.filename).joinpath(self.at) def read_text(self, *args, **kwargs): with self.open('r', *args, **kwargs) as strm: return strm.read() def read_bytes(self): with self.open('rb') as strm: return strm.read() def _is_child(self, path): return posixpath.dirname(path.at.rstrip("/")) == self.at.rstrip("/") def _next(self, at): return self.__class__(self.root, at) def is_dir(self): return not self.at or self.at.endswith("/") def is_file(self): return self.exists() and not self.is_dir() def exists(self): return self.at in self.root._name_set() def iterdir(self): if not self.is_dir(): raise ValueError("Can't listdir a file") subs = map(self._next, self.root.namelist()) return filter(self._is_child, subs) def __str__(self): return posixpath.join(self.root.filename, self.at) def __repr__(self): return self.__repr.format(self=self) def joinpath(self, *other): next = posixpath.join(self.at, *map(_pathlib_compat, other)) return self._next(self.root.resolve_dir(next)) __truediv__ = joinpath @property def parent(self): if not self.at: return self.filename.parent parent_at = posixpath.dirname(self.at.rstrip('/')) if parent_at: parent_at += '/' return self._next(parent_at) PK|5ZhttILib/site-packages/pkg_resources/_vendor/importlib_resources/_itertools.pynuW+Afrom itertools import filterfalse from typing import ( Callable, Iterable, Iterator, Optional, Set, TypeVar, Union, ) # Type and type variable definitions _T = TypeVar('_T') _U = TypeVar('_U') def unique_everseen( iterable: Iterable[_T], key: Optional[Callable[[_T], _U]] = None ) -> Iterator[_T]: "List unique elements, preserving order. Remember all elements ever seen." # unique_everseen('AAAABBBCCDAABBB') --> A B C D # unique_everseen('ABBCcAD', str.lower) --> A B C D seen: Set[Union[_T, _U]] = set() seen_add = seen.add if key is None: for element in filterfalse(seen.__contains__, iterable): seen_add(element) yield element else: for element in iterable: k = key(element) if k not in seen: seen_add(k) yield element PK|5Zkh FLib/site-packages/pkg_resources/_vendor/importlib_resources/_compat.pynuW+A# flake8: noqa import abc import sys import pathlib from contextlib import suppress if sys.version_info >= (3, 10): from zipfile import Path as ZipPath # type: ignore else: from ..zipp import Path as ZipPath # type: ignore try: from typing import runtime_checkable # type: ignore except ImportError: def runtime_checkable(cls): # type: ignore return cls try: from typing import Protocol # type: ignore except ImportError: Protocol = abc.ABC # type: ignore class TraversableResourcesLoader: """ Adapt loaders to provide TraversableResources and other compatibility. Used primarily for Python 3.9 and earlier where the native loaders do not yet implement TraversableResources. """ def __init__(self, spec): self.spec = spec @property def path(self): return self.spec.origin def get_resource_reader(self, name): from . import readers, _adapters def _zip_reader(spec): with suppress(AttributeError): return readers.ZipReader(spec.loader, spec.name) def _namespace_reader(spec): with suppress(AttributeError, ValueError): return readers.NamespaceReader(spec.submodule_search_locations) def _available_reader(spec): with suppress(AttributeError): return spec.loader.get_resource_reader(spec.name) def _native_reader(spec): reader = _available_reader(spec) return reader if hasattr(reader, 'files') else None def _file_reader(spec): try: path = pathlib.Path(self.path) except TypeError: return None if path.exists(): return readers.FileReader(self) return ( # native reader if it supplies 'files' _native_reader(self.spec) or # local ZipReader if a zip module _zip_reader(self.spec) or # local NamespaceReader if a namespace module _namespace_reader(self.spec) or # local FileReader _file_reader(self.spec) # fallback - adapt the spec ResourceReader to TraversableReader or _adapters.CompatibilityFiles(self.spec) ) def wrap_spec(package): """ Construct a package spec with traversable compatibility on the spec/loader/reader. Supersedes _adapters.wrap_spec to use TraversableResourcesLoader from above for older Python compatibility (<3.10). """ from . import _adapters return _adapters.SpecLoaderAdapter(package.__spec__, TraversableResourcesLoader) PK|5Z.1 FLib/site-packages/pkg_resources/_vendor/importlib_resources/_legacy.pynuW+Aimport functools import os import pathlib import types import warnings from typing import Union, Iterable, ContextManager, BinaryIO, TextIO, Any from . import _common Package = Union[types.ModuleType, str] Resource = str def deprecated(func): @functools.wraps(func) def wrapper(*args, **kwargs): warnings.warn( f"{func.__name__} is deprecated. Use files() instead. " "Refer to https://importlib-resources.readthedocs.io" "/en/latest/using.html#migrating-from-legacy for migration advice.", DeprecationWarning, stacklevel=2, ) return func(*args, **kwargs) return wrapper def normalize_path(path): # type: (Any) -> str """Normalize a path by ensuring it is a string. If the resulting string contains path separators, an exception is raised. """ str_path = str(path) parent, file_name = os.path.split(str_path) if parent: raise ValueError(f'{path!r} must be only a file name') return file_name @deprecated def open_binary(package: Package, resource: Resource) -> BinaryIO: """Return a file-like object opened for binary reading of the resource.""" return (_common.files(package) / normalize_path(resource)).open('rb') @deprecated def read_binary(package: Package, resource: Resource) -> bytes: """Return the binary contents of the resource.""" return (_common.files(package) / normalize_path(resource)).read_bytes() @deprecated def open_text( package: Package, resource: Resource, encoding: str = 'utf-8', errors: str = 'strict', ) -> TextIO: """Return a file-like object opened for text reading of the resource.""" return (_common.files(package) / normalize_path(resource)).open( 'r', encoding=encoding, errors=errors ) @deprecated def read_text( package: Package, resource: Resource, encoding: str = 'utf-8', errors: str = 'strict', ) -> str: """Return the decoded string of the resource. The decoding-related arguments have the same semantics as those of bytes.decode(). """ with open_text(package, resource, encoding, errors) as fp: return fp.read() @deprecated def contents(package: Package) -> Iterable[str]: """Return an iterable of entries in `package`. Note that not all entries are resources. Specifically, directories are not considered resources. Use `is_resource()` on each entry returned here to check if it is a resource or not. """ return [path.name for path in _common.files(package).iterdir()] @deprecated def is_resource(package: Package, name: str) -> bool: """True if `name` is a resource inside `package`. Directories are *not* resources. """ resource = normalize_path(name) return any( traversable.name == resource and traversable.is_file() for traversable in _common.files(package).iterdir() ) @deprecated def path( package: Package, resource: Resource, ) -> ContextManager[pathlib.Path]: """A context manager providing a file path object to the resource. If the resource does not already exist on its own on the file system, a temporary file will be created. If the file was created, the file will be deleted upon exiting the context manager (no exception is raised if the file was deleted prior to the context manager exiting). """ return _common.as_file(_common.files(package) / normalize_path(resource)) PK|5Z)xTT`Lib/site-packages/pkg_resources/_vendor/importlib_resources/__pycache__/__init__.cpython-311.pycnuW+A ^;dZdZddlmZmZmZddlmZmZmZm Z m Z m Z m Z m Z ddlmZgdZdS)z*Read resources contained within a package.)as_filefilesPackage)contents open_binary read_binary open_text read_text is_resourcepathResource)ResourceReader) rr rrrrr rr r rr N)__doc___commonrrr_legacyrrrr r r r r abcr__all__E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/importlib_resources/__init__.pyrs00                        rPK|5Z=YY[Lib/site-packages/pkg_resources/_vendor/importlib_resources/__pycache__/abc.cpython-311.pycnuW+A ^;d.ddlZddlmZmZmZddlmZmZGddejZ eGdd eZ Gd d e Z dS) N)BinaryIOIterableText)runtime_checkableProtocolceZdZdZejdedefdZejdedefdZ ejdede fdZ ejde e fdZd S) ResourceReaderzDAbstract base class for loaders to provide resource reading support.resourcereturnct)zReturn an opened, file-like object for binary reading. The 'resource' argument is expected to represent only a file name. If the resource cannot be found, FileNotFoundError is raised. FileNotFoundErrorselfr s |E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/importlib_resources/abc.py open_resourcezResourceReader.open_resource s  ct)zReturn the file system path to the specified resource. The 'resource' argument is expected to represent only a file name. If the resource does not exist on the file system, raise FileNotFoundError. rrs r resource_pathzResourceReader.resource_paths  rpathct)zjReturn True if the named 'path' is a resource. Files are resources, directories are not. rrrs r is_resourcezResourceReader.is_resource#s  rct)z+Return an iterable of entries in `package`.rrs rcontentszResourceReader.contents+s  rN)__name__ __module__ __qualname____doc__abcabstractmethodrrrrboolrrstrrrrr r sNN  d  x         d  t               (3-      rr ) metaclassceZdZdZejdZdZddZejde fdZ ejde fdZ ejd Z d Z ejdd Zejdefd ZdS) Traversablezt An object with a subset of pathlib.Path methods suitable for traversing directories and opening files. cdS)z3 Yield Traversable objects in self Nr&rs riterdirzTraversable.iterdir8rc|d5}|cdddS#1swxYwYdS)z0 Read contents of self as bytes rbNopenread)rstrms r read_byteszTraversable.read_bytes>sYYt__ 99;;                  s 7;;Nc||5}|cdddS#1swxYwYdS)z/ Read contents of self as text )encodingNr/)rr5r2s r read_textzTraversable.read_textEsYYY ) ) T99;;                  s 8<<r cdS)z4 Return True if self is a directory Nr&rs ris_dirzTraversable.is_dirLr,rcdS)z/ Return True if self is a file Nr&rs ris_filezTraversable.is_fileRr,rcdS)2 Return Traversable child in self Nr&rchilds rjoinpathzTraversable.joinpathXr,rc,||S)r<)r?r=s r __truediv__zTraversable.__truediv__^s}}U###rrcdS)z mode may be 'r' or 'rb' to open as text or binary. Return a handle suitable for reading (same as pathlib.Path.open). When opening as text, accepts encoding parameters such as those accepted by io.TextIOWrapper. Nr&)rmodeargskwargss rr0zTraversable.opendr,rcdS)zM The base name of this object without any parent references. Nr&rs rnamezTraversable.namenr,rN)rB)rrr r!r"r#r+r3r6r$r8r:r?rAr0abstractpropertyr%rHr&rrr)r)1s3                     $$$        c      rr)cJeZdZdZejdZdZdZdZ dZ dS)TraversableResourceszI The required interface for providing traversable resources. cdS)z3Return a Traversable object for the loaded package.Nr&rs rfileszTraversableResources.files{r,rcv||dS)Nr.)rNr?r0rs rrz"TraversableResources.open_resources,zz||$$X..33D999rc t|rIrrs rrz"TraversableResources.resource_paths)))rct||SrI)rNr?r:rs rrz TraversableResources.is_resources*zz||$$T**22444rcbd|DS)Nc3$K|] }|jV dSrI)rH).0items r z0TraversableResources.contents..s$==d ======r)rNr+rs rrzTraversableResources.contentss*==djjll&:&:&<&<====rN) rrr r!r"r#rNrrrrr&rrrLrLus|  BBB:::***555>>>>>rrL) r"typingrrr_compatrrABCMetar r)rLr&rrrZs ++++++++++00000000' ' ' ' ' s{' ' ' ' T@ @ @ @ @ (@ @ @ F>>>>>>>>>>>rPK|5Z[*Kpp_Lib/site-packages/pkg_resources/_vendor/importlib_resources/__pycache__/_legacy.cpython-311.pycnuW+A ^;d ddlZddlZddlZddlZddlZddlmZmZmZm Z m Z m Z ddl m Z eejefZeZdZdZededed e fd Zededed efd Ze ddedededed e f dZe ddedededed ef dZeded eefdZededed efdZededed eejfdZdS)N)UnionIterableContextManagerBinaryIOTextIOAny)_commoncFtjfd}|S)Nc\tjjdtd|i|S)Nz is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.) stacklevel)warningswarn__name__DeprecationWarning)argskwargsfuncs E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/importlib_resources/_legacy.pywrapperzdeprecated..wrappersR } P P P      tT$V$$$) functoolswraps)rrs` r deprecatedrs8_T%%%%% Nrct|}tj|\}}|rt |d|S)zNormalize a path by ensuring it is a string. If the resulting string contains path separators, an exception is raised. z must be only a file name)strospathsplit ValueError)rstr_pathparent file_names rnormalize_pathr%sL 4yyH h//FI ?D===>>> rpackageresourcereturncptj|t|z dS)zDReturn a file-like object opened for binary reading of the resource.rbr filesr%openr&r's r open_binaryr/+s/ M' " "^H%=%= = C CD I IIrcntj|t|z S)z+Return the binary contents of the resource.)r r,r% read_bytesr.s r read_binaryr21s- M' " "^H%=%= = I I K KKrutf-8strictencodingerrorscvtj|t|z d||S)zBReturn a file-like object opened for text reading of the resource.r)r5r6r+)r&r'r5r6s r open_textr97s@ M' " "^H%=%= = C C hv D  rct||||5}|cdddS#1swxYwYdS)zReturn the decoded string of the resource. The decoding-related arguments have the same semantics as those of bytes.decode(). N)r9read)r&r'r5r6fps r read_textr=Ds 7Hh 7 72wwyys 488cbdtj|DS)zReturn an iterable of entries in `package`. Note that not all entries are resources. Specifically, directories are not considered resources. Use `is_resource()` on each entry returned here to check if it is a resource or not. cg|] }|j S)name).0rs r zcontents..\s C C C$DI C C Cr)r r,iterdir)r&s rcontentsrETs/ D C'-"8"8"@"@"B"B C C CCrrAct|tfdtj|DS)zYTrue if `name` is a resource inside `package`. Directories are *not* resources. c3VK|]#}|jko|V$dS)N)rAis_file)rB traversabler's r zis_resource..fsP  H$>)<)<)>)>r)r%anyr r,rD)r&rAr's @r is_resourcerL_s` d##H "=1199;;  rcntjtj|t|z S)akA context manager providing a file path object to the resource. If the resource does not already exist on its own on the file system, a temporary file will be created. If the file was created, the file will be deleted upon exiting the context manager (no exception is raised if the file was deleted prior to the context manager exiting). )r as_filer,r%r.s rrrls+ ?7=11N84L4LL M MMr)r3r4)rrpathlibtypesrtypingrrrrrrr ModuleTyperPackageResourcerr%r/bytesr2r9r=rEboolrLPathrr@rrrYs  IIIIIIIIIIIIIIII  #% &        JJHJJJJ J  LLHLLLL L                                DgD(3-DDD D           N  N NGL! N N N  N N NrPK|5Zh  ^Lib/site-packages/pkg_resources/_vendor/importlib_resources/__pycache__/simple.cpython-311.pycnuW+A ^;d dZddlZddlZddlZddlmZmZddlmZmZGddej Z Gdd eZ Gd d eZ Gd d ee Z dS)z+ Interface adapters for low-level readers. N)BinaryIOList) TraversableTraversableResourcesceZdZdZejdZejdZejdZ ejdZ e dZ dS) SimpleReaderzQ The minimum, low-level interface required from a resource provider. cdS)zP The name of the package for which this reader loads resources. Nselfs E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/importlib_resources/simple.pypackagezSimpleReader.packagecdS)zo Obtain an iterable of SimpleReader for available child containers (e.g. directories). Nr r s rchildrenzSimpleReader.childrenrrcdS)zL Obtain available named resources for this virtual package. Nr r s r resourceszSimpleReader.resources"rrcdS)z: Obtain a File-like for a named resource. Nr )r resources r open_binaryzSimpleReader.open_binary)rrcB|jddS)N.)rsplitr s rnamezSimpleReader.name0s|!!#&&r**rN) __name__ __module__ __qualname____doc__abcabstractpropertyrabstractmethodrrrpropertyrr rrr r s                 ++X+++rr c2eZdZdZdZdZdZd dZdZdS) ResourceHandlez9 Handle to a named resource in a ResourceReader. c"||_||_dSN)parentr)r r*rs r__init__zResourceHandle.__init__:s  rcdSNTr r s ris_filezResourceHandle.is_file?trcdSNFr r s ris_dirzResourceHandle.is_dirBurrcx|jj|j}d|vrt j|i|}|S)Nb)r*readerrrio TextIOWrapper)r modeargskwargsstreams ropenzResourceHandle.openEs?#// :: d??%t6v66F rc td)NzCannot traverse into a resource) RuntimeErrorr rs rjoinpathzResourceHandle.joinpathKs<===rN)r4) rrr r!r+r.r2r>rBr rrr'r'5sn  >>>>>rr'c6eZdZdZdZdZdZdZdZdZ dS) ResourceContainerzI Traversable container for a package's resources via its reader. c||_dSr))r7)r r7s rr+zResourceContainer.__init__Ts  rcdSr-r r s rr2zResourceContainer.is_dirXr/rcdSr1r r s rr.zResourceContainer.is_file[r3rcfdjjD}ttj}t j||S)Nc38K|]}t|VdSr))r').0rr s r z,ResourceContainer.iterdir.._s-NNd++NNNNNNr)r7rmaprDr itertoolschain)r filesdirss` riterdirzResourceContainer.iterdir^sQNNNN 8MNNN$dk&:&:&<&<==ud+++rctr))IsADirectoryError)r r;r<s rr>zResourceContainer.opencs!!!rc^tfd|DS)Nc32K|]}|jk |VdSr))r)rJ traversablers rrKz-ResourceContainer.joinpath..gs:  '[=MQU=U=UK=U=U=U=U  r)nextrQrAs `rrBzResourceContainer.joinpathfsC    +/<<>>      rN) rrr r!r+r2r.rQr>rBr rrrDrDOsx,,, """     rrDceZdZdZdZdS)TraversableReaderz A TraversableResources based on SimpleReader. Resource providers may derive from this class to provide the TraversableResources interface by supplying the SimpleReader interface. c t|Sr))rDr s rrOzTraversableReader.filesss &&&rN)rrr r!rOr rrrYrYls- '''''rrY)r!r"r8rMtypingrrrrABCr r'rDrYr rrr]s !!!!!!!!22222222%+%+%+%+%+37%+%+%+P>>>>>[>>>4        :''''',l'''''rPK|5ZDp_Lib/site-packages/pkg_resources/_vendor/importlib_resources/__pycache__/_compat.cpython-311.pycnuW+A ^;d ddlZddlZddlZddlmZejdkrddlmZnddl mZ ddl m Z n#e $rdZ YnwxYw ddl m Z n#e $r ejZ YnwxYwGd d Zd ZdS) N)suppress) )Path)runtime_checkablec|SN)clss E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/importlib_resources/_compat.pyrrs )Protocolc4eZdZdZdZedZdZdS)TraversableResourcesLoaderz Adapt loaders to provide TraversableResources and other compatibility. Used primarily for Python 3.9 and earlier where the native loaders do not yet implement TraversableResources. c||_dSr spec)selfrs r __init__z#TraversableResourcesLoader.__init__%s  rc|jjSr )rorigin)rs r pathzTraversableResourcesLoader.path(s yrcddlmm}fd}fd}dfd}fd}|jpI|jp9|jp)|jp|jS)N)readers _adaptersctt5|j|jcdddS#1swxYwYdSr )rAttributeError ZipReaderloadernamerrs r _zip_readerzCTraversableResourcesLoader.get_resource_reader.._zip_reader/s.)) A A((di@@ A A A A A A A A A A A A A A A A A As AA Acttt5|jcdddS#1swxYwYdSr )rr ValueErrorNamespaceReadersubmodule_search_locationsr#s r _namespace_readerzITraversableResourcesLoader.get_resource_reader.._namespace_reader3s.*55 P P..t/NOO P P P P P P P P P P P P P P P P P PsAA Actt5|j|jcdddS#1swxYwYdSr )rrr!get_resource_readerr"rs r _available_readerzITraversableResourcesLoader.get_resource_reader.._available_reader7s.)) B B{66tyAA B B B B B B B B B B B B B B B B B BsAAAcB|}t|dr|ndS)Nfiles)hasattr)rreaderr,s r _native_readerzFTraversableResourcesLoader.get_resource_reader.._native_reader;s,&&t,,F$VW55?664 ?rc tjj}n#t$rYdSwxYw|rSdSr )pathlibrr TypeErrorexists FileReader)rrrrs r _file_readerzDTraversableResourcesLoader.get_resource_reader.._file_reader?sk |DI..   tt {{}} 0))$/// 0 0s  ++)rrrCompatibilityFiles) rr"rr$r)r1r7r,rs ` @@r r+z.TraversableResourcesLoader.get_resource_reader,s(((((((( A A A A A P P P P P B B B @ @ @ @ @ 0 0 0 0 0 0 N49 % % 7 K " " 7  di ( ( 7 L # # 7++DI66 rN)__name__ __module__ __qualname____doc__rpropertyrr+r rr rrsW  X ) ) ) ) ) rrcNddlm}||jtS)z Construct a package spec with traversable compatibility on the spec/loader/reader. Supersedes _adapters.wrap_spec to use TraversableResourcesLoader from above for older Python compatibility (<3.10). r)r)r8rSpecLoaderAdapter__spec__r)packagers r wrap_specrCXs0  & &w'79S T TTr)abcsysr3 contextlibr version_infozipfilerZipPathzipptypingr ImportErrorrABCrrCr rr rNs> w'''''''&&&&&&((((((( wHHH9 9 9 9 9 9 9 9 x U U U U Us3>>A AAPK|5ZW abLib/site-packages/pkg_resources/_vendor/importlib_resources/__pycache__/_itertools.cpython-311.pycnuW+A ^;dtddlmZddlmZmZmZmZmZmZm Z edZ edZ d dee deee ge fdee fd Z dS) ) filterfalse)CallableIterableIteratorOptionalSetTypeVarUnion_T_UNiterablekeyreturnc#Kt}|j}|)t|j|D]}|||VdS|D] }||}||vr|||V!dS)zHList unique elements, preserving order. Remember all elements ever seen.N)setaddr __contains__)r rseenseen_addelementks E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/importlib_resources/_itertools.pyunique_everseenrs #uuDxH {"4#4h??  G HW   MMMM     GG A}}    )N) itertoolsrtypingrrrrrr r r r rrrrs!!!!!! WT]] WT]]AErl!)(B48* >F ~t 6$)  rcbt|tjr|ntj|S)N) isinstancetypes ModuleType importlib import_module)cands r resolver *s*dE$455 X449;RSW;X;XXrcpt|}t|jt|d|S)zTake a package name or module object and return the module. Raise an exception if the resolved module is not a package. Nz is not a package)r rsubmodule_search_locations TypeError)r resolveds r r r /s> wH5=7777888 Orct|}|j|j}|S)z= Return a Traversable object for the given package. )rrrrrrs r r r ;s6 W  D [ , ,TY 7 7F <<>>rc#Ktj|\}} tj||tj|n#tj|wxYw~t j|V tj|dS#t$rYdSwxYw# tj|w#t$rYwwxYwxYw)Nsuffix) tempfilemkstemposwriteclosepathlibPathremoveFileNotFoundError)rr)fdraw_paths r _tempfiler5Es #6222LB   HR " " " HRLLLLBHRLLLL l8$$$$$  Ih          DD   Ih         D sRAB'A%%B'B B$#B$'C)B>=C> C C C  Cc8t|j|jS)zu Given a Traversable object, return that object as a path on the local file system in a context manager. r()r5 read_bytesrpaths r as_filer:Ys T_TY 7 7 77rc#K|VdS)z7 Degenerate behavior for pathlib.Path objects. Nr8s r _r=bs JJJJJr)r&)r,r/r* functools contextlibrrtypingrrabcrr_compatrrstrPackagerrr r r contextmanagerr5singledispatchr:registerr0r=r<rr rHsv  """""""",,,,,,,,  #% &..."YYY    & 888 ',  rPK|5Z6**aLib/site-packages/pkg_resources/_vendor/importlib_resources/__pycache__/_adapters.cpython-311.pycnuW+A ^;dddlmZddlmZddlmZGddZGddZdd ZGd d Z d Z dS))suppress) TextIOWrapper)abcc$eZdZdZdfdZdZdS)SpecLoaderAdapterz> Adapt a package spec to adapt the underlying loader. c|jSN)loaderspecs E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/importlib_resources/_adapters.pyzSpecLoaderAdapter. s$+c4||_|||_dSr )r r )selfr adapters r__init__zSpecLoaderAdapter.__init__ s gdmm rc,t|j|Sr )getattrr rnames r __getattr__zSpecLoaderAdapter.__getattr__sty$'''rN)__name__ __module__ __qualname____doc__rrrrrrsI&>%=$$$$(((((rrceZdZdZdZdZdS)TraversableResourcesLoaderz9 Adapt a loader to provide TraversableResources. c||_dSr r rr s rrz#TraversableResourcesLoader.__init__  rcNt|jSr )CompatibilityFilesr _nativers rget_resource_readerz.TraversableResourcesLoader.get_resource_readers!$),,44666rN)rrrrrr'rrrr r s<77777rr rc|dkrt|g|Ri|S|dkr|Std|)Nr(rbz8Invalid mode value '{}', only 'r' and 'rb' are supported)r ValueErrorformat)filemodeargskwargss r _io_wrapperr1 sZ s{{T3D333F333  BII$OO  rceZdZdZGddejZGddejZGddejZdZ e d Z d Z d Z d Zd S)r%zj Adapter for an existing or non-existent resource reader to provide a compatibility .files(). cLeZdZdZdZdZdZeZdZe dZ d dZ d S) CompatibilityFiles.SpecPathzk Path tied to a module spec. Can be read and exposes the resource reader children. c"||_||_dSr )_spec_reader)rr readers rrz$CompatibilityFiles.SpecPath.__init__6sDJ!DLLLrcjstdStfdjDS)Nrc3XK|]$}tj|V%dSr )r% ChildPathr7).0pathrs r z6CompatibilityFiles.SpecPath.iterdir..=sI#,,T\4@@r)r7itercontentsrs`riterdirz#CompatibilityFiles.SpecPath.iterdir:s^< Bxx L1133 rcdSNFrrAs ris_filez#CompatibilityFiles.SpecPath.is_fileB5rc|jst|St|j|Sr )r7r% OrphanPathr;rothers rjoinpathz$CompatibilityFiles.SpecPath.joinpathGs8< <)44U;;;%// eDD Drc|jjSr )r6rrAs rrz CompatibilityFiles.SpecPath.nameLs :? "rr(cTt|jd|g|Ri|Sr )r1r7 open_resourcerr.r/r0s ropenz CompatibilityFiles.SpecPath.openPs3t|99$??WWWWPVWW WrNr( rrrrrrBrEis_dirrKpropertyrrPrrrSpecPathr40s   " " "       E E E  # #  # X X X X X XrrUcNeZdZdZdZdZdZdZdZe dZ d d Z d S) CompatibilityFiles.ChildPathzw Path tied to a resource reader child. Can be read but doesn't expose any meaningful children. c"||_||_dSr )r7_name)rr8rs rrz%CompatibilityFiles.ChildPath.__init__Ys!DLDJJJrc tdSNrr?rAs rrBz$CompatibilityFiles.ChildPath.iterdir] 88Orc@|j|jSr )r7 is_resourcerrAs rrEz$CompatibilityFiles.ChildPath.is_file`s<++DI66 6rc,| Sr )rErAs rrSz#CompatibilityFiles.ChildPath.is_dircs||~~% %rcBt|j|Sr )r%rHrrIs rrKz%CompatibilityFiles.ChildPath.joinpathfs%00EBB Brc|jSr )rYrAs rrz!CompatibilityFiles.ChildPath.nameis : rr(c^t|j|j|g|Ri|Sr )r1r7rNrrOs rrPz!CompatibilityFiles.ChildPath.openmsE **4955t>BFL rNrQrRrrrr;rWSs         7 7 7 & & & C C C           rr;cLeZdZdZdZdZdZeZdZe dZ d dZ d S) CompatibilityFiles.OrphanPathz Orphan path, not tied to a module spec or resource reader. Can't be read and doesn't expose any meaningful children. cXt|dkrtd||_dS)Nrz/Need at least one path part to construct a path)lenr+_path)r path_partss rrz&CompatibilityFiles.OrphanPath.__init__xs-:"" !RSSS#DJJJrc tdSr[r\rAs rrBz%CompatibilityFiles.OrphanPath.iterdir}r]rcdSrDrrAs rrEz%CompatibilityFiles.OrphanPath.is_filerFrc2tjg|j|RSr )r%rHrhrIs rrKz&CompatibilityFiles.OrphanPath.joinpaths %0D$*DeDDD Drc|jdS)N)rhrAs rrz"CompatibilityFiles.OrphanPath.names:b> !rr(c td)NzCan't open orphan path)FileNotFoundErrorrOs rrPz"CompatibilityFiles.OrphanPath.opens#$<== =rNrQrRrrrrHrers   $ $ $        E E E  " "  " > > > > > >rrHc||_dSr r r"s rrzCompatibilityFiles.__init__r#rctt5|jj|jjcdddS#1swxYwYdSr )rAttributeErrorr r r'rrAs rr7zCompatibilityFiles._readers n % % H H9#77 GG H H H H H H H H H H H H H H H H H Hs)A  AAc8|j}t|dr|n|S)zB Return the native reader if it supports files(). files)r7hasattr)rr8s rr&zCompatibilityFiles._natives$ 11;vvt;rc,t|j|Sr )rr7)rattrs rrzCompatibilityFiles.__getattr__st|T***rcLt|j|jSr )r%rUr r7rAs rruzCompatibilityFiles.filess!**49dlCCCrN)rrrrr TraversablerUr;rHrrTr7r&rrurrrr%r%*s  !X!X!X!X!X3?!X!X!XFCO>>>>>>S_>>>:HHXH<<<+++DDDDDrr%c6t|jtS)z` Construct a package spec with traversable compatibility on the spec/loader/reader. )r__spec__r )packages r wrap_specr~s W-/I J JJrNrQ) contextlibriorrrr r1r%r~rrrrs ( ( ( ( ( ( ( ( 7 7 7 7 7 7 7 7xDxDxDxDxDxDxDxDvKKKKKrPK|5Z _Lib/site-packages/pkg_resources/_vendor/importlib_resources/__pycache__/readers.cpython-311.pycnuW+A ^;d ddlZddlZddlZddlmZddlmZddlmZdZ Gddej Z Gd d ej Z Gd d ej ZGd dej ZdS)N)abc)unique_everseen)ZipPathcZttj|SN)iter collections OrderedDictfromkeys)itemss E:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/_vendor/importlib_resources/readers.pyremove_duplicatesr s!  '0077 8 88c eZdZdZdZdZdS) FileReadercLtj|jj|_dSr)pathlibPathpathparent)selfloaders r__init__zFileReader.__init__sL--4 rcPt|j|Sz{ Return the file system path to prevent `resources.path()` from creating a temporary copy. strrjoinpathrresources r resource_pathzFileReader.resource_path" 49%%h//000rc|jSrrrs rfileszFileReader.files yrN__name__ __module__ __qualname__rr"r'rrrrsA555111rrc0eZdZdZfdZdZdZxZS) ZipReaderc|d\}}}|jdd|zdz|_|j|_dS)N.\/) rpartitionprefixreplacearchive)rrmodule_names rrzZipReader.__init__ sK&&s++ 1dm++D#66=C ~ rc t|S#t$r}t|jdd}~wwxYwNr)super open_resourceKeyErrorFileNotFoundErrorargs)rr!exc __class__s rr>zZipReader.open_resource%sS 177((22 2 1 1 1#CHQK00 0 1s $ A AA c||}|o|Sr)r'ris_fileexists)rrtargets r is_resourcezZipReader.is_resource+s<&&t,,~~3FMMOO3rc6t|j|jSr)rr7r5r&s rr'zZipReader.files1st|T[111r)r*r+r,rr>rHr' __classcell__)rCs@rr/r/se&&& 11111 444 2222222rr/cbeZdZdZdZdZdZdZdZdZ dZ e Z d Z e d Zd Zd S) MultiplexedPathz Given a series of Traversable objects, implement a merged version of the interface across all objects. Useful for namespace packages which may be multihomed at a single name. ctttjt ||_|jsd}t |td|jDstddS)Nz.MultiplexedPath must contain at least one pathc3>K|]}|VdSr)is_dir.0rs r z+MultiplexedPath.__init__..Bs*99T4;;==999999rz)MultiplexedPath only supports directories) listmaprrr_pathsr@allNotADirectoryError)rpathsmessages rrzMultiplexedPath.__init__=s3w|->u-E-EFFGG { -FG#G,, ,99T[99999 R$%PQQ Q R Rrcjd|jD}t|tjdS)Nc3HK|]}|D]}|VdSr)iterdir)rQrfiles rrRz*MultiplexedPath.iterdir..Fs7II$$,,..II$IIIIIIIrr:)key)rUroperator attrgetter)rr's rr\zMultiplexedPath.iterdirEs5II$+IIIu(*=f*E*EFFFFrc&t|dNz is not a filer@r&s r read_byteszMultiplexedPath.read_bytesI4 7 7 7888rc&t|drbrcrrAkwargss r read_textzMultiplexedPath.read_textLrercdS)NTr-r&s rrOzMultiplexedPath.is_dirOstrcdS)NFr-r&s rrEzMultiplexedPath.is_fileRsurcn|D]}|j|kr|cS|jd|z Sr<)r\r:rU)rchildr]s rrzMultiplexedPath.joinpathUsGLLNN  DyE!! "{1~%%rc&t|drbrcrgs ropenzMultiplexedPath.open_rerc&|jdjSr<)rUr:r&s rr:zMultiplexedPath.namebs{1~""rcVdd|jD}d|dS)Nz, c3"K|] }d|dV dS)'Nr-rPs rrRz+MultiplexedPath.__repr__..gs*>>$+d+++>>>>>>rzMultiplexedPath())joinrU)rrXs r__repr__zMultiplexedPath.__repr__fs5 >>$+>>>>>*%****rN)r*r+r,__doc__rr\rdrirOrEr __truediv__ropropertyr:rvr-rrrLrL5sRRRGGG999999&&&K999##X#+++++rrLc eZdZdZdZdZdS)NamespaceReaderc|dt|vrtdtt||_dS)N NamespacePathz Invalid path)r ValueErrorrLrSr)rnamespace_paths rrzNamespaceReader.__init__ls; #n"5"5 5 5^,, ,#T.%9%9: rcPt|j|Srrr s rr"zNamespaceReader.resource_pathqr#rc|jSrr%r&s rr'zNamespaceReader.filesyr(rNr)r-rrr{r{ksA;;; 111rr{)r rr_r _itertoolsr_compatrrTraversableResourcesrr/ TraversablerLr{r-rrrs&''''''999     )    22222(222,3+3+3+3+3+co3+3+3+lc.rPK|5ZoqGLib/site-packages/pkg_resources/_vendor/importlib_resources/__init__.pynuW+A"""Read resources contained within a package.""" from ._common import ( as_file, files, Package, ) from ._legacy import ( contents, open_binary, read_binary, open_text, read_text, is_resource, path, Resource, ) from .abc import ResourceReader __all__ = [ 'Package', 'Resource', 'ResourceReader', 'as_file', 'contents', 'files', 'is_resource', 'open_binary', 'open_text', 'path', 'read_binary', 'read_text', ] PK|5Z}>..BLib/site-packages/pkg_resources/_vendor/importlib_resources/abc.pynuW+Aimport abc from typing import BinaryIO, Iterable, Text from ._compat import runtime_checkable, Protocol class ResourceReader(metaclass=abc.ABCMeta): """Abstract base class for loaders to provide resource reading support.""" @abc.abstractmethod def open_resource(self, resource: Text) -> BinaryIO: """Return an opened, file-like object for binary reading. The 'resource' argument is expected to represent only a file name. If the resource cannot be found, FileNotFoundError is raised. """ # This deliberately raises FileNotFoundError instead of # NotImplementedError so that if this method is accidentally called, # it'll still do the right thing. raise FileNotFoundError @abc.abstractmethod def resource_path(self, resource: Text) -> Text: """Return the file system path to the specified resource. The 'resource' argument is expected to represent only a file name. If the resource does not exist on the file system, raise FileNotFoundError. """ # This deliberately raises FileNotFoundError instead of # NotImplementedError so that if this method is accidentally called, # it'll still do the right thing. raise FileNotFoundError @abc.abstractmethod def is_resource(self, path: Text) -> bool: """Return True if the named 'path' is a resource. Files are resources, directories are not. """ raise FileNotFoundError @abc.abstractmethod def contents(self) -> Iterable[str]: """Return an iterable of entries in `package`.""" raise FileNotFoundError @runtime_checkable class Traversable(Protocol): """ An object with a subset of pathlib.Path methods suitable for traversing directories and opening files. """ @abc.abstractmethod def iterdir(self): """ Yield Traversable objects in self """ def read_bytes(self): """ Read contents of self as bytes """ with self.open('rb') as strm: return strm.read() def read_text(self, encoding=None): """ Read contents of self as text """ with self.open(encoding=encoding) as strm: return strm.read() @abc.abstractmethod def is_dir(self) -> bool: """ Return True if self is a directory """ @abc.abstractmethod def is_file(self) -> bool: """ Return True if self is a file """ @abc.abstractmethod def joinpath(self, child): """ Return Traversable child in self """ def __truediv__(self, child): """ Return Traversable child in self """ return self.joinpath(child) @abc.abstractmethod def open(self, mode='r', *args, **kwargs): """ mode may be 'r' or 'rb' to open as text or binary. Return a handle suitable for reading (same as pathlib.Path.open). When opening as text, accepts encoding parameters such as those accepted by io.TextIOWrapper. """ @abc.abstractproperty def name(self) -> str: """ The base name of this object without any parent references. """ class TraversableResources(ResourceReader): """ The required interface for providing traversable resources. """ @abc.abstractmethod def files(self): """Return a Traversable object for the loaded package.""" def open_resource(self, resource): return self.files().joinpath(resource).open('rb') def resource_path(self, resource): raise FileNotFoundError(resource) def is_resource(self, path): return self.files().joinpath(path).is_file() def contents(self): return (item.name for item in self.files().iterdir()) PK|5Zc  ELib/site-packages/pkg_resources/_vendor/importlib_resources/simple.pynuW+A""" Interface adapters for low-level readers. """ import abc import io import itertools from typing import BinaryIO, List from .abc import Traversable, TraversableResources class SimpleReader(abc.ABC): """ The minimum, low-level interface required from a resource provider. """ @abc.abstractproperty def package(self): # type: () -> str """ The name of the package for which this reader loads resources. """ @abc.abstractmethod def children(self): # type: () -> List['SimpleReader'] """ Obtain an iterable of SimpleReader for available child containers (e.g. directories). """ @abc.abstractmethod def resources(self): # type: () -> List[str] """ Obtain available named resources for this virtual package. """ @abc.abstractmethod def open_binary(self, resource): # type: (str) -> BinaryIO """ Obtain a File-like for a named resource. """ @property def name(self): return self.package.split('.')[-1] class ResourceHandle(Traversable): """ Handle to a named resource in a ResourceReader. """ def __init__(self, parent, name): # type: (ResourceContainer, str) -> None self.parent = parent self.name = name # type: ignore def is_file(self): return True def is_dir(self): return False def open(self, mode='r', *args, **kwargs): stream = self.parent.reader.open_binary(self.name) if 'b' not in mode: stream = io.TextIOWrapper(*args, **kwargs) return stream def joinpath(self, name): raise RuntimeError("Cannot traverse into a resource") class ResourceContainer(Traversable): """ Traversable container for a package's resources via its reader. """ def __init__(self, reader): # type: (SimpleReader) -> None self.reader = reader def is_dir(self): return True def is_file(self): return False def iterdir(self): files = (ResourceHandle(self, name) for name in self.reader.resources) dirs = map(ResourceContainer, self.reader.children()) return itertools.chain(files, dirs) def open(self, *args, **kwargs): raise IsADirectoryError() def joinpath(self, name): return next( traversable for traversable in self.iterdir() if traversable.name == name ) class TraversableReader(TraversableResources, SimpleReader): """ A TraversableResources based on SimpleReader. Resource providers may derive from this class to provide the TraversableResources interface by supplying the SimpleReader interface. """ def files(self): return ResourceContainer(self) PK|5ZD FLib/site-packages/pkg_resources/_vendor/importlib_resources/readers.pynuW+Aimport collections import pathlib import operator from . import abc from ._itertools import unique_everseen from ._compat import ZipPath def remove_duplicates(items): return iter(collections.OrderedDict.fromkeys(items)) class FileReader(abc.TraversableResources): def __init__(self, loader): self.path = pathlib.Path(loader.path).parent def resource_path(self, resource): """ Return the file system path to prevent `resources.path()` from creating a temporary copy. """ return str(self.path.joinpath(resource)) def files(self): return self.path class ZipReader(abc.TraversableResources): def __init__(self, loader, module): _, _, name = module.rpartition('.') self.prefix = loader.prefix.replace('\\', '/') + name + '/' self.archive = loader.archive def open_resource(self, resource): try: return super().open_resource(resource) except KeyError as exc: raise FileNotFoundError(exc.args[0]) def is_resource(self, path): # workaround for `zipfile.Path.is_file` returning true # for non-existent paths. target = self.files().joinpath(path) return target.is_file() and target.exists() def files(self): return ZipPath(self.archive, self.prefix) class MultiplexedPath(abc.Traversable): """ Given a series of Traversable objects, implement a merged version of the interface across all objects. Useful for namespace packages which may be multihomed at a single name. """ def __init__(self, *paths): self._paths = list(map(pathlib.Path, remove_duplicates(paths))) if not self._paths: message = 'MultiplexedPath must contain at least one path' raise FileNotFoundError(message) if not all(path.is_dir() for path in self._paths): raise NotADirectoryError('MultiplexedPath only supports directories') def iterdir(self): files = (file for path in self._paths for file in path.iterdir()) return unique_everseen(files, key=operator.attrgetter('name')) def read_bytes(self): raise FileNotFoundError(f'{self} is not a file') def read_text(self, *args, **kwargs): raise FileNotFoundError(f'{self} is not a file') def is_dir(self): return True def is_file(self): return False def joinpath(self, child): # first try to find child in current paths for file in self.iterdir(): if file.name == child: return file # if it does not exist, construct it with the first path return self._paths[0] / child __truediv__ = joinpath def open(self, *args, **kwargs): raise FileNotFoundError(f'{self} is not a file') @property def name(self): return self._paths[0].name def __repr__(self): paths = ', '.join(f"'{path}'" for path in self._paths) return f'MultiplexedPath({paths})' class NamespaceReader(abc.TraversableResources): def __init__(self, namespace_path): if 'NamespacePath' not in str(namespace_path): raise ValueError('Invalid path') self.path = MultiplexedPath(*list(namespace_path)) def resource_path(self, resource): """ Return the file system path to prevent `resources.path()` from creating a temporary copy. """ return str(self.path.joinpath(resource)) def files(self): return self.path PK|5Z'HLib/site-packages/pkg_resources/_vendor/importlib_resources/_adapters.pynuW+Afrom contextlib import suppress from io import TextIOWrapper from . import abc class SpecLoaderAdapter: """ Adapt a package spec to adapt the underlying loader. """ def __init__(self, spec, adapter=lambda spec: spec.loader): self.spec = spec self.loader = adapter(spec) def __getattr__(self, name): return getattr(self.spec, name) class TraversableResourcesLoader: """ Adapt a loader to provide TraversableResources. """ def __init__(self, spec): self.spec = spec def get_resource_reader(self, name): return CompatibilityFiles(self.spec)._native() def _io_wrapper(file, mode='r', *args, **kwargs): if mode == 'r': return TextIOWrapper(file, *args, **kwargs) elif mode == 'rb': return file raise ValueError( "Invalid mode value '{}', only 'r' and 'rb' are supported".format(mode) ) class CompatibilityFiles: """ Adapter for an existing or non-existent resource reader to provide a compatibility .files(). """ class SpecPath(abc.Traversable): """ Path tied to a module spec. Can be read and exposes the resource reader children. """ def __init__(self, spec, reader): self._spec = spec self._reader = reader def iterdir(self): if not self._reader: return iter(()) return iter( CompatibilityFiles.ChildPath(self._reader, path) for path in self._reader.contents() ) def is_file(self): return False is_dir = is_file def joinpath(self, other): if not self._reader: return CompatibilityFiles.OrphanPath(other) return CompatibilityFiles.ChildPath(self._reader, other) @property def name(self): return self._spec.name def open(self, mode='r', *args, **kwargs): return _io_wrapper(self._reader.open_resource(None), mode, *args, **kwargs) class ChildPath(abc.Traversable): """ Path tied to a resource reader child. Can be read but doesn't expose any meaningful children. """ def __init__(self, reader, name): self._reader = reader self._name = name def iterdir(self): return iter(()) def is_file(self): return self._reader.is_resource(self.name) def is_dir(self): return not self.is_file() def joinpath(self, other): return CompatibilityFiles.OrphanPath(self.name, other) @property def name(self): return self._name def open(self, mode='r', *args, **kwargs): return _io_wrapper( self._reader.open_resource(self.name), mode, *args, **kwargs ) class OrphanPath(abc.Traversable): """ Orphan path, not tied to a module spec or resource reader. Can't be read and doesn't expose any meaningful children. """ def __init__(self, *path_parts): if len(path_parts) < 1: raise ValueError('Need at least one path part to construct a path') self._path = path_parts def iterdir(self): return iter(()) def is_file(self): return False is_dir = is_file def joinpath(self, other): return CompatibilityFiles.OrphanPath(*self._path, other) @property def name(self): return self._path[-1] def open(self, mode='r', *args, **kwargs): raise FileNotFoundError("Can't open orphan path") def __init__(self, spec): self.spec = spec @property def _reader(self): with suppress(AttributeError): return self.spec.loader.get_resource_reader(self.spec.name) def _native(self): """ Return the native reader if it supports files(). """ reader = self._reader return reader if hasattr(reader, 'files') else self def __getattr__(self, attr): return getattr(self._reader, attr) def files(self): return CompatibilityFiles.SpecPath(self.spec, self._reader) def wrap_spec(package): """ Construct a package spec with traversable compatibility on the spec/loader/reader. """ return SpecLoaderAdapter(package.__spec__, TraversableResourcesLoader) PK|5Z0Q} FLib/site-packages/pkg_resources/_vendor/importlib_resources/_common.pynuW+Aimport os import pathlib import tempfile import functools import contextlib import types import importlib from typing import Union, Optional from .abc import ResourceReader, Traversable from ._compat import wrap_spec Package = Union[types.ModuleType, str] def files(package): # type: (Package) -> Traversable """ Get a Traversable resource from a package """ return from_package(get_package(package)) def get_resource_reader(package): # type: (types.ModuleType) -> Optional[ResourceReader] """ Return the package's loader if it's a ResourceReader. """ # We can't use # a issubclass() check here because apparently abc.'s __subclasscheck__() # hook wants to create a weak reference to the object, but # zipimport.zipimporter does not support weak references, resulting in a # TypeError. That seems terrible. spec = package.__spec__ reader = getattr(spec.loader, 'get_resource_reader', None) # type: ignore if reader is None: return None return reader(spec.name) # type: ignore def resolve(cand): # type: (Package) -> types.ModuleType return cand if isinstance(cand, types.ModuleType) else importlib.import_module(cand) def get_package(package): # type: (Package) -> types.ModuleType """Take a package name or module object and return the module. Raise an exception if the resolved module is not a package. """ resolved = resolve(package) if wrap_spec(resolved).submodule_search_locations is None: raise TypeError(f'{package!r} is not a package') return resolved def from_package(package): """ Return a Traversable object for the given package. """ spec = wrap_spec(package) reader = spec.loader.get_resource_reader(spec.name) return reader.files() @contextlib.contextmanager def _tempfile(reader, suffix=''): # Not using tempfile.NamedTemporaryFile as it leads to deeper 'try' # blocks due to the need to close the temporary file to work on Windows # properly. fd, raw_path = tempfile.mkstemp(suffix=suffix) try: try: os.write(fd, reader()) finally: os.close(fd) del reader yield pathlib.Path(raw_path) finally: try: os.remove(raw_path) except FileNotFoundError: pass @functools.singledispatch def as_file(path): """ Given a Traversable object, return that object as a path on the local file system in a context manager. """ return _tempfile(path.read_bytes, suffix=path.name) @as_file.register(pathlib.Path) @contextlib.contextmanager def _(path): """ Degenerate behavior for pathlib.Path objects. """ yield path PK|5ZoKLib/site-packages/pkg_resources/extern/__pycache__/__init__.cpython-311.pycnuW+A ^;dz pddlZddlZGddZdZeeedS)NcVeZdZdZd dZedZdZdZdZ d Z d d Z d Z dS)VendorImporterz A PEP 302 meta path importer for finding optionally-vendored or otherwise naturally-installed packages from root_name. Ncv||_t||_|p|dd|_dS)Nextern_vendor) root_namesetvendored_namesreplace vendor_pkg)selfr r r s lE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/extern/__init__.py__init__zVendorImporter.__init__ s9"!.11$N (9(9(I(N(Nc#*K|jdzVdVdS)zL Search first the vendor package then as a natural package. .N)r rs r search_pathzVendorImporter.search_paths( o####rc||jdz\}}}| o&tt|j|jS)z,Figure out if the target module is vendored.r) partitionr anymap startswithr )rfullnamerootbasetargets r_module_matches_namespacez(VendorImporter._module_matches_namespacesH%//0DEEdFxLCF$5t7J K KLLLrc6||jdz\}}}|jD]K} ||z}t|tj|}|tj|<|cS#t $rYHwxYwt djdit)zK Iterate over the search path to locate and load fullname. rzThe '{target}' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.Nr) rr r __import__sysmodules ImportErrorformatlocals)rrrrrprefixextantmods r load_modulezVendorImporter.load_modules&//0DEEdF&  F &6"""k&)(+ H%     ' !'33*033 s6A%% A21A2c6||jSN)r+name)rspecs r create_modulezVendorImporter.create_module3s ***rcdSr-r)rmodules r exec_modulezVendorImporter.exec_module6s rcp||r tj||ndS)z(Return a module spec for vendored names.N)r importlibutilspec_from_loader)rrpathrs r find_speczVendorImporter.find_spec9s:--h77 BIN + +Hd ; ; ;=A rcd|tjvr!tj|dSdS)zR Install this importer into sys.meta_path if not already present. N)r# meta_pathappendrs rinstallzVendorImporter.install@s5 s} $ $ M  & & & & & % $r)rN)NN) __name__ __module__ __qualname____doc__rpropertyrr r+r0r3r9r=rrrrrs OOOO XMMM ,+++       '''''rr) packaging pyparsingappdirsjaracoimportlib_resourcesmore_itertools)importlib.utilr5r#rnamesr>r=rrrrKsx @'@'@'@'@'@'@'@'F x'')))))rPK|5Zz z 2Lib/site-packages/pkg_resources/extern/__init__.pynuW+Aimport importlib.util import sys class VendorImporter: """ A PEP 302 meta path importer for finding optionally-vendored or otherwise naturally-installed packages from root_name. """ def __init__(self, root_name, vendored_names=(), vendor_pkg=None): self.root_name = root_name self.vendored_names = set(vendored_names) self.vendor_pkg = vendor_pkg or root_name.replace('extern', '_vendor') @property def search_path(self): """ Search first the vendor package then as a natural package. """ yield self.vendor_pkg + '.' yield '' def _module_matches_namespace(self, fullname): """Figure out if the target module is vendored.""" root, base, target = fullname.partition(self.root_name + '.') return not root and any(map(target.startswith, self.vendored_names)) def load_module(self, fullname): """ Iterate over the search path to locate and load fullname. """ root, base, target = fullname.partition(self.root_name + '.') for prefix in self.search_path: try: extant = prefix + target __import__(extant) mod = sys.modules[extant] sys.modules[fullname] = mod return mod except ImportError: pass else: raise ImportError( "The '{target}' package is required; " "normally this is bundled with this package so if you get " "this warning, consult the packager of your " "distribution.".format(**locals()) ) def create_module(self, spec): return self.load_module(spec.name) def exec_module(self, module): pass def find_spec(self, fullname, path=None, target=None): """Return a module spec for vendored names.""" return ( importlib.util.spec_from_loader(fullname, self) if self._module_matches_namespace(fullname) else None ) def install(self): """ Install this importer into sys.meta_path if not already present. """ if self not in sys.meta_path: sys.meta_path.append(self) names = ( 'packaging', 'pyparsing', 'appdirs', 'jaraco', 'importlib_resources', 'more_itertools', ) VendorImporter(__name__, names).install() PK|5Zs̲fofoDLib/site-packages/pkg_resources/__pycache__/__init__.cpython-311.pycnuW+A ^;d@ dZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddl mZ ddlZn#e$rddlZYnwxYw en #e $re!ZYnwxYwddlm"Z" ddlm#Z#m$Z$m%Z%dZ&n #e$rdZ&YnwxYwddlm'Z(dd l)m*Z*m+Z+ ddl,m-Z.e.j/n #e$rdZ.YnwxYwdd l0m1Z1m2Z2m3Z3dd l4m5Z5dd l4m6Z6e7d e7de7de7de7dej8dkr e9ddZ:dZ;dZdZ?dZ@dZAdZBdZCdZDdZEdZFdZGdZHdZIdZJGddeKZLdZMiZNdZOdZPdZQdZRdZSdZTdZUdxZVZWdZXgd ZYGd!d"eZZ[Gd#d$e[Z\Gd%d&e\Z]Gd'd(e[Z^Gd)d*e[Z_iZ`d+jaej8Zbd,Zcd-Zdd.ZedZfd/Zgd0Zhd1Zigfd2Zjd3Zkd4Zlejmd5Znejmd6ZoelZpd7Zqd8ZrerZsd9Ztd:Zudd;Zvd<ZwGd=d>ZxGd?d@exZyGdAdBZzGdCdDe{Z|GdEdFZ}e}Z~GdGdHe9ZGdIdJZdKZdLZdMZdNZdOZdPZddQZGdRdSZeheedTZGdUdVeZGdWdXeZeGdYdZeZeZGd[d\e{ZGd]d^eZGd_d`eZehejeGdadbeZGdcddeZGdedfeZeOdgihdiZddjZddkZeejeddlZeeedmZddnZdoZGdpdqZdrZdsZdtZduZee jeee.dvree.jeeOdgiweOdgixdyZdzZd{Zd|Zdd}Zd~Zee jeeejeee.dvree.jedZeeedZdZifdZdZdZdZdZejmdjZejmdejejzjZGddZdZGddZGddeZGddeZeeedZdZdZGdde6jjZGdde6jjZdZdZdZdZdZdZe jdeLddZeeͦfdZGddeϦZedZdS)aZ Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipulate resource names being passed into the API. The package resource API is designed to work with normal filesystem packages, .egg files, and unpacked .egg files. It can also work in a limited way with .zip files and with custom PEP 302 loaders that support the ``get_data()`` method. N) get_importer)utime)mkdirrenameunlinkTF)open)isdirsplit) yield_lines drop_commentjoin_continuation)appdirs) packagingz&pkg_resources.extern.packaging.versionz)pkg_resources.extern.packaging.specifiersz+pkg_resources.extern.packaging.requirementsz&pkg_resources.extern.packaging.markersz$pkg_resources.extern.packaging.utils)zPython 3.5 or later is requiredceZdZdZdS) PEP440Warningza Used when there is an issue with a version or specifier not complying with PEP 440. N__name__ __module__ __qualname____doc__eE:\SERVIDOR CONVERSOR DE PDF NODE JS\conversor-pdf-t\venv\Lib\site-packages\pkg_resources/__init__.pyrrpsrrc tj|S#tjj$r?t j|dt tj|cYSwxYw)NzD is an invalid version and will not be supported in a future release)rversionVersionInvalidVersionwarningswarnPkgResourcesDeprecationWarning LegacyVersion)vs r parse_versionr%ws2 ((+++   +222     *    ..q11111 2s!AA43A4c t|tt||dSN)globalsupdate _state_varsdictfromkeys)vartypekws r_declare_stater/sB IIRt}}R1122222rci}t}tD]"\}}|d|z||||<#|S)N_sget_)r(r*itemsstategkr$s r __getstate__r7sU E A!!##))1"1X\?1Q4((a Lrct}|D],\}}|dt|z||||-|S)N_sset_)r(r2r*r3s r __setstate__r:sT A 111$([^ #$Q!a0000 Lrc*|Sr')copyvals r _sget_dictr?s 88::rcX|||dSr')clearr)keyobr4s r _sset_dictrEs'HHJJJIIerc*|Sr')r7r=s r _sget_objectrGs     rc0||dSr')r:rBs r _sset_objectrIsOOErcdSr'rargss rrMsrc t}t|}|ctjdkrSddt ddd|d}n#t$rYnwxYw|S)aQReturn this platform's maximum compatible version. distutils.util.get_platform() normally reports the minimum version of macOS that would be required to *use* extensions produced by distutils. But what we want when checking compatibility is to know the version of macOS that we are *running*. To allow usage of packages that explicitly require a newer version of macOS, we must also know the current version of the OS. If this condition occurs for any other platform with a version in its platform strings, this function should be extended accordingly. Ndarwinmacosx-.-r) get_build_platformmacosVersionStringmatchsysplatformjoin _macos_versgroup ValueError)platms rget_supported_platformr_s   D  &&A}11 %(XXkmmBQB.?%@%@%@%@!''!***MDD    D  KsAA>> B  B )Grequire run_script get_providerget_distributionload_entry_point get_entry_mapget_entry_infoiter_entry_pointsresource_stringresource_streamresource_filenameresource_listdirresource_existsresource_isdirdeclare_namespace working_setadd_activation_listenerfind_distributionsset_extraction_pathcleanup_resourcesget_default_cache Environment WorkingSetResourceManager Distribution Requirement EntryPointResolutionErrorVersionConflictDistributionNotFound UnknownExtraExtractionErrorrparse_requirementsr% safe_name safe_version get_platformcompatible_platformsr split_sections safe_extra to_filenameinvalid_markerevaluate_markerensure_directorynormalize_pathEGG_DIST BINARY_DIST SOURCE_DIST CHECKOUT_DIST DEVELOP_DISTIMetadataProviderIResourceProvider FileMetadata PathMetadata EggMetadata EmptyProviderempty_provider NullProvider EggProviderDefaultProvider ZipProviderregister_finderregister_namespace_handlerregister_loader_typefixup_namespace_packagesrr"run_mainAvailableDistributionsceZdZdZdZdS)r{z.Abstract base for dependency resolution errorscD|jjt|jzSr') __class__rreprrLselfs r__repr__zResolutionError.__repr__s~&di88rN)rrrrrrrrr{r{s)8899999rr{cNeZdZdZdZedZedZdZdZ dS)r|z An already-installed version conflicts with the requested version. Should be initialized with the installed Distribution and the requested Requirement. z3{self.dist} is installed but {self.req} is requiredc|jdSNrrKrs rdistzVersionConflict.dist y|rc|jdSNrKrs rreqzVersionConflict.req rrc>|jjditSNr _templateformatlocalsrs rreportzVersionConflict.report!$t~$00vxx000rc2|s|S|j|fz}t|S)zt If required_by is non-empty, return a version of self that is a ContextualVersionConflict. )rLContextualVersionConflict)r required_byrLs r with_contextzVersionConflict.with_contexts*  KyK>)($//rN) rrrrrpropertyrrrrrrrr|r|sxFI XX11100000rr|c<eZdZdZejdzZedZdS)rz A VersionConflict that accepts a third parameter, the set of the requirements that required the installed Distribution. z by {self.required_by}c|jdS)NrRrKrs rrz%ContextualVersionConflict.required_by'rrN)rrrrr|rrrrrrrrsG  ),DDI XrrcdeZdZdZdZedZedZedZdZ dZ dS) r}z&A requested distribution was not foundzSThe '{self.req}' distribution was not found and is required by {self.requirers_str}c|jdSrrKrs rrzDistributionNotFound.req2rrc|jdSrrKrs r requirerszDistributionNotFound.requirers6rrcH|jsdSd|jS)Nzthe applicationz, )rrYrs r requirers_strz"DistributionNotFound.requirers_str:s&~ %$$yy(((rc>|jjditSrrrs rrzDistributionNotFound.report@rrc*|Sr')rrs r__str__zDistributionNotFound.__str__Cs{{}}rN) rrrrrrrrrrrrrrr}r},s00;IXX))X) 111rr}ceZdZdZdS)r~z>Distribution doesn't have an "extra feature" of the given nameNrrrrr~r~GsHHHHrr~z{}.{}rrRrc|t|<dS)aRegister `provider_factory` to make providers for `loader_type` `loader_type` is the type or class of a PEP 302 ``module.__loader__``, and `provider_factory` is a function that, passed a *module* object, returns an ``IResourceProvider`` for that module. N)_provider_factories) loader_typeprovider_factorys rrrUs(8 $$$rct|tr>D |x (B(B !mmGhjjm++C55G$GAJWQZG$$(     D  KsA5B-- B:9B:zmacosx-(\d+)\.(\d+)-(.*)zdarwin-(\d+)\.(\d+)\.(\d+)-(.*)c||||krdSt|}|rGt|}|st|}|rit|d}|dd|d}|dkr|dks |dkr|d krdSd S|d|dks,|d |d krd St|dt|dkrd SdSd S) zCan code for the `provided` platform run on the `required` platform? Returns true if either platform is ``None``, or the platforms are equal. XXX Needs compatibility checks for Linux and other unixy OSes. NTrrQrRz10.3z10.4Fr)rUrVdarwinVersionStringrr[)providedrequiredreqMacprovMac provDarwindversion macosversions rrrsq8+x8/C/Ct % %h / /F $**844 -228<DHHJJJBzN Iq$$["55555rct|trt|}t|trt |}t|t st d||S)z@Return a current distribution object for a Requirement or stringz-Expected string, Requirement, or Distribution)rrryparserbrx TypeErrorrs rrcrcso$'  &&$ $$"D!! dL ) )OGNNN KrcHt|||S)zDReturn `name` entry point of `group` for `dist` or raise ImportError)rcrdrr[r s rrdrds D ! ! 2 25$ ? ??rcFt||S)=Return the entry point map for `group`, or the full entry map)rcre)rr[s rreres D ! ! / / 6 66rcHt|||SzIs the named metadata a directory? (like ``os.path.isdir()``)Nrrs rmetadata_isdirz IMetadataProvider.metadata_isdirrrcdS)z?List of metadata names in the directory (like ``os.listdir()``)Nrrs rmetadata_listdirz"IMetadataProvider.metadata_listdirrrcdS)z=Execute the named script in the supplied namespace dictionaryNr)r  namespaces rrazIMetadataProvider.run_scriptrrN) rrrrrr r"r$rarrrrrsJJJ666CCC MMMNNNLLLLLrrc6eZdZdZdZdZdZdZdZdZ dS) rz3An object that provides access to package resourcescdS)zdReturn a true filesystem path for `resource_name` `manager` must be an ``IResourceManager``Nrmanager resource_names rget_resource_filenamez'IResourceProvider.get_resource_filename rrcdS)ziReturn a readable file-like object for `resource_name` `manager` must be an ``IResourceManager``Nrr)s rget_resource_streamz%IResourceProvider.get_resource_streamrrcdS)zmReturn a string containing the contents of `resource_name` `manager` must be an ``IResourceManager``Nrr)s rget_resource_stringz%IResourceProvider.get_resource_stringrrcdS)z,Does the package contain the named resource?Nrr+s r has_resourcezIResourceProvider.has_resourcerrcdS)z>Is the named resource a directory? (like ``os.path.isdir()``)Nrr2s rrmz IResourceProvider.resource_isdirrrcdS)z?List of resource names in the directory (like ``os.listdir()``)Nrr2s rrkz"IResourceProvider.resource_listdir"rrN) rrrrr,r.r0r3rmrkrrrrr s|==555 555 555 ;;;MMMNNNNNrrceZdZdZddZedZedZdZdZ dZ dd Z d Z d Z ddZ ddZ ddZdZddZdZdZdZdS)rvzDA collection of active distributions on sys.path (or a similar list)Ncg|_i|_i|_i|_g|_| t j}|D]}||dS)z?Create working set from list of path entries (default=sys.path)N)entries entry_keysby_keynormalized_to_canonical_keys callbacksrWr add_entry)rr8entrys r__init__zWorkingSet.__init__)s`  ,.) ?hG " "E NN5 ! ! ! ! " "rc|} ddlm}n#t$r|cYSwxYw ||n%#t$r||cYSwxYw|S)z1 Prepare the master working set. r) __requires__)__main__rA ImportErrorr`r|_build_from_requirements)clswsrAs r _build_masterzWorkingSet._build_master7s SUU  - - - - - - -   III   > JJ| $ $ $ $ > > >// == = = = > s ""<AAc8|g}t|}||t}|D]}||tjD] }||jvr||!|jtjdd<|S)zQ Build a working set from a requirement spec. Rewrites sys.path. N)rresolveruaddrWrr8r=)rEreq_specrFreqsdistsrr>s rrDz#WorkingSet._build_from_requirementsKsSWW!(++ 4//  D FF4LLLLX $ $EBJ&& U###j  rc|j|g|j|t |dD]}|||ddS)aAdd a path item to ``.entries``, finding any distributions on it ``find_distributions(entry, True)`` is used to find distributions corresponding to the path entry, and they are added. `entry` is always appended to ``.entries``, even if it is already present. (This is because ``sys.path`` can contain the same value more than once, and the ``.entries`` of the ``sys.path`` WorkingSet should always equal ``sys.path``.) TFN)r9 setdefaultr8rrqrJ)rr>rs rr=zWorkingSet.add_entryasn ""5"--- E"""&ud33 ) )D HHT5% ( ( ( ( ) )rcH|j|j|kS)z9True if `dist` is the active distribution for its project)r:rrCrrs r __contains__zWorkingSet.__contains__ps{tx((D00rc|j|j}|B|j|j}|!||_|j|}|||vrt |||S)aFind a distribution matching requirement `req` If there is an active distribution for the requested project, this returns it as long as it meets the version requirement specified by `req`. But, if there is an active distribution for the project and it does *not* meet the `req` requirement, ``VersionConflict`` is raised. If there is no active distribution for the requested project, ``None`` is returned. )r:rrCr;r|)rrr canonical_keys rrzWorkingSet.findtsy{sw'' < =AA#'JJM('{}55  C!$,, , rc$fd|DS)aYield entry point objects from `group` matching `name` If `name` is None, yields all entry points in `group` from all distributions in the working set, otherwise only ones matching both `group` and `name` are yielded (in distribution order). c3K|]=}|D]} |jk|V>dSr')revaluesr ).0rr>r[r s r z/WorkingSet.iter_entry_points..sq  ++E2299;;  |tuz11  21111   rrrr[r s ``rrgzWorkingSet.iter_entry_pointss4         rctjdj}|d}|||d<||d||dS)z?Locate distribution for `requires` and run `script_name` scriptrrrNr)rrequiresr r r s rrazWorkingSet.run_scripts` ]1   '*~  : Xq!,,["=====rc#Ki}|jD]4}||jvr |j|D]}||vrd||<|j|V5dS)zYield distributions for non-duplicate projects in the working set The yield order is the order in which the items' path entries were added to the working set. rN)r8r9r:)rseenitemrCs r__iter__zWorkingSet.__iter__sy L + +D4?**t, + +d?? !DI+c**** +  + +rTFc*|r||j||||j}|j|g}|j|jg}|s|j|jvrdS||j|j<tj |j}|j|j |<|j|vr| |j|j|vr| |j| |dS)aAdd `dist` to working set, associated with `entry` If `entry` is unspecified, it defaults to the ``.location`` of `dist`. On exit from this routine, `entry` is added to the end of the working set's ``.entries`` (if it wasn't already present). `dist` is only added to the working set if it's for a project that doesn't already have a distribution in the set, unless `replace=True`. If it's added, any callbacks registered with the ``subscribe()`` method will be called. rN) insert_onr8locationr9rOrCr:rutilscanonicalize_namer;r _added_new)rrr>insertrkeyskeys2normalized_names rrJzWorkingSet.adds   A NN4<N @ @ @ =ME))%44**4="== 48t{22 F $ DH#/;;DHEE=AX)/: 84   KK ! ! ! 85 LL " " " rct|ddd}i}i}g}t} tjt} |r|d} | |vr| | |s4|| j} | |j | j} | | | vr|r|} |5| t|j }ntg}tg} | | | ||x} || j<| &| | d}t| ||| | | vr+| | }t!| | || | jddd}|||D],}| || j| j| |<-d|| <||S)aList all distributions needed to (recursively) meet `requirements` `requirements` must be a sequence of ``Requirement`` objects. `env`, if supplied, should be an ``Environment`` instance. If not supplied, it defaults to all distributions available within any entry or distribution in the working set. `installer`, if supplied, will be invoked with each requirement that cannot be met by an already-installed distribution; it should return a ``Distribution`` or ``None``. Unless `replace_conflicting=True`, raises a VersionConflict exception if any requirements are found on the path that have the correct name but the wrong version. Otherwise, if an `installer` is supplied it will be invoked to obtain the correct version of the requirement and activate it. `extras` is a list of the extras to be used with these requirements. This is important because extra requirements may look like `my_req; extra = "my_extra"`, which would otherwise be interpreted as a purely optional requirement. Instead, we want to be able to assert that these requirements are truly required. Nrr)replace_conflictingT)list _ReqExtras collections defaultdictsetpop markers_passrrCr:rur8rv best_matchr}rr|rr\extrasextendrJ project_name)r requirementsenv installerrmrv processedbest to_activate req_extrasrrrrFr dependent_reqnew_requirementsnew_requirements rrIzWorkingSet.resolves.6L))$$B$/   \\ "-c22 / """1%%Ci**377 88CG$$D|{sw//>R,?,:,,D4=|$/OOC$>$> 23 BBB""4(((3 +C 0 %dC00==mLLL $}}SZ882>     0 1 1 1$4 9 9O,001ABBB.1j ?++!IcN_/ "drct|}|i}i}|t|j}||z }n||z}|g} tt | j||D]} || D]} | g} | | ||} tt | j| | t | n$#t$r}||| <|rYd}~Yd}~nd}~wwxYwt|}|||fS)asFind all activatable distributions in `plugin_env` Example usage:: distributions, errors = working_set.find_plugins( Environment(plugin_dirlist) ) # add plugins+libs to sys.path map(working_set.add, distributions) # display errors print('Could not load', errors) The `plugin_env` should be an ``Environment`` instance that contains only distributions that are in the project's "plugin directory" or directories. The `full_env`, if supplied, should be an ``Environment`` contains all currently-available distributions. If `full_env` is not supplied, one is created automatically from the ``WorkingSet`` this method is called on, which will typically mean that every directory on ``sys.path`` will be scanned for distributions. `installer` is a standard installer callback as used by the ``resolve()`` method. The `fallback` flag indicates whether we should attempt to resolve older versions of a plugin if the newest version cannot be resolved. This method returns a 2-tuple: (`distributions`, `error_info`), where `distributions` is a list of the distributions found in `plugin_env` that were loadable, along with any other distributions that are needed to resolve their dependencies. `error_info` is a dictionary mapping unloadable plugin distributions to an exception instance describing the error that occurred. Usually this will be a ``DistributionNotFound`` or ``VersionConflict`` instance. N) rnsortrur8rmaprJas_requirementrIr)r+r,r{)r plugin_envfull_envr{fallbackplugin_projects error_info distributionsrz shadow_setrxrr resolveesr$s r find_pluginszWorkingSet.find_plugins0sHz**   dl++C : CCZ'C^^B''  S & &'''+  L"<0  **,,- * 2 23Y G GIZ^Y77888!((y)A)ABBBE''(Jt$ "]++ j((s$D  D-D((D-c~|t|}|D]}|||S)aEnsure that distributions matching `requirements` are activated `requirements` must be a string or a (possibly-nested) sequence thereof, specifying the distributions and versions required. The return value is a sequence of the distributions that needed to be activated to fulfill the requirements; all relevant distributions are included, even if they were already activated in this working set. )rIrrJ)rryneededrs rr`zWorkingSet.requiresC0>>??  D HHTNNNN rcx||jvrdS|j||sdS|D] }||dS)zInvoke `callback` for all distributions If `existing=True` (default), call on all existing ones, as well. N)r<r)rcallbackexistingrs r subscribezWorkingSet.subscribesa t~ % % F h'''  F  D HTNNNN  rc0|jD] }||dSr')r<)rrrs rrgzWorkingSet._added_news,  H HTNNNN  rc|jdd|j|j|j|jddfSr')r8r9r<r:r;r<rs rr7zWorkingSet.__getstate__sX LOT_1133T[5E5E5G5G  - 2 2 4 4dnQQQ6G  rc|\}}}}}|dd|_||_||_||_|dd|_dSr')r8r<r9r:r;r<)r e_k_b_n_cr8rir:r;r<s rr:zWorkingSet.__setstate__sgIRFv;Yqqqz ))++kkmm ,H,M,M,O,O)"111rr')NTF)NNFN)NNTT)rrrrr? classmethodrGrDr=rRrrgrar`rJrIrr`rrgr7r:rrrrvrv&siNN " " " "[&[* ) ) )1110     >>>+++"B9=26ZZZZzGKR)R)R)R)h       &&&&&rrvceZdZdZddZdS)roz> Map each requirement to the extras that demanded it. Ncfd|d|pdzD}j pt|S)z Evaluate markers for req against each extra that demanded it. Return False if the req has a marker and fails evaluation. Otherwise, return True. c3PK|] }jd|iV!dS)extraNmarkerevaluate)rXrrs rrYz*_ReqExtras.markers_pass..sL   J  % 0 1 1      rrr')rrany)rrrv extra_evalss ` rrtz_ReqExtras.markers_passs\    #r**f.?@   :~1[!1!11rr')rrrrrtrrrroros2 2 2 2 2 2 2rrocteZdZdZdeefdZdZdZddZ dZ dZ dd Z dd Z d Zd ZdZdS)ruz5Searchable snapshot of distributions on a search pathNcZi|_||_||_||dS)a!Snapshot distributions available on a search path Any distributions found on `search_path` are added to the environment. `search_path` should be a sequence of ``sys.path`` items. If not supplied, ``sys.path`` is used. `platform` is an optional string specifying the name of the platform that platform-specific distributions must be compatible with. If unspecified, it defaults to the current platform. `python` is an optional string naming the desired version of Python (e.g. ``'3.6'``); it defaults to the current version. You may explicitly set `platform` (and/or `python`) to ``None`` if you wish to map *all* distributions, not just those compatible with the running platform or Python version. N)_distmaprXpythonscan)r search_pathrXrs rr?zEnvironment.__init__s1&     +rc~|jdup|jdup|j|jk}|ot|j|jS)zIs distribution `dist` acceptable for this environment? The distribution must match the platform and python version requirements specified when this environment was created, or False is returned. N)r py_versionrrX)rr py_compats rcan_addzEnvironment.can_addsO K4  .$& .$+-  O1$-OOOrcP|j|j|dS)z"Remove `dist` from the environmentN)rrCremoverQs rrzEnvironment.removes% dh&&t,,,,,rcz| tj}|D])}t|D]}||*dS)adScan `search_path` for distributions usable in this environment Any distributions found are added to the environment. `search_path` should be a sequence of ``sys.path`` items. If not supplied, ``sys.path`` is used. Only distributions conforming to the platform/python version defined at initialization are added. N)rWrrqrJ)rrr_rs rrzEnvironment.scansW  (K  D*400     rc`|}|j|gS)aReturn a newest-to-oldest list of distributions for `project_name` Uses case-insensitive `project_name` comparison, assuming all the project's distributions use their project's name converted to all lowercase as their key. )lowerrr)rrxdistribution_keys r __getitem__zEnvironment.__getitem__s/(--//}  !12666rc(||rx|rf|j|jg}||vrD|||tjdddSdSdSdS)zLAdd `dist` if we ``can_add()`` it and it has not already been added hashcmpTrCreverseN) r has_versionrrOrCrroperator attrgetter)rrrMs rrJzEnvironment.adds <<   M$"2"2"4"4 MM,,TXr::E5   T""" x29==t LLLLL  M M M M  rFc ||}n#t$r|sd}YnwxYw||S||jD] }||vr|cS |||S)aFind distribution best matching `req` and usable on `working_set` This calls the ``find(req)`` method of the `working_set` to see if a suitable distribution is already active. (This may raise ``VersionConflict`` if an unsuitable version of the project is already active in the specified `working_set`.) If a suitable distribution isn't active, this method returns the newest distribution in the environment that meets the ``Requirement`` in `req`. If no suitable distribution is found, and `installer` is supplied, then the result of calling the environment's ``obtain(req, installer)`` method will be returned. N)rr|rCobtain)rrror{rmrs rruzEnvironment.best_matchs ##C((DD   & DDD   KM  Ds{{ {{3 ***s **c | ||SdS)aObtain a distribution matching `requirement` (e.g. via download) Obtain a distro that matches requirement (e.g. via download). In the base ``Environment`` class, this routine just returns ``installer(requirement)``, unless `installer` is None, in which case None is returned instead. This method is a hook that allows subclasses to attempt other ways of obtaining a distribution before falling back to the `installer` argument.Nr)r requirementr{s rrzEnvironment.obtain5s"  9[)) ) ! rc#ZK|jD]}||r|VdS)z=Yield the unique project names of the available distributionsN)rrirrCs rr`zEnvironment.__iter__AsC=%%''  CCy    rct|tr||nNt|tr&|D]"}||D]}||#nt d|d|S)z2In-place addition of a distribution or environmentz Can't add z to environment)rrxrJrur)rotherprojectrs r__iadd__zEnvironment.__iadd__Gs e\ * * F HHUOOOO { + + F  # #!'N##DHHTNNNN# #)UUUDEE E rcN|gdd}||fD]}||z }|S)z4Add an environment or distribution to an environmentN)rXrr)rrnewrzs r__add__zEnvironment.__add__Ss<nnR$tn<<;  C 3JCC rr'NF)rrrrr_PY_MAJORr?rrrrrJrurr`rrrrrrurus??#-C-C-E-E0 P P P---     7 7 7MMMIN++++8 * * * *   rruceZdZdZdS)raTAn error occurred extracting a resource The following attributes are available from instances of this exception: manager The resource manager that raised this exception cache_path The base directory for resource extraction original_error The exception instance that caused extraction to fail Nrrrrrr_s    rrcxeZdZdZdZdZdZdZdZdZ dZ d Z d Z dd Z ed ZdZdZddZdS)rwz'Manage resource extraction and packagesNci|_dSr') cached_filesrs rr?zResourceManager.__init__ssrcFt||S)zDoes the named resource exist?)rbr3rpackage_or_requirementr+s rrlzResourceManager.resource_existsvs233@@OOOrcFt||S)z,Is the named resource an existing directory?)rbrmrs rrmzResourceManager.resource_isdirzs&233BB    rcHt|||S)z4Return a true filesystem path for specified resource)rbr,rs rrjz!ResourceManager.resource_filenames(233II -   rcHt|||S)z9Return a readable file-like object for specified resource)rbr.rs rrizResourceManager.resource_stream(233GG -   rcHt|||S)z%Return specified resource as a string)rbr0rs rrhzResourceManager.resource_stringrrcFt||S)z1List the contents of the named resource directory)rbrkrs rrkz ResourceManager.resource_listdirs&233DD    rc$tjd}|jp t}t jd}t|jdit}||_ ||_ ||_ |)z5Give an error message for problems extracting file(s)ra Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: {old_exc} The Python egg cache directory is currently set to: {cache_path} Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory. Nr) rWexc_infoextraction_pathrttextwrapdedentlstriprrrr* cache_pathoriginal_error)rold_excrtmplerrs rextraction_errorz ResourceManager.extraction_errors,..#)@->-@-@   kdk55FHH5566 #$ rrc|jp t}tjj||dzg|R} t |n$#t $r|YnwxYw||d|j |<|S)aReturn absolute location in cache for `archive_name` and `names` The parent directory of the resulting path will be created if it does not already exist. `archive_name` should be the base filename of the enclosing egg (which may not be the name of the enclosing zipfile!), including its ".egg" extension. `names`, if provided, should be a sequence of path name parts "under" the egg's extraction location. This method should only be called by resource providers that need to obtain an extraction location, and only for names they intend to extract, as it tracks the generated names for possible cleanup later. z-tmpr) rrtrrrY_bypass_ensure_directory Exceptionr_warn_unsafe_extraction_pathr)r archive_namenames extract_path target_paths rget_cache_pathzResourceManager.get_cache_paths+B/@/B/B gl<1FOOOO  $ $[ 1 1 1 1 $ $ $  ! ! # # # # # $ )),777)*+&sAA#"A#cLtjdkr'|tjdsdStj|j}|tjzs|tjzr5djdit}tj |tdSdS)aN If the default extraction path is overridden and set to an insecure location, such as /tmp, it opens up an opportunity for an attacker to replace an extracted file with an unauthorized payload. Warn the user if a known insecure location is used. See Distribute #375 for more details. ntwindirNzExtraction path is writable by group/others and vulnerable to attack when used with get_resource_filename ({path}). Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).r) rr renvironstatst_modeS_IWOTHS_IWGRPrrr r! UserWarning)rmodemsgs rrz,ResourceManager._warn_unsafe_extraction_paths 7d??4??2:h3G#H#H? Fwt}}$ $,  ,$"5 ,: !!xx!!C M#{ + + + + + , ,rctjdkr6tj|jdzdz}tj||dSdS)a4Perform any platform-specific postprocessing of `tempname` This is where Mac header rewrites should be done; other platforms don't have anything special they should do. Resource providers should call this method ONLY after successfully extracting a compressed resource. They must NOT call it on resources that are already in the filesystem. `tempname` is the current (temporary) name of the file, and `filename` is the name it will be renamed to by the caller after this routine returns. posiximiN)rr rrchmod)rtempnamefilenamers r postprocesszResourceManager.postprocesssM 7g  WX&&.%76AD HXt $ $ $ $ $  rc@|jrtd||_dS)aSet the base path where resources will be extracted to, if needed. If you do not call this routine before any extractions take place, the path defaults to the return value of ``get_default_cache()``. (Which is based on the ``PYTHON_EGG_CACHE`` environment variable, with various platform-specific fallbacks. See that routine's documentation for more details.) Resources are extracted to subdirectories of this path based upon information given by the ``IResourceProvider``. You may set this to a temporary directory, but then you must call ``cleanup_resources()`` to delete the extracted files when done. There is no guarantee that ``cleanup_resources()`` will be able to remove all extracted files. (Note: you may not change the extraction path for a given resource manager once resources have been extracted, unless you first call ``cleanup_resources()``.) z5Can't change extraction path, files already extractedN)rr\rrrs rrrz#ResourceManager.set_extraction_paths4&   G  $rFcdS)aB Delete all extracted resource files and directories, returning a list of the file and directory names that could not be successfully removed. This function does not have any concurrency protection, so it should generally only be called when the extraction path is a temporary directory exclusive to a single process. This method is not automatically called; you must call it explicitly or register it as an ``atexit`` function if you wish to ensure cleanup of a temporary directory used for extractions. Nr)rforces rrsz!ResourceManager.cleanup_resourcesrrrF)rrrrrr?rlrmrjrirhrkrr staticmethodrrrrrsrrrrwrwos11OPPP               82,,\,4%%%($$$4       rrwcjtjdptjdS)z Return the ``PYTHON_EGG_CACHE`` environment variable or a platform-relevant user cache dir for an app named "Python-Eggs". PYTHON_EGG_CACHEz Python-Eggs)appname)rrrruser_cache_dirrrrrtrt$s1 )** 9  !- 8 8 8rc.tjdd|S)zConvert an arbitrary string to a standard distribution name Any runs of non-alphanumeric/. characters are replaced with a single '-'. [^A-Za-z0-9.]+rS)resubrs rrr0s 6"C . ..rc ttj|S#tjj$r/|dd}t jdd|cYSwxYw)zB Convert an arbitrary string to a standard version string rrQr rS)rrrrrrr r)rs rrr8su69$,,W55666   +666//#s++v&W555556s+.AA10A1cRtjdd|S)zConvert an arbitrary string to a standard 'extra' name Any runs of non-alphanumeric characters are replaced with a single '_', and the result is always lowercased. z[^A-Za-z0-9.-]+r)r rr)rs rrrDs% 6#S% 0 0 6 6 8 88rc.|ddS)z|Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'. rSrrbrs rrrMs <<S ! !!rcv t|n'#t$r}d|_d|_|cYd}~Sd}~wwxYwdS)zo Validate text as a PEP 508 environment marker; return an exception if invalid or False otherwise. NF)r SyntaxErrorrlineno)textes rrrUs[    5s 6166c tj|}|S#tjj$r}t ||d}~wwxYw)z Evaluate a PEP 508 environment marker. Return a boolean indicating the marker result in this environment. Raise SyntaxError if marker is invalid. This implementation uses the 'pyparsing' module. N)rmarkersMarkerr InvalidMarkerr)rrrrs rrrcs`$"))$//     *$$$!nn!#$s25A AAceZdZdZdZdZdZdZdZdZ dZ dZ dZ d Z d Zd Zd Zd ZdZdZdZdZdZdZdZedZdZdS)rzETry to implement resources and metadata for arbitrary PEP 302 loadersNct|dd|_tjt|dd|_dS)Nr__file__r)rrrrdirname module_path)rrs rr?zNullProvider.__init__ys=flD99 7??76:r+J+JKKrc8||j|Sr')_fnrrr*r+s rr,z"NullProvider.get_resource_filename}sxx(-888rcRtj|||Sr')ioBytesIOr0r"s rr.z NullProvider.get_resource_streams"z$227MJJKKKrc^|||j|Sr')_getr!rr"s rr0z NullProvider.get_resource_string%yy$"2MBBCCCrc^|||j|Sr')_hasr!rrr+s rr3zNullProvider.has_resourcer(rc8||j|Sr')r!egg_inforr s r_get_metadata_pathzNullProvider._get_metadata_pathsxx t,,,rcr|js|jS||}||Sr')r-r/r*rr rs rrzNullProvider.has_metadatas7} != &&t,,yyrc|jsdS||}||} |dS#t$r*}|xjd||z c_d}~wwxYw)Nrutf-8z in {} file at path: {})r-r/r'decodeUnicodeDecodeErrorreasonr)rr rvalueexcs rrzNullProvider.get_metadatas} 2&&t,, $ <<(( (!    JJ3::4FF FJJ   sA A>%A99A>cFt||Sr'r rr.s rr zNullProvider.get_metadata_lines4,,T22333rc^|||j|Sr')_isdirr!rr+s rrmzNullProvider.resource_isdirs%{{488D$4mDDEEErcl|jo-|||j|Sr')r-r=r!r.s rr"zNullProvider.metadata_isdirs+}KTXXdmT-J-J!K!KKrc^|||j|Sr')_listdirr!rr+s rrkzNullProvider.resource_listdirs%}}TXXd&6 FFGGGrcp|jr.|||j|SgSr')r-r@r!r.s rr$zNullProvider.metadata_listdirs4 = @==$-!>!>?? ? rcd|z}||s&tdjd it||dd}|dd}||j|}||d<tj |r_t|5}| }dddn #1swxYwYt||d}t|||dSdd lm} t#|d|d|f| |<t||d} t| ||dS) Nzscripts/z