vsdownload: Handle machineArch dependency constraint#140
vsdownload: Handle machineArch dependency constraint#140mstorsjo merged 2 commits intomstorsjo:masterfrom
Conversation
mstorsjo
left a comment
There was a problem hiding this comment.
I think this looks reasonable, but I'd like to understand the roles of these fields a little better (it's been ages since I looked closer at the package trees).
|
Does this change mean that we'll only end up downloading one of the |
|
Hi @huangqinjin , We need to add/handle constraints to few more places, because it was passing diff --git a/vsdownload.py b/vsdownload.py
index 0e8e021..0f2852d 100755
--- a/vsdownload.py
+++ b/vsdownload.py
@@ -63,7 +63,7 @@ def getArgsParser():
return parser
def setPackageSelectionMSVC16(args, packages, userversion, sdk, toolversion, defaultPackages):
- if findPackage(packages, "Microsoft.VisualStudio.Component.VC." + toolversion + ".x86.x64", None, warn=False):
+ if findPackage(packages, "Microsoft.VisualStudio.Component.VC." + toolversion + ".x86.x64", {}, warn=False):
if sdk.startswith("10.0.") and int(sdk[5:]) >= 22000:
sdkpkg = "Win11SDK_" + sdk
else:
@@ -82,8 +82,9 @@ def setPackageSelectionMSVC16(args, packages, userversion, sdk, toolversion, def
print("Didn't find exact version packages for " + userversion + ", assuming this is provided by the default/latest version")
args.package.extend(defaultPackages)
+
def setPackageSelectionMSVC15(args, packages, userversion, sdk, toolversion, defaultPackages):
- if findPackage(packages, "Microsoft.VisualStudio.Component.VC.Tools." + toolversion, None, warn=False):
+ if findPackage(packages, "Microsoft.VisualStudio.Component.VC.Tools." + toolversion, {}, warn=False):
args.package.extend(["Win10SDK_" + sdk, "Microsoft.VisualStudio.Component.VC.Tools." + toolversion])
else:
# Options for toolchains for specific versions. The latest version in
@@ -699,7 +700,7 @@ if __name__ == "__main__":
sys.exit(0)
if not args.accept_license:
- response = input("Do you accept the license at " + findPackage(packages, "Microsoft.VisualStudio.Product.BuildTools", None)["localizedResources"][0]["license"] + " (yes/no)? ")
+ response = input("Do you accept the license at " + findPackage(packages, "Microsoft.VisualStudio.Product.BuildTools", {})["localizedResources"][0]["license"] + " (yes/no)? ")
while response != "yes" and response != "no":
response = input("Do you accept the license? Answer \"yes\" or \"no\": ")
if response == "no": |
No, this change just gives |
7492781 to
e5f2565
Compare
Thanks. Amended. |
e5f2565 to
06f2053
Compare
* Added colors to output messages to highlight important information. * Switched from multiprocessing to ThreadPoolExecutor for downloads. * Added tree like structure to --print-deps, --print-reverse-deps and --print-selection. * Merged mstorsjo#140 * Merged mstorsjo#144
|
Thanks, let's merge this now! |
Closes #135
Closes #138