[Pythonmac-SIG] py2app not happy with zope.interface

Ronald Oussoren ronaldoussoren at mac.com
Sat Jul 31 09:14:45 CEST 2010


On 30 Jul, 2010, at 18:24, Russell Owen wrote:

> 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.

As pip is a fairly popular tools fixing the the issue in py2app would be better. 

> 
> 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'm almost certain this is the "--single-version-externally-managed " option of setuptools. This is meant to be used with tools that don't want .egg directories/files and cannot deal with two packages that install the same files, such as the linux packaging tools.

> I hope all this becomes a lot easier once the package metadata PEPs are implemented.

The metadata PEP has explicit support for having two packages that install exactly the same copy of a file, too bad pip doesn't use it (and that support for it wasn't added in python 2.7's distutils, IMO Tarek was too conservative there).

Ronald

> 
> -- 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
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3567 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20100731/bc369049/attachment.bin>


More information about the Pythonmac-SIG mailing list