I'm trying to follow the advice here regarding version controlling a package I'm writing. For some reason the version always comes back as '5.0.6' instead of '1.0.0' as expected.
To try and get to the bottom of this I've made a simple package with the following structure / files:
\
\VersioningExperiments\
__init__.py
_version.py
Where __init__.py
looks like this:
from _version import __version__
and _version.py
looks like this:
__version__ = '1.0.0'
When I sit at the root and run the following commands I get 5.0.6
instead of 1.0.0
:
python
Python 3.5.2 |Anaconda 2.5.0 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import VersioningExperiments
>>> VersioningExperiments.__version__
'5.0.6'
If I comment out that lint from __init__.py
I get:
AttributeError: module 'VersioningExperiments' has no attribute '__version__'
So where on earth is the 5.0.6
coming from?