Ë R‡�‘*$-nãóP—ddlmZddlmZddlmZGd„d«ZGd„d«Zy ) é)ÚMarkeré)Ú UserException)ÚPyProjectOptionExceptioncóR—eZdZdZd d„Zd„Zd„Zd„Zd„Zd„Z d „Z d „Z e d „«Z y) Ú Configurablez� A base class for an object that can be configured by a pyproject.toml, a build script or (possibly) the user via command line options. Nc óh—|€|j«}|D�]š}t||j«�Œ|j€Œ(|jr||jvrŒC|j |t ««}|j|«t|«dk7rŒ}|j}|jrd|z}d|z}|jtur8|j||j|jrdnd|j¬«Œé|jt urW|jd«r|dd }|j||j|j d |j|j"¬ «�ŒR|j||j|j|j |j|j"¬ «�Œ�y) z° Add the object's command line options to an argument parser and update a map of Object instances and the configurables that they should be applied to. Nrzno-z--Ú store_falseÚ store_true)ÚdestÚactionÚhelpÚséÿÿÿÿÚappend)r Úchoicesr rÚmetavar)r Útyperrr)Ú get_optionsÚgetattrÚnamerÚtoolsÚ setdefaultÚlistrÚlenÚ user_nameÚinvertedÚ option_typeÚboolÚ add_argumentr Úendswithrr)ÚselfÚparserÚtoolÚ all_optionsÚoptionsÚoptionÚ configurablesÚ argument_names ú:/usr/lib/python3.12/site-packages/sipbuild/configurable.pyÚadd_command_line_optionsz%Configurable.add_command_line_optionssŒ€ð ˆ?Ø×&Ñ&Ó(ˆGäˆFô�t˜VŸ[™[Ó)Ð5Øð�{‰{Ð"Øð�|Š| ¨F¯L©LÑ 8Øð(×2Ñ2°6¼4»6ÓBˆMØ × Ñ  Ô &ä�=Ó! QÒ&Øð#×,Ñ,ˆMà�ŠØ %¨ Ñ 5� à  =Ñ0ˆMà×!Ñ!¤TÑ)Ø×#Ñ# M¸¿ ¹ Ø17·²¡ Ø%1Ø#Ÿ[™[ð$õ*ð×#Ñ#¤tÑ+à ×)Ñ)¨#Ô.Ø$1°#°2Ð$6�Mà×#Ñ# M¸¿ ¹ Ø &§¡°xØ#Ÿ[™[°&·.±.ð$öBð×#Ñ# M¸¿ ¹ Ø#×/Ñ/¸¿¹Ø#Ÿ[™[°&·.±.ð$öBñWócó*—|j|d¬«y)zd Set default values for each non-user configurable option that hasn't been set yet. F©ÚuserN©Ú_apply_defaults©r"r$s r*Úapply_nonuser_defaultsz#Configurable.apply_nonuser_defaultsIs€ð ×јT¨ÐÕ.r,có*—|j|d¬«y)z` Set default values for each user configurable option that hasn't been set yet. Tr.Nr0r2s r*Úapply_user_defaultsz Configurable.apply_user_defaultsPs€ð ×јT¨ÐÕ-r,c óš—|j|«}|��&|j«D�]\}}|j«D]}|j|k(sŒnt |d|¬«‚t ||j «sEt |dj|j jt|«j«|¬«‚t||j«�t |d|¬«‚t |t«r2g}|D])} |j| ||«} | €Œ|j| «Œ+|}t||j|«�Œ|j!|«y)z1 Perform the initial configuration of an object. Nzis not a supported option©Ú section_namez%should be of type '{0}' and not '{1}'z2has already been set in code and cannot be changed)Ú get_sectionÚitemsrrrÚ isinstancerÚformatÚ__name__rrrrÚ_handle_markerrÚsetattrr3) r"Ú pyprojectr8r$ÚsectionrÚvaluer'Ú new_valueÚvs r*Ú configurezConfigurable.configureWsN€ð×'Ñ'¨ Ó5ˆà Ñ Ø&Ÿ}™}Ÿ‘ ��eà"×.Ñ.Ö0�FØ×'Ñ'¨4Ó/Ùð1ô3°4Ø7Ø)5ô7ð7ô " %¨×);Ñ);Ô<Ü2°4ØC×JÑJØ$*×$6Ñ$6×$?Ñ$?Ü$(¨£K×$8Ñ$8ó:ð*6ô 7ð7ô˜4 §¡Ó-Ð9Ü2°4ð&à)5ô7ð7ô ˜e¤TÔ*Ø "�Iã"˜Ø ×/Ñ/°°4¸ÓF˜Ø™=Ø%×,Ñ,¨QÕ/ð#ð &�E䘘fŸk™k¨5Ö1ðI /ðL ×#Ñ# DÕ)r,có—t«S)z( Return a list of configurable options. )r)r"s r*rzConfigurable.get_options…s €ô‹vˆ r,có —g}|j«D];}|j}|j|«t|||j |««Œ=|j «D] }||vsŒt dj|««‚y)z Initialise the options. z'{0}' is not a valid optionN)rrrr?ÚgetÚkeysrr<)r"ÚkwargsÚnamesr'rÚkws r*Úinitialise_optionszConfigurable.initialise_optionsŠsv€ð ˆà×&Ñ&Ö(ˆFØ—;‘;ˆDØ �L‰L˜Ô ä �D˜$ § ¡ ¨4Ó 0Õ 1ð )ð—+‘+–-ˆBؘŠÜ#Ð$A×$HÑ$HÈÓ$LÓMÐMñ r,có—y)z; Verify that the configuration is complete and consistent. N©r2s r*Úverify_configurationz!Configurable.verify_configurationœs�r,cóö—|j«D]æ}|r |j€Œ|s |j�Œ!t||j«}|�Œ:|j}|€w|j t urg}ns|j turd}n^|j turd}nI|j tur|jrdnd}n&|j turd}n|j |«}t||j|«Œèy)z\ Set default values for each user/non-user option that hasn't been set yet. NgrTFÚ) rrrrÚdefaultrrÚfloatÚintrrÚstrr?)r"r$r/r'rBs r*r1zConfigurable._apply_defaults¡sá€ð ×&Ñ&Ö(ˆFÙ˜Ÿ ™ Ð+Øá˜FŸK™KÐ3Øä˜D &§+¡+Ó.ˆE؉}ØŸ™�Ø�=à×)Ñ)¬TÑ1Ø "™Ø×+Ñ+¬uÑ4Ø #™Ø×+Ñ+¬sÑ2Ø !™Ø×+Ñ+¬tÑ3Ø(.¯ª¡¸U™Ø×+Ñ+¬sÑ2Ø "™ð#×.Ñ.¨uÓ5�E䘘fŸk™k¨5Õ1ñ5)r,có¾—d|vr|S|jdd¬«\}} t|«j«}|r|SdS#t|dj |«|¬«‚xYw)z« Handle any environment marker in a value. The value is returned if a marker evaluates to True. None is returned if a marker evaluates to False. Ú;r)Úmaxsplitzhas an invalid marker '{0}'r7N)ÚsplitrÚevaluaterr<)rBrr8ÚmarkerÚ satisfieds r*r>zConfigurable._handle_markerÂst€ð �eÑ ØˆLàŸ ™  C°!˜ Ó4‰ ˆˆvð /ܘv›×/Ñ/Ó1ˆIñ "ˆuÐ+ tÐ+øð  /Ü*¨4Ø1×8Ñ8¸Ó@Ø!-ô/ð /ús ž=½A)N)r=Ú __module__Ú __qualname__Ú__doc__r+r3r5rErrMrPr1Ú staticmethodr>rOr,r*rr sI„ñó6Bòp/ò.ò,*ò\ò Nò$Jò 2ðBñ,óñ,r,rcó:—eZdZdZdZedzZdZedddddddœd„Zy) ÚOptiona9 Encapsulate a configuration option. This defines and implements an attribute of a Configurable object. The value of the attribute can be set either by __init__(), the pyproject.toml file and by the user using a command line argument (in that order). Once the value is set it cannot be changed subsequently. For example, if an attribute is set in pyproject.toml then the user will not then be able to modify it from the command line. The value can only be changed from the command line if the Option object has help text specified. )ÚbuildÚinstallÚwheel)ÚsdistrNF)rrrSrrrrcó²—||_|jdd«|_||_||_||_||_||_||_|€|j|_ n7|D]+} | |jvsŒtdj|| ««‚||_ dtt|«j «z|_t|«xj dz c_y)z Initialise the option. Ú_Ú-Nz''{0}' option has an invalid tools '{1}'Údr)rÚreplacerrrSrrrrÚ BUILD_TOOLSrÚ _ALL_TOOLSrr<rVrÚ option_nrr ) r"rrrrSrrrrr$s r*Ú__init__zOption.__init__îsÉ€ðˆŒ ØŸ™ c¨3Ó/ˆŒØ&ˆÔ؈Œ ؈Œ ؈Œ ؈Œ Ø ˆŒ à ˆ=Ø×)Ñ)ˆD�Jã�ؘtŸ™Ò.Ü'ØE×LÑLØ$(¨$ó0ó1ð1ðð ˆDŒJàœ#œd 4›j×2Ñ2Ó3Ñ3ˆŒ Ü ˆT‹ ×Ò Ñ!Ör,) r=r^r_r`rmrnrorVrprOr,r*rcrcÙs6„ñð0€Kð˜{Ñ*€Jð€Ià,/¸Àtؘt¨e¸4õ"r,rcN)Úpackaging.markersrÚ exceptionsrr@rrrcrOr,r*Úrss'ðõ %å%Ý/÷J,ñJ,÷Z."ò."r,