Skip to content

Commit e7519a9

Browse files
authored
{CI} Add pyproject.toml support (#9377)
* Add pyproject.toml support * minor fix
1 parent 8774f74 commit e7519a9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/ci/avail-ext-doc/update_extension_list.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,16 @@ def get_extensions():
4242
exts = sorted(exts, key=lambda c: parse_version(c['metadata']['version']), reverse=True)
4343

4444
# some extension modules may not include 'HISTORY.rst'
45-
project_url = exts[0]['metadata']['extensions']['python.details']['project_urls']['Home']
45+
# setup.py
46+
if 'project_urls' in exts[0]['metadata']['extensions']['python.details']:
47+
project_url = exts[0]['metadata']['extensions']['python.details']['project_urls']['Home']
48+
# pyproject.toml
49+
elif 'project_url' in exts[0]['metadata']:
50+
project_url = exts[0]['metadata']['project_url'].replace('homepage,', '').strip()
51+
print(f"Warning: extension {exts[0]['metadata']['name']} has migrated to pyproject.toml.")
52+
else:
53+
project_url = ''
54+
print(f"Warning: No project_url found for extension {exts[0]['metadata']['name']}")
4655
history_tmp = project_url + '/HISTORY.rst'
4756
history = project_url if str(requests.get(history_tmp).status_code) == '404' else history_tmp
4857
if exts[0]['metadata'].get('azext.isPreview'):

0 commit comments

Comments
 (0)