mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Python: Copy Python extractor to codeql repo
This commit is contained in:
49
python/extractor/BUILD.bazel
Normal file
49
python/extractor/BUILD.bazel
Normal file
@@ -0,0 +1,49 @@
|
||||
load("//:dist.bzl", "pack_zip")
|
||||
|
||||
py_binary(
|
||||
name = "make-zips-py",
|
||||
srcs = [
|
||||
"make_zips.py",
|
||||
"python_tracer.py",
|
||||
"unparse.py",
|
||||
],
|
||||
data = [
|
||||
"LICENSE-PSF.md",
|
||||
"__main__.py",
|
||||
"imp.py",
|
||||
] + glob([
|
||||
"blib2to3/**",
|
||||
"buildtools/**",
|
||||
"lark/**",
|
||||
"semmle/**",
|
||||
]),
|
||||
# On @criemen's machine, without this, make-zips.py can't find its imports from
|
||||
# python_tracer. The problem didn't show for some reason on Windows CI machines, though.
|
||||
imports = ["."],
|
||||
main = "make_zips.py",
|
||||
)
|
||||
|
||||
genrule(
|
||||
name = "python3src",
|
||||
outs = [
|
||||
"python3src.zip",
|
||||
],
|
||||
cmd = "PYTHON_INSTALLER_OUTPUT=\"$(RULEDIR)\" $(location :make-zips-py)",
|
||||
tools = [":make-zips-py"],
|
||||
)
|
||||
|
||||
pack_zip(
|
||||
name = "extractor-python",
|
||||
srcs = [
|
||||
"LICENSE-PSF.md", # because we distribute imp.py
|
||||
"convert_setup.py",
|
||||
"get_venv_lib.py",
|
||||
"imp.py",
|
||||
"index.py",
|
||||
"python_tracer.py",
|
||||
"setup.py",
|
||||
":python3src",
|
||||
] + glob(["data/**"]),
|
||||
prefix = "tools",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
Reference in New Issue
Block a user