def get_installation_order(self, req_set):<EOL>
<EOL>order = []<EOL>ordered_reqs = set()  <EOL>def schedule(req):<EOL><INDENT>if req.satisfied_by or req in ordered_reqs:<EOL><INDENT>return<EOL><DEDENT>if req.constraint:<EOL><INDENT>return<EOL><DEDENT>ordered_reqs.add(req)<EOL>for dep in self._discovered_dependencies[req.name]:<EOL><INDENT>schedule(dep)<EOL><DEDENT>order.append(req)<EOL><DEDENT>for install_req in req_set.requirements.values():<EOL><INDENT>schedule(install_req)<EOL><DEDENT>return order<EOL>
Create the installation order.

        The installation order is topological - requirements are installed
        before the requiring thing. We break cycles at an arbitrary point,
        and make no other guarantees.