[tahoe-dev] new foolscap version requirement

David-Sarah Hopwood david-sarah at jacaranda.org
Thu Jan 6 09:11:10 UTC 2011


On 2011-01-06 07:38, Zooko O'Whielacronx wrote:
> On Wed, Jan 5, 2011 at 11:48 AM, Brian Warner <warner at lothar.com> wrote:
>>
>>> -                  "foolscap[secure_connections] >= 0.5.1",
>>> +                  # foolscap < 0.6 is incompatible with Twisted 10.2.0.
>>> +                  "foolscap[secure_connections] >= 0.6.0",
> ...
>> But for everyone else, this introduces a needless incompatibility. For
>> example, the folks running on the current Ubuntu long-term support
>> release ("Lucid") get twisted-10.0 and foolscap-0.5.1, which Tahoe
>> handled just fine a few days ago. My local development tree just stopped
>> working after pulling the change, because I've got twisted-10.1 and
>> foolscap-0.5.1 .
> 
> Does the following fix the specific problem described above?
> 
> def get_package_version_tuple_from_setuptools(pkgname):
>     try:
>         return pkg_resources.parse_version(pkg_resources.require(pkgname)[0].version)
>     except pkg_resources.DistributionNotFound:
>         return None
> 
> install_requires.append('Twisted >= 2.4.0')
> twistedver = get_package_version_from_setuptools('Twisted')
>
> if twistedver and (twistedverstr < pkg_resources.parse_version('10.2')):
>     # If you already have Twisted < 10.2 installed, then you need
>     # foolscap >= 0.5.1.
>     install_requires.append('foolscap >= 0.5.1')
> else:
>     # Else, you need foolscap >= 0.6. (This is because you either
>     # already have Twisted >= 10.2 installed, or you have no version
>     # of Twisted installed, and when this build system automatically
>     # downloads one for you it is going to get one >= 10.2. If you end
>     # up with Twisted >= 10.2 then you require foolscap >= 0.6.)
>     install_requires.append('foolscap >= 0.6.0')

This checks the Twisted version at the time of the build. If the user later
installs Twisted 10.2 but still has foolscap 0.5.1, the Tahoe installation
will break, and the user will have to rebuild it.

-- 
David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 292 bytes
Desc: OpenPGP digital signature
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20110106/9714b7dd/attachment.pgp>


More information about the tahoe-dev mailing list