def coerce(cls, string):
        """Create a :class:`Requirement` object from a given package spec."""
        match = re.match(cls.spec_regex, string)
        if not match:
            raise InvalidRequirementSpecError("could not parse requirement")
        package = match.group(1)
        if all(match.group(2, 3)):
            version = "".join(match.group(2, 3))
        else:
            version = None
        return cls(package, version)
def __init__(self, parent, window):
		self._parent = parent
		self._window = window
		self._application = self._parent._application

		# create user interface
		self._container = gtk.VBox(False, 5)
		self._controls = gtk.HBox(False, 5)

		separator = gtk.HSeparator()

		# pack interface
		self._container.pack_end(separator, False, False, 0)
		self._container.pack_end(self._controls, False, False, 0)