问题
I have a tox.ini like this
[tox]
skipsdist = True
envlist = begin,py35,py36,end
[testenv]
commands =
pip install -e git+ssh://git@bitbucket.org/org/repo#egg=repo[server]
and I get the error
Could not detect requirement name for 'git+ssh://git@bitbucket.org/org/repo.git', please specify one with #egg=your_package_name
It looks very much as if the #
is treated as a comment. Is that the case? How can I escape it?
What I tried
\#
: The \ is recognized, but not the rest - so it is not an escape character- Quoting the whole string:
ERROR: InvocationError: could not find executable 'pip install -e git+ssh://git@bitbucket.org/org/repo.git#egg=repo[server]'
回答1:
My guess was to try quoting the URL:
[testenv] commands = pip install -e "git+ssh://git@bitbucket.org/org/repo#egg=repo[server]"
and that seems to do the trick.
来源:https://stackoverflow.com/questions/52723919/does-tox-ini-need-escaping-for-anchors-in-urls-hash