Fixing py2app would be great, but perhaps it would suffice to document
the problem and let the user of py2app to fix the bizarre install left
by pip.
I'll file some kind of "complaint" against pip -- though I would not
be at all surprised if this was a side effect of setuptools;
easy_install has an obsession with .pth files.
I hope all this becomes a lot easier once the package metadata PEPs
are implemented.
-- Russell
On Jul 29, 2010, at 11:06 PM, Ronald Oussoren wrote:
On 22 Jul, 2010, at 19:06, Russell E. Owen wrote:
How did you install zope.interface? Basically which easy_install
or pip
command-line did you use to install?
I used "pip install zope.interface".
When you use "pip install" to install packages namespace packages
get installed in an odd way: the __init__.py file in the namespace
package is not installed, and pth file is installed to fakes having
a real package, for zope.interface the following
tet installed:
* zope
* zope.interface-3.6.1-py2.7-nspkg.pth
* zope.interface-3.6.1-py2.7.egg-info
The nspkg.pth file is very ugly:
import sys,types,os; p =
os.path.join(sys._getframe(1).f_locals['sitedir'], *('zope',)); ie =
os.path.exists(os.path.join(p,'__init__.py')); m = not ie and
sys.modules.setdefault('zope',types.ModuleType('zope')); mp = (m or
[]) and m.__dict__.setdefault('__path__',[]); (p not in mp) and
mp.append(p)
It should be easy enough to teach modulegraph about this and insert
and empty __init__.py file insite the zip file in the app bundle.
Increasinly-hating-setuptools[*],
Ronald
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG