tox.ini是否需要转义URL中的锚(哈希号)?

时间:2018-10-09 14:51:36

标签: python ini tox

我有一个像这样的tox.ini

[tox]
skipsdist = True
envlist = begin,py35,py36,end

[testenv]
commands =
    pip install -e git+ssh://git@bitbucket.org/org/repo#egg=repo[server]

我收到错误消息

  

无法检测到“ git + ssh://git@bitbucket.org/org/repo.git”的需求名称,请使用#egg = your_package_name指定一个名称

看起来好像#被当作注释一样。是这样吗我该如何逃脱?

我尝试过的

  • \#:可以识别\,但不能识别其余字符-因此它不是转义字符
  • 引用整个字符串:ERROR: InvocationError: could not find executable 'pip install -e git+ssh://git@bitbucket.org/org/repo.git#egg=repo[server]'

1 个答案:

答案 0 :(得分:1)

我的猜测是尝试引用URL:

[testenv]
commands =
    pip install -e "git+ssh://git@bitbucket.org/org/repo#egg=repo[server]"

这似乎可以解决问题。

相关问题