-
Notifications
You must be signed in to change notification settings - Fork 27
/
0001-Support-custom-platform-tag.patch
74 lines (65 loc) · 2.18 KB
/
0001-Support-custom-platform-tag.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
From 43848867c2b6ef73c348066029eb8bc0a90500aa Mon Sep 17 00:00:00 2001
From: Stefan Agner <[email protected]>
Date: Tue, 22 Nov 2022 10:51:17 +0100
Subject: [PATCH] Support custom platform tag
---
build/chip/python_wheel.gni | 13 +++++++++++++
src/controller/python/BUILD.gn | 15 +--------------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/build/chip/python_wheel.gni b/build/chip/python_wheel.gni
index ac00fe1404..597a49783d 100644
--- a/build/chip/python_wheel.gni
+++ b/build/chip/python_wheel.gni
@@ -18,10 +18,23 @@ import("//build_overrides/pigweed.gni")
import("$dir_pw_build/python.gni")
import("${chip_root}/src/system/system.gni")
+if (current_os == "mac") {
+ import("${chip_root}/build/config/mac/mac_sdk.gni")
+}
+
declare_args() {
chip_python_version = "0.0"
chip_python_package_prefix = "chip"
chip_python_supports_stack_locking = chip_system_config_locking != "none"
+
+ if (current_os == "mac") {
+ chip_python_platform_tag = string_replace(
+ string_replace(mac_deployment_target, "macos", "macosx."),
+ ".",
+ "_")
+ } else {
+ chip_python_platform_tag = current_os
+ }
}
template("chip_python_wheel_action") {
diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn
index 58d9cb1f7c..96db7d4dee 100644
--- a/src/controller/python/BUILD.gn
+++ b/src/controller/python/BUILD.gn
@@ -24,10 +24,6 @@ import("${chip_root}/src/platform/python.gni")
import("${chip_root}/src/system/system.gni")
import("${dir_pw_unit_test}/test.gni")
-if (current_os == "mac") {
- import("${build_root}/config/mac/mac_sdk.gni")
-}
-
config("controller_wno_deprecate") {
cflags = [ "-Wno-deprecated-declarations" ]
}
@@ -282,16 +278,7 @@ chip_python_wheel_action("chip-core") {
cpu_tag = current_cpu
}
- if (current_os == "mac") {
- py_platform_tag = string_replace(
- string_replace(mac_deployment_target, "macos", "macosx."),
- ".",
- "_")
- } else {
- py_platform_tag = current_os
- }
-
- py_platform_tag = py_platform_tag + "_" + cpu_tag
+ py_platform_tag = chip_python_platform_tag + "_" + cpu_tag
tags = "cp37-abi3-" + py_platform_tag
--
2.47.0