Skip to content

Commit 0932bf2

Browse files
Update instructions for how to build tkinter with Homebrew supplied Tcl/Tk (#893)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
1 parent 85e189d commit 0932bf2

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

setup.rst

+10-7
Original file line numberDiff line numberDiff line change
@@ -385,17 +385,20 @@ for the header and library files to your ``configure`` command. For example,
385385

386386
with **Homebrew**::
387387

388-
$ brew install pkg-config openssl xz gdbm
388+
$ brew install pkg-config openssl xz gdbm tcl-tk
389389

390-
and ``configure`` Python versions >= 3.7::
390+
For Python 3.10 and newer::
391391

392-
./configure --with-pydebug --with-openssl=$(brew --prefix openssl)
392+
$ PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
393+
./configure --with-pydebug --with-openssl=$(brew --prefix openssl)
393394

394-
or ``configure`` Python versions < 3.7::
395+
For Python versions 3.9 through 3.7::
395396

396-
$ CPPFLAGS="-I$(brew --prefix openssl)/include" \
397-
LDFLAGS="-L$(brew --prefix openssl)/lib" \
398-
./configure --with-pydebug
397+
$ export PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig"
398+
$ ./configure --with-pydebug \
399+
--with-openssl=$(brew --prefix openssl) \
400+
--with-tcltk-libs="$(pkg-config --libs tcl tk)" \
401+
--with-tcltk-includes="$(pkg-config --cflags tcl tk)"
399402

400403
and ``make``::
401404

0 commit comments

Comments
 (0)