зеркало из https://github.com/github/codeql.git
Python: Move to the new packaging rules.
This commit is contained in:
Родитель
dcd44859f5
Коммит
1158e92f12
|
@ -1,6 +1,5 @@
|
|||
load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files")
|
||||
load("@semmle_code//:dist.bzl", "dist", "pack_zip")
|
||||
load("//:defs.bzl", "codeql_platform")
|
||||
load("//misc/bazel:pkg.bzl", "codeql_pack", "codeql_pkg_files")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -37,25 +36,22 @@ pkg_files(
|
|||
strip_prefix = None,
|
||||
)
|
||||
|
||||
dist(
|
||||
name = "extractor-generic",
|
||||
codeql_pkg_files(
|
||||
name = "extractor-arch",
|
||||
exes = [
|
||||
"//python/extractor/tsg-python",
|
||||
],
|
||||
prefix = "tools/{CODEQL_PLATFORM}",
|
||||
)
|
||||
|
||||
codeql_pack(
|
||||
name = "python",
|
||||
srcs = [
|
||||
":codeql-extractor-yml",
|
||||
":dbscheme-group",
|
||||
":extractor-arch",
|
||||
"//python/downgrades",
|
||||
"//python/extractor",
|
||||
"//python/tools",
|
||||
],
|
||||
prefix = "python",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
pack_zip(
|
||||
name = "extractor-arch",
|
||||
srcs = [
|
||||
"//python/extractor/tsg-python",
|
||||
],
|
||||
package_file_name = "extractor-" + codeql_platform + ".zip",
|
||||
prefix = "python/tools/" + codeql_platform,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("@semmle_code//:dist.bzl", "pack_zip")
|
||||
load("//misc/bazel:pkg.bzl", "codeql_pkg_files", "strip_prefix")
|
||||
|
||||
py_binary(
|
||||
name = "make-zips-py",
|
||||
|
@ -31,7 +31,7 @@ genrule(
|
|||
tools = [":make-zips-py"],
|
||||
)
|
||||
|
||||
pack_zip(
|
||||
codeql_pkg_files(
|
||||
name = "extractor",
|
||||
srcs = [
|
||||
"LICENSE-PSF.md", # because we distribute imp.py
|
||||
|
@ -44,5 +44,6 @@ pack_zip(
|
|||
":python3src",
|
||||
] + glob(["data/**"]),
|
||||
prefix = "tools",
|
||||
visibility = ["//visibility:public"],
|
||||
strip_prefix=strip_prefix.from_pkg(),
|
||||
visibility = ["//python:__pkg__"],
|
||||
)
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
load("@semmle_code//:dist.bzl", "pack_zip")
|
||||
load("//misc/bazel:pkg.bzl", "codeql_pkg_files")
|
||||
|
||||
pack_zip(
|
||||
codeql_pkg_files(
|
||||
name = "tools",
|
||||
srcs = glob(["**/*"]),
|
||||
excludes = [
|
||||
"BUILD.bazel",
|
||||
] + glob(["recorded-call-graph-metrics/**"]),
|
||||
exes = glob(
|
||||
["**/*"],
|
||||
exclude = [
|
||||
"BUILD.bazel",
|
||||
"recorded-call-graph-metrics/**",
|
||||
],
|
||||
),
|
||||
prefix = "tools",
|
||||
visibility = ["//visibility:public"],
|
||||
visibility = ["//python:__pkg__"],
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче