From: Scott Worley Date: Fri, 29 Dec 2023 06:53:40 +0000 (-0800) Subject: Reduce the number of places we keep our version number: 3 → 2 X-Git-Url: http://git.scottworley.com/paperdoorknob/commitdiff_plain/e3b5fdf02164b45e85da8898196612aa51060760?ds=sidebyside Reduce the number of places we keep our version number: 3 → 2 --- diff --git a/fetch.py b/fetch.py index 151e2a9..e998394 100644 --- a/fetch.py +++ b/fetch.py @@ -13,9 +13,11 @@ from typing import IO, Iterator import requests import requests_cache +from version import paperdoorknob_version -_headers = { - 'User-Agent': 'paperdoorknob/0.0.1 (https://git.scottworley.com/paperdoorknob/)'} + +_headers = {'User-Agent': f'paperdoorknob/{paperdoorknob_version} ' + + '(https://git.scottworley.com/paperdoorknob/)'} class Fetcher(ABC): diff --git a/setup.py b/setup.py index 2152739..5e748fd 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,10 @@ from setuptools import setup +from version import paperdoorknob_version + setup( name='paperdoorknob', - version='0.0.1', + version=paperdoorknob_version, description="Print glowfic", author="Scott Worley", author_email="scottworley@scottworley.com", @@ -17,6 +19,7 @@ setup( 'paperdoorknob', 'spec', 'texify', + 'version', ], license="GPL-3.0", entry_points={'console_scripts': ['paperdoorknob = paperdoorknob:main']}, diff --git a/version.py b/version.py new file mode 100644 index 0000000..37219b3 --- /dev/null +++ b/version.py @@ -0,0 +1 @@ +paperdoorknob_version = '0.0.1'