Skip to content

Commit

Permalink
runfiles,Python: remove library from @bazel_tools
Browse files Browse the repository at this point in the history
Temporarily remove the Python runfiles library
from @bazel_tools and so prevent releasing it in
Bazel 0.12.0.

Motivation: #4878

Fixing that bug *after* the python library is in
release Bazel would be harder because users would
need to update their code and BUILD files.

Fixing that bug before the library is released is
a lot easier because nobody depends on it yet, and
we can release the library when it's in the right
place.

Closes #4879.

Change-Id: I8adc219410571f9e2a4c8060f5b3239b957fbd5f
PiperOrigin-RevId: 189744985
  • Loading branch information
laszlocsomor authored and Copybara-Service committed Mar 20, 2018
1 parent f87a656 commit b1be581
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
18 changes: 12 additions & 6 deletions src/test/py/bazel/runfiles_test.py
Expand Up @@ -131,15 +131,19 @@ def _AssertPythonRunfilesLibraryInBazelToolsRepo(self, family, lang_name):

i += 2

def testPythonRunfilesLibraryInBazelToolsRepo(self):
self._AssertPythonRunfilesLibraryInBazelToolsRepo("py", "Python")
# TODO(laszlocsomor): re-enable after
# https://github.com/bazelbuild/bazel/issues/4878 is fixed.
# def testPythonRunfilesLibraryInBazelToolsRepo(self):
# self._AssertPythonRunfilesLibraryInBazelToolsRepo("py", "Python")

def testRunfilesLibrariesFindRunfilesWithoutEnvvars(self):
for s, t in [
("WORKSPACE.mock", "WORKSPACE"),
("bar/BUILD.mock", "bar/BUILD"),
("bar/bar.py", "bar/bar.py"),
("bar/bar-py-data.txt", "bar/bar-py-data.txt"),
# TODO(laszlocsomor): uncomment Python files after
# https://github.com/bazelbuild/bazel/issues/4878 is fixed.
# ("bar/bar.py", "bar/bar.py"),
# ("bar/bar-py-data.txt", "bar/bar-py-data.txt"),
("bar/Bar.java", "bar/Bar.java"),
("bar/bar-java-data.txt", "bar/bar-java-data.txt"),
]:
Expand All @@ -151,10 +155,12 @@ def testRunfilesLibrariesFindRunfilesWithoutEnvvars(self):
self.AssertExitCode(exit_code, 0, stderr)
bazel_bin = stdout[0]

exit_code, _, stderr = self.RunBazel(["build", "//bar:all"])
exit_code, _, stderr = self.RunBazel(["build", "//bar:bar-java"])
self.AssertExitCode(exit_code, 0, stderr)

for lang in [("py", "Python", "bar.py"), ("java", "Java", "Bar.java")]:
# TODO(laszlocsomor): add Python after
# https://github.com/bazelbuild/bazel/issues/4878 is fixed.
for lang in [("java", "Java", "Bar.java")]:
if test_base.TestBase.IsWindows():
bin_path = os.path.join(bazel_bin, "bar/bar-%s.exe" % lang[0])
else:
Expand Down
5 changes: 0 additions & 5 deletions tools/runfiles/BUILD.tools
Expand Up @@ -4,8 +4,3 @@ alias(
name = "java-runfiles",
actual = "//src/tools/runfiles/java/com/google/devtools/build/runfiles",
)

py_library(
name = "py-runfiles",
srcs = ["runfiles.py"],
)

0 comments on commit b1be581

Please sign in to comment.