Skip to content

Revert "Force installation of dependencies in entry points" #2321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
ROOT = abspath(join(dirname(__file__), ".."))
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 mbedToolchain
Expand Down
9 changes: 0 additions & 9 deletions tools/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
ROOT = abspath(join(dirname(__file__), ".."))
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.paths import BUILD_DIR
from tools.paths import RTOS_LIBRARIES
Expand All @@ -58,7 +50,6 @@
from tools.toolchains import mbedToolchain
from tools.settings import CLI_COLOR_MAP


if __name__ == '__main__':
# Parse Options
parser = get_default_options_parser()
Expand Down
8 changes: 0 additions & 8 deletions tools/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
ROOT = abspath(join(dirname(__file__), ".."))
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 argparse import ArgumentParser
from os import path
Expand Down
8 changes: 0 additions & 8 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
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.options import get_default_options_parser
from tools.build_api import build_project, build_library
Expand Down
12 changes: 0 additions & 12 deletions tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,3 @@ def parse_type(not_parent):
else:
return not_parent
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"