From nobody Wed Jan 31 19:50:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TQCLx6p7Lz589K5; Wed, 31 Jan 2024 19:50:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TQCLx6HtSz4d9J; Wed, 31 Jan 2024 19:50:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706730633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c+xsLyMosYdMMWpaz5o8h5chs0cP0xsp7kdR4tJ5azM=; b=by22PIoO7LkIXvPgNgrNzr6aS/tpd1bIAM2FrYkG/AEZzALFsCTTZIowuFQj+uB600hSr0 rMzRF7aJgxecg+9yY8gilcATW+eOJ+fqxp6J4cnAnMF3c58MB2NvEi2ovROpFMNAeHgViw G7pFdSHOqSoz1a1wgidgCSFccg0Pua2pWobWGW71xX1WN76BI4iApY9qoT3pmr7SeofmBM 18VKrpxsyiWKCJAI5rP7AYy/KQdvpXNbS88+yB2SyWbLYiCrzIcMiE1yj2YgStrjmZHq3G RbStJRUL6GVsvHeyXEcsmDrGW6IfZRxwzCNxmixg8utHzrGzGj5gpdjUxpo6GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706730633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c+xsLyMosYdMMWpaz5o8h5chs0cP0xsp7kdR4tJ5azM=; b=YJlZr2CtRD74cWsjLyMz3hBBvAPn9R1XY55OW/Vp/i/JdljkdGtgDJQQr3PHpO0AQmlqD7 TnF/2EnUIrT//pEvPxxiQ9o+jm50aXBcu200xqmBeo92p7o5W2jAl6mm0mUcaiXfm3QshF LIb89E5HbFKZNg7QIKHWUA9ADIHTVFc94y0OdhLOh9KQmhVfEoYAW3J5UeTPcFT5pW0zrf ZcCKkjXw+dUTvH58SDeqtV+pwwgQNmgUa0HLJcHKYnjB1n7taAkspK7sInX6pSpnpyx/EL QGdE8B1WcpVQBkjsb0Q11C0RlfhO8uHnDu9z/dvp4dx/7c1bRtoIvl5+PsqHEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706730633; a=rsa-sha256; cv=none; b=vgzQsV47MBoNYhDbmDmAi8CoG2jg2xXbUAISfAtisJmRYseu631TK4JU9ipnm5eBCE1+Bv sTyNHUcCDRCcW19Q31T4R7d8ri1PNpseb2+HEPu699q17qjYgrH7xNQZpymiYXFc5LraPV x9qCDiFg+sjcSskX1f9hBUWlyJXQT590mfeH0ZWgKnStTnGCsoma1gccDkYpocgXc0L4ZM Txdkaemax4b46eBdDb6bf6IUTnizY9We+/K5Cw6EF5WsxYmnP/wz4ePtaY6lCeZAxupvFz 3GQ9wCHVc+c1O/N36giMV7N0f/ALsKuL63AjtdX81lvw9mzZNmodEW+l/jcieg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TQCLx5LN9zX53; Wed, 31 Jan 2024 19:50:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40VJoXi4090475; Wed, 31 Jan 2024 19:50:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40VJoXo4090472; Wed, 31 Jan 2024 19:50:33 GMT (envelope-from git) Date: Wed, 31 Jan 2024 19:50:33 GMT Message-Id: <202401311950.40VJoXo4090472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: b771d5705fc9 - main - tools/build/make.py: Avoid Python 3.7+ subprocess.run capture_output List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b771d5705fc95445d4d81e054be664b7842156ff Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=b771d5705fc95445d4d81e054be664b7842156ff commit b771d5705fc95445d4d81e054be664b7842156ff Author: Jessica Clarke AuthorDate: 2024-01-31 19:45:59 +0000 Commit: Jessica Clarke CommitDate: 2024-01-31 19:45:59 +0000 tools/build/make.py: Avoid Python 3.7+ subprocess.run capture_output This is just a convenient alias for setting stdout and stderr to PIPE, so substitute it for that to be compatible with Python 3.6. Fixes: 69cfdc81ea7b ("tools/build/make.py: Keep bootstrapped bmake binary up-to-date") --- tools/build/make.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/build/make.py b/tools/build/make.py index 1cca5b14ec70..73788a8896c7 100755 --- a/tools/build/make.py +++ b/tools/build/make.py @@ -81,8 +81,8 @@ def bootstrap_bmake(source_root, objdir_prefix): bmake_config = bmake_install_dir / ".make-py-config" bmake_source_version = subprocess.run([ - "sh", "-c", ". \"$0\"/VERSION; echo $_MAKE_VERSION", - bmake_source_dir], capture_output=True).stdout.strip() + "sh", "-c", ". \"$0\"/VERSION; echo $_MAKE_VERSION", bmake_source_dir], + stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.strip() try: bmake_source_version = int(bmake_source_version) except ValueError: @@ -92,7 +92,7 @@ def bootstrap_bmake(source_root, objdir_prefix): if bmake_binary.exists(): bmake_installed_version = subprocess.run([ bmake_binary, "-r", "-f", "/dev/null", "-V", "MAKE_VERSION"], - capture_output=True).stdout.strip() + stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.strip() try: bmake_installed_version = int(bmake_installed_version.strip()) except ValueError: @@ -187,8 +187,9 @@ def default_cross_toolchain(): # default to homebrew-installed clang on MacOS if available if sys.platform.startswith("darwin"): if shutil.which("brew"): - llvm_dir = subprocess.run(["brew", "--prefix", "llvm"], - capture_output=True).stdout.strip() + llvm_dir = subprocess.run([ + "brew", "--prefix", "llvm"], + stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.strip() debug("Inferred LLVM dir as", llvm_dir) try: if llvm_dir and Path(llvm_dir.decode("utf-8"), "bin").exists():