Skip to content
Snippets Groups Projects
Commit 459eb354 authored by stvn's avatar stvn
Browse files

merge(#27671): stv/build/list-xblocks

commits
=======
- build: add script to list installed XBlocks
parents b4fa41c8 2f2355b7
No related branches found
Tags release-2020-10-30-12.40
No related merge requests found
"""
Lookup list of installed XBlocks, to aid XBlock developers
"""
import pkg_resources
def get_without_builtins():
"""
Get all installed XBlocks
but try to omit built-in XBlocks, else the output is less helpful
"""
xblocks = [
entry_point.name
for entry_point in pkg_resources.iter_entry_points('xblock.v1')
if not entry_point.module_name.startswith('xmodule')
]
xblocks = sorted(xblocks)
return xblocks
def main():
"""
Run the main script
"""
for name in get_without_builtins():
print(name)
if __name__ == '__main__':
main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment