Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions python/pyarrow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,11 @@ def get_include():
Return absolute path to directory containing Arrow C++ include
headers. Similar to numpy.get_include
"""
return _os.path.join(_os.path.dirname(__file__), 'include')
# Use pyarrow.lib location instead of just __file__. That works
# for both editable and non-editable builds as it points
# to the actual location of the compiled C++ extension.
from pyarrow import lib as _lib
return _os.path.join(_os.path.dirname(_lib.__file__), 'include')


def _get_pkg_config_executable():
Expand Down Expand Up @@ -388,7 +392,11 @@ def get_library_dirs():
Return lists of directories likely to contain Arrow C++ libraries for
linking C or Cython extensions using pyarrow
"""
package_cwd = _os.path.dirname(__file__)
# Use pyarrow.lib location instead of just __file__. That works
# for both editable and non-editable builds as it points
# to the actual location of the compiled C++ extension.
from pyarrow import lib as _lib
package_cwd = _os.path.dirname(_lib.__file__)
library_dirs = [package_cwd]

def append_library_dir(library_dir):
Expand Down
Loading