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

WIP: Make install editable option an option #2299

Closed
wants to merge 13 commits into from
Prev Previous commit
Next Next commit
Merge branch 'master' into make-install-editable-option
  • Loading branch information
mlouielu committed Jun 28, 2018
commit 5a4319965dacf4d7b8f65ee19306a5f1600c6f90
41 changes: 5 additions & 36 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1894,6 +1894,7 @@ def do_install(
if editable:
package_name = ' '.join(['-e', editable])
more_packages = list(more_packages)

# capture indexes and extra indexes
line = [package_name] + more_packages
line = ' '.join(str(s) for s in line).strip()
Expand Down Expand Up @@ -1973,42 +1974,10 @@ def do_install(
requirements_dir=requirements_directory,
pypi_mirror=pypi_mirror,
)
# pip install:
with spinner():
c = pip_install(
package_name,
ignore_hashes=True,
allow_global=system,
selective_upgrade=selective_upgrade,
no_deps=False,
verbose=verbose,
pre=pre,
requirements_dir=requirements_directory.name,
index=index,
extra_indexes=extra_indexes,
)
# Warn if --editable wasn't passed.
try:
converted = Requirement.from_line(package_name)
except ValueError as e:
click.echo('{0}: {1}'.format(crayons.red('WARNING'), e))
requirements_directory.cleanup()
sys.exit(1)
if converted.is_vcs and not editable:
click.echo(
'{0}: You installed a VCS dependency in non–editable mode. '
'This will work fine, but sub-dependencies 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.
try:
assert c.return_code == 0
except AssertionError:

# This is for if the user passed in dependencies, then we want to maek sure we
else:
for package_name in package_names:
click.echo(
crayons.normal(
u'Installing {0}...'.format(
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.