Skip to content

Commit

Permalink
rickeylev review: removing unused code and using TOOLS_REPO
Browse files Browse the repository at this point in the history
  • Loading branch information
fahhem committed Dec 21, 2022
1 parent 8f221ed commit 2e4d998
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import net.starlark.java.eval.Starlark;
import net.starlark.java.eval.StarlarkThread;
import net.starlark.java.syntax.Location;
import com.google.devtools.build.lib.analysis.configuredtargets.InputFileConfiguredTarget;

/**
* Instance of the provider type that describes Python runtimes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
public interface PyRuntimeInfoApi<FileT extends FileApi> extends StarlarkValue {

static final String DEFAULT_STUB_SHEBANG = "#!/usr/bin/env python3";
static final String DEFAULT_BOOTSTRAP_TEMPLATE = "//tools/python:python_bootstrap_template.txt";

@StarlarkMethod(
name = "interpreter_path",
Expand Down Expand Up @@ -219,6 +218,7 @@ interface PyRuntimeInfoProviderApi extends ProviderApi {
name = "bootstrap_template",
allowedTypes = {
@ParamType(type = FileApi.class),
@ParamType(type = NoneType.class),
},
positional = false,
named = true,
Expand Down
4 changes: 3 additions & 1 deletion src/main/starlark/builtins_bzl/common/python/providers.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
# limitations under the License.
"""Providers for Python rules."""

load(":common/python/semantics.bzl", "TOOLS_REPO")

DEFAULT_STUB_SHEBANG = "#!/usr/bin/env python3"
DEFAULT_BOOTSTRAP_TEMPLATE = "@bazel_tools//tools/python:python_bootstrap_template.txt"
DEFAULT_BOOTSTRAP_TEMPLATE = "@" + TOOLS_REPO + "//tools/python:python_bootstrap_template.txt"
_PYTHON_VERSION_VALUES = ["PY2", "PY3"]

def _PyRuntimeInfo_init(
Expand Down

0 comments on commit 2e4d998

Please sign in to comment.