Conversation
|
Related conversation in #18 |
|
I'm curious if not using editable installs at all is possible? Sounds like avoiding editable installs prevents whole classes of potential packaging bugs. |
The comment says it's needed for trial, so I just assumed that was the reason, but I managed to have it run just fine with only this config for the [testenv:py]
extras = dev
commands =
python -m twisted.trial tests@reivilibre do you remember what lead to this conclusion? |
|
Looks like it's from this commit four years ago matrix-org/synapse@4dd61df. Suspect things may have changed since then. |
|
Yeah, I copied it from Synapse because:
The reason it seems to work here is because of the That doesn't concern me however, since it's Tox and we can just use You will notice that using non-editable mode will be slower because it has to reinstall the package (but not necessarily the deps) every time, whereas in editable mode this is a no-op. However, editable mode is currently broken so the point is moot... (unless that meant we preferred a |
|
Right, let's drop the editable mode then. We're talking about modules here anyway, which are usually fairly small, so the time save introduced by using the editable mode (even if |
deps = --editable .[dev] instead of usedevelop=true
the same directory as... what? |
the present working directory. Can't promise I'm not blaming the wrong thing — but all tools that I use that interact with the path seem to be affected this way (which has really confused me in the past until I noticed). edit: I think the first |
how does that help it find the tests? Doesn't |
No... (or at least not in this case? I imagine you must have some reason for thinking it might!) Reproduction: rei@lithium ┄┄ ~/work/PS/synapse-my-module $ cat tests/__init__.py
import os
print("cwd ", os.getcwd())then rei@lithium ┄┄ ~/work/PS/synapse-my-module $ tox -e py
(snip)
py run-test: commands[0] | python -m twisted.trial tests
cwd /home/rei/work/PS/synapse-my-module
(snip) |
There was a problem hiding this comment.
No objections here!
I found the discussion hard to follow. The summary appears to be:
#18 happens when we use usedevelop=True, since that option expects a setup.py. Removing it makes tox work twice in a row, as noted in the issue.
We originally added usedevelop=True in Synapse as a workaround [link] which does not appear to be necessary for how we invoke trial [link].
Fixes #20