setuptools_scm icon indicating copy to clipboard operation
setuptools_scm copied to clipboard

Editable install report outdated version after tagging occured

Open ssbarnea opened this issue 4 years ago • 3 comments
trafficstars

Once an editable install is performed the version reported by it remains the same even if the code was updated and a new tag was added.

At this moment the only workaround is to run pip install -e . again, as this will uninstall and reinstall the package and correct the the version.

As this is quite inconvenient and very easy to happen for developers we should better find a way to recalculate the version dynamically, without requiring a reinstallation, or at least to find a way to detect this needs to happen.

It seems that the editable install is mainly an pkgname.egg-link file that points to the location of the module, a place where we also have a cached packagename.egg-info folder which contains the version.

I am not sure if we have any hooks or tricks that could be used to refresh the outdated version.

ssbarnea avatar Jan 25 '21 13:01 ssbarnea

currently setuptools_scm is not aware of package metadata and editable installs in a meaningful way

sane support would need a extra step in editable installs that does update the metadata in meaningful ways , potentially via git/hg hooks

it would be a major feature that i cant start on in the next 6-18 months

RonnyPfannschmidt avatar Jan 25 '21 14:01 RonnyPfannschmidt

I wonder if we can do some kind of alternative where we would report some kind of custom version number that indicates that this is an editable install that may not have exact version, at least to avoid misleading users with really outdated tags.

This is quite annoying for developers as I still see my tools reporting misleading versions that are many months old, only because I never needed to run install again.

ssbarnea avatar Feb 19 '21 16:02 ssbarnea

Unfortunately that is a breaking mechanism

Post commit /checkout hooks as opt in may help

RonnyPfannschmidt avatar Feb 19 '21 16:02 RonnyPfannschmidt