Skip to content

Commit b1d2b2a

Browse files
committed
more PR comments addressed
Punctuations at the end of every comment.
1 parent 6811831 commit b1d2b2a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

scripts/build_desktop_app_with_firebase.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def is_sdk_path_source(sdk_dir):
6969

7070
def validate_prebuilt_args(arch, config):
7171
"""Validate cmd line args for build with prebuilt libraries"""
72-
# Some options are not available when using prebuilt libraries"""
72+
# Some options are not available when using prebuilt libraries.
7373
if platform.system() == 'Darwin':
7474
if arch == 'x86' or config == 'Debug':
7575
raise ValueError("Prebuilt mac Firebase libraries are built for x64 and Release mode only. "
@@ -122,7 +122,7 @@ def build_source_vcpkg_dependencies(sdk_source_dir, arch, msvc_runtime_library):
122122
"""
123123
# TODO: Remove this once dev branch of firebase-cpp-sdk repo has been merged
124124
# onto main branch. This is required because vcpkg lives only in dev branch currently.
125-
# b/174141707
125+
# b/174141707.
126126
subprocess.run(['git', 'checkout', 'dev'],
127127
cwd=sdk_source_dir, check=True)
128128
subprocess.run(['git', 'pull'], cwd=sdk_source_dir, check=True)
@@ -152,19 +152,19 @@ def build_app_with_source(app_dir, sdk_source_dir, build_dir, arch,
152152
If its not specified, cmake's default is used (most likely Debug).
153153
target_format (str): If specified, build for this targetformat ('frameworks' or 'libraries').
154154
"""
155-
# Cmake configure
155+
# Cmake configure.
156156
cmd = ['cmake', '-S', '.', '-B', build_dir]
157157
cmd.append('-DFIREBASE_CPP_SDK_DIR={0}'.format(sdk_source_dir))
158158

159159
# If generator is not specifed, default for platform is used by cmake, else
160-
# use the specified value
160+
# use the specified value.
161161
if config:
162162
cmd.append('-DCMAKE_BUILD_TYPE={0}'.format(config))
163-
# workaround, absl doesn't build without tests enabled
163+
# workaround, absl doesn't build without tests enabled.
164164
cmd.append('-DBUILD_TESTING=off')
165165

166166
if platform.system() == 'Linux' and arch == 'x86':
167-
# Use a separate cmake toolchain for cross compiling linux x86 builds
167+
# Use a separate cmake toolchain for cross compiling linux x86 builds.
168168
vcpkg_toolchain_file_path = os.path.join(sdk_source_dir, 'external', 'vcpkg',
169169
'scripts', 'buildsystems', 'linux_32.cmake')
170170
else:
@@ -178,9 +178,9 @@ def build_app_with_source(app_dir, sdk_source_dir, build_dir, arch,
178178
cmd.append('-DVCPKG_TARGET_TRIPLET={0}'.format(vcpkg_triplet))
179179

180180
if platform.system() == 'Windows':
181-
# If building for x86, we should supply -A Win32 to cmake configure
182-
# Its a good habit to specify for x64 too as the default might be different
183-
# on different windows machines.
181+
# If building for x86, we should supply -A Win32 to cmake configure.
182+
# Since the default architecture for cmake varies from machine to machine,
183+
# it is a good practice to specify it all the time (even for x64).
184184
cmd.append('-A')
185185
cmd.append('Win32') if arch == 'x86' else cmd.append('x64')
186186

@@ -194,7 +194,7 @@ def build_app_with_source(app_dir, sdk_source_dir, build_dir, arch,
194194
print("Running {0}".format(' '.join(cmd)))
195195
subprocess.run(cmd, cwd=app_dir, check=True)
196196

197-
#CMake build
197+
#CMake build.
198198
cmd = ['cmake', '--build', build_dir, '-j', str(os.cpu_count()), '--config', config]
199199
print("Running {0}".format(' '.join(cmd)))
200200
subprocess.run(cmd, cwd=app_dir, check=True)
@@ -203,7 +203,7 @@ def build_app_with_prebuilt(app_dir, sdk_prebuilt_dir, build_dir, arch,
203203
msvc_runtime_library='static', config=None):
204204
"""Build desktop app directly against the prebuilt Firebase C++ libraries.
205205
206-
Since this invovles a cmake configure, it is advised to run this on a clean
206+
Since this involves a cmake configure, it is advised to run this on a clean
207207
build directory.
208208
209209
Args:
@@ -233,7 +233,7 @@ def build_app_with_prebuilt(app_dir, sdk_prebuilt_dir, build_dir, arch,
233233
print("Running {0}".format(' '.join(cmd)))
234234
subprocess.run(cmd, cwd=app_dir, check=True)
235235

236-
#CMake build
236+
#CMake build.
237237
cmd = ['cmake', '--build', build_dir, '-j', str(os.cpu_count()), '--config', config]
238238
print("Running {0}".format(' '.join(cmd)))
239239
subprocess.run(cmd, cwd=app_dir, check=True)

0 commit comments

Comments
 (0)