It seems that pyenv cannot install 2.7.18 on Mac M1 (Apple ARM).
pyenv install 2.7.18 Downloading openssl-1.0.2q.tar.gz...
-> https://www.openssl.org/source/old/1.0.2/openssl-1.0.2q.tar.gz
Installing openssl-1.0.2q...
BUILD FAILED (OS X 13.5 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/9_/wjqg43y12bz8cnhlmmwh7rgc0000gq/T/python-build.20230816131951.19737
Results logged to /var/folders/9_/wjqg43y12bz8cnhlmmwh7rgc0000gq/T/python-build.20230816131951.19737.log
Last 10 log lines:
_dgram_write in libcrypto.a(bss_dgram.o)
_RAND_query_egd_bytes in libcrypto.a(rand_egd.o)
...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [link_a.darwin] Error 1
make[3]: *** [do_darwin-shared] Error 2
make[2]: *** [libcrypto.1.0.0.dylib] Error 2
make[1]: *** [shared] Error 2
make: *** [build_crypto] Error 1
This is because the pyenv "recipe" for 2.7.18 fetches openssl 1.0.2 which did
not have ARM support at the time. M1 support was added in 1.1.1i according to
https://www.openssl.org/news/cl111.txt.
So, this change is pulling in the latest of that series at the time of
authoring this change, which is 1.1.1v.
This could also potentially bring more security to 2.7.18.
There is some evidence here that the corresponding Python maintainer tried to
support a more recent OpenSSL version:
https://mail.python.org/pipermail/python-dev/2019-February/156333.html
For testing, I tried to exercise the Python test suite to see whether the ssl
tests work ok. I have run the following commands to double check that:
pyenv uninstall 2.7.18 (just to start clean)
pyenv install --keep 2.7.18
cd ~/.pyenv/sources/2.7.18/Python-2.7.18
make test
It seems that importing openssl worked. There are some connection resets by
peer in certain threads, but they are not test failures.
All include directories should go into CPPFLAGS.
XCode SDK was being added to CFLAGS instead
which caused old Tcl/Tk in the SDK to override a newer one in Homebrew.
According to the POSIX spec, an unescaped backslash not followed by
an escapable character is undefined behavior,
and it has become an error in GNU grep 3.8 (2022-09-02).
The -s flag assures that nothing can be installed to user site-packages
but doesn't keep ensurepip from looking there for Pip.
If Pip is installed in the user site-packages directory, pip won't be installed
for the newly built python -- and its shim won't be created.
-I makes the build install Pip in any case.
The user site-packages installation will override it --
but we'll have the shim at least.
Guthub have recently preinstalled x64 Homebrew OpenSSL to stock MacOS runners. This has caused FreeBSD OpenSSL detection logic to erroneously trigger when running FreeBSD tests in MacOS because their paths happened to coincide.
Replaced checking a specific path with checking with pkg.
Anaconda and miniconda have changed their version string format again,
so the parsing needs to be done differently. `add_miniconda.py` can now
parse all existing definition files properly.