From 8917116f1718d6f94a2deff6fcb0bab6895af2f6 Mon Sep 17 00:00:00 2001 From: benne238 Date: Tue, 9 Mar 2021 17:28:38 -0500 Subject: [PATCH] store version in dedicated file and point setup.py to that file to pull the version from there --- VERSION | 1 + setup.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..300683f --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +VERSION = 1.9.1 \ No newline at end of file diff --git a/setup.py b/setup.py index 58d8fe3..76e8ca3 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,14 @@ import setuptools from pathlib import Path +from os import environ +from dotenv import load_dotenv + +current_dir = Path(__file__).parent +version_file_path = Path(current_dir, "VERSION") +load_dotenv(version_file_path) + +VERSION = environ.get("VERSION") -VERSION = "2.1.0" python_ldap_version = "3.3.1" setuptools.setup(