Esempio n. 1
0
def ensure_setup_requires_site_dir(reqs_to_resolve,
                                   interpreter,
                                   site_dir,
                                   platforms=None):
    if not reqs_to_resolve:
        return None

    setup_requires_dists = resolve_multi(interpreter, reqs_to_resolve,
                                         platforms, None)

    # FIXME: there's no description of what this does or why it's necessary.
    overrides = {
        'purelib': site_dir,
        'headers': os.path.join(site_dir, 'headers'),
        'scripts': os.path.join(site_dir, 'bin'),
        'platlib': site_dir,
        'data': site_dir
    }

    # The `python_dist` target builds for the current platform only.
    # FIXME: why does it build for the current platform only?
    for obj in setup_requires_dists['current']:
        wf = WheelFile(obj.location)
        wf.install(overrides=overrides, force=True)

    return SetupRequiresSiteDir(site_dir)
Esempio n. 2
0
def ensure_setup_requires_site_dir(reqs_to_resolve, interpreter, site_dir,
                                   platforms=None):
  if not reqs_to_resolve:
    return None

  setup_requires_dists = resolve_multi(interpreter, reqs_to_resolve, platforms, None)

  # FIXME: there's no description of what this does or why it's necessary.
  overrides = {
    'purelib': site_dir,
    'headers': os.path.join(site_dir, 'headers'),
    'scripts': os.path.join(site_dir, 'bin'),
    'platlib': site_dir,
    'data': site_dir
  }

  # The `python_dist` target builds for the current platform only.
  # FIXME: why does it build for the current platform only?
  for obj in setup_requires_dists['current']:
    wf = WheelFile(obj.location)
    wf.install(overrides=overrides, force=True)

  return SetupRequiresSiteDir(site_dir)