Skip to content

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

Open
@RA80533

Description

@RA80533

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions