hyperspy / holospy

Electron holography data analysis with HyperSpy
https://hyperspy.org/holospy
GNU General Public License v3.0
6 stars 2 forks source link

Consolidate package metadata in `pyproject.toml` #5

Closed ericpre closed 1 year ago

ericpre commented 1 year ago

I am converting to draft, because it currently doesn't work in "editable" installation (pip install -e .) because the files of the package doesn't appear in the dist.files:

from importlib import metadata

_external_extensions = tuple(metadata.entry_points(group="hyperspy.extensions"))
holospy_ext = _external_extensions[0]
print(holospy_ext.dist.files)
ericpre commented 1 year ago

It seems that currently it can't not work with editable install because the loading extension mechanism use importlib.metadata to find the relevant yanl file and in case of editable the module are in included in dist.files provided by importlib.metadata. See https://github.com/python/cpython/issues/96144, https://github.com/python/importlib_metadata/issues/402 and https://github.com/pypa/packaging-problems/issues/620 for more information.

Closing for now, we can revisit, when they will be a solution.