benediktenger - 2023-10-23

Hi,

I need to accesss to project information of a referenced library in the project.
At least I need the "Released" flag from these information to check that no project gets shipped with unreleased libraries.

Unfortunally, I do not get this information by script.
I archieved to get the library reference object and the managed library object but both won't give me this flag but only basic information like company, name, version, etc.

Here is my code:

# get the library refernces
proj = projects.primary
objects = proj.get_children(recursive=True)
for object in objects:
    if object.is_libman:
        for libref in iter(object):
            if libref.is_placeholder and isinstance(libref.effective_resolution,str):
                print(libref)
                print(libref.name)

# get the managed libraries
libs = librarymanager.get_all_libraries()
for lib in libs:
    print(lib.displayname)
    print(lib.version)

Does somebody know how do get these information?

 

Last edit: benediktenger 2023-10-23