- def find(self, requirement,
+ def find(self, requirement, e, prereleases=False):
- Find a distribution matching requirement and all distributions
- it depends on. Use the ``tests`` argument to determine whether
- distributions used only for testing should be included in the
- results. Allow ``requirement`` to be either a :class:`Distribution`
- instance or a string expressing a requirement. If ``prereleases``
- is True, allow pre-release versions to be returned - otherwise,
+ Find a distribution and all distributions it depends on.
+ :param requirement: The requirement specifying the distribution to
+ find, or a Distribution instance.
+ :param extras: Additional extras. This can be used e.g. to include
+ special extras such as :test:, :build: and so on.
+ :param prereleases: If ``True``, allow pre-release versions to be
+ returned - otherwise, don't return prereleases
+ unless they're all that's available.
Return a set of :class:`Distribution` instances and a set of
install_dists = set([odist])
- name = dist.key # case-insensitive
+ name = dist.key # case-insensitive
if name not in self.dists_by_name:
ireqts = dist.run_requires | dist.meta_requires
sreqts = dist.build_requires
if not tests or dist not in install_dists:
treqts = dist.test_requires
- all_reqts = ireqts | sreqts | treqts
+ all_reqts = ireqts | sreqts | treqts
providers = self.find_providers(r)