From 3665af13d7f03e0ffa5aa73a09271ffd14efa760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Fri, 10 Feb 2023 07:52:29 -0800 Subject: [PATCH 1/7] Update instructions for building on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: César Román --- getting-started/setup-building.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/getting-started/setup-building.rst b/getting-started/setup-building.rst index 60d0b93d5b..8dc68379a5 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -417,24 +417,26 @@ for the header and library files to your ``configure`` command. For example, with **Homebrew**:: - $ brew install pkg-config openssl@1.1 xz gdbm tcl-tk - For Python 3.10 and newer:: + $ brew install pkg-config openssl xz gdbm tcl-tk + $ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \ PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \ ./configure --with-pydebug \ - --with-openssl=$(brew --prefix openssl) + --with-openssl="$(brew --prefix openssl)" For Python versions 3.9 through 3.7:: - $ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ + $ brew install pkg-config openssl@1.1 xz gdbm tcl-tk + + $ export PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig"; \ + CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ LDFLAGS="-L$(brew --prefix gdbm)/lib -L$(brew --prefix xz)/lib" \ - PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \ ./configure --with-pydebug \ - --with-openssl=$(brew --prefix openssl@1.1) \ + --with-openssl="$(brew --prefix openssl@1.1)" \ --with-tcltk-libs="$(pkg-config --libs tcl tk)" \ --with-tcltk-includes="$(pkg-config --cflags tcl tk)" From c5d0291d7e7ee177eeb9c833ed94c1948e5fb02c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Fri, 10 Feb 2023 08:32:35 -0800 Subject: [PATCH 2/7] Fix WARNING: Literal block expected; none found. getting-started/setup-building.rst:420 --- getting-started/setup-building.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/getting-started/setup-building.rst b/getting-started/setup-building.rst index 8dc68379a5..277163decd 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -414,16 +414,16 @@ OpenSSL which means that you will not be able to build the ``_ssl`` extension. One solution is to install these libraries from a third-party package manager, like Homebrew_ or MacPorts_, and then add the appropriate paths for the header and library files to your ``configure`` command. For example, - -with **Homebrew**:: +with **Homebrew**, For Python 3.10 and newer:: $ brew install pkg-config openssl xz gdbm tcl-tk +and ``configure``:: + $ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \ - PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \ ./configure --with-pydebug \ --with-openssl="$(brew --prefix openssl)" @@ -432,6 +432,8 @@ For Python versions 3.9 through 3.7:: $ brew install pkg-config openssl@1.1 xz gdbm tcl-tk +and ``configure``:: + $ export PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig"; \ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ LDFLAGS="-L$(brew --prefix gdbm)/lib -L$(brew --prefix xz)/lib" \ From c47691a8d5ef4da18bfa3f09dd7fe1184bcc2bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Fri, 10 Feb 2023 16:29:53 -0800 Subject: [PATCH 3/7] Apply suggestions from code review Co-authored-by: C.A.M. Gerlach --- getting-started/setup-building.rst | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/getting-started/setup-building.rst b/getting-started/setup-building.rst index 277163decd..c7ac572be3 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -413,14 +413,13 @@ Apple no longer provides header files for the deprecated system version of OpenSSL which means that you will not be able to build the ``_ssl`` extension. One solution is to install these libraries from a third-party package manager, like Homebrew_ or MacPorts_, and then add the appropriate paths -for the header and library files to your ``configure`` command. For example, -with **Homebrew**, +for the header and library files to your ``configure`` command. -For Python 3.10 and newer:: +For example, with **Homebrew**, install the dependencies:: $ brew install pkg-config openssl xz gdbm tcl-tk -and ``configure``:: +Then, for Python 3.10 and newer:: $ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \ @@ -428,11 +427,7 @@ and ``configure``:: --with-openssl="$(brew --prefix openssl)" -For Python versions 3.9 through 3.7:: - - $ brew install pkg-config openssl@1.1 xz gdbm tcl-tk - -and ``configure``:: +For Python 3.7 through 3.9:: $ export PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig"; \ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ From e394c53ac37e83caf1e203a315524fbbd3fdc02a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Sat, 11 Feb 2023 15:55:36 -0800 Subject: [PATCH 4/7] Install and use openssl@1.1 with Homebrew --- getting-started/setup-building.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/getting-started/setup-building.rst b/getting-started/setup-building.rst index c7ac572be3..672f39f487 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -417,14 +417,14 @@ for the header and library files to your ``configure`` command. For example, with **Homebrew**, install the dependencies:: - $ brew install pkg-config openssl xz gdbm tcl-tk + $ brew install pkg-config openssl@1.1 xz gdbm tcl-tk Then, for Python 3.10 and newer:: $ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \ ./configure --with-pydebug \ - --with-openssl="$(brew --prefix openssl)" + --with-openssl="$(brew --prefix openssl@1.1)" For Python 3.7 through 3.9:: From 7ef41ca33f03e67d19d5aa2acd8aefb330a47bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Mon, 13 Feb 2023 21:24:28 -0800 Subject: [PATCH 5/7] Apply suggestions from code review Co-authored-by: C.A.M. Gerlach --- getting-started/setup-building.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getting-started/setup-building.rst b/getting-started/setup-building.rst index 672f39f487..93679a370c 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -427,7 +427,7 @@ Then, for Python 3.10 and newer:: --with-openssl="$(brew --prefix openssl@1.1)" -For Python 3.7 through 3.9:: +Or, for Python 3.7 through 3.9:: $ export PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig"; \ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ From 5b356594deb1eec0573b852cb8d2245255c0439c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Wed, 15 Feb 2023 16:00:58 -0800 Subject: [PATCH 6/7] Restore Python 3.10+ PKG_CONFIG_PATH --- getting-started/setup-building.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/getting-started/setup-building.rst b/getting-started/setup-building.rst index 93679a370c..ff374d981f 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -423,6 +423,7 @@ Then, for Python 3.10 and newer:: $ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \ + PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \ ./configure --with-pydebug \ --with-openssl="$(brew --prefix openssl@1.1)" From d6bb8e0a1ae3b3bf382e62e64b9ea05907b8e081 Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Wed, 15 Feb 2023 20:01:14 -0600 Subject: [PATCH 7/7] Update following text to match revised macOS building language --- getting-started/setup-building.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/getting-started/setup-building.rst b/getting-started/setup-building.rst index b285a74650..15e094ae21 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -419,7 +419,7 @@ For example, with **Homebrew**, install the dependencies:: $ brew install pkg-config openssl@1.1 xz gdbm tcl-tk -Then, for Python 3.10 and newer:: +Then, for Python 3.10 and newer, run ``configure``:: $ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \ @@ -438,11 +438,11 @@ Or, for Python 3.7 through 3.9:: --with-tcltk-libs="$(pkg-config --libs tcl tk)" \ --with-tcltk-includes="$(pkg-config --cflags tcl tk)" -and ``make``:: +And finally, run ``make``:: $ make -s -j2 -or **MacPorts**:: +Alternatively, with **MacPorts**:: $ sudo port install pkgconfig openssl xz gdbm