From b756d2baa3619c866c3164b3f257c5813c6de366 Mon Sep 17 00:00:00 2001 From: Jorge Martinez Date: Thu, 12 Jan 2023 17:51:39 +0100 Subject: [PATCH] MAINT: get version value dynamically --- pyproject.toml | 3 +-- src/ansys/stk/core/__init__.py | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 31cd7d0785..e5ba3568f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi" [project] name = "ansys-stk-core" -version = "0.1.dev0" +dynamic = ["version"] description = "A Python API for STK" readme = "README.rst" requires-python = ">=3.6" @@ -23,7 +23,6 @@ classifiers = [ "Operating System :: OS Independent", ] dependencies = [ - "importlib-metadata >=4.0", ] [project.optional-dependencies] diff --git a/src/ansys/stk/core/__init__.py b/src/ansys/stk/core/__init__.py index 93dec35fbd..bfa6b099ef 100644 --- a/src/ansys/stk/core/__init__.py +++ b/src/ansys/stk/core/__init__.py @@ -4,9 +4,5 @@ A Python API for Systems Tool Kit (STK). """ -try: - import importlib.metadata as importlib_metadata -except ModuleNotFoundError: - import importlib_metadata -__version__ = importlib_metadata.version(__name__.replace(".", "-")) +__version__ = "0.1.dev0"