def _extract_python(self): """Extracting Python installer, creating distribution object""" self._print("Extracting Python installer") os.mkdir(self.python_dir) if self.python_fname[-3:] == 'zip': # Python3.5 utils.extract_archive(self.python_fname, targetdir=self.python_dir+r'\..') 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 _extract_python(self): """Extracting Python installer, creating distribution object""" self._print("Extracting Python installer") os.mkdir(self.python_dir) if self.python_fname[-3:] == "zip": # Python3.5 utils.extract_archive(self.python_fname, targetdir=self.python_dir + r"\..") # new Python 3.5 trick (https://bugs.python.org/issue23955) pyvenv_file = osp.join(self.python_dir, "pyvenv.cfg") open(pyvenv_file, "w").write("applocal=True\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 _extract_python(self): """Extracting Python installer, creating distribution object""" self._print("Extracting Python installer") os.mkdir(self.python_dir) if self.python_fname[-3:] == 'zip': # Python3.5 utils.extract_archive(self.python_fname, targetdir=self.python_dir+r'\..') # new Python 3.5 trick (https://bugs.python.org/issue23955) pyvenv_file = osp.join(self.python_dir, 'pyvenv.cfg') open(pyvenv_file, 'w').write('applocal=True\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 install_bdist_wininst(self, package): """Install a distutils package built with the bdist_wininst option (binary distribution, .exe file)""" self._print(package, "Extracting") targetdir = utils.extract_archive(package.fname) self._print_done() self._print(package, "Installing %s from " % targetdir) self.copy_files(package, targetdir, "PURELIB", osp.join("Lib", "site-packages")) self.copy_files(package, targetdir, "PLATLIB", osp.join("Lib", "site-packages")) self.copy_files(package, targetdir, "SCRIPTS", "Scripts", create_bat_files=True) self.copy_files(package, targetdir, "DLLs", "DLLs") self.copy_files(package, targetdir, "DATA", ".") self._print_done()
def install_bdist_wininst(self, package): """Install a distutils package built with the bdist_wininst option (binary distribution, .exe file)""" self._print(package, "Extracting") targetdir = utils.extract_archive(package.fname) self._print_done() self._print(package, "Installing %s from " % targetdir) self.copy_files(package, targetdir, 'PURELIB', osp.join('Lib', 'site-packages')) self.copy_files(package, targetdir, 'PLATLIB', osp.join('Lib', 'site-packages')) self.copy_files(package, targetdir, 'SCRIPTS', 'Scripts', create_bat_files=True) self.copy_files(package, targetdir, 'DLLs', 'DLLs') self.copy_files(package, targetdir, 'DATA', '.') self._print_done()