本文整理汇总了Python中setuptools.command.develop.develop.install_for_development函数的典型用法代码示例。如果您正苦于以下问题:Python install_for_development函数的具体用法?Python install_for_development怎么用?Python install_for_development使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了install_for_development函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: install_for_development
def install_for_development(self):
"""Install the package for development.
This takes care of the work of installing all dependencies.
"""
if self.no_deps:
# In this case, we don't want to install any of the dependencies
# below. However, it's really unlikely that a user is going to
# want to pass --no-deps.
#
# Instead, what this really does is give us a way to know we've
# been called by `pip install -e .`. That will call us with
# --no-deps, as it's going to actually handle all dependency
# installation, rather than having easy_install do it.
develop.install_for_development(self)
return
try:
check_run(['node', '--version'])
except (subprocess.CalledProcessError, OSError):
try:
check_run(['nodejs', '--version'])
except:
# nodejs wasn't found, which is fine. We want to ignore this.
pass
else:
raise RuntimeError(
'Unable to find "node" in the path, but "nodejs" was '
'found. You will need to ensure "nodejs" can be run '
'by typing "node". You can do this by typing `ln -s '
'nodejs node` in the directory containing "nodejs".')
raise RuntimeError(
'Unable to find "node" in the path. You will need to '
'install a modern version of NodeJS and ensure you can '
'run it by typing "node" on the command line.')
# Install the latest pip and setuptools. Note that the order here
# matters, as otherwise a stale setuptools can be left behind,
# causing installation errors.
self._run_pip(['install', '-U', 'setuptools'])
self._run_pip(['install', '-U', 'pip'])
# Install the dependencies using pip instead of easy_install. This
# will use wheels instead of eggs, which are ideal for our users.
self._run_pip(['install', '-e', '.'])
self._run_pip(['install', '-r', 'dev-requirements.txt'])
if self.with_doc_deps:
self._run_pip(['install', '-r', 'doc-requirements.txt'])
if not self.no_npm:
if self.use_npm_cache:
self.distribution.command_options['install_node_deps'] = {
'use_npm_cache': ('install_node_deps', 1),
}
self.run_command('install_node_deps')
开发者ID:chipx86,项目名称:djblets,代码行数:58,代码来源:setup.py
示例2: install_for_development
def install_for_development(self):
"""Install the package for development.
This takes care of the work of installing all dependencies.
"""
if self.no_deps:
# In this case, we don't want to install any of the dependencies
# below. However, it's really unlikely that a user is going to
# want to pass --no-deps.
#
# Instead, what this really does is give us a way to know we've
# been called by `pip install -e .`. That will call us with
# --no-deps, as it's going to actually handle all dependency
# installation, rather than having easy_install do it.
develop.install_for_development(self)
return
# Install the latest pip and setuptools. Note that the order here
# matters, as otherwise a stale setuptools can be left behind,
# causing installation errors.
self._run_pip(['install', '-U', 'setuptools'])
self._run_pip(['install', '-U', 'pip'])
# Install the dependencies using pip instead of easy_install. This
# will use wheels instead of eggs, which are ideal for our users.
if sys.platform == 'darwin':
# We're building on macOS, and some of our dependencies
# (hi there, mercurial!) won't compile using gcc (their default
# in some cases), so we want to force the proper compiler.
os.putenv(b'CC', b'clang')
self._run_pip(['install', '-e', '.'])
self._run_pip(['install', '-r', 'dev-requirements.txt'])
if self.with_doc_deps:
self._run_pip(['install', '-r', 'doc-requirements.txt'])
if not self.no_npm:
if self.use_npm_cache:
self.distribution.command_options['install_node_deps'] = {
'use_npm_cache': ('install_node_deps', 1),
}
self.run_command('install_node_deps')
开发者ID:xiaogao6681,项目名称:reviewboard,代码行数:44,代码来源:setup.py
示例3: install_for_development
def install_for_development(self):
self.run_command('build_static')
return develop.install_for_development(self)
开发者ID:lisbitid,项目名称:burp-ui,代码行数:3,代码来源:setup.py
示例4: install_for_development
def install_for_development(self):
if not IS_LIGHT_BUILD:
self.run_command('build_static')
return develop.install_for_development(self)
开发者ID:zuiwanting,项目名称:sentry,代码行数:4,代码来源:setup.py
示例5: install_for_development
def install_for_development(self):
self.compile_mo()
return develop_.install_for_development(self)
开发者ID:Andrer757,项目名称:webilder,代码行数:3,代码来源:setup.py
示例6: install_for_development
def install_for_development(self):
# Build sources in-place, too.
self.reinitialize_command('build_src', inplace=1)
# Make sure scripts are built.
self.run_command('build_scripts')
old_develop.install_for_development(self)
开发者ID:glimmercn,项目名称:numpy,代码行数:6,代码来源:develop.py
示例7: install_for_development
def install_for_development(self):
self.generate_distribution()
develop.install_for_development(self)
开发者ID:nphilipp,项目名称:tw2.cookieconsent,代码行数:3,代码来源:setup.py
示例8: install_for_development
def install_for_development(self):
log.info("running npm install")
check_output(['npm', 'install', '--quiet'])
# TODO(dcramer): can we run compilestatic somehow here?
return develop.install_for_development(self)
开发者ID:shashisp,项目名称:sentry,代码行数:5,代码来源:setup.py
示例9: install_for_development
def install_for_development(self):
self.run_command("build_static")
return DevelopCommand.install_for_development(self)
开发者ID:coxley,项目名称:nsot,代码行数:3,代码来源:setup.py
示例10: install_for_development
def install_for_development(self):
develop.install_for_development(self)
self.generate_files(self.here, self.here)
开发者ID:nphilipp,项目名称:tw2.fontawesome,代码行数:4,代码来源:setup.py
注:本文中的setuptools.command.develop.develop.install_for_development函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论