diff --git a/.gitignore b/.gitignore index 716b1b3..be4f812 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .bazeliskrc .ijwb bazel-* +MODULE.bazel.lock diff --git a/distro/BUILD b/distro/BUILD index 0ffa34a..19ffa20 100644 --- a/distro/BUILD +++ b/distro/BUILD @@ -98,7 +98,7 @@ py_test( ], deps = [ "//pkg/releasing:release_utils", - "@bazel_tools//tools/python/runfiles", + "@rules_python//python/runfiles", ], ) diff --git a/distro/packaging_test.py b/distro/packaging_test.py index 3e2a38c..38c34c8 100644 --- a/distro/packaging_test.py +++ b/distro/packaging_test.py @@ -19,7 +19,7 @@ import re import subprocess import unittest -from bazel_tools.tools.python.runfiles import runfiles +from python.runfiles import runfiles from pkg.releasing import release_tools from distro import release_version diff --git a/tests/BUILD b/tests/BUILD index c22b12c..6e37f63 100644 --- a/tests/BUILD +++ b/tests/BUILD @@ -89,7 +89,7 @@ py_test( srcs_version = "PY3", deps = [ "//pkg/private:archive", - "@bazel_tools//tools/python/runfiles", + "@rules_python//python/runfiles", ], ) @@ -208,7 +208,7 @@ py_test( ], python_version = "PY3", deps = [ - "@bazel_tools//tools/python/runfiles", + "@rules_python//python/runfiles", ], ) diff --git a/tests/archive_test.py b/tests/archive_test.py index 21ddd5e..4c604c6 100644 --- a/tests/archive_test.py +++ b/tests/archive_test.py @@ -15,7 +15,7 @@ import unittest -from bazel_tools.tools.python.runfiles import runfiles +from python.runfiles import runfiles from pkg.private import archive diff --git a/tests/deb/BUILD b/tests/deb/BUILD index 655b46b..48df2de 100644 --- a/tests/deb/BUILD +++ b/tests/deb/BUILD @@ -104,7 +104,7 @@ py_test( python_version = "PY3", deps = [ "//pkg/private:archive", - "@bazel_tools//tools/python/runfiles", + "@rules_python//python/runfiles", ], ) diff --git a/tests/deb/pkg_deb_test.py b/tests/deb/pkg_deb_test.py index 285a965..8a2e653 100644 --- a/tests/deb/pkg_deb_test.py +++ b/tests/deb/pkg_deb_test.py @@ -22,7 +22,7 @@ import sys import tarfile import unittest -from bazel_tools.tools.python.runfiles import runfiles +from python.runfiles import runfiles from pkg.private import archive diff --git a/tests/mappings/BUILD b/tests/mappings/BUILD index eb97f9f..6431ed9 100644 --- a/tests/mappings/BUILD +++ b/tests/mappings/BUILD @@ -38,7 +38,7 @@ py_library( imports = ["../.."], srcs_version = "PY3", deps = [ - "@bazel_tools//tools/python/runfiles", + "@rules_python//python/runfiles", ], ) diff --git a/tests/mappings/manifest_test_lib.py b/tests/mappings/manifest_test_lib.py index f403304..cd79f26 100644 --- a/tests/mappings/manifest_test_lib.py +++ b/tests/mappings/manifest_test_lib.py @@ -16,7 +16,7 @@ import json import unittest -from bazel_tools.tools.python.runfiles import runfiles +from python.runfiles import runfiles class ContentManifestTest(unittest.TestCase): """Test harness to see if we wrote the content manifest correctly.""" diff --git a/tests/stamp_test.py b/tests/stamp_test.py index 7ba722b..3709a1b 100644 --- a/tests/stamp_test.py +++ b/tests/stamp_test.py @@ -19,7 +19,7 @@ import time import unittest import zipfile -from bazel_tools.tools.python.runfiles import runfiles +from python.runfiles import runfiles # keep in sync with archive.py PORTABLE_MTIME = 946684800 # 2000-01-01 00:00:00.000 UTC diff --git a/tests/tar/BUILD b/tests/tar/BUILD index 93f2e47..986f755 100644 --- a/tests/tar/BUILD +++ b/tests/tar/BUILD @@ -50,7 +50,7 @@ py_test( srcs_version = "PY3", deps = [ "//pkg/private/tar:tar_writer", - "@bazel_tools//tools/python/runfiles", + "@rules_python//python/runfiles", ], ) @@ -208,7 +208,7 @@ pkg_tar( name = "test-tar-strip_prefix-dot", srcs = [ ":etc/nsswitch.conf", - "@bazel_tools//tools/python/runfiles", + "@rules_python//python/runfiles", ], strip_prefix = ".", ) @@ -385,7 +385,7 @@ py_test( python_version = "PY3", deps = [ "//pkg/private/tar:tar_writer", - "@bazel_tools//tools/python/runfiles", + "@rules_python//python/runfiles", ], ) @@ -468,7 +468,7 @@ py_test( python_version = "PY3", srcs_version = "PY3", deps = [ - "@bazel_tools//tools/python/runfiles", + "@rules_python//python/runfiles", ], ) diff --git a/tests/tar/is_compressed_test.py b/tests/tar/is_compressed_test.py index 6ed7386..5e55a06 100644 --- a/tests/tar/is_compressed_test.py +++ b/tests/tar/is_compressed_test.py @@ -15,7 +15,7 @@ import unittest -from bazel_tools.tools.python.runfiles import runfiles +from python.runfiles import runfiles class IsCompressedTest(unittest.TestCase): diff --git a/tests/tar/pkg_tar_test.py b/tests/tar/pkg_tar_test.py index eb8a127..582d4df 100644 --- a/tests/tar/pkg_tar_test.py +++ b/tests/tar/pkg_tar_test.py @@ -16,7 +16,7 @@ import tarfile import unittest -from bazel_tools.tools.python.runfiles import runfiles +from python.runfiles import runfiles from pkg.private.tar import tar_writer PORTABLE_MTIME = 946684800 # 2000-01-01 00:00:00.000 UTC @@ -109,12 +109,11 @@ class PkgTarTest(unittest.TestCase): {'name': 'etc'}, {'name': 'etc/nsswitch.conf'}, {'name': 'external'}, - {'name': 'external/bazel_tools'}, - {'name': 'external/bazel_tools/tools'}, - {'name': 'external/bazel_tools/tools/python'}, - {'name': 'external/bazel_tools/tools/python/runfiles'}, + {'name': 'external/rules_python'}, + {'name': 'external/rules_python/python'}, + {'name': 'external/rules_python/python/runfiles'}, # This is brittle. In old bazel the next file would be - # external/bazel_tools/tools/python/runfiles/runfiles.py, but there + # external/rules_python/python/runfiles/runfiles.py, but there # is now _runfiles_constants.py, first. So this is too brittle. {'halt': None}, ] diff --git a/tests/tar/tar_writer_test.py b/tests/tar/tar_writer_test.py index 39008ea..ad31b0c 100644 --- a/tests/tar/tar_writer_test.py +++ b/tests/tar/tar_writer_test.py @@ -17,7 +17,7 @@ import os import tarfile import unittest -from bazel_tools.tools.python.runfiles import runfiles +from python.runfiles import runfiles from pkg.private.tar import tar_writer from tests.tar import compressor diff --git a/tests/zip/BUILD b/tests/zip/BUILD index 52b17f0..5cd764d 100644 --- a/tests/zip/BUILD +++ b/tests/zip/BUILD @@ -32,7 +32,7 @@ py_library( imports = ["../.."], srcs_version = "PY3", deps = [ - "@bazel_tools//tools/python/runfiles", + "@rules_python//python/runfiles", ], ) diff --git a/tests/zip/zip_test.py b/tests/zip/zip_test.py index e5955eb..6978dc5 100644 --- a/tests/zip/zip_test.py +++ b/tests/zip/zip_test.py @@ -19,7 +19,7 @@ import sys import unittest import zipfile -from bazel_tools.tools.python.runfiles import runfiles +from python.runfiles import runfiles from tests.zip import zip_test_lib HELLO_CRC = 2069210904 diff --git a/tests/zip/zip_test_lib.py b/tests/zip/zip_test_lib.py index a9d237c..ebb0b60 100644 --- a/tests/zip/zip_test_lib.py +++ b/tests/zip/zip_test_lib.py @@ -17,7 +17,7 @@ import filecmp import unittest import zipfile -from bazel_tools.tools.python.runfiles import runfiles +from python.runfiles import runfiles # Unix dir bit and Windows dir bit. Magic from zip spec @@ -44,9 +44,7 @@ class ZipTest(unittest.TestCase): def get_test_zip(self, zip_file): """Get the file path to a generated zip in the runfiles.""" - return self.data_files.Rlocation( - "rules_pkg/tests/zip/" + zip_file - ) + return self.data_files.Rlocation("rules_pkg/tests/zip/" + zip_file) class ZipContentsTestBase(ZipTest):