From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.76.1675482235771783339 for ; Fri, 03 Feb 2023 19:43:55 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=Z2Y5JnW7; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [192.168.4.22] (unknown [47.201.8.94]) by linux.microsoft.com (Postfix) with ESMTPSA id 9C03720C7DD4; Fri, 3 Feb 2023 19:43:54 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9C03720C7DD4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1675482235; bh=dldO4XMTk3+dJmbmRy7btoCY/MJM72ShhNIgJBvdEQk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Z2Y5JnW7VKbVUXZLOCjrZrZYz6xbC6nmuhsw2w1Vcj2OUuVdQhGOHfVHduw+F4cZj FIKzYVsMfhdOtFxvRy51BUl4X0KWW5Miz4rH8DpSF8onniBkAAtVblYercC6HUKwba WLHYaJ6T+W4pMOkWZtlQ5ibDSUsH3z5cpggr2aoM= Message-ID: Date: Fri, 3 Feb 2023 22:43:53 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Update WindowsVsToolChain plugin To: devel@edk2.groups.io, joey.vagedes@gmail.com Cc: Bob Feng , Liming Gao , Yuwei Chen , Michael D Kinney References: <20230201202232.1410-1-joey.vagedes@gmail.com> <20230201202232.1410-2-joey.vagedes@gmail.com> From: "Michael Kubacki" In-Reply-To: <20230201202232.1410-2-joey.vagedes@gmail.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Acked-by: Michael Kubacki On 2/1/2023 3:22 PM, Joey Vagedes wrote: > This patch updates edk2-pytool-library dependency to v0.13.0, which has > an interface change to FindWithVsWhere. The BaseTools plugin uses this > function, so it is being updated to account for the interface change. > > Cc: Bob Feng > Cc: Liming Gao > Cc: Yuwei Chen > Cc: Michael D Kinney > > Signed-off-by: Joey Vagedes > --- > BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py | 16 ++++++++++++---- > pip-requirements.txt | 4 ++-- > 2 files changed, 14 insertions(+), 6 deletions(-) > > diff --git a/BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py b/BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py > index 0fba2c1b5325..615b5ed6d131 100644 > --- a/BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py > +++ b/BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py > @@ -177,15 +177,23 @@ class WindowsVsToolChain(IUefiBuildPlugin): > > > def _get_vs_install_path(self, vs_version, varname): > > # check if already specified > > - path = shell_environment.GetEnvironment().get_shell_var(varname) > > + path = None > > + if varname is not None: > > + path = shell_environment.GetEnvironment().get_shell_var(varname) > > + > > if(path is None): > > # Not specified...find latest > > - (rc, path) = FindWithVsWhere(vs_version=vs_version) > > - if rc == 0 and path is not None and os.path.exists(path): > > + try: > > + path = FindWithVsWhere(vs_version=vs_version) > > + except (EnvironmentError, ValueError, RuntimeError) as e: > > + self.Logger.error(str(e)) > > + return None > > + > > + if path is not None and os.path.exists(path): > > self.Logger.debug("Found VS instance for %s", vs_version) > > else: > > self.Logger.error( > > - "Failed to find VS instance with VsWhere (%d)" % rc) > > + f"VsWhere successfully executed, but could not find VS instance for {vs_version}.") > > return path > > > > def _get_vc_version(self, path, varname): > > diff --git a/pip-requirements.txt b/pip-requirements.txt > index 4ffcadddd8cf..d3256ff1ade7 100644 > --- a/pip-requirements.txt > +++ b/pip-requirements.txt > @@ -12,8 +12,8 @@ > # https://www.python.org/dev/peps/pep-0440/#version-specifiers > > ## > > > > -edk2-pytool-library==0.12.1 > > -edk2-pytool-extensions~=0.20.0 > > +edk2-pytool-library==0.13.0 > > +edk2-pytool-extensions~=0.21.2 > > edk2-basetools==0.1.39 > > antlr4-python3-runtime==4.7.1 > > lcov-cobertura==2.0.2 >