Skip to content
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

add --skip-pip options #412

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions bloom/commands/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,8 @@ def get_argument_parser():
help="Pretends to push and release")
add('--no-web', default=False, action='store_true',
help="prevents a web browser from being opened at the end")
add('--skip-pip', default=False, action='store_true',
help="skip all pip rosdep keys")
add('--pull-request-only', '-p', default=False, action='store_true',
help="skips the release actions and only tries to open a pull request")
add('--override-release-repository-url', default=None,
Expand All @@ -1285,6 +1287,9 @@ def main(sysargs=None):
if args.no_web:
os.environ['BLOOM_NO_WEBBROWSER'] = '1'

if args.skip_pip:
os.environ['BLOOM_SKIP_PIP'] = '1'

try:
os.environ['BLOOM_TRACK'] = args.track
disable_git_clone(True)
Expand Down
7 changes: 7 additions & 0 deletions bloom/generators/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@

from __future__ import print_function

from os import environ
import pkg_resources
import sys
import traceback

from bloom.logging import debug
from bloom.logging import error
from bloom.logging import info
from bloom.logging import warning

from bloom.util import code
from bloom.util import maybe_continue
Expand Down Expand Up @@ -114,6 +116,11 @@ def resolve_more_for_os(rosdep_key, view, installer, os_name, os_version):
os_installers,
default_os_installer)
assert inst_key in os_installers
if 'BLOOM_SKIP_PIP' in environ and environ['BLOOM_SKIP_PIP'] == '1' and inst_key == 'pip':
warning("Key '{0}' resolved to '{1}' with installer '{2}' for os '{3}' '{4}', "
"but with the 'BLOOM_SKIP_PIP' environment variable set, this key is intentionally skipped."
.format(rosdep_key, installer.resolve(rule), inst_key, os_name, os_version))
return [], inst_key, default_os_installer
return installer.resolve(rule), inst_key, default_os_installer


Expand Down
3 changes: 3 additions & 0 deletions bloom/generators/debian/generate_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def prepare_arguments(parser):
help="path to or containing the package.xml of a package")
action = parser.add_mutually_exclusive_group(required=False)
add = action.add_argument
add('--skip-pip', default=False, action='store_true', help="skip all pip rosdep keys")
add('--place-template-files', action='store_true',
help="places debian/* template files only")
add('--process-template-files', action='store_true',
Expand Down Expand Up @@ -107,6 +108,8 @@ def main(args=None, get_subs_fn=None):
os_data = create_default_installer_context().get_os_name_and_version()
os_name, os_version = os_data
ros_distro = os.environ.get('ROS_DISTRO', 'indigo')
if args.skip_pip:
os.environ['BLOOM_SKIP_PIP'] = '1'

# Allow args overrides
os_name = args.os_name or os_name
Expand Down
5 changes: 4 additions & 1 deletion bloom/generators/debian/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,10 @@ def _check_all_keys_are_valid(self, peer_packages):
retry=False)
if rule is None:
continue
if installer_key != default_installer_key:
if 'BLOOM_SKIP_PIP' in os.environ and os.environ['BLOOM_SKIP_PIP'] == '1' and \
installer_key == 'pip':
pass
elif installer_key != default_installer_key:
error("Key '{0}' resolved to '{1}' with installer '{2}', "
"which does not match the default installer '{3}'."
.format(key, rule, installer_key, default_installer_key))
Expand Down
3 changes: 3 additions & 0 deletions bloom/generators/rpm/generate_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def prepare_arguments(parser):
help="path to or containing the package.xml of a package")
action = parser.add_mutually_exclusive_group(required=False)
add = action.add_argument
add('--skip-pip', default=False, action='store_true', help="skip all pip rosdep keys")
add('--place-template-files', action='store_true',
help="places rpm/* template file(s) only")
add('--process-template-files', action='store_true',
Expand Down Expand Up @@ -107,6 +108,8 @@ def main(args=None, get_subs_fn=None):
os_data = create_default_installer_context().get_os_name_and_version()
os_name, os_version = os_data
ros_distro = os.environ.get('ROS_DISTRO', 'indigo')
if args.skip_pip:
os.environ['BLOOM_SKIP_PIP'] = '1'

# Allow args overrides
os_name = args.os_name or os_name
Expand Down
5 changes: 4 additions & 1 deletion bloom/generators/rpm/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,10 @@ def _check_all_keys_are_valid(self, peer_packages):
retry=False)
if rule is None:
continue
if installer_key != default_installer_key:
if 'BLOOM_SKIP_PIP' in os.environ and os.environ['BLOOM_SKIP_PIP'] == '1' and \
installer_key == 'pip':
pass
elif installer_key != default_installer_key:
error("Key '{0}' resolved to '{1}' with installer '{2}', "
"which does not match the default installer '{3}'."
.format(key, rule, installer_key, default_installer_key))
Expand Down
Loading