[Python-bugs-list] [ python-Bugs-590456 ] preconvert AppleSingle resource files
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 09 Aug 2002 07:17:21 -0700
Bugs item #590456, was opened at 2002-08-03 08:47
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=590456&group_id=5470
Category: Macintosh
Group: Python 2.3
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Ronald Oussoren (ronaldoussoren)
Assigned to: Jack Jansen (jackjansen)
Summary: preconvert AppleSingle resource files
Initial Comment:
IDLE fails to start when using a recent Python 2.3 snapshot
because it tries to write files in the Python.framework, which is not
writeable by normal users.
A traceback:
IOError: [Errno 13] Permission denied: '/Library/Frameworks/
Python.framework/Versions/2.3/Mac/Tools/IDE/Widgets.rsrc.
df.rsrc'
Traceback (most recent call last):
File "./Mac/Tools/IDE/PythonIDE.py", line 35, in ?
File "./Mac/Tools/IDE/PythonIDE.py", line 23, in init
File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/
Lib/macresource.py"
, line 64, in need
refno = open_pathname(pathname)
File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/
Lib/macresource.py"
, line 92, in open_pathname
pathname = _decode(pathname)
File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/
Lib/macresource.py"
, line 104, in _decode
applesingle.decode(pathname, newpathname, resonly=1)
File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/
Lib/applesingle.py"
, line 74, in decode
fp = open(output, 'wb')
IOError: [Errno 13] Permission denied: '/Library/Frameworks/
Python.framework/Versions/2.3/Mac/Tools/IDE/Widgets.rsrc.
df.rsrc'
Traceback (most recent call last):
File "./Mac/Tools/IDE/PythonIDE.py", line 35, in ?
File "./Mac/Tools/IDE/PythonIDE.py", line 23, in init
File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/
Lib/macresource.py"
, line 64, in need
refno = open_pathname(pathname)
File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/
Lib/macresource.py"
, line 92, in open_pathname
pathname = _decode(pathname)
File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/
Lib/macresource.py"
, line 104, in _decode
applesingle.decode(pathname, newpathname, resonly=1)
File "/Library/Frameworks/Python.framework/Versions/2.3/Mac/
Lib/applesingle.py"
, line 74, in decode
fp = open(output, 'wb')
Initial reaction from Jack:
Ah! That's an interesting problem...
Here's what's going on, maybe someone here has good ideas on
how to solve it.
The ".rsrc" files in the CVS tree aren't actually resource files:
they're resource files encoded as AppleSingle. This is the way
MacCVS manages to store two-fork files on a CVS server that is
blissfully unaware of this Apple-ism. The macresourced module is
aware that a .rsrc file can be either a bona-fide resource file or an
AppleSingle file. In the latter case it decodes the file and caches
the result as a ".rsrc.df.rsrc" file, with the resources in the data
fork. But: if you can't write the directory where the .rsrc resides
this fails.
Storing the files as datafork-based .rsrc files in CVS will make life
miserable for me when building on OS9.
Checking the files out with MacCVS will make the standard unix
tarball distribution non-functional on OSX.
Hmm, I could probably pre-convert the files while installing, similar
to the precompilation step for .pyc and .pyo files....
Could you file a sourceforge bug report for this, please, so I won't
forget?
----------------------------------------------------------------------
>Comment By: Jack Jansen (jackjansen)
Date: 2002-08-09 16:17
Message:
Logged In: YES
user_id=45365
Fixed in Mac/OSX/Makefile rev 1.21. We also repcompile the .py files now.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=590456&group_id=5470