summaryrefslogtreecommitdiffstats
path: root/debian/patches/dont-use-setuptools-scm.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/dont-use-setuptools-scm.patch')
-rw-r--r--debian/patches/dont-use-setuptools-scm.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/dont-use-setuptools-scm.patch b/debian/patches/dont-use-setuptools-scm.patch
new file mode 100644
index 0000000..8b89ea8
--- /dev/null
+++ b/debian/patches/dont-use-setuptools-scm.patch
@@ -0,0 +1,32 @@
+--- a/setup.py
++++ b/setup.py
+@@ -5,6 +5,12 @@ from os import path
+
+ from setuptools import setup
+
++
++# https://packaging.python.org/guides/single-sourcing-package-version/
++version = {}
++with open('tqdm/_dist_ver.py') as fp:
++ exec(fp.read(), version)
++
+ src_dir = path.abspath(path.dirname(__file__))
+ if sys.argv[1].lower().strip() == 'make': # exec Makefile commands
+ import pymake
+@@ -13,4 +19,4 @@ if sys.argv[1].lower().strip() == 'make'
+ # Stop to avoid setup.py raising non-standard command error
+ sys.exit(0)
+
+-setup(use_scm_version=True)
++setup(version=version['__version__'])
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -74,7 +74,7 @@ classifiers =
+ Topic :: Utilities
+
+ [options]
+-setup_requires = setuptools>=42; setuptools_scm[toml]>=3.4
++setup_requires = setuptools>=42
+ python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+ install_requires =
+ colorama; platform_system == 'Windows'