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


Python command.install方法代码示例

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


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

示例1: run

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import install [as 别名]
def run(self):
        bin = os.path.join(self.root, "usr/bin")
        try:
            os.makedirs(bin)
        except:
            pass
        for file, pkg in get_console_scripts():
           path = os.path.join(bin, file)
           with open(path, "w") as f:
               f.write(
"""#!/usr/bin/python3
from {} import main
import sys
if __name__ == '__main__':
	sys.exit(main())
""".format(pkg))

           os.chmod(path, 0o755)
        setuptools.command.install.install.run(self) 
开发者ID:QubesOS,项目名称:qubes-core-admin,代码行数:21,代码来源:setup.py

示例2: run

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import install [as 别名]
def run(self):
        setuptools.command.install.install.run(self)
        try:
            import spacy
            spacy.cli.validate()
        except ModuleNotFoundError:
            pass 
开发者ID:textpipe,项目名称:textpipe,代码行数:9,代码来源:setup.py

示例3: build_js

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import install [as 别名]
def build_js(command_subclass):
    """Decorator to call npm install and npm run build"""
    subclass_run = command_subclass.run
    def run(self):
        self.run_command("build_js")
        subclass_run(self)
    command_subclass.run = run
    return command_subclass 
开发者ID:MetOffice,项目名称:forest,代码行数:10,代码来源:setup.py

示例4: run

# 需要导入模块: from setuptools import command [as 别名]
# 或者: from setuptools.command import install [as 别名]
def run(self):
        cwd = os.getcwd()
        os.chdir(JS_DIR)
        if not os.path.exists("node_modules"):
            subprocess.check_call(["npm", "install"])
        subprocess.check_call(["npm", "run", "build"])
        os.chdir(cwd)
        super().run() 
开发者ID:MetOffice,项目名称:forest,代码行数:10,代码来源:setup.py

示例5: run

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

示例6: run

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

示例7: run

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


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