amoeba commented on code in PR #45766:
URL: https://github.com/apache/arrow/pull/45766#discussion_r1997149665


##########
python/pyarrow/__init__.py:
##########
@@ -412,14 +412,24 @@ def append_library_dir(library_dir):
                 append_library_dir(library_dir[2:])
 
     if _sys.platform == 'win32':
+        python_base_install = _os.path.dirname(_sys.executable)
+
         # TODO(wesm): Is this necessary, or does setuptools within a conda
         # installation add Library\lib to the linker path for MSVC?

Review Comment:
   Would our best test be to ask @h-vetinari to test or would our current conda 
CI jobs be enough?
   
   I tried testing this by adding print-debug statements in our build_ext 
inside setup.py,
   
   ```patch
   diff --git a/python/setup.py b/python/setup.py
   index bd658b91a5..3fdc69ea24 100755
   --- a/python/setup.py
   +++ b/python/setup.py
   @@ -105,6 +105,9 @@ class build_ext(_build_ext):
        _found_names = ()
   
        def build_extensions(self):
   +        print("library_dirs:", self.compiler.library_dirs)
   +        print("libraries:", self.compiler.libraries)
   +
   ```
   
   Which gives me,
   
   ```
   library_dirs: 
['C:\\Users\\Bryce\\miniforge3\\envs\\setuptools-conda-testing\\libs', 
'C:\\Users\\Bryce\\miniforge3\\envs\\setuptools-conda-testing', 
'C:\\Users\\Bryce\\miniforge3\\envs\\setuptools-conda-testing\\PCbuild\\amd64']
   libraries: []
   ```
   
   [According to 
setuptools](https://setuptools.pypa.io/en/latest/userguide/ext_modules.html#compiler-and-linker-options),
 it's `library_dirs` we need to care about,
   
   > then, a -L option for each element of Extension.library_dirs,
   
   And since `Library\\lib` isn't in the list I think we may still need this? 
Happy to try removing in CI though.



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to