datamade / django-councilmatic

:heartpulse: Django app providing core functions for *.councilmatic.org
http://councilmatic.org
MIT License
26 stars 16 forks source link

Exclude the 'tests' directory from find_packages in setup.py #252

Closed jeancochrane closed 4 years ago

jeancochrane commented 4 years ago

Overview

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.

Testing instructions

Test this change by testing https://github.com/datamade/django-councilmatic-notifications/pull/33:

pip install /path/to/local/django-councilmatic

or

pip install git+https://github.com/datamade/django-councilmatic@feature/jfc/remove-tests-from-find-packages