forked from python/devguide
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
macOS: Add tabs for Homebrew/MacPorts and for 3.13+/3.11-3.12/3.8-3.10 (
python#1317) Co-authored-by: Erlend E. Aasland <[email protected]> Co-authored-by: Ezio Melotti <[email protected]>
- Loading branch information
1 parent
0c56002
commit 84b8813
Showing
1 changed file
with
43 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -690,54 +690,64 @@ on Linux, macOS and iOS. | |
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**, install the dependencies:: | ||
.. tab:: Homebrew | ||
|
||
$ brew install pkg-config [email protected] xz gdbm tcl-tk mpdecimal | ||
For **Homebrew**, install dependencies using ``brew``:: | ||
|
||
Then, for Python 3.13 and newer, run ``configure``:: | ||
$ brew install pkg-config [email protected] xz gdbm tcl-tk mpdecimal | ||
|
||
$ GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \ | ||
GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \ | ||
./configure --with-pydebug \ | ||
--with-system-libmpdec \ | ||
--with-openssl="$(brew --prefix [email protected])" | ||
.. tab:: Python 3.13+ | ||
|
||
For Python 3.11 and 3.12:: | ||
For Python 3.13 and newer:: | ||
|
||
$ GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \ | ||
GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \ | ||
./configure --with-pydebug \ | ||
--with-openssl="$(brew --prefix [email protected])" | ||
$ GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \ | ||
GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \ | ||
./configure --with-pydebug \ | ||
--with-system-libmpdec \ | ||
--with-openssl="$(brew --prefix [email protected])" | ||
|
||
Or, for Python 3.8 through 3.10:: | ||
.. tab:: Python 3.11-3.12 | ||
|
||
$ 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 [email protected])" \ | ||
--with-tcltk-libs="$(pkg-config --libs tcl tk)" \ | ||
--with-tcltk-includes="$(pkg-config --cflags tcl tk)" | ||
For Python 3.11 and 3.12:: | ||
|
||
And finally, run ``make``:: | ||
$ GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \ | ||
GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \ | ||
./configure --with-pydebug \ | ||
--with-openssl="$(brew --prefix [email protected])" | ||
|
||
$ make -s -j2 | ||
.. tab:: Python 3.8-3.10 | ||
|
||
For Python 3.8, 3.9, and 3.10:: | ||
|
||
$ 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 [email protected])" \ | ||
--with-tcltk-libs="$(pkg-config --libs tcl tk)" \ | ||
--with-tcltk-includes="$(pkg-config --cflags tcl tk)" | ||
|
||
.. tab:: MacPorts | ||
|
||
For **MacPorts**, install dependencies using ``port``:: | ||
|
||
$ sudo port install pkgconfig openssl xz gdbm tcl tk +quartz mpdecimal | ||
|
||
Alternatively, with **MacPorts**:: | ||
.. tab:: Python 3.13+ | ||
|
||
$ sudo port install pkgconfig openssl xz gdbm tcl tk +quartz mpdecimal | ||
For Python 3.13 and newer:: | ||
|
||
Then, for Python 3.13 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-system-libmpdec | ||
|
||
$ GDBM_CFLAGS="-I$(dirname $(dirname $(which port)))/include" \ | ||
GDBM_LIBS="-L$(dirname $(dirname $(which port)))/lib -lgdbm" \ | ||
./configure --with-pydebug \ | ||
--with-system-libmpdec | ||
.. tab:: Python 3.11-3.12 | ||
|
||
Or, for Python 3.11 and 3.12, run ``configure``:: | ||
For Python 3.11 and 3.12:: | ||
|
||
$ GDBM_CFLAGS="-I$(dirname $(dirname $(which port)))/include" \ | ||
GDBM_LIBS="-L$(dirname $(dirname $(which port)))/lib -lgdbm" \ | ||
./configure --with-pydebug | ||
$ GDBM_CFLAGS="-I$(dirname $(dirname $(which port)))/include" \ | ||
GDBM_LIBS="-L$(dirname $(dirname $(which port)))/lib -lgdbm" \ | ||
./configure --with-pydebug | ||
|
||
And finally, run ``make``:: | ||
|
||
|