From d22b17652139d118f8abdd10ca9e77fd65b48577 Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Sun, 22 Sep 2024 01:25:46 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20introduce=20=5F=5Fversion?= =?UTF-8?q?=5F=5F=20has=20been=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Onuralp SEZER --- pyacl/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyacl/__init__.py b/pyacl/__init__.py index ecaef5e..02a1682 100644 --- a/pyacl/__init__.py +++ b/pyacl/__init__.py @@ -7,3 +7,11 @@ You may not use this work except in compliance with the Licence. An English copy of the Licence is shipped in a file called LICENSE along with this applications source code. You may obtain copies of the Licence in any of the official languages at https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12. """ + +import importlib.metadata as importlib_metadata + +try: + # This will read version from pyproject.toml + __version__ = importlib_metadata.version(__package__ or __name__) +except importlib_metadata.PackageNotFoundError: + __version__ = "development"