I've been running the patched python25 port for over a week now and can only confirm what Jannis said. There are no problems.
I tested the following ports:

        • py25-zlib
        • py25-hashlib
        • py25-bsddb
        • py25-sqlite3
        • py25-tkinter
        • py25-bz2
        • py25-gdbm
        • py25-readline
        • py25-curses

Every module works fine. Even installing the python25 port first and then, for example, py25-bsddb will not give the new files precedence:

$ port contents py25-bsddb
Port py25-bsddb contains:
  /opt/local/lib/python2.5/site-packages/_bsddb-2.5.4-py2.5.egg-info
  /opt/local/lib/python2.5/site-packages/_bsddb.so

>>> import bsddb
>>> bsddb.__file__
'/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/bsddb/__init__.pyc'

I've also looked through older port versions. None of them changes the "python.pkgd" setting. Thus those modules will always get installed into the site-packages directory and will not be imported.

Arthur

On 16.04.2009, at 13:34, Jannis Leidel wrote:
Optimally, having an older version of one of the modules (eg, py25- hashlib at 2.5.2) installed with python25 at 2.5.4 with hashlib builtin, would be a meaningful test. Then trying it with various bits that affect how modules are loaded (eg, normal, with -S, others?) would answer it fully I think.

I haven't been able to downgrade the installed py25-hashlib to 2.5.2 but did some tests with python25 with the builtin hashlib and [email protected]_0 installed. I also tested with a virtualenv and a sandboxed virtualenv (--no-site-packages).

~ $ python
Python 2.5.4 (r254:67916, Apr 10 2009, 23:33:06)
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> hashlib.__file__
'/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/hashlib.pyc'
>>>
~ $ python -S
Python 2.5.4 (r254:67916, Apr 10 2009, 23:33:06)
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
>>> import hashlib
>>> hashlib.__file__
'/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/hashlib.pyc'
>>>
~ $ python -c "import hashlib; print hashlib.__file__"
/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/hashlib.pyc
~ $
~ $ port installed | grep py25-virtualenv
 py25-virtualenv @1.3.2_0 (active)
~ $ which virtualenv
/opt/local/bin/virtualenv
~ $
~ $ virtualenv hashlib-test
New python executable in hashlib-test/bin/python
Installing setuptools............done.
~ $ source hashlib-test/bin/ac
activate          activate_this.py
~ $ source hashlib-test/bin/activate
(hashlib-test)~ $ which python
/Users/Jannis/hashlib-test/bin/python
(hashlib-test)~ $ python
Python 2.5.4 (r254:67916, Apr 10 2009, 23:33:06)
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> hashlib.__file__
'/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/hashlib.pyc'
>>>
(hashlib-test)~ $ python -c "import hashlib; print hashlib.__file__"
/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/hashlib.pyc
(hashlib-test)~ $ deactivate
~ $
~ $
~ $ virtualenv --no-site-packages hashlib-test2
New python executable in hashlib-test2/bin/python
Installing setuptools............done.
~ $ source hashlib-test2/bin/activate
(hashlib-test2)~ $ python
Python 2.5.4 (r254:67916, Apr 10 2009, 23:33:06)
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> hashlib.__file__
'/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/hashlib.pyc'
>>>

Jannis
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to