@@ -645,10 +645,10 @@ def do_where(virtualenv=False, bare=True):
645
645
click .echo (location )
646
646
647
647
648
- def _cleanup_procs (procs , concurrent , failed_deps_queue , retry = True ):
648
+ def _cleanup_procs (procs , failed_deps_queue , retry = True ):
649
649
while not procs .empty ():
650
650
c = procs .get ()
651
- if concurrent :
651
+ if not c . blocking :
652
652
c .block ()
653
653
failed = False
654
654
if c .return_code != 0 :
@@ -682,7 +682,7 @@ def _cleanup_procs(procs, concurrent, failed_deps_queue, retry=True):
682
682
def batch_install (deps_list , procs , failed_deps_queue ,
683
683
requirements_dir , no_deps = False , ignore_hashes = False ,
684
684
allow_global = False , blocking = False , pypi_mirror = None ,
685
- nprocs = PIPENV_MAX_SUBPROCESS , retry = True ):
685
+ retry = True ):
686
686
from .vendor .requirementslib .models .utils import strip_extras_markers_from_requirement
687
687
failed = (not retry )
688
688
if not failed :
@@ -753,12 +753,13 @@ def batch_install(deps_list, procs, failed_deps_queue,
753
753
extra_indexes = extra_indexes ,
754
754
use_pep517 = not failed ,
755
755
)
756
- if procs . qsize () < nprocs :
757
- c . dep = dep
758
- procs . put ( c )
756
+ c . dep = dep
757
+ if dep . is_vcs or dep . editable :
758
+ c . block ( )
759
759
760
+ procs .put (c )
760
761
if procs .full () or procs .qsize () == len (deps_list ):
761
- _cleanup_procs (procs , not blocking , failed_deps_queue , retry = retry )
762
+ _cleanup_procs (procs , failed_deps_queue , retry = retry )
762
763
763
764
764
765
def do_install_dependencies (
@@ -782,7 +783,6 @@ def do_install_dependencies(
782
783
from six .moves import queue
783
784
if requirements :
784
785
bare = True
785
- blocking = not concurrent
786
786
# Load the lockfile if it exists, or if only is being used (e.g. lock is being used).
787
787
if skip_lock or only or not project .lockfile_exists :
788
788
if not bare :
@@ -818,27 +818,27 @@ def do_install_dependencies(
818
818
)
819
819
sys .exit (0 )
820
820
821
- procs = queue .Queue (maxsize = PIPENV_MAX_SUBPROCESS )
821
+ if concurrent :
822
+ nprocs = PIPENV_MAX_SUBPROCESS
823
+ else :
824
+ nprocs = 1
825
+ procs = queue .Queue (maxsize = nprocs )
822
826
failed_deps_queue = queue .Queue ()
823
827
if skip_lock :
824
828
ignore_hashes = True
825
829
826
830
install_kwargs = {
827
831
"no_deps" : no_deps , "ignore_hashes" : ignore_hashes , "allow_global" : allow_global ,
828
- "blocking" : blocking , "pypi_mirror" : pypi_mirror
832
+ "blocking" : not concurrent , "pypi_mirror" : pypi_mirror
829
833
}
830
- if concurrent :
831
- install_kwargs ["nprocs" ] = PIPENV_MAX_SUBPROCESS
832
- else :
833
- install_kwargs ["nprocs" ] = 1
834
834
835
835
# with project.environment.activated():
836
836
batch_install (
837
837
deps_list , procs , failed_deps_queue , requirements_dir , ** install_kwargs
838
838
)
839
839
840
840
if not procs .empty ():
841
- _cleanup_procs (procs , concurrent , failed_deps_queue )
841
+ _cleanup_procs (procs , failed_deps_queue )
842
842
843
843
# Iterate over the hopefully-poorly-packaged dependencies…
844
844
if not failed_deps_queue .empty ():
@@ -850,15 +850,14 @@ def do_install_dependencies(
850
850
failed_dep = failed_deps_queue .get ()
851
851
retry_list .append (failed_dep )
852
852
install_kwargs .update ({
853
- "nprocs" : 1 ,
854
853
"retry" : False ,
855
854
"blocking" : True ,
856
855
})
857
856
batch_install (
858
857
retry_list , procs , failed_deps_queue , requirements_dir , ** install_kwargs
859
858
)
860
859
if not procs .empty ():
861
- _cleanup_procs (procs , False , failed_deps_queue , retry = False )
860
+ _cleanup_procs (procs , failed_deps_queue , retry = False )
862
861
863
862
864
863
def convert_three_to_python (three , python ):
@@ -2507,6 +2506,8 @@ def do_run(command, args, three=None, python=False, pypi_mirror=None):
2507
2506
previous_pipenv_active_value = os .environ .get ("PIPENV_ACTIVE" )
2508
2507
os .environ ["PIPENV_ACTIVE" ] = vistir .misc .fs_str ("1" )
2509
2508
2509
+ os .environ .pop ("PIP_SHIMS_BASE_MODULE" , None )
2510
+
2510
2511
try :
2511
2512
script = project .build_script (command , args )
2512
2513
cmd_string = ' ' .join ([script .command ] + script .args )
0 commit comments