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

setup.py doesn't use HOMEBREW_PREFIX to find Homebrew (sometimes it can't find it) #1211

Open
RA80533 opened this issue Apr 27, 2023 · 0 comments · May be fixed by #1212
Open

setup.py doesn't use HOMEBREW_PREFIX to find Homebrew (sometimes it can't find it) #1211

RA80533 opened this issue Apr 27, 2023 · 0 comments · May be fixed by #1212

Comments

@RA80533
Copy link

RA80533 commented Apr 27, 2023

Issue

Homebrew installs in either a default directory (based on factors such as the macOS version installing Homebrew, the Homebrew version being installed, etc.) or a user-specified directory.

Homebrew provides a HOMEBREW_PREFIX environment variable in order to locate where it's installed.

While setup.py takes a few guesses as to where Homebrew is located (setup.py#L213-L219), it does not use the environment variable which is likely to have the location:

pyodbc/setup.py

Lines 213 to 219 in 7b4e277

# Add directories for MacPorts and Homebrew.
dirs = [
'/usr/local/include',
'/opt/local/include',
'/opt/homebrew/include',
expanduser('~/homebrew/include'),
]

If the user installed Homebrew in a user-specified directory, setup.py is not able to find Homebrew and fails to run.

@RA80533 RA80533 linked a pull request Apr 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant