summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-10-26 10:51:29 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-10-26 18:34:01 -0400
commit18cf3b897d4b1e1a66beda180ec151cc0dd4dbc3 (patch)
tree3ca09fdcdf4b7baa84511a737355fcc2b0b7e69c
parent88c02676be5b37e8cd5eed128375d1bde3ff8107 (diff)
downloadpython-coveragepy-git-18cf3b897d4b1e1a66beda180ec151cc0dd4dbc3.tar.gz
build: force 'build' to shut up
-rw-r--r--igor.py7
-rw-r--r--pylintrc1
-rw-r--r--tox.ini4
3 files changed, 11 insertions, 1 deletions
diff --git a/igor.py b/igor.py
index 2e1f7aa5..c01cc759 100644
--- a/igor.py
+++ b/igor.py
@@ -14,6 +14,7 @@ import glob
import inspect
import os
import platform
+import subprocess
import sys
import sysconfig
import textwrap
@@ -351,6 +352,12 @@ def print_banner(label):
sys.stdout.flush()
+def do_quietly(command):
+ """Run a command in a shell, and suppress all output."""
+ proc = subprocess.run(command, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
+ return proc.returncode
+
+
def do_help():
"""List the available commands"""
items = list(globals().items())
diff --git a/pylintrc b/pylintrc
index 20258c0f..0b1f9d7e 100644
--- a/pylintrc
+++ b/pylintrc
@@ -67,6 +67,7 @@ disable=
broad-except,
no-else-return,
misplaced-comparison-constant,
+ subprocess-run-check,
# Messages that may be silly:
no-self-use,
no-member,
diff --git a/tox.ini b/tox.ini
index cc8b3d8b..ad9d6540 100644
--- a/tox.ini
+++ b/tox.ini
@@ -81,7 +81,9 @@ commands =
python -m tabnanny {env:LINTABLE}
python igor.py check_eol
check-manifest --ignore 'lab/*,perf/*,doc/sample_html/*,.treerc,.github*'
- python -m build
+ # If 'build -q' becomes a thing (https://github.com/pypa/build/issues/188),
+ # this can be simplifed:
+ python igor.py quietly "python -m build"
twine check dist/*
python -m pylint --notes= {env:LINTABLE}