tox: skipsdist and usedevelop don't play well together
- Bitbucket: https://bitbucket.org/hpk42/tox/issue/270
- Originally reported by: @aconrad
- Originally created at: 2015-08-24T23:55:17.766
I’m trying to do usedevelop and skipsdist at the same time but it feels that they are mutually exclusive with tox.
I have 2 tasks, py34 and pep8. When I run py34 I want to use usedevelop=true but when I run pep8 I don’t want my project to be installed at all and use skipsdist=true.
Please correct me if I’m wrong: skipsdist is only a global setting recognized under the section [tox] which would then skip the sdist step for all [testenv] sections which in turns would ignore any usedevelop=true flag since it’s tox will not even try to install the testenv in the first place.
Can we have skipsdist be recognized under a [testenv]?
#!ini
[tox]
envlist = py34, pep8
[testenv]
usedevelop = true
deps =
-rtest-requirements.txt
commands =
py.test {posargs:tests/}
[testenv:pep8]
skipsdist = true
basepython = python3.4
deps = flake8
commands =
flake8 pricingsvc/ --max-line-length=100
[pytest]
addopts =
--junitxml=junit.xml
--cov=pricingsvc --cov-report=xml --cov-report=term-missing
--verbose
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 6
- Comments: 16 (7 by maintainers)
Commits related to this issue
- Fixing #270: skip(dist/_install) and usedevelop to work together — committed to ferdonline/tox by ferdonline 7 years ago
I think that’s the point that needs reaching an agreement.
Considering that (directly or indirectly - like in my config) one arrives to have both
in one environment. To my mind it seems much more reasonable to honour skip_install, because it doesn’t really disrespect usedevelop. I see it clear that usedevelop is an install mode, so if there’s nothing to install it’s still honoured. Best
Hi thanks for your reply. Consider this case, which is I think can be quite common:
As you say, the options seem exclusive, but due to “inheritance” we end up with a configuration that produces a strange effect - installing in develop when we instructed not to install at all. And typically rules defined in a tighter scope should have precedence. Due to complex deps, the package installation, which was not intended, fails.
I meant skip_install, sorry
I looked into the source and can be easily fixed. I’m running the tests. I can make a PR later. Thanks