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

Refactor CLI to lean more heavily on click's built in functionality #2814

Merged
merged 23 commits into from
Sep 5, 2018
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
15916af
Refactor CLI options
techalchemy Aug 31, 2018
eb18ed2
Clean up core arguments
techalchemy Aug 31, 2018
228b28b
Update piptools patch
techalchemy Aug 31, 2018
7d57386
Clean up test
techalchemy Aug 31, 2018
8b32e19
Refactor CLI for organization and simplicity
techalchemy Sep 2, 2018
c3b6143
Cleanup unicode literals warnings
techalchemy Sep 2, 2018
305628e
Fix some typos
techalchemy Sep 2, 2018
12217e6
Clean up vcs ref checkouts
techalchemy Sep 2, 2018
597bc8c
Update requirementslib
techalchemy Sep 2, 2018
f93cefa
Fix `lock -r` output to include all markers
techalchemy Sep 2, 2018
f902d8f
Turn off no-deps for tarballs/zips
techalchemy Sep 3, 2018
eb0709b
Fix installation of multiple packages
techalchemy Sep 3, 2018
ab2b3d3
Minor project fixes
techalchemy Sep 3, 2018
86022cc
Add missing skip_lock option
techalchemy Sep 3, 2018
2768edb
Fix editor auto-deletions of piptools patch lines
techalchemy Sep 3, 2018
e88d2d6
No idea why this doesn't work
techalchemy Sep 3, 2018
9cfb863
Syntax error...
techalchemy Sep 3, 2018
661eb17
Reorganize pip installation to ditch custom parser
techalchemy Sep 3, 2018
b33dfa6
Update requirementslib and fix VCS installation
techalchemy Sep 3, 2018
6f7dbe9
Windows edge case and news
techalchemy Sep 4, 2018
b4fa920
Merge branch 'master' into fix-cli
kennethreitz Sep 4, 2018
b2110f9
Fix option in cli and get released requirementslib
techalchemy Sep 4, 2018
69defdf
Merge branch 'fix-cli' of github.com:pypa/pipenv into fix-cli
techalchemy Sep 4, 2018
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
Prev Previous commit
Next Next commit
Turn off no-deps for tarballs/zips
- Fixes #2173

Signed-off-by: Dan Ryan <dan@danryan.co>
  • Loading branch information
techalchemy committed Sep 4, 2018
commit f902d8f44276978d26eac87692021dad04a559e8
26 changes: 22 additions & 4 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,10 +731,21 @@ def cleanup_procs(procs, concurrent):
for dep, ignore_hash, block in deps_list_bar:
if len(procs) < PIPENV_MAX_SUBPROCESS:
# Use a specific index, if specified.
dep, index = split_argument(dep, short="i", long_="index", num=1)
dep, extra_indexes = split_argument(dep, long_="extra-index-url")
index = None
if ' --index' in dep:
dep, _, index = dep.partition(' --index')
index = index.lstrip('=')
elif ' -i ' in dep:
dep, _, index = dep.partition(' -i ')
extra_indexes = []
if '--extra-index-url' in dep:
split_dep = dep.split('--extra-index-url')
dep, extra_indexes = split_dep[0], split_dep[1:]
dep = Requirement.from_line(dep)
# Install the module.
prev_no_deps_setting = no_deps
if dep.is_file and any(dep.req.uri.endswith(ext) for ext in ['zip', 'tar.gz']):
no_deps = False
c = pip_install(
dep,
ignore_hashes=ignore_hash,
Expand All @@ -748,7 +759,10 @@ def cleanup_procs(procs, concurrent):
)
c.dep = dep
c.ignore_hash = ignore_hash
c.index = index
c.extra_indexes = extra_indexes
procs.append(c)
no_deps = prev_no_deps_setting
if len(procs) >= PIPENV_MAX_SUBPROCESS or len(procs) == len(deps_list):
cleanup_procs(procs, concurrent)
procs = []
Expand All @@ -761,15 +775,19 @@ def cleanup_procs(procs, concurrent):
for dep, ignore_hash in progress.bar(failed_deps_list, label=INSTALL_LABEL2):
# Use a specific index, if specified.
# Install the module.
prev_no_deps_setting = no_deps
if dep.is_file and any(dep.req.uri.endswith(ext) for ext in ['zip', 'tar.gz']):
no_deps = False
c = pip_install(
dep,
ignore_hashes=ignore_hash,
allow_global=allow_global,
no_deps=no_deps,
index=index,
index=c.index,
requirements_dir=requirements_dir,
extra_indexes=extra_indexes,
extra_indexes=c.extra_indexes,
)
no_deps = prev_no_deps_setting
# The Installation failed…
if c.return_code != 0:
# We echo both c.out and c.err because pip returns error details on out.
Expand Down