Skip to content

Commit eaede5b

Browse files
committed
Revert ARROW-5082 ("[Python] Stop exporting copies of shared libraries in wheel")
1 parent 4594f78 commit eaede5b

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

python/pyarrow/__init__.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,6 @@ def get_include():
209209
return _os.path.join(_os.path.dirname(__file__), 'include')
210210

211211

212-
def _get_base_libraries():
213-
return ['arrow', 'arrow_python']
214-
215-
216212
def _get_pkg_config_executable():
217213
return _os.environ.get('PKG_CONFIG', 'pkg-config')
218214

@@ -255,16 +251,7 @@ def get_libraries():
255251
Return list of library names to include in the `libraries` argument for C
256252
or Cython extensions using pyarrow
257253
"""
258-
libs = _get_base_libraries()
259-
if _sys.platform != 'win32':
260-
so_version = get_so_version()
261-
if _sys.platform == 'darwin':
262-
return ['{}.{}'.format(libname, so_version) for libname in libs]
263-
else:
264-
return [':lib{}.so.{}'.format(libname, so_version)
265-
for libname in libs]
266-
else:
267-
return libs
254+
return ['arrow', 'arrow_python']
268255

269256

270257
def get_library_dirs():

python/setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,11 @@ def _move_shared_libs_unix(build_prefix, build_lib, lib_name):
510510
lib_filename = os.path.basename(libs[0])
511511
shutil.move(pjoin(build_prefix, lib_filename),
512512
pjoin(build_lib, 'pyarrow', lib_filename))
513+
for lib in libs[1:]:
514+
filename = os.path.basename(lib)
515+
link_name = pjoin(build_lib, 'pyarrow', filename)
516+
if not os.path.exists(link_name):
517+
os.symlink(lib_filename, link_name)
513518

514519

515520
# If the event of not running from a git clone (e.g. from a git archive

0 commit comments

Comments
 (0)