diff --git a/Makefile b/Makefile index af4c4b3..313594e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ CURRENT_VERSION:=$(shell grep "^Version: " PKG-INFO | cut -d" " -f2) -INIT_VERSION:=$(shell grep "__version__" pycronofy/__init__.py | cut -d"'" -f2) +INIT_VERSION:=$(shell grep "version" ./pyproject.toml | cut -d"=" -f2 | tr -d '"[:blank:]' ) + .PHONY: all all: test diff --git a/pycronofy/__init__.py b/pycronofy/__init__.py index ace070d..eb0a23b 100644 --- a/pycronofy/__init__.py +++ b/pycronofy/__init__.py @@ -1,7 +1,9 @@ from pycronofy.client import Client # noqa: F401 from pycronofy import settings -__version__ = '2.0.0' +import importlib + __name__ = 'PyCronofy' +__version__ = importlib.metadata.version(__package__ or __name__) """ SDK for Cronofy - the Scheduling Platform for Business