File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 25
25
DEFAULT_TEMPLATE_PATH = osp .join (osp .dirname (__file__ ), 'templates' )
26
26
27
27
28
+ def get_package_url (data ):
29
+ """Get the url from the extension data
30
+ """
31
+ # homepage, repository are optional
32
+ if 'homepage' in data :
33
+ url = data ['homepage' ]
34
+ elif 'repository' in data and isinstance (data ['repository' ], dict ):
35
+ url = data ['repository' ].get ('url' , '' )
36
+ else :
37
+ url = ''
38
+ return url
39
+
40
+
28
41
def get_federated_extensions (labextensions_path ):
29
42
"""Get the metadata about federated extensions
30
43
"""
@@ -39,6 +52,8 @@ def get_federated_extensions(labextensions_path):
39
52
data = dict (
40
53
name = pkgdata ['name' ],
41
54
version = pkgdata ['version' ],
55
+ description = pkgdata .get ('description' , '' ),
56
+ url = get_package_url (pkgdata ),
42
57
ext_dir = ext_dir ,
43
58
ext_path = osp .dirname (ext_path ),
44
59
is_local = False ,
You can’t perform that action at this time.
0 commit comments