@@ -52,7 +52,7 @@ def __init__(self, venv):
5252 self .files = None
5353 self .info = {}
5454 name = venv .pspec .dashed
55- if runez .DRYRUN and not venv . is_venv_exe ("bin/pip" ):
55+ if runez .DRYRUN and not runez . is_executable ("bin/pip" ):
5656 self .bin .files = {venv .pspec .dashed : "dryrun" } # Pretend an entry point exists in dryrun mode
5757 return
5858
@@ -84,7 +84,7 @@ def __init__(self, venv):
8484 if "_completer" in basename :
8585 self .completers .add_file (path )
8686
87- elif venv . is_venv_exe (path ):
87+ elif runez . is_executable (path ):
8888 self .bin .add_file (path )
8989
9090 elif dirname .endswith (".dist-info" ):
@@ -210,20 +210,6 @@ def bin_path(self, name, try_variant=False):
210210 if os .path .exists (path ):
211211 return path
212212
213- def is_venv_exe (self , path ):
214- """
215- Args:
216- path (str): Path to file to examine
217-
218- Returns:
219- (bool): True if 'path' points to a python executable part of this venv
220- """
221- if runez .is_executable (path ):
222- for line in runez .readlines (path , first = 1 ):
223- if line .startswith ("#!" ):
224- if path .startswith (self .folder ):
225- return True
226-
227213 def pip_install (self , * args ):
228214 """Allows to not forget to state the -i index..."""
229215 r = self .run_pip ("install" , "-i" , self .pspec .index , * args , fatal = False )
0 commit comments