[ 
https://issues.apache.org/jira/browse/ARROW-1021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16360732#comment-16360732
 ] 

ASF GitHub Bot commented on ARROW-1021:
---------------------------------------

pitrou commented on a change in pull request #1576: ARROW-1021: [Python] Add 
documentation for C++ pyarrow API
URL: https://github.com/apache/arrow/pull/1576#discussion_r167553178
 
 

 ##########
 File path: python/pyarrow/__init__.py
 ##########
 @@ -165,3 +165,38 @@ def get_include():
     """
     import os
     return os.path.join(os.path.dirname(__file__), 'include')
+
+
+def get_libraries():
+    """
+    Return list of library names to include in the `libraries` argument for C
+    or Cython extensions using pyarrow
+    """
+    return ['arrow_python']
+
+
+def get_library_dirs():
+    """
+    Return lists of directories likely to contain Arrow C++ libraries for
+    linking C or Cython extensions using pyarrow
+    """
+    import os
+    import sys
+    package_cwd = os.path.dirname(__file__)
+
+    library_dirs = [package_cwd]
+
+    # TODO(wesm): Is this necessary, or does setuptools within a conda
+    # installation add Library\lib to the linker path for MSVC?
+    try:
+        site_packages, _ = os.path.split(package_cwd)
+        python_base_install, _ = os.path.split(site_packages)
+
+        if sys.platform == 'win32':
+            library_dirs.append(os.path.join(python_base_install,
+                                             'Library', 'lib'))
+    except Exception:
 
 Review comment:
   I don't think `os.path.split` and `os.path.join` can raise, as they don't do 
any filesystem I/O.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Python] Add documentation about using pyarrow from other Cython and C++ 
> projects
> ---------------------------------------------------------------------------------
>
>                 Key: ARROW-1021
>                 URL: https://issues.apache.org/jira/browse/ARROW-1021
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Wes McKinney
>            Assignee: Uwe L. Korn
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> Follow up work to ARROW-819, ARROW-714



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to