Skip to content
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

Suggest to install unixodbc instead of build fails with TypeError expected 2 arguments got 0. #1269

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from os.path import exists, join, isdir, relpath, expanduser
from pathlib import Path
from inspect import cleandoc
from shutil import which

from setuptools import setup
from setuptools.extension import Extension
Expand Down Expand Up @@ -132,6 +133,11 @@ def get_compiler_settings():
])

# Homebrew installs odbc_config
if which("odbc_config") is None:
raise ValueError(
"odbc_config not found. Is unixODBC installed? (brew or conda install unixodbc)"
)

pipe = os.popen('odbc_config --cflags --libs 2>/dev/null')
cflags, ldflags = pipe.readlines()
exit_status = pipe.close()
Expand Down