Remove need to manage setup.py version

This commit is contained in:
Cyber MacGeddon 2024-09-30 16:37:33 +01:00
parent cdace22ee4
commit 8c6fcdd598
3 changed files with 24 additions and 4 deletions

View file

@ -1,10 +1,18 @@
import setuptools
import os
import importlib
with open("README.md", "r") as fh:
long_description = fh.read()
version = "0.11.7"
# Load a version number module
spec = importlib.util.spec_from_file_location(
'version', 'trustgraph/core_version.py'
)
version_module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(version_module)
version = version_module.__version__
setuptools.setup(
name="trustgraph-core",