Signed-off-by: Hongxu Jia <[email protected]>
---
 ...l-native_3.1.0.bb => bazel-native_3.7.1.bb} |  4 ++--
 ...e-sysroot-dir-to-the-default-Bazel-to.patch | 12 ++++++------
 .../bazel/files/0001-python3.patch             | 18 +++++++++---------
 3 files changed, 17 insertions(+), 17 deletions(-)
 rename recipes-devtools/bazel/{bazel-native_3.1.0.bb => bazel-native_3.7.1.bb} 
(90%)

diff --git a/recipes-devtools/bazel/bazel-native_3.1.0.bb 
b/recipes-devtools/bazel/bazel-native_3.7.1.bb
similarity index 90%
rename from recipes-devtools/bazel/bazel-native_3.1.0.bb
rename to recipes-devtools/bazel/bazel-native_3.7.1.bb
index 1336da8..a1575d6 100644
--- a/recipes-devtools/bazel/bazel-native_3.1.0.bb
+++ b/recipes-devtools/bazel/bazel-native_3.7.1.bb
@@ -2,8 +2,8 @@ DESCRIPTION = "Bazel build and test tool"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-SRC_URI[md5sum] = "381ca27503c566ce5e489d1ba07d1d25"
-SRC_URI[sha256sum] = 
"d7f40d0cac95a06cea6cb5b7f7769085257caebc3ee84269dd9298da760d5615"
+SRC_URI[md5sum] = "cc255121586e849c4de2483a8a5814b6"
+SRC_URI[sha256sum] = 
"c9244e5905df6b0190113e26082c72d58b56b1b0dec66d076f083ce4089b0307"
 
 SRC_URI = 
"https://github.com/bazelbuild/bazel/releases/download/${PV}/bazel-${PV}-dist.zip
 \
            file://0001-HttpDownloader-save-download-tarball-to-distdir.patch \
diff --git 
a/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
 
b/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
index b08c65a..7d73eb7 100644
--- 
a/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
+++ 
b/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
@@ -1,6 +1,6 @@
-From 707ba08068432262b3d02b29804c00afe7133ff6 Mon Sep 17 00:00:00 2001
+From 34c4dc1a10140addf75d3503d4b9f427303fe212 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <[email protected]>
-Date: Thu, 10 Dec 2020 16:12:51 +0800
+Date: Mon, 14 Dec 2020 16:45:31 +0800
 Subject: [PATCH] add Yocto native sysroot dir to the default Bazel toolchain
 
 While using the default Bazel C++ toolchain to build Yocto native tools
@@ -21,12 +21,12 @@ Signed-off-by: Hongxu Jia <[email protected]>
  1 file changed, 3 insertions(+)
 
 diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl
-index 84f5479..e17aa9d 100755
+index d48485b..0d297bf 100755
 --- a/tools/cpp/unix_cc_configure.bzl
 +++ b/tools/cpp/unix_cc_configure.bzl
-@@ -424,6 +424,9 @@ def configure_unix_toolchain(repository_ctx, cpu_value, 
overriden_tools):
-         ),
-     )
+@@ -443,6 +443,9 @@ def configure_unix_toolchain(repository_ctx, cpu_value, 
overriden_tools):
+             paths["@bazel_tools//tools/cpp:generate_system_module_map.sh"],
+         ))
  
 +    # Customize for Yocto
 +    
builtin_include_directories.append(get_env_var(repository_ctx,"YOCTO_NATIVE_SYSROOT",
 "NOT_SET_YOCTO_NATIVE_SYSROOT"))
diff --git a/recipes-devtools/bazel/files/0001-python3.patch 
b/recipes-devtools/bazel/files/0001-python3.patch
index 93eee2d..c14dec7 100644
--- a/recipes-devtools/bazel/files/0001-python3.patch
+++ b/recipes-devtools/bazel/files/0001-python3.patch
@@ -1,6 +1,6 @@
-From e43263d6163f7ba1622b268e93635bf42493f758 Mon Sep 17 00:00:00 2001
+From aa31b751f9b2e5263e4510c8719f29050b8ce0de Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <[email protected]>
-Date: Tue, 8 Dec 2020 11:09:44 +0800
+Date: Mon, 14 Dec 2020 16:43:45 +0800
 Subject: [PATCH] set python3 interpreter
 
 Since many distrobution choose python3, and drop python2,
@@ -20,28 +20,28 @@ Signed-off-by: Hongxu Jia <[email protected]>
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git 
a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
 
b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
-index 2c0ae4d..ae39cc9 100755
+index 9be9ef3..dec19e5 100755
 --- 
a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
 +++ 
b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
-@@ -237,7 +237,7 @@ public class BazelPythonSemantics implements 
PythonSemantics {
+@@ -247,7 +247,7 @@ public class BazelPythonSemantics implements 
PythonSemantics {
          PathFragment shExecutable = ShToolchain.getPathOrError(ruleContext);
          // TODO(#8685): Remove this special-case handling as part of making 
the proper shebang a
          // property of the Python toolchain configuration.
 -        String pythonExecutableName = OS.getCurrent() == OS.OPENBSD ? 
"python3" : "python";
 +        String pythonExecutableName = OS.getCurrent() == OS.OPENBSD ? 
"python3" : "python3";
+         // NOTE: keep the following line intact to support nix builds
+         String pythonShebang = "#!/usr/bin/env " + pythonExecutableName;
          ruleContext.registerAction(
-             new SpawnAction.Builder()
-                 .addInput(zipFile)
 diff --git 
a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
 
b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
-index 59c00e8..31d29a4 100755
+index 29f043f..c83891a 100755
 --- 
a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
 +++ 
b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
 +#!/usr/bin/env python3
  
- from __future__ import absolute_import
- from __future__ import division
+ # This script must retain compatibility with a wide variety of Python versions
+ # since it is run for every py_binary target. Currently we guarantee support
 -- 
 2.18.2
 
-- 
2.21.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51786): https://lists.yoctoproject.org/g/yocto/message/51786
Mute This Topic: https://lists.yoctoproject.org/mt/78999785/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to