From 01f31396128761f41e7f0d6a8412cb7ac0aa20d3 Mon Sep 17 00:00:00 2001 From: Daniel Feldroy Date: Mon, 21 Sep 2020 11:13:53 -0700 Subject: [PATCH] Remove twine and wheel from the testing requirements --- requirements.txt | 2 -- setup.py | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 90c6dfc..f414e94 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/setup.py b/setup.py index 6119fec..e5398c9 100755 --- 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__)) -- 2.30.2