reports its version number in .egg-info as 0.0.0

Bug #185418 reported by Zooko Wilcox-O'Hearn
4
Affects Status Importance Assigned to Milestone
zope.interface
Invalid
Undecided
Unassigned
zope3 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

On Ubuntu 7.10, the following .egg-info file is include with the "python-zopeinterface" package, version 3.3.1-3build2:

/usr/share/pycentral/python-zopeinterface/site-packages/zope.interface-0.0.0.egg-info

Related branches

Revision history for this message
Brian Sutherland (jinty) wrote :

This isn't really a bug in zope.interface. It's a packaging bug of some kind. I've assigned it to the ubuntu zope3 package as it obviously affects that.

The package in ubuntu is built using the Zope3 monolithic tarball (using zpkg!!!). This smells like a bad interaction between setuptools and zpkg in the install.py of that tarball.

One way of side-stepping this bug is to build the python-zopeinterface package directly from it's tarball at http://pypi.python.org/pypi/zope.interface which should sidestep this problem and others like it. i.e. basically split it out of the zope3 package.

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Isn't zpkg a moribund tool? Does this mean that it is unlikely that anybody is going to fix this so that building zope.interface from the zope3 tarball comes out with useful version numbers?

I would really like for zope.interface in Hardy Heron to have a meaningful version number in the standard Python metadata format, so that Python projects that depend on sufficiently new versions of zope.interface will install cleanly on Hardy.

Could we try building zope.interface from the zope.interface tarball instead of from the zope3 tarball?

Or could we just add a patch that fixes the version number?

Regards,

Zooko

Revision history for this message
Brian Sutherland (jinty) wrote :

> Could we try building zope.interface from the zope.interface tarball instead of from the zope3 tarball?

This is exactly what I suggested.

There is such a package (along with a lot of other zope.* packages) in the schooltool PPA (deb-src http://ppa.launchpad.net/schooltool-owners/ubuntu gutsy main). Unfortunately it is deficient in quite a few ways (no debug info, no copyright info).

I really would love to help out in this, but simply do not have the time for the next month or so.

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Yes, I knew that's what you suggested -- I meant to say "So can we do that?".

How can I help? I really want to be able to rely on distutils version numbers in Hardy Python packages in the future, as I expect to be deploying newly written Python software onto Hardy installations. I'm willing to spend a little bit of time (I don't think it will take much time!), but what can I do? Do I need some kind of write privileges to Hardy repositories in order to fix this?

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 185418] Re: reports its version number in .egg-info as 0.0.0

If someone can produce a reasonable patch, there are others who can review it,
integrate it and upload it, so no you don't need access to the Hardy
repositories. Attach a patch to the bug (preferably a debdiff if you know
how to make one) and someone else can follow up from there.

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Okay, how does one express in a patch "Start from the zope.interface tarball instead of the zope3 tarball?". :-)

Revision history for this message
Brian Sutherland (jinty) wrote :

I'd suggest patch the zope3 source package to not create python-zopeinterface binary package. Instead just throw the zope.interface code away when building zope3.

Then make a new source package, based around the zope.interface tarball that provides python-zopeinterface in some way.

Then the old zope3 monstrosity will depend on python-zopeinterface (as it now does).

Finally, the fun part is to try make sure you don't break the zope3 tarball when there is version skew between zope.interface and zope3. I'd suggest trying to integrate the zope3 tests into the autopkgtest framerwork. (I'm not sure if the 3.3 tests run properly on a read-only directory, which is a problem you will encounter, but I did get some patches in 3.4)

Revision history for this message
Scott Kitterman (kitterman) wrote :

With a diff.

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Oh geez, Brian's suggested fix sounds like a lot of work. How about instead some sort of bash or Python script to search and replace "0.0.0" with "3.3.1" in the PKG-INFO file and rename the "zope.interface-0.0.0.egg-info" to "zope.interface-3.3.1.egg-info". I'm serious -- this shouldn't be this much work.

Is there any chance that Ubuntu would accept a patch that simply replaced the version numbers?

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

So what about it, Ubuntu folks, would you accept a patch that simply uses sed, or patch, or Python to "mv zope.interface-0.0.0.egg-info zope.interface-3.3.1.egg-info" and replace "0.0.0" with "3.3.1" in the PKG-INFO file?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zope3 - 3.3.1-5ubuntu2

---------------
zope3 (3.3.1-5ubuntu2) hardy; urgency=low

  * Set the egg version for zope.interface to 3.3.1. LP: #185418.

 -- Matthias Klose <email address hidden> Wed, 09 Apr 2008 12:32:52 +0200

Changed in zope3:
status: New → Fix Released
Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Hooray!

Revision history for this message
Brian Sutherland (jinty) wrote :

Was a packaging artifact, never affected upstream zope.interface. Anyway, has been fixed for a long time.

Changed in zope.interface:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.