circus-tent / circus

A Process & Socket Manager built with zmq
http://circus.readthedocs.org/
Other
1.55k stars 258 forks source link

Move `tests` outside of the main package #1200

Closed sphuber closed 2 years ago

sphuber commented 2 years ago

The Python Packaging Authority recommends placing the tests folder outside the main package, on the root level of the repository. This way the tests are not shipped with the distribution, which are normally not needed for normal installs.

There is an open discussion on what the recommended default should be, because there are pro's and con's for each.

That being said, it is typically a good idea to not have the tests installed in the site-packages, which currently is being done. This can cause problems, for example as is the case for the build of the Conda distribution: https://github.com/conda-forge/circus-feedstock/pull/26 What happens there is that it will import all Python packages in the distribution (including circus.tests) but that includes an import papa statement. However, this is only part of the test extra requirements and not of the main installation requirements, and so an ImportError is hit.

sphuber commented 2 years ago

@biozz @k4nar would you be ok with this change? I'd be happy to open a PR for it.

k4nar commented 2 years ago

I agree, this is a good practice :+1: .