'Base method to get dependencies, given a set of extras
to satisfy and an optional environment context.
:param reqts: A list of sometimes-wanted dependencies,
perhaps dependent on extras and environment.
:param extras: A list of optional components being requested.
:param env: An optional environment for marker evaluation.'

def get_requirements(self, reqts, extras=None, env=None):

    if self._legacy:
        result = reqts
    else:
        result = []
        extras = get_extras((extras or []), self.extras)
        for d in reqts:
            if ((u'extra' not in d) and (u'environment' not in d)):
                include = True
            else:
                if (u'extra' not in d):
                    include = True
                else:
                    include = (d.get(u'extra') in extras)
                if include:
                    marker = d.get(u'environment')
                    if marker:
                        include = interpret(marker, env)
            if include:
                result.extend(d[u'requires'])
        for key in (u'build', u'dev', u'test'):
            e = (u':%s:' % key)
            if (e in extras):
                extras.remove(e)
                reqts = self._data.get((u'%s_requires' % key), [])
                result.extend(self.get_requirements(reqts, extras=extras, env=env))
    return result
