fix str.removeprefix only works after python 3.9

pull/36062/head
Hannah Shi 9 months ago
parent 7324977aaa
commit ac3e525bf2
  1. 2
      BoringSSL-Package.swift
  2. 6
      templates/BoringSSL-Package.swift.template

@ -7,6 +7,8 @@ let basePath = "third_party/boringssl-with-bazel"
let privacyInfoPath = "../../src/objective-c/PrivacyInfo.xcprivacy"
let testPath = "test/boringssl_spm_build"
let package = Package(
name: "BoringSSL-GRPC",
products: [

@ -9,6 +9,8 @@
let privacyInfoPath = "../../src/objective-c/PrivacyInfo.xcprivacy"
let testPath = "test/boringssl_spm_build"
let package = Package(
name: "BoringSSL-GRPC",
products: [
@ -25,12 +27,14 @@
exclude: [
],
<%
def remove_prefix(s, prefix):
return s[len(prefix):] if s.startswith(prefix) else s
files = []
lib_maps = {lib.name: lib for lib in libs}
for dep in swift_boringssl_package.get('deps', []):
lib = lib_maps[dep]
files.extend(lib.src)
files = sorted(set({file.removeprefix("third_party/boringssl-with-bazel/"): file for file in files}))
files = sorted(set({remove_prefix(file, "third_party/boringssl-with-bazel/"): file for file in files}))
%>
sources: [
% for file in files:

Loading…
Cancel
Save