Open-Source-Spatial-Clean-Cooking-Tool / OnStove

This repository contain the general code for the Open Source Spatial Clean Cooking Tool OnStove
MIT License
7 stars 8 forks source link

Add a version file to the package #348

Closed camiloramirezgo closed 5 months ago

camiloramirezgo commented 1 year ago

Store the version here so: 1) we don't load dependencies by storing it in init.py 2) we can import it in setup.py for the same reason 3) we can import it into your module module

Inside onstove/_version.py:

__version__ = '0.1.3'

Inside onstove/init.py:

from ._version import __version__

Inside setup.py:

exec(open('onstove/version.py').read())
setup(
    ...
    version=__version__,
    ...
camiloramirezgo commented 5 months ago

Instead of creating a file for the version I included a __version__ variable inside the __init__ function and I am extracting that version in the setup.py.