-
Notifications
You must be signed in to change notification settings - Fork 537
Closed
Description
In conda, I get the following error:
ClobberError: This transaction has incompatible packages due to a shared path.
packages: conda-forge/noarch::pyprojroot-0.2.0-py_0, pytorch/noarch::captum-0.3.1-0
path: 'lib/python3.8/site-packages/tests/__init__.py'
This suggests that this package is distributing a module called tests
, which is wrong.
I assume that the same problem will occur with pip too.
In my experience, the best solution is a src
layout as described in https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure and https://hynek.me/articles/testing-packaging/#src.
It's also worth noting that the "tests outside application code" pattern usually doesn't make the tests
directory into a module: https://docs.pytest.org/en/latest/goodpractices.html?highlight=src#tests-outside-application-code. Note that this good practice guide also strongly suggests a src layout.
vivekmig and bilalsal
Metadata
Metadata
Assignees
Labels
No labels