setup: better version handling

* Replicates version handling from Flask-Registry. (closes #9)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>