"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
After Change
self._platforms = tuple(maybe_list(platforms or []))
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" % (