raise TargetDefinitionException(
"ERROR: no source or dependencies declared for target %s" % name)
if source and entry_point:
raise TargetDefinitionException(
"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.")
After Change
self._repositories = maybe_list(repositories or [])
self._indices = maybe_list(indices or [])
self._ignore_errors = bool(ignore_errors)
self._platforms = tuple(maybe_list(platforms or []))
if source and entry_point:
entry_point_module = entry_point.split(":", 1)[0]