From 72dae130d2449bdf59a21b363806b0497cd81f62 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sun, 12 Nov 2023 15:00:05 -0800 Subject: [PATCH] match other's version function in setup.py --- setup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 437f366..7c90d6e 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,13 @@ from setuptools import find_packages, setup -import octodns_fastly + +def version(): + with open('octodns_fastly/__init__.py') as fh: + for line in fh: + if line.startswith('__version__'): + return line.split("'")[1] + raise Exception('failed to determine version number') def descriptions(): @@ -41,5 +47,5 @@ def descriptions(): python_requires='>=3.6', tests_require=tests_require, url='https://github.com/octodns/octodns-fastly', - version=octodns_fastly.__version, + version=version(), )