ahmedabu98 commented on code in PR #29834:
URL: https://github.com/apache/beam/pull/29834#discussion_r1476192178


##########
sdks/python/setup.py:
##########
@@ -205,6 +205,34 @@ def generate_protos_first():
                        err.stderr)
 
 
+def generate_external_transform_wrappers():
+  try:
+    sdk_root = os.path.dirname(os.path.realpath(__file__))
+    if not os.path.exists(os.path.join(sdk_root, 'gen_xlang_wrappers.py')):
+      beam_root = os.path.join(sdk_root, 'apache_beam')
+      wrappers = list(find_by_ext(beam_root, '_et.py'))
+
+      if not wrappers:
+        warnings.warn(
+          'External transform wrappers have not been generated and the '
+          'generation script `gen_xlang_wrappers.py` cannot be found')
+      else:
+        warnings.warn('Skipping external transform wrapper generation as they '
+                      'are already generated.')
+      return
+    out = subprocess.run([
+      sys.executable,
+      os.path.join('gen_xlang_wrappers.py'),
+      '--cleanup',
+      '--input-expansion-services', 'standard_expansion_services.yaml',
+      '--output-transforms-config', 'standard_external_transforms.yaml'],
+      capture_output=True, check=False)

Review Comment:
   Thanks, set to True



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to