Skip to content

Commit

Permalink
unixodbc is not available on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
xhochy committed Aug 28, 2024
1 parent 3eec3d0 commit 8dd136a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion cpp/turbodbc_numpy/Library/turbodbc_numpy/ndarrayobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* problems with the API can be solved at a central position.
*/

#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
// compare http://docs.scipy.org/doc/numpy/reference/c-api.array.html#importing-the-api
// as to why these defines are necessary
#define PY_ARRAY_UNIQUE_SYMBOL turbodbc_numpy_API
Expand Down
8 changes: 6 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ fs = import('fs')

cpp = meson.get_compiler('cpp')
add_global_arguments('-DBOOST_NO_CXX98_FUNCTION_BASE', language: 'cpp')
unixodbc = cpp.find_library('odbc')
simdutf = cpp.find_library('simdutf')
arrow = cpp.find_library('arrow')

Expand Down Expand Up @@ -96,6 +95,11 @@ inc_pa = include_directories(incdir_pyarrow)
pa_dep = declare_dependency(include_directories: inc_pa)
arrow_python = cpp.find_library('arrow_python', dirs: [fs.parent(_incdir_pyarrow_abs)])

deps = [np_dep, pa_dep, arrow, arrow_python, simdutf]
if target_machine.system() != 'windows'
unixodbc = cpp.find_library('odbc')
deps += unixodbc
endif

py.extension_module(
'turbodbc_intern',
Expand Down Expand Up @@ -185,7 +189,7 @@ py.extension_module(
'cpp/turbodbc_arrow/Library/src/arrow_result_set.cpp',
'cpp/turbodbc_arrow/Library/src/set_arrow_parameters.cpp',
],
dependencies: [unixodbc, np_dep, pa_dep, arrow, arrow_python, simdutf],
dependencies: deps,
include_directories: include_directories('cpp/cpp_odbc/Library', 'cpp/turbodbc/Library', 'cpp/turbodbc_python/Library', 'cpp/turbodbc_numpy/Library', 'cpp/turbodbc_arrow/Library'),
install: true
)
Expand Down

0 comments on commit 8dd136a

Please sign in to comment.