From 7560c3799891ec31fc97b928d8678cd820b405e6 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 22 Feb 2023 22:21:07 +0100 Subject: [PATCH 1/4] Use targeted env vars for overriding compiler/linker args on macOS --- getting-started/setup-building.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/getting-started/setup-building.rst b/getting-started/setup-building.rst index 15e094ae21..5aa99c4e73 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -419,7 +419,17 @@ 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, run ``configure``:: +Then, for Python 3.11 and newer, run ``configure``:: + + $ GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \ + GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \ + LIBLZMA_CFLAGS="-I$(brew --prefix xz)/include" \ + LIBLZMA_LIBS="-I$(brew --prefix xz)/lib" \ + PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \ + ./configure --with-pydebug \ + --with-openssl="$(brew --prefix openssl@1.1)" + +For Python 3.10:: $ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \ From a8b2620075591e0e7681e4a272a07c51ebff9569 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 22 Feb 2023 22:50:20 +0100 Subject: [PATCH 2/4] Also override lzma -l flag --- 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 5aa99c4e73..9d98a0f195 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -424,7 +424,7 @@ Then, for Python 3.11 and newer, run ``configure``:: $ GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \ GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \ LIBLZMA_CFLAGS="-I$(brew --prefix xz)/include" \ - LIBLZMA_LIBS="-I$(brew --prefix xz)/lib" \ + LIBLZMA_LIBS="-I$(brew --prefix xz)/lib -llzma" \ PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \ ./configure --with-pydebug \ --with-openssl="$(brew --prefix openssl@1.1)" From aaaa08271a47216dcd2ba81f5256023ee8183255 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 8 Jun 2023 22:25:38 +0200 Subject: [PATCH 3/4] Update according to Ned's recommendations on gh-1058 --- getting-started/setup-building.rst | 47 ++++++++++++++---------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/getting-started/setup-building.rst b/getting-started/setup-building.rst index ab05fd077a..8de243a23e 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -423,30 +423,17 @@ Then, for Python 3.11 and newer, run ``configure``:: $ GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \ GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \ - LIBLZMA_CFLAGS="-I$(brew --prefix xz)/include" \ - LIBLZMA_LIBS="-I$(brew --prefix xz)/lib -llzma" \ - PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \ ./configure --with-pydebug \ --with-openssl="$(brew --prefix openssl@1.1)" -For Python 3.10:: +Or, for Python 3.7 through 3.10:: - $ 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)" - - -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" \ + $ CPPFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ LDFLAGS="-L$(brew --prefix gdbm)/lib -L$(brew --prefix xz)/lib" \ ./configure --with-pydebug \ - --with-openssl="$(brew --prefix openssl@1.1)" \ - --with-tcltk-libs="$(pkg-config --libs tcl tk)" \ - --with-tcltk-includes="$(pkg-config --cflags tcl tk)" + --with-openssl="$(brew --prefix openssl@1.1)" \ + --with-tcltk-libs="$(pkg-config --libs tcl tk)" \ + --with-tcltk-includes="$(pkg-config --cflags tcl tk)" And finally, run ``make``:: @@ -454,21 +441,31 @@ And finally, run ``make``:: Alternatively, with **MacPorts**:: - $ sudo port install pkgconfig openssl xz gdbm + $ sudo port install pkgconfig openssl11 xz gdbm tcl tk +quartz -and ``configure``:: +Then, for Python 3.11 and newer, run ``configure``:: - $ CPPFLAGS="-I/opt/local/include" \ - LDFLAGS="-L/opt/local/lib" \ - ./configure --with-pydebug + $ GDBM_CFLAGS="-I$(dirname $(dirname $(which port)))/include" \ + GDBM_LIBS="-L$(dirname $(dirname $(which port)))/lib -lgdbm" \ + ./configure --with-pydebug \ + --with-openssl="$(dirname $(dirname $(which port)))/libexec/openssl11" + +Or, for Python 3.7 through 3.10:: -and ``make``:: + $ CPPFLAGS="-I$(dirname $(dirname $(which port)))/include" \ + LDFLAGS="-L$(dirname $(dirname $(which port)))/lib" \ + ./configure --with-pydebug \ + --with-openssl="$(dirname $(dirname $(which port)))/libexec/openssl11" \ + --with-tcltk-libs="$(pkg-config --libs tcl tk)" \ + --with-tcltk-includes="$(pkg-config --cflags tcl tk)" + +And finally, run ``make``:: $ make -s -j2 There will sometimes be optional modules added for a new release which won't yet be identified in the OS-level build dependencies. In those cases, -just ask for assistance on the core-mentorship list. +just ask for assistance in the `Core Development`_ category on `Discourse`_. Explaining how to build optional dependencies on a Unix-based system without root access is beyond the scope of this guide. From 9b5920b69d51042ef6974be7d9922f1f899aab93 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 8 Jun 2023 22:33:18 +0200 Subject: [PATCH 4/4] Sphinx failed to fetch links from other page --- 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 8de243a23e..8be292818a 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -465,7 +465,7 @@ And finally, run ``make``:: There will sometimes be optional modules added for a new release which won't yet be identified in the OS-level build dependencies. In those cases, -just ask for assistance in the `Core Development`_ category on `Discourse`_. +just ask for assistance in the *Core Development* category on :ref:`help-discourse`. Explaining how to build optional dependencies on a Unix-based system without root access is beyond the scope of this guide.