From nobody Sat Sep 07 01:48:10 2024 X-Original-To: dev-commits-src-all@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 4X0wwW1ZxSz5WSLs; Sat, 07 Sep 2024 01:48:11 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X0wwV6KNGz4kSl; Sat, 7 Sep 2024 01:48:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725673690; 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=Wpfu7XygRxTF9Iz9MZmdC/VnDVWOpwe6CEBzeMHAOY0=; b=qNpPgJaoZ2VqmEhyoBs1+4QF92eEHPJdZE9W62y+r2uGNz01pZkrRrxxXB7flkI9wBa6a0 sLhgBdrp1P/ZK9FPMJLq/mqI65+FeNS6Fgb1h5A6s2geQLyFMNxypE5TG2EbiNKXgpYlAh 3akI0fB/GCJwZkRgULRjO3/i+fCSJ+qv4ZgaVSf/CZhciK9wv+f17VtWzKOI2SCzl8wbFM ivxiTf0TrOIbmpC08nhSGZi7SuE7lZagUspm4pQksIu0JaRybguGHt49/vWV1BJYCENT6Y CqvnmmIu7NE66o4/w3qrStgtYVor+M/0xZdZ0J6Zy5WADIdG9RCqGaUHlTj2BA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725673690; a=rsa-sha256; cv=none; b=KGrL021fZMn2qxVz4Mm9mRsqBxUVv7jz5EsEWDNhhWlJGoWsZRgw9/Xpn0J6e0wH62grga EZPHJTxac10FHfDIQNJacOIB/AZYAkTBch/xoQT9si5UzRzhhHRcwRtuYueUMQrsIwhKjv lRlIdMziP0wB13onRw0Voc2hN8zcSd5NYdhfIyu8FlUiDuDLfDhp3kQ7fUj3PfvNb1h1F+ KJYiySlih24zYIZZv+XI4Yw82cgKRKUucZweM70yJYLuQfTGsj2NH4YyEAZVold3/V5sLr U7xv7q2MJphxGhHh/460paf2ybw5jKcD5FEboyVDWlBJxLnDHE0/rNJEFFk6WQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725673690; 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=Wpfu7XygRxTF9Iz9MZmdC/VnDVWOpwe6CEBzeMHAOY0=; b=xYjhPu0ZzVW6Ga8fJdL9azQgrlpIJwmrnEeHtBURUW9BbXFg1FCxiDAbpkaMVZHeJQ8Rqj FWlvoadNGDdSRQb5u1K9Bq387Gnci4X37gbLUDnUeTA4/APzv5mx2PetbaC2bL/CcnmhTq aG1hoKxbZXXGcnzhSFeSgVRl2JANgG92t0OyCZU8gSCtKzZwg7sdSQWCvzilFPpBse1ms3 5o2X5OKO1gEdWnRwLkZYAb5npDo/U8OfbYlq4aBPwCJso79PzsQvfIJwpuxPj4JrvpIcGk ChSWNs0CFkKK5XKy2GVaHofF4JQn3q5+3y53bKp6+Eji3F3baciv2NhNAclroQ== 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 4X0wwV5cjfzGDN; Sat, 7 Sep 2024 01:48:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4871mAgn042210; Sat, 7 Sep 2024 01:48:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4871mA0C042207; Sat, 7 Sep 2024 01:48:10 GMT (envelope-from git) Date: Sat, 7 Sep 2024 01:48:10 GMT Message-Id: <202409070148.4871mA0C042207@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: c3d7b96df0ac - stable/14 - tools/build/make.py: Avoid Python 3.7+ subprocess.run capture_output List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c3d7b96df0acd640a538c493ec03d5452fac216f Auto-Submitted: auto-generated The branch stable/14 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c3d7b96df0acd640a538c493ec03d5452fac216f commit c3d7b96df0acd640a538c493ec03d5452fac216f Author: Jessica Clarke AuthorDate: 2024-01-31 19:45:59 +0000 Commit: Jessica Clarke CommitDate: 2024-09-07 00:20:39 +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") (cherry picked from commit b771d5705fc95445d4d81e054be664b7842156ff) --- 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 a602cc22072c..ec42cb70dd21 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():