Skip to content

Commit 51bfd16

Browse files
authored
ARROW-119 Add a flag for whether to create libarrow symlinks (#100)
1 parent 76f5525 commit 51bfd16

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bindings/python/setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313

1414
# Find and copy the binary libbson file, unless
1515
# MONGO_NO_COPY_LIBBSON is set (for instance in a conda build).
16-
COPY_LIBBSON = not os.environ.get("MONGO_NO_COPY_LIBBSON", False)
16+
COPY_LIBBSON = not os.environ.get("MONGO_NO_COPY_LIBBSON", "")
17+
18+
# Whether to create libarrow symlinks on posix systems.
19+
CREATE_LIBARROW_SYMLINKS = os.environ.get("MONGO_CREATE_LIBARROW_SYMLINKS", "1")
1720

1821

1922
def query_pkgconfig(cmd):
@@ -136,7 +139,7 @@ def append_arrow_flags(ext):
136139
ext.libraries.extend(pa.get_libraries())
137140
ext.library_dirs.extend(pa.get_library_dirs())
138141

139-
if os.name != "nt":
142+
if os.name != "nt" and CREATE_LIBARROW_SYMLINKS:
140143
# On Linux and MacOS, we must run pyarrow.create_library_symlinks()
141144
# as a user with write access to the directory where pyarrow is
142145
# installed.

0 commit comments

Comments
 (0)