Python pip._internal.locations.distutils_scheme() Examples

The following are 30 code examples of pip._internal.locations.distutils_scheme(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module pip._internal.locations , or try the search function .
Example #1
Source File: install.py    From guildai with Apache License 2.0 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #2
Source File: install.py    From pySINDy with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #3
Source File: install.py    From Building-Recommendation-Systems-with-Python with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #4
Source File: install.py    From Building-Recommendation-Systems-with-Python with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #5
Source File: install.py    From scylla with Apache License 2.0 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #6
Source File: install.py    From stopstalk-deployment with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #7
Source File: install.py    From Hands-On-Application-Development-with-PyCharm with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #8
Source File: install.py    From Weapon-Detection-And-Classification with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #9
Source File: install.py    From rules_pip with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #10
Source File: pip_util.py    From guildai with Apache License 2.0 5 votes vote down vote up
def lib_dir(
    name, wheeldir, user=False, home=None, root=None, isolated=False, prefix=None
):
    from pip._internal.locations import distutils_scheme
    from pip._internal.wheel import root_is_purelib

    scheme = distutils_scheme(
        "", user=user, home=home, root=root, isolated=isolated, prefix=prefix
    )
    if root_is_purelib(name, wheeldir):
        return scheme['purelib']
    else:
        return scheme['platlib'] 
Example #11
Source File: install.py    From learn_python3_spider with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #12
Source File: install.py    From coffeegrindsize with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #13
Source File: install.py    From CogAlg with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #14
Source File: install.py    From Carnets with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #15
Source File: install.py    From V1EngineeringInc-Docs with Creative Commons Attribution Share Alike 4.0 International 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #16
Source File: install.py    From android_universal with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #17
Source File: install.py    From fxxkpython with GNU General Public License v3.0 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #18
Source File: install.py    From fxxkpython with GNU General Public License v3.0 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #19
Source File: install.py    From fxxkpython with GNU General Public License v3.0 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #20
Source File: install.py    From twitter-stock-recommendation with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #21
Source File: install.py    From GraphicDesignPatternByPython with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #22
Source File: install.py    From Mastering-Elasticsearch-7.0 with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #23
Source File: test_prefix_deviation.py    From pyang with ISC License 5 votes vote down vote up
def test_can_find_modules_when_prefix_differ(monkeypatch):
    """
    context should find the default installed modules, without the help
        of environment variables, even of the pip install location
        differs from ``sys.prefix``
    """

    # store pip location.
    # monkeypatching sys.prefix will side_effect scheme.
    scheme = locations.distutils_scheme('pyang')
    monkeypatch.setattr(
        locations, 'distutils_scheme', lambda *_: scheme)

    # simulate #225 description
    monkeypatch.setattr(sys, 'prefix', '/usr')

    # remove obfuscation from env vars
    if os.environ.get('YANG_INSTALL'):
        del os.environ['YANG_INSTALL']

    if os.environ.get('YANG_MODPATH'):
        del os.environ['YANG_MODPATH']

    ctx = create_context()
    module = ctx.search_module(None, EXISTING_MODULE)
    assert module is not None 
Example #24
Source File: install.py    From pex with Apache License 2.0 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #25
Source File: install.py    From Mastering-Elasticsearch-7.0 with MIT License 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #26
Source File: install.py    From deepWordBug with Apache License 2.0 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #27
Source File: install.py    From FuYiSpider with Apache License 2.0 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #28
Source File: install.py    From FuYiSpider with Apache License 2.0 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #29
Source File: install.py    From hacktoberfest2018 with GNU General Public License v3.0 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']] 
Example #30
Source File: install.py    From hacktoberfest2018 with GNU General Public License v3.0 5 votes vote down vote up
def get_lib_location_guesses(*args, **kwargs):
    scheme = distutils_scheme('', *args, **kwargs)
    return [scheme['purelib'], scheme['platlib']]