Previously, find_packages() didn't exclude the tests dir, which would cause pip to install the package under the the name tests when installing this . (We introduced this change in v1.0 when we switched from specifying councilmatic_core as the package to find_packages()).
Exclude the tests dir from packaging to prevent ImportErrors when trying to run tests in dependent packages.
Overview
Previously,
find_packages()
didn'texclude
the tests dir, which would cause pip to install the package under the the nametests
when installing this . (We introduced this change in v1.0 when we switched from specifyingcouncilmatic_core
as the package tofind_packages()
).Exclude the
tests
dir from packaging to preventImportError
s when trying to run tests in dependent packages.Testing instructions
Test this change by testing https://github.com/datamade/django-councilmatic-notifications/pull/33:
cd
todjango-councilmatic-notifications
django-councilmatic-notifications
(with test dependencies) withpip install -e .[tests]
django-councilmatic
, either by running:or
pytest
and confirm tests run normally