Skip to content

Commit

Permalink
Merge pull request #750 from screamerbg/f/fix_pkg_detect
Browse files Browse the repository at this point in the history
Fix python package detection to support repo URLs
  • Loading branch information
theotherjimmy authored Sep 12, 2018
2 parents fa61b91 + f826f21 commit 3dc8ac9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,8 @@ def check_requirements(self, show_warning=False):
pkg_list = pquery([python_cmd, '-m', 'pip', 'list', '-l']) or ""
installed_packages = [re.sub(r'-', '_', pkg.split()[0].lower()) for pkg in pkg_list.splitlines() if len(pkg.split())]
for line in f.read().splitlines():
pkg = re.sub(r'-', '_', re.sub(r'^([\w-]+).*$', r'\1', line).lower())
pkg = re.sub(r'-', '_', re.sub(r'^([^<>=@]+).*$', r'\1', line).lower())
pkg = re.sub(r'^(git|hg|svn|bzr)\+(.*)/([\w.-]+?)(\.(git|hg))?$', r'\3', pkg)
if not pkg in installed_packages:
missing.append(pkg)

Expand Down

0 comments on commit 3dc8ac9

Please sign in to comment.