5 Commits

Author SHA1 Message Date
Floris Lambrechts
aa60dc88c2 Make __version__ a module-level attribute
By moving __version__ to __init__.py, it becomes an attribute of the
module.  This is recommended in PEP 396 and a common practice in many
contemporary packages.

This enables the following:

>>> import mypackage
>>> print(mypackage.__version__)
'5.2.0'
2018-07-26 14:58:28 +02:00
Curtis Maloney
f52a6a4f47
[Fixes #30] Add a VERSION tuple for comparison
Generate the __version__ string from the version tuple.

Having a tuple like this makes it easy for other packages to compare versions, e.g.:

if VERSION > (3,):

if VERSION < (1, 8):
2017-11-02 11:43:20 +11:00
Kenneth Reitz
b2b4e286d6 Update __version__.py 2017-08-28 21:42:21 -04:00
Kenneth Reitz
e0b75e835d Update __version__.py 2017-08-28 11:59:12 -04:00
Kenneth Reitz
77c5421573 Create __version__.py 2017-08-28 11:58:49 -04:00