]> git.scottworley.com Git - paperdoorknob/commitdiff
Reduce the number of places we keep our version number: 3 → 2
authorScott Worley <scottworley@scottworley.com>
Fri, 29 Dec 2023 06:53:40 +0000 (22:53 -0800)
committerScott Worley <scottworley@scottworley.com>
Fri, 29 Dec 2023 06:53:40 +0000 (22:53 -0800)
fetch.py
setup.py
version.py [new file with mode: 0644]

index 151e2a981eca71b2d07e8b7713a687fd7748de5a..e998394445196fcf677766a78cd3805d6b241bd1 100644 (file)
--- a/fetch.py
+++ b/fetch.py
@@ -13,9 +13,11 @@ from typing import IO, Iterator
 import requests
 import requests_cache
 
 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):
 
 
 class Fetcher(ABC):
index 21527392028491df1dfffc0d1b5e870662223d03..5e748fd4622e4a68bdfeb4f4da6bdd89ade1194f 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,10 @@
 from setuptools import setup
 
 from setuptools import setup
 
+from version import paperdoorknob_version
+
 setup(
     name='paperdoorknob',
 setup(
     name='paperdoorknob',
-    version='0.0.1',
+    version=paperdoorknob_version,
     description="Print glowfic",
     author="Scott Worley",
     author_email="scottworley@scottworley.com",
     description="Print glowfic",
     author="Scott Worley",
     author_email="scottworley@scottworley.com",
@@ -17,6 +19,7 @@ setup(
         'paperdoorknob',
         'spec',
         'texify',
         'paperdoorknob',
         'spec',
         'texify',
+        'version',
     ],
     license="GPL-3.0",
     entry_points={'console_scripts': ['paperdoorknob = paperdoorknob:main']},
     ],
     license="GPL-3.0",
     entry_points={'console_scripts': ['paperdoorknob = paperdoorknob:main']},
diff --git a/version.py b/version.py
new file mode 100644 (file)
index 0000000..37219b3
--- /dev/null
@@ -0,0 +1 @@
+paperdoorknob_version = '0.0.1'