У меня есть пакет (usignals), который должен поддерживать Python 2 и 3. В моем 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
file:
[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/
Еще более подробный вывод:
Resolving dependencies...
1: fact: usignals is 0.4.0
1: derived: usignals
1: fact: usignals depends on click-help-colors (^0.6.0)
1: fact: usignals depends on click (^7.0)
1: fact: usignals depends on pymysql (^0.9.3)
1: fact: usignals depends on coverage (*)
1: fact: usignals depends on pytest (*)
1: fact: usignals depends on sphinx (^1.8)
1: fact: usignals depends on sphinx (^2)
1: fact: usignals depends on ipython (~5)
1: fact: usignals depends on ipython (~7.8)
1: fact: usignals depends on bumpversion (^0.5.3)
1: fact: usignals depends on docformatter (^1.3)
1: fact: usignals depends on flake8 (^3.7)
1: fact: usignals depends on mock (^3.0)
1: fact: usignals depends on sure (^1.4)
1: fact: usignals depends on tox (^3.14)
1: fact: usignals depends on yapf (^0.28.0)
1: fact: usignals depends on pytest-colordots (^1.1)
1: fact: usignals depends on pytest-runner (^5.1)
1: fact: usignals depends on pytest-xdist (^1.30)
1: selecting usignals (0.4.0)
1: derived: pytest-xdist (^1.30)
1: derived: pytest-runner (^5.1)
1: derived: pytest-colordots (^1.1)
1: derived: yapf (^0.28.0)
1: derived: tox (^3.14)
1: derived: sure (^1.4)
1: derived: mock (^3.0)
1: derived: flake8 (^3.7)
1: derived: docformatter (^1.3)
1: derived: bumpversion (^0.5.3)
1: derived: ipython (~7.8)
1: conflict: usignals depends on ipython (~5)
1: ! not ipython (~5) is satisfied by ipython (~7.8)
1: ! which is caused by "usignals depends on ipython (~7.8)"
1: ! thus: version solving failed
1: Version solving took 0.016 seconds.
1: Tried 1 solutions.
[SolverProblemError]
Because usignals depends on both ipython (~5) and ipython (~7.8), version solving failed.