Skip to content

Commit c2cfe83

Browse files
committed
Fixed pip support, especially pip10 (#657)
1 parent 53f8b11 commit c2cfe83

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mbed/mbed.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838

3939
# Application version
40-
ver = '1.5.0'
40+
ver = '1.5.1'
4141

4242
# Default paths to Mercurial and Git
4343
hg_cmd = 'hg'
@@ -1448,8 +1448,8 @@ def check_requirements(self, show_warning=False):
14481448
missing = []
14491449
try:
14501450
with open(os.path.join(req_path, req_file), 'r') as f:
1451-
import pip
1452-
installed_packages = [re.sub(r'-', '_', package.project_name.lower()) for package in pip.get_installed_distributions(local_only=True)]
1451+
pkg_list = pquery([python_cmd, '-m', 'pip', 'list', '-l']) or ""
1452+
installed_packages = [re.sub(r'-', '_', pkg.split()[0].lower()) for pkg in pkg_list.splitlines()]
14531453
for line in f.read().splitlines():
14541454
pkg = re.sub(r'-', '_', re.sub(r'^([\w-]+).*$', r'\1', line).lower())
14551455
if not pkg in installed_packages:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
setup(
2020
name="mbed-cli",
21-
version="1.5.0",
21+
version="1.5.1",
2222
description="ARM mbed command line tool for repositories version control, publishing and updating code from remotely hosted repositories (GitHub, GitLab and mbed.org), and invoking mbed OS own build system and export functions, among other operations",
2323
long_description=LONG_DESC,
2424
url='http://github.com/ARMmbed/mbed-cli',

0 commit comments

Comments
 (0)