"Lite" vs. "Full" Python Ports

Jannis Leidel jannis at leidel.info
Thu Apr 16 04:34:43 PDT 2009


Am 15.04.2009 um 01:34 schrieb Bryan Blackburn:

> On Tue, Apr 14, 2009 at 10:19:30PM +0200, Jannis Leidel said:
>> Am 14.04.2009 um 22:00 schrieb Bryan Blackburn:
> [...]
>>> As long as the one in lib-dynload is always loaded first, it  
>>> shouldn't
>>> be
>>> too big a deal, but someone really should test it...
>>
>> At the risk of not knowing how that could be tested thoroughly: I'm
>> running python25 with the patch I attached to #12369 for several  
>> days now
>> without a problem. That also fixed #18567 for me.
>
> 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 py25-hashlib at 2.5.4_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


More information about the macports-dev mailing list