Open vuillaut opened 4 years ago
This will always be the case with a versioning tool relying on git information.
You simply have no version information in the auto-generated tarball by github.
you can do pip install git+https://github.com/cta-observatory/cta-lstchain.git@v{VERSION}
, to use the git repo, where the version.py
will be able to get the version from the git info.
What you could do is upload an sdist with every release, which includes the extracted version information from travis
Thanks for the reply.
It's quite confusing that a tagged release does not know its own version... Maybe we should update the way users are supposed to install fixed releases in the README - e.g. using the trick you mention - as I don't think this is the expected way or behavior.
This came up several times in the past, but this is really a limitation of the automatic tar ball creation.
You could upload the sdist on travis using github releases like described here: https://docs.travis-ci.com/user/deployment/releases/
Basically you need to call python setup.py sdist
and upload the resulting file using what is described in the travis docs
I just saw this PR here: https://github.com/astropy/astropy/pull/10774, maybe that could be a solution?
Starting with a fresh env and pip installing lstchain from a tagged release, I get an unknown version: