diff --git a/getting-started/setup-building.rst b/getting-started/setup-building.rst index 993f3e40b2..8be292818a 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -419,24 +419,21 @@ 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``:: - $ 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" \ + $ GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \ + GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \ ./configure --with-pydebug \ --with-openssl="$(brew --prefix openssl@1.1)" +Or, for Python 3.7 through 3.10:: -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``:: @@ -444,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 + +Then, for Python 3.11 and newer, run ``configure``:: + + $ 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" -and ``configure``:: +Or, for Python 3.7 through 3.10:: - $ CPPFLAGS="-I/opt/local/include" \ - LDFLAGS="-L/opt/local/lib" \ - ./configure --with-pydebug + $ 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 ``make``:: +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 :ref:`help-discourse`. Explaining how to build optional dependencies on a Unix-based system without root access is beyond the scope of this guide.