@@ -126,10 +126,10 @@ def do_pip_action(self, actions: list[str] = None, install_options: list[str] =
126
126
my_actions = actions or []
127
127
executing = str (Path (self .target ).parent / "scripts" / "env.bat" )
128
128
if Path (executing ).is_file ():
129
- complement = [r"&&" , "cd" , "/D" , self .target , r"&&" , utils .get_python_executable (self .target )]
129
+ complement = [r"&&" , "cd" , "/D" , self .target , r"&&" , utils .get_python_executable (self .target ), "-m" , "pip" ]
130
130
else :
131
131
executing = utils .get_python_executable (self .target )
132
- complement = ["-m" , "pip" ]
132
+ complement = ["-m" , "pip" ]
133
133
try :
134
134
fname = utils .do_script (this_script = None , python_exe = executing , verbose = self .verbose , install_options = complement + my_actions + my_list )
135
135
except RuntimeError as e :
@@ -195,32 +195,7 @@ def patch_standard_packages(self, package_name="", to_movable=True):
195
195
"'check_updates_on_startup': True," ,
196
196
"'check_updates_on_startup': False," ,
197
197
)
198
- # workaround bad installers
199
- if package_name .lower () == "numba" :
200
- self .create_pybat (["numba" ])
201
- else :
202
- self .create_pybat (package_name .lower ())
203
-
204
198
205
- def create_pybat (self , names = "" , contents = r"""@echo off
206
- ..\python "%~dpn0" %*""" ,
207
- ):
208
- """Create launcher batch script when missing"""
209
-
210
- scriptpy = Path (self .target ) / "Scripts" # std Scripts of python
211
- os .makedirs (scriptpy , exist_ok = True )
212
- if not list (names ) == names :
213
- my_list = [f for f in os .listdir (scriptpy ) if "." not in f and f .startswith (names )]
214
- else :
215
- my_list = names
216
- for name in my_list :
217
- if scriptpy .is_dir () and (scriptpy / name ).is_file ():
218
- if (
219
- not (scriptpy / (name + ".exe" )).is_file ()
220
- and not (scriptpy / (name + ".bat" )).is_file ()
221
- ):
222
- with open (scriptpy / (name + ".bat" ), "w" ) as fd :
223
- fd .write (contents )
224
199
225
200
def handle_specific_packages (self , package ):
226
201
"""Packages requiring additional configuration"""
0 commit comments