Skip to content

Commit 4b50628

Browse files
authored
Merge pull request #2321 from mbedmicro/revert-2257-install-deps
Revert "Force installation of dependencies in entry points"
2 parents ea78ed1 + c84e5d3 commit 4b50628

File tree

5 files changed

+0
-44
lines changed

5 files changed

+0
-44
lines changed

tools/build.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@
2626
ROOT = abspath(join(dirname(__file__), ".."))
2727
sys.path.insert(0, ROOT)
2828

29-
from tools.utils import install_from_pip
30-
with open(join(ROOT, "requirements.txt")) as reqs:
31-
for req in reqs:
32-
install_from_pip(req)
33-
34-
import site
35-
reload(site)
3629

3730
from tools.toolchains import TOOLCHAINS
3831
from tools.toolchains import mbedToolchain

tools/make.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@
2727
ROOT = abspath(join(dirname(__file__), ".."))
2828
sys.path.insert(0, ROOT)
2929

30-
from tools.utils import install_from_pip
31-
with open(join(ROOT, "requirements.txt")) as reqs:
32-
for req in reqs:
33-
install_from_pip(req)
34-
35-
import site
36-
reload(site)
37-
3830
from tools.utils import args_error
3931
from tools.paths import BUILD_DIR
4032
from tools.paths import RTOS_LIBRARIES
@@ -58,7 +50,6 @@
5850
from tools.toolchains import mbedToolchain
5951
from tools.settings import CLI_COLOR_MAP
6052

61-
6253
if __name__ == '__main__':
6354
# Parse Options
6455
parser = get_default_options_parser()

tools/project.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33
ROOT = abspath(join(dirname(__file__), ".."))
44
sys.path.insert(0, ROOT)
55

6-
from tools.utils import install_from_pip
7-
with open(join(ROOT, "requirements.txt")) as reqs:
8-
for req in reqs:
9-
install_from_pip(req)
10-
11-
import site
12-
reload(site)
13-
146
from shutil import move, rmtree
157
from argparse import ArgumentParser
168
from os import path

tools/test.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@
2626
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
2727
sys.path.insert(0, ROOT)
2828

29-
from tools.utils import install_from_pip
30-
with open(os.path.join(ROOT, "requirements.txt")) as reqs:
31-
for req in reqs:
32-
install_from_pip(req)
33-
34-
import site
35-
reload(site)
36-
3729
from tools.test_api import test_path_to_name, find_tests, print_tests, build_tests, test_spec_from_test_builds
3830
from tools.options import get_default_options_parser
3931
from tools.build_api import build_project, build_library

tools/utils.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,15 +338,3 @@ def parse_type(not_parent):
338338
else:
339339
return not_parent
340340
return parse_type
341-
342-
def install_from_pip(package):
343-
import pkg_resources
344-
try:
345-
pkg_resources.working_set.require(package)
346-
except (pkg_resources.DistributionNotFound, pkg_resources.VersionConflict):
347-
import pip
348-
try:
349-
pip.main(['install', '--user', '-q', package])
350-
except IOError as exc:
351-
if exc.errno == 13:
352-
print "please retry with sudo"

0 commit comments

Comments
 (0)