当前位置: 首页>>代码示例>>Python>>正文


Python install.run方法代码示例

本文整理汇总了Python中setuptools.command.install.install.run方法的典型用法代码示例。如果您正苦于以下问题:Python install.run方法的具体用法?Python install.run怎么用?Python install.run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在setuptools.command.install.install的用法示例。


在下文中一共展示了install.run方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: update_version_py

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def update_version_py():
    if not os.path.isdir(".git"):
        print("This does not appear to be a Git repository.")
        return
    try:
        # p = subprocess.Popen(["git", "describe","--tags", "--always"],
        #        stdout=subprocess.PIPE)
        p = subprocess.Popen("git rev-list HEAD --count".split(),
                             stdout=subprocess.PIPE)

    except EnvironmentError:
        print("unable to run git, leaving eden/_version.py alone")
        return
    stdout = p.communicate()[0]
    if p.returncode != 0:
        print("unable to run git, leaving eden/_version.py alone")
        return
    ver = "0.3."+stdout.strip()
    # ver = str(int(ver,16)) # pypi doesnt like base 16
    f = open("eden/_version.py", "w")
    f.write(VERSION_PY % ver)
    f.close()
    print("set eden/_version.py to '%s'" % ver) 
开发者ID:fabriziocosta,项目名称:EDeN,代码行数:25,代码来源:setup.py

示例2: run

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def run(self):
        _clean.run(self)
        if os.path.exists('build'):
            shutil.rmtree('build')
        for dirpath, dirnames, filenames in os.walk('yatsm'):
            for filename in filenames:
                if any(filename.endswith(suffix) for suffix in
                       ('.c', '.so', '.pyd', '.pyc')):
                    os.unlink(os.path.join(dirpath, filename))
                    continue
                if (any(filename.endswith(suffix) for suffix in
                        ('.pkl', '.json')) and
                        os.path.basename(dirpath) == 'pickles'):
                    os.unlink(os.path.join(dirpath, filename))
            for dirname in dirnames:
                if dirname == '__pycache__':
                    shutil.rmtree(os.path.join(dirpath, dirname))


# Create pickles when building 
开发者ID:ceholden,项目名称:yatsm,代码行数:22,代码来源:setup.py

示例3: run

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def run(self):
        if self.corpora_zip_url is None:
            self.corpora_zip_url = os.environ.get(
                "CORPORA_ZIP_URL",
                "https://github.com/dariusk/corpora/archive/master.zip",
            )
        print("Installing corpora data from " + self.corpora_zip_url)
        mkpath("./corpora-download")
        resp = urlopen(self.corpora_zip_url).read()
        remote = io.BytesIO(resp)
        zf = zipfile.ZipFile(remote, "r")
        zf.extractall("corpora-download")
        try:
            data_dir = glob.glob("./corpora-download/*/data")[0]
        except IndexError:
            raise IndexError(
                "malformed corpora archive: expecting a subdirectory '*/data'")
        copy_tree(data_dir, "pycorpora/data")
        install.run(self) 
开发者ID:aparrish,项目名称:pycorpora,代码行数:21,代码来源:setup.py

示例4: update_version_py

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def update_version_py():
    if not os.path.isdir(".git"):
        print("This does not appear to be a Git repository.")
        return
    try:
        p = subprocess.Popen(["git", "describe",
                              "--tags", "--always"],
                             stdout=subprocess.PIPE)
    except EnvironmentError:
        print("unable to run git, leaving pygenometracks/_version.py alone")
        return
    stdout = p.communicate()[0]
    if p.returncode != 0:
        print("unable to run git, leaving pygenometracks/_version.py alone")
        return
    ver = stdout.strip()
    f = open(os.path.join("pygenometracks", "_version.py"), "w")
    f.write(VERSION_PY % ver)
    f.close()
    print("set pygenometracks/_version.py to '%s'" % ver) 
开发者ID:deeptools,项目名称:pyGenomeTracks,代码行数:22,代码来源:setup.py

示例5: update_version_py

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def update_version_py():
    if not os.path.isdir(".git"):
        print("This does not appear to be a Git repository.")
        return
    try:
        p = subprocess.Popen(["git", "describe",
                              "--tags", "--always"],
                             stdout=subprocess.PIPE)
    except EnvironmentError:
        print("unable to run git, leaving hicexplorer/_version.py alone")
        return
    stdout = p.communicate()[0]
    if p.returncode != 0:
        print("unable to run git, leaving hicexplorer/_version.py alone")
        return
    ver = stdout.strip()
    f = open("hicexplorer/_version.py", "w")
    f.write(VERSION_PY % ver)
    f.close()
    print("set hicexplorer/_version.py to '%s'" % ver) 
开发者ID:deeptools,项目名称:HiCExplorer,代码行数:22,代码来源:setup.py

示例6: run

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def run(self):
        _install.run(self)

        # Do what distutils install_data used to do... *sigh*
        # Despite what the setuptools docs say, the omission of this
        # in setuptools is a bug, not a feature.
        print("== Installing Nautilus Python extension...")
        src_file = "nautilus_open_any_terminal/open_any_terminal_extension.py"
        dst_dir = os.path.join(self.install_data, "share/nautilus-python/extensions")
        self.mkpath(dst_dir)
        dst_file = os.path.join(dst_dir, os.path.basename(src_file))
        self.copy_file(src_file, dst_file)
        print("== Done!")

        print("== Installing GSettings Schema")
        src_file = "./nautilus_open_any_terminal/schemas/com.github.stunkymonkey.nautilus-open-any-terminal.gschema.xml"
        dst_dir = os.path.join(self.install_data, "share/glib-2.0/schemas")
        self.mkpath(dst_dir)
        dst_file = os.path.join(dst_dir, os.path.basename(src_file))
        self.copy_file(src_file, dst_file)
        print("== Done! Run 'glib-compile-schemas " + dst_dir + "/' to compile the schema.") 
开发者ID:Stunkymonkey,项目名称:nautilus-open-any-terminal,代码行数:23,代码来源:setup.py

示例7: run

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def run(self):
        update_version_py()
        self.distribution.metadata.version = get_version()
        return _sdist.run(self) 
开发者ID:fabriziocosta,项目名称:EDeN,代码行数:6,代码来源:setup.py

示例8: run

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def run(self):
        if not self.large_data_dir is None:
            print('Large data directory is set to: {}'.format(self.large_data_dir))
            with open(os.path.expanduser('~/.dustmapsrc'), 'w') as f:
                json.dump({'data_dir': self.large_data_dir}, f, indent=2)

        # install.do_egg_install(self) # Due to bug in setuptools that causes old-style install
        install.run(self) 
开发者ID:gregreen,项目名称:dustmaps,代码行数:10,代码来源:setup.py

示例9: run

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def run(self):
        # Issue #123: skip installation of consul.aio if python version < 3.4.2
        # as this version or later is required by aiohttp
        if sys.version_info < (3, 4, 2):
            if 'consul/aio' in self.distribution.py_modules:
                self.distribution.py_modules.remove('consul/aio')
        install.run(self) 
开发者ID:poppyred,项目名称:python-consul2,代码行数:9,代码来源:setup.py

示例10: run

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def run(self):
        try:
            print("Building custom models:")
            build_custom_models()
        except ImportError as e:
            print("Custom model compilation failed with: %s" % e)
        develop.run(self) 
开发者ID:pyviz-topics,项目名称:EarthSim,代码行数:9,代码来源:setup.py

示例11: run

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def run(self):
        install.run(self)
        if not DFT_AVAILABLE:
            print("****************************************************************")
            print("*** WARNING: DFT is not available.")
            print("****************************************************************")

# Python ABI updates since 3.5
# https://www.python.org/dev/peps/pep-3149/ 
开发者ID:pyscf,项目名称:pyscf,代码行数:11,代码来源:setup.py

示例12: run

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def run(self):
    develop.run(self)
    install_dir = os.path.join(self.install_dir, 'nesmdb')
    _build_vgm_play('/tmp/build_vgmplay', install_dir) 
开发者ID:chrisdonahue,项目名称:nesmdb,代码行数:6,代码来源:setup.py

示例13: run

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def run(self):
        global BUILD_FROM_CYTHON, BUILD_FROM_SOURCE
        BUILD_FROM_CYTHON = True if self.use_cython > 0 else False
        BUILD_FROM_SOURCE = True if self.use_source > 0 else False
        install_command.run(self)


# Reference: https://docs.pytest.org/en/latest/goodpractices.html 
开发者ID:orbingol,项目名称:NURBS-Python,代码行数:10,代码来源:setup.py

示例14: run

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def run(self):
        self.check_liberasure()
        _build.run(self) 
开发者ID:openstack,项目名称:pyeclib,代码行数:5,代码来源:setup.py

示例15: run

# 需要导入模块: from setuptools.command.install import install [as 别名]
# 或者: from setuptools.command.install.install import run [as 别名]
def run(self):
        from arches.setup import install as arches_install

        install.run(self)
        arches_install() 
开发者ID:archesproject,项目名称:arches,代码行数:7,代码来源:setup.py


注:本文中的setuptools.command.install.install.run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。