[tahoe-dev] [tahoe-lafs] #530: use setuptools's --multi-version mode

tahoe-lafs trac at tahoe-lafs.org
Wed Oct 6 18:26:09 UTC 2010

#530: use setuptools's --multi-version mode
     Reporter:  zooko        |       Owner:  cgalvan   
         Type:  enhancement  |      Status:  closed    
     Priority:  major        |   Milestone:  undecided 
    Component:  packaging    |     Version:  1.2.0     
   Resolution:  fixed        |    Keywords:  setuptools
Launchpad Bug:               |  

Comment (by warner):

 After this change, a "python setup.py build" that shouldn't do anything
 do it twice and capture the output from the second run) emits 353 lines,
 including 16 copies of a warning about how to use versioned dependencies
 the importing code:

 Using /home/warner/stuff/tahoe/darcs-trunk/support/lib/python2.6/site-

 Because this distribution was installed --multi-version, before you can
 import modules from this package in an application, you will need to
 'import pkg_resources' and then use a 'require()' call similar to one of
 these examples, in order to select the desired version:

     pkg_resources.require("zbase32")  # latest installed version
     pkg_resources.require("zbase32==1.1.2")  # this exact version
     pkg_resources.require("zbase32>=1.1.2")  # this version or higher

 Note also that the installation directory must be on sys.path at runtime
 this to work.  (e.g. by being the application's script directory, by being
 PYTHONPATH, or by being added to sys.path by your code.)

 I suppose that this is a benign warning, but there's too much output there
 for me to tell: I first assumed that it was a fatal error.

 After building it, trying to run {{{setup.py test}}} on my debian box
 (after emitting the same 353 lines of warnings):

 pkg_resources.VersionConflict: (pycryptopp 0.5.17
 (/usr/lib/pymodules/python2.6), Requirement.parse('pycryptopp>=0.5.20'))

 That 0.5.17 is from the current debian/sid python-pycryptopp {{{.deb}}}
 package, which
 includes .egg-info data (and {{{pkg_resources.require("pycryptopp")}}}
 returns 0.5.17).

 Does {{{--multi-version}}} break if there is a version on PYTHONPATH that
 installed '''without''' {{{--multi-version}}}?

Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/530#comment:9>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage

More information about the tahoe-dev mailing list