Proper python versioning

Posted by in Software

The past few days I was performing an initial deployment on a new cloud provider. During my initial runs, I have discovered a couple of snags in my applications (migration issues etc.) I’ve noticed that performing repetitive builds of my apps would yield the same numbers and there was no uniform way of numbering them (one had version in __init__.py, one had it in setup.py…).

So, I looked for an uniform way of defining versions and I found a PEP 386, doing exactly that and an implementation via __init__.py.

My __init__.py looks like this now:

and the setup.py would contain something similar to:

So here’s my solution to python versioning.


A little experiment: If you find this post and ad below useful, please check the ad out :-)