Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.

This commit is contained in:
Jack Jansen 2003-01-08 16:27:44 +00:00
parent 6c64fa7dda
commit 3e82872eca
27 changed files with 220 additions and 290 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -49,25 +49,30 @@ OSAm_RunCompiledScript (self, args)
char *line; char *line;
DescType typeCode; DescType typeCode;
long dataSize = 0; long dataSize = 0;
OSErr err;
HLock (temp.dataHandle); dataSize = AEGetDescDataSize (&temp);
dataSize = GetHandleSize (temp.dataHandle);
if (dataSize > 0) if (dataSize > 0)
{ {
PyObject *result = PyString_FromStringAndSize ((*temp.dataHandle), PyObject *result = PyString_FromStringAndSize (NULL,
dataSize); dataSize);
AEDisposeDesc (&temp);
if (!result) if (!result)
{ {
printf ("OSAm.error Out of memory.\n"); printf ("OSAm.error Out of memory.\n");
Py_INCREF (Py_None); Py_INCREF (Py_None);
AEDisposeDesc (&temp);
return Py_None; return Py_None;
} }
if ( (err=AEGetDescData(&temp, PyString_AS_STRING(result), dataSize)) < 0 )
{
AEDisposeDesc(&temp);
return PyMac_Error(err);
}
AEDisposeDesc(&temp);
return result; return result;
} }
} }
@ -110,28 +115,32 @@ OSAm_CompileAndSave (self, args)
char *line; char *line;
DescType typeCode; DescType typeCode;
long dataSize = 0; long dataSize = 0;
OSErr err;
HLock (temp.dataHandle); dataSize = AEGetDescDataSize (&temp);
dataSize = GetHandleSize (temp.dataHandle);
if (dataSize > 0) if (dataSize > 0)
{ {
PyObject *result = PyString_FromStringAndSize ((*temp.dataHandle), PyObject *result = PyString_FromStringAndSize (NULL,
dataSize); dataSize);
AEDisposeDesc (&temp);
if (!result) if (!result)
{ {
printf ("OSAm.error Out of memory.\n"); printf ("OSAm.error Out of memory.\n");
Py_INCREF (Py_None); Py_INCREF (Py_None);
AEDisposeDesc (&temp);
return Py_None; return Py_None;
} }
if ( (err=AEGetDescData(&temp, PyString_AS_STRING(result), dataSize)) < 0 )
{
AEDisposeDesc(&temp);
return PyMac_Error(err);
}
AEDisposeDesc(&temp);
return result; return result;
} }
} }
if (myErr != noErr) if (myErr != noErr)
@ -170,25 +179,30 @@ OSAm_CompileAndExecute (self, args)
char *line; char *line;
DescType typeCode; DescType typeCode;
long dataSize = 0; long dataSize = 0;
OSErr err;
HLock (temp.dataHandle); dataSize = AEGetDescDataSize (&temp);
dataSize = GetHandleSize (temp.dataHandle);
if (dataSize > 0) if (dataSize > 0)
{ {
PyObject *result = PyString_FromStringAndSize ((*temp.dataHandle), PyObject *result = PyString_FromStringAndSize (NULL,
dataSize); dataSize);
AEDisposeDesc (&temp);
if (!result) if (!result)
{ {
printf ("OSAm.error Out of memory.\n"); printf ("OSAm.error Out of memory.\n");
Py_INCREF (Py_None); Py_INCREF (Py_None);
AEDisposeDesc (&temp);
return Py_None; return Py_None;
} }
if ( (err=AEGetDescData(&temp, PyString_AS_STRING(result), dataSize)) < 0 )
{
AEDisposeDesc(&temp);
return PyMac_Error(err);
}
AEDisposeDesc(&temp);
return result; return result;
} }
} }
@ -216,7 +230,7 @@ static struct PyMethodDef OSAm_methods[] =
(PyCFunction) OSAm_CompileAndExecute, (PyCFunction) OSAm_CompileAndExecute,
METH_VARARGS, METH_VARARGS,
OSAm_DoCommand__doc__}, OSAm_DoCommand__doc__},
#if 0
{"CompileAndSave", {"CompileAndSave",
(PyCFunction) OSAm_CompileAndSave, (PyCFunction) OSAm_CompileAndSave,
METH_VARARGS, METH_VARARGS,
@ -226,6 +240,7 @@ static struct PyMethodDef OSAm_methods[] =
(PyCFunction) OSAm_RunCompiledScript, (PyCFunction) OSAm_RunCompiledScript,
METH_VARARGS, METH_VARARGS,
OSAm_DoCommand__doc__}, OSAm_DoCommand__doc__},
#endif
{NULL, (PyCFunction) NULL, 0, NULL} {NULL, (PyCFunction) NULL, 0, NULL}
}; };

Binary file not shown.

View File

@ -44,7 +44,7 @@ static c2pstr(const char *cc)
OSAError LoadScriptingComponent (ComponentInstance * scriptingComponent); OSAError LoadScriptingComponent (ComponentInstance * scriptingComponent);
#if 0
/* /*
* store the script as a compile script so that OSA * store the script as a compile script so that OSA
* components may load and execute the script easily * components may load and execute the script easily
@ -143,6 +143,7 @@ CleanUp:
return err2; return err2;
} }
#endif
OSAError OSAError
@ -194,7 +195,7 @@ CleanUp:
return err2; return err2;
} }
#if 0
/* /*
* This routine reads in a saved script file and executes * This routine reads in a saved script file and executes
* the script contained within (from a 'scpt' resource.) * the script contained within (from a 'scpt' resource.)
@ -291,6 +292,7 @@ done:
return err2; return err2;
} }
#endif
OSAError OSAError

View File

@ -1,12 +1,12 @@
<HTML> <HTML>
<HEAD> <HEAD>
<TITLE>Building Mac Python from source</TITLE> <TITLE>Building MacPython-OS9 from source</TITLE>
</HEAD> </HEAD>
<BODY> <BODY>
<H1>Building Mac Python from source</H1> <H1>Building MacPython-OS9 from source</H1>
<HR> <HR>
This document explains how to build MacPython from source. This is This document explains how to build MacPython-OS9 from source. This is
necessary if you want to make modifications to the Python core. Building necessary if you want to make modifications to the Python core. Building
Python is not something to be undertaken lightly, you need a reasonable Python is not something to be undertaken lightly, you need a reasonable
working knowledge of the CodeWarrior development environment, a good net working knowledge of the CodeWarrior development environment, a good net
@ -23,10 +23,11 @@ once (and probably in the wrong place:-). <p>
First a warning: this information may become outdated if a new CodeWarrior is First a warning: this information may become outdated if a new CodeWarrior is
released after MacPython. The released after MacPython. The
<a href="http://www.cwi.nl/~jack/macpython.html">MacPython homepage</a> will <a href="http://www.cwi.nl/~jack/macpython.html">MacPython homepage</a> will
hopefully have updated instructions in that case. These instructions are for CW7. hopefully have updated instructions in that case. These instructions are for CW7,
it is rumoured you may encounter some problems with newer versions of CodeWarrior.
</blockquote> </blockquote>
I am very interested in feedback on this document, send your I am interested in feedback on this document, send your
comments to the <A comments to the <A
HREF="http://www.python.org/sigs/pythonmac-sig/">Mac Python Special HREF="http://www.python.org/sigs/pythonmac-sig/">Mac Python Special
Interest Group</A>. Interest Group</A>.
@ -77,11 +78,6 @@ you need:
<UL> <UL>
<LI> Tcl and Tk are somewhat less supported on the Mac than on Unix
or Windows.
See the section on <A HREF="#tcltk">building Tcl/Tk Python</A>
below.
<LI> Waste, a TextEdit replacement written by Marco Piovanelli, <A <LI> Waste, a TextEdit replacement written by Marco Piovanelli, <A
HREF="mailto:piovanel@kagi.com">&lt;piovanel@kagi.com&gt;</A>. Python HREF="mailto:piovanel@kagi.com">&lt;piovanel@kagi.com&gt;</A>. Python
was built using version 2.0, which is included in the CodeWarrior was built using version 2.0, which is included in the CodeWarrior
@ -132,7 +128,6 @@ Top-level-folder:
Modules Modules
Build Build
... ...
Tcl/Tk Folder 8.3.4
</PRE> </PRE>
If your setup of the libraries is exactly the same as mine (which is If your setup of the libraries is exactly the same as mine (which is
@ -142,7 +137,7 @@ repository) you can use the project <code>buildlibs.prj</code> in the
fell swoop, otherwise you will have to build the libraries one by fell swoop, otherwise you will have to build the libraries one by
one. <p> one. <p>
First build GUSI, both the normal one and the Carbon variant. First build GUSI, the Carbon variant.
<p> <p>
Next, in Next, in
@ -152,35 +147,6 @@ and<code>libtiff</code> you build all projects. Usually the projects are in "mac
subfolders, sometimes they are in the main folder. Tcl/tk is a special subfolders, sometimes they are in the main folder. Tcl/tk is a special
case, see below. case, see below.
<H2><A NAME="tcltk">Building Tcl/Tk</H2>
Tkinter has been built with Tcl/Tk 8.3.4. Load the Mac source distribution
from the tcl sourceforge site and build it. Build with CW7, but you will
need CW6 to build the MDEF resource (or copy it from a binary
installation). As of this writing the projects are CW6, so they need
massaging to build with CW7, but this is a lot less work than applying
all the workarounds for CW6 that the build instructions give. <P>
Note that if you use a different release of Tcl and Tk than the ones
I have used you may have to adapt the Python <code>tkresources.rsrc</code> file.
This is easiest done by building <code>Tk8.3.shlb</code> and copying the TEXT, ICON
and CRSR resources from it to <code>tkresources.rsrc</code>. This allows
the <code>_tkinter</code> module to work without an installed Tk/Tcl on your
machine. <P>
Also note that the <code>_tkinter.ppc.slb</code> that is normally distributed
in the <code>lib-dynload</code> folder is the one from the Imaging extension,
which has some extra features needed by PIL (and which features should not
hinder normal operation).
</UL>
Build first the Tcl library, then
SimpleTcl (test it by typing <code>ls -l</code> in the window you get)
then the Tk library, then SimpleTk (which can again be tested with
<code>ls -l</code>). If this all worked you are all set to try
building Python.
<H2>The organization of the Python source tree</H2> <H2>The organization of the Python source tree</H2>
Time for a short break, while we have a look at the organization of Time for a short break, while we have a look at the organization of
@ -212,7 +178,11 @@ on the Mac.
<DD> Machine-independent modules in Python. <DD> Machine-independent modules in Python.
<DT> Lib:lib-dynload <DT> Lib:lib-dynload
<DD> This is where the Classic and Carbon dynamically-loaded plugin modules live. <DD> This is where the dynamically-loaded plugin modules live.
<DT> Lib:plat-mac
<DD> This is where most of the Mac-specific modules live. The modules here
are available both in MacPython-OS9 and MacPython-OSX.
<DT> Objects <DT> Objects
<DD> Machine-independent code for various object types. Most of these are <DD> Machine-independent code for various object types. Most of these are
@ -235,13 +205,13 @@ readme files, but more documentation is sorely needed.
</DL> </DL>
All the mac-specific stuff lives in the <code>Mac</code> folder: The mac-specific stuff lives in the <code>Mac</code> folder:
<DL> <DL>
<DT> Build <DT> Build
<DD> This is where the project files live and where you build the <DD> This is where the project files live and where you build the
libraries, shared libraries, executables and plugin modules. All the libraries, shared libraries, executables and plugin modules. All the
resulting binaries, except for intermedeate results, are deposited in resulting binaries, except for intermedeate results, are deposited in
the toplevel folder or the Mac:PlugIns folder (for plugin modules). the toplevel folder or the :Lib:lib-dynload folder (for plugin modules).
<DT> Compat <DT> Compat
<DD> Unix-compatability routines. Most of these are not used anymore, <DD> Unix-compatability routines. Most of these are not used anymore,
@ -255,9 +225,8 @@ these if you are trying to build a non-GUSI python.
<DD> Mac-specific but compiler-independent include files. <DD> Mac-specific but compiler-independent include files.
<DT> Lib <DT> Lib
<DD> Mac-specific standard modules. The <code>Carbon</code> package <DD> MacPython-OS9 specific standard modules which are not shared with
contains modules specifically needed with various MacOS toolbox MacPython-OSX.
interface modules, both for Carbon and classic PPC, despite the name.
<DT> Modules <DT> Modules
<DD> Mac-specific builtin modules. Theoretically these are all <DD> Mac-specific builtin modules. Theoretically these are all
@ -285,12 +254,10 @@ possibly changing the list of files included in the project window, of
course). course).
<DT> OSX <DT> OSX
<DD> Specific to unix-Python (also known as MachoPython) on OSX, not used <DD> Specific to MacPython-OSX, not used by MacPython-OS9.
by MacPython.
<DT> OSXResources <DT> OSXResources
<DD> Specific to unix-Python (also known as MachoPython) on OSX, not used <DD> Specific to MacPython-OSX, not used by MacPython-OS9.
by MacPython.
<DT> Python <DT> Python
<DD> Mac-specific parts of the core interpreter. <DD> Mac-specific parts of the core interpreter.
@ -316,33 +283,36 @@ but for more control over the freezing process you can run the main script here.
</DL> </DL>
<H2>Building the PPC interpreter</H2> <H2>Building the PPC interpreter</H2>
<em>This is different since 2.1. You are best off using the fullbuild.py
script, see <a href="#fullbuild">below</a>. </em><p>
First you optionally build the external libraries with buildlibs.prj. Next, First you optionally build the external libraries with buildlibs.prj. <p>
the projects for
interpreter and core library are linked together, so Then, the <code>fullbuild</code> script can be used to build
building the PythonInterpreterClassic and/or PythonInterpreterCarbon target everything, but you need a fully-functional interpreter before you can
use it (and one that isn't rebuilt in the process: you cannot rebuild
a running program). You could copy the interpreter to a different
place and use that to run fullbuild. The <code>PythonStandSmall.prj</code>
project builds an interpreter that is suited to this, and it can also come
in handy if you need to debug things (which is easier in a static program). <p>
In case you want to build by hand, or in case the <code>fullbuild</code>
script does not work, here is a breakdown of the various projects. <p>
The projects for interpreter and core library are linked together, so
building the PythonInterpreter target
in <code>PythonInterpreter.prj</code> in <code>PythonInterpreter.prj</code>
will result in everything being built. The result, however, is an "Application will result in the whole core being built, but not the extension modules. <p>
template", (filetype Atmp). If you don't use fullbuild you can manually
turn either of these into an interpreter by copying it to PythonInterpreter
and setting the filetype to APPL (with ResEdit or some such). <p>
Fullbuild does this for you, and the Atmp files is also how ConfigurePythonCarbon
and ConfigurePythonClassic work their magic. <p>
You will get about 100 warnings on "missing prototype" for the various module init You will get about 100 warnings on "missing prototype" for the various module init
routines, ignore these. You will also get numerous warnings on functions from GUSI which routines, ignore these. You will also get numerous warnings on functions from GUSI which
override functions from MSL, ignore these too. <p> override functions from MSL, ignore these too. <p>
For completeness sake here is a breakdown of the projects: Here is a breakdown of the projects:
<DL> <DL>
<DT> PythonCore <DT> PythonCore
<DD> The shared library that contains the bulk of the interpreter and <DD> The shared library that contains the bulk of the interpreter and
its resources. It has targets for PythonCore and PythonCoreCarbon. its resources.
It is a good idea to immedeately put an alias to this It is a good idea to immedeately put an alias to this
shared library in the <code>Extensions</code> folder of your system shared library in the <code>Extensions</code> folder of your system
folder. Do exactly that: put an <em>alias</em> there, copying or folder. Do exactly that: put an <em>alias</em> there, copying or
@ -352,11 +322,7 @@ will also do this. <br>
<DT> PythonInterpeter <DT> PythonInterpeter
<DD> The interpreter. This is basically a routine to call out to the <DD> The interpreter. This is basically a routine to call out to the
shared library. Unlike in previous releases the same program is used for shared library. <p>
creating applets (for which formerly PythonApplet was used). There are 4 targets
in here: two for the classic and carbon templates (which are normally used, and
converted to PythonInterpreter by the ConfigurePython* applets) and two
for PythonInterpreter in it's classic and carbon version.<p>
<DT> Plugin projects <DT> Plugin projects
<DD> Each plugin module has a separate project, and these can be rebuilt on <DD> Each plugin module has a separate project, and these can be rebuilt on
@ -378,18 +344,6 @@ Finally, you must build the standard applets:
fullbuild does this for you, but you can also manually drag/drop them onto fullbuild does this for you, but you can also manually drag/drop them onto
BuildApplet. <p> BuildApplet. <p>
<BLOCKQUOTE>
<a name="fullbuild"></a>
The <code>fullbuild</code> script can be used to build
everything, but you need a fully-functional interpreter before you can
use it (and one that isn't rebuilt in the process: you cannot rebuild
a running program). You could copy the interpreter to a different
place and use that to run fullbuild. The <code>PythonStandSmall.prj</code>
project builds an interpreter that is suited to this, and it can also come
in handy if you need to debug things (which is easier in a static program). <p>
</BLOCKQUOTE>
You are all set now, and should read the release notes and You are all set now, and should read the release notes and
<code>ReadMe</code> file from the <code>Mac</code> folder. <code>ReadMe</code> file from the <code>Mac</code> folder.
@ -411,16 +365,10 @@ also set (in the "binary files" section) "use mac encoding:
applesingle" and (in the "text files" section) "use ISO latin 1 applesingle" and (in the "text files" section) "use ISO latin 1
conversion". <p> conversion". <p>
<blockquote> It is a good idea to disable Quicktime Exchange in the Quicktime control
There is one group of people for whom MacCVS is not the best choice: people with panel if you are on OS9 or before. Quicktime Exchange will magically map
checkin rights to the Python repository. You will have to use MacCVS Pro some extensions to filetypes, and this can seriously hinder you if, for
(completely unrelated) from www.maccvs.org, because it has working SSH support. instance, <code>.bmp</code> is not a Windows bitmap file. <p>
</blockquote>
It is a good idea to disable Quicktime Exchange in the Quicktime
control panel. Quicktime Exchange will magically map some extensions to
filetypes, and this can seriously hinder you if, for instance, <code>.bmp</code>
is not a Windows bitmap file. <p>
The Python sources are checked out from the main The Python sources are checked out from the main
Python CVS archive on sourceforge.net, see the <a Python CVS archive on sourceforge.net, see the <a
@ -435,7 +383,7 @@ The CVS repository does not contain all the projects for the plugin modules,
these are built with <code>fullbuild.py</code> normally. For this reason these are built with <code>fullbuild.py</code> normally. For this reason
it is probably a good idea to first build <code>PythonStandSmall.prj</code>, it is probably a good idea to first build <code>PythonStandSmall.prj</code>,
which builds a fairly minimal interpreter, and then follow the which builds a fairly minimal interpreter, and then follow the
<a href="#fullbuild">fullbuild instructions</a>. fullbuild instructions</a>.
<H2>Odds and ends</H2> <H2>Odds and ends</H2>
@ -446,7 +394,8 @@ Some remarks that I could not fit in elsewhere:
<LI> It may be possible to use the <code>PythonCore</code> shared <LI> It may be possible to use the <code>PythonCore</code> shared
library to embed Python in another program, if your program can live library to embed Python in another program, if your program can live
with using GUSI for I/O. Use PythonCore in stead of your MSL C library with using GUSI for I/O. Use PythonCore in stead of your MSL C library
(or, at the very least, link it before the normal C library). (or, at the very least, link it before the normal C library). Ask for help
on PythonMac-SIG if you have problems with this.
<LI> <a name="extending"></a>It is possible to build PPC extension <LI> <a name="extending"></a>It is possible to build PPC extension
modules without building a complete Python. The binary distribution modules without building a complete Python. The binary distribution

View File

@ -2,6 +2,7 @@
(':BeOS', None) (':BeOS', None)
(':BuildApplet', None) (':BuildApplet', None)
(':BuildApplication', None) (':BuildApplication', None)
(':ConfigurePython', '')
(':Demo', '') (':Demo', '')
(':Demo:cwilib', None) (':Demo:cwilib', None)
(':Demo:embed', None) (':Demo:embed', None)
@ -111,7 +112,6 @@
(':Mac:Contrib:PythonDetector:OpenPythonLib with NS', '') (':Mac:Contrib:PythonDetector:OpenPythonLib with NS', '')
(':Mac:Contrib:PythonDetector:PythonDetector', '') (':Mac:Contrib:PythonDetector:PythonDetector', '')
(':Mac:Contrib:PythonDetector:readme.txt', '') (':Mac:Contrib:PythonDetector:readme.txt', '')
(':Mac:Contrib:PythonScript', '')
(':Mac:Contrib:Sherlock', '') (':Mac:Contrib:Sherlock', '')
(':Mac:Contrib:Tabcleaner', '') (':Mac:Contrib:Tabcleaner', '')
(':Mac:Contrib:mpwsystem', '') (':Mac:Contrib:mpwsystem', '')
@ -138,7 +138,6 @@
(':Mac:ReadMe-src', None) (':Mac:ReadMe-src', None)
(':Mac:ReadMe~0', None) (':Mac:ReadMe~0', None)
(':Mac:ReadmeSource', None) (':Mac:ReadmeSource', None)
(':Mac:Relnotes', ':Relnotes:')
(':Mac:Resources', None) (':Mac:Resources', None)
(':Mac:TODO', None) (':Mac:TODO', None)
(':Mac:Tools:CGI', '') (':Mac:Tools:CGI', '')
@ -168,6 +167,7 @@
(':Python:Icon', None) (':Python:Icon', None)
(':PythonCarbonStandalone', None) (':PythonCarbonStandalone', None)
(':PythonCoreCarbon', '') (':PythonCoreCarbon', '')
(':PythonInterpreter', '')
(':PythonStandCarbon', None) (':PythonStandCarbon', None)
(':PythonStandSmall', None) (':PythonStandSmall', None)
(':PythonStandSmallCarbon', None) (':PythonStandSmallCarbon', None)
@ -205,5 +205,3 @@
(':pystone.py', None) (':pystone.py', None)
(':setup.py', None) (':setup.py', None)
(':site-packages', None) (':site-packages', None)
(':ConfigurePython', '')
(':PythonInterpreter', '')

View File

@ -5,12 +5,14 @@
*.dbg *.dbg
*.hqx *.hqx
*.idb *.idb
*.pch
*.pyc *.pyc
*.pyo *.pyo
*.slb *.slb
*.xMAP *.xMAP
*.xSYM *.xSYM
*Icon *Icon
*_pch
*~[0-9] *~[0-9]
.#* .#*
.DS_Store .DS_Store
@ -18,5 +20,3 @@
@* @*
CVS CVS
[(]*[)] [(]*[)]
*.pch
*_pch

View File

@ -6,7 +6,6 @@
(':ConfigurePythonClassic', None) (':ConfigurePythonClassic', None)
(':Demo', None) (':Demo', None)
(':Demo:embed', ':Demo:embed') (':Demo:embed', ':Demo:embed')
(':Demo:extend', ':Demo:extend')
(':Demo:pysvr', ':Demo:pysvr') (':Demo:pysvr', ':Demo:pysvr')
(':Doc', None) (':Doc', None)
(':EditPythonPrefs', None) (':EditPythonPrefs', None)
@ -70,16 +69,10 @@
(':Mac:Build:PythonInterpreter.mcp', None) (':Mac:Build:PythonInterpreter.mcp', None)
(':Mac:Build:PythonInterpreter.old.mcp', None) (':Mac:Build:PythonInterpreter.old.mcp', None)
(':Mac:Build:PythonStandSmall.mcp', None) (':Mac:Build:PythonStandSmall.mcp', None)
(':Mac:Build:PythonStandSmall.mcp~0', None)
(':Mac:Build:PythonStandSmall.mcp~1', None)
(':Mac:Build:PythonStandSmall.old.mcp', None) (':Mac:Build:PythonStandSmall.old.mcp', None)
(':Mac:Build:PythonStandalone.mcp', None) (':Mac:Build:PythonStandalone.mcp', None)
(':Mac:Build:PythonStandalone.mcp~0', None)
(':Mac:Build:PythonStandalone.mcp~1', None)
(':Mac:Build:Qt.carbon.mcp.exp', None) (':Mac:Build:Qt.carbon.mcp.exp', None)
(':Mac:Build:Qt.carbon.mcp.xml~0', None)
(':Mac:Build:Qt.mcp.exp', None) (':Mac:Build:Qt.mcp.exp', None)
(':Mac:Build:Qt.mcp.xml~0', None)
(':Mac:Build:Snd.carbon.mcp.exp', None) (':Mac:Build:Snd.carbon.mcp.exp', None)
(':Mac:Build:Snd.carbon.mcp.xml', None) (':Mac:Build:Snd.carbon.mcp.xml', None)
(':Mac:Build:Snd.mcp.exp', None) (':Mac:Build:Snd.mcp.exp', None)
@ -98,6 +91,9 @@
(':Mac:Build:_AE.mcp', None) (':Mac:Build:_AE.mcp', None)
(':Mac:Build:_AE.mcp.exp', None) (':Mac:Build:_AE.mcp.exp', None)
(':Mac:Build:_AE.mcp.xml', None) (':Mac:Build:_AE.mcp.xml', None)
(':Mac:Build:_AH.carbon.mcp', None)
(':Mac:Build:_AH.carbon.mcp.exp', None)
(':Mac:Build:_AH.carbon.mcp.xml', None)
(':Mac:Build:_App.carbon.mcp', None) (':Mac:Build:_App.carbon.mcp', None)
(':Mac:Build:_App.carbon.mcp.exp', None) (':Mac:Build:_App.carbon.mcp.exp', None)
(':Mac:Build:_App.carbon.mcp.xml', None) (':Mac:Build:_App.carbon.mcp.xml', None)
@ -149,9 +145,15 @@
(':Mac:Build:_Fm.mcp', None) (':Mac:Build:_Fm.mcp', None)
(':Mac:Build:_Fm.mcp.exp', None) (':Mac:Build:_Fm.mcp.exp', None)
(':Mac:Build:_Fm.mcp.xml', None) (':Mac:Build:_Fm.mcp.xml', None)
(':Mac:Build:_Help.carbon.mcp', None)
(':Mac:Build:_Help.carbon.mcp.exp', None)
(':Mac:Build:_Help.carbon.mcp.xml', None)
(':Mac:Build:_Help.mcp', None) (':Mac:Build:_Help.mcp', None)
(':Mac:Build:_Help.mcp.exp', None) (':Mac:Build:_Help.mcp.exp', None)
(':Mac:Build:_Help.mcp.xml', None) (':Mac:Build:_Help.mcp.xml', None)
(':Mac:Build:_IBCarbon.carbon.mcp', None)
(':Mac:Build:_IBCarbon.carbon.mcp.exp', None)
(':Mac:Build:_IBCarbon.carbon.mcp.xml', None)
(':Mac:Build:_Icn.carbon.mcp', None) (':Mac:Build:_Icn.carbon.mcp', None)
(':Mac:Build:_Icn.carbon.mcp.exp', None) (':Mac:Build:_Icn.carbon.mcp.exp', None)
(':Mac:Build:_Icn.carbon.mcp.xml', None) (':Mac:Build:_Icn.carbon.mcp.xml', None)
@ -291,6 +293,9 @@
(':Mac:Build:pyexpat.mcp', None) (':Mac:Build:pyexpat.mcp', None)
(':Mac:Build:pyexpat.mcp.exp', None) (':Mac:Build:pyexpat.mcp.exp', None)
(':Mac:Build:pyexpat.mcp.xml', None) (':Mac:Build:pyexpat.mcp.xml', None)
(':Mac:Build:pygusiconfig.carbon.lib', None)
(':Mac:Build:pygusiconfig.smcarbon.lib', None)
(':Mac:Build:temp_delete_me', None)
(':Mac:Build:waste.carbon.mcp', None) (':Mac:Build:waste.carbon.mcp', None)
(':Mac:Build:waste.carbon.mcp.exp', None) (':Mac:Build:waste.carbon.mcp.exp', None)
(':Mac:Build:waste.carbon.mcp.xml', None) (':Mac:Build:waste.carbon.mcp.xml', None)
@ -300,15 +305,9 @@
(':Mac:Build:xx.carbon.mcp', '') (':Mac:Build:xx.carbon.mcp', '')
(':Mac:Build:xx.carbon.mcp.exp', '') (':Mac:Build:xx.carbon.mcp.exp', '')
(':Mac:Build:xx.carbon.mcp.xml', '') (':Mac:Build:xx.carbon.mcp.xml', '')
(':Mac:Build:xx.mcp', '')
(':Mac:Build:xx.mcp.exp', '')
(':Mac:Build:xx.mcp.xml', None)
(':Mac:Build:xxsubtype.carbon.mcp', None) (':Mac:Build:xxsubtype.carbon.mcp', None)
(':Mac:Build:xxsubtype.carbon.mcp.exp', None) (':Mac:Build:xxsubtype.carbon.mcp.exp', None)
(':Mac:Build:xxsubtype.carbon.mcp.xml', None) (':Mac:Build:xxsubtype.carbon.mcp.xml', None)
(':Mac:Build:xxsubtype.mcp', None)
(':Mac:Build:xxsubtype.mcp.exp', None)
(':Mac:Build:xxsubtype.mcp.xml', None)
(':Mac:Build:zlib.carbon.mcp', None) (':Mac:Build:zlib.carbon.mcp', None)
(':Mac:Build:zlib.carbon.mcp.exp', None) (':Mac:Build:zlib.carbon.mcp.exp', None)
(':Mac:Build:zlib.carbon.mcp.xml', None) (':Mac:Build:zlib.carbon.mcp.xml', None)
@ -372,6 +371,7 @@
(':Mac:Lib', None) (':Mac:Lib', None)
(':Mac:MPW', None) (':Mac:MPW', None)
(':Mac:Modules', None) (':Mac:Modules', None)
(':Mac:OSX', None)
(':Mac:OSX:Makefile', None) (':Mac:OSX:Makefile', None)
(':Mac:OSX:README', None) (':Mac:OSX:README', None)
(':Mac:OSX:README.macosx.txt', None) (':Mac:OSX:README.macosx.txt', None)
@ -394,6 +394,7 @@
(':Mac:Resources:gusiprefs.rsrc', None) (':Mac:Resources:gusiprefs.rsrc', None)
(':Mac:Resources:pythonpath.r', '') (':Mac:Resources:pythonpath.r', '')
(':Mac:Resources:tkpython.rsrc', None) (':Mac:Resources:tkpython.rsrc', None)
(':Mac:Resources:tkpython.rsrc-', None)
(':Mac:Resources:version.r', None) (':Mac:Resources:version.r', None)
(':Mac:TODO', None) (':Mac:TODO', None)
(':Mac:Tools:BBPy', None) (':Mac:Tools:BBPy', None)
@ -415,6 +416,7 @@
(':Mac:mwerks:mwerks_carbonNOGUSI_config.h', None) (':Mac:mwerks:mwerks_carbonNOGUSI_config.h', None)
(':Mac:mwerks:mwerks_nscarbon_config.h', '') (':Mac:mwerks:mwerks_nscarbon_config.h', '')
(':Mac:mwerks:mwerks_shcarbon_config.h', '') (':Mac:mwerks:mwerks_shcarbon_config.h', '')
(':Mac:mwerks:mwerks_smcarbon_config.h', '')
(':Mac:mwerks:mwerks_thrcarbonsm_config.h', None) (':Mac:mwerks:mwerks_thrcarbonsm_config.h', None)
(':Mac:mwerks:mwerks_threadsmall_config.h', '') (':Mac:mwerks:mwerks_threadsmall_config.h', '')
(':Mac:mwerks:mwerks_tkplugin_config.h', ':Mac:mwerks:') (':Mac:mwerks:mwerks_tkplugin_config.h', ':Mac:mwerks:')
@ -440,6 +442,7 @@
(':Modules:_hotshot.c', None) (':Modules:_hotshot.c', None)
(':Modules:_localemodule.c', None) (':Modules:_localemodule.c', None)
(':Modules:_sre.c', None) (':Modules:_sre.c', None)
(':Modules:_ssl.c', None)
(':Modules:_testcapimodule.c', None) (':Modules:_testcapimodule.c', None)
(':Modules:_tkinter.c', None) (':Modules:_tkinter.c', None)
(':Modules:_weakref.c', None) (':Modules:_weakref.c', None)
@ -466,6 +469,7 @@
(':Modules:dbmmodule.c', None) (':Modules:dbmmodule.c', None)
(':Modules:dlmodule.c', None) (':Modules:dlmodule.c', None)
(':Modules:errnomodule.c', None) (':Modules:errnomodule.c', None)
(':Modules:expat', None)
(':Modules:fcntlmodule.c', None) (':Modules:fcntlmodule.c', None)
(':Modules:flmodule.c', None) (':Modules:flmodule.c', None)
(':Modules:fmmodule.c', None) (':Modules:fmmodule.c', None)
@ -518,6 +522,7 @@
(':Modules:shamodule.c', None) (':Modules:shamodule.c', None)
(':Modules:signalmodule.c', None) (':Modules:signalmodule.c', None)
(':Modules:socketmodule.c', None) (':Modules:socketmodule.c', None)
(':Modules:socketmodule.h', None)
(':Modules:soundex.c', None) (':Modules:soundex.c', None)
(':Modules:sre.h', None) (':Modules:sre.h', None)
(':Modules:sre_constants.h', None) (':Modules:sre_constants.h', None)
@ -582,6 +587,7 @@
(':Tools:bgen', '') (':Tools:bgen', '')
(':Tools:compiler', None) (':Tools:compiler', None)
(':Tools:faqwiz', None) (':Tools:faqwiz', None)
(':Tools:framer', None)
(':Tools:freeze', '') (':Tools:freeze', '')
(':Tools:i18n', None) (':Tools:i18n', None)
(':Tools:idle', None) (':Tools:idle', None)
@ -605,24 +611,21 @@
(':readmefiles', None) (':readmefiles', None)
(':setup.py', None) (':setup.py', None)
(':site-packages', None) (':site-packages', None)
(':Mac:Build:_IBCarbon.carbon.mcp.xml', None) (':Mac:Build:_Folder.carbon.mcp.xml', None)
(':Mac:Build:_IBCarbon.carbon.mcp.exp', None) (':Mac:Build:_Folder.carbon.mcp.exp', None)
(':Mac:Build:_IBCarbon.carbon.mcp', None) (':Mac:Build:_Folder.carbon.mcp', None)
(':Mac:Build:_Help.carbon.mcp.xml', None) (':Mac:Build:_File.carbon.mcp.xml', None)
(':Mac:Build:_Help.carbon.mcp.exp', None) (':Mac:Build:_File.carbon.mcp.exp', None)
(':Mac:Build:_Help.carbon.mcp', None) (':Mac:Build:_File.carbon.mcp', None)
(':Mac:Build:_AH.carbon.mcp.xml', None) (':Mac:Build:_Alias.carbon.mcp.xml', None)
(':Mac:Build:_AH.carbon.mcp.exp', None) (':Mac:Build:_Alias.carbon.mcp.exp', None)
(':Mac:Build:_AH.carbon.mcp', None) (':Mac:Build:_Alias.carbon.mcp', None)
(':Mac:Build:temp_delete_me', None) (':Modules:zipimport.c', None)
(':Mac:Build:pygusiconfig.smcarbon.lib', None) (':Modules:ossaudiodev.c', None)
(':Mac:Build:pygusiconfig.carbon.lib', None) (':Modules:datetimemodule.c', None)
(':Mac:mwerks:mwerks_carbonpyexpat_config.h', '') (':Modules:bz2module.c', None)
(':Mac:mwerks:mwerks_pyexpat_config.h', '') (':Modules:_randommodule.c', None)
(':Mac:mwerks:mwerks_smcarbon_config.h', '') (':Modules:_bsddb.c', None)
(':Mac:OSX', None) (':Mac:Build:datetime.carbon.mcp.xml', None)
(':Modules:_ssl.c', None) (':Mac:Build:datetime.carbon.mcp.exp', None)
(':Modules:socketmodule.h', None) (':Mac:Build:datetime.carbon.mcp', None)
(':Mac:Resources:tkpython.rsrc-', None)
(':Modules:expat', None)
(':Tools:framer', None)

View File

@ -2,18 +2,17 @@ How to make a Python-distribution.
---------------------------------- ----------------------------------
These notes are mainly for myself, or for whoever tries to make a MacPython These notes are mainly for myself, or for whoever tries to make a MacPython
distribution when I'm fed up with it. They were last updated for 2.2b1. distribution when I'm fed up with it. They were last updated for 2.3a1.
- Increase fragment version number in PythonCore and PythonCoreCarbon. - Increase fragment version number in PythonCore and PythonCoreCarbon.
the fragment number is Python's sys.hexversion, it should be set in the the fragment number is Python's sys.hexversion, it should be set in the
"PEF" preferences. "PEF" preferences.
- Increase version number in _versioncheck.py - Increase version number in _versioncheck.py
- Build PythonStandSmall, run once in root folder - Build PythonStandSmall, run once in root folder
- Update Relnotes, readme's, Demo:build.html - Update NEWS, readme's, Demo:build.html
- Make sure tkresources.rsrc is up-to-date
- fullbuild everything with increase-buildno - fullbuild everything with increase-buildno
- Test both classic and Carbon with test.regrtest - Test with test.regrtest
- Update Numeric and build/install it both with Classic and with Carbon python - Update Numeric and build/install it
- Recompile OSAm and possibly other Contrib stuff - Recompile OSAm and possibly other Contrib stuff
- mkdistr binary.include - mkdistr binary.include
- mkdistr dev.include - mkdistr dev.include
@ -33,8 +32,7 @@ distribution when I'm fed up with it. They were last updated for 2.2b1.
Only the :Lib:plat-xxxx should be missing. Otherwise go back to Installer Vise and Only the :Lib:plat-xxxx should be missing. Otherwise go back to Installer Vise and
add the missing stuff. Make sure of all settings for the new files (esp. "where" add the missing stuff. Make sure of all settings for the new files (esp. "where"
and "gestalt" are easy to miss). and "gestalt" are easy to miss).
- test on virgin systems (OSX, OS9, OS8 without Carbon). Make sure to test - test on virgin systems (both OS9 and OSX).
tkinter too.
- Remove the local installation so you don't get confused by it. - Remove the local installation so you don't get confused by it.
- checkin everything except PythonX.Y.vct. - checkin everything except PythonX.Y.vct.
- mkdistr src.include - mkdistr src.include

View File

@ -8,6 +8,7 @@
*.in *.in
*.lib *.lib
*.pyc *.pyc
*.pyo
*.slb *.slb
*.xMAP *.xMAP
*.xSYM *.xSYM
@ -19,4 +20,3 @@ CVS
Makefile.pre.in Makefile.pre.in
PyIDE-src PyIDE-src
[(]*[)] [(]*[)]
*.pyo

View File

@ -1,3 +1,4 @@
(':.DS_Store', None)
(':BeOS', None) (':BeOS', None)
(':BuildApplet', None) (':BuildApplet', None)
(':BuildApplication', None) (':BuildApplication', None)
@ -11,12 +12,7 @@
(':Extensions:Imaging', None) (':Extensions:Imaging', None)
(':Extensions:Pmw', None) (':Extensions:Pmw', None)
(':Extensions:PyDOM', None) (':Extensions:PyDOM', None)
(':Extensions:README', '')
(':Extensions:README.TOO', '')
(':Extensions:audio', None) (':Extensions:audio', None)
(':Extensions:example', '')
(':Extensions:example2', '')
(':Extensions:example3', '')
(':Extensions:img', '') (':Extensions:img', '')
(':Extensions:midi', None) (':Extensions:midi', None)
(':Extensions:pyexpat', None) (':Extensions:pyexpat', None)
@ -29,6 +25,7 @@
(':Include', '') (':Include', '')
(':LICENSE', '') (':LICENSE', '')
(':Lib', '') (':Lib', '')
(':Mac:.DS_Store', None)
(':Mac:Build', '') (':Mac:Build', '')
(':Mac:Build:PythonAppletCFM68K', None) (':Mac:Build:PythonAppletCFM68K', None)
(':Mac:Build:PythonAppletPPC', None) (':Mac:Build:PythonAppletPPC', None)
@ -41,6 +38,7 @@
(':Mac:Compat', '') (':Mac:Compat', '')
(':Mac:Contrib', '') (':Mac:Contrib', '')
(':Mac:Demo', '') (':Mac:Demo', '')
(':Mac:Distributions:(vise)', None)
(':Mac:Distributions:68k-shared.exclude', None) (':Mac:Distributions:68k-shared.exclude', None)
(':Mac:Distributions:68k-shared.include', None) (':Mac:Distributions:68k-shared.include', None)
(':Mac:Distributions:68k-stand.exclude', None) (':Mac:Distributions:68k-stand.exclude', None)
@ -67,7 +65,6 @@
(':Mac:ReadMe', '') (':Mac:ReadMe', '')
(':Mac:ReadMe-dev', None) (':Mac:ReadMe-dev', None)
(':Mac:ReadMe-src', ':ReadMe-src') (':Mac:ReadMe-src', ':ReadMe-src')
(':Mac:Relnotes', ':Relnotes:')
(':Mac:Resources', '') (':Mac:Resources', '')
(':Mac:TODO', None) (':Mac:TODO', None)
(':Mac:Tools:CGI', '') (':Mac:Tools:CGI', '')
@ -77,20 +74,17 @@
(':Mac:Tools:PyIDE', None) (':Mac:Tools:PyIDE', None)
(':Mac:Tools:bruce', None) (':Mac:Tools:bruce', None)
(':Mac:Tools:macfreeze', '') (':Mac:Tools:macfreeze', '')
(':Mac:Unsupported', '')
(':Mac:Wastemods', '') (':Mac:Wastemods', '')
(':Mac:_checkversion.py', None) (':Mac:_checkversion.py', None)
(':Mac:mwerks', '') (':Mac:mwerks', '')
(':Mac:mwerks:old', None) (':Mac:mwerks:old', None)
(':Mac:mwerks:projects', None) (':Mac:mwerks:projects', None)
(':Mac:scripts', '') (':Mac:scripts', '')
(':Mac:tclmods', '')
(':Misc', '') (':Misc', '')
(':Modules', '') (':Modules', '')
(':Objects', '') (':Objects', '')
(':PC', None) (':PC', None)
(':PCbuild', None) (':PCbuild', None)
(':PLAN.txt', '')
(':Parser', '') (':Parser', '')
(':PlugIns', None) (':PlugIns', None)
(':Python', '') (':Python', '')
@ -141,4 +135,4 @@
(':pystone.py', None) (':pystone.py', None)
(':setup.py', None) (':setup.py', None)
(':site-packages', None) (':site-packages', None)
(':Mac:Distributions:(vise)', None) (':Tools:framer', '')

View File

@ -1 +1 @@
#define BUILD 144 #define BUILD 148

View File

@ -218,16 +218,21 @@ mac_fdopen(self, args)
{ {
extern int fclose(FILE *); extern int fclose(FILE *);
int fd; int fd;
char *mode; char *mode = "r";
int bufsize = -1;
FILE *fp; FILE *fp;
if (!PyArg_ParseTuple(args, "is", &fd, &mode)) PyObject *f;
if (!PyArg_ParseTuple(args, "i|si", &fd, &mode, &bufsize))
return NULL; return NULL;
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
fp = fdopen(fd, mode); fp = fdopen(fd, mode);
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
if (fp == NULL) if (fp == NULL)
return mac_error(); return mac_error();
return PyFile_FromFile(fp, "(fdopen)", mode, fclose); f = PyFile_FromFile(fp, "<fdopen>", mode, fclose);
if (f != NULL)
PyFile_SetBufSize(f, bufsize);
return f;
} }
#endif #endif

View File

@ -489,7 +489,10 @@ PyMac_Main(int argc, char **argv, char *filename)
Py_Initialize(); Py_Initialize();
#if 0
/* According to Martin v. Loewis this is a bad idea... */
PyUnicode_SetDefaultEncoding(PyMac_getscript()); PyUnicode_SetDefaultEncoding(PyMac_getscript());
#endif
PySys_SetArgv(argc, argv); PySys_SetArgv(argc, argv);

View File

@ -1,19 +1,25 @@
How to install Python 2.2.1 on your Macintosh How to install MacPython-OS9 2.3a1 on your Macintosh
--------------------------------------------- ----------------------------------------------------
This is a MacPython that can run on classic MacOS (from 8.1 This is a MacPython that can run on Mac OS 8.6 with CarbonLib
onwards) and natively on MacOSX. The installer tries to work out whether you can installed, Mac OS 9 and Mac OS X. It is the direct successor of MacPython 2.2.
use the Carbon version or not. For Mac OS X users: this version of Python
does not run from the command line, it is a pure "Mac only" app. Use the standard
unix Python from the commandline, the two Pythons will be merged in the future.
You should definitely read the Relnotes file too, and the section below about For Mac OS X users: you are probably better off with the normal unix distribution
toolbox module reorganization. You should also read :Misc:NEWS, which lists of Python. That version also runs from the commandline, and if you do a framework
the general (non-mac-dependent) new features of this Python release. build it will contain all the functionality of this version too. A prebuilt
version will be available starting with the beta distributions.
A special note about the active installer: do not background it, it may hang If you are upgrading from a previous MacPython you should read :Misc:NEWS,
your machine. This is a general problem with Vise active installers, MindVision which lists the new features of this Python release. As of this release
are working on it. the Mac-specific release notes have been moved to the "Mac" section of
the general NEWS file.
Two changes since 2.2 deserve special mention:
- Most Mac-specific modules have moved to :Lib:plat-mac. :Mac:Lib now contains
only modules that are not shared with MacPython-OSX 2.3.
- macfs is now a pure Python wrapper module around various modules in the
Carbon package. For 2.3a1 only this wrapping is incomplete: fsspec.SetDates()
does not work yet. If you encounter any other problems please report them.
------ ------
@ -28,10 +34,8 @@ Mac-specific documentation is included in this distribution in folder
Mac:Demo. The documentation is sparse, but it will have to serve for Mac:Demo. The documentation is sparse, but it will have to serve for
now. The documentation is in HTML format, start with index.html. now. The documentation is in HTML format, start with index.html.
This installer installs MacPython for classic PPC MacOS, MacPython for Carbon If you want a MacPython that runs on systems without Carbon support (8.1
(OS X, OS 9 or OS 8 with CarbonLib installed) or both, depending on your up to 8.6 without CarbonLib) you should get MacPython 2.2.2.
configuration. By selecting custom install you can bypass these tests and
install what you want.
If you want 68k support you will have get MacPython 1.5.2. If you want 68k support you will have get MacPython 1.5.2.
@ -39,29 +43,20 @@ What to install
--------------- ---------------
The optional parts in this distribution are The optional parts in this distribution are
- TK+PIL: Tkinter and support modules, plus Imaging, the Python image - PIL: the Python image manipulation package (allows you to read, write
manipulation package (allows you to read, write and display images and and display images and do lots of operations on them). Tkinter is no
do lots of operations on them). longer supported, a working Carbon version is Tk is not available.
For Carbon MacPython you only get PIL: there is no Tcl/Tk for Carbon yet.
This is the reason Classic MacPython is also installed on MacOSX: it
allows you to run Tkinter applications, albeit in the Classic box.
- img: another imaging package. Has more file format support and is faster - img: another imaging package. Has more file format support and is faster
than imaging, but has only limited operations on images. There is a bridge than imaging, but has only limited operations on images. There is a bridge
between the packages. between the packages.
- Numeric: the LLNL Numeric Python extension. All sorts of nifty operations - Numeric: the LLNL Numeric Python extension. All sorts of nifty operations
on matrices and such. This is the most recent version from the on matrices and such. This is version 22.
sourceforge archive.
Numeric has moved from Extensions to :Lib:site-python, by the way,
see the release notes.
- Developers kit: all header files and some tools and sample projects - Developers kit: all header files and some tools and sample projects
to get you started on writing Python extensions if you have CodeWarrior. to get you started on writing Python extensions if you have CodeWarrior.
All these except the DevKit are installed with Easy Install. All these except the DevKit are installed with Easy Install.
After the installer finishes it automatically launches the appropriate After the installer finishes it automatically launches the
ConfigurePython applet, to finish configuration of your Python. If you ConfigurePython applet, to finish configuration of your Python.
run MacOS9 or later (or 8 with CarbonLib installed) you can switch
back and forth between the classic and Carbon versions of Python by
running either ConfigurePythonClassic or ConfigurePythonCarbon.
Moving your Python installation after installing is generally not a Moving your Python installation after installing is generally not a
good idea. If you have to do this anyway you should remove your good idea. If you have to do this anyway you should remove your
@ -80,8 +75,10 @@ After installing
It is probably a good idea to run the automatic tests. Start It is probably a good idea to run the automatic tests. Start
Python and "import test.regrtest ; test.regrtest.main()". Python and "import test.regrtest ; test.regrtest.main()".
test_frozen will fail in MacPython because of different handling on test_httplib fails with an unexpected output error,
frozen modules. This should not be a problem in normal use. this problem is being investigated.
test_socket fails, this problem is being investigated.
Three tests will fail on MacOS9 with MemoryErrors: Three tests will fail on MacOS9 with MemoryErrors:
test_longexp, test_sha and test_zlib (on MacOSX these should pass). test_longexp, test_sha and test_zlib (on MacOSX these should pass).
@ -119,19 +116,19 @@ If you install as a privileged user and then try to run
Python as another (non-privileged) user you may encounter a problem with Python as another (non-privileged) user you may encounter a problem with
not having a preference file: the symptom is failing to import all sorts not having a preference file: the symptom is failing to import all sorts
of standard modules. If you remove your per-user Python preference files of standard modules. If you remove your per-user Python preference files
(in ~/Library/Preferences) and then run PythonIntpreter once everything should (in ~/Library/Preferences) and then run PythonInterpreter once everything should
be fine. be fine.
Uninstalling Uninstalling
------------ ------------
Up to three items are installed in the system folder: the interpreter shared Up to three items are installed in the MacOS 8 or 9 system folder: the interpreter
libraries PythonCore and PythonCoreCarbon live in the Extensions shared library PythonCore lives in the Extensions
folder and the "Python 2.2.1 Preferences" file in the Python subfolder folder and the "Python 2.3a1 Preferences" file in the Python subfolder
in the Preferences folder. All the rest of Python lives in the folder in the Preferences folder. All the rest of Python lives in the folder
you installed in. you installed in.
On OSX the libraries are installed in /Library/CFMSupport. The ConfigurePython On OSX the library is installed in /Library/CFMSupport. The ConfigurePython
applets will complain if you have no right to create the libraries there applets will complain if you have no right to create the libraries there
(you need Admin privileges). This has one consequence: you will not be able to (you need Admin privileges). This has one consequence: you will not be able to
run applets unless they reside in the MacPython folder (such as the IDE or run applets unless they reside in the MacPython folder (such as the IDE or
@ -143,12 +140,8 @@ Things to see
Start off at Mac:Demo:index.html. Read at least the first few sections. Start off at Mac:Demo:index.html. Read at least the first few sections.
There are also some interesting files in the "Relnotes" folder that may There is also a first stab at documentation (plus examples) in the
contain useful information. There is also a first stab at documentation Mac:Demo folder. The toplevel Demo folder has machine-independent demos.
(plus examples) in the Mac:Demo folder. The toplevel Demo folder has
machine-independent demos.
The Mac:Lib:test folder also has some programs that show simple
capabilities of various modules.
The ":Mac:scripts" folder has some sample scripts. Some are useful, The ":Mac:scripts" folder has some sample scripts. Some are useful,
some are just interesting to look at to see how various things some are just interesting to look at to see how various things
@ -175,11 +168,11 @@ this means you can keep your older version around if you are unsure
whether to upgrade. The bad news is that your old preference settings whether to upgrade. The bad news is that your old preference settings
are lost and you have to set them again. are lost and you have to set them again.
After you are satisfied that 2.2.1 works as expected you can trash After you are satisfied that 2.3a1 works as expected you can trash
anything in the system folder that has "python" in the name and not anything in the system folder that has "python" in the name and not
"2.2.1". "2.3a1".
The ConfigurePython... applets will try to detect incompatible The ConfigurePython applet will try to detect incompatible
preferences files and offer to remove them. This means that re-running preferences files and offer to remove them. This means that re-running
ConfigurePython after a second install of the same MacPython version ConfigurePython after a second install of the same MacPython version
(or after moving the Python folder) should fix things up correctly. (or after moving the Python folder) should fix things up correctly.

View File

@ -89,8 +89,9 @@ resource 'STR#' (PYTHONPATH_ID, "sys.path initialization") {
{ {
"$(PYTHON)", "$(PYTHON)",
"$(PYTHON):Lib", "$(PYTHON):Lib",
"$(PYTHON):Lib:plat-mac",
"$(PYTHON):Lib:lib-dynload", "$(PYTHON):Lib:lib-dynload",
"$(PYTHON):Lib:plat-mac",
"$(PYTHON):Lib:plat-mac:lib-scriptpackages",
"$(PYTHON):Mac:Lib", "$(PYTHON):Mac:Lib",
"$(PYTHON):Extensions:img:Mac", "$(PYTHON):Extensions:img:Mac",
"$(PYTHON):Extensions:img:Lib", "$(PYTHON):Extensions:img:Lib",

Binary file not shown.

Binary file not shown.

View File

@ -160,9 +160,8 @@ def main():
# Create the PythonCore alias(es) # Create the PythonCore alias(es)
MacOS.splash(SPLASH_COPYCORE) MacOS.splash(SPLASH_COPYCORE)
if verbose: if verbose:
print "Copying PythonCore..." print "Copying PythonCoreCarbon..."
n = 0 n = 0
n = n + mkcorealias('PythonCore', 'PythonCore')
n = n + mkcorealias('PythonCoreCarbon', 'PythonCoreCarbon') n = n + mkcorealias('PythonCoreCarbon', 'PythonCoreCarbon')
if n == 0: if n == 0:
from Carbon import Dlg from Carbon import Dlg
@ -170,32 +169,6 @@ def main():
if verbose: if verbose:
print "Warning: PythonCore not copied to Extensions folder" print "Warning: PythonCore not copied to Extensions folder"
print " (Applets will not work unless run from the Python folder)" print " (Applets will not work unless run from the Python folder)"
if sys.argv[0][-7:] == 'Classic':
do_classic = 1
elif sys.argv[0][-6:] == 'Carbon':
do_classic = 0
else:
print "I don't know the sys.argv[0] function", sys.argv[0]
if verbose:
print "Configure classic or carbon - ",
rv = string.strip(sys.stdin.readline())
while rv and rv != "classic" and rv != "carbon":
print "Configure classic or carbon - ",
rv = string.strip(sys.stdin.readline())
if rv == "classic":
do_classic = 1
elif rv == "carbon":
do_classic = 0
else:
return
else:
sys.exit(1)
if do_classic:
MacOS.splash(SPLASH_COPYCLASSIC)
buildcopy(sys.prefix, None, [("PythonInterpreterClassic", "PythonInterpreter")])
else:
MacOS.splash(SPLASH_COPYCARBON)
buildcopy(sys.prefix, None, [("PythonInterpreterCarbon", "PythonInterpreter")])
MacOS.splash(SPLASH_BUILDAPPLETS) MacOS.splash(SPLASH_BUILDAPPLETS)
buildapplet(sys.prefix, None, APPLET_LIST) buildapplet(sys.prefix, None, APPLET_LIST)

Binary file not shown.

Binary file not shown.

View File

@ -202,6 +202,7 @@ def buildcarbonplugins(top, dummy1, dummy2):
(":Mac:Build:xxsubtype.carbon.mcp", "xxsubtype.carbon"), (":Mac:Build:xxsubtype.carbon.mcp", "xxsubtype.carbon"),
(":Mac:Build:pyexpat.carbon.mcp", "pyexpat.carbon"), (":Mac:Build:pyexpat.carbon.mcp", "pyexpat.carbon"),
(":Mac:Build:calldll.carbon.mcp", "calldll.carbon"), (":Mac:Build:calldll.carbon.mcp", "calldll.carbon"),
(":Mac:Build:datetime.carbon.mcp", "datetime.carbon"),
(":Mac:Build:gdbm.carbon.mcp", "gdbm.carbon"), (":Mac:Build:gdbm.carbon.mcp", "gdbm.carbon"),
(":Mac:Build:icglue.carbon.mcp", "icglue.carbon"), (":Mac:Build:icglue.carbon.mcp", "icglue.carbon"),
(":Mac:Build:waste.carbon.mcp", "waste.carbon"), (":Mac:Build:waste.carbon.mcp", "waste.carbon"),

View File

@ -114,52 +114,47 @@ def genallprojects(force=0):
# Example/test modules # Example/test modules
genpluginproject("carbon", "_testcapi") genpluginproject("carbon", "_testcapi")
genpluginproject("carbon", "xx") genpluginproject("carbon", "xx")
genpluginproject("carbon", "datetime")
genpluginproject("carbon", "xxsubtype", sources=["xxsubtype.c"]) genpluginproject("carbon", "xxsubtype", sources=["xxsubtype.c"])
genpluginproject("carbon", "_hotshot", sources=["_hotshot.c"]) genpluginproject("carbon", "_hotshot", sources=["_hotshot.c"])
# bgen-generated Toolbox modules # bgen-generated Toolbox modules
genpluginproject("carbon", "_AE", outputdir="::Lib:Carbon") genpluginproject("carbon", "_AE")
genpluginproject("carbon", "_AH", outputdir="::Lib:Carbon") genpluginproject("carbon", "_AH")
genpluginproject("carbon", "_App", outputdir="::Lib:Carbon") genpluginproject("carbon", "_App")
genpluginproject("carbon", "_Cm", outputdir="::Lib:Carbon") genpluginproject("carbon", "_Cm")
# XXX can't work properly because we need to set a custom fragment initializer genpluginproject("carbon", "_Ctl")
#genpluginproject("carbon", "_CG", genpluginproject("carbon", "_Dlg")
# sources=["_CGModule.c", "CFMLateImport.c"], genpluginproject("carbon", "_Drag")
# libraries=["CGStubLib"],
# outputdir="::Lib:Carbon")
genpluginproject("carbon", "_Ctl", outputdir="::Lib:Carbon")
genpluginproject("carbon", "_Dlg", outputdir="::Lib:Carbon")
genpluginproject("carbon", "_Drag", outputdir="::Lib:Carbon")
genpluginproject("carbon", "_Evt", genpluginproject("carbon", "_Evt",
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") stdlibraryflags="Debug, WeakImport")
genpluginproject("carbon", "_File", genpluginproject("carbon", "_File",
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") stdlibraryflags="Debug, WeakImport")
genpluginproject("carbon", "_Fm", genpluginproject("carbon", "_Fm",
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") stdlibraryflags="Debug, WeakImport")
genpluginproject("carbon", "_Folder", genpluginproject("carbon", "_Folder",
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") stdlibraryflags="Debug, WeakImport")
genpluginproject("carbon", "_Help", outputdir="::Lib:Carbon") genpluginproject("carbon", "_Help")
genpluginproject("carbon", "_IBCarbon", sources=[":ibcarbon:_IBCarbon.c"], genpluginproject("carbon", "_IBCarbon", sources=[":ibcarbon:_IBCarbon.c"])
outputdir="::Lib:Carbon") genpluginproject("carbon", "_Icn")
genpluginproject("carbon", "_Icn", outputdir="::Lib:Carbon") genpluginproject("carbon", "_List")
genpluginproject("carbon", "_List", outputdir="::Lib:Carbon") genpluginproject("carbon", "_Menu")
genpluginproject("carbon", "_Menu", outputdir="::Lib:Carbon")
genpluginproject("carbon", "_Qd", genpluginproject("carbon", "_Qd",
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") stdlibraryflags="Debug, WeakImport")
genpluginproject("carbon", "_Qt", genpluginproject("carbon", "_Qt",
libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") libraryflags="Debug, WeakImport")
genpluginproject("carbon", "_Qdoffs", genpluginproject("carbon", "_Qdoffs",
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") stdlibraryflags="Debug, WeakImport")
genpluginproject("carbon", "_Res", genpluginproject("carbon", "_Res",
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") stdlibraryflags="Debug, WeakImport")
genpluginproject("carbon", "_Scrap", outputdir="::Lib:Carbon") genpluginproject("carbon", "_Scrap")
genpluginproject("carbon", "_Snd", outputdir="::Lib:Carbon") genpluginproject("carbon", "_Snd")
genpluginproject("carbon", "_Sndihooks", sources=[":snd:_Sndihooks.c"], outputdir="::Lib:Carbon") genpluginproject("carbon", "_Sndihooks", sources=[":snd:_Sndihooks.c"])
genpluginproject("carbon", "_TE", outputdir="::Lib:Carbon") genpluginproject("carbon", "_TE")
genpluginproject("carbon", "_Mlte", outputdir="::Lib:Carbon") genpluginproject("carbon", "_Mlte")
genpluginproject("carbon", "_Win", outputdir="::Lib:Carbon") genpluginproject("carbon", "_Win")
genpluginproject("carbon", "_CF", sources=["_CFmodule.c", "pycfbridge.c"], outputdir="::Lib:Carbon") genpluginproject("carbon", "_CF", sources=["_CFmodule.c", "pycfbridge.c"])
genpluginproject("carbon", "_CarbonEvt", outputdir="::Lib:Carbon") genpluginproject("carbon", "_CarbonEvt")
genpluginproject("carbon", "hfsplus") genpluginproject("carbon", "hfsplus")
# Other Mac modules # Other Mac modules