=`@s>ddlZddlZddlZGdddeZdS)Nc@sFeZdZddddZddZddZd d ZdS) ComponentNFcCs||_||_d|_g|_g|_|rtjj|jd}tjj|s}|j|d}|st d|jdn |d|_|j|d|_tjj|jd}tjj|r t |d}|j j |_WdQRX|j|d |_d |jd |jd |ji}t |d )}|j tj|ddddWdQRXnrt |d}tj|j }WdQRX|st d|jd|d |_|d |_|d |_|j s|jd rt d|jdS)Npkg5zprint-value-COMPONENT_NAMEz Component returns empty name at .rzprint-package-namesz pkg5.fmrisrzprint-required-packagesnamefmris dependenciesw sort_keysTindentz&Component pkg5 data is empty for path z$Empty list of supplied FMRIs path = )debugpathrsupplied_packagesrequired_packagesosjoinisfilerun_make ValueErroropenread splitlineswritejsondumpsloads)selfrr Zcomponent_pkg5_fileZcomponent_nameZcomponent_pkg5_fmris_filefdatar s