
    g                     2    d dl mZ d dlmZ ddZddZd Zy)	   )AbstractProject)handle_exceptionNc                     t        j                  dt        |            }	 |j                  |       S # t        $ r}t        |       Y d}~yd}~ww xY w)z= The PEP 517 hook for building an sdist from pyproject.toml. sdist	argumentsN)r   	bootstrap_convert_config_settingsbuild_sdist	Exceptionr   )sdist_directoryconfig_settingsprojectes       ,lib/python3.12/site-packages/sipbuild/api.pyr   r      P     ''.?AG""?33    3 	AAAc                     t        j                  dt        |            }	 |j                  |       S # t        $ r}t        |       Y d}~yd}~ww xY w)z< The PEP 517 hook for building a wheel from pyproject.toml. wheelr   N)r   r	   r
   build_wheelr   r   )wheel_directoryr   metadata_directoryr   r   s        r   r   r   +   r   r   c                     | i } g }| j                         D ]J  \  }}|r2t        |t              s|g}|D ]  }|j                  |dz   |z           :|j                  |       L |S )zW Return any configuration settings from the frontend to a pseudo-command
    line.
    =)items
isinstancelistappend)r   argsnamevaluem_values        r   r
   r
   :   ss    
 D&,,.eeT* D3J01 ! KK / K    )N)NN)abstract_projectr   
exceptionsr   r   r   r
    r#   r   <module>r'      s   0 . (r#   