From: Faidon Liambotis <paravoid@debian.org>
Date: Sun, 10 Jan 2021 20:13:53 +0200
Subject: Don't guess version from git; use static version.py

Upstream ships version.py, so use that instead of trying to regenerate
it using a git description (via setuptools_scm).
---
 setup.py | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/setup.py b/setup.py
index c59b4e9..bc18a38 100644
--- a/setup.py
+++ b/setup.py
@@ -3,17 +3,13 @@ import textwrap
 
 from setuptools import setup
 
-setup(
-    use_scm_version={
-        "write_to": "src/tox/version.py",
-        "write_to_template": textwrap.dedent(
-            """
-             # coding: utf-8
-             from __future__ import unicode_literals
 
-             __version__ = {version!r}
-             """,
-        ).lstrip(),
-    },
+version = {}
+with open("src/tox/version.py") as fp:
+    exec(fp.read(), version)
+
+
+setup(
+    version=version["__version__"],
     package_dir={"": "src"},
 )
