mirror of https://github.com/ARMmbed/mbed-os.git
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
commit
4b506280eb
|
@ -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
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
|
||||||
|
|
Loading…
Reference in New Issue