加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pep-508-install 901 Bytes
一键复制 编辑 原始数据 按行查看 历史
Sean Gillies 提交于 2016-05-25 09:55 . Prototype support for PEP 518
#!/usr/bin/env python
"""Prototype support for PEP 518:
"Specifying Minimum Build System Requirements for Python Projects".
A future version of pip will do this for us and we'll remove this script.
This script installs Fiona in develop mode (``pip install -e .[test]``).
"""
import subprocess
def main():
# Parse config file for build system requirements.
build_system_requirements = None
with open('pyproject.toml') as config:
for line in config:
if line.startswith('requires'):
build_system_requirements = line.split('=')[-1]
# Install them if found.
if build_system_requirements:
reqs = eval(build_system_requirements)
subprocess.call(['pip', 'install'] + reqs)
# Now install our package in editable mode.
subprocess.call(['pip', 'install', '-e', '.[test]'] + reqs)
if __name__ == '__main__':
main()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化