diff --git a/DEPS b/DEPS index 65c748dd341..835c510b595 100644 --- a/DEPS +++ b/DEPS @@ -710,20 +710,4 @@ hooks = [ 'action': ['python3', 'sdk/build/vs_toolchain.py', 'update'], 'condition': 'checkout_win' }, - { - "name": "7zip", - "pattern": ".", - "action": [ - "download_from_google_storage", - "--no_auth", - "--no_resume", - "--bucket", - "dart-dependencies", - "--platform=win32", - "--extract", - "-s", - Var('dart_root') + "/third_party/7zip.tar.gz.sha1", - ], - 'condition': 'checkout_win' - }, ] diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index 13900927b88..37348695ffe 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -280,19 +280,6 @@ foreach(library, _full_sdk_libraries) { ] } -if (is_win) { - copy_tree_specs += [ - { - target = "copy_7zip" - visibility = [ ":create_common_sdk" ] - deps = [ ":copy_libraries" ] - source = "../third_party/7zip" - dest = "$root_out_dir/dart-sdk/lib/_internal/pub/asset/7zip" - ignore_patterns = ".svn" - }, - ] -} - # This generates targets for everything in copy_tree_specs. The targets have the # same name as the "target" fields in the scopes of copy_tree_specs. copy_trees("copy_trees") { @@ -836,10 +823,6 @@ group("create_common_sdk") { if (dart_target_arch != "ia32") { public_deps += [ ":copy_dart2native" ] } - - if (is_win) { - public_deps += [ ":copy_7zip" ] - } } # Parts specific to the platform SDK. diff --git a/third_party/.gitignore b/third_party/.gitignore index 0bd8a834a68..779e818cd02 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore @@ -7,7 +7,6 @@ !pkg_tested !/tcmalloc !d8 -!7zip.tar.gz.sha1 !firefox_jsshell !clang.tar.gz.sha1 !unittest.tar.gz.sha1 diff --git a/third_party/7zip.tar.gz.sha1 b/third_party/7zip.tar.gz.sha1 deleted file mode 100644 index 83e790b503d..00000000000 --- a/third_party/7zip.tar.gz.sha1 +++ /dev/null @@ -1 +0,0 @@ -22fe352b3c39c4281a599cf8576abef80ec44cc9 \ No newline at end of file diff --git a/tools/bots/dart_sdk.py b/tools/bots/dart_sdk.py index 019396922e4..d87632021c3 100755 --- a/tools/bots/dart_sdk.py +++ b/tools/bots/dart_sdk.py @@ -74,7 +74,6 @@ def CreateAndUploadSDKZip(arch, sdk_path): DartArchiveUploadSDKs(BUILD_OS, arch, sdk_zip) - def DartArchiveUploadSDKs(system, arch, sdk_zip): namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW) git_number = utils.GetArchiveVersion() @@ -171,26 +170,12 @@ def GsutilExists(gsu_path): def CreateZip(directory, target_file): - if 'win' in BUILD_OS: - CreateZipWindows(directory, target_file) - else: - CreateZipPosix(directory, target_file) - - -def CreateZipPosix(directory, target_file): - with utils.ChangedWorkingDirectory(os.path.dirname(directory)): - command = ['zip', '-yrq9', target_file, os.path.basename(directory)] - Run(command) - - -def CreateZipWindows(directory, target_file): - with utils.ChangedWorkingDirectory(os.path.dirname(directory)): - zip_win = os.path.join(bot_utils.DART_DIR, 'third_party', '7zip', '7za') - command = [ - zip_win, 'a', '-tzip', target_file, - os.path.basename(directory) - ] - Run(command) + root = os.path.dirname(directory) + base = os.path.basename(directory) + f = shutil.make_archive(target_file, 'zip', root, base) + # make_archive will appened '.zip' to the filename, so we have to rename + # to avoid having it being '.zip.zip' + shutil.move(f, target_file) def FileDelete(f):