--- 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'