Skip to content

Commit

Permalink
[Bazel] Fix mobile-install on linux machine
Browse files Browse the repository at this point in the history
**Background**
It turns out the queue module name is inconsistent across different python versions. We found that:
* On macos system
  - python2 contains both queue and Queue module. 
  - python3 only contains queue module
* On Linux system
  - python2 contains only Queue module. 
  - python3 only contains queue module 

Therefore, some developers are seeing `ImportError: No module named queue` errors locally on linux machine. 

**Change**
Import correct Queue module instead

**Test**
Local test pass

Upstream PR: bazelbuild#12540
---
Automatic squash commit from https://github.sc-corp.net/Snapchat/bazel/pull/83
Cooled by jchen
  • Loading branch information
jchen-sc committed Dec 8, 2020
1 parent 4584151 commit 43d7be0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ distdir_tar(
"1.25.0.zip",
# rules_nodejs
"rules_nodejs-1.3.0.tar.gz",
"android_tools_pkg-0.19.0rc3-snap-1.tar.gz",
"android_tools_pkg-0.19.0rc3-snap-3.tar.gz",
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz",
# bazelbuild/platforms
Expand Down Expand Up @@ -193,7 +193,7 @@ distdir_tar(
"1.25.0.zip": "c78be58f5e0a29a04686b628cf54faaee0094322ae0ac99da5a8a8afca59a647",
# rules_nodejs
"rules_nodejs-1.3.0.tar.gz": "b6670f9f43faa66e3009488bbd909bc7bc46a5a9661a33f6bc578068d1837f37",
"android_tools_pkg-0.19.0rc3-snap-1.tar.gz": "d07f851bcc59c153a2578d942caef7d8d7ca35e39aa3b908c8064c0708901e83",
"android_tools_pkg-0.19.0rc3-snap-3.tar.gz": "d07f851bcc59c153a2578d942caef7d8d7ca35e39aa3b908c8064c0708901e83",
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": "c00ceec469dbcf7929972e3c79f20c14033824538038a554952f5c31d8832f96",
# bazelbuild/platforms
Expand Down Expand Up @@ -246,8 +246,8 @@ distdir_tar(
"https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/releases/download/1.3.0/rules_nodejs-1.3.0.tar.gz",
"https://github.com/bazelbuild/rules_nodejs/releases/download/1.3.0/rules_nodejs-1.3.0.tar.gz",
],
"android_tools_pkg-0.19.0rc3-snap-1.tar.gz": [
"https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc3-snap-1.tar.gz",
"android_tools_pkg-0.19.0rc3-snap-3.tar.gz": [
"https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc3-snap-3.tar.gz",
],
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": [
Expand Down Expand Up @@ -535,7 +535,7 @@ distdir_tar(
"zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz",
"zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz",
"zulu11.37.17-ca-jdk11.0.6-win_x64.zip",
"android_tools_pkg-0.19.0rc3-snap-1.tar.gz",
"android_tools_pkg-0.19.0rc3-snap-3.tar.gz",
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz",
# bazelbuild/platforms
Expand Down Expand Up @@ -565,7 +565,7 @@ distdir_tar(
"zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4",
"zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f",
"zulu11.37.17-ca-jdk11.0.6-win_x64.zip": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18",
"android_tools_pkg-0.19.0rc3-snap-1.tar.gz": "d07f851bcc59c153a2578d942caef7d8d7ca35e39aa3b908c8064c0708901e83",
"android_tools_pkg-0.19.0rc3-snap-3.tar.gz": "d07f851bcc59c153a2578d942caef7d8d7ca35e39aa3b908c8064c0708901e83",
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": "c00ceec469dbcf7929972e3c79f20c14033824538038a554952f5c31d8832f96",
# bazelbuild/platforms
Expand Down Expand Up @@ -594,8 +594,8 @@ distdir_tar(
"zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz"],
"zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz"],
"zulu11.37.17-ca-jdk11.0.6-win_x64.zip": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"],
"android_tools_pkg-0.19.0rc3-snap-1.tar.gz": [
"https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc3-snap-1.tar.gz",
"android_tools_pkg-0.19.0rc3-snap-3.tar.gz": [
"https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc3-snap-3.tar.gz",
],
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": [
Expand Down Expand Up @@ -717,7 +717,7 @@ http_archive(
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
sha256 = "ea5c0589a01e2a9f43c20e5c145d3530e3b3bdbe7322789bc5da38d0ca49b837", # DO_NOT_REMOVE_THIS_ANDROID_TOOLS_UPDATE_MARKER
url = "https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc3-snap-1.tar.gz",
url = "https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc3-snap-3.tar.gz",
)

# This must be kept in sync with src/main/java/com/google/devtools/build/lib/bazel/rules/coverage.WORKSPACE.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "android_tools",
sha256 = "d07f851bcc59c153a2578d942caef7d8d7ca35e39aa3b908c8064c0708901e83",
url = "https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc3-snap-1.tar.gz",
url = "https://storage.googleapis.com/snap-bazel-releases/bazel_android_tools/android_tools_pkg-0.19.0rc3-snap-3.tar.gz",
auth_patterns = {
"storage.googleapis.com": "Bearer <password>",
},
Expand Down
2 changes: 1 addition & 1 deletion tools/android/build_incremental_dexmanifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import sys
import tempfile
import zipfile
from queue import Queue
from Queue import Queue
from threading import Thread


Expand Down
2 changes: 1 addition & 1 deletion tools/android/runtime_deps/upload_android_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
set -euo pipefail

# The version of android_tools.tar.gz
VERSION="0.19.0rc3-snap-1"
VERSION="0.19.0rc3-snap-3"
VERSIONED_FILENAME="android_tools_pkg-$VERSION.tar.gz"

# Create a temp directory to hold the versioned tarball, and clean it up when the script exits.
Expand Down

0 comments on commit 43d7be0

Please sign in to comment.