On Wed, Jan 02, 2019 at 03:44:46PM +0100, Julien Nicoulaud via aur-general wrote:
There is a bit of debate at the borgmatic package ( https://aur.archlinux.org/packages/borgmatic) about what check() should do. The upstream borgmatic project uses tox to execute its tests. tox creates an isolated python virtualenv with the correct dependency versions and executes tests in there.
Don't use tox. We are checking of the dependecies we correct as well. Installing deps with tox from pypi defeats this purpose.
The original maintainer thinks check() should not use tox so that tests can be run against the system installed dependencies. But this is not so easy to do, an attempt was made by installing the python package into an isolated directory just for tests, but even then it seems to conflict with an existing borgmatic installation.
The original maintainer is correct. This is also why you should be running clean chroots. But if it's conflicting you are doing something wrong
Another way of seeing things is that check() should just run tests the way it is intended by upstream, it is for testing the build artifacts are correct, not for testing it will run correctly on the system where it is built. By this logic check() should just run tox, and correct dependency versions can be enforced by using version ranges in "depends".
Using tox is for convenience, but if tox is using nose or pytest then use that. Don't use version ranges to check if dependencies are correct, run the tests. We shouldn't download anything after dependencies and sources have been fetched. -- Morten Linderud PGP: 9C02FF419FECBE16