From 0eedc5e8028abdd2937120130dccc276fdb0b4bd Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 24 Sep 2017 18:18:45 -0400 Subject: [PATCH] warn when installing git packages, without editable Signed-off-by: Kenneth Reitz --- pipenv/cli.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pipenv/cli.py b/pipenv/cli.py index d640ed67..f1b730a9 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -1666,6 +1666,21 @@ def install( with spinner(): c = pip_install(package_name, ignore_hashes=True, allow_global=system, no_deps=False, verbose=verbose, pre=pre) + # Warn if --editable wasn't passed. + converted = convert_deps_from_pip(package_name) + key = [k for k in converted.keys()][0] + if is_vcs(converted[key]) and not converted[key].get('editable'): + click.echo( + '{0}: You installed a VCS dependency in non–editable mode. ' + 'This will work fine, but sub-depdendencies will not be resolved by {1}.' + '\n To enable this sub–dependency functionality, specify that this dependency is editable.' + ''.format( + crayons.red('Warning', bold=True), + crayons.red('$ pipenv lock') + ) + ) + + click.echo(crayons.blue(format_pip_output(c.out))) # Ensure that package was successfully installed.