Difference between local install and installing from Git

I’m bit struggling with packaging data with my package. I found there is different behavior between local installation (pip install .) and through Git (pip install git+ssh://git@gitlab.com/path/to/repo/my_package.git). Could you explain me if there is (and should be) any difference between those two approaches?

My full question is posted on SO (https://stackoverflow.com/questions/66816524/pip-install-differences-between-local-install-and-installing-from-git), I was not able to reproduce this behavior and create some MWE. So I’m completely confused and not sure where is the issue.

(Since I’m new user, is it ok to link SO question or should I do full repost?)

They should have the exact same behaviour. My guess is you’re in the same trap as this person:

Note that data files are not installed by a distribution by default. Read this:

https://setuptools.readthedocs.io/en/latest/userguide/datafiles.html