parameters: (self, output=None)
return_statement: return None
docstring: Install a single source package.
  
          If output is given it should be a file-like object and it
          will receive a log of what happened.
docstring_summary: Install a single source package.
docstring_tokens: Install a single source package .
function: def installPackageOnly(self, output=None):
          """Install a single source package.
  
          If output is given it should be a file-like object and it
          will receive a log of what happened."""
  
          if 'Pre-install-command' in self._dict:
              if _cmd(output, self._buildDirname, self._dict['Pre-install-command']):
                  return "pre-install %s: running \"%s\" failed" % \
                      (self.fullname(), self._dict['Pre-install-command'])
  
          self.beforeInstall()
          installcmd = self._dict.get('Install-command')
          if installcmd and self._install_renames:
              return "Package has install-command and can only be installed to standard location"
          # This is the "bit-bucket" for installations: everything we don't
          # want. After installation we check that it is actually empty
          unwanted_install_dir = None
          if not installcmd:
              extra_args = ""
              for k, v in self._db.preferences.installLocations:
                  if not v:
                      # We don't want these files installed. Send them
                      # to the bit-bucket.
                      if not unwanted_install_dir:
                          unwanted_install_dir = tempfile.mkdtemp()
                      v = unwanted_install_dir
                  extra_args = extra_args + " %s \"%s\"" % (k, v)
              installcmd = '"%s" setup.py install %s' % (sys.executable, extra_args)
          if _cmd(output, self._buildDirname, installcmd):
              return "install %s: running \"%s\" failed" % \
                  (self.fullname(), installcmd)
          if unwanted_install_dir and os.path.exists(unwanted_install_dir):
              unwanted_files = os.listdir(unwanted_install_dir)
              if unwanted_files:
                  rv = "Warning: some files were not installed: %s" % " ".join(unwanted_files)
              else:
                  rv = None
              shutil.rmtree(unwanted_install_dir)
              return rv
  
          self.afterInstall()
  
          if 'Post-install-command' in self._dict:
              if _cmd(output, self._buildDirname, self._dict['Post-install-command']):
                  return "post-install %s: running \"%s\" failed" % \
                      (self.fullname(), self._dict['Post-install-command'])
          return None
function_tokens: def installPackageOnly ( self , output = None ) : if 'Pre-install-command' in self . _dict : if _cmd ( output , self . _buildDirname , self . _dict [ 'Pre-install-command' ] ) : return "pre-install %s: running \"%s\" failed" % ( self . fullname ( ) , self . _dict [ 'Pre-install-command' ] ) self . beforeInstall ( ) installcmd = self . _dict . get ( 'Install-command' ) if installcmd and self . _install_renames : return "Package has install-command and can only be installed to standard location" # This is the "bit-bucket" for installations: everything we don't # want. After installation we check that it is actually empty unwanted_install_dir = None if not installcmd : extra_args = "" for k , v in self . _db . preferences . installLocations : if not v : # We don't want these files installed. Send them # to the bit-bucket. if not unwanted_install_dir : unwanted_install_dir = tempfile . mkdtemp ( ) v = unwanted_install_dir extra_args = extra_args + " %s \"%s\"" % ( k , v ) installcmd = '"%s" setup.py install %s' % ( sys . executable , extra_args ) if _cmd ( output , self . _buildDirname , installcmd ) : return "install %s: running \"%s\" failed" % ( self . fullname ( ) , installcmd ) if unwanted_install_dir and os . path . exists ( unwanted_install_dir ) : unwanted_files = os . listdir ( unwanted_install_dir ) if unwanted_files : rv = "Warning: some files were not installed: %s" % " " . join ( unwanted_files ) else : rv = None shutil . rmtree ( unwanted_install_dir ) return rv self . afterInstall ( ) if 'Post-install-command' in self . _dict : if _cmd ( output , self . _buildDirname , self . _dict [ 'Post-install-command' ] ) : return "post-install %s: running \"%s\" failed" % ( self . fullname ( ) , self . _dict [ 'Post-install-command' ] ) return None