You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/16 20:04:15 UTC

[GitHub] [arrow] kou commented on a diff in pull request #14643: ARROW-18339: [Python][CI] Add DYLD_LIBRARY_PATH to avoid requiring PYARROW_BUNDLE_ARROW_CPP on macOS job

kou commented on code in PR #14643:
URL: https://github.com/apache/arrow/pull/14643#discussion_r1024455275


##########
python/pyarrow/tests/test_cython.py:
##########
@@ -141,19 +141,24 @@ def test_cython_api(tmpdir):
         """.format(mod_name='pyarrow_cython_example',
                    library_dirs=pa.get_library_dirs())
 
-        var = None
+        path_var = None
         if sys.platform == 'win32':
             if not hasattr(os, 'add_dll_directory'):
                 # Python 3.8 onwards don't check extension module DLLs on path
                 # we have to use os.add_dll_directory instead.
-                delim, var = ';', 'PATH'
+                delim, path_var = ';', 'PATH'
+        elif sys.platform == 'darwin':
+            delim, path_var = ':', 'DYLD_LIBRARY_PATH'
         else:
-            delim, var = ':', 'LD_LIBRARY_PATH'
-
-        if var:
-            subprocess_env[var] = delim.join(
-                pa.get_library_dirs() + [subprocess_env.get(var, '')]
-            )
+            delim, path_var = ':', 'LD_LIBRARY_PATH'
+
+        if path_var:
+            paths = sys.path
+            paths += pa.get_library_dirs()
+            paths += [test_ld_path]

Review Comment:
   I needed to use `PYARROW_TEST_LD_PATH` to reproduce this problem on my local M1 Mac.
   (I did it without reading documentations. So my approach may not be a recommended approach. Sorry.)
   
   If `PYARROW_TEST_LD_PATH` isn't recommended by pyarrow developers, I'm OK with removing it.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org