Skip to content

Commit

Permalink
Update core and rebuild ci
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Ryan <dan@danryan.co>
  • Loading branch information
techalchemy committed Nov 14, 2018
1 parent 5e5e1ed commit 08d94d4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
25 changes: 16 additions & 9 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
download_file,
is_pinned,
is_star,
rmtree,
clean_resolved_dep,
parse_indexes,
escape_cmd,
create_spinner,
Expand Down Expand Up @@ -135,8 +133,8 @@ def do_clear():
from pip import locations

try:
shutil.rmtree(PIPENV_CACHE_DIR)
shutil.rmtree(locations.USER_CACHE_DIR)
vistir.path.rmtree(PIPENV_CACHE_DIR)
vistir.path.rmtree(locations.USER_CACHE_DIR)
except OSError as e:
# Ignore FileNotFoundError. This is needed for Python 2.7.
import errno
Expand Down Expand Up @@ -186,7 +184,7 @@ def cleanup_virtualenv(bare=True):
click.echo(crayons.red("Environment creation aborted."))
try:
# Delete the virtualenv.
rmtree(project.virtualenv_location)
vistir.path.rmtree(project.virtualenv_location)
except OSError as e:
click.echo(
"{0} An error occurred while removing {1}!".format(
Expand Down Expand Up @@ -657,8 +655,8 @@ def do_where(virtualenv=False, bare=True):
def _cleanup_procs(procs, concurrent, failed_deps_queue, retry=True):
while not procs.empty():
c = procs.get()
# if concurrent:
c.block()
if concurrent:
c.block()
failed = False
if c.return_code != 0:
failed = True
Expand Down Expand Up @@ -740,6 +738,8 @@ def batch_install(deps_list, procs, failed_deps_queue,
trusted_hosts=trusted_hosts,
extra_indexes=extra_indexes
)
if dep.is_vcs:
c.block()
if procs.qsize() < nprocs:
c.dep = dep
procs.put(c)
Expand All @@ -760,7 +760,8 @@ def do_install_dependencies(
requirements_dir=None,
pypi_mirror=False,
):
""""Executes the install functionality.
""""
Executes the install functionality.
If requirements is True, simply spits out a requirements format to stdout.
"""
Expand Down Expand Up @@ -1060,6 +1061,12 @@ def do_lock(
lockfile[section_name][canonical_name] = cached_lockfile[
section_name
][canonical_name].copy()
for key in ["default", "develop"]:
packages = set(cached_lockfile[key].keys())
new_lockfile = set(lockfile[key].keys())
missing = packages - new_lockfile
for missing_pkg in missing:
lockfile[key][missing_pkg] = cached_lockfile[key][missing_pkg].copy()
# Overwrite any develop packages with default packages.
lockfile["develop"].update(overwrite_dev(lockfile.get("default", {}), lockfile["develop"]))
if write:
Expand All @@ -1085,7 +1092,7 @@ def do_purge(bare=False, downloads=False, allow_global=False):
if downloads:
if not bare:
click.echo(crayons.normal(fix_utf8("Clearing out downloads directory…"), bold=True))
shutil.rmtree(project.download_location)
vistir.path.rmtree(project.download_location)
return

# Remove comments from the output, if any.
Expand Down
2 changes: 1 addition & 1 deletion pipenv/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def __init__(self, hint=None, **kwargs):

class SetupException(PipenvException):
def __init__(self, message=None, **kwargs):
PipenvException.__init__(message, **kwargs)
PipenvException.__init__(self, message, **kwargs)


class VirtualenvException(PipenvException):
Expand Down

0 comments on commit 08d94d4

Please sign in to comment.