wtclarke / spec2nii

Multi-format in vivo MR spectroscopy conversion to NIFTI
Other
27 stars 23 forks source link

Do not install tests in site-packages #80

Closed musicinmybrain closed 1 year ago

musicinmybrain commented 1 year ago

Fixes:

python3.11 -m venv _e
. _e/bin/activate
pip install spec2nii
ls -l _e/lib/python3.11/site-packages/tests/
total 160
-rw-r--r--. 1 ben ben    0 Jul  8 18:39 __init__.py
-rw-r--r--. 1 ben ben  153 Jul  8 18:39 io_for_tests.py
drwxr-xr-x. 1 ben ben 1866 Jul  8 18:39 __pycache__
-rw-r--r--. 1 ben ben 2031 Jul  8 18:39 test_anon.py
-rw-r--r--. 1 ben ben 3089 Jul  8 18:39 test_auto.py
[...]
-rw-r--r--. 1 ben ben 1371 Jul  8 18:39 test_varian.py

That is, spec2nii is incorrectly installing its tests/ as a top-level tests package since https://github.com/wtclarke/spec2nii/commit/232189c4ce02b2f184bd2fdf4353582754763af6 switched to setuptools.find_packages().

wtclarke commented 1 year ago

Whoops! Thanks for catching that.

musicinmybrain commented 1 year ago

Whoops! Thanks for catching that.

Happy to help! It’s a very common oversight: the setuptools defaults are unhelpful, and it’s easy to miss stray files in the virtualenv as long as everything works.