remi
remi copied to clipboard
How can I get the "version" number?
I would like to display the current version of Remi that's installed and being used. I can't find a variable name with "version" or "release"in the name. I'm sure it's something stupidly simple, but I've looked for a while now and can't find it.
Hello @PySimpleGUI ,
you can do this:
import pkg_resources
pkg_resources.get_distribution("remi").version
This is FANTASTIC information to learn. Once again you've taught me something not about your package alone, but for all Python packages.
I'm wondering how you handle "unreleased" versions. How can a user run an unreleased version and know which one it is?
For PySimpleGUI, I HACKED my way into a version number. I have a variable called, uhm, version. This allows me to release lots of things to GitHub for people to use until the PyPI version is released.
@PySimpleGUI I'm not used to assign version number to unreleased versions. The most updated unreleased version is the one on github master branch. To point to a specific version it is useful to use the git commit number. The version number will be generated at pypi release and will be the date of the release day.
If you want to "name" an untagged version in git generally, you can do e.g. something like this:
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
Which will print a number first so that each version you use are "ordered correctly" (more or less), and then the hash of the commit for easily finding it. If you want to point to the latest tagged commit then git describe is quite useful.
I am using the latter for the package build of remi for my distro, which reminds me Davide, you didn't make a tag since March :)
@Eothred Cool I was not aware of that print command :D I will make a release and a tag soon! ;-)