def _get_pip_requirements_file(session, transport, crypto=None, requirements_type='ci'):
    assert (requirements_type in ('ci', 'pkg'))
    pydir = _get_pydir(session)
    if IS_WINDOWS:
        if (crypto is None):
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, '{}-windows.txt'.format(transport))
            if os.path.exists(_requirements_file):
                return _requirements_file
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'windows.txt')
            if os.path.exists(_requirements_file):
                return _requirements_file
        _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'windows-crypto.txt')
        if os.path.exists(_requirements_file):
            return _requirements_file
    elif IS_DARWIN:
        if (crypto is None):
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, '{}-darwin.txt'.format(transport))
            if os.path.exists(_requirements_file):
                return _requirements_file
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'darwin.txt')
            if os.path.exists(_requirements_file):
                return _requirements_file
        _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'darwin-crypto.txt')
        if os.path.exists(_requirements_file):
            return _requirements_file
    elif IS_FREEBSD:
        if (crypto is None):
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, '{}-freebsd.txt'.format(transport))
            if os.path.exists(_requirements_file):
                return _requirements_file
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'freebsd.txt')
            if os.path.exists(_requirements_file):
                return _requirements_file
        _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'freebsd-crypto.txt')
        if os.path.exists(_requirements_file):
            return _requirements_file
    else:
        _install_system_packages(session)
        if (crypto is None):
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, '{}-linux.txt'.format(transport))
            if os.path.exists(_requirements_file):
                return _requirements_file
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'linux.txt')
            if os.path.exists(_requirements_file):
                return _requirements_file
        _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'linux-crypto.txt')
        if os.path.exists(_requirements_file):
            return _requirements_file
def _get_pip_requirements_file(session, transport, crypto=None, requirements_type='ci'):
    assert (requirements_type in ('ci', 'pkg'))
    pydir = _get_pydir(session)
    if IS_WINDOWS:
        if (crypto is None):
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, '{}-windows.txt'.format(transport))
            if os.path.exists(_requirements_file):
                return _requirements_file
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'windows.txt')
            if os.path.exists(_requirements_file):
                return _requirements_file
        _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'windows-crypto.txt')
        if os.path.exists(_requirements_file):
            return _requirements_file
    elif IS_DARWIN:
        if (crypto is None):
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, '{}-darwin.txt'.format(transport))
            if os.path.exists(_requirements_file):
                return _requirements_file
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'darwin.txt')
            if os.path.exists(_requirements_file):
                return _requirements_file
        _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'darwin-crypto.txt')
        if os.path.exists(_requirements_file):
            return _requirements_file
    elif IS_FREEBSD:
        if (crypto is None):
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, '{}-freebsd.txt'.format(transport))
            if os.path.exists(_requirements_file):
                return _requirements_file
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'freebsd.txt')
            if os.path.exists(_requirements_file):
                return _requirements_file
        _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'freebsd-crypto.txt')
        if os.path.exists(_requirements_file):
            return _requirements_file
    else:
        _install_system_packages(session)
        if (crypto is None):
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, '{}-linux.txt'.format(transport))
            if os.path.exists(_requirements_file):
                return _requirements_file
            _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'linux.txt')
            if os.path.exists(_requirements_file):
                return _requirements_file
        _requirements_file = os.path.join('requirements', 'static', requirements_type, pydir, 'linux-crypto.txt')
        if os.path.exists(_requirements_file):
            return _requirements_file