Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
This commit is contained in:
parent
6c64fa7dda
commit
3e82872eca
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -49,25 +49,30 @@ OSAm_RunCompiledScript (self, args)
|
|||
char *line;
|
||||
DescType typeCode;
|
||||
long dataSize = 0;
|
||||
OSErr err;
|
||||
|
||||
HLock (temp.dataHandle);
|
||||
|
||||
dataSize = GetHandleSize (temp.dataHandle);
|
||||
dataSize = AEGetDescDataSize (&temp);
|
||||
|
||||
if (dataSize > 0)
|
||||
{
|
||||
PyObject *result = PyString_FromStringAndSize ((*temp.dataHandle),
|
||||
PyObject *result = PyString_FromStringAndSize (NULL,
|
||||
dataSize);
|
||||
|
||||
AEDisposeDesc (&temp);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
printf ("OSAm.error Out of memory.\n");
|
||||
Py_INCREF (Py_None);
|
||||
AEDisposeDesc (&temp);
|
||||
return Py_None;
|
||||
}
|
||||
if ( (err=AEGetDescData(&temp, PyString_AS_STRING(result), dataSize)) < 0 )
|
||||
{
|
||||
AEDisposeDesc(&temp);
|
||||
return PyMac_Error(err);
|
||||
}
|
||||
|
||||
AEDisposeDesc(&temp);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -110,28 +115,32 @@ OSAm_CompileAndSave (self, args)
|
|||
char *line;
|
||||
DescType typeCode;
|
||||
long dataSize = 0;
|
||||
OSErr err;
|
||||
|
||||
HLock (temp.dataHandle);
|
||||
|
||||
dataSize = GetHandleSize (temp.dataHandle);
|
||||
dataSize = AEGetDescDataSize (&temp);
|
||||
|
||||
if (dataSize > 0)
|
||||
{
|
||||
PyObject *result = PyString_FromStringAndSize ((*temp.dataHandle),
|
||||
PyObject *result = PyString_FromStringAndSize (NULL,
|
||||
dataSize);
|
||||
|
||||
AEDisposeDesc (&temp);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
printf ("OSAm.error Out of memory.\n");
|
||||
Py_INCREF (Py_None);
|
||||
AEDisposeDesc (&temp);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
return result;
|
||||
if ( (err=AEGetDescData(&temp, PyString_AS_STRING(result), dataSize)) < 0 )
|
||||
{
|
||||
AEDisposeDesc(&temp);
|
||||
return PyMac_Error(err);
|
||||
}
|
||||
|
||||
AEDisposeDesc(&temp);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
if (myErr != noErr)
|
||||
|
@ -170,25 +179,30 @@ OSAm_CompileAndExecute (self, args)
|
|||
char *line;
|
||||
DescType typeCode;
|
||||
long dataSize = 0;
|
||||
OSErr err;
|
||||
|
||||
HLock (temp.dataHandle);
|
||||
|
||||
dataSize = GetHandleSize (temp.dataHandle);
|
||||
dataSize = AEGetDescDataSize (&temp);
|
||||
|
||||
if (dataSize > 0)
|
||||
{
|
||||
PyObject *result = PyString_FromStringAndSize ((*temp.dataHandle),
|
||||
PyObject *result = PyString_FromStringAndSize (NULL,
|
||||
dataSize);
|
||||
|
||||
AEDisposeDesc (&temp);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
printf ("OSAm.error Out of memory.\n");
|
||||
Py_INCREF (Py_None);
|
||||
AEDisposeDesc (&temp);
|
||||
return Py_None;
|
||||
}
|
||||
if ( (err=AEGetDescData(&temp, PyString_AS_STRING(result), dataSize)) < 0 )
|
||||
{
|
||||
AEDisposeDesc(&temp);
|
||||
return PyMac_Error(err);
|
||||
}
|
||||
|
||||
AEDisposeDesc(&temp);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -216,7 +230,7 @@ static struct PyMethodDef OSAm_methods[] =
|
|||
(PyCFunction) OSAm_CompileAndExecute,
|
||||
METH_VARARGS,
|
||||
OSAm_DoCommand__doc__},
|
||||
|
||||
#if 0
|
||||
{"CompileAndSave",
|
||||
(PyCFunction) OSAm_CompileAndSave,
|
||||
METH_VARARGS,
|
||||
|
@ -226,6 +240,7 @@ static struct PyMethodDef OSAm_methods[] =
|
|||
(PyCFunction) OSAm_RunCompiledScript,
|
||||
METH_VARARGS,
|
||||
OSAm_DoCommand__doc__},
|
||||
#endif
|
||||
|
||||
{NULL, (PyCFunction) NULL, 0, NULL}
|
||||
};
|
||||
|
|
Binary file not shown.
|
@ -44,7 +44,7 @@ static c2pstr(const char *cc)
|
|||
|
||||
OSAError LoadScriptingComponent (ComponentInstance * scriptingComponent);
|
||||
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* store the script as a compile script so that OSA
|
||||
* components may load and execute the script easily
|
||||
|
@ -143,6 +143,7 @@ CleanUp:
|
|||
|
||||
return err2;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
OSAError
|
||||
|
@ -194,7 +195,7 @@ CleanUp:
|
|||
return err2;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* This routine reads in a saved script file and executes
|
||||
* the script contained within (from a 'scpt' resource.)
|
||||
|
@ -291,6 +292,7 @@ done:
|
|||
|
||||
return err2;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
OSAError
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Building Mac Python from source</TITLE>
|
||||
<TITLE>Building MacPython-OS9 from source</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>Building Mac Python from source</H1>
|
||||
<H1>Building MacPython-OS9 from source</H1>
|
||||
<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
|
||||
Python is not something to be undertaken lightly, you need a reasonable
|
||||
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
|
||||
released after MacPython. The
|
||||
<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>
|
||||
|
||||
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
|
||||
HREF="http://www.python.org/sigs/pythonmac-sig/">Mac Python Special
|
||||
Interest Group</A>.
|
||||
|
@ -77,11 +78,6 @@ you need:
|
|||
|
||||
<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
|
||||
HREF="mailto:piovanel@kagi.com"><piovanel@kagi.com></A>. Python
|
||||
was built using version 2.0, which is included in the CodeWarrior
|
||||
|
@ -132,7 +128,6 @@ Top-level-folder:
|
|||
Modules
|
||||
Build
|
||||
...
|
||||
Tcl/Tk Folder 8.3.4
|
||||
</PRE>
|
||||
|
||||
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
|
||||
one. <p>
|
||||
|
||||
First build GUSI, both the normal one and the Carbon variant.
|
||||
First build GUSI, the Carbon variant.
|
||||
<p>
|
||||
|
||||
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
|
||||
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>
|
||||
|
||||
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.
|
||||
|
||||
<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
|
||||
<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>
|
||||
|
||||
All the mac-specific stuff lives in the <code>Mac</code> folder:
|
||||
The mac-specific stuff lives in the <code>Mac</code> folder:
|
||||
<DL>
|
||||
<DT> Build
|
||||
<DD> This is where the project files live and where you build the
|
||||
libraries, shared libraries, executables and plugin modules. All the
|
||||
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
|
||||
<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.
|
||||
|
||||
<DT> Lib
|
||||
<DD> Mac-specific standard modules. The <code>Carbon</code> package
|
||||
contains modules specifically needed with various MacOS toolbox
|
||||
interface modules, both for Carbon and classic PPC, despite the name.
|
||||
<DD> MacPython-OS9 specific standard modules which are not shared with
|
||||
MacPython-OSX.
|
||||
|
||||
<DT> Modules
|
||||
<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).
|
||||
|
||||
<DT> OSX
|
||||
<DD> Specific to unix-Python (also known as MachoPython) on OSX, not used
|
||||
by MacPython.
|
||||
<DD> Specific to MacPython-OSX, not used by MacPython-OS9.
|
||||
|
||||
<DT> OSXResources
|
||||
<DD> Specific to unix-Python (also known as MachoPython) on OSX, not used
|
||||
by MacPython.
|
||||
<DD> Specific to MacPython-OSX, not used by MacPython-OS9.
|
||||
|
||||
<DT> Python
|
||||
<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>
|
||||
|
||||
<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,
|
||||
the projects for
|
||||
interpreter and core library are linked together, so
|
||||
building the PythonInterpreterClassic and/or PythonInterpreterCarbon target
|
||||
First you optionally build the external libraries with buildlibs.prj. <p>
|
||||
|
||||
Then, 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>
|
||||
|
||||
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>
|
||||
will result in everything being built. The result, however, is an "Application
|
||||
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>
|
||||
will result in the whole core being built, but not the extension modules. <p>
|
||||
|
||||
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
|
||||
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>
|
||||
|
||||
<DT> PythonCore
|
||||
<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
|
||||
shared library in the <code>Extensions</code> folder of your system
|
||||
folder. Do exactly that: put an <em>alias</em> there, copying or
|
||||
|
@ -352,11 +322,7 @@ will also do this. <br>
|
|||
|
||||
<DT> PythonInterpeter
|
||||
<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
|
||||
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>
|
||||
shared library. <p>
|
||||
|
||||
<DT> Plugin projects
|
||||
<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
|
||||
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
|
||||
<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
|
||||
conversion". <p>
|
||||
|
||||
<blockquote>
|
||||
There is one group of people for whom MacCVS is not the best choice: people with
|
||||
checkin rights to the Python repository. You will have to use MacCVS Pro
|
||||
(completely unrelated) from www.maccvs.org, because it has working SSH support.
|
||||
</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>
|
||||
It is a good idea to disable Quicktime Exchange in the Quicktime control
|
||||
panel if you are on OS9 or before. 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
|
||||
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
|
||||
it is probably a good idea to first build <code>PythonStandSmall.prj</code>,
|
||||
which builds a fairly minimal interpreter, and then follow the
|
||||
<a href="#fullbuild">fullbuild instructions</a>.
|
||||
fullbuild instructions</a>.
|
||||
|
||||
<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
|
||||
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
|
||||
(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
|
||||
modules without building a complete Python. The binary distribution
|
||||
|
|
Binary file not shown.
|
@ -2,6 +2,7 @@
|
|||
(':BeOS', None)
|
||||
(':BuildApplet', None)
|
||||
(':BuildApplication', None)
|
||||
(':ConfigurePython', '')
|
||||
(':Demo', '')
|
||||
(':Demo:cwilib', None)
|
||||
(':Demo:embed', None)
|
||||
|
@ -111,7 +112,6 @@
|
|||
(':Mac:Contrib:PythonDetector:OpenPythonLib with NS', '')
|
||||
(':Mac:Contrib:PythonDetector:PythonDetector', '')
|
||||
(':Mac:Contrib:PythonDetector:readme.txt', '')
|
||||
(':Mac:Contrib:PythonScript', '')
|
||||
(':Mac:Contrib:Sherlock', '')
|
||||
(':Mac:Contrib:Tabcleaner', '')
|
||||
(':Mac:Contrib:mpwsystem', '')
|
||||
|
@ -138,7 +138,6 @@
|
|||
(':Mac:ReadMe-src', None)
|
||||
(':Mac:ReadMe~0', None)
|
||||
(':Mac:ReadmeSource', None)
|
||||
(':Mac:Relnotes', ':Relnotes:')
|
||||
(':Mac:Resources', None)
|
||||
(':Mac:TODO', None)
|
||||
(':Mac:Tools:CGI', '')
|
||||
|
@ -168,6 +167,7 @@
|
|||
(':Python:Icon', None)
|
||||
(':PythonCarbonStandalone', None)
|
||||
(':PythonCoreCarbon', '')
|
||||
(':PythonInterpreter', '')
|
||||
(':PythonStandCarbon', None)
|
||||
(':PythonStandSmall', None)
|
||||
(':PythonStandSmallCarbon', None)
|
||||
|
@ -205,5 +205,3 @@
|
|||
(':pystone.py', None)
|
||||
(':setup.py', None)
|
||||
(':site-packages', None)
|
||||
(':ConfigurePython', '')
|
||||
(':PythonInterpreter', '')
|
||||
|
|
|
@ -5,12 +5,14 @@
|
|||
*.dbg
|
||||
*.hqx
|
||||
*.idb
|
||||
*.pch
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.slb
|
||||
*.xMAP
|
||||
*.xSYM
|
||||
*Icon
|
||||
*_pch
|
||||
*~[0-9]
|
||||
.#*
|
||||
.DS_Store
|
||||
|
@ -18,5 +20,3 @@
|
|||
@*
|
||||
CVS
|
||||
[(]*[)]
|
||||
*.pch
|
||||
*_pch
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
(':ConfigurePythonClassic', None)
|
||||
(':Demo', None)
|
||||
(':Demo:embed', ':Demo:embed')
|
||||
(':Demo:extend', ':Demo:extend')
|
||||
(':Demo:pysvr', ':Demo:pysvr')
|
||||
(':Doc', None)
|
||||
(':EditPythonPrefs', None)
|
||||
|
@ -70,16 +69,10 @@
|
|||
(':Mac:Build:PythonInterpreter.mcp', None)
|
||||
(':Mac:Build:PythonInterpreter.old.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: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.xml~0', 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.xml', None)
|
||||
(':Mac:Build:Snd.mcp.exp', None)
|
||||
|
@ -98,6 +91,9 @@
|
|||
(':Mac:Build:_AE.mcp', None)
|
||||
(':Mac:Build:_AE.mcp.exp', 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.exp', None)
|
||||
(':Mac:Build:_App.carbon.mcp.xml', None)
|
||||
|
@ -149,9 +145,15 @@
|
|||
(':Mac:Build:_Fm.mcp', None)
|
||||
(':Mac:Build:_Fm.mcp.exp', 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.exp', 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.exp', None)
|
||||
(':Mac:Build:_Icn.carbon.mcp.xml', None)
|
||||
|
@ -291,6 +293,9 @@
|
|||
(':Mac:Build:pyexpat.mcp', None)
|
||||
(':Mac:Build:pyexpat.mcp.exp', 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.exp', None)
|
||||
(':Mac:Build:waste.carbon.mcp.xml', None)
|
||||
|
@ -300,15 +305,9 @@
|
|||
(':Mac:Build:xx.carbon.mcp', '')
|
||||
(':Mac:Build:xx.carbon.mcp.exp', '')
|
||||
(':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.exp', 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.exp', None)
|
||||
(':Mac:Build:zlib.carbon.mcp.xml', None)
|
||||
|
@ -372,6 +371,7 @@
|
|||
(':Mac:Lib', None)
|
||||
(':Mac:MPW', None)
|
||||
(':Mac:Modules', None)
|
||||
(':Mac:OSX', None)
|
||||
(':Mac:OSX:Makefile', None)
|
||||
(':Mac:OSX:README', None)
|
||||
(':Mac:OSX:README.macosx.txt', None)
|
||||
|
@ -394,6 +394,7 @@
|
|||
(':Mac:Resources:gusiprefs.rsrc', None)
|
||||
(':Mac:Resources:pythonpath.r', '')
|
||||
(':Mac:Resources:tkpython.rsrc', None)
|
||||
(':Mac:Resources:tkpython.rsrc-', None)
|
||||
(':Mac:Resources:version.r', None)
|
||||
(':Mac:TODO', None)
|
||||
(':Mac:Tools:BBPy', None)
|
||||
|
@ -415,6 +416,7 @@
|
|||
(':Mac:mwerks:mwerks_carbonNOGUSI_config.h', None)
|
||||
(':Mac:mwerks:mwerks_nscarbon_config.h', '')
|
||||
(':Mac:mwerks:mwerks_shcarbon_config.h', '')
|
||||
(':Mac:mwerks:mwerks_smcarbon_config.h', '')
|
||||
(':Mac:mwerks:mwerks_thrcarbonsm_config.h', None)
|
||||
(':Mac:mwerks:mwerks_threadsmall_config.h', '')
|
||||
(':Mac:mwerks:mwerks_tkplugin_config.h', ':Mac:mwerks:')
|
||||
|
@ -440,6 +442,7 @@
|
|||
(':Modules:_hotshot.c', None)
|
||||
(':Modules:_localemodule.c', None)
|
||||
(':Modules:_sre.c', None)
|
||||
(':Modules:_ssl.c', None)
|
||||
(':Modules:_testcapimodule.c', None)
|
||||
(':Modules:_tkinter.c', None)
|
||||
(':Modules:_weakref.c', None)
|
||||
|
@ -466,6 +469,7 @@
|
|||
(':Modules:dbmmodule.c', None)
|
||||
(':Modules:dlmodule.c', None)
|
||||
(':Modules:errnomodule.c', None)
|
||||
(':Modules:expat', None)
|
||||
(':Modules:fcntlmodule.c', None)
|
||||
(':Modules:flmodule.c', None)
|
||||
(':Modules:fmmodule.c', None)
|
||||
|
@ -518,6 +522,7 @@
|
|||
(':Modules:shamodule.c', None)
|
||||
(':Modules:signalmodule.c', None)
|
||||
(':Modules:socketmodule.c', None)
|
||||
(':Modules:socketmodule.h', None)
|
||||
(':Modules:soundex.c', None)
|
||||
(':Modules:sre.h', None)
|
||||
(':Modules:sre_constants.h', None)
|
||||
|
@ -582,6 +587,7 @@
|
|||
(':Tools:bgen', '')
|
||||
(':Tools:compiler', None)
|
||||
(':Tools:faqwiz', None)
|
||||
(':Tools:framer', None)
|
||||
(':Tools:freeze', '')
|
||||
(':Tools:i18n', None)
|
||||
(':Tools:idle', None)
|
||||
|
@ -605,24 +611,21 @@
|
|||
(':readmefiles', None)
|
||||
(':setup.py', None)
|
||||
(':site-packages', None)
|
||||
(':Mac:Build:_IBCarbon.carbon.mcp.xml', None)
|
||||
(':Mac:Build:_IBCarbon.carbon.mcp.exp', None)
|
||||
(':Mac:Build:_IBCarbon.carbon.mcp', None)
|
||||
(':Mac:Build:_Help.carbon.mcp.xml', None)
|
||||
(':Mac:Build:_Help.carbon.mcp.exp', None)
|
||||
(':Mac:Build:_Help.carbon.mcp', None)
|
||||
(':Mac:Build:_AH.carbon.mcp.xml', None)
|
||||
(':Mac:Build:_AH.carbon.mcp.exp', None)
|
||||
(':Mac:Build:_AH.carbon.mcp', None)
|
||||
(':Mac:Build:temp_delete_me', None)
|
||||
(':Mac:Build:pygusiconfig.smcarbon.lib', None)
|
||||
(':Mac:Build:pygusiconfig.carbon.lib', None)
|
||||
(':Mac:mwerks:mwerks_carbonpyexpat_config.h', '')
|
||||
(':Mac:mwerks:mwerks_pyexpat_config.h', '')
|
||||
(':Mac:mwerks:mwerks_smcarbon_config.h', '')
|
||||
(':Mac:OSX', None)
|
||||
(':Modules:_ssl.c', None)
|
||||
(':Modules:socketmodule.h', None)
|
||||
(':Mac:Resources:tkpython.rsrc-', None)
|
||||
(':Modules:expat', None)
|
||||
(':Tools:framer', None)
|
||||
(':Mac:Build:_Folder.carbon.mcp.xml', None)
|
||||
(':Mac:Build:_Folder.carbon.mcp.exp', None)
|
||||
(':Mac:Build:_Folder.carbon.mcp', None)
|
||||
(':Mac:Build:_File.carbon.mcp.xml', None)
|
||||
(':Mac:Build:_File.carbon.mcp.exp', None)
|
||||
(':Mac:Build:_File.carbon.mcp', None)
|
||||
(':Mac:Build:_Alias.carbon.mcp.xml', None)
|
||||
(':Mac:Build:_Alias.carbon.mcp.exp', None)
|
||||
(':Mac:Build:_Alias.carbon.mcp', None)
|
||||
(':Modules:zipimport.c', None)
|
||||
(':Modules:ossaudiodev.c', None)
|
||||
(':Modules:datetimemodule.c', None)
|
||||
(':Modules:bz2module.c', None)
|
||||
(':Modules:_randommodule.c', None)
|
||||
(':Modules:_bsddb.c', None)
|
||||
(':Mac:Build:datetime.carbon.mcp.xml', None)
|
||||
(':Mac:Build:datetime.carbon.mcp.exp', None)
|
||||
(':Mac:Build:datetime.carbon.mcp', None)
|
||||
|
|
|
@ -2,18 +2,17 @@ How to make a Python-distribution.
|
|||
----------------------------------
|
||||
|
||||
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.
|
||||
the fragment number is Python's sys.hexversion, it should be set in the
|
||||
"PEF" preferences.
|
||||
- Increase version number in _versioncheck.py
|
||||
- Build PythonStandSmall, run once in root folder
|
||||
- Update Relnotes, readme's, Demo:build.html
|
||||
- Make sure tkresources.rsrc is up-to-date
|
||||
- Update NEWS, readme's, Demo:build.html
|
||||
- fullbuild everything with increase-buildno
|
||||
- Test both classic and Carbon with test.regrtest
|
||||
- Update Numeric and build/install it both with Classic and with Carbon python
|
||||
- Test with test.regrtest
|
||||
- Update Numeric and build/install it
|
||||
- Recompile OSAm and possibly other Contrib stuff
|
||||
- mkdistr binary.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
|
||||
add the missing stuff. Make sure of all settings for the new files (esp. "where"
|
||||
and "gestalt" are easy to miss).
|
||||
- test on virgin systems (OSX, OS9, OS8 without Carbon). Make sure to test
|
||||
tkinter too.
|
||||
- test on virgin systems (both OS9 and OSX).
|
||||
- Remove the local installation so you don't get confused by it.
|
||||
- checkin everything except PythonX.Y.vct.
|
||||
- mkdistr src.include
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*.in
|
||||
*.lib
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.slb
|
||||
*.xMAP
|
||||
*.xSYM
|
||||
|
@ -19,4 +20,3 @@ CVS
|
|||
Makefile.pre.in
|
||||
PyIDE-src
|
||||
[(]*[)]
|
||||
*.pyo
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
(':.DS_Store', None)
|
||||
(':BeOS', None)
|
||||
(':BuildApplet', None)
|
||||
(':BuildApplication', None)
|
||||
|
@ -11,12 +12,7 @@
|
|||
(':Extensions:Imaging', None)
|
||||
(':Extensions:Pmw', None)
|
||||
(':Extensions:PyDOM', None)
|
||||
(':Extensions:README', '')
|
||||
(':Extensions:README.TOO', '')
|
||||
(':Extensions:audio', None)
|
||||
(':Extensions:example', '')
|
||||
(':Extensions:example2', '')
|
||||
(':Extensions:example3', '')
|
||||
(':Extensions:img', '')
|
||||
(':Extensions:midi', None)
|
||||
(':Extensions:pyexpat', None)
|
||||
|
@ -29,6 +25,7 @@
|
|||
(':Include', '')
|
||||
(':LICENSE', '')
|
||||
(':Lib', '')
|
||||
(':Mac:.DS_Store', None)
|
||||
(':Mac:Build', '')
|
||||
(':Mac:Build:PythonAppletCFM68K', None)
|
||||
(':Mac:Build:PythonAppletPPC', None)
|
||||
|
@ -41,6 +38,7 @@
|
|||
(':Mac:Compat', '')
|
||||
(':Mac:Contrib', '')
|
||||
(':Mac:Demo', '')
|
||||
(':Mac:Distributions:(vise)', None)
|
||||
(':Mac:Distributions:68k-shared.exclude', None)
|
||||
(':Mac:Distributions:68k-shared.include', None)
|
||||
(':Mac:Distributions:68k-stand.exclude', None)
|
||||
|
@ -67,7 +65,6 @@
|
|||
(':Mac:ReadMe', '')
|
||||
(':Mac:ReadMe-dev', None)
|
||||
(':Mac:ReadMe-src', ':ReadMe-src')
|
||||
(':Mac:Relnotes', ':Relnotes:')
|
||||
(':Mac:Resources', '')
|
||||
(':Mac:TODO', None)
|
||||
(':Mac:Tools:CGI', '')
|
||||
|
@ -77,20 +74,17 @@
|
|||
(':Mac:Tools:PyIDE', None)
|
||||
(':Mac:Tools:bruce', None)
|
||||
(':Mac:Tools:macfreeze', '')
|
||||
(':Mac:Unsupported', '')
|
||||
(':Mac:Wastemods', '')
|
||||
(':Mac:_checkversion.py', None)
|
||||
(':Mac:mwerks', '')
|
||||
(':Mac:mwerks:old', None)
|
||||
(':Mac:mwerks:projects', None)
|
||||
(':Mac:scripts', '')
|
||||
(':Mac:tclmods', '')
|
||||
(':Misc', '')
|
||||
(':Modules', '')
|
||||
(':Objects', '')
|
||||
(':PC', None)
|
||||
(':PCbuild', None)
|
||||
(':PLAN.txt', '')
|
||||
(':Parser', '')
|
||||
(':PlugIns', None)
|
||||
(':Python', '')
|
||||
|
@ -141,4 +135,4 @@
|
|||
(':pystone.py', None)
|
||||
(':setup.py', None)
|
||||
(':site-packages', None)
|
||||
(':Mac:Distributions:(vise)', None)
|
||||
(':Tools:framer', '')
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define BUILD 144
|
||||
#define BUILD 148
|
||||
|
|
|
@ -218,16 +218,21 @@ mac_fdopen(self, args)
|
|||
{
|
||||
extern int fclose(FILE *);
|
||||
int fd;
|
||||
char *mode;
|
||||
char *mode = "r";
|
||||
int bufsize = -1;
|
||||
FILE *fp;
|
||||
if (!PyArg_ParseTuple(args, "is", &fd, &mode))
|
||||
PyObject *f;
|
||||
if (!PyArg_ParseTuple(args, "i|si", &fd, &mode, &bufsize))
|
||||
return NULL;
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
fp = fdopen(fd, mode);
|
||||
Py_END_ALLOW_THREADS
|
||||
if (fp == NULL)
|
||||
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
|
||||
|
||||
|
|
|
@ -489,7 +489,10 @@ PyMac_Main(int argc, char **argv, char *filename)
|
|||
|
||||
Py_Initialize();
|
||||
|
||||
#if 0
|
||||
/* According to Martin v. Loewis this is a bad idea... */
|
||||
PyUnicode_SetDefaultEncoding(PyMac_getscript());
|
||||
#endif
|
||||
|
||||
PySys_SetArgv(argc, argv);
|
||||
|
||||
|
|
89
Mac/ReadMe
89
Mac/ReadMe
|
@ -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
|
||||
onwards) and natively on MacOSX. The installer tries to work out whether you can
|
||||
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.
|
||||
This is a MacPython that can run on Mac OS 8.6 with CarbonLib
|
||||
installed, Mac OS 9 and Mac OS X. It is the direct successor of MacPython 2.2.
|
||||
|
||||
You should definitely read the Relnotes file too, and the section below about
|
||||
toolbox module reorganization. You should also read :Misc:NEWS, which lists
|
||||
the general (non-mac-dependent) new features of this Python release.
|
||||
For Mac OS X users: you are probably better off with the normal unix distribution
|
||||
of Python. That version also runs from the commandline, and if you do a framework
|
||||
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
|
||||
your machine. This is a general problem with Vise active installers, MindVision
|
||||
are working on it.
|
||||
If you are upgrading from a previous MacPython you should read :Misc:NEWS,
|
||||
which lists the new features of this Python release. As of this release
|
||||
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
|
||||
now. The documentation is in HTML format, start with index.html.
|
||||
|
||||
This installer installs MacPython for classic PPC MacOS, MacPython for Carbon
|
||||
(OS X, OS 9 or OS 8 with CarbonLib installed) or both, depending on your
|
||||
configuration. By selecting custom install you can bypass these tests and
|
||||
install what you want.
|
||||
If you want a MacPython that runs on systems without Carbon support (8.1
|
||||
up to 8.6 without CarbonLib) you should get MacPython 2.2.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
|
||||
- TK+PIL: Tkinter and support modules, plus Imaging, the Python image
|
||||
manipulation package (allows you to read, write and display images and
|
||||
do lots of operations on them).
|
||||
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.
|
||||
- PIL: the Python image manipulation package (allows you to read, write
|
||||
and display images and do lots of operations on them). Tkinter is no
|
||||
longer supported, a working Carbon version is Tk is not available.
|
||||
- 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
|
||||
between the packages.
|
||||
- Numeric: the LLNL Numeric Python extension. All sorts of nifty operations
|
||||
on matrices and such. This is the most recent version from the
|
||||
sourceforge archive.
|
||||
Numeric has moved from Extensions to :Lib:site-python, by the way,
|
||||
see the release notes.
|
||||
on matrices and such. This is version 22.
|
||||
- Developers kit: all header files and some tools and sample projects
|
||||
to get you started on writing Python extensions if you have CodeWarrior.
|
||||
All these except the DevKit are installed with Easy Install.
|
||||
|
||||
After the installer finishes it automatically launches the appropriate
|
||||
ConfigurePython applet, to finish configuration of your Python. If you
|
||||
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.
|
||||
After the installer finishes it automatically launches the
|
||||
ConfigurePython applet, to finish configuration of your Python.
|
||||
|
||||
Moving your Python installation after installing is generally not a
|
||||
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
|
||||
Python and "import test.regrtest ; test.regrtest.main()".
|
||||
|
||||
test_frozen will fail in MacPython because of different handling on
|
||||
frozen modules. This should not be a problem in normal use.
|
||||
test_httplib fails with an unexpected output error,
|
||||
this problem is being investigated.
|
||||
|
||||
test_socket fails, this problem is being investigated.
|
||||
|
||||
Three tests will fail on MacOS9 with MemoryErrors:
|
||||
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
|
||||
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
|
||||
(in ~/Library/Preferences) and then run PythonIntpreter once everything should
|
||||
(in ~/Library/Preferences) and then run PythonInterpreter once everything should
|
||||
be fine.
|
||||
|
||||
Uninstalling
|
||||
------------
|
||||
|
||||
Up to three items are installed in the system folder: the interpreter shared
|
||||
libraries PythonCore and PythonCoreCarbon live in the Extensions
|
||||
folder and the "Python 2.2.1 Preferences" file in the Python subfolder
|
||||
Up to three items are installed in the MacOS 8 or 9 system folder: the interpreter
|
||||
shared library PythonCore lives in the Extensions
|
||||
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
|
||||
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
|
||||
(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
|
||||
|
@ -143,12 +140,8 @@ Things to see
|
|||
|
||||
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
|
||||
contain useful information. There is also a first stab at documentation
|
||||
(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.
|
||||
There is also a first stab at documentation (plus examples) in the
|
||||
Mac:Demo folder. The toplevel Demo folder has machine-independent demos.
|
||||
|
||||
The ":Mac:scripts" folder has some sample scripts. Some are useful,
|
||||
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
|
||||
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
|
||||
"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
|
||||
ConfigurePython after a second install of the same MacPython version
|
||||
(or after moving the Python folder) should fix things up correctly.
|
||||
|
|
|
@ -89,8 +89,9 @@ resource 'STR#' (PYTHONPATH_ID, "sys.path initialization") {
|
|||
{
|
||||
"$(PYTHON)",
|
||||
"$(PYTHON):Lib",
|
||||
"$(PYTHON):Lib:plat-mac",
|
||||
"$(PYTHON):Lib:lib-dynload",
|
||||
"$(PYTHON):Lib:plat-mac",
|
||||
"$(PYTHON):Lib:plat-mac:lib-scriptpackages",
|
||||
"$(PYTHON):Mac:Lib",
|
||||
"$(PYTHON):Extensions:img:Mac",
|
||||
"$(PYTHON):Extensions:img:Lib",
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -160,9 +160,8 @@ def main():
|
|||
# Create the PythonCore alias(es)
|
||||
MacOS.splash(SPLASH_COPYCORE)
|
||||
if verbose:
|
||||
print "Copying PythonCore..."
|
||||
print "Copying PythonCoreCarbon..."
|
||||
n = 0
|
||||
n = n + mkcorealias('PythonCore', 'PythonCore')
|
||||
n = n + mkcorealias('PythonCoreCarbon', 'PythonCoreCarbon')
|
||||
if n == 0:
|
||||
from Carbon import Dlg
|
||||
|
@ -170,32 +169,6 @@ def main():
|
|||
if verbose:
|
||||
print "Warning: PythonCore not copied to Extensions 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)
|
||||
buildapplet(sys.prefix, None, APPLET_LIST)
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -202,6 +202,7 @@ def buildcarbonplugins(top, dummy1, dummy2):
|
|||
(":Mac:Build:xxsubtype.carbon.mcp", "xxsubtype.carbon"),
|
||||
(":Mac:Build:pyexpat.carbon.mcp", "pyexpat.carbon"),
|
||||
(":Mac:Build:calldll.carbon.mcp", "calldll.carbon"),
|
||||
(":Mac:Build:datetime.carbon.mcp", "datetime.carbon"),
|
||||
(":Mac:Build:gdbm.carbon.mcp", "gdbm.carbon"),
|
||||
(":Mac:Build:icglue.carbon.mcp", "icglue.carbon"),
|
||||
(":Mac:Build:waste.carbon.mcp", "waste.carbon"),
|
||||
|
|
|
@ -114,52 +114,47 @@ def genallprojects(force=0):
|
|||
# Example/test modules
|
||||
genpluginproject("carbon", "_testcapi")
|
||||
genpluginproject("carbon", "xx")
|
||||
genpluginproject("carbon", "datetime")
|
||||
genpluginproject("carbon", "xxsubtype", sources=["xxsubtype.c"])
|
||||
genpluginproject("carbon", "_hotshot", sources=["_hotshot.c"])
|
||||
|
||||
# bgen-generated Toolbox modules
|
||||
genpluginproject("carbon", "_AE", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_AH", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_App", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_Cm", outputdir="::Lib:Carbon")
|
||||
# XXX can't work properly because we need to set a custom fragment initializer
|
||||
#genpluginproject("carbon", "_CG",
|
||||
# sources=["_CGModule.c", "CFMLateImport.c"],
|
||||
# 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", "_AE")
|
||||
genpluginproject("carbon", "_AH")
|
||||
genpluginproject("carbon", "_App")
|
||||
genpluginproject("carbon", "_Cm")
|
||||
genpluginproject("carbon", "_Ctl")
|
||||
genpluginproject("carbon", "_Dlg")
|
||||
genpluginproject("carbon", "_Drag")
|
||||
genpluginproject("carbon", "_Evt",
|
||||
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
|
||||
stdlibraryflags="Debug, WeakImport")
|
||||
genpluginproject("carbon", "_File",
|
||||
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
|
||||
stdlibraryflags="Debug, WeakImport")
|
||||
genpluginproject("carbon", "_Fm",
|
||||
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
|
||||
stdlibraryflags="Debug, WeakImport")
|
||||
genpluginproject("carbon", "_Folder",
|
||||
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_Help", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_IBCarbon", sources=[":ibcarbon:_IBCarbon.c"],
|
||||
outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_Icn", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_List", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_Menu", outputdir="::Lib:Carbon")
|
||||
stdlibraryflags="Debug, WeakImport")
|
||||
genpluginproject("carbon", "_Help")
|
||||
genpluginproject("carbon", "_IBCarbon", sources=[":ibcarbon:_IBCarbon.c"])
|
||||
genpluginproject("carbon", "_Icn")
|
||||
genpluginproject("carbon", "_List")
|
||||
genpluginproject("carbon", "_Menu")
|
||||
genpluginproject("carbon", "_Qd",
|
||||
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
|
||||
stdlibraryflags="Debug, WeakImport")
|
||||
genpluginproject("carbon", "_Qt",
|
||||
libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
|
||||
libraryflags="Debug, WeakImport")
|
||||
genpluginproject("carbon", "_Qdoffs",
|
||||
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
|
||||
stdlibraryflags="Debug, WeakImport")
|
||||
genpluginproject("carbon", "_Res",
|
||||
stdlibraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_Scrap", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_Snd", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_Sndihooks", sources=[":snd:_Sndihooks.c"], outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_TE", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_Mlte", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_Win", outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_CF", sources=["_CFmodule.c", "pycfbridge.c"], outputdir="::Lib:Carbon")
|
||||
genpluginproject("carbon", "_CarbonEvt", outputdir="::Lib:Carbon")
|
||||
stdlibraryflags="Debug, WeakImport")
|
||||
genpluginproject("carbon", "_Scrap")
|
||||
genpluginproject("carbon", "_Snd")
|
||||
genpluginproject("carbon", "_Sndihooks", sources=[":snd:_Sndihooks.c"])
|
||||
genpluginproject("carbon", "_TE")
|
||||
genpluginproject("carbon", "_Mlte")
|
||||
genpluginproject("carbon", "_Win")
|
||||
genpluginproject("carbon", "_CF", sources=["_CFmodule.c", "pycfbridge.c"])
|
||||
genpluginproject("carbon", "_CarbonEvt")
|
||||
genpluginproject("carbon", "hfsplus")
|
||||
|
||||
# Other Mac modules
|
||||
|
|
Loading…
Reference in New Issue