File: version-local

package info (click to toggle)
sphinxext-opengraph 0.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 416 kB
  • sloc: python: 679; makefile: 11; sh: 8
file content (22 lines) | stat: -rw-r--r-- 646 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/setup.py
+++ b/setup.py
@@ -1,12 +1,17 @@
 import setuptools
+from debian.changelog import Changelog
+
+def get_current_version():
+    with open("debian/changelog", "rt") as f:
+        version = Changelog(f, max_blocks=1).upstream_version
+        return version
 
 with open("README.md", encoding="utf-8") as readme:
     long_description = readme.read()
 
 setuptools.setup(
     name="sphinxext-opengraph",
-    use_scm_version=True,
-    setup_requires=["setuptools_scm"],
+    version=get_current_version(),
     author="Itay Ziv",
     author_email="itay220204@gmail.com",
     description="Sphinx Extension to enable OGP support",