<commit_before><HTML>
<HEAD>
<TITLE>Building Mac Python from source</TITLE>
</HEAD>
<BODY>
<H1>Building Mac Python from source</H1>
<HR>

This document explains how to build MacPython from source. This is
necessary if you want to write extension modules for 68K Python, and
currently also probably the easiest way to build PPC extension
modules. Building Python is not something to be undertaken lightly,
the process is not very streamlined so you need a reasonable working
knowledge of the CodeWarrior development environment, a good net
connection and probably quite some time too. <p>

The information density in this file is high, so you should probably
print it and read it at your leasure. Most things are explained only
once (and probably in the wrong place:-). <p>

I am very interested in feedback on this document, contact me at <A
HREF="mailto:<EMAIL>">&lt;<EMAIL>&gt;</A> or send your
comments to the <A
HREF="http://www.python.org/sigs/pythonmac-sig/">Mac Python Special
Interest Group</A>.

<H2>What you need.</H2>

The following things you definitely need:

<UL>

<LI> You need a MacPython source distribution, of course. You can
obtain one from <A
HREF="ftp://ftp.cwi.nl/pub/jack/python/mac">ftp://ftp.cwi.nl/pub/jack/python/mac</A>
or from the companion webpage at <A HREF="http://www.cwi.nl/~jack/macpython.html">
http://www.cwi.nl/~jack/macpython.html</A> (which has up-to-date links to the other
packages needed too)
and possibly also from the standard <A
HREF="ftp://ftp.python.org/pub/python/mac">python.org ftp
site</A>. Everything you need is also included in the standard Python
source distribution, but the organization is different. Look in
directory <code>Mac/mwerks/projects</code> for the project files and
related stuff.

<LI> You need MetroWerks CodeWarrior. The current distribution has
been built with CodeWarrior Pro 1. Ordering information is
available on the <A HREF="http://www.metrowerks.com/">MetroWerks
homepage</A>. You might still be able to build Python with MPW or
Think/Symantec C but you are basically on your own.

<LI> You need GUSI, the Grand Unified Socket Interface, by <NAME>. The original CWGUSI is
obtainable from <A
HREF="ftp://sunsite.cnlab-switch.ch/software/platform/macos/src">
ftp://sunsite.cnlab-switch.ch/software/platform/macos/src</A>.
At the moment Python is built with a slightly modified version of GUSI,
these modifications are available in folder <code>Python:Mac:GUSI-mods</code>.

</UL>

<A NAME="optional">The MacPython project files are configured to
include a plethora of optional modules</A>, and these modules need a
number extra packages. To use the project files as-is you have to
download these packages too. PPC and CFM68K Python have all such modules as
dynamically loaded modules, so if you don't need a certain package it
suffices to just refrain from builing the extension module. For static 68K
Python things are a bit more complicated: you have to edit the
interpreter project file to remove the reference to the module (and
the libraries it uses), and edit the <code>Mac:mwerks:mwerks_nonshared_config.h</code>
file to remove the <code>USE_...</code> line.  Here are the locations for the various things
you need:

<UL>

<LI> Tcl and Tk can be obtained from <A
HREF="ftp://ftp.smli.com/pub/tcl/mac/">ftp://ftp.smli.com/pub/tcl/mac/</A>.
The current distributions, Tcl 7.6 and Tk 4.2 need a bit of work,<commit_msg>Upped tcl/tk instructions for 8.0p2<commit_after><HTML>
<HEAD>
<TITLE>Building Mac Python from source</TITLE>
</HEAD>
<BODY>
<H1>Building Mac Python from source</H1>
<HR>

This document explains how to build MacPython from source. This is
necessary if you want to write extension modules for 68K Python, and
currently also probably the easiest way to build PPC extension
modules. Building Python is not something to be undertaken lightly,
the process is not very streamlined so you need a reasonable working
knowledge of the CodeWarrior development environment, a good net
connection and probably quite some time too. <p>

The information density in this file is high, so you should probably
print it and read it at your leasure. Most things are explained only
once (and probably in the wrong place:-). <p>

I am very interested in feedback on this document, contact me at <A
HREF="mailto:<EMAIL>">&lt;<EMAIL>&gt;</A> or send your
comments to the <A
HREF="http://www.python.org/sigs/pythonmac-sig/">Mac Python Special
Interest Group</A>.

<H2>What you need.</H2>

The following things you definitely need:

<UL>

<LI> You need a MacPython source distribution, of course. You can
obtain one from <A
HREF="ftp://ftp.cwi.nl/pub/jack/python/mac">ftp://ftp.cwi.nl/pub/jack/python/mac</A>
or from the companion webpage at <A HREF="http://www.cwi.nl/~jack/macpython.html">
http://www.cwi.nl/~jack/macpython.html</A> (which has up-to-date links to the other
packages needed too)
and possibly also from the standard <A
HREF="ftp://ftp.python.org/pub/python/mac">python.org ftp
site</A>. Everything you need is also included in the standard Python
source distribution, but the organization is different. Look in
directory <code>Mac/mwerks/projects</code> for the project files and
related stuff.

<LI> You need MetroWerks CodeWarrior. The current distribution has
been built with CodeWarrior Pro 1. Ordering information is
available on the <A HREF="http://www.metrowerks.com/">MetroWerks
homepage</A>. You might still be able to build Python with MPW or
Think/Symantec C but you are basically on your own.

<LI> You need GUSI, the Grand Unified Socket Interface, by <NAME>. The original CWGUSI is
obtainable from <A
HREF="ftp://sunsite.cnlab-switch.ch/software/platform/macos/src">
ftp://sunsite.cnlab-switch.ch/software/platform/macos/src</A>.
At the moment Python is built with a slightly modified version of GUSI,
these modifications are available in folder <code>Python:Mac:GUSI-mods</code>.

</UL>

<A NAME="optional">The MacPython project files are configured to
include a plethora of optional modules</A>, and these modules need a
number extra packages. To use the project files as-is you have to
download these packages too. PPC and CFM68K Python have all such modules as
dynamically loaded modules, so if you don't need a certain package it
suffices to just refrain from builing the extension module. For static 68K
Python things are a bit more complicated: you have to edit the
interpreter project file to remove the reference to the module (and
the libraries it uses), and edit the <code>Mac:mwerks:mwerks_nonshared_config.h</code>
file to remove the <code>USE_...</code> line.  Here are the locations for the various things
you need:

<UL>

<LI> Tcl and Tk can be obtained from <A
HREF="ftp://ftp.smli.com/pub/tcl/mac/">ftp://ftp.smli.com/pub/tcl/mac/</A>.
The current distributions, Tcl 8.0p2 and Tk 8.0p2 need a bit of work,
{'fraction_non_alphanumeric': 0.09282576866764275, 'fraction_numerical': 0.005124450951683748, 'mean_word_length': 4.60377358490566, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 101, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '316633', 'n_tokens_mistral': 2126, 'n_tokens_neox': 2026, 'n_words': 909}