Ticket #21381 (closed defect: fixed)
mimms-3.2.1 cannot run on Snow Leopard
| Reported by: | null.atou@… | Owned by: | boeyms@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.8.0 |
| Keywords: | snowleopard | Cc: | cedric.luthi@…, blb@…, tianyicui@… |
| Port: | mimms |
Description
mimms needs python25 because PortGroup is python25. So I newly install python25 and python_select on Snow Leopard, then select python25 and newly build mimms. But when execute, "No module named _ctypes" error has occurred.
% head -n1 /opt/local/bin/mimms
#!/opt/local/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
% python_select -s
python25
% mimms
Traceback (most recent call last):
File "/opt/local/bin/mimms", line 21, in <module>
from libmimms.core import run
File "/opt/local/lib/python2.5/site-packages/libmimms/core.py", line 31, in <module>
from . import libmms
File "/opt/local/lib/python2.5/site-packages/libmimms/libmms.py", line 24, in <module>
from ctypes import *
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ctypes/__init__.py", line 10, in <module>
from _ctypes import Union, Structure, Array
ImportError: No module named _ctypes
Attachments
Change History
comment:1 follow-up: ↓ 2 Changed 4 years ago by jmr@…
- Owner changed from macports-tickets@… to boeyms@…
- Keywords mimms, libmms, python25, ctypes removed
- Cc cedric.luthi@… added
comment:2 in reply to: ↑ 1 Changed 4 years ago by null.atou@…
Replying to jmr@…:
Should probably move to python26 (and fix the depends_lib) since python25 is not entirely working on 64-bit OS X and upstream never intends to fix it.
OK, I patched Portfile of mimms as follows:
4c4 < PortGroup python25 1.0 --- > PortGroup python26 1.0 # but is it necessary? 24a25 > depends_build port:python26
then install python26; port_select python26 and install mimms. But, indeed, mimms cannot run, because a "mimms" script was installed to '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/'. What is it? Should I do export PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/:${PATH} ? :-) Ok, it works fine. But I think a bin directory should be '/opt/local/bin', a lib be '/opt/local/lib' etc., while those of python26, root directory was set to /opt/local/Library/Frameworks/Python.framework/Versions/2.6/. It's very strange, I think.
comment:3 follow-up: ↓ 4 Changed 4 years ago by blb@…
- Cc blb@… added
- Keywords snowleopard added
The best method is to symlink the stuff from the framework directory into the base stuff in ${prefix}; see attached.
comment:4 in reply to: ↑ 3 Changed 4 years ago by null.atou@…
Replying to blb@…:
The best method is to symlink the stuff from the framework directory into the base stuff in ${prefix}; see attached.
Yes, this patch works fine, too. Symlinks of bin/mimms and man1/mimms.1 are made at appropriate path. tahnk you:-)
comment:5 Changed 4 years ago by cedric.luthi@…
On 10.5, mimms and mimms.1 are correctly installed in /opt/local/bin, respectively /opt/local/share/man/man1
$ port contents mimms Port mimms contains: /opt/local/bin/mimms /opt/local/lib/python2.5/site-packages/libmimms/__init__.py /opt/local/lib/python2.5/site-packages/libmimms/__init__.pyc /opt/local/lib/python2.5/site-packages/libmimms/core.py /opt/local/lib/python2.5/site-packages/libmimms/core.pyc /opt/local/lib/python2.5/site-packages/libmimms/libmms.py /opt/local/lib/python2.5/site-packages/libmimms/libmms.pyc /opt/local/lib/python2.5/site-packages/mimms-3.2-py2.5.egg-info /opt/local/share/man/man1/mimms.1.gz
What causes them to be installed in /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin instead of /opt/local/bin ? I'd prefer fixing the problem rather than hacking a post-destroot phase as suggested in the patch.
Also, why depends_lib-append instead of depends_lib?
comment:6 Changed 4 years ago by blb@…
The move to python 2.6 is where the framworks-based install is coming from; since you still have it with python 2.5, it's installing in the non-framework location. The reason for preferring 2.6 is that it is the only 2.x currently supported on Mac OS X 10.6 by upstream (2.5 does install but I don't believe it is complete).
The reason for depends_lib-append is that the PortGroup for python sets a depends_lib already (to the proper python port), so appending to it makes sure that dependency isn't overwritten.
comment:8 follow-up: ↓ 9 Changed 4 years ago by tianyicui@…
Actually it seems as a python25 bug for me:
$ python2.5
Python 2.5.4 (r254:67916, Sep 20 2009, 21:06:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ctypes/__init__.py", line 10, in <module>
from _ctypes import Union, Structure, Array
ImportError: No module named _ctypes
>>>
comment:10 Changed 4 years ago by blb@…
- Status changed from new to closed
- Resolution set to fixed
Updated to python 2.6 in r59144 (maintainer timeout).


Should probably move to python26 (and fix the depends_lib) since python25 is not entirely working on 64-bit OS X and upstream never intends to fix it.