Respect __version__ when writing version file
nZac opened this issue · comments
pyp is only for packaging, it doesn't care what the app itself does with the version. If you want to make your app have a mymod.__version__
attribute that represents the version, you are welcome to do that. Example from keg-auth
:
from keg_auth.version import VERSION as __VERSION__
It's intentional that pyp
only looks at the version.py
file. From the pyp
readme:
Make sure you are single-sourcing the version of the project using the same method as this project. See our setup.py and pyp/version.py.
This standard enables pyp
to read ONLY the version.py which avoids any possible side effects from having to import the root application to get at it's __version__
attribute.
So, to be clear, you MUST use a version.py
to use pyp
. It's deliberate that pyp
does not try and use mymod.__version__
to single-source the version string.
Unless I misunderstand the situation or our current methodology has adverse affects I'm not considering, this issue should be closed as a WON'T FIX.
won't fix