Example #1
0
  def _generate_snapshot_bdist_wheel_argv(self, snapshot_fingerprint, is_platform_specific):
    """Create a command line to pass to :class:`SetupPyRunner`.

    Note that distutils will convert `snapshot_fingerprint` into a string suitable for a version
    tag. Currently for versioned target fingerprints, this seems to convert all punctuation into
    '.' and downcase all ASCII chars. See https://www.python.org/dev/peps/pep-0440/ for further
    information on allowed version names.

    NB: adds a '+' before the fingerprint to the build tag!
    """
    egg_info_snapshot_tag_args = ['egg_info', '--tag-build=+{}'.format(snapshot_fingerprint)]
    bdist_whl_args = ['bdist_wheel']
    if is_platform_specific:
      platform_args = ['--plat-name', pep425tags.get_platform()]
    else:
      platform_args = []

    dist_dir_args = ['--dist-dir', self._DIST_OUTPUT_DIR]

    setup_py_command = egg_info_snapshot_tag_args + bdist_whl_args + platform_args + dist_dir_args
    return setup_py_command
  def _generate_snapshot_bdist_wheel_argv(self, snapshot_fingerprint, is_platform_specific):
    """Create a command line to pass to :class:`SetupPyRunner`.

    Note that distutils will convert `snapshot_fingerprint` into a string suitable for a version
    tag. Currently for versioned target fingerprints, this seems to convert all punctuation into
    '.' and downcase all ASCII chars. See https://www.python.org/dev/peps/pep-0440/ for further
    information on allowed version names.

    NB: adds a '+' before the fingerprint to the build tag!
    """
    egg_info_snapshot_tag_args = ['egg_info', '--tag-build=+{}'.format(snapshot_fingerprint)]
    bdist_whl_args = ['bdist_wheel']
    if is_platform_specific:
      platform_args = ['--plat-name', pep425tags.get_platform()]
    else:
      platform_args = []

    dist_dir_args = ['--dist-dir', self._DIST_OUTPUT_DIR]

    return (['setup.py'] +
            egg_info_snapshot_tag_args +
            bdist_whl_args +
            platform_args +
            dist_dir_args)
def check_wheel_platform_matches_host(wheel_dist):
  _, _, wheel_platform = name_and_platform(wheel_dist)
  return wheel_platform == normalize_platform_tag(pep425tags.get_platform())
Example #4
0
def check_wheel_platform_matches_host(wheel_dist):
    _, _, wheel_platform = name_and_platform(wheel_dist)
    return wheel_platform == normalize_platform_tag(pep425tags.get_platform())
Example #5
0
def normalized_current_platform():
    return normalize_platform_tag(pep425tags.get_platform())
Example #6
0
def normalized_current_platform():
  return normalize_platform_tag(pep425tags.get_platform())
Example #7
0
 def current(cls):
     platform = get_platform()
     impl = get_abbr_impl()
     version = get_impl_ver()
     abi = get_abi_tag()
     return cls(platform, impl, version, abi)
Example #8
0
 def for_bdist_wheel(cls, source_dir, is_platform_specific, **kw):
   cmd = ['bdist_wheel']
   if is_platform_specific:
     cmd.extend(['--plat-name', pep425tags.get_platform()])
   cmd.extend(['--dist-dir', cls.DIST_DIR])
   return cls(source_dir, cmd, **kw)
Example #9
0
 def current(cls):
   platform = get_platform()
   impl = get_abbr_impl()
   version = get_impl_ver()
   abi = get_abi_tag()
   return cls(platform, impl, version, abi)