6ffda41d1538a5f8e6eab953346a95505c84c40c,src/python/twitter/pants/targets/python_binary.py,PythonBinary,__init__,#PythonBinary#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,38

Before Change


    if source and entry_point:
      entry_point_module = entry_point.split(":", 1)[0]
      source_entry_point = self._translate_to_entry_point(self.sources[0])
      if entry_point_module != source_entry_point:
        raise TargetDefinitionException(self,
            "Specified both source and entry_point but they do not agree: %s vs %s" % (
            source_entry_point, entry_point_module))

  @property
  def platforms(self):
    return self._platforms

After Change


          "Can only declare an entry_point if no source binary is specified.")
    if not isinstance(platforms, (list, tuple)) and not isinstance(platforms, Compatibility.string):
      raise TargetDefinitionException("platforms must be a list, tuple or string.")
    if not isinstance(interpreters, (list, tuple)):
      raise TargetDefinitionException("interpreters must be a list or tuple.")

    self._entry_point = entry_point
    self._inherit_path = bool(inherit_path)
    self._zip_safe = bool(zip_safe)
    self._interpreters = interpreters
    self._repositories = repositories or []
    self._indices = indices or []
    self._allow_pypi = bool(allow_pypi)
    self._ignore_errors = bool(ignore_errors)

    if isinstance(platforms, Compatibility.string):
      self._platforms = [platforms]
    else:
      self._platforms = platforms
    self._platforms = tuple(self._platforms)

    PythonTarget.__init__(self, name, [] if source is None else [source],
                          dependencies=dependencies,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: pantsbuild/pants
Commit Name: 6ffda41d1538a5f8e6eab953346a95505c84c40c
Time: 2014-01-17
Author: travis@twitter.com
File Name: src/python/twitter/pants/targets/python_binary.py
Class Name: PythonBinary
Method Name: __init__


Project Name: pantsbuild/pants
Commit Name: 272e8e62d42aefa3d2547ae9108858ffb7c2d172
Time: 2017-05-25
Author: stuhood@twitter.com
File Name: src/python/pants/backend/jvm/tasks/bundle_create.py
Class Name: BundleCreate
Method Name: bundle


Project Name: pantsbuild/pants
Commit Name: 3f5e994767718a930681d75bd59154525b02cd18
Time: 2014-01-19
Author: benjyw@gmail.com
File Name: src/python/twitter/pants/targets/python_binary.py
Class Name: PythonBinary
Method Name: __init__