Odd files; just left behind?
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Fri Sep 21 06:42:58 EDT 2007
Robin Becker a écrit :
> Bruno Desthuilliers wrote:
>> Robin Becker a écrit :
>>> John J. Lee wrote:
>>>
>>>> Robin Becker <robin at reportlab.com> writes:
>>>>
>>>>> I see a folder .python-eggs in my home directory on one of our servers
>>>>> with various .so files
>>>>>
>>>>> ~/.python-eggs/MySQL_python-1.2.2-py2.3-freebsd-6.1-SECURITY-i386.egg-tmp/_mysql.so
>>>>>
>>>>>
>>>>> are these just left behind from some install process?
>>>>
>>>> Ah, it's about the resource extraction feature of setuptools. It's
>>>> possible for zipped eggs to contain resources that have to be
>>>> extracted to the filesystem. It puts them in the directory you saw
>>>> (or somewhere else -- see the docstring in my other reply).
>>>>
>>>> http://peak.telecommunity.com/DevCenter/PkgResources#resource-extraction
>>>>
>>>> http://peak.telecommunity.com/DevCenter/setuptools#automatic-resource-extraction
>>>>
>>> .....
>>> Thanks John, but why not clean up?
>>>
>> Does it needs to be "cleaned up" ? .so files (shared libs) *need* to
>> be extracted from the egg to be usable. Where they are extracted is
>> IIRC configurable...
> You're right! These files aren't temporary?
> It seems strange that the
> python files live with their associated lib/site-packages and the .so
> files are somewhere entirely different.
IIRC, where .so files are extracted is configurable using
PYTHON_EGG_CACHE (cf the first link above).
> Python 2.3.6 (#1, Jun 7 2007, 10:44:52)
> [GCC 3.4.4 [FreeBSD] 20050518] on freebsd6
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import MySQLdb
> >>> print MySQLdb.__file__
> /myhome/PYTHON/lib/python2.3/site-packages/MySQL_python-1.2.2-py2.3-freebsd-6.1-SECURITY-i386.egg/MySQLdb/__init__.pyc
>
> >>> import _mysql
> >>> print _mysql.__file__
> /myhome/.python-eggs/MySQL_python-1.2.2-py2.3-freebsd-6.1-SECURITY-i386.egg-tmp/_mysql.so
> >>>
>
> it would seem simpler to have the .so files inside the site-packages and
> there's the question of why this folder has to be obfuscated (name
> starts with .). Even if these files are "resources" why should they be
> assumed to belong to the user?
Notice that you did install your lib/python in /myhome, not in /usr[/local]
(snip)
> Just another nonsense from the eggworld
Or just another example of not reading the FineManual(tm) ?
More information about the Python-list
mailing list