raulcd commented on code in PR #49453:
URL: https://github.com/apache/arrow/pull/49453#discussion_r2927148978


##########
python/scripts/update_stub_docstrings.py:
##########
@@ -198,31 +203,77 @@ def add_docstrings_to_stubs(stubs_dir):
         stub_file.write_text(modified.code)
 
 
-def add_docstrings_from_build(stubs_dir, build_lib):
-    """
-    Entry point for setup.py: update docstrings using pyarrow from build 
directory.
+def _link_or_copy(source, destination):
+    if sys.platform != "win32":
+        try:
+            os.symlink(source, destination)
+            return
+        except OSError:
+            pass
+
+    if source.is_dir():
+        shutil.copytree(source, destination, symlinks=(sys.platform != 
"win32"))
+    else:
+        shutil.copy2(source, destination)
+
 
-    During the build process, pyarrow is not installed in the system Python.
-    We need to temporarily add the build directory to sys.path so we can
-    import pyarrow and extract docstrings from it.
+def _create_importable_pyarrow(pyarrow_pkg, source_dir, install_pyarrow_dir):
     """
-    stubs_dir, build_lib = Path(stubs_dir), Path(build_lib)
+    Populate pyarrow_pkg with source Python modules and installed binary 
artifacts
+    so that pyarrow can be imported from the parent directory of pyarrow_pkg.
+    """
+    ext_suffix = sysconfig.get_config_var("EXT_SUFFIX") or ".so"

Review Comment:
   Sorry, I meant whether it can be something different than the default 
"*.so". I'm not sure is necessary to be able to override as an env variable, 
what's the use case?



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