From e3b5fdf02164b45e85da8898196612aa51060760 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 28 Dec 2023 22:53:40 -0800 Subject: [PATCH 1/1] =?utf8?q?Reduce=20the=20number=20of=20places=20we=20k?= =?utf8?q?eep=20our=20version=20number:=203=20=E2=86=92=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- fetch.py | 6 ++++-- setup.py | 5 ++++- version.py | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 version.py 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' -- 2.44.1