-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Stop looking for Homebrew openssl? #1686
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
Comments
I've recently also encountered an simlilar issue when homebrew bumped OpenSSL to version 1.1, the old pyenv-compiled python failed to resolve the correct path. For those who came across to this problem, you need to reinstall all compiled python with pyenv which build a new python with the correct openssl path. However, I think using homebrew OpenSSL is still a good idea, reasons as follow:
A good way to prevent link breaks from homebrew upgrading is to bind to a correct directory. $ brew --prefix openssl@1.1
/usr/local/opt/openssl@1.1
$ readlink /usr/local/opt/openssl@1.1
../Cellar/openssl@1.1/1.1.1g If you look deeper, you'll find $ ls -l /usr/local/opt | grep openssl
lrwxr-xr-x 1 tomy0000000 admin 28 9 8 00:09 openssl -> ../Cellar/openssl@1.1/1.1.1g
lrwxr-xr-x 1 tomy0000000 admin 28 9 8 00:09 openssl@1.1 -> ../Cellar/openssl@1.1/1.1.1g Therefore, a possible solution might be
This method guaranteed that whenever there's a new version of OpenSSL, as long as homebrew point the symlink to the latest version, the old python is able to resolve with that symlink. |
I think it's problematic using Homebrew openssl for a few reasons (the below is taken from ruby-build):
In general, it's really toilsome to have to re-install all your Pythons because you updated a Homebrew package that in turn updated your openssl version.
As far as I can see, python-build already specifies an openssl version needed for each Python version (ex: here), so I think most of those concerns are negated? For those that wanted to compile against Homebrew openssl, they could likely do something like |
To summarize, the pros of using OpenSSL from Homebrew still majorly outweigh the cons AFAICS. |
A friend of mine wrote a pyenv plugin that can attempt to relink libraries like openssl after they get moved by homebrew: https://github.com/sprout42/pyenv-fix-version |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
I'm curious if this project would have any interest in moving away from using openssl from homebrew by default? Similar to what ruby-build has already done.
While the dynamic linking to brew installed openssl versions at
brew --prefix openssl@1.1
is nice, it will eventually break python installs whenever openssl bumps their formula version and a user brew upgrades it (or another package that declares a dependency on openssl updates it).It appears like most of the code in python-build would support this change pretty easily. I replicated the changes from the ruby-build PR linked above and was able to install python versions successfully. Admittedly, I haven't tested this extensively.
Thoughts?
The text was updated successfully, but these errors were encountered: