qunarcorp/open_dnsdb

tools/with_venv.sh python setup.py install

kenkong2019 opened this issue · 1 comments

问题描述
帮忙看看啥问题,下载V0.2的版本,前面步骤都很顺利,就这步过不去
tools/with_venv.sh python setup.py install

环境配置
Centos 7.4
Python 3.6.8
pip 19.2.2

复现步骤
1.
2.
3.

实际输出结果
(.venv) [root@minion02 open_dnsdb]# tools/with_venv.sh python setup.py install
ERROR:root:Error parsing
Traceback (most recent call last):
File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/pbr/core.py", line 96, in pbr
attrs = util.cfg_to_args(path, dist.script_args)
File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/pbr/util.py", line 270, in cfg_to_args
pbr.hooks.setup_hook(config)
File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/pbr/hooks/init.py", line 25, in setup_hook
metadata_config.run()
File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/pbr/hooks/base.py", line 27, in run
self.hook()
File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/pbr/hooks/metadata.py", line 26, in hook
self.config['name'], self.config.get('version', None))
File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/pbr/packaging.py", line 874, in get_version
name=package_name))
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name dnsdb was given, but was not able to be found.
error in setup command: Error parsing /usr/local/open_dnsdb/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name dnsdb was given, but was not able to be found.

期望输出结果

这个问题我没能复现,结合其他同学的回答,试试下面的命令,看能否解决问题

$ pip freeze | grep pbr
pbr==5.1.3
$export PBR_VERSION='5.1.3'