'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.'

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'
    unwanted_install_dir = None
    if (not installcmd):
        extra_args = ''
        for (k, v) in self._db.preferences.installLocations:
            if (not v):
                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
