Merge pull request #2321 from mbedmicro/revert-2257-install-deps

Revert "Force installation of dependencies in entry points"
pull/2322/head mbed-os-5.1.0-rc4
Sam Grove 2016-07-29 17:40:31 -05:00 committed by GitHub
commit 4b506280eb
5 changed files with 0 additions and 44 deletions

View File

@ -26,13 +26,6 @@ from os.path import join, abspath, dirname
ROOT = abspath(join(dirname(__file__), "..")) ROOT = abspath(join(dirname(__file__), ".."))
sys.path.insert(0, ROOT) sys.path.insert(0, ROOT)
from tools.utils import install_from_pip
with open(join(ROOT, "requirements.txt")) as reqs:
for req in reqs:
install_from_pip(req)
import site
reload(site)
from tools.toolchains import TOOLCHAINS from tools.toolchains import TOOLCHAINS
from tools.toolchains import mbedToolchain from tools.toolchains import mbedToolchain

View File

@ -27,14 +27,6 @@ from os.path import join, abspath, dirname, isfile, isdir
ROOT = abspath(join(dirname(__file__), "..")) ROOT = abspath(join(dirname(__file__), ".."))
sys.path.insert(0, ROOT) sys.path.insert(0, ROOT)
from tools.utils import install_from_pip
with open(join(ROOT, "requirements.txt")) as reqs:
for req in reqs:
install_from_pip(req)
import site
reload(site)
from tools.utils import args_error from tools.utils import args_error
from tools.paths import BUILD_DIR from tools.paths import BUILD_DIR
from tools.paths import RTOS_LIBRARIES from tools.paths import RTOS_LIBRARIES
@ -58,7 +50,6 @@ from argparse import ArgumentTypeError
from tools.toolchains import mbedToolchain from tools.toolchains import mbedToolchain
from tools.settings import CLI_COLOR_MAP from tools.settings import CLI_COLOR_MAP
if __name__ == '__main__': if __name__ == '__main__':
# Parse Options # Parse Options
parser = get_default_options_parser() parser = get_default_options_parser()

View File

@ -3,14 +3,6 @@ from os.path import join, abspath, dirname, exists, basename
ROOT = abspath(join(dirname(__file__), "..")) ROOT = abspath(join(dirname(__file__), ".."))
sys.path.insert(0, ROOT) sys.path.insert(0, ROOT)
from tools.utils import install_from_pip
with open(join(ROOT, "requirements.txt")) as reqs:
for req in reqs:
install_from_pip(req)
import site
reload(site)
from shutil import move, rmtree from shutil import move, rmtree
from argparse import ArgumentParser from argparse import ArgumentParser
from os import path from os import path

View File

@ -26,14 +26,6 @@ import fnmatch
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.insert(0, ROOT) sys.path.insert(0, ROOT)
from tools.utils import install_from_pip
with open(os.path.join(ROOT, "requirements.txt")) as reqs:
for req in reqs:
install_from_pip(req)
import site
reload(site)
from tools.test_api import test_path_to_name, find_tests, print_tests, build_tests, test_spec_from_test_builds from tools.test_api import test_path_to_name, find_tests, print_tests, build_tests, test_spec_from_test_builds
from tools.options import get_default_options_parser from tools.options import get_default_options_parser
from tools.build_api import build_project, build_library from tools.build_api import build_project, build_library

View File

@ -338,15 +338,3 @@ def argparse_dir_not_parent(other):
else: else:
return not_parent return not_parent
return parse_type return parse_type
def install_from_pip(package):
import pkg_resources
try:
pkg_resources.working_set.require(package)
except (pkg_resources.DistributionNotFound, pkg_resources.VersionConflict):
import pip
try:
pip.main(['install', '--user', '-q', package])
except IOError as exc:
if exc.errno == 13:
print "please retry with sudo"