我有一个需要同时支持Python 2和3的软件包(usignals)。在我的Class<?>
中,我有这个软件包:
pyproject.toml
和
[tool.poetry.dependencies]
python = ">=2.7, >=3.6"
通过[tool.poetry.dev-dependencies]
ipython = [
{version = "~5", python = "~2.7"},
{version = "~7.8", python = ">=3.5"}
]
运行Tox时,出现此错误:
tox -rve py27
请注意,如果我指定ERROR: Package u'usignals-0.4.0' requires a different Python: 2.7.5 not in '>=3.6'
,则得到python = "*"
也是没有帮助的。
请注意,如果指定Because usignals depends on both ipython (~5) and ipython (~7.8), version solving failed.
,则会收到与以前相同的错误。
我在做什么错了?
在有人问之前,这是python = "~2.7 || >=3.6"
文件:
tox.ini
更详细的输出:
[tox]
isolated_build = true
envlist = py27, py36
# Run `pyenv global 3.7.4 system` if pyenv cannot find python2.
[testenv]
whitelist_externals = poetry
commands =
poetry install -v
poetry run pytest tests/
答案 0 :(得分:0)