diff --git a/pym/bob/invoker.py b/pym/bob/invoker.py index 63e7fefe..30901f65 100644 --- a/pym/bob/invoker.py +++ b/pym/bob/invoker.py @@ -291,7 +291,11 @@ async def __runCommand(self, args, cwd, stdout=None, stderr=None, # If stdout should be captured we use a dedicated buffer. This # buffer is then returned to the caller at child exit. stdoutRedir = subprocess.PIPE - stdoutStreams = [io.BytesIO(), self.__stdoutStream] + stdoutStreams = [io.BytesIO()] + if self.__trace: + # Only show stdout to the user if the command is traced. + # Otherwise it is unclear where it came from. + stdoutStreams.append(self.__stdoutStream) elif stdout == False: stdoutRedir = subprocess.DEVNULL stdoutStreams = [] @@ -306,7 +310,11 @@ async def __runCommand(self, args, cwd, stdout=None, stderr=None, # If stderr should be captured we use a dedicated buffer. This # buffer is then returned to the caller at child exit. stderrRedir = subprocess.PIPE - stderrStreams = [io.BytesIO(), self.__stderrStream] + stderrStreams = [io.BytesIO()] + if self.__trace: + # Only show stderr to the user if the command is traced. + # Otherwise it is unclear where it came from. + stderrStreams.append(self.__stderrStream) elif stderr == False: stderrRedir = subprocess.DEVNULL stderrStreams = [] diff --git a/pyproject.toml b/pyproject.toml index cd72df0d..2147fb13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["setuptools >= 40.0", "Sphinx"] +requires = ["setuptools >= 40.0", "setuptools-scm", "Sphinx"] build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 6d61f2d4..e0d2e4dc 100644 --- a/setup.py +++ b/setup.py @@ -147,11 +147,6 @@ class build(build_orig): 'azure' : [ 'azure-storage-blob' ], }, - # Installation time dependencies only needed by setup.py - setup_requires = [ - 'setuptools_scm', # automatically get package version - ], - # Provide executables entry_points = { 'console_scripts' : [