respec / HSPsquared

Hydrologic Simulation Program Python (HSPsquared)
GNU Affero General Public License v3.0
43 stars 17 forks source link

pip install/uninstall numba compiled cache conflict #164

Open timcera opened 1 month ago

timcera commented 1 month ago

In testing "pip install ." and "pip uninstall" ran into this issue about the numba compiled cache not being deleted by pip when uninstalling.

Discussion in Numba community: numba/numba#9312

Perhaps adjust cache directory using NUMBA_CACHE_DIR environment variable? https://numba.readthedocs.io/en/stable/reference/envvars.html#envvar-NUMBA_CACHE_DIR

Discussion in Pytest community: pytest-dev/pytest#10781

Discussions in PIP community: pypa/pip#11835

pypa/packaging.python.org#1423

austinorr commented 1 month ago

This seems like we don’t need to do anything, all libraries using numba + jit + cachedir have this issue, so we should just ship our code as is. Eventually numba will have a solution for modifying the RECORD correctly in accordance with the spec, and everything will be fixed for everyone at once.

If we try to do something clever with changing the cache dir, how will we delete it when the user uninstalls with pip? I don’t think we can hook into that, and without it, there’s no way to invalidate our cache.