#149 closed defect (wontfix)

unable to use pre-installed non-distutils-aware nevow

Reported by: warner Owned by: zooko
Priority: critical Milestone: 1.4.1
Component: packaging Version: 1.3.0
Keywords: debian Cc:
Launchpad Bug:

Description

I just tried to upgrade the tahoebs1 testnet nodes, and got the following error:

$ allmydata-tahoe --version
Traceback (most recent call last):
  File "/usr/bin/allmydata-tahoe", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2479, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 585, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 483, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: nevow>=0.6.0

On this system, nevow is installed just fine:

$ python
Python 2.5.1 (r251:54863, May  2 2007, 16:56:35) 
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import nevow
>>> nevow.__version__
'0.9.0'
>>> 

The only problem is that it wasn't installed with an .egg (or an .egg-info). Most modern debian python packages contain .egg-info files, to let setuptools know that the package is available, but I think this nevow package is a bit behind the times.

Is there any way to allow perfectly usable support libraries like this get used? Note that this checking is being done by the generated setuptools entry-point script: the bin/allmydata-tahoe that we wrote just tries to import and run, rather than checking for existence before importing.

Change History (5)

comment:1 Changed at 2007-09-26T13:39:04Z by zooko

  • Resolution set to duplicate
  • Status changed from new to closed

merging into #141

comment:2 Changed at 2009-02-18T02:24:29Z by warner

  • Keywords debian added
  • Milestone changed from eventually to 1.3.1
  • Priority changed from major to critical
  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Version changed from 0.5.1 to 1.3.0

This is happening again, in the new 1.3.0 release. Zooko's looked at it briefly, and we believe that the problem is that we inadvertently started using the setuptools-generated entry point script as bin/tahoe, even in the debian package. When we made the changes in #141, we expected to keep using the non-setuptools bin/tahoe that comes in our source package.

The rough problem is that some platforms (Ubuntu/gutsy, in this case) do not include .egg-info files for all the libraries that Tahoe uses. There is code in _auto_deps.py to tolerate this at runtime (i.e. so you can 'import allmydata' without those .egg-info files), but the entry-point script is harder to satisfy.

So the fix will be to stop using the setuptools-generated entry point script in the debian package.

Some platforms have the necessary .egg-info files, so it might work (I believe that debian/sid is one of these).

Also see #630 for details about the kind of what-debian-platforms-are-we-compatible-with tests that we'd like to run automatically, to detect this sort of thing sooner in the future.

comment:3 Changed at 2009-02-18T17:54:35Z by warner

For gutsy debian packages, at least, it's sufficient to comment out the Nevow line in the egg-info/requires.txt file. We did that on our 'tahoecs2' gutsy machine and it seems to let the tahoe .deb run normally.

comment:4 Changed at 2009-03-12T15:10:15Z by zooko

  • Resolution set to wontfix
  • Status changed from reopened to closed
  • Summary changed from unable to use pre-installed non-setuptools-aware nevow to unable to use pre-installed non-distutils-aware nevow

I changed the name of this ticket to emphasize that .egg-info files are not setuptools-specific. They are produced by default by distutils in all Python >= 2.5, and are the standard way for Python packages ("distributions") to declare their name and version number in a machine-parseable way. In the past some Linux distributions accidentally omitted the .egg-info files, but that is becoming more and more rare as everyone got used to Python 2.5 and as the maintainers of Linux distributions eventually realized that these files are not setuptools-specific. It is an unfortunate naming problem that they are named .egg-info even when the packages were produced by distutils without setuptools and were never packaged as eggs at any point in their entire development and deployment. Oh well. I think I'll open a ticket requesting that distutils automatically generate a symlink from ".pkg-info -> .egg-info" from now on...

Anyway, all that is merely an aside that I wish to emphasize in order that it will sink in to everyone who sees this ticket! The real point of this comment is that the underlying source of this problem is that nevow in Gutsy doesn't come with a .egg-info file. This problem was fixed starting in Hardy -- nevow there comes with a .egg-info file -- and presumably will remain fixed for all future versions of Ubuntu. So I'm closing this ticket as "wontfix" -- per discussion on #630 Ubuntu Hardy is the oldest version of Ubuntu on which new releases of Tahoe will have the runs-from-package property.

comment:5 Changed at 2009-03-12T16:03:02Z by zooko

http://bugs.python.org/issue5480 # ".egg-info" => ".pkg-info"

Note: See TracTickets for help on using tickets.