Page MenuHomePhabricator
Paste P11646

(An Untitled Masterwork)
ActivePublic

Authored by Legoktm on Wed, Jun 24, 8:58 AM.
Tags
None
Subscribers
None
Tokens
"Like" token, awarded by Akuckartz.
#!/usr/bin/env python3
import glob
import json
composers = glob.glob('/home/user/gerrit/mediawiki/core/extensions/*/composer.json')
deps = 0
total = 0
for composer in composers:
total += 1
with open(composer) as f:
data = json.load(f)
if 'require' not in data:
continue
rdeps = (data['require'])
for dep in rdeps:
if dep.startswith('ext-'):
continue
elif dep in ['php', 'mediawiki/semantic-media-wiki', 'mediawiki/validator', 'composer/installers', 'mediawiki/page-forms']:
continue
else:
print(dep)
deps +=1
break
print(f'done. {deps}/{total}')