We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03f3c0d commit d70e46dCopy full SHA for d70e46d
mbed/mbed.py
@@ -1164,11 +1164,12 @@ def post_action(self):
1164
missing = []
1165
fname = 'requirements.txt'
1166
try:
1167
- import pkgutil
+ import pip
1168
+ installed_packages = [package.project_name for package in pip.get_installed_distributions()]
1169
with open(os.path.join(mbed_os_path, fname), 'r') as f:
1170
for line in f.read().splitlines():
- pkg = re.sub(r'^([\w-]+).*$', r'\1', line)
1171
- if pkgutil.find_loader(pkg) is None:
+ pkg = re.sub(r'^([\w-]+).*$', r'\1', line).lower()
1172
+ if not pkg in installed_packages:
1173
missing.append(pkg)
1174
except IOError:
1175
pass
0 commit comments