@@ -561,9 +561,11 @@ def source_to_wininst(fname, python_exe=None,
561
561
architecture = architecture , verbose = verbose )
562
562
563
563
564
- def build_wheel (this_whl , python_exe = None , copy_to = None ,
565
- architecture = None , verbose = False , install_options = None ):
566
- """Execute the wheel (without dependancies)"""
564
+ def wheel_pip_install (fname , python_exe = None ,
565
+ architecture = None , verbose = False , install_options = None ):
566
+ """direct install via pip !"""
567
+ copy_to = osp .dirname (fname )
568
+
567
569
if python_exe is None :
568
570
python_exe = sys .executable
569
571
assert osp .isfile (python_exe )
@@ -574,7 +576,7 @@ def build_wheel(this_whl, python_exe=None, copy_to=None,
574
576
if install_options :
575
577
cmd += install_options # typically ['--no-deps']
576
578
print ('wheel install_options' , install_options )
577
- cmd += [this_whl ]
579
+ cmd += [fname ]
578
580
# print('build_wheel', myroot, cmd)
579
581
580
582
if verbose :
@@ -586,12 +588,12 @@ def build_wheel(this_whl, python_exe=None, copy_to=None,
586
588
the_log = ("%s" % stdout + "\n %s" % stderr )
587
589
588
590
if ' not find ' in the_log or ' not found ' in the_log :
589
- print ("Failed to Install: \n %s \n " % this_whl )
591
+ print ("Failed to Install: \n %s \n " % fname )
590
592
print ("msg: %s" % the_log )
591
593
raise RuntimeError
592
594
p .stdout .close ()
593
595
p .stderr .close ()
594
- src_fname = this_whl
596
+ src_fname = fname
595
597
if copy_to is None :
596
598
return src_fname
597
599
else :
@@ -629,15 +631,6 @@ def do_script(this_script, python_exe=None, copy_to=None,
629
631
return 'ok'
630
632
631
633
632
- def wheel_to_wininst (fname , python_exe = None ,
633
- architecture = None , verbose = False , install_options = None ):
634
- """Just install a wheel !"""
635
- return build_wheel (fname , python_exe = python_exe ,
636
- copy_to = osp .dirname (fname ),
637
- architecture = architecture , verbose = verbose ,
638
- install_options = install_options )
639
-
640
-
641
634
if __name__ == '__main__' :
642
635
gcc = get_gcc_version (osp .join (BASE_DIR , 'tools.win32' , 'mingw32' , 'bin' ))
643
636
print (("gcc version: %r" % gcc ))
0 commit comments