aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMiro HronĨok <miro@hroncok.cz>2018-09-09 19:49:33 +0200
committerPaul Ganssle <paul@ganssle.io>2018-09-13 12:52:56 -0400
commit26bc1710d11a7d35486b1c44a3523038ca5f1602 (patch)
treed5ddab113a1975f5b08a1e2b0f1a9e4f930c64ec /setup.py
parente122400568b9194362e33bd7260aeef404661218 (diff)
downloaddateutil-26bc1710d11a7d35486b1c44a3523038ca5f1602.tar.gz
setup.py test doesn't work, so exit with 1
The error message was printed, but the process exited with 0. That is extremely error prone in automated environments. Also, print the error message to standard error.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 78e66ea..f8317ce 100644
--- a/setup.py
+++ b/setup.py
@@ -10,6 +10,7 @@ from distutils.version import LooseVersion
import warnings
import io
+import sys
if isfile("MANIFEST"):
os.unlink("MANIFEST")
@@ -21,8 +22,9 @@ if LooseVersion(setuptools.__version__) <= LooseVersion("24.3"):
class Unsupported(TestCommand):
def run(self):
- print("Running 'test' with setup.py is not supported. "
- "Use 'pytest' or 'tox' to run the tests.")
+ sys.stderr.write("Running 'test' with setup.py is not supported. "
+ "Use 'pytest' or 'tox' to run the tests.\n")
+ sys.exit(1)
###