Other Python packages can then specify that they depend on "foolscap with its extra feature of 'secure_connections'". This is spelled "foolscap[secure_connections]". Tahoe-LAFS does this:
Currently the packaging of foolscap in Natty claims that it doesn't know about the "secure_connections" feature:
$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> pkg_resources.require('foolscap')
[foolscap 0.6.1 (/usr/lib/python2.7/dist-packages)]
>>> pkg_resources.require('foolscap[secure_connections]')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 654, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 557, in resolve
requirements.extend(dist.requires(req.extras)[::-1])
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2180, in requires
"%s has no such extra feature %r" % (self, ext)
pkg_resources.UnknownExtra: foolscap 0.6.1 has no such extra feature 'secure_connections'
This means that, for example, the tahoe-lafs executable that is packaged in Natty cannot start:
$ tahoe --version
Traceback (most recent call last):
File "/usr/bin/tahoe", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2671, in <module>
working_set.require(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 654, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 557, in resolve
requirements.extend(dist.requires(req.extras)[::-1])
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2180, in requires
"%s has no such extra feature %r" % (self, ext)
pkg_resources.UnknownExtra: foolscap 0.6.1 has no such extra feature 'secure_connections'
$ type tahoe
tahoe is hashed (/usr/bin/tahoe)
$ dpkg --search /usr/bin/tahoe
tahoe-lafs: /usr/bin/tahoe
$ apt-cache policy tahoe-lafs
tahoe-lafs:
Installed: 1.8.2-0ubuntu1
Candidate: 1.8.2-0ubuntu1
Version table:
*** 1.8.2-0ubuntu1 0
500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ natty/universe i386 Packages
100 /var/lib/dpkg/status
So the easiest way to fix this is probably to configure the Ubuntu packaging of foolscap to indicate that setuptools is a build-time requirement of foolscap, and then rebuild. This should produce the metadata file (named /usr/share/pyshared/foolscap-0.6.1.egg-info/requires.txt ) that indicates that this distribution of foolscap knows how to provide secure_connections, as long as it is in turn provided with pyOpenSSL.
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: python-foolscap 0.6.1-1
ProcVersionSignature: Ubuntu 2.6.38-8.42-virtual 2.6.38.2
Uname: Linux 2.6.38-8-virtual i686
Architecture: i386
Date: Fri May 13 20:23:17 2011
Ec2AMI: ami-ccf405a5
Ec2AMIManifest: (unknown)
Ec2AvailabilityZone: us-east-1a
Ec2InstanceType: t1.micro
Ec2Kernel: aki-407d9529
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: foolscap
UpgradeStatus: Upgraded to natty on 2011-05-13 (0 days ago)
The foolscap setup.py file (http:// foolscap. lothar. com/trac/ browser/ setup.py? annotate= blame&rev= 7c7b1185b68076c c6176ea41b5fc67 7445e1e45b# L75 ) says that if a package that requires foolscap requires an extra feature named "secure_ connections" then foolscap requires pyOpenSSL.
Other Python packages can then specify that they depend on "foolscap with its extra feature of 'secure_ connections' ". This is spelled "foolscap[ secure_ connections] ". Tahoe-LAFS does this:
http:// tahoe-lafs. org/trac/ tahoe-lafs/ browser/ trunk/src/ allmydata/ _auto_deps. py?annotate= blame&rev= 4976#L21
Currently the packaging of foolscap in Natty claims that it doesn't know about the "secure_ connections" feature:
$ python require( 'foolscap' ) python2. 7/dist- packages) ] require( 'foolscap[ secure_ connections] ') python2. 7/dist- packages/ pkg_resources. py", line 654, in require parse_requireme nts(requirement s)) python2. 7/dist- packages/ pkg_resources. py", line 557, in resolve s.extend( dist.requires( req.extras) [::-1]) python2. 7/dist- packages/ pkg_resources. py", line 2180, in requires UnknownExtra: foolscap 0.6.1 has no such extra feature 'secure_ connections'
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> pkg_resources.
[foolscap 0.6.1 (/usr/lib/
>>> pkg_resources.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
needed = self.resolve(
File "/usr/lib/
requirement
File "/usr/lib/
"%s has no such extra feature %r" % (self, ext)
pkg_resources.
This means that, for example, the tahoe-lafs executable that is packaged in Natty cannot start:
$ tahoe --version python2. 7/dist- packages/ pkg_resources. py", line 2671, in <module> set.require( __requires_ _) python2. 7/dist- packages/ pkg_resources. py", line 654, in require parse_requireme nts(requirement s)) python2. 7/dist- packages/ pkg_resources. py", line 557, in resolve s.extend( dist.requires( req.extras) [::-1]) python2. 7/dist- packages/ pkg_resources. py", line 2180, in requires UnknownExtra: foolscap 0.6.1 has no such extra feature 'secure_ connections' us-east- 1.ec2.archive. ubuntu. com/ubuntu/ natty/universe i386 Packages dpkg/status
Traceback (most recent call last):
File "/usr/bin/tahoe", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/
working_
File "/usr/lib/
needed = self.resolve(
File "/usr/lib/
requirement
File "/usr/lib/
"%s has no such extra feature %r" % (self, ext)
pkg_resources.
$ type tahoe
tahoe is hashed (/usr/bin/tahoe)
$ dpkg --search /usr/bin/tahoe
tahoe-lafs: /usr/bin/tahoe
$ apt-cache policy tahoe-lafs
tahoe-lafs:
Installed: 1.8.2-0ubuntu1
Candidate: 1.8.2-0ubuntu1
Version table:
*** 1.8.2-0ubuntu1 0
500 http://
100 /var/lib/
By inspecting the foolscap setup.py, you can see that the stanza that declares this extra feature is inside a test for the existence of setuptools: http:// foolscap. lothar. com/trac/ browser/ setup.py? annotate= blame&rev= 7c7b1185b68076c c6176ea41b5fc67 7445e1e45b# L65
So the easiest way to fix this is probably to configure the Ubuntu packaging of foolscap to indicate that setuptools is a build-time requirement of foolscap, and then rebuild. This should produce the metadata file (named /usr/share/ pyshared/ foolscap- 0.6.1.egg- info/requires. txt ) that indicates that this distribution of foolscap knows how to provide secure_connections, as long as it is in turn provided with pyOpenSSL.
ProblemType: Bug ature: Ubuntu 2.6.38-8.42-virtual 2.6.38.2 Zone: us-east-1a ture: all
DistroRelease: Ubuntu 11.04
Package: python-foolscap 0.6.1-1
ProcVersionSign
Uname: Linux 2.6.38-8-virtual i686
Architecture: i386
Date: Fri May 13 20:23:17 2011
Ec2AMI: ami-ccf405a5
Ec2AMIManifest: (unknown)
Ec2Availability
Ec2InstanceType: t1.micro
Ec2Kernel: aki-407d9529
Ec2Ramdisk: unavailable
PackageArchitec
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: foolscap
UpgradeStatus: Upgraded to natty on 2011-05-13 (0 days ago)