From: Diane Trout <diane@ghic.org>
Date: Mon, 19 Oct 2020 10:06:35 -0700
Subject: Use the Debian package version instead of letting

versioneer guess. This should aid with reproduciblity.

Forwarded: No
---
 versioneer.py | 6 ++++++
 1 file changed, 6 insertions(+)

--- a/versioneer.py
+++ b/versioneer.py
@@ -1400,6 +1400,12 @@
 
     Returns dict with two keys: 'version' and 'full'.
     """
+    import subprocess
+    debian_version = subprocess.check_output(('dpkg-parsechangelog', '-SVersion'))
+    return {
+        'full-revisionid': debian_version.split(b'-', 1)[0].decode('ascii'),
+        'version': debian_version.split(b'-', 1)[0].decode('ascii'),
+    }
     if "versioneer" in sys.modules:
         # see the discussion in cmdclass.py:get_cmdclass()
         del sys.modules["versioneer"]
