Remove twine and wheel from the testing requirements
authorDaniel Feldroy <daniel@feldroy.com>
Mon, 21 Sep 2020 18:13:53 +0000 (11:13 -0700)
committerDaniel Feldroy <daniel@feldroy.com>
Mon, 21 Sep 2020 18:13:53 +0000 (11:13 -0700)
requirements.txt
setup.py

index 90c6dfc616c3be8b7b7decb3a03ef3598df96785..f414e946fbdd9549d8136500b46fec2b3560785d 100644 (file)
@@ -4,5 +4,3 @@ flake8==3.8.3
 pytest==6.0.2
 pytest-cov==2.10.1
 freezegun==1.0.0
-twine==3.2.0
-wheel==0.35.1
\ No newline at end of file
index 6119fec97549219631bbc1334c362130d5ed6668..e5398c97f6fe758f56003445fde9847626ccf3e9 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -23,6 +23,11 @@ readme = read("README.rst")
 history = read("HISTORY.rst").replace(".. :changelog:", "")
 
 if sys.argv[-1] == "publish":
+    try:
+        import wheel
+        import twine
+    except (ImportError, ModuleNotFoundError):
+        raise ModuleNotFoundError('Run "pip install wheel twine"')
     os.system("python setup.py sdist bdist_wheel")
     os.system("twine upload dist/*")
     os.system("git tag -a %s -m 'version %s'" % (__version__, __version__))