rok commented on code in PR #48618:
URL: https://github.com/apache/arrow/pull/48618#discussion_r2749618805


##########
python/setup.py:
##########
@@ -121,8 +121,28 @@ def build_extensions(self):
 
     def run(self):
         self._run_cmake()
+        self._update_stubs()
         _build_ext.run(self)
 
+    def _update_stubs(self):
+        """Update stub docstrings and copy to build directory."""
+        stubs_dir = pjoin(setup_dir, 'pyarrow-stubs')
+        if not os.path.exists(stubs_dir):
+            return
+
+        build_cmd = self.get_finalized_command('build')
+        build_lib = os.path.abspath(build_cmd.build_lib)
+
+        # Import here to avoid hard dependency on the dev script
+        sys.path.insert(0, pjoin(setup_dir, '..', 'dev'))
+        try:
+            from update_stub_docstrings import update_stubs_for_build

Review Comment:
   I was thinking module for setup.py and script for development time.



-- 
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