Skip to content

Commit 80cd894

Browse files
César RománCAM-Gerlach
César Román
andauthored
Update instructions for building on macOS (#1052)
* Update instructions for building on macOS Signed-off-by: César Román <[email protected]> * Fix WARNING: Literal block expected; none found. getting-started/setup-building.rst:420 * Apply suggestions from code review Co-authored-by: C.A.M. Gerlach <[email protected]> * Install and use [email protected] with Homebrew * Apply suggestions from code review Co-authored-by: C.A.M. Gerlach <[email protected]> * Restore Python 3.10+ PKG_CONFIG_PATH * Update following text to match revised macOS building language --------- Signed-off-by: César Román <[email protected]> Co-authored-by: C.A.M. Gerlach <[email protected]>
1 parent 39dcbb7 commit 80cd894

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

getting-started/setup-building.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -413,36 +413,36 @@ Apple no longer provides header files for the deprecated system version of
413413
OpenSSL which means that you will not be able to build the ``_ssl`` extension.
414414
One solution is to install these libraries from a third-party package
415415
manager, like Homebrew_ or MacPorts_, and then add the appropriate paths
416-
for the header and library files to your ``configure`` command. For example,
416+
for the header and library files to your ``configure`` command.
417417

418-
with **Homebrew**::
418+
For example, with **Homebrew**, install the dependencies::
419419

420420
$ brew install pkg-config [email protected] xz gdbm tcl-tk
421421

422-
For Python 3.10 and newer::
422+
Then, for Python 3.10 and newer, run ``configure``::
423423

424424
$ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
425425
LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \
426426
PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
427427
./configure --with-pydebug \
428-
--with-openssl=$(brew --prefix openssl)
428+
--with-openssl="$(brew --prefix openssl@1.1)"
429429

430430

431-
For Python versions 3.9 through 3.7::
431+
Or, for Python 3.7 through 3.9::
432432

433-
$ CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
433+
$ export PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig"; \
434+
CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
434435
LDFLAGS="-L$(brew --prefix gdbm)/lib -L$(brew --prefix xz)/lib" \
435-
PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
436436
./configure --with-pydebug \
437-
--with-openssl=$(brew --prefix [email protected]) \
437+
--with-openssl="$(brew --prefix [email protected])" \
438438
--with-tcltk-libs="$(pkg-config --libs tcl tk)" \
439439
--with-tcltk-includes="$(pkg-config --cflags tcl tk)"
440440

441-
and ``make``::
441+
And finally, run ``make``::
442442

443443
$ make -s -j2
444444

445-
or **MacPorts**::
445+
Alternatively, with **MacPorts**::
446446

447447
$ sudo port install pkgconfig openssl xz gdbm
448448

0 commit comments

Comments
 (0)