From f9afc22e8ad020af994f9a075af50dd65a919fa7 Mon Sep 17 00:00:00 2001 From: izumiberat Date: Fri, 10 Jun 2022 22:25:51 +0200 Subject: [PATCH 1/4] Note to user when modules do not build I am using Mac OS Catalina 10.15.7. To avoid getting the following messages : > The necessary bits to build these optional modules were not found: > _hashlib _ssl as well as: > Could not build the ssl module! > Python requires a OpenSSL 1.1.1 or newer Running `brew install openssl@3` allowed the _hashlib _ssl modules to build, but as suggested in a comment by @ezio-melotti it seemed strange that the version needed to be specified. I am therefore updating the documentation by leaving `brew install openssl` rather than `brew install openssl@3 ` but I am adding a note saying that if user gets the message > Could not build the ssl module! > Python requires a OpenSSL 1.1.1 or newer that they can try specifying the version of OpenSSL by using `brew install openssl@3`. Issue number: https://github.com/python/cpython/issues/93695 --- setup.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.rst b/setup.rst index 385429a63b..ee5d5d0a8c 100644 --- a/setup.rst +++ b/setup.rst @@ -401,6 +401,13 @@ and ``make``:: $ make -s -j2 +.. note:: + If the _hashlib and _ssl modules do not build, specifying the openssl version can resolve the issue. As indicated earlier, you might need to run ``make clean`` before or after re-running ``configure``. + +For example:: + + $ brew install openssl@3 + or **MacPorts**:: $ sudo port install pkgconfig openssl xz gdbm From b058722ee95d2b73ecdc0674e77236958f51097d Mon Sep 17 00:00:00 2001 From: izumiberat Date: Fri, 10 Jun 2022 22:57:14 +0200 Subject: [PATCH 2/4] Updating example with Openssl1.1 instead of 3 --- setup.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.rst b/setup.rst index ee5d5d0a8c..d7b437a0f3 100644 --- a/setup.rst +++ b/setup.rst @@ -406,7 +406,7 @@ and ``make``:: For example:: - $ brew install openssl@3 + $ brew install openssl@1.1 or **MacPorts**:: From e14b602085918c7f58de65799faf788fe330f131 Mon Sep 17 00:00:00 2001 From: izumiberat Date: Sat, 11 Jun 2022 12:07:27 +0200 Subject: [PATCH 3/4] updated brew command to specify openssl version I also removed the original note as it would be irrelevant after updating the brew command line --- setup.rst | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/setup.rst b/setup.rst index d7b437a0f3..0ad591659c 100644 --- a/setup.rst +++ b/setup.rst @@ -385,7 +385,7 @@ for the header and library files to your ``configure`` command. For example, with **Homebrew**:: - $ brew install openssl xz gdbm + $ brew install openssl@1.1 xz gdbm and ``configure`` Python versions >= 3.7:: @@ -401,13 +401,6 @@ and ``make``:: $ make -s -j2 -.. note:: - If the _hashlib and _ssl modules do not build, specifying the openssl version can resolve the issue. As indicated earlier, you might need to run ``make clean`` before or after re-running ``configure``. - -For example:: - - $ brew install openssl@1.1 - or **MacPorts**:: $ sudo port install pkgconfig openssl xz gdbm From a2fd287ec0461fe6d2591271a6b88dca53ac4727 Mon Sep 17 00:00:00 2001 From: izumiberat Date: Sat, 11 Jun 2022 12:14:30 +0200 Subject: [PATCH 4/4] adding pkg-config in brew command This is to resolve conflict with main branch --- setup.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.rst b/setup.rst index 0ad591659c..dcdb6a22c6 100644 --- a/setup.rst +++ b/setup.rst @@ -385,7 +385,7 @@ for the header and library files to your ``configure`` command. For example, with **Homebrew**:: - $ brew install openssl@1.1 xz gdbm + $ brew install pkg-config openssl@1.1 xz gdbm and ``configure`` Python versions >= 3.7::