-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test 1336 #1347
Merged
Merged
Test 1336 #1347
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7353eee
Update pyarrow requirement from <8.1.0,>=8.0.0 to >=8.0.0,<10.1.0
dependabot[bot] ee3a17f
Update pyarrow version
3dbrows c3ddda9
Update pyarrow version
3dbrows 457d4b5
Update DESCRIPTION.md to include pyarrow version bump
3dbrows 8d56334
Update libarrow version
3dbrows 8da9fcb
C++ ArrowIterator updates
3dbrows 0c4d819
Use C++ 17, add libarrow_dataset
3dbrows addf41f
Fix Windows lib reference
3dbrows c22318b
Version floor 10.0.1
3dbrows a4fd127
Fixed linting error
3dbrows 794ce59
move c++ std to be set on Windows too
sfc-gh-mkeller 684ba3e
fixing merge conflict
sfc-gh-mkeller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,23 +71,45 @@ class MyBuildExt(build_ext): | |
# this list should be carefully examined when pyarrow lib is | ||
# upgraded | ||
arrow_libs_to_copy = { | ||
"linux": ["libarrow.so.800", "libarrow_python.so.800", "libparquet.so.800"], | ||
"linux": [ | ||
"libarrow.so.1000", | ||
"libarrow_dataset.so.1000", | ||
sfc-gh-aling marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"libarrow_python.so.1000", | ||
"libparquet.so.1000", | ||
], | ||
"darwin": [ | ||
"libarrow.800.dylib", | ||
"libarrow_python.800.dylib", | ||
"libparquet.800.dylib", | ||
"libarrow.1000.dylib", | ||
"libarrow_dataset.1000.dylib", | ||
"libarrow_python.1000.dylib", | ||
"libparquet.1000.dylib", | ||
], | ||
"win32": [ | ||
"arrow.dll", | ||
"arrow_dataset.dll", | ||
"arrow_python.dll", | ||
"parquet.dll", | ||
], | ||
"win32": ["arrow.dll", "arrow_python.dll", "parquet.dll"], | ||
} | ||
|
||
arrow_libs_to_link = { | ||
"linux": ["libarrow.so.800", "libarrow_python.so.800", "libparquet.so.800"], | ||
"linux": [ | ||
"libarrow.so.1000", | ||
"libarrow_dataset.so.1000", | ||
"libarrow_python.so.1000", | ||
"libparquet.so.1000", | ||
], | ||
"darwin": [ | ||
"libarrow.800.dylib", | ||
"libarrow_python.800.dylib", | ||
"libparquet.800.dylib", | ||
"libarrow.1000.dylib", | ||
"libarrow_dataset.1000.dylib", | ||
"libarrow_python.1000.dylib", | ||
"libparquet.1000.dylib", | ||
], | ||
"win32": [ | ||
"arrow.lib", | ||
"arrow_dataset.lib", | ||
"arrow_python.lib", | ||
"parquet.lib", | ||
], | ||
"win32": ["arrow.lib", "arrow_python.lib", "parquet.lib"], | ||
} | ||
|
||
def build_extension(self, ext): | ||
|
@@ -126,13 +148,15 @@ def build_extension(self, ext): | |
ext.include_dirs.append(LOGGING_SRC_DIR) | ||
|
||
if sys.platform == "win32": | ||
if not any("/std" not in s for s in ext.extra_compile_args): | ||
ext.extra_compile_args.append("/std:c++17") | ||
Comment on lines
+151
to
+152
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, Arrow 10 switched to C++17 as the minimal supported C++ standard. |
||
ext.include_dirs.append(pyarrow.get_include()) | ||
ext.include_dirs.append(numpy.get_include()) | ||
elif sys.platform == "linux" or sys.platform == "darwin": | ||
ext.extra_compile_args.append("-isystem" + pyarrow.get_include()) | ||
ext.extra_compile_args.append("-isystem" + numpy.get_include()) | ||
if "std=" not in os.environ.get("CXXFLAGS", ""): | ||
ext.extra_compile_args.append("-std=c++11") | ||
ext.extra_compile_args.append("-std=c++17") | ||
ext.extra_compile_args.append("-D_GLIBCXX_USE_CXX11_ABI=0") | ||
|
||
ext.library_dirs.append( | ||
|
@@ -160,9 +184,11 @@ def _get_arrow_lib_dir(self): | |
def _copy_arrow_lib(self): | ||
libs_to_bundle = self.arrow_libs_to_copy[sys.platform] | ||
|
||
build_dir = os.path.join(self.build_lib, "snowflake", "connector") | ||
os.makedirs(build_dir, exist_ok=True) | ||
|
||
for lib in libs_to_bundle: | ||
source = f"{self._get_arrow_lib_dir()}/{lib}" | ||
build_dir = os.path.join(self.build_lib, "snowflake", "connector") | ||
copy(source, build_dir) | ||
|
||
def _get_arrow_lib_as_linker_input(self): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those two should be moved under 2.9.1?