
    ?e                     B    d dl Z ddlmZmZ ddlmZ ddlmZ d Zd Z	dS )    N   )UserFileExceptionUserParseException)resolve_abi_version)	toml_loadc                    t           j                            t           j                            |                    }|D ]G}t           j                            |||dz             }t           j                            |          r nHg g fS 	 t          |          }n0# t          $ r#}t          |t          |                    d}~ww xY w|
                    d          }|t          |t                    st          |d          t          t          |                              d          d                   }	|	| k    r%t          |d                    ||	|                     t#          ||d	          t#          ||d
          fS )z- Get the configuration of a set of bindings. z.toml)detailNzsip-abi-versionz/'sip-abi-version' must be specified as a string.r   zP'{0}' was built against ABI v{1} but this module is being built against ABI v{2}zmodule-tagszmodule-disabled-features)ospathbasenamedirnamejoinisfiler   	Exceptionr   strget
isinstancer   intr   splitformat_get_string_list)
	abi_majorsip_filesip_include_dirsbindings_namesip_dir	toml_filecfgecfg_abi_versioncfg_abi_majors
             ?lib/python3.11/site-packages/sipbuild/bindings_configuration.pyget_bindings_configurationr$      s   
 G$$RW__X%>%>??M $  GLL-') )	 7>>)$$ 	E	 2v;	"" ; ; ; 3q66::::; gg/00Oj#&F&F	AC C 	C +O<<BB3GGJKKM	!!	117 -y2: 2:; ; 	; Y];;Y-GHHJ Js   B 
C	&CC	c                 <   |                     |          }|t                      }n8t          |t                    s#t          | d                    |                    |D ]:}t          |t
                    s#t          | d                    |                    ;|S )zM Get an option from the configuration and check it is a list of strings.
    Nz'{0}' must be a listz!elements of '{0}' must be strings)r   listr   r   r   r   )r   r   nameoption_listoptions        r#   r   r   I   s     ''$--KffT** P	+A+H+H+N+NOOO F F&#&& 	F#I7>>tDDF F F	F     )
r   
exceptionsr   r   moduler   tomlr   r$   r    r*   r#   <module>r/      sx   0 
			 = = = = = = = = ' ' ' ' ' '      'J 'J 'JT    r*   