Fixing pasta by not stripping the subdirectory.
PiperOrigin-RevId: 228125275
This commit is contained in:
parent
56ab6a2a7b
commit
48d0e4d813
5
third_party/pasta/BUILD.bazel
vendored
5
third_party/pasta/BUILD.bazel
vendored
@ -1,5 +1,6 @@
|
||||
# Description:
|
||||
# AST-based python refactoring.
|
||||
load("@//third_party/pasta:build_defs.bzl", "copy_srcs")
|
||||
|
||||
licenses(["notice"]) # Apache2
|
||||
|
||||
@ -7,7 +8,7 @@ exports_files(["LICENSE"])
|
||||
|
||||
py_library(
|
||||
name = "pasta",
|
||||
srcs = [
|
||||
srcs = copy_srcs([
|
||||
"__init__.py",
|
||||
"augment/__init__.py",
|
||||
"augment/errors.py",
|
||||
@ -23,7 +24,7 @@ py_library(
|
||||
"base/scope.py",
|
||||
"base/test_utils.py",
|
||||
"base/token_generator.py",
|
||||
],
|
||||
]),
|
||||
srcs_version = "PY2AND3",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
12
third_party/pasta/build_defs.bzl
vendored
Normal file
12
third_party/pasta/build_defs.bzl
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
"""Skylark makros for building pasta."""
|
||||
|
||||
def copy_srcs(srcs):
|
||||
"""Copies srcs from 'pasta' to parent directory."""
|
||||
for src in srcs:
|
||||
native.genrule(
|
||||
name = src.replace(".", "_"),
|
||||
srcs = ["pasta/" + src],
|
||||
outs = [src],
|
||||
cmd = "mkdir -p $$(dirname $@); cp $< $@",
|
||||
)
|
||||
return srcs
|
2
third_party/pasta/workspace.bzl
vendored
2
third_party/pasta/workspace.bzl
vendored
@ -9,7 +9,7 @@ def repo():
|
||||
"https://mirror.bazel.build/github.com/google/pasta/archive/c3d72cdee6fc806251949e912510444d58d7413c.tar.gz",
|
||||
"https://github.com/google/pasta/archive/c3d72cdee6fc806251949e912510444d58d7413c.tar.gz",
|
||||
],
|
||||
strip_prefix = "pasta-c3d72cdee6fc806251949e912510444d58d7413c/pasta",
|
||||
strip_prefix = "pasta-c3d72cdee6fc806251949e912510444d58d7413c",
|
||||
sha256 = "b5905f9cecc4b28363c563f3c4cb0545288bd35f7cc72c55066e97e53befc084",
|
||||
build_file = "//third_party/pasta:BUILD.bazel",
|
||||
system_build_file = "//third_party/pasta:BUILD.system",
|
||||
|
Loading…
Reference in New Issue
Block a user