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/18 09:36:04 UTC

[GitHub] [arrow] jorisvandenbossche 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

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


##########
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 have no idea about `PYARROW_TEST_LD_PATH` or what it is supposed to do. I just notices that it has not a single mention in our repo outside of the line above `test_ld_path = os.environ.get('PYARROW_TEST_LD_PATH', '')`. So therefore I was assuming this is some old left-over. 
   
   > I needed to use PYARROW_TEST_LD_PATH to reproduce this problem on my local M1 Mac.
   
   Can you clarify how you "used" it? I suppose you mean setting it manually to some path, but which?



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