8000 Merge pull request #733 from stonebig/master · ppbhatt/winpython@e2a0c87 · GitHub
[go: up one dir, main page]

Skip to content

Commit e2a0c87

Browse files
authored
Merge pull request winpython#733 from stonebig/master
remove legacy msi, no more used.
2 parents 5dd543c + 299fed4 commit e2a0c87

File tree

3 files changed

+2
-45
lines changed

3 files changed

+2
-45
lines changed

make.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -548,11 +548,6 @@ def _extract_python(self):
548548
# (on hold since 2017-02-16, http://bugs.python.org/issue29578)
549549
pypath_file = osp.join(self.python_dir, 'python_onHold._pth')
550550
open(pypath_file, 'w').write('python36.zip\nDLLs\nLib\n.\nimport site\n')
551-
else:
552-
utils.extract_msi(self.python_fname, targetdir=self.python_dir)
553-
os.remove(osp.join(self.python_dir, osp.basename(self.python_fname)))
554-
if not os.path.exists(osp.join(self.python_dir, 'Scripts')):
555-
os.mkdir(osp.join(self.python_dir, 'Scripts'))
556551
self._print_done()
557552

558553
def _add_msvc_files(self):
@@ -1392,7 +1387,7 @@ def make(self, remove_existing=True, requirements=None, my_winpydir=None): #, f
13921387
print("WARNING: this is just a simulation!", file=sys.stderr)
13931388

13941389
self.python_fname = self.get_package_fname(
1395-
r'python-([0-9\.rcba]*)((\.|\-)amd64)?\.(msi|zip)')
1390+
r'python-([0-9\.rcba]*)((\.|\-)amd64)?\.(zip|zip)')
13961391
self.python_name = osp.basename(self.python_fname)[:-4]
13971392
distname = 'win%s' % self.python_name
13981393
vlst = re.match(r'winpython-([0-9\.]*)', distname
@@ -1602,7 +1597,7 @@ def make_all(build_number, release_level, pyver, architecture,
16021597

16031598
# extract the python subversion to get WPy64-3671b1
16041599
dist.python_fname = dist.get_package_fname(
1605-
r'python-([0-9\.rcba]*)((\.|\-)amd64)?\.(msi|zip)')
1600+
r'python-([0-9\.rcba]*)((\.|\-)amd64)?\.(zip|zip)')
16061601
my_x = ''.join(dist.python_fname.replace('.amd64','').split('.')[-2:-1])
16071602
while not my_x.isdigit() and len(my_x)>0:
16081603
my_x = my_x[:-1]

winpython/utils.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -408,34 +408,6 @@ def _create_temp_dir():
408408
return tmpdir
409409

410410

411-
def extract_msi(fname, targetdir=None, verbose=False):
412-
"""Extract .msi installer to a temporary directory (if targetdir
413-
is None). Return the temporary directory path"""
414-
assert fname.endswith('.msi')
415-
if targetdir is None:
416-
targetdir = _create_temp_dir()
417-
extract = 'msiexec.exe'
418-
bname = osp.basename(fname)
419-
args = ['/a', '%s' % bname]
420-
if not verbose:
421-
args += ['/qn']
422-
args += ['TARGETDIR=%s' % targetdir]
423-
subprocess.call([extract]+args, cwd=osp.dirname(fname))
424-
print('fname=%s' % fname)
425-
print('TARGETDIR=%s' % targetdir)
426-
# ensure pip if it's not 3.3
427-
if '-3.3' not in targetdir:
428-
subprocess.call(
429-
[r'%s\%s' % (targetdir, 'python.exe'), '-m', 'ensurepip'],
430-
cwd=osp.dirname(r'%s\%s' % (targetdir, 'pythons.exe')))
431-
# We patch ensurepip live (shame) !!!!
432-
# rational: https://github.com/pypa/pip/issues/2328
433-
import glob
434-
for fname in glob.glob(r'%s\Scripts\*.exe' % targetdir):
435-
patch_shebang_line(fname)
436-
return targetdir
437-
438-
439411
def extract_exe(fname, targetdir=None, verbose=False):
440412
"""Extract .exe archive to a temporary directory (if targetdir
441413
is None). Return the temporary directory path"""

winpython/wppm.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,6 @@ def install(self, package, install_options=None):
387387
self.install_nsis_package(package)
388388
else:
389389
self.install_bdist_wininst(package)
390-
elif bname.endswith('.msi'):
391-
self.install_bdist_msi(package)
392390
self.handle_specific_packages(package)
393391
# minimal post-install actions
394392
self.patch_standard_packages(package.name)
@@ -629,7 +627,6 @@ def install_bdist_wininst(self, package):
629627
A92F def install_bdist_direct(self, package, install_options=None):
630628
"""Install a package directly !"""
631629
self._print(package, "Installing %s" % package.fname.split(".")[-1])
632-
# targetdir = utils.extract_msi(package.fname, targetdir=self.target)
633630
try:
634631
fname = utils.direct_pip_install(package.fname,
635632
python_exe=osp.join(self.target, 'python.exe'),
@@ -653,13 +650,6 @@ def install_script(self, script, install_options=None):
653650
print("Failed!")
654651
raise
655652

656-
def install_bdist_msi(self, package):
657-
"""Install a distutils package built with the bdist_msi option
658-
(binary distribution, .msi file)"""
659-
raise NotImplementedError
660-
# self._print(package, "Extracting")
661-
# targetdir = utils.extract_msi(package.fname, targetdir=self.target)
662-
# self._print_done()
663653

664654
def install_nsis_package(self, package):
665655
"""Install a Python package built with NSIS (e.g. PyQt or PyQwt)

0 commit comments

Comments
 (0)
0