[Numpy-discussion] pyc and pyo files in dmg and other python3 questions also a dmg for python3.1 to try
Sun Nov 14 13:36:18 CST 2010
On 11/14/2010 05:03 AM, Vincent Davis wrote:
> On Sun, Nov 14, 2010 at 7:20 AM, Ralf Gommers
> <firstname.lastname@example.org> wrote:
>> On Sun, Nov 14, 2010 at 9:16 AM, Vincent Davis<email@example.com>
>>> The questions below regard the osx dmg installer, not sure about how
>>> this applies to other installers.
>>> I noticed that pyc and pyo files are included in the binaries. Is
>>> there a reason for this? I have removed them in the dmg for python3.1
>> Some reasons I can think of are reducing startup time, avoiding permissions
>> issues for writing .pyc or .pyo files, and consistency (you're sure all
>> installs have the same .pyo files).
> Right but are they not recreated when the corresponding py file is
> accessed? So the speed to would only apply to the first run after
They won't be written unless the user has write permission in the
directories where the py files reside, which is normally not the case
when an installer is used, or any system-wide installation is done.
Inclusion of .pyc and/or .pyo files is a standard part of the
installation process for any platform. There is no advantage in trying
to remove them.
>>> I see that f2py is installed in /usr/local/bin/. f2py is also located
>>> in versions/2.7/bin/ but I am not sure when it gets installed there
>>> (versions/2.7/bin/) and why id does not from the dmg installer. Any
>>> insight into this?
>> Should come from the installer right, where else can it come from? No idea
>> at what point during install though.
>>> What should the permissions be on the installed numpy files. When I
>>> install via $python3.1 setup.py install the owner = VMD(me)
>>> group=admin. To match the other dmg installs I have to run $sudo
>>> python3.1 setup.py install to get owner=root and group=admin
>>> I am kind of working backwords. That is the
>>> numpy-1.5.1rc2-py3.1.2-python.org-macosx10.3.dmg was created by
>>> replacing the pkg installer file in the dmg from numpy/python2.7 with
>>> that from for numpy/python3.1 created with packagemaker gui.
>>> The packagemaker setup can be saved as a packagemaker document *.pmdoc
>>> which is just a collection of xml files. I can't find any python
>>> packages/scripts to edit/create .pmdoc files but that should be easy.
>>> Then I still need to have an automated script for the dmg
>>> (packagemaker only builds the installer) I have not looked for a
>>> python script for this but I assume bdist can be used as a guide (not
>>> sure about license issues) Are there better tools build dmgs using
>> Look at the numpy/tools/numpy-macosx-installer/new-create-dmg script and how
>> it's called from the paver dmg task. If you have an mpkg that should work
>> with very few changes.
> Good point. I'll look at that.
>>> I realize there is a lot I don't know about building binaries but I am
>>> interested so any advice on how to proceed or what the plans are for
>>> building py3 binaries would be appreciated and I will try to
>>> Finally here is a py3 binary to try.
>> That works for me. The only small issue I can see is that the Finder window
>> is huge when it opens, wider than my screen.
> That is a feature :-) I guess I need to work on that a bit. It seems
> the dmg layout is not preserved when converting between read-write and
> compressed. Or I am otherwise somehow loosing the formatting from the
> original dmg. I need to look at the new-create-dmg and use that.
>>> Vincent Davis
>>> NumPy-Discussion mailing list
>> NumPy-Discussion mailing list
More information about the NumPy-Discussion