コード例 #1
0
 def do_pip_action(self, actions=None, install_options=None):
     """Do pip action in a distribution"""
     my_list = install_options
     if my_list is None:
         my_list = []
     my_actions = actions
     if my_actions is None:
         my_actions = []
     executing = osp.join(self.target, '..', 'scripts', 'env.bat')
     if osp.isfile(executing):
         complement = [
             r'&&', 'cd', '/D', self.target, r'&&',
             osp.join(self.target, 'python.exe')
         ]
         complement += ['-m', 'pip']
     else:
         executing = osp.join(self.target, 'python.exe')
         complement = ['-m', 'pip']
     try:
         fname = utils.do_script(this_script=None,
                                 python_exe=executing,
                                 architecture=self.architecture,
                                 verbose=self.verbose,
                                 install_options=complement + my_actions +
                                 my_list)
     except RuntimeError:
         if not self.verbose:
             print("Failed!")
             raise
コード例 #2
0
ファイル: wppm.py プロジェクト: gyenney/Tools
 def do_pip_action(self, actions=None, install_options=None):
     """Do pip action in a distribution"""
     my_list = install_options
     if my_list is None:
         my_list = []
     my_actions = actions
     if my_actions is None:
         my_actions = []
     executing = osp.join(self.target, '..', 'scripts', 'env.bat')
     if osp.isfile(executing):
         complement = [r'&&' , 'cd' , '/D', self.target,
                       r'&&', osp.join(self.target, 'python.exe') ]
         complement += [ '-m', 'pip']
     else:
         executing = osp.join(self.target, 'python.exe')
         complement = [ '-m', 'pip']
     try:
         fname = utils.do_script(this_script=None,
                     python_exe=executing,
                     architecture=self.architecture, verbose=self.verbose,
                     install_options=complement + my_actions + my_list)
     except RuntimeError:
         if not self.verbose:
             print("Failed!")
             raise
コード例 #3
0
ファイル: wppm.py プロジェクト: mengzhongjack/winpython
 def install_script(self, script, install_options=None):
     try:
         fname = utils.do_script(script,
                     python_exe=osp.join(self.target, 'python.exe'),
                     architecture=self.architecture, verbose=self.verbose,
                     install_options=install_options)
     except RuntimeError:
         if not self.verbose:
             print("Failed!")
             raise
コード例 #4
0
 def install_script(self, script, install_options=None):
     try:
         fname = utils.do_script(script,
                     python_exe=osp.join(self.target, 'python.exe'),
                     architecture=self.architecture, verbose=self.verbose,
                     install_options=install_options)
     except RuntimeError:
         if not self.verbose:
             print("Failed!")
             raise
コード例 #5
0
ファイル: wppm.py プロジェクト: Sharafat-hussain/winpython
 def install_script(self, script, install_options=None):
     try:
         fname = utils.do_script(
             script,
             python_exe=utils.get_python_executable(self.target),  # PyPy3 !
             architecture=self.architecture,
             verbose=self.verbose,
             install_options=install_options,
         )
     except RuntimeError:
         if not self.verbose:
             print("Failed!")
             raise