mirror of https://github.com/bazelbuild/rules_pkg
use runfiles from rules_python (#768)
This commit is contained in:
parent
2b391f233c
commit
1b033ddaee
|
@ -1,3 +1,4 @@
|
|||
.bazeliskrc
|
||||
.ijwb
|
||||
bazel-*
|
||||
MODULE.bazel.lock
|
||||
|
|
|
@ -98,7 +98,7 @@ py_test(
|
|||
],
|
||||
deps = [
|
||||
"//pkg/releasing:release_utils",
|
||||
"@bazel_tools//tools/python/runfiles",
|
||||
"@rules_python//python/runfiles",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
import unittest
|
||||
|
||||
from bazel_tools.tools.python.runfiles import runfiles
|
||||
from python.runfiles import runfiles
|
||||
from pkg.private import archive
|
||||
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ py_test(
|
|||
python_version = "PY3",
|
||||
deps = [
|
||||
"//pkg/private:archive",
|
||||
"@bazel_tools//tools/python/runfiles",
|
||||
"@rules_python//python/runfiles",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ py_library(
|
|||
imports = ["../.."],
|
||||
srcs_version = "PY3",
|
||||
deps = [
|
||||
"@bazel_tools//tools/python/runfiles",
|
||||
"@rules_python//python/runfiles",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -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."""
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
import unittest
|
||||
|
||||
from bazel_tools.tools.python.runfiles import runfiles
|
||||
from python.runfiles import runfiles
|
||||
|
||||
|
||||
class IsCompressedTest(unittest.TestCase):
|
||||
|
|
|
@ -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},
|
||||
]
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ py_library(
|
|||
imports = ["../.."],
|
||||
srcs_version = "PY3",
|
||||
deps = [
|
||||
"@bazel_tools//tools/python/runfiles",
|
||||
"@rules_python//python/runfiles",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue