summaryrefslogtreecommitdiffstats
path: root/debian/patches/dont-use-setuptools-scm.patch
blob: 8b89ea8d6bf3af7fbc1dafcd679dfd3168dda3ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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'