Python setuptools.command.install.install 模块,do_egg_install() 实例源码

我们从Python开源项目中,提取了以下7个代码示例,用于说明如何使用setuptools.command.install.install.do_egg_install()

项目:SoS    作者:vatlab    | 项目源码 | 文件源码
def run(self):
        # Regular installation
        install.do_egg_install(self)

        # copy sos.vim and sos-detect.vim to .vim
        vim_syntax_dir = os.path.expanduser('~/.vim/syntax')
        vim_syntax_file = os.path.join(vim_syntax_dir, 'sos.vim')
        if not os.path.isdir(vim_syntax_dir):
            os.makedirs(vim_syntax_dir)
        shutil.copy('misc/sos.vim', vim_syntax_file)
        #
        vim_ftdetect_dir = os.path.expanduser('~/.vim/ftdetect')
        vim_ftdetect_file = os.path.join(vim_ftdetect_dir, 'sos.vim')
        if not os.path.isdir(vim_ftdetect_dir):
            os.makedirs(vim_ftdetect_dir)
        shutil.copy('misc/sos-detect.vim', vim_ftdetect_file)
        log.info('\nSoS is installed and configured to use with vim.')
        log.info('Use "set syntax=sos" to enable syntax highlighting.')
项目:aniwall    作者:worron    | 项目源码 | 文件源码
def run(self):
        _pre_install()
        install.run(self)
        # FIXME: why egg missed without manual install?
        install.do_egg_install(self)
项目:jack    作者:uclmr    | 项目源码 | 文件源码
def run(self):
        _install.do_egg_install(self)
        spacy_download_en()
        _install.run(self)
项目:presswork    作者:hangtwenty    | 项目源码 | 文件源码
def run(self):
        # setuptools is an oldie goldie. super() is not supported by base class (it's an "old style class")
        SetuptoolsInstallCommand.do_egg_install(self)

        import nltk
        for corpus in _required_nltk_corpora:
            nltk.download(corpus)
项目:forseti-security    作者:GoogleCloudPlatform    | 项目源码 | 文件源码
def run(self):
        build_protos()
        install.do_egg_install(self)
项目:rvmi-rekall    作者:fireeye    | 项目源码 | 文件源码
def do_egg_install(self):
        path = os.path.abspath(
            os.path.join(os.path.dirname(__file__), "rekall-core", "setup.py"))

        if os.access(path, os.F_OK):
            print "Installing rekall-core from local directory."

            subprocess.check_call([sys.executable, "setup.py", "install"],
                                  cwd="rekall-core")

        # Need to call this directly because _install.run does crazy stack
        # walking and falls back to compatibility mode.
        _install.do_egg_install(self)
项目:magnet    作者:pymag09    | 项目源码 | 文件源码
def run(self):
        info = '''
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!                                                   !
! PLEASE READ COMMENTS IN ~/.magnet/console.sh AND  !
! CHANGE SETTINGS ACCORDING YOUR SYSTEM.            !
!                                                   !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
'''
        print(info)
        cmd_pipeline = "apt-get install -y python-qt4 xdotool && cp -R config %s/.magnet" % os.environ.get('HOME')
        for c in cmd_pipeline.split(' && '):
            subprocess.check_output(c.split(' '))
        install.do_egg_install(self)