我在Requirements.txt中使用git url列出了一些要求,我希望使它们变得多余(可选要求)。
示例:
git+https://git.example.com/foo/#egg=foo
通常将包从requirements.txt移到setup.cfg
即可:
[extras]
super =
foo
bar
当我尝试将git url放到pip chocks时出现错误。
在Extras中使用git url的正确语法是什么?
Traceback (most recent call last):
File "/Users/ssbarnea/.pyenv/versions/2.7.15/lib/python2.7/site-packages/pbr/core.py", line 96, in pbr
attrs = util.cfg_to_args(path, dist.script_args)
File "/Users/ssbarnea/.pyenv/versions/2.7.15/lib/python2.7/site-packages/pbr/util.py", line 261, in cfg_to_args
kwargs = setup_cfg_to_setup_kwargs(config, script_args)
File "/Users/ssbarnea/.pyenv/versions/2.7.15/lib/python2.7/site-packages/pbr/util.py", line 455, in setup_cfg_to_setup_kwargs
if pkg_resources.evaluate_marker('(%s)' % env_marker):
File "/Users/ssbarnea/.pyenv/versions/2.7.15/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1372, in evaluate_marker
raise SyntaxError(e)
SyntaxError: Invalid marker: '(//git.openstack.org/openstack/browbeat/)', parse error at '//git.op'