[zc.buildout/egg-cache] .pyc files referencing temporary location?
We have some reports from co-workers working with zc.buildout and an egg-cache where the .pyc files refer to temporary directories within the egg-cache (obviously the location where the files within the egg were unpacked and compiled) - something like that. P:\home\freyp\.buildout\eggs\tmp27l-TE\Products.LDAPUserFolder-2.5-py2.4.egg\Products\LDAPUserFolder\LDAPUserFolder.py" Is there some solution other than removing the .pyc files? The issue seems to be related to debugging Zope environments with WingIDE. Andreas -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: info@zopyx.com - Phone +49 - 7071 - 793376 Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535 Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK ------------------------------------------------------------------------ E-Publishing, Python, Zope & Plone development, Consulting
On Jul 16, 2008, at 8:09 AM, Andreas Jung wrote:
We have some reports from co-workers working with zc.buildout and an egg-cache where the .pyc files refer to temporary directories within the egg-cache (obviously the location where the files within the egg were unpacked and compiled) - something like that.
P:\home\freyp\.buildout\eggs\tmp27l-TE\Products.LDAPUserFolder-2.5- py2.4.egg\Products\LDAPUserFolder\LDAPUserFolder.py"
Is there some solution other than removing the .pyc files?
Not currently.
The issue seems to be related to debugging Zope environments with WingIDE.
No, this is either a buildout, or possibly setuptools, issue having to do with the way eggs get built. There would be a similar issue with downloaded eggs. I plan to fix this at some point. Note: - This is important when using any debugger, since debuggers need to be able to get at source files. It would be nice if debuggers were clever enough to get run-time file locations based on __file__, rather than relying on file information stored in pyc files. - This only matters if you use unzipped eggs. (I have no idea why people use zipped eggs, since they are slower to import and generally a pain. I plan to add a buildout option to unzip all eggs.) Jim -- Jim Fulton Zope Corporation
On Jul 16, 2008, at 6:09 AM, Andreas Jung wrote:
We have some reports from co-workers working with zc.buildout and an egg-cache where the .pyc files refer to temporary directories within the egg-cache (obviously the location where the files within the egg were unpacked and compiled) - something like that.
P:\home\freyp\.buildout\eggs\tmp27l-TE\Products.LDAPUserFolder-2.5- py2.4.egg\Products\LDAPUserFolder\LDAPUserFolder.py"
Is there some solution other than removing the .pyc files?
Unzip all eggs. You can add the following stanza to your distutils config file [1]: [easy_install] zip_ok=False By the way, here is where I keep notes about problems that people have encountered which they would not have encountered if setuptools unzipped all eggs by default: http://allmydata.org/trac/setuptools/ticket/4 (I ought to migrate those notes to the new official setuptools issue tracker.) Regards, Zooko [1] http://mail.python.org/pipermail/distutils-sig/2007-December/ 008554.html
participants (3)
-
Andreas Jung
-
Jim Fulton
-
zooko