Skip to content

Commit

Permalink
match other's version function in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ross committed Nov 12, 2023
1 parent 288248c commit 72dae13
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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(),
)

0 comments on commit 72dae13

Please sign in to comment.