diff options
author | Xu Huan <xuhuan.fnst@fujitsu.com> | 2022-07-07 16:01:12 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-07-07 08:24:26 -0700 |
commit | ed42504a985d973f73e51d452427c8e267425997 (patch) | |
tree | cdb569ab976047a72835515112526dad9c37c5e7 /meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch | |
parent | 79c71335803d8859eb419c208aa3f66722d54fc4 (diff) | |
download | meta-openembedded-ed42504a985d973f73e51d452427c8e267425997.tar.gz |
python3-grpcio: upgrade 1.45.0 -> 1.47.0
0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch
refreshed for new version.
Signed-off-by: Xu Huan <xuhuan.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch b/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch index febe6c4c87..f416ca2728 100644 --- a/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch +++ b/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch | |||
@@ -28,42 +28,49 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||
28 | src/python/grpcio/commands.py | 5 ++++- | 28 | src/python/grpcio/commands.py | 5 ++++- |
29 | 2 files changed, 10 insertions(+), 4 deletions(-) | 29 | 2 files changed, 10 insertions(+), 4 deletions(-) |
30 | 30 | ||
31 | diff --git a/setup.py b/setup.py | ||
32 | index ec27fe4..b2d2d1a 100644 | ||
31 | --- a/setup.py | 33 | --- a/setup.py |
32 | +++ b/setup.py | 34 | +++ b/setup.py |
33 | @@ -199,8 +199,11 @@ def check_linker_need_libatomic(): | 35 | @@ -206,8 +206,11 @@ def check_linker_need_libatomic(): |
34 | """Test if linker on system needs libatomic.""" | 36 | """Test if linker on system needs libatomic.""" |
35 | code_test = (b'#include <atomic>\n' + | 37 | code_test = (b'#include <atomic>\n' + |
36 | b'int main() { return std::atomic<int64_t>{}; }') | 38 | b'int main() { return std::atomic<int64_t>{}; }') |
37 | - cxx = os.environ.get('CXX', 'c++') | 39 | - cxx = shlex.split(os.environ.get('CXX', 'c++')) |
38 | - cpp_test = subprocess.Popen([cxx, '-x', 'c++', '-std=c++11', '-'], | 40 | - cpp_test = subprocess.Popen(cxx + ['-x', 'c++', '-std=c++14', '-'], |
39 | + cxx, cxx_args = os.environ.get('CXX').split(' ', 1) or 'c++' | 41 | + cxx, cxx_args = os.environ.get('CXX').split(' ', 1) or 'c++' |
40 | + if not cxx_args: | 42 | + if not cxx_args: |
41 | + cxx_args = "-g" | 43 | + cxx_args = "-g" |
42 | + | 44 | + |
43 | + cpp_test = subprocess.Popen([cxx, cxx_args, '-x', 'c++', '-std=c++11', '-'], | 45 | + cpp_test = subprocess.Popen([cxx, cxx_args, '-x', 'c++', '-std=c++14', '-'], |
44 | stdin=PIPE, | 46 | stdin=PIPE, |
45 | stdout=PIPE, | 47 | stdout=PIPE, |
46 | stderr=PIPE) | 48 | stderr=PIPE) |
47 | @@ -210,7 +213,7 @@ def check_linker_need_libatomic(): | 49 | @@ -217,7 +220,7 @@ def check_linker_need_libatomic(): |
48 | # Double-check to see if -latomic actually can solve the problem. | 50 | # Double-check to see if -latomic actually can solve the problem. |
49 | # https://github.com/grpc/grpc/issues/22491 | 51 | # https://github.com/grpc/grpc/issues/22491 |
50 | cpp_test = subprocess.Popen( | 52 | cpp_test = subprocess.Popen( |
51 | - [cxx, '-x', 'c++', '-std=c++11', '-', '-latomic'], | 53 | - [cxx, '-x', 'c++', '-std=c++14', '-', '-latomic'], |
52 | + [cxx, cxx_args, '-x', 'c++', '-std=c++11', '-', '-latomic'], | 54 | + [cxx, cxx_args, '-x', 'c++', '-std=c++14', '-', '-latomic'], |
53 | stdin=PIPE, | 55 | stdin=PIPE, |
54 | stdout=PIPE, | 56 | stdout=PIPE, |
55 | stderr=PIPE) | 57 | stderr=PIPE) |
58 | diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py | ||
59 | index d93b6c7..a8c4a51 100644 | ||
56 | --- a/src/python/grpcio/commands.py | 60 | --- a/src/python/grpcio/commands.py |
57 | +++ b/src/python/grpcio/commands.py | 61 | +++ b/src/python/grpcio/commands.py |
58 | @@ -228,7 +228,10 @@ class BuildExt(build_ext.build_ext): | 62 | @@ -228,7 +228,10 @@ class BuildExt(build_ext.build_ext): |
59 | """ | 63 | """ |
60 | try: | 64 | try: |
61 | # TODO(lidiz) Remove the generated a.out for success tests. | 65 | # TODO(lidiz) Remove the generated a.out for success tests. |
62 | - cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++11', '-'], | 66 | - cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++14', '-'], |
63 | + cc_test, cc_args = os.environ.get('CC').split(' ', 1) or 'gcc' | 67 | + cc_test, cc_args = os.environ.get('CC').split(' ', 1) or 'gcc' |
64 | + if not cc_args: | 68 | + if not cc_args: |
65 | + cc_args = "-g" | 69 | + cc_args = "-g" |
66 | + cc_test = subprocess.Popen([cc_test, cc_args, '-x', 'c', '-std=c++11', '-'], | 70 | + cc_test = subprocess.Popen([cc_test, cc_args, '-x', 'c', '-std=c++14', '-'], |
67 | stdin=subprocess.PIPE, | 71 | stdin=subprocess.PIPE, |
68 | stdout=subprocess.PIPE, | 72 | stdout=subprocess.PIPE, |
69 | stderr=subprocess.PIPE) | 73 | stderr=subprocess.PIPE) |
74 | -- | ||
75 | 2.25.1 | ||
76 | |||