8000 remove legacy msi, no more used. by stonebig · Pull Request #733 · winpython/winpython · GitHub
[go: up one dir, main page]

Skip to content

remove legacy msi, no more used. #733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove legacy msi, no more used.
  • Loading branch information
stonebig committed Mar 24, 2019
commit 299fed45585aba4a22d2f867e110c08f6c2970d6
9 changes: 2 additions & 7 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,11 +548,6 @@ def _extract_python(self):
# (on hold since 2017-02-16, http://bugs.python.org/issue29578)
pypath_file = osp.join(self.python_dir, 'python_onHold._pth')
open(pypath_file, 'w').write('python36.zip\nDLLs\nLib\n.\nimport site\n')
else:
utils.extract_msi(self.python_fname, targetdir=self.python_dir)
os.remove(osp.join(self.python_dir, osp.basename(self.python_fname)))
if not os.path.exists(osp.join(self.python_dir, 'Scripts')):
os.mkdir(osp.join(self.python_dir, 'Scripts'))
self._print_done()

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

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

# extract the python subversion to get WPy64-3671b1
dist.python_fname = dist.get_package_fname(
r'python-([0-9\.rcba]*)((\.|\-)amd64)?\.(msi|zip)')
r'python-([0-9\.rcba]*)((\.|\-)amd64)?\.(zip|zip)')
my_x = ''.join(dist.python_fname.replace('.amd64','').split('.')[-2:-1])
while not my_x.isdigit() and len(my_x)>0:
my_x = my_x[:-1]
Expand Down
28 changes: 0 additions & 28 deletions winpython/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,34 +408,6 @@ def _create_temp_dir():
return tmpdir


def extract_msi(fname, targetdir=None, verbose=False):
"""Extract .msi installer to a temporary directory (if targetdir
is None). Return the temporary directory path"""
assert fname.endswith('.msi')
if targetdir is None:
targetdir = _create_temp_dir()
extract = 'msiexec.exe'
bname = osp.basename(fname)
args = ['/a', '%s' % bname]
if not verbose:
args += ['/qn']
args += ['TARGETDIR=%s' % targetdir]
subprocess.call([extract]+args, cwd=osp.dirname(fname))
print('fname=%s' % fname)
print('TARGETDIR=%s' % targetdir)
# ensure pip if it's not 3.3
if '-3.3' not in targetdir:
subprocess.call(
[r'%s\%s' % (targetdir, 'python.exe'), '-m', 'ensurepip'],
cwd=osp.dirname(r'%s\%s' % (targetdir, 'pythons.exe')))
# We patch ensurepip live (shame) !!!!
# rational: https://github.com/pypa/pip/issues/2328
import glob
for fname in glob.glob(r'%s\Scripts\*.exe' % targetdir):
patch_shebang_line(fname)
return targetdir


def extract_exe(fname, targetdir=None, verbose=False):
"""Extract .exe archive to a temporary directory (if targetdir
is None). Return the temporary directory path"""
Expand Down
10 changes: 0 additions & 10 deletions winpython/wppm.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,6 @@ def install(self, package, install_options=None):
self.install_nsis_package(package)
else:
self.install_bdist_wininst(package)
elif bname.endswith('.msi'):
self.install_bdist_msi(package)
self.handle_specific_packages(package)
# minimal post-install actions
self.patch_standard_packages(package.name)
Expand Down Expand Up @@ -629,7 +627,6 @@ def install_bdist_wininst(self, package):
def install_bdist_direct(self, package, install_options=None):
"""Install a package directly !"""
self._print(package, "Installing %s" % package.fname.split(".")[-1])
# targetdir = utils.extract_msi(package.fname, targetdir=self.target)
try:
fname = utils.direct_pip_install(package.fname,
python_exe=osp.join(self.target, 'python.exe'),
Expand All @@ -653,13 +650,6 @@ def install_script(self, script, install_options=None):
print("Failed!")
raise

def install_bdist_msi(self, package):
"""Install a distutils package built with the bdist_msi option
(binary distribution, .msi file)"""
raise NotImplementedError
# self._print(package, "Extracting")
# targetdir = utils.extract_msi(package.fname, targetdir=self.target)
# self._print_done()

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